@unocss/core 0.41.0 → 0.42.0
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 +6 -8
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +6 -8
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -460,7 +460,7 @@ function resolveConfig(userConfig = {}, defaults = {}) {
|
|
|
460
460
|
};
|
|
461
461
|
}
|
|
462
462
|
|
|
463
|
-
const version = "0.
|
|
463
|
+
const version = "0.42.0";
|
|
464
464
|
|
|
465
465
|
class UnoGenerator {
|
|
466
466
|
constructor(userConfig = {}, defaults = {}) {
|
|
@@ -590,15 +590,13 @@ class UnoGenerator {
|
|
|
590
590
|
generator: this,
|
|
591
591
|
theme: this.config.theme
|
|
592
592
|
};
|
|
593
|
-
const preflightLayerSet = /* @__PURE__ */ new Set([
|
|
594
|
-
this.config.preflights.forEach(({ layer }) => {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
preflightLayerSet.add(layer);
|
|
598
|
-
}
|
|
593
|
+
const preflightLayerSet = /* @__PURE__ */ new Set([]);
|
|
594
|
+
this.config.preflights.forEach(({ layer = "preflights" }) => {
|
|
595
|
+
layerSet.add(layer);
|
|
596
|
+
preflightLayerSet.add(layer);
|
|
599
597
|
});
|
|
600
598
|
preflightsMap = Object.fromEntries(await Promise.all(Array.from(preflightLayerSet).map(async (layer) => {
|
|
601
|
-
const preflights2 = await Promise.all(this.config.preflights.filter((i) => (i.layer || "
|
|
599
|
+
const preflights2 = await Promise.all(this.config.preflights.filter((i) => (i.layer || "preflights") === layer).map(async (i) => await i.getCSS(preflightContext)));
|
|
602
600
|
const css = preflights2.filter(Boolean).join(nl);
|
|
603
601
|
return [layer, css];
|
|
604
602
|
})));
|
package/dist/index.d.ts
CHANGED
|
@@ -608,6 +608,8 @@ interface UnocssPluginContext<Config extends UserConfig = UserConfig> {
|
|
|
608
608
|
tokens: Set<string>;
|
|
609
609
|
/** Map for all module's raw content */
|
|
610
610
|
modules: BetterMap<string, string>;
|
|
611
|
+
/** Module IDs that been affected by UnoCSS */
|
|
612
|
+
affectedModules: Set<string>;
|
|
611
613
|
filter: (code: string, id: string) => boolean;
|
|
612
614
|
extract: (code: string, id?: string) => Promise<void>;
|
|
613
615
|
reloadConfig: () => Promise<LoadConfigResult<Config>>;
|
package/dist/index.mjs
CHANGED
|
@@ -456,7 +456,7 @@ function resolveConfig(userConfig = {}, defaults = {}) {
|
|
|
456
456
|
};
|
|
457
457
|
}
|
|
458
458
|
|
|
459
|
-
const version = "0.
|
|
459
|
+
const version = "0.42.0";
|
|
460
460
|
|
|
461
461
|
class UnoGenerator {
|
|
462
462
|
constructor(userConfig = {}, defaults = {}) {
|
|
@@ -586,15 +586,13 @@ class UnoGenerator {
|
|
|
586
586
|
generator: this,
|
|
587
587
|
theme: this.config.theme
|
|
588
588
|
};
|
|
589
|
-
const preflightLayerSet = /* @__PURE__ */ new Set([
|
|
590
|
-
this.config.preflights.forEach(({ layer }) => {
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
preflightLayerSet.add(layer);
|
|
594
|
-
}
|
|
589
|
+
const preflightLayerSet = /* @__PURE__ */ new Set([]);
|
|
590
|
+
this.config.preflights.forEach(({ layer = "preflights" }) => {
|
|
591
|
+
layerSet.add(layer);
|
|
592
|
+
preflightLayerSet.add(layer);
|
|
595
593
|
});
|
|
596
594
|
preflightsMap = Object.fromEntries(await Promise.all(Array.from(preflightLayerSet).map(async (layer) => {
|
|
597
|
-
const preflights2 = await Promise.all(this.config.preflights.filter((i) => (i.layer || "
|
|
595
|
+
const preflights2 = await Promise.all(this.config.preflights.filter((i) => (i.layer || "preflights") === layer).map(async (i) => await i.getCSS(preflightContext)));
|
|
598
596
|
const css = preflights2.filter(Boolean).join(nl);
|
|
599
597
|
return [layer, css];
|
|
600
598
|
})));
|