transform-to-unocss-core 0.0.55 → 0.0.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.
package/dist/index.cjs CHANGED
@@ -463,6 +463,7 @@ function flex(key, val) {
463
463
  const [value, important] = transformImportant(val);
464
464
  if (lastMaps.includes(key)) return `${getLastName(key)}${getVal(value)}${important}`;
465
465
  if (value === "1") return `flex-1${important}`;
466
+ if (/^\d+$/.test(value)) return `flex-[${value}]${important}`;
466
467
  const firstVal = value[0];
467
468
  if (key === "flex" && (firstVal === "0" || firstVal === "1")) return `flex="[${joinWithUnderLine(value)}]${important}"`;
468
469
  return `${getFirstName(key)}-${value.replace("column", "col")}${important}`;
@@ -465,6 +465,7 @@ function flex(key, val) {
465
465
  const [value, important] = transformImportant(val);
466
466
  if (lastMaps.includes(key)) return `${getLastName(key)}${getVal(value)}${important}`;
467
467
  if (value === "1") return `flex-1${important}`;
468
+ if (/^\d+$/.test(value)) return `flex-[${value}]${important}`;
468
469
  const firstVal = value[0];
469
470
  if (key === "flex" && (firstVal === "0" || firstVal === "1")) return `flex="[${joinWithUnderLine(value)}]${important}"`;
470
471
  return `${getFirstName(key)}-${value.replace("column", "col")}${important}`;
package/dist/index.js CHANGED
@@ -461,6 +461,7 @@ function flex(key, val) {
461
461
  const [value, important] = transformImportant(val);
462
462
  if (lastMaps.includes(key)) return `${getLastName(key)}${getVal(value)}${important}`;
463
463
  if (value === "1") return `flex-1${important}`;
464
+ if (/^\d+$/.test(value)) return `flex-[${value}]${important}`;
464
465
  const firstVal = value[0];
465
466
  if (key === "flex" && (firstVal === "0" || firstVal === "1")) return `flex="[${joinWithUnderLine(value)}]${important}"`;
466
467
  return `${getFirstName(key)}-${value.replace("column", "col")}${important}`;
package/dist/index.umd.js CHANGED
@@ -468,6 +468,7 @@ function flex(key, val) {
468
468
  const [value, important] = transformImportant(val);
469
469
  if (lastMaps.includes(key)) return `${getLastName(key)}${getVal(value)}${important}`;
470
470
  if (value === "1") return `flex-1${important}`;
471
+ if (/^\d+$/.test(value)) return `flex-[${value}]${important}`;
471
472
  const firstVal = value[0];
472
473
  if (key === "flex" && (firstVal === "0" || firstVal === "1")) return `flex="[${joinWithUnderLine(value)}]${important}"`;
473
474
  return `${getFirstName(key)}-${value.replace("column", "col")}${important}`;
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.55",
4
+ "version": "0.0.56",
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",