@unocss/preset-typography 66.5.10 → 66.5.12
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 +1057 -112
- package/dist/index.mjs +1203 -1453
- package/package.json +6 -7
- package/dist/index.d.ts +0 -152
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-typography",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "66.5.
|
|
4
|
+
"version": "66.5.12",
|
|
5
5
|
"description": "Typography preset for UnoCSS",
|
|
6
6
|
"author": "Jeff Yang",
|
|
7
7
|
"license": "MIT",
|
|
@@ -27,17 +27,16 @@
|
|
|
27
27
|
},
|
|
28
28
|
"main": "dist/index.mjs",
|
|
29
29
|
"module": "dist/index.mjs",
|
|
30
|
-
"types": "dist/index.d.
|
|
30
|
+
"types": "dist/index.d.mts",
|
|
31
31
|
"files": [
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@unocss/core": "66.5.
|
|
36
|
-
"@unocss/rule-utils": "66.5.
|
|
35
|
+
"@unocss/core": "66.5.12",
|
|
36
|
+
"@unocss/rule-utils": "66.5.12"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
|
-
"build": "
|
|
40
|
-
"
|
|
41
|
-
"test:attw": "attw --pack --config-path ../../.attw-esm-only.json"
|
|
39
|
+
"build": "tsdown",
|
|
40
|
+
"dev": "tsdown --watch"
|
|
42
41
|
}
|
|
43
42
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { CSSObject, Arrayable, Preset } from '@unocss/core';
|
|
2
|
-
|
|
3
|
-
interface TypographyCompatibilityOptions {
|
|
4
|
-
noColonWhere?: boolean;
|
|
5
|
-
noColonIs?: boolean;
|
|
6
|
-
noColonNot?: boolean;
|
|
7
|
-
}
|
|
8
|
-
interface TypographyTheme {
|
|
9
|
-
colors?: Record<string, any>;
|
|
10
|
-
}
|
|
11
|
-
interface TypographyColorScheme {
|
|
12
|
-
'body'?: Arrayable<string | number>;
|
|
13
|
-
'headings'?: Arrayable<string | number>;
|
|
14
|
-
'lead'?: Arrayable<string | number>;
|
|
15
|
-
'links'?: Arrayable<string | number>;
|
|
16
|
-
'bold'?: Arrayable<string | number>;
|
|
17
|
-
'counters'?: Arrayable<string | number>;
|
|
18
|
-
'bullets'?: Arrayable<string | number>;
|
|
19
|
-
'hr'?: Arrayable<string | number>;
|
|
20
|
-
'quotes'?: Arrayable<string | number>;
|
|
21
|
-
'quote-borders'?: Arrayable<string | number>;
|
|
22
|
-
'captions'?: Arrayable<string | number>;
|
|
23
|
-
'kbd'?: Arrayable<string | number>;
|
|
24
|
-
'kbd-shadows'?: Arrayable<string | number>;
|
|
25
|
-
'code'?: Arrayable<string | number>;
|
|
26
|
-
'pre-code'?: Arrayable<string | number>;
|
|
27
|
-
'pre-bg'?: Arrayable<string | number>;
|
|
28
|
-
'th-borders'?: Arrayable<string | number>;
|
|
29
|
-
'td-borders'?: Arrayable<string | number>;
|
|
30
|
-
}
|
|
31
|
-
interface TypographyCSSObject extends Record<string, CSSObject | string | number> {
|
|
32
|
-
}
|
|
33
|
-
interface TypographySizeScheme extends Record<string, TypographyCSSObject> {
|
|
34
|
-
}
|
|
35
|
-
interface TypographyOptions<T extends TypographyTheme = TypographyTheme> {
|
|
36
|
-
/**
|
|
37
|
-
* The selector name to use the typographic utilities.
|
|
38
|
-
* To undo the styles to the elements, use it like
|
|
39
|
-
* `not-${selectorName}` which is by default `not-prose`.
|
|
40
|
-
*
|
|
41
|
-
* Note: `not` utility is only available in class mode.
|
|
42
|
-
*
|
|
43
|
-
* @default `prose`
|
|
44
|
-
*/
|
|
45
|
-
selectorName?: string;
|
|
46
|
-
/**
|
|
47
|
-
* Extend or override CSS selectors with CSS declaration block.
|
|
48
|
-
*
|
|
49
|
-
* @default undefined
|
|
50
|
-
*/
|
|
51
|
-
cssExtend?: Record<string, CSSObject> | ((theme: T) => Record<string, CSSObject>);
|
|
52
|
-
/**
|
|
53
|
-
* Compatibility option. Notice that it will affect some features.
|
|
54
|
-
* For more instructions, see
|
|
55
|
-
* [README](https://github.com/unocss/unocss/tree/main/packages-presets/preset-typography)
|
|
56
|
-
*
|
|
57
|
-
* @default undefined
|
|
58
|
-
*/
|
|
59
|
-
compatibility?: TypographyCompatibilityOptions;
|
|
60
|
-
/**
|
|
61
|
-
* Control whether prose's utilities should be marked with !important.
|
|
62
|
-
*
|
|
63
|
-
* @default false
|
|
64
|
-
*/
|
|
65
|
-
important?: boolean | string;
|
|
66
|
-
/**
|
|
67
|
-
* Color scheme for typography elements.
|
|
68
|
-
*
|
|
69
|
-
* Each key represents a typographic element (e.g., 'body', 'headings', 'links').
|
|
70
|
-
*
|
|
71
|
-
* Type: [light, dark] => [color, invert-color]
|
|
72
|
-
*
|
|
73
|
-
* @default
|
|
74
|
-
*
|
|
75
|
-
* {
|
|
76
|
-
* 'body': [700, 300],
|
|
77
|
-
* 'headings': [900, 'white'],
|
|
78
|
-
* 'lead': [600, 400],
|
|
79
|
-
* 'links': [900, 'white'],
|
|
80
|
-
* 'bold': [900, 'white'],
|
|
81
|
-
* 'counters': [500, 400],
|
|
82
|
-
* 'bullets': [300, 600],
|
|
83
|
-
* 'hr': [200, 700],
|
|
84
|
-
* 'quotes': [900, 100],
|
|
85
|
-
* 'quote-borders': [200, 700],
|
|
86
|
-
* 'captions': [500, 400],
|
|
87
|
-
* 'kbd': [900, 'white'],
|
|
88
|
-
* 'kbd-shadows': [900, 'white'],
|
|
89
|
-
* 'code': [900, 'white'],
|
|
90
|
-
* 'pre-code': [200, 300],
|
|
91
|
-
* 'pre-bg': [800, 'rgb(0 0 0 / 50%)'],
|
|
92
|
-
* 'th-borders': [300, 600],
|
|
93
|
-
* 'td-borders': [200, 700],
|
|
94
|
-
* }
|
|
95
|
-
*/
|
|
96
|
-
colorScheme?: TypographyColorScheme;
|
|
97
|
-
/**
|
|
98
|
-
* Size scheme for typography elements.
|
|
99
|
-
*
|
|
100
|
-
* Allows you to customize the CSS styles of various typographic elements.
|
|
101
|
-
* Similar to {@link cssExtend}, but it applies granular overlays to different sizes of text.
|
|
102
|
-
*
|
|
103
|
-
* Example:
|
|
104
|
-
*
|
|
105
|
-
* {
|
|
106
|
-
*
|
|
107
|
-
* 'sm': {@link TypographyCSSObject}
|
|
108
|
-
*
|
|
109
|
-
* 'base': {@link TypographyCSSObject}
|
|
110
|
-
*
|
|
111
|
-
* 'lg': {@link TypographyCSSObject}
|
|
112
|
-
*
|
|
113
|
-
* 'xl': {@link TypographyCSSObject}
|
|
114
|
-
*
|
|
115
|
-
* '2xl': {@link TypographyCSSObject}
|
|
116
|
-
*
|
|
117
|
-
* }
|
|
118
|
-
*
|
|
119
|
-
*/
|
|
120
|
-
sizeScheme?: TypographySizeScheme;
|
|
121
|
-
/**
|
|
122
|
-
* Prefix for generated css vars.
|
|
123
|
-
*
|
|
124
|
-
* @default '--un-prose'
|
|
125
|
-
*/
|
|
126
|
-
cssVarPrefix?: string;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* UnoCSS Preset for Typography
|
|
131
|
-
*
|
|
132
|
-
* ```js
|
|
133
|
-
* // uno.config.ts
|
|
134
|
-
* import { presetAttributify, presetWind3/4, defineConfig, presetTypography } from 'unocss'
|
|
135
|
-
*
|
|
136
|
-
* export default defineConfig({
|
|
137
|
-
* presets: [
|
|
138
|
-
* presetWind3/4(), // required!
|
|
139
|
-
* presetAttributify(), // required if using attributify mode
|
|
140
|
-
* presetTypography()
|
|
141
|
-
* ]
|
|
142
|
-
* })
|
|
143
|
-
* ```
|
|
144
|
-
*
|
|
145
|
-
* @see https://unocss.dev/presets/typography
|
|
146
|
-
* @returns typography preset
|
|
147
|
-
* @public
|
|
148
|
-
*/
|
|
149
|
-
declare const presetTypography: <Theme extends TypographyTheme = TypographyTheme>(options?: TypographyOptions<Theme> | undefined) => Preset<Theme>;
|
|
150
|
-
|
|
151
|
-
export { presetTypography as default, presetTypography };
|
|
152
|
-
export type { TypographyCSSObject, TypographyColorScheme, TypographyCompatibilityOptions, TypographyOptions, TypographySizeScheme, TypographyTheme };
|