@unocss/preset-web-fonts 0.27.6 → 0.28.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.
Files changed (2) hide show
  1. package/README.md +6 -6
  2. package/package.json +14 -13
package/README.md CHANGED
@@ -27,16 +27,16 @@ Unocss({
27
27
  {
28
28
  name: 'Lato',
29
29
  weights: ['400', '700'],
30
- italic: true
30
+ italic: true,
31
31
  },
32
32
  {
33
33
  name: 'sans-serif',
34
- provider: 'none'
35
- }
36
- ]
34
+ provider: 'none',
35
+ },
36
+ ],
37
37
  },
38
- })
39
- ]
38
+ }),
39
+ ],
40
40
  })
41
41
  ```
42
42
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-web-fonts",
3
- "version": "0.27.6",
3
+ "version": "0.28.0",
4
4
  "description": "Web Fonts support for Uno CSS",
5
5
  "keywords": [
6
6
  "unocss",
@@ -14,18 +14,16 @@
14
14
  "url": "https://github.com/unocss/unocss/issues"
15
15
  },
16
16
  "license": "MIT",
17
+ "author": "Anthony Fu <anthonyfu117@hotmail.com>",
17
18
  "repository": {
18
19
  "type": "git",
19
20
  "url": "git+https://github.com/unocss/unocss.git",
20
21
  "directory": "packages/preset-web-fonts"
21
22
  },
22
23
  "funding": "https://github.com/sponsors/antfu",
23
- "author": "Anthony Fu <anthonyfu117@hotmail.com>",
24
- "sideEffects": false,
25
- "files": [
26
- "dist",
27
- "*.css"
28
- ],
24
+ "main": "dist/index.cjs",
25
+ "module": "dist/index.mjs",
26
+ "types": "dist/index.d.ts",
29
27
  "exports": {
30
28
  ".": {
31
29
  "require": "./dist/index.cjs",
@@ -38,15 +36,18 @@
38
36
  "types": "./dist/fs.d.ts"
39
37
  }
40
38
  },
41
- "main": "dist/index.cjs",
42
- "module": "dist/index.mjs",
43
- "types": "dist/index.d.ts",
39
+ "files": [
40
+ "dist",
41
+ "*.css"
42
+ ],
43
+ "sideEffects": false,
44
44
  "dependencies": {
45
- "@unocss/core": "0.27.6",
46
- "axios": "^0.26.0"
45
+ "@unocss/core": "0.28.0",
46
+ "axios": "^0.26.1"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "unbuild",
50
50
  "stub": "unbuild --stub"
51
- }
51
+ },
52
+ "readme": "# @unocss/preset-web-fonts\n\nWeb fonts support for [UnoCSS](https://github.com/unocss/unocss).\n\n## Install\n\n```bash\nnpm i -D @unocss/preset-web-fonts\n```\n\n```ts\nimport presetWebFonts from '@unocss/preset-web-fonts'\nimport presetUno from '@unocss/preset-uno'\n\nUnocss({\n presets: [\n presetUno(),\n presetWebFonts({\n provider: 'google', // default provider\n fonts: {\n // these will extend the default theme\n sans: 'Roboto',\n mono: ['Fira Code', 'Fira Mono:400,700'],\n // custom ones\n lobster: 'Lobster',\n lato: [\n {\n name: 'Lato',\n weights: ['400', '700'],\n italic: true,\n },\n {\n name: 'sans-serif',\n provider: 'none',\n },\n ],\n },\n }),\n ],\n})\n```\n\nThe following CSS will be generated\n\n```css\n@import url('https://fonts.googleapis.com/css2?family=Roboto&family=Fira+Code&family=Fira+Mono:wght@400;700&family=Lobster&family=Lato:ital,wght@0,400;0,700;1,400;1,700&display=swap');\n\n/* layer: default */\n.font-lato {\n font-family: \"Lato\", sans-serif;\n}\n.font-lobster {\n font-family: \"Lobster\";\n}\n.font-mono {\n font-family: \"Fira Code\", \"Fira Mono\", ui-monospace, SFMono-Regular, Menlo,\n Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n}\n.font-sans {\n font-family: \"Roboto\", ui-sans-serif, system-ui, -apple-system,\n BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\",\n sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\",\n \"Noto Color Emoji\";\n}\n```\n\n## Providers\n\nCurrently supported Providers:\n\n- `none` - do nothing, treat the font as system font\n- `google` - [Google Fonts](https://fonts.google.com/)\n\nPR welcome to add more providers 🙌\n\n## Configuration\n\nRefer to the [type definition](https://github.com/unocss/unocss/blob/main/packages/preset-web-fonts/src/types.ts#L4) for all configurations avaliable.\n\n## License\n\nMIT License © 2022-PRESENT [Anthony Fu](https://github.com/antfu)\n"
52
53
  }