@unocss/core 0.34.1 → 0.35.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 CHANGED
@@ -457,7 +457,7 @@ function resolveConfig(userConfig = {}, defaults = {}) {
457
457
  };
458
458
  }
459
459
 
460
- const version = "0.34.1";
460
+ const version = "0.35.0";
461
461
 
462
462
  class UnoGenerator {
463
463
  constructor(userConfig = {}, defaults = {}) {
package/dist/index.d.ts CHANGED
@@ -327,8 +327,8 @@ declare type DynamicShortcut<Theme extends {} = {}> = [RegExp, DynamicShortcutMa
327
327
  declare type UserShortcuts<Theme extends {} = {}> = StaticShortcutMap | (StaticShortcut | DynamicShortcut<Theme> | StaticShortcutMap)[];
328
328
  declare type Shortcut<Theme extends {} = {}> = StaticShortcut | DynamicShortcut<Theme>;
329
329
  declare type FilterPattern = ReadonlyArray<string | RegExp> | string | RegExp | null;
330
- interface Preflight {
331
- getCSS: (context: PreflightContext) => Promise<string | undefined> | string | undefined;
330
+ interface Preflight<Theme extends {} = {}> {
331
+ getCSS: (context: PreflightContext<Theme>) => Promise<string | undefined> | string | undefined;
332
332
  layer?: string;
333
333
  }
334
334
  declare type BlocklistRule = string | RegExp;
@@ -419,7 +419,7 @@ interface ConfigBase<Theme extends {} = {}> {
419
419
  /**
420
420
  * Raw CSS injections.
421
421
  */
422
- preflights?: Preflight[];
422
+ preflights?: Preflight<Theme>[];
423
423
  /**
424
424
  * Theme object for shared configuration between rules
425
425
  */
@@ -554,7 +554,7 @@ interface UserOnlyOptions<Theme extends {} = {}> {
554
554
  /**
555
555
  * Presets
556
556
  */
557
- presets?: (Preset | Preset[])[];
557
+ presets?: (Preset<Theme> | Preset<Theme>[])[];
558
558
  /**
559
559
  * Environment mode
560
560
  *
package/dist/index.mjs CHANGED
@@ -453,7 +453,7 @@ function resolveConfig(userConfig = {}, defaults = {}) {
453
453
  };
454
454
  }
455
455
 
456
- const version = "0.34.1";
456
+ const version = "0.35.0";
457
457
 
458
458
  class UnoGenerator {
459
459
  constructor(userConfig = {}, defaults = {}) {
package/package.json CHANGED
@@ -1,7 +1,19 @@
1
1
  {
2
2
  "name": "@unocss/core",
3
- "version": "0.34.1",
3
+ "version": "0.35.0",
4
4
  "description": "The instant on-demand Atomic CSS engine.",
5
+ "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
+ "license": "MIT",
7
+ "funding": "https://github.com/sponsors/antfu",
8
+ "homepage": "https://github.com/unocss/unocss/tree/main/packages/core#readme",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/unocss/unocss.git",
12
+ "directory": "packages/core"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/unocss/unocss/issues"
16
+ },
5
17
  "keywords": [
6
18
  "unocss",
7
19
  "atomic-css",
@@ -10,32 +22,20 @@
10
22
  "tailwind",
11
23
  "windicss"
12
24
  ],
13
- "homepage": "https://github.com/unocss/unocss/tree/main/packages/core#readme",
14
- "bugs": {
15
- "url": "https://github.com/unocss/unocss/issues"
16
- },
17
- "license": "MIT",
18
- "author": "Anthony Fu <anthonyfu117@hotmail.com>",
19
- "repository": {
20
- "type": "git",
21
- "url": "git+https://github.com/unocss/unocss.git",
22
- "directory": "packages/core"
23
- },
24
- "funding": "https://github.com/sponsors/antfu",
25
- "main": "dist/index.cjs",
26
- "module": "dist/index.mjs",
27
- "types": "dist/index.d.ts",
25
+ "sideEffects": false,
28
26
  "exports": {
29
27
  ".": {
30
- "require": "./dist/index.cjs",
28
+ "types": "./dist/index.d.ts",
31
29
  "import": "./dist/index.mjs",
32
- "types": "./dist/index.d.ts"
30
+ "require": "./dist/index.cjs"
33
31
  }
34
32
  },
33
+ "main": "dist/index.cjs",
34
+ "module": "dist/index.mjs",
35
+ "types": "dist/index.d.ts",
35
36
  "files": [
36
37
  "dist"
37
38
  ],
38
- "sideEffects": false,
39
39
  "devDependencies": {
40
40
  "magic-string": "^0.26.2",
41
41
  "unconfig": "^0.3.4"