@unocss/preset-typography 66.3.3 → 66.4.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.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +7 -4
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -70,4 +70,5 @@ interface TypographyOptions {
|
|
|
70
70
|
*/
|
|
71
71
|
declare const presetTypography: _unocss_core.PresetFactory<Theme, TypographyOptions>;
|
|
72
72
|
|
|
73
|
-
export {
|
|
73
|
+
export { presetTypography as default, presetTypography };
|
|
74
|
+
export type { TypographyOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -70,4 +70,5 @@ interface TypographyOptions {
|
|
|
70
70
|
*/
|
|
71
71
|
declare const presetTypography: _unocss_core.PresetFactory<Theme, TypographyOptions>;
|
|
72
72
|
|
|
73
|
-
export {
|
|
73
|
+
export { presetTypography as default, presetTypography };
|
|
74
|
+
export type { TypographyOptions };
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { mergeDeep, definePreset, toEscapedSelector } from '@unocss/core';
|
|
2
2
|
import { alphaPlaceholders } from '@unocss/rule-utils';
|
|
3
3
|
|
|
4
|
-
function DEFAULT(
|
|
4
|
+
function DEFAULT(ctx) {
|
|
5
|
+
const { theme, generator } = ctx;
|
|
6
|
+
const hasWind4 = generator.config.presets.some((p) => p.name === "@unocss/preset-wind4");
|
|
7
|
+
const fontKey = hasWind4 ? "font" : "fontFamily";
|
|
5
8
|
return {
|
|
6
9
|
"h1,h2,h3,h4,h5,h6": {
|
|
7
10
|
"color": "var(--un-prose-headings)",
|
|
@@ -59,7 +62,7 @@ function DEFAULT(theme) {
|
|
|
59
62
|
"color": "var(--un-prose-code)",
|
|
60
63
|
"font-size": ".875em",
|
|
61
64
|
"font-weight": 600,
|
|
62
|
-
"font-family": theme
|
|
65
|
+
"font-family": theme[fontKey]?.mono
|
|
63
66
|
},
|
|
64
67
|
":not(pre) > code::before,:not(pre) > code::after": {
|
|
65
68
|
content: '"`"'
|
|
@@ -239,8 +242,8 @@ function getPreflights(context, options) {
|
|
|
239
242
|
escapedSelector = escapedSelector.map((e) => !compatibility?.noColonIs ? `:is(${important}) ${e}` : `${important} ${e}`);
|
|
240
243
|
}
|
|
241
244
|
if (cssExtend)
|
|
242
|
-
return getCSS({ escapedSelector, selectorName, preflights: mergeDeep(DEFAULT(context
|
|
243
|
-
return getCSS({ escapedSelector, selectorName, preflights: DEFAULT(context
|
|
245
|
+
return getCSS({ escapedSelector, selectorName, preflights: mergeDeep(DEFAULT(context), cssExtend), compatibility, important: important === true });
|
|
246
|
+
return getCSS({ escapedSelector, selectorName, preflights: DEFAULT(context), compatibility, important: important === true });
|
|
244
247
|
}
|
|
245
248
|
|
|
246
249
|
const presetTypography = definePreset((options) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-typography",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "66.
|
|
4
|
+
"version": "66.4.1",
|
|
5
5
|
"description": "Typography preset for UnoCSS",
|
|
6
6
|
"author": "Jeff Yang",
|
|
7
7
|
"license": "MIT",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@unocss/core": "66.
|
|
36
|
-
"@unocss/
|
|
37
|
-
"@unocss/
|
|
35
|
+
"@unocss/core": "66.4.1",
|
|
36
|
+
"@unocss/rule-utils": "66.4.1",
|
|
37
|
+
"@unocss/preset-mini": "66.4.1"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "unbuild",
|