@unocss/core 0.62.1 → 0.62.2
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.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.mjs +4 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -606,6 +606,10 @@ interface ConfigBase<Theme extends object = object> {
|
|
|
606
606
|
*
|
|
607
607
|
*/
|
|
608
608
|
content?: ContentOptions;
|
|
609
|
+
/**
|
|
610
|
+
* Custom transformers to the source code.
|
|
611
|
+
*/
|
|
612
|
+
transformers?: SourceCodeTransformer[];
|
|
609
613
|
}
|
|
610
614
|
interface OutputCssLayersOptions {
|
|
611
615
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -606,6 +606,10 @@ interface ConfigBase<Theme extends object = object> {
|
|
|
606
606
|
*
|
|
607
607
|
*/
|
|
608
608
|
content?: ContentOptions;
|
|
609
|
+
/**
|
|
610
|
+
* Custom transformers to the source code.
|
|
611
|
+
*/
|
|
612
|
+
transformers?: SourceCodeTransformer[];
|
|
609
613
|
}
|
|
610
614
|
interface OutputCssLayersOptions {
|
|
611
615
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -94,7 +94,7 @@ function clearIdenticalEntries(entry) {
|
|
|
94
94
|
function entriesToCss(arr) {
|
|
95
95
|
if (arr == null)
|
|
96
96
|
return "";
|
|
97
|
-
return clearIdenticalEntries(arr).map(([key, value]) => value != null ? `${key}:${value};` : void 0).filter(Boolean).join("");
|
|
97
|
+
return clearIdenticalEntries(arr).map(([key, value]) => value != null && typeof value !== "function" ? `${key}:${value};` : void 0).filter(Boolean).join("");
|
|
98
98
|
}
|
|
99
99
|
function isObject(item) {
|
|
100
100
|
return item && typeof item === "object" && !Array.isArray(item);
|
|
@@ -588,7 +588,8 @@ function resolveConfig(userConfig = {}, defaults = {}) {
|
|
|
588
588
|
safelist: getMerged("safelist"),
|
|
589
589
|
separators,
|
|
590
590
|
details: config.details ?? config.envMode === "dev",
|
|
591
|
-
content
|
|
591
|
+
content,
|
|
592
|
+
transformers: uniqueBy(getMerged("transformers"), (a, b) => a.name === b.name)
|
|
592
593
|
};
|
|
593
594
|
for (const p of sources)
|
|
594
595
|
p?.configResolved?.(resolved);
|
|
@@ -638,7 +639,7 @@ function definePreset(preset) {
|
|
|
638
639
|
return preset;
|
|
639
640
|
}
|
|
640
641
|
|
|
641
|
-
const version = "0.62.
|
|
642
|
+
const version = "0.62.2";
|
|
642
643
|
|
|
643
644
|
var __defProp = Object.defineProperty;
|
|
644
645
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|