@unocss/core 0.62.1 → 0.62.3

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 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.1";
642
+ const version = "0.62.3";
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;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/core",
3
3
  "type": "module",
4
- "version": "0.62.1",
4
+ "version": "0.62.3",
5
5
  "description": "The instant on-demand Atomic CSS engine.",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",