@unocss/nuxt 0.31.3 → 0.31.8

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
@@ -76,4 +76,4 @@ declare module '@nuxt/schema' {
76
76
  }
77
77
  }
78
78
 
79
- export { _default as default };
79
+ export { UnocssNuxtOptions, _default as default };
package/dist/index.mjs CHANGED
@@ -13,18 +13,19 @@ import presetWind from '@unocss/preset-wind';
13
13
  function resolveOptions(options) {
14
14
  if (options.presets == null) {
15
15
  options.presets = [];
16
- if (options.uno)
17
- options.presets.push(presetUno(typeof options.uno === "boolean" ? {} : options.uno));
18
- if (options.wind)
19
- options.presets.push(presetWind(typeof options.wind === "boolean" ? {} : options.wind));
20
- if (options.attributify)
21
- options.presets.push(presetAttributify(typeof options.attributify === "boolean" ? {} : options.attributify));
22
- if (options.icons)
23
- options.presets.push(presetIcons(typeof options.icons === "boolean" ? {} : options.icons));
24
- if (options.webFonts)
25
- options.presets.push(presetWebFonts(typeof options.webFonts === "boolean" ? {} : options.webFonts));
26
- if (options.typography)
27
- options.presets.push(presetTypography(typeof options.typography === "boolean" ? {} : options.typography));
16
+ const presetMap = {
17
+ uno: presetUno,
18
+ attributify: presetAttributify,
19
+ icons: presetIcons,
20
+ webFonts: presetWebFonts,
21
+ typography: presetTypography,
22
+ wind: presetWind
23
+ };
24
+ for (const [key, preset] of Object.entries(presetMap)) {
25
+ const option = options[key];
26
+ if (option)
27
+ options.presets.push(preset(typeof option === "boolean" ? {} : option));
28
+ }
28
29
  }
29
30
  }
30
31
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/nuxt",
3
- "version": "0.31.3",
3
+ "version": "0.31.8",
4
4
  "description": "Nuxt module for UnoCSS",
5
5
  "keywords": [
6
6
  "unocss",
@@ -36,21 +36,21 @@
36
36
  ],
37
37
  "sideEffects": false,
38
38
  "dependencies": {
39
- "@nuxt/kit": "npm:@nuxt/kit-edge@latest",
40
- "@unocss/core": "0.31.3",
41
- "@unocss/preset-attributify": "0.31.3",
42
- "@unocss/preset-icons": "0.31.3",
43
- "@unocss/preset-typography": "0.31.3",
44
- "@unocss/preset-uno": "0.31.3",
45
- "@unocss/preset-web-fonts": "0.31.3",
46
- "@unocss/preset-wind": "0.31.3",
47
- "@unocss/reset": "0.31.3",
48
- "@unocss/vite": "0.31.3",
49
- "@unocss/webpack": "0.31.3",
50
- "unocss": "0.31.3"
39
+ "@nuxt/kit": "^3.0.0-rc.0",
40
+ "@unocss/core": "0.31.8",
41
+ "@unocss/preset-attributify": "0.31.8",
42
+ "@unocss/preset-icons": "0.31.8",
43
+ "@unocss/preset-typography": "0.31.8",
44
+ "@unocss/preset-uno": "0.31.8",
45
+ "@unocss/preset-web-fonts": "0.31.8",
46
+ "@unocss/preset-wind": "0.31.8",
47
+ "@unocss/reset": "0.31.8",
48
+ "@unocss/vite": "0.31.8",
49
+ "@unocss/webpack": "0.31.8",
50
+ "unocss": "0.31.8"
51
51
  },
52
52
  "devDependencies": {
53
- "@nuxt/schema": "npm:@nuxt/schema-edge@latest"
53
+ "@nuxt/schema": "^3.0.0-rc.0"
54
54
  },
55
55
  "scripts": {
56
56
  "build": "unbuild",