@unocss/preset-web-fonts 0.54.0 → 0.54.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.cjs CHANGED
@@ -4,6 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const core = require('@unocss/core');
6
6
 
7
+ const LAYER_IMPORTS = "imports";
8
+
7
9
  function createBunnyFontsProvider(name, host) {
8
10
  return {
9
11
  name,
@@ -130,7 +132,7 @@ function preset(options = {}) {
130
132
  }
131
133
  return await importCache[url];
132
134
  } else {
133
- return `@import url('${url}')`;
135
+ return `@import url('${url}');`;
134
136
  }
135
137
  }
136
138
  const enabledProviders = new Set(fonts.map((i) => i.provider));
@@ -150,7 +152,8 @@ function preset(options = {}) {
150
152
  preflights.push(provider.getPreflight?.(fontsForProvider));
151
153
  }
152
154
  return preflights.filter(Boolean).join("\n");
153
- }
155
+ },
156
+ layer: inlineImports ? void 0 : LAYER_IMPORTS
154
157
  }
155
158
  ]
156
159
  };
package/dist/index.mjs CHANGED
@@ -1,5 +1,7 @@
1
1
  import { toArray } from '@unocss/core';
2
2
 
3
+ const LAYER_IMPORTS = "imports";
4
+
3
5
  function createBunnyFontsProvider(name, host) {
4
6
  return {
5
7
  name,
@@ -126,7 +128,7 @@ function preset(options = {}) {
126
128
  }
127
129
  return await importCache[url];
128
130
  } else {
129
- return `@import url('${url}')`;
131
+ return `@import url('${url}');`;
130
132
  }
131
133
  }
132
134
  const enabledProviders = new Set(fonts.map((i) => i.provider));
@@ -146,7 +148,8 @@ function preset(options = {}) {
146
148
  preflights.push(provider.getPreflight?.(fontsForProvider));
147
149
  }
148
150
  return preflights.filter(Boolean).join("\n");
149
- }
151
+ },
152
+ layer: inlineImports ? void 0 : LAYER_IMPORTS
150
153
  }
151
154
  ]
152
155
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-web-fonts",
3
- "version": "0.54.0",
3
+ "version": "0.54.1",
4
4
  "description": "Web Fonts support for Uno CSS",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -38,7 +38,7 @@
38
38
  ],
39
39
  "dependencies": {
40
40
  "ofetch": "^1.1.1",
41
- "@unocss/core": "0.54.0"
41
+ "@unocss/core": "0.54.1"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "unbuild",