@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 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 layers.filter((i) => !(excludes == null ? void 0 : excludes.includes(i))).map((i) => getLayer(i) || "").filter(Boolean).join("\n");
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 layers.filter((i) => !(excludes == null ? void 0 : excludes.includes(i))).map((i) => getLayer(i) || "").filter(Boolean).join("\n");
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() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/core",
3
- "version": "0.7.7",
3
+ "version": "0.9.1",
4
4
  "description": "The instant on-demand Atomic CSS engine.",
5
5
  "keywords": [
6
6
  "unocss",