@unocss/core 0.7.7 → 0.9.1
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.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -159,7 +159,7 @@ interface ConfigBase<Theme extends {} = {}> {
|
|
|
159
159
|
*/
|
|
160
160
|
sortLayers?: (layers: string[]) => string[];
|
|
161
161
|
}
|
|
162
|
-
interface Preset extends ConfigBase {
|
|
162
|
+
interface Preset<Theme extends {} = {}> extends ConfigBase<Theme> {
|
|
163
163
|
name: string;
|
|
164
164
|
enforce?: 'pre' | 'post';
|
|
165
165
|
}
|
|
@@ -214,7 +214,7 @@ interface GenerateResult {
|
|
|
214
214
|
css: string;
|
|
215
215
|
layers: string[];
|
|
216
216
|
getLayer(name?: string): string | undefined;
|
|
217
|
-
getLayers(excludes?: string[]): string;
|
|
217
|
+
getLayers(includes?: string[], excludes?: string[]): string;
|
|
218
218
|
matched: Set<string>;
|
|
219
219
|
}
|
|
220
220
|
declare type VariantMatchedResult = readonly [
|
package/dist/index.js
CHANGED
|
@@ -445,8 +445,8 @@ ${rules}
|
|
|
445
445
|
return layerCache[layer] = layerComments && css ? `/* layer: ${layer} */
|
|
446
446
|
${css}` : css;
|
|
447
447
|
};
|
|
448
|
-
const getLayers = (excludes) => {
|
|
449
|
-
return
|
|
448
|
+
const getLayers = (includes = layers, excludes) => {
|
|
449
|
+
return includes.filter((i) => !(excludes == null ? void 0 : excludes.includes(i))).map((i) => getLayer(i) || "").filter(Boolean).join("\n");
|
|
450
450
|
};
|
|
451
451
|
return {
|
|
452
452
|
get css() {
|
package/dist/index.mjs
CHANGED
|
@@ -408,8 +408,8 @@ ${rules}
|
|
|
408
408
|
return layerCache[layer] = layerComments && css ? `/* layer: ${layer} */
|
|
409
409
|
${css}` : css;
|
|
410
410
|
};
|
|
411
|
-
const getLayers = (excludes) => {
|
|
412
|
-
return
|
|
411
|
+
const getLayers = (includes = layers, excludes) => {
|
|
412
|
+
return includes.filter((i) => !(excludes == null ? void 0 : excludes.includes(i))).map((i) => getLayer(i) || "").filter(Boolean).join("\n");
|
|
413
413
|
};
|
|
414
414
|
return {
|
|
415
415
|
get css() {
|