transform-to-unocss-core 0.0.56 → 0.0.58

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/index.cjs CHANGED
@@ -148,7 +148,7 @@ function animation(key, val) {
148
148
  const [value, important] = transformImportant(val);
149
149
  if (key === "animation-delay") return `animate-delay${getVal(value)}${important}`;
150
150
  if (key === "animation-duration") return `animate-duration${getVal(value)}${important}`;
151
- if (key === "animation-name") return `animate-[${value}]${important}`;
151
+ if (key === "animation-name") return `animate-name-[${value}]${important}`;
152
152
  if (key === "animation-timing-function") return `animate-ease-[${value}]${important}`;
153
153
  if (key === "animation-iteration-count") return `animate-count${getVal(value)}${important}`;
154
154
  if (key === "animation-direction") return `animate-direction-${value}${important}`;
@@ -267,7 +267,7 @@ function background(key, val) {
267
267
  return direction ? `bg-gradient-to-${direction}${getLinearGradientPosition$1(from, via, to)}` : getLinearGradientPosition$1(from, via, to);
268
268
  }
269
269
  const matcher1 = newValue.match(linearGradientReg1);
270
- if (!matcher1) return;
270
+ if (!matcher1) return `bg="[${matchMultipleBgAttrs(value)}]"`;
271
271
  return `bg-gradient-linear bg-gradient-[${matcher1[1]}${matcher1[2] ? `,${matcher1[2].replace(/\s+/, "_").replaceAll(commaReplacer, ",")}` : ""},${matcher1[3].replace(/\s+/, "_").replaceAll(commaReplacer, ",")}]`;
272
272
  } else if (/^(?:radial|conic)-gradient/.test(value)) {
273
273
  const newValue = value.replace(/rgba?\(([^)]+)\)/g, (all, v) => all.replace(v, v.replace(/\s*,\s*/g, commaReplacer)));
@@ -150,7 +150,7 @@ function animation(key, val) {
150
150
  const [value, important] = transformImportant(val);
151
151
  if (key === "animation-delay") return `animate-delay${getVal(value)}${important}`;
152
152
  if (key === "animation-duration") return `animate-duration${getVal(value)}${important}`;
153
- if (key === "animation-name") return `animate-[${value}]${important}`;
153
+ if (key === "animation-name") return `animate-name-[${value}]${important}`;
154
154
  if (key === "animation-timing-function") return `animate-ease-[${value}]${important}`;
155
155
  if (key === "animation-iteration-count") return `animate-count${getVal(value)}${important}`;
156
156
  if (key === "animation-direction") return `animate-direction-${value}${important}`;
@@ -269,7 +269,7 @@ function background(key, val) {
269
269
  return direction ? `bg-gradient-to-${direction}${getLinearGradientPosition$1(from, via, to)}` : getLinearGradientPosition$1(from, via, to);
270
270
  }
271
271
  const matcher1 = newValue.match(linearGradientReg1);
272
- if (!matcher1) return;
272
+ if (!matcher1) return `bg="[${matchMultipleBgAttrs(value)}]"`;
273
273
  return `bg-gradient-linear bg-gradient-[${matcher1[1]}${matcher1[2] ? `,${matcher1[2].replace(/\s+/, "_").replaceAll(commaReplacer, ",")}` : ""},${matcher1[3].replace(/\s+/, "_").replaceAll(commaReplacer, ",")}]`;
274
274
  } else if (/^(?:radial|conic)-gradient/.test(value)) {
275
275
  const newValue = value.replace(/rgba?\(([^)]+)\)/g, (all, v) => all.replace(v, v.replace(/\s*,\s*/g, commaReplacer)));
package/dist/index.js CHANGED
@@ -146,7 +146,7 @@ function animation(key, val) {
146
146
  const [value, important] = transformImportant(val);
147
147
  if (key === "animation-delay") return `animate-delay${getVal(value)}${important}`;
148
148
  if (key === "animation-duration") return `animate-duration${getVal(value)}${important}`;
149
- if (key === "animation-name") return `animate-[${value}]${important}`;
149
+ if (key === "animation-name") return `animate-name-[${value}]${important}`;
150
150
  if (key === "animation-timing-function") return `animate-ease-[${value}]${important}`;
151
151
  if (key === "animation-iteration-count") return `animate-count${getVal(value)}${important}`;
152
152
  if (key === "animation-direction") return `animate-direction-${value}${important}`;
@@ -265,7 +265,7 @@ function background(key, val) {
265
265
  return direction ? `bg-gradient-to-${direction}${getLinearGradientPosition$1(from, via, to)}` : getLinearGradientPosition$1(from, via, to);
266
266
  }
267
267
  const matcher1 = newValue.match(linearGradientReg1);
268
- if (!matcher1) return;
268
+ if (!matcher1) return `bg="[${matchMultipleBgAttrs(value)}]"`;
269
269
  return `bg-gradient-linear bg-gradient-[${matcher1[1]}${matcher1[2] ? `,${matcher1[2].replace(/\s+/, "_").replaceAll(commaReplacer, ",")}` : ""},${matcher1[3].replace(/\s+/, "_").replaceAll(commaReplacer, ",")}]`;
270
270
  } else if (/^(?:radial|conic)-gradient/.test(value)) {
271
271
  const newValue = value.replace(/rgba?\(([^)]+)\)/g, (all, v) => all.replace(v, v.replace(/\s*,\s*/g, commaReplacer)));
package/dist/index.umd.js CHANGED
@@ -153,7 +153,7 @@ function animation(key, val) {
153
153
  const [value, important] = transformImportant(val);
154
154
  if (key === "animation-delay") return `animate-delay${getVal(value)}${important}`;
155
155
  if (key === "animation-duration") return `animate-duration${getVal(value)}${important}`;
156
- if (key === "animation-name") return `animate-[${value}]${important}`;
156
+ if (key === "animation-name") return `animate-name-[${value}]${important}`;
157
157
  if (key === "animation-timing-function") return `animate-ease-[${value}]${important}`;
158
158
  if (key === "animation-iteration-count") return `animate-count${getVal(value)}${important}`;
159
159
  if (key === "animation-direction") return `animate-direction-${value}${important}`;
@@ -272,7 +272,7 @@ function background(key, val) {
272
272
  return direction ? `bg-gradient-to-${direction}${getLinearGradientPosition$1(from, via, to)}` : getLinearGradientPosition$1(from, via, to);
273
273
  }
274
274
  const matcher1 = newValue.match(linearGradientReg1);
275
- if (!matcher1) return;
275
+ if (!matcher1) return `bg="[${matchMultipleBgAttrs(value)}]"`;
276
276
  return `bg-gradient-linear bg-gradient-[${matcher1[1]}${matcher1[2] ? `,${matcher1[2].replace(/\s+/, "_").replaceAll(commaReplacer, ",")}` : ""},${matcher1[3].replace(/\s+/, "_").replaceAll(commaReplacer, ",")}]`;
277
277
  } else if (/^(?:radial|conic)-gradient/.test(value)) {
278
278
  const newValue = value.replace(/rgba?\(([^)]+)\)/g, (all, v) => all.replace(v, v.replace(/\s*,\s*/g, commaReplacer)));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "transform-to-unocss-core",
3
3
  "type": "module",
4
- "version": "0.0.56",
4
+ "version": "0.0.58",
5
5
  "description": "A utility to transform CSS to UnoCSS syntax. Supports various CSS properties and custom parsing.",
6
6
  "author": "Simon He",
7
7
  "license": "MIT",