effcss 3.12.1 → 4.0.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/README.md +26 -22
- package/dist/index.js +2 -2
- package/dist/types/_provider/_process/atrules.d.ts +222 -0
- package/dist/types/_provider/_process/coef.d.ts +131 -0
- package/dist/types/_provider/_process/color.d.ts +37 -0
- package/dist/types/_provider/_process/palette.d.ts +105 -0
- package/dist/types/{src/_provider → _provider}/collect.d.ts +14 -10
- package/dist/types/{src/_provider → _provider}/manage.d.ts +17 -33
- package/dist/types/_provider/process.d.ts +84 -0
- package/dist/types/{src/_provider → _provider}/scope.d.ts +21 -6
- package/dist/types/_provider/theme.d.ts +49 -0
- package/dist/types/_provider/utils.d.ts +10 -0
- package/dist/types/{src/index.d.ts → index.d.ts} +60 -64
- package/package.json +3 -8
- package/dist/build/define-provider.min.js +0 -7
- package/dist/consumer.js +0 -7
- package/dist/types/build/defineProvider.d.ts +0 -1
- package/dist/types/src/_provider/_process/atrules.d.ts +0 -330
- package/dist/types/src/_provider/_process/base.d.ts +0 -11
- package/dist/types/src/_provider/_process/coef.d.ts +0 -3
- package/dist/types/src/_provider/_process/color.d.ts +0 -98
- package/dist/types/src/_provider/_process/palette.d.ts +0 -3
- package/dist/types/src/_provider/name.d.ts +0 -24
- package/dist/types/src/_provider/process.d.ts +0 -125
- package/dist/types/src/common.d.ts +0 -525
- package/dist/types/src/consumer.d.ts +0 -8
- /package/dist/types/{src/_provider → _provider}/_process/pseudo.d.ts +0 -0
- /package/dist/types/{src/_provider → _provider}/_process/units.d.ts +0 -0
- /package/dist/types/{src/_provider → _provider}/_process/utils.d.ts +0 -0
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import type { TDeafultBreakpoints } from '../common';
|
|
2
|
-
import type { TCreateScope } from './scope';
|
|
3
|
-
import { merge } from '../common';
|
|
4
|
-
import { resolveAtRules } from './_process/atrules';
|
|
5
|
-
import { resolveUnits } from './_process/units';
|
|
6
|
-
import { resolvePseudo } from './_process/pseudo';
|
|
7
|
-
import { resolveColor } from './_process/color';
|
|
8
|
-
import { resolvePalette } from './_process/palette';
|
|
9
|
-
import { resolveCoef } from './_process/coef';
|
|
10
|
-
import { getBaseHandlers } from './_process/base';
|
|
11
|
-
type Leaves<T> = T extends object ? {
|
|
12
|
-
[K in keyof T]: `${Exclude<K, symbol>}${Leaves<T[K]> extends never ? '' : `.${Leaves<T[K]>}`}`;
|
|
13
|
-
}[keyof T] : never;
|
|
14
|
-
interface IMakerParams extends ReturnType<typeof getBaseHandlers> {
|
|
15
|
-
/**
|
|
16
|
-
* StyleSheet key
|
|
17
|
-
*/
|
|
18
|
-
key: string;
|
|
19
|
-
/**
|
|
20
|
-
* BEM selector resolver
|
|
21
|
-
*/
|
|
22
|
-
bem: ReturnType<ReturnType<TCreateScope>>['selector'];
|
|
23
|
-
/**
|
|
24
|
-
* CSS units
|
|
25
|
-
*/
|
|
26
|
-
units: ReturnType<typeof resolveUnits>;
|
|
27
|
-
/**
|
|
28
|
-
* Pseudoclasses and pseudoelements
|
|
29
|
-
*/
|
|
30
|
-
pseudo: ReturnType<typeof resolvePseudo>;
|
|
31
|
-
/**
|
|
32
|
-
* At-rules
|
|
33
|
-
*/
|
|
34
|
-
at: ReturnType<typeof resolveAtRules>;
|
|
35
|
-
/**
|
|
36
|
-
* Colors
|
|
37
|
-
*/
|
|
38
|
-
color: ReturnType<typeof resolveColor>;
|
|
39
|
-
/**
|
|
40
|
-
* Color palette
|
|
41
|
-
*/
|
|
42
|
-
palette: ReturnType<typeof resolvePalette>;
|
|
43
|
-
/**
|
|
44
|
-
* Coefficient
|
|
45
|
-
*/
|
|
46
|
-
coef: ReturnType<typeof resolveCoef>;
|
|
47
|
-
/**
|
|
48
|
-
* Global vars
|
|
49
|
-
*/
|
|
50
|
-
vars: <G>(val: Leaves<G>) => string;
|
|
51
|
-
/**
|
|
52
|
-
* Scalable size value
|
|
53
|
-
*/
|
|
54
|
-
size: (coef?: number | string) => string;
|
|
55
|
-
/**
|
|
56
|
-
* Scalable time value
|
|
57
|
-
*/
|
|
58
|
-
time: (coef?: number | string) => string;
|
|
59
|
-
/**
|
|
60
|
-
* Scalable angle value
|
|
61
|
-
*/
|
|
62
|
-
angle: (coef?: number | string) => string;
|
|
63
|
-
/**
|
|
64
|
-
* Width limit queries
|
|
65
|
-
*/
|
|
66
|
-
limit: {
|
|
67
|
-
/**
|
|
68
|
-
* `(min-width: val)` query
|
|
69
|
-
* @param val - breakpoint
|
|
70
|
-
* @param scope - container name for `@container`
|
|
71
|
-
*/
|
|
72
|
-
up: <T = TDeafultBreakpoints>(val: Exclude<keyof T, Symbol> | number, scope?: string) => string;
|
|
73
|
-
/**
|
|
74
|
-
* `(max-width: val)` query
|
|
75
|
-
* @param val - breakpoint
|
|
76
|
-
* @param scope - container name for `@container`
|
|
77
|
-
*/
|
|
78
|
-
down: <T = TDeafultBreakpoints>(val: Exclude<keyof T, Symbol> | number, scope?: string) => string;
|
|
79
|
-
/**
|
|
80
|
-
* `(min-width: from) and (max-width: to)` query
|
|
81
|
-
* @param from - start breakpoint
|
|
82
|
-
* @param to - end breakpoint
|
|
83
|
-
* @param scope - container name for `@container`
|
|
84
|
-
*/
|
|
85
|
-
between: <T = TDeafultBreakpoints>(from: Exclude<keyof T, Symbol> | number, to: Exclude<keyof T, Symbol> | number, scope?: string) => string;
|
|
86
|
-
/**
|
|
87
|
-
* `(min-width: val) and (max-width: val)` query
|
|
88
|
-
* @param val - breakpoint
|
|
89
|
-
* @param scope - container name for `@container`
|
|
90
|
-
*/
|
|
91
|
-
only: <T = TDeafultBreakpoints>(val: Exclude<keyof T, Symbol> | number, scope?: string) => string;
|
|
92
|
-
};
|
|
93
|
-
/**
|
|
94
|
-
* Merge
|
|
95
|
-
*/
|
|
96
|
-
merge: typeof merge;
|
|
97
|
-
}
|
|
98
|
-
type TCreateProcessor = (params: {
|
|
99
|
-
scope: ReturnType<TCreateScope>;
|
|
100
|
-
globalKey?: string;
|
|
101
|
-
bp?: Record<string, string | number>;
|
|
102
|
-
}) => {
|
|
103
|
-
/**
|
|
104
|
-
* Compile stylesheet maker to CSSStylesheet content
|
|
105
|
-
* @param params - params
|
|
106
|
-
*/
|
|
107
|
-
compile(params: {
|
|
108
|
-
key: string;
|
|
109
|
-
maker: (params: IMakerParams) => object;
|
|
110
|
-
}): string;
|
|
111
|
-
};
|
|
112
|
-
export declare const baseHandlers: {
|
|
113
|
-
dash: (...val: (string | number)[]) => string;
|
|
114
|
-
comma: (...val: (string | number)[]) => string;
|
|
115
|
-
space: (...val: (string | number)[]) => string;
|
|
116
|
-
range: (size: number, handler: (k: number) => object) => object;
|
|
117
|
-
each: <V extends Record<string | number, any>>(rules: V, handler: (k: V extends ArrayLike<any> ? string : keyof V, v: V extends ArrayLike<any> ? NoInfer<V[number]> : NoInfer<V[keyof V]>) => object) => object;
|
|
118
|
-
when: (condition: boolean | undefined, rules: object, otherwise?: object) => object;
|
|
119
|
-
};
|
|
120
|
-
/**
|
|
121
|
-
* Create style processor
|
|
122
|
-
* @param params - processor params
|
|
123
|
-
*/
|
|
124
|
-
export declare const createProcessor: TCreateProcessor;
|
|
125
|
-
export {};
|
|
@@ -1,525 +0,0 @@
|
|
|
1
|
-
type THue = 'pri' | 'sec' | 'suc' | 'inf' | 'war' | 'dan';
|
|
2
|
-
type TLightness = 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
3
|
-
type TChroma = 'pale' | 'base' | 'rich';
|
|
4
|
-
type TMode = 'bg' | 'fg';
|
|
5
|
-
/**
|
|
6
|
-
* Palette generator
|
|
7
|
-
* @description
|
|
8
|
-
* Allows to create palette colors
|
|
9
|
-
*/
|
|
10
|
-
export interface IPalette {
|
|
11
|
-
state: {
|
|
12
|
-
l: TLightness;
|
|
13
|
-
c: TChroma | 'gray';
|
|
14
|
-
h: THue;
|
|
15
|
-
a: number;
|
|
16
|
-
m: TMode;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Returns `xs` lightness color
|
|
20
|
-
*/
|
|
21
|
-
get xs(): IPalette;
|
|
22
|
-
/**
|
|
23
|
-
* Returns `s` lightness color
|
|
24
|
-
*/
|
|
25
|
-
get s(): IPalette;
|
|
26
|
-
/**
|
|
27
|
-
* Returns `m` lightness color
|
|
28
|
-
*/
|
|
29
|
-
get m(): IPalette;
|
|
30
|
-
/**
|
|
31
|
-
* Returns `l` lightness color
|
|
32
|
-
*/
|
|
33
|
-
get l(): IPalette;
|
|
34
|
-
/**
|
|
35
|
-
* Returns `xl` lightness color
|
|
36
|
-
*/
|
|
37
|
-
get xl(): IPalette;
|
|
38
|
-
/**
|
|
39
|
-
* Returns lightness color dictionary
|
|
40
|
-
*/
|
|
41
|
-
get lightness(): Record<TLightness, IPalette>;
|
|
42
|
-
/**
|
|
43
|
-
* Returns zero chroma color
|
|
44
|
-
*/
|
|
45
|
-
get gray(): IPalette;
|
|
46
|
-
/**
|
|
47
|
-
* Returns pale chroma color
|
|
48
|
-
*/
|
|
49
|
-
get pale(): IPalette;
|
|
50
|
-
/**
|
|
51
|
-
* Returns base chroma color
|
|
52
|
-
*/
|
|
53
|
-
get base(): IPalette;
|
|
54
|
-
/**
|
|
55
|
-
* Returns rich chroma color
|
|
56
|
-
*/
|
|
57
|
-
get rich(): IPalette;
|
|
58
|
-
/**
|
|
59
|
-
* Returns chroma color dictionary
|
|
60
|
-
*/
|
|
61
|
-
get chroma(): Record<TChroma, IPalette>;
|
|
62
|
-
/**
|
|
63
|
-
* Returns primary hue color
|
|
64
|
-
*/
|
|
65
|
-
get pri(): IPalette;
|
|
66
|
-
/**
|
|
67
|
-
* Returns secondary hue color
|
|
68
|
-
*/
|
|
69
|
-
get sec(): IPalette;
|
|
70
|
-
/**
|
|
71
|
-
* Returns success hue color
|
|
72
|
-
*/
|
|
73
|
-
get suc(): IPalette;
|
|
74
|
-
/**
|
|
75
|
-
* Returns info hue color
|
|
76
|
-
*/
|
|
77
|
-
get inf(): IPalette;
|
|
78
|
-
/**
|
|
79
|
-
* Returns warning hue color
|
|
80
|
-
*/
|
|
81
|
-
get war(): IPalette;
|
|
82
|
-
/**
|
|
83
|
-
* Returns danger hue color
|
|
84
|
-
*/
|
|
85
|
-
get dan(): IPalette;
|
|
86
|
-
/**
|
|
87
|
-
* Returns hue color dictionary
|
|
88
|
-
*/
|
|
89
|
-
get hue(): Record<THue, IPalette>;
|
|
90
|
-
/**
|
|
91
|
-
* Returns specified alpha color
|
|
92
|
-
*/
|
|
93
|
-
alpha(a?: number): IPalette;
|
|
94
|
-
/**
|
|
95
|
-
* Returns background color
|
|
96
|
-
*/
|
|
97
|
-
get bg(): IPalette;
|
|
98
|
-
/**
|
|
99
|
-
* Returns foreground color
|
|
100
|
-
*/
|
|
101
|
-
get fg(): IPalette;
|
|
102
|
-
}
|
|
103
|
-
type RecursivePartial<T> = {
|
|
104
|
-
[P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object | undefined ? RecursivePartial<T[P]> : T[P];
|
|
105
|
-
};
|
|
106
|
-
type TPaletteDict<T extends string> = {
|
|
107
|
-
dark: {
|
|
108
|
-
bg: Record<T, number>;
|
|
109
|
-
fg: Record<T, number>;
|
|
110
|
-
};
|
|
111
|
-
light: {
|
|
112
|
-
bg: Record<T, number>;
|
|
113
|
-
fg: Record<T, number>;
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
export type TPaletteHue = Record<THue, number>;
|
|
117
|
-
export type TPaletteLightness = TPaletteDict<TLightness>;
|
|
118
|
-
export type TPaletteChroma = TPaletteDict<TChroma>;
|
|
119
|
-
export type TPaletteConfig = {
|
|
120
|
-
l: TPaletteLightness;
|
|
121
|
-
c: TPaletteChroma;
|
|
122
|
-
h: TPaletteHue;
|
|
123
|
-
};
|
|
124
|
-
export type TShortRange = 's' | 'm' | 'l';
|
|
125
|
-
export type TMainRange = 'min' | 'm' | 'max';
|
|
126
|
-
export type TBaseRange = 'xs' | TShortRange | 'xl';
|
|
127
|
-
export type TLongRange = 'xxs' | TBaseRange | 'xxl';
|
|
128
|
-
export type TFullRange = 'min' | TLongRange | 'max';
|
|
129
|
-
export type TSparseRange = 'min' | 'xs' | 'm' | 'xl' | 'max';
|
|
130
|
-
export type TRangeConfig = Record<'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxl', number>;
|
|
131
|
-
export type TCoefConfig = {
|
|
132
|
-
$0_: TRangeConfig;
|
|
133
|
-
$1_: TRangeConfig;
|
|
134
|
-
$2_: TRangeConfig;
|
|
135
|
-
$16_: TRangeConfig;
|
|
136
|
-
max: number;
|
|
137
|
-
};
|
|
138
|
-
/**
|
|
139
|
-
* Coefficient generator
|
|
140
|
-
* @description
|
|
141
|
-
* Allows to create coefficient ranges
|
|
142
|
-
*/
|
|
143
|
-
export interface ICoef {
|
|
144
|
-
/**
|
|
145
|
-
* Coefficient state
|
|
146
|
-
*/
|
|
147
|
-
state: {
|
|
148
|
-
center: number;
|
|
149
|
-
};
|
|
150
|
-
/**
|
|
151
|
-
* Returns `xxs` coefficient
|
|
152
|
-
*/
|
|
153
|
-
get min(): string;
|
|
154
|
-
/**
|
|
155
|
-
* Returns `xxs` coefficient
|
|
156
|
-
*/
|
|
157
|
-
get xxs(): string;
|
|
158
|
-
/**
|
|
159
|
-
* Returns `xs` coefficient
|
|
160
|
-
*/
|
|
161
|
-
get xs(): string;
|
|
162
|
-
/**
|
|
163
|
-
* Returns `s` coefficient
|
|
164
|
-
*/
|
|
165
|
-
get s(): string;
|
|
166
|
-
/**
|
|
167
|
-
* Returns `m` coefficient
|
|
168
|
-
*/
|
|
169
|
-
get m(): string;
|
|
170
|
-
/**
|
|
171
|
-
* Returns `l` coefficient
|
|
172
|
-
*/
|
|
173
|
-
get l(): string;
|
|
174
|
-
/**
|
|
175
|
-
* Returns `xl` coefficient
|
|
176
|
-
*/
|
|
177
|
-
get xl(): string;
|
|
178
|
-
/**
|
|
179
|
-
* Returns `xxl` coefficient
|
|
180
|
-
*/
|
|
181
|
-
get xxl(): string;
|
|
182
|
-
/**
|
|
183
|
-
* Returns `xxl` coefficient
|
|
184
|
-
*/
|
|
185
|
-
get max(): string;
|
|
186
|
-
/**
|
|
187
|
-
* Range from 0 to 1
|
|
188
|
-
*/
|
|
189
|
-
get $0_(): ICoef;
|
|
190
|
-
/**
|
|
191
|
-
* Range around 1
|
|
192
|
-
*/
|
|
193
|
-
get $1(): ICoef;
|
|
194
|
-
/**
|
|
195
|
-
* Range from 1 to 2
|
|
196
|
-
*/
|
|
197
|
-
get $1_(): ICoef;
|
|
198
|
-
/**
|
|
199
|
-
* Range around 2
|
|
200
|
-
*/
|
|
201
|
-
get $2(): ICoef;
|
|
202
|
-
/**
|
|
203
|
-
* Range from 2 to 16
|
|
204
|
-
*/
|
|
205
|
-
get $2_(): ICoef;
|
|
206
|
-
/**
|
|
207
|
-
* Range around 16
|
|
208
|
-
*/
|
|
209
|
-
get $16(): ICoef;
|
|
210
|
-
/**
|
|
211
|
-
* Range from 16 to the end
|
|
212
|
-
*/
|
|
213
|
-
get $16_(): ICoef;
|
|
214
|
-
/**
|
|
215
|
-
* Short range dictionary
|
|
216
|
-
*/
|
|
217
|
-
get short(): Record<TShortRange, string>;
|
|
218
|
-
/**
|
|
219
|
-
* Base range dictionary
|
|
220
|
-
*/
|
|
221
|
-
get base(): Record<TBaseRange, string>;
|
|
222
|
-
/**
|
|
223
|
-
* Long range dictionary
|
|
224
|
-
*/
|
|
225
|
-
get long(): Record<TLongRange, string>;
|
|
226
|
-
/**
|
|
227
|
-
* Full range dictionary
|
|
228
|
-
*/
|
|
229
|
-
get full(): Record<TFullRange, string>;
|
|
230
|
-
/**
|
|
231
|
-
* Main range dictionary
|
|
232
|
-
*/
|
|
233
|
-
get main(): Record<TMainRange, string>;
|
|
234
|
-
/**
|
|
235
|
-
* Sparse range dictionary
|
|
236
|
-
*/
|
|
237
|
-
get sparse(): Record<TSparseRange, string>;
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* Provider attributes
|
|
241
|
-
*/
|
|
242
|
-
export type TProviderAttrs = {
|
|
243
|
-
/**
|
|
244
|
-
* Hydratation flag
|
|
245
|
-
*/
|
|
246
|
-
hydrate: '';
|
|
247
|
-
/**
|
|
248
|
-
* Private stylesheet prefix
|
|
249
|
-
*/
|
|
250
|
-
prefix: string;
|
|
251
|
-
/**
|
|
252
|
-
* BEM selector generation mode
|
|
253
|
-
* @description
|
|
254
|
-
* `a` - data-attributes
|
|
255
|
-
* `c` - classes
|
|
256
|
-
*/
|
|
257
|
-
mode: 'a' | 'c';
|
|
258
|
-
/**
|
|
259
|
-
* BEM selectors minification
|
|
260
|
-
*/
|
|
261
|
-
min: '';
|
|
262
|
-
/**
|
|
263
|
-
* Theme
|
|
264
|
-
*/
|
|
265
|
-
theme: string;
|
|
266
|
-
/**
|
|
267
|
-
* Root font size in px
|
|
268
|
-
*/
|
|
269
|
-
size: string;
|
|
270
|
-
/**
|
|
271
|
-
* Root time in ms
|
|
272
|
-
*/
|
|
273
|
-
time: string;
|
|
274
|
-
/**
|
|
275
|
-
* Root angle in deg
|
|
276
|
-
*/
|
|
277
|
-
angle: string;
|
|
278
|
-
};
|
|
279
|
-
/**
|
|
280
|
-
* Provider attributes
|
|
281
|
-
*/
|
|
282
|
-
export type TProviderAttrParams = {
|
|
283
|
-
/**
|
|
284
|
-
* Hydratation flag
|
|
285
|
-
* @deprecated The hydration now turns on automatically
|
|
286
|
-
*/
|
|
287
|
-
hydrate: boolean;
|
|
288
|
-
/**
|
|
289
|
-
* Private stylesheet prefix
|
|
290
|
-
*/
|
|
291
|
-
prefix: string;
|
|
292
|
-
/**
|
|
293
|
-
* BEM selector generation mode
|
|
294
|
-
* @description
|
|
295
|
-
* `a` - data-attributes
|
|
296
|
-
* `c` - classes
|
|
297
|
-
*/
|
|
298
|
-
mode: 'a' | 'c';
|
|
299
|
-
/**
|
|
300
|
-
* BEM selectors minification
|
|
301
|
-
*/
|
|
302
|
-
min: boolean;
|
|
303
|
-
/**
|
|
304
|
-
* Theme
|
|
305
|
-
*/
|
|
306
|
-
theme: string;
|
|
307
|
-
/**
|
|
308
|
-
* Root font size in px
|
|
309
|
-
*/
|
|
310
|
-
size: number;
|
|
311
|
-
/**
|
|
312
|
-
* Root time in ms
|
|
313
|
-
*/
|
|
314
|
-
time: number;
|
|
315
|
-
/**
|
|
316
|
-
* Root angle in deg
|
|
317
|
-
*/
|
|
318
|
-
angle: number;
|
|
319
|
-
};
|
|
320
|
-
/**
|
|
321
|
-
* Provider settings
|
|
322
|
-
*/
|
|
323
|
-
export type TProviderSettings = {
|
|
324
|
-
/**
|
|
325
|
-
* Breakpoints
|
|
326
|
-
*/
|
|
327
|
-
bp: Record<string, number | string>;
|
|
328
|
-
/**
|
|
329
|
-
* Global vars for each theme
|
|
330
|
-
*/
|
|
331
|
-
vars: Record<string, object>;
|
|
332
|
-
/**
|
|
333
|
-
* Stylesheet makers
|
|
334
|
-
* @deprecated The parameter will be deleted in v4. Use stylesheet makers via `Style Provider` methods
|
|
335
|
-
*/
|
|
336
|
-
makers: Record<string, Function>;
|
|
337
|
-
/**
|
|
338
|
-
* Switched off stylesheets
|
|
339
|
-
* @deprecated The parameter will be deleted in v4. Switch stylesheet makers via `Style Provider` methods
|
|
340
|
-
*/
|
|
341
|
-
off: string[];
|
|
342
|
-
/**
|
|
343
|
-
* Palette
|
|
344
|
-
*/
|
|
345
|
-
palette: RecursivePartial<TPaletteConfig>;
|
|
346
|
-
/**
|
|
347
|
-
* Coefficients
|
|
348
|
-
*/
|
|
349
|
-
coef: RecursivePartial<TCoefConfig>;
|
|
350
|
-
};
|
|
351
|
-
export declare const merge: (target: Record<string, any>, ...sources: Record<string, any>[]) => Record<string, any>;
|
|
352
|
-
export declare const DEFAULT_ATTRS: Record<string, string>;
|
|
353
|
-
export declare const DEFAULT_BREAKPOINTS: {
|
|
354
|
-
'3xs': number;
|
|
355
|
-
'2xs': number;
|
|
356
|
-
xs: number;
|
|
357
|
-
sm: number;
|
|
358
|
-
md: number;
|
|
359
|
-
lg: number;
|
|
360
|
-
xl: number;
|
|
361
|
-
'2xl': number;
|
|
362
|
-
};
|
|
363
|
-
export type TDeafultBreakpoints = typeof DEFAULT_BREAKPOINTS;
|
|
364
|
-
/**
|
|
365
|
-
* Default provider settings
|
|
366
|
-
*/
|
|
367
|
-
export declare const DEFAULT_SETTINGS: {
|
|
368
|
-
bp: {
|
|
369
|
-
'3xs': number;
|
|
370
|
-
'2xs': number;
|
|
371
|
-
xs: number;
|
|
372
|
-
sm: number;
|
|
373
|
-
md: number;
|
|
374
|
-
lg: number;
|
|
375
|
-
xl: number;
|
|
376
|
-
'2xl': number;
|
|
377
|
-
};
|
|
378
|
-
vars: {
|
|
379
|
-
'': {
|
|
380
|
-
/**
|
|
381
|
-
* Root time
|
|
382
|
-
*/
|
|
383
|
-
rtime: string;
|
|
384
|
-
/**
|
|
385
|
-
* Root em
|
|
386
|
-
*/
|
|
387
|
-
rem: string;
|
|
388
|
-
/**
|
|
389
|
-
* Root angle
|
|
390
|
-
*/
|
|
391
|
-
rangle: string;
|
|
392
|
-
/**
|
|
393
|
-
* Lightness
|
|
394
|
-
*/
|
|
395
|
-
l: {
|
|
396
|
-
def: number;
|
|
397
|
-
c: number;
|
|
398
|
-
s: number;
|
|
399
|
-
m: number;
|
|
400
|
-
l: number;
|
|
401
|
-
n: number;
|
|
402
|
-
};
|
|
403
|
-
/**
|
|
404
|
-
* Hue
|
|
405
|
-
*/
|
|
406
|
-
h: {
|
|
407
|
-
def: number;
|
|
408
|
-
b: number;
|
|
409
|
-
i: number;
|
|
410
|
-
e: number;
|
|
411
|
-
w: number;
|
|
412
|
-
s: number;
|
|
413
|
-
};
|
|
414
|
-
/**
|
|
415
|
-
* Chroma
|
|
416
|
-
*/
|
|
417
|
-
c: {
|
|
418
|
-
def: number;
|
|
419
|
-
xs: number;
|
|
420
|
-
s: number;
|
|
421
|
-
m: number;
|
|
422
|
-
l: number;
|
|
423
|
-
xl: number;
|
|
424
|
-
};
|
|
425
|
-
/**
|
|
426
|
-
* Alpha
|
|
427
|
-
*/
|
|
428
|
-
a: {
|
|
429
|
-
def: number;
|
|
430
|
-
min: number;
|
|
431
|
-
xs: number;
|
|
432
|
-
s: number;
|
|
433
|
-
m: number;
|
|
434
|
-
l: number;
|
|
435
|
-
xl: number;
|
|
436
|
-
max: number;
|
|
437
|
-
};
|
|
438
|
-
/**
|
|
439
|
-
* Time
|
|
440
|
-
*/
|
|
441
|
-
t: {
|
|
442
|
-
def: number;
|
|
443
|
-
xs: number;
|
|
444
|
-
s: number;
|
|
445
|
-
m: number;
|
|
446
|
-
l: number;
|
|
447
|
-
xl: number;
|
|
448
|
-
no: number;
|
|
449
|
-
min: number;
|
|
450
|
-
max: number;
|
|
451
|
-
};
|
|
452
|
-
/**
|
|
453
|
-
* Integer coefficients
|
|
454
|
-
*/
|
|
455
|
-
int: number[];
|
|
456
|
-
/**
|
|
457
|
-
* Fractions
|
|
458
|
-
*/
|
|
459
|
-
fr: {
|
|
460
|
-
0: number;
|
|
461
|
-
'1/12': string;
|
|
462
|
-
'1/10': string;
|
|
463
|
-
'1/6': string;
|
|
464
|
-
'1/5': string;
|
|
465
|
-
'1/4': string;
|
|
466
|
-
'3/10': string;
|
|
467
|
-
'1/3': string;
|
|
468
|
-
'2/5': string;
|
|
469
|
-
'5/12': string;
|
|
470
|
-
'1/2': string;
|
|
471
|
-
'7/12': string;
|
|
472
|
-
'3/5': string;
|
|
473
|
-
'2/3': string;
|
|
474
|
-
'7/10': string;
|
|
475
|
-
'3/4': string;
|
|
476
|
-
'4/5': string;
|
|
477
|
-
'5/6': string;
|
|
478
|
-
'9/10': string;
|
|
479
|
-
'11/12': string;
|
|
480
|
-
1: string;
|
|
481
|
-
};
|
|
482
|
-
/**
|
|
483
|
-
* Aspect-ratio
|
|
484
|
-
*/
|
|
485
|
-
ar: {
|
|
486
|
-
1: number;
|
|
487
|
-
'2/1': number;
|
|
488
|
-
'1/2': number;
|
|
489
|
-
'4/3': number;
|
|
490
|
-
'3/4': number;
|
|
491
|
-
'9/16': number;
|
|
492
|
-
'16/9': number;
|
|
493
|
-
};
|
|
494
|
-
};
|
|
495
|
-
/**
|
|
496
|
-
* Light mode
|
|
497
|
-
*/
|
|
498
|
-
light: {
|
|
499
|
-
l: {
|
|
500
|
-
def: number;
|
|
501
|
-
c: number;
|
|
502
|
-
s: number;
|
|
503
|
-
m: number;
|
|
504
|
-
l: number;
|
|
505
|
-
n: number;
|
|
506
|
-
};
|
|
507
|
-
};
|
|
508
|
-
/**
|
|
509
|
-
* Dark mode
|
|
510
|
-
*/
|
|
511
|
-
dark: {
|
|
512
|
-
l: {
|
|
513
|
-
def: number;
|
|
514
|
-
n: number;
|
|
515
|
-
s: number;
|
|
516
|
-
m: number;
|
|
517
|
-
l: number;
|
|
518
|
-
c: number;
|
|
519
|
-
};
|
|
520
|
-
};
|
|
521
|
-
};
|
|
522
|
-
palette: TPaletteConfig;
|
|
523
|
-
coef: TCoefConfig;
|
|
524
|
-
};
|
|
525
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { TProviderAttrParams } from './common';
|
|
2
|
-
import { useStyleProvider } from './index';
|
|
3
|
-
/**
|
|
4
|
-
* Create style dispatcher
|
|
5
|
-
* @param params - dispatcher params
|
|
6
|
-
* @deprecated The function will be deleted in v4. Use `useStyleProvider` from `effcss` instead
|
|
7
|
-
*/
|
|
8
|
-
export declare const createConsumer: (attrs?: Partial<TProviderAttrParams>) => ReturnType<typeof useStyleProvider>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|