transform-to-unocss-core 0.0.53 → 0.0.55
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 +2 -1
- package/dist/index.iife.js +2 -1
- package/dist/index.js +2 -1
- package/dist/index.umd.js +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -459,6 +459,7 @@ const lastMaps = [
|
|
|
459
459
|
"flex-shrink"
|
|
460
460
|
];
|
|
461
461
|
function flex(key, val) {
|
|
462
|
+
if (["flex-negative", "flex-positive"].includes(key)) return "";
|
|
462
463
|
const [value, important] = transformImportant(val);
|
|
463
464
|
if (lastMaps.includes(key)) return `${getLastName(key)}${getVal(value)}${important}`;
|
|
464
465
|
if (value === "1") return `flex-1${important}`;
|
|
@@ -1131,7 +1132,7 @@ function transformStyleToUnocss(styles, isRem) {
|
|
|
1131
1132
|
const key = cur.replaceAll(browserReg, "").trim();
|
|
1132
1133
|
if (cache.has(key)) return result;
|
|
1133
1134
|
cache.add(key);
|
|
1134
|
-
const val = toUnocss(
|
|
1135
|
+
const val = toUnocss(key, isRem) || "";
|
|
1135
1136
|
if (!val) noTransfer.push(cur);
|
|
1136
1137
|
return result += `${val} `;
|
|
1137
1138
|
}, "").trim().replace(/\s+/g, " "), noTransfer];
|
package/dist/index.iife.js
CHANGED
|
@@ -461,6 +461,7 @@ const lastMaps = [
|
|
|
461
461
|
"flex-shrink"
|
|
462
462
|
];
|
|
463
463
|
function flex(key, val) {
|
|
464
|
+
if (["flex-negative", "flex-positive"].includes(key)) return "";
|
|
464
465
|
const [value, important] = transformImportant(val);
|
|
465
466
|
if (lastMaps.includes(key)) return `${getLastName(key)}${getVal(value)}${important}`;
|
|
466
467
|
if (value === "1") return `flex-1${important}`;
|
|
@@ -1133,7 +1134,7 @@ function transformStyleToUnocss(styles, isRem) {
|
|
|
1133
1134
|
const key = cur.replaceAll(browserReg, "").trim();
|
|
1134
1135
|
if (cache.has(key)) return result;
|
|
1135
1136
|
cache.add(key);
|
|
1136
|
-
const val = toUnocss(
|
|
1137
|
+
const val = toUnocss(key, isRem) || "";
|
|
1137
1138
|
if (!val) noTransfer.push(cur);
|
|
1138
1139
|
return result += `${val} `;
|
|
1139
1140
|
}, "").trim().replace(/\s+/g, " "), noTransfer];
|
package/dist/index.js
CHANGED
|
@@ -457,6 +457,7 @@ const lastMaps = [
|
|
|
457
457
|
"flex-shrink"
|
|
458
458
|
];
|
|
459
459
|
function flex(key, val) {
|
|
460
|
+
if (["flex-negative", "flex-positive"].includes(key)) return "";
|
|
460
461
|
const [value, important] = transformImportant(val);
|
|
461
462
|
if (lastMaps.includes(key)) return `${getLastName(key)}${getVal(value)}${important}`;
|
|
462
463
|
if (value === "1") return `flex-1${important}`;
|
|
@@ -1129,7 +1130,7 @@ function transformStyleToUnocss(styles, isRem) {
|
|
|
1129
1130
|
const key = cur.replaceAll(browserReg, "").trim();
|
|
1130
1131
|
if (cache.has(key)) return result;
|
|
1131
1132
|
cache.add(key);
|
|
1132
|
-
const val = toUnocss(
|
|
1133
|
+
const val = toUnocss(key, isRem) || "";
|
|
1133
1134
|
if (!val) noTransfer.push(cur);
|
|
1134
1135
|
return result += `${val} `;
|
|
1135
1136
|
}, "").trim().replace(/\s+/g, " "), noTransfer];
|
package/dist/index.umd.js
CHANGED
|
@@ -464,6 +464,7 @@ const lastMaps = [
|
|
|
464
464
|
"flex-shrink"
|
|
465
465
|
];
|
|
466
466
|
function flex(key, val) {
|
|
467
|
+
if (["flex-negative", "flex-positive"].includes(key)) return "";
|
|
467
468
|
const [value, important] = transformImportant(val);
|
|
468
469
|
if (lastMaps.includes(key)) return `${getLastName(key)}${getVal(value)}${important}`;
|
|
469
470
|
if (value === "1") return `flex-1${important}`;
|
|
@@ -1136,7 +1137,7 @@ function transformStyleToUnocss(styles, isRem) {
|
|
|
1136
1137
|
const key = cur.replaceAll(browserReg, "").trim();
|
|
1137
1138
|
if (cache.has(key)) return result;
|
|
1138
1139
|
cache.add(key);
|
|
1139
|
-
const val = toUnocss(
|
|
1140
|
+
const val = toUnocss(key, isRem) || "";
|
|
1140
1141
|
if (!val) noTransfer.push(cur);
|
|
1141
1142
|
return result += `${val} `;
|
|
1142
1143
|
}, "").trim().replace(/\s+/g, " "), noTransfer];
|
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.
|
|
4
|
+
"version": "0.0.55",
|
|
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",
|