1 | import { PropertiesFallback, PropertiesHyphenFallback, AtRule, SimplePseudos } from 'csstype';
|
2 |
|
3 | interface CSSCustomProperties {
|
4 | '--tw-bg-opacity'?: string;
|
5 | '--tw-text-opacity'?: string;
|
6 | '--tw-border-opacity'?: string;
|
7 | '--tw-divide-opacity'?: string;
|
8 | '--tw-placeholder-opacity'?: string;
|
9 | '--tw-shadow'?: string;
|
10 | '--tw-ring-inset'?: string;
|
11 | '--tw-ring-color'?: string;
|
12 | '--tw-ring-opacity'?: string;
|
13 | '--tw-ring-shadow'?: string;
|
14 | '--tw-ring-offset-color'?: string;
|
15 | '--tw-ring-offset-shadow'?: string;
|
16 | '--tw-ring-offset-width'?: string;
|
17 | '--tw-gradient-from'?: string;
|
18 | '--tw-gradient-to'?: string;
|
19 | '--tw-gradient-stops'?: string;
|
20 | '--tw-divide-y-reverse'?: string;
|
21 | '--tw-divide-x-reverse'?: string;
|
22 | '--tw-space-y-reverse'?: string;
|
23 | '--tw-space-x-reverse'?: string;
|
24 | '--tw-translate-x'?: string;
|
25 | '--tw-translate-y'?: string;
|
26 | '--tw-rotate'?: string;
|
27 | '--tw-skew-x'?: string;
|
28 | '--tw-skew-y'?: string;
|
29 | '--tw-scale-x'?: string;
|
30 | '--tw-scale-y'?: string;
|
31 | '--tw-ordinal'?: string;
|
32 | '--tw-slashed-zero'?: string;
|
33 | '--tw-numeric-figure'?: string;
|
34 | '--tw-numeric-spacing'?: string;
|
35 | '--tw-numeric-fraction'?: string;
|
36 | }
|
37 | interface CSSProperties extends PropertiesFallback<string, string>, PropertiesHyphenFallback<string, string>, CSSCustomProperties {
|
38 | }
|
39 | interface FontFace extends AtRule.FontFaceFallback<string, string>, AtRule.FontFaceHyphenFallback<string, string> {
|
40 | }
|
41 | interface CounterStyle extends AtRule.CounterStyleFallback<string, string>, AtRule.CounterStyleHyphenFallback<string, string> {
|
42 | }
|
43 |
|
44 | declare type Falsy = '' | 0 | -0 | false | null | undefined | void;
|
45 | declare type MaybeArray<T> = T | readonly T[];
|
46 |
|
47 | interface TWCallable {
|
48 | (strings: TemplateStringsArray, ...interpolations: Token[]): string;
|
49 | (...tokens: Token[]): string;
|
50 | }
|
51 | interface TW extends TWCallable {
|
52 | theme: ThemeResolver;
|
53 | }
|
54 | interface Context {
|
55 |
|
56 | readonly tw: TWCallable;
|
57 |
|
58 | readonly theme: ThemeResolver;
|
59 |
|
60 | readonly tag: (key: string) => string;
|
61 | readonly css: (rule: Rule[] | string) => CSSRules;
|
62 | }
|
63 | interface Instance {
|
64 | readonly tw: TW;
|
65 | readonly setup: (options?: Configuration) => void;
|
66 | }
|
67 | declare type MaybeThunk<T> = T | ((context: Context) => T);
|
68 | interface Preflight {
|
69 | (preflight: CSSRules, context: Context): MaybeThunk<CSSRules | undefined | void>;
|
70 | }
|
71 | interface ThemeConfiguration extends Partial<Theme> {
|
72 | extend?: Partial<Theme>;
|
73 | }
|
74 | interface SheetConfig<T = unknown> {
|
75 | /**
|
76 | * Sets a cryptographic nonce (number used once) on the enclosing `<style>` tag when generating a page on demand.
|
77 | *
|
78 | * Useful for enforcing a [Content Security Policy (CSP)](https:
|
79 | */
|
80 | nonce?: string;
|
81 |
|
82 | target?: T;
|
83 | }
|
84 | interface Sheet<T = unknown> {
|
85 | readonly target: T;
|
86 | insert: (rule: string, index: number) => void;
|
87 | init?: SheetInit;
|
88 | }
|
89 | declare type SheetInitCallback<T = unknown> = (value?: T | undefined) => T;
|
90 | interface SheetInit {
|
91 | |
92 |
|
93 |
|
94 | <T>(callback: SheetInitCallback<T>): T;
|
95 | }
|
96 | declare type Prefixer = (property: string, value: string, important?: boolean) => string;
|
97 | declare type Hasher = (value: string) => string;
|
98 | declare type DarkMode = 'media' | 'class' | false;
|
99 | interface Configuration {
|
100 | |
101 |
|
102 |
|
103 | darkMode?: DarkMode;
|
104 | theme?: ThemeConfiguration;
|
105 | plugins?: Record<string, Plugin | undefined>;
|
106 | |
107 |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 | variants?: Record<string, string>;
|
114 | |
115 |
|
116 |
|
117 |
|
118 |
|
119 | nonce?: string;
|
120 |
|
121 | sheet?: Sheet;
|
122 |
|
123 | preflight?: Preflight | boolean | CSSRules;
|
124 |
|
125 | prefix?: Prefixer | boolean;
|
126 | hash?: Hasher | boolean;
|
127 | mode?: Mode | 'strict' | 'warn' | 'silent';
|
128 | |
129 |
|
130 |
|
131 | important?: boolean;
|
132 | }
|
133 | declare type ReportInfo = {
|
134 | id: 'LATE_SETUP_CALL';
|
135 | } | {
|
136 | id: 'UNKNOWN_DIRECTIVE';
|
137 | rule: string;
|
138 | } | {
|
139 | id: 'UNKNOWN_THEME_VALUE';
|
140 | key: string | undefined;
|
141 | } | {
|
142 | id: 'INJECT_CSS_ERROR';
|
143 | error: Error;
|
144 | css: string;
|
145 | };
|
146 | interface Mode {
|
147 |
|
148 | unknown: <Section extends keyof Theme>(section: Section, key: string[] | undefined, optional: boolean, context: Context) => ThemeSectionType<Theme[Section]> | undefined | void;
|
149 | |
150 |
|
151 |
|
152 |
|
153 |
|
154 |
|
155 |
|
156 | report(info: ReportInfo, context: Context): void;
|
157 | }
|
158 | declare type Plugin = string | CSSRules | DirectiveHandler;
|
159 | interface DirectiveHandler {
|
160 | |
161 |
|
162 |
|
163 | (parameters: string[], context: Context, id: string): InlineDirective | CSSRules | string | Falsy;
|
164 | }
|
165 | interface Rule {
|
166 | |
167 |
|
168 |
|
169 | v: string[];
|
170 | |
171 |
|
172 |
|
173 | d: string | InlineDirective;
|
174 |
|
175 | n: boolean | undefined;
|
176 |
|
177 | i: boolean | undefined;
|
178 | |
179 |
|
180 |
|
181 |
|
182 |
|
183 |
|
184 |
|
185 | $: string;
|
186 | }
|
187 | interface Directive<T> {
|
188 |
|
189 | (context: Context): T;
|
190 |
|
191 | (params: string[], context: Context): T;
|
192 | }
|
193 | interface InlineDirective {
|
194 | (context: Context): CSSRules | string | Falsy | TypescriptCompat;
|
195 | }
|
196 | interface TokenGrouping extends Record<string, Token> {
|
197 | }
|
198 | declare type TypescriptCompat = boolean | number;
|
199 | declare type Token = string | TokenGrouping | InlineDirective | Token[] | Falsy | TypescriptCompat;
|
200 |
|
201 |
|
202 |
|
203 |
|
204 | declare type CSSSimplePseudos = {
|
205 | [K in SimplePseudos as `&${string & K}`]?: CSSRulesThunk | MaybeArray<CSSRules>;
|
206 | };
|
207 | interface CSSPseudos extends CSSSimplePseudos {
|
208 | '&:nth-child(2n)'?: CSSRules;
|
209 | '&:nth-child(odd)'?: CSSRules;
|
210 | }
|
211 | declare type CSSAtMedia = Record<string, MaybeArray<CSSRules>>;
|
212 | declare type CSSAtSupports = Record<string, MaybeArray<CSSRules>>;
|
213 | declare type CSSAtKeyframes = Record<string, CSSProperties | ((context: Context) => CSSProperties)>;
|
214 |
|
215 |
|
216 |
|
217 |
|
218 |
|
219 |
|
220 |
|
221 |
|
222 |
|
223 |
|
224 |
|
225 |
|
226 |
|
227 |
|
228 |
|
229 |
|
230 |
|
231 |
|
232 |
|
233 | interface CSSRules {
|
234 | '@import'?: CSSRulesThunk<MaybeArray<string>> | MaybeArray<string>;
|
235 | '@font-face'?: CSSRulesThunk<MaybeArray<FontFace>> | MaybeArray<FontFace>;
|
236 | '@keyframes'?: CSSRulesThunk<CSSAtKeyframes> | CSSAtKeyframes;
|
237 | '@apply'?: MaybeArray<string | Falsy | TypescriptCompat>;
|
238 | '@global'?: CSSRulesThunk<MaybeArray<CSSRules>> | MaybeArray<CSSRules>;
|
239 | ':global'?: CSSRulesThunk<MaybeArray<CSSRules>> | MaybeArray<CSSRules>;
|
240 |
|
241 | [key: string]: CSSRuleValue;
|
242 | }
|
243 | declare type CSSRuleValue = CSSAtMedia | CSSAtSupports | CSSAtKeyframes | CSSRulesThunk | MaybeArray<CSSProperties | CSSRules | FontFace | string | Falsy | TypescriptCompat>;
|
244 | interface CSSRulesThunk<Value = CSSRuleValue> {
|
245 | (context: Context): Value;
|
246 | }
|
247 |
|
248 | interface ThemeResolver {
|
249 | <Section extends keyof Theme>(section: Section): Record<string, ThemeSectionType<Theme[Section]>>;
|
250 | <Section extends keyof Theme>(keypath: `${Section}.${string}`): ThemeSectionType<Theme[Section]> | undefined;
|
251 | <Section extends keyof Theme>(keypath: `${Section}.${string}`, defaultValue: NonNullable<ThemeSectionType<Theme[Section]>>): NonNullable<ThemeSectionType<Theme[Section]>>;
|
252 | <Section extends keyof Theme>(section: Section, key: string | string[]): ThemeSectionType<Theme[Section]> | undefined;
|
253 | <Section extends keyof Theme>(section: Section, key: string | string[], defaultValue: NonNullable<ThemeSectionType<Theme[Section]>>): NonNullable<ThemeSectionType<Theme[Section]>>;
|
254 | }
|
255 | interface ThemeHelper {
|
256 | <Section extends keyof Theme>(section: Section): (context: Context) => Record<string, ThemeSectionType<Theme[Section]>>;
|
257 | <Section extends keyof Theme>(keypath: `${Section}.${string}`): (context: Context) => ThemeSectionType<Theme[Section]> | undefined;
|
258 | <Section extends keyof Theme>(keypath: `${Section}.${string}`, defaultValue: NonNullable<ThemeSectionType<Theme[Section]>>): (context: Context) => NonNullable<ThemeSectionType<Theme[Section]>>;
|
259 | <Section extends keyof Theme>(section: Section, key: string | string[]): (context: Context) => ThemeSectionType<Theme[Section]> | undefined;
|
260 | <Section extends keyof Theme>(section: Section, key: string | string[], defaultValue: NonNullable<ThemeSectionType<Theme[Section]>>): (context: Context) => NonNullable<ThemeSectionType<Theme[Section]>>;
|
261 | }
|
262 | declare type Unwrap<T> = T extends string[] ? string : T extends Record<string, infer R> ? R : T;
|
263 | declare type ThemeSectionType<T> = T extends ThemeSection<infer R> ? Unwrap<R> : Exclude<T, ThemeSectionResolver<T>>;
|
264 | interface ThemeSectionResolverContext {
|
265 | |
266 |
|
267 |
|
268 | readonly negative: (records: Record<string, string | undefined>) => Record<string, string | undefined>;
|
269 | readonly breakpoints: (records: Record<string, ThemeScreen | undefined>) => Record<string, string | undefined>;
|
270 | }
|
271 | declare type ThemeSectionRecord<T = string> = Record<string, T | undefined>;
|
272 | declare type ThemeSectionResolver<T = string> = (theme: ThemeResolver, context: ThemeSectionResolverContext) => ThemeSectionRecord<T>;
|
273 | declare type ThemeSection<T = string> = ThemeSectionRecord<T> | ThemeSectionResolver<T>;
|
274 | interface ThemeContainer {
|
275 | screens?: Record<string, string | undefined>;
|
276 | center?: boolean;
|
277 | padding?: string | Record<string, string | undefined>;
|
278 | }
|
279 | declare type ThemeScreenValue = string | {
|
280 | raw: string;
|
281 | } | {
|
282 | min: string;
|
283 | max?: string;
|
284 | } | {
|
285 | min?: string;
|
286 | max: string;
|
287 | };
|
288 | declare type ThemeScreen = MaybeArray<ThemeScreenValue>;
|
289 | interface ThemeColorObject extends Record<string, ThemeColor> {
|
290 | }
|
291 | declare type ThemeColor = string | ThemeColorObject;
|
292 | declare type ThemeFontSize = string | [size: string, lineHeight: string] | [size: string, options: {
|
293 | lineHeight?: string;
|
294 | letterSpacing?: string;
|
295 | }];
|
296 | declare type ThemeOutline = [outline: string, offset: string];
|
297 | interface Theme {
|
298 | colors: ThemeSection<ThemeColor>;
|
299 | spacing: ThemeSection;
|
300 | durations: ThemeSection<string | string[]>;
|
301 | screens: ThemeSection<ThemeScreen>;
|
302 | animation: ThemeSection<string | string[]>;
|
303 | backdropBlur: ThemeSection;
|
304 | backdropBrightness: ThemeSection;
|
305 | backdropContrast: ThemeSection;
|
306 | backdropGrayscale: ThemeSection;
|
307 | backdropHueRotate: ThemeSection;
|
308 | backdropInvert: ThemeSection;
|
309 | backdropOpacity: ThemeSection;
|
310 | backdropSaturate: ThemeSection;
|
311 | backdropSepia: ThemeSection;
|
312 | backgroundColor: ThemeSection<ThemeColor>;
|
313 | backgroundImage: ThemeSection<string | string[]>;
|
314 | backgroundOpacity: ThemeSection;
|
315 | backgroundPosition: ThemeSection;
|
316 | backgroundSize: ThemeSection;
|
317 | blur: ThemeSection;
|
318 | borderColor: ThemeSection<ThemeColor>;
|
319 | borderOpacity: ThemeSection;
|
320 | borderRadius: ThemeSection;
|
321 | borderWidth: ThemeSection;
|
322 | boxShadow: ThemeSection<string | string[]>;
|
323 | brightness: ThemeSection;
|
324 | container: ThemeContainer | ThemeSectionResolver<ThemeContainer>;
|
325 | contrast: ThemeSection;
|
326 | cursor: ThemeSection;
|
327 | divideColor: ThemeSection<ThemeColor>;
|
328 | divideOpacity: ThemeSection;
|
329 | divideWidth: ThemeSection;
|
330 | dropShadow: ThemeSection<string | string[]>;
|
331 | fill: ThemeSection<ThemeColor>;
|
332 | flex: ThemeSection;
|
333 | flexGrow: ThemeSection<number>;
|
334 | flexShrink: ThemeSection<number>;
|
335 | fontFamily: ThemeSection<string | string[]>;
|
336 | fontSize: ThemeSection<ThemeFontSize>;
|
337 | fontWeight: ThemeSection;
|
338 | gap: ThemeSection;
|
339 | gradientColorStops: ThemeSection<ThemeColor>;
|
340 | grayscale: ThemeSection;
|
341 | gridAutoColumns: ThemeSection;
|
342 | gridAutoRows: ThemeSection;
|
343 | gridColumn: ThemeSection;
|
344 | gridColumnEnd: ThemeSection;
|
345 | gridColumnStart: ThemeSection;
|
346 | gridRow: ThemeSection;
|
347 | gridRowEnd: ThemeSection;
|
348 | gridRowStart: ThemeSection;
|
349 | gridTemplateColumns: ThemeSection;
|
350 | gridTemplateRows: ThemeSection;
|
351 | height: ThemeSection;
|
352 | hueRotate: ThemeSection;
|
353 | inset: ThemeSection;
|
354 | invert: ThemeSection;
|
355 | keyframes: ThemeSection<Record<string, CSSProperties>>;
|
356 | letterSpacing: ThemeSection;
|
357 | lineHeight: ThemeSection;
|
358 | listStyleType: ThemeSection;
|
359 | margin: ThemeSection;
|
360 | maxHeight: ThemeSection;
|
361 | maxWidth: ThemeSection;
|
362 | minHeight: ThemeSection;
|
363 | minWidth: ThemeSection;
|
364 | objectPosition: ThemeSection;
|
365 | opacity: ThemeSection;
|
366 | order: ThemeSection;
|
367 | outline: ThemeSection<ThemeOutline>;
|
368 | padding: ThemeSection;
|
369 | placeholderColor: ThemeSection<ThemeColor>;
|
370 | placeholderOpacity: ThemeSection;
|
371 | ringColor: ThemeSection<ThemeColor>;
|
372 | ringOffsetColor: ThemeSection<ThemeColor>;
|
373 | ringOffsetWidth: ThemeSection;
|
374 | ringOpacity: ThemeSection;
|
375 | ringWidth: ThemeSection;
|
376 | rotate: ThemeSection;
|
377 | saturate: ThemeSection;
|
378 | scale: ThemeSection;
|
379 | sepia: ThemeSection;
|
380 | skew: ThemeSection;
|
381 | space: ThemeSection;
|
382 | stroke: ThemeSection<ThemeColor>;
|
383 | strokeWidth: ThemeSection;
|
384 | textColor: ThemeSection<ThemeColor>;
|
385 | textOpacity: ThemeSection;
|
386 | transformOrigin: ThemeSection;
|
387 | transitionDelay: ThemeSection<string | string[]>;
|
388 | transitionDuration: ThemeSection<string | string[]>;
|
389 | transitionProperty: ThemeSection<string | string[]>;
|
390 | transitionTimingFunction: ThemeSection<string | string[]>;
|
391 | translate: ThemeSection;
|
392 | width: ThemeSection;
|
393 | zIndex: ThemeSection;
|
394 | }
|
395 |
|
396 | declare type InterpolateKind = `theme(${keyof Theme})` | `range(${number},${number},${number})` | `string` | `number` | `nonzero`;
|
397 | declare type Interpolate<Kind extends InterpolateKind> = `{{${Kind}}}`;
|
398 | declare type FromTheme<Section extends keyof Theme> = Interpolate<`theme(${Section})`>;
|
399 | declare type NonEmptyString = Interpolate<'string'>;
|
400 | declare type Range<From extends number, To extends number, Step extends number = 1> = Interpolate<`range(${From},${To},${Step})`>;
|
401 | declare type Negatable<Value extends string> = Value | `-${Value}`;
|
402 | declare type SimplePseudoClasses = 'active' | 'any-link' | 'autofill' | 'checked' | 'default' | 'disabled' | 'empty' | 'enabled' | 'first-child' | 'first-of-type' | 'focus' | 'focus-visible' | 'focus-within' | 'future' | 'hover' | 'in-range' | 'indeterminate' | 'invalid' | 'last-child' | 'last-of-type' | 'link' | 'local-link' | 'only-child' | 'only-of-type' | 'optional' | 'out-of-range' | 'past' | 'paused' | 'placeholder-shown' | 'playing' | 'read-only' | 'read-write' | 'required' | 'target' | 'target-within' | 'user-invalid' | 'valid' | 'visited';
|
403 | declare type SimplePseudoElements = 'after' | 'before' | 'cue' | 'cue-region' | 'file-selector-button' | 'first-letter' | 'first-line' | 'marker' | 'placeholder' | 'selection' | 'target-text';
|
404 | declare type CoreVariants = 'dark' | 'sticky' | 'motion-reduce' | 'motion-safe' | 'first' | 'last' | 'even' | 'odd' | 'children' | 'siblings' | 'sibling' | 'override';
|
405 | declare type Empty = never | '' | 'DEFAULT';
|
406 | declare type Join<Prefix extends string | never, Suffix extends string | never, Separator extends string = '-'> = Suffix extends Empty ? Prefix extends Empty ? never : Prefix : Prefix extends Empty ? Suffix : Prefix extends Suffix ? never : Suffix extends `-${infer S}` ? `-${Prefix}${Separator}${S}` : `${Prefix}${Separator}${Suffix}`;
|
407 | declare type Corners = 't' | 'r' | 'b' | 'l' | 'tl' | 'tr' | 'bl' | 'br';
|
408 | declare type Edges = 'x' | 'y' | 't' | 'r' | 'b' | 'l' | 'tl' | 'tr' | 'tb' | 'bl' | 'br' | 'lr';
|
409 | declare type BorderStyle = 'solid' | 'dashed' | 'dotted' | 'double' | 'none';
|
410 | declare type GlobalValue = 'inherit' | 'initial' | 'unset';
|
411 | declare type BlendMode = 'normal' | 'multiply' | 'screen' | 'overlay' | 'darken' | 'lighten' | 'color-dodge' | 'color-burn' | 'hard-light' | 'soft-light' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity';
|
412 | interface CorePlugins {
|
413 | group: '' | NonEmptyString;
|
414 | container: '';
|
415 | decoration: 'slice' | 'clone' | GlobalValue;
|
416 | box: 'border' | 'content';
|
417 | block: '';
|
418 | inline: '' | 'block' | 'flex' | 'grid' | 'table';
|
419 | flow: 'root';
|
420 | contents: '';
|
421 | hidden: '';
|
422 | float: 'right' | 'left' | 'none';
|
423 | clear: 'right' | 'left' | 'both' | 'none';
|
424 | isolate: '';
|
425 | isolation: 'auto' | 'isolate' | GlobalValue;
|
426 | object: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' | Join<'' | 'left' | 'right' | 'center', '' | 'bottom' | 'top' | 'center'> | FromTheme<'objectPosition'>;
|
427 | overflow: Join<'' | 'x' | 'y', 'auto' | 'hidden' | 'visible' | 'scroll'> | 'ellipsis' | 'clip';
|
428 | overscroll: Join<'' | 'x' | 'y', 'auto' | 'contain' | 'none'>;
|
429 | static: '';
|
430 | fixed: '';
|
431 | absolute: '';
|
432 | relative: '';
|
433 | sticky: '';
|
434 | inset: Negatable<Join<'' | 'x' | 'y', FromTheme<'inset'>>>;
|
435 | top: Negatable<FromTheme<'inset'>>;
|
436 | right: Negatable<FromTheme<'inset'>>;
|
437 | bottom: Negatable<FromTheme<'inset'>>;
|
438 | left: Negatable<FromTheme<'inset'>>;
|
439 | visible: '';
|
440 | invisible: '';
|
441 | z: Negatable<FromTheme<'zIndex'>>;
|
442 | flex: '' | 'nowrap' | Join<'row' | 'col' | 'wrap', '' | 'reverse'> | Join<'grow', '' | '0' | FromTheme<'flexGrow'> | Interpolate<'number'>> | Join<'shrink', '' | '0' | FromTheme<'flexShrink'> | Interpolate<'number'>> | FromTheme<'flex'>;
|
443 | order: FromTheme<'order'>;
|
444 | grid: '' | Join<'cols', 'none' | Range<1, 12> | Interpolate<'nonzero'> | FromTheme<'gridTemplateColumns'>> | Join<'rows', 'none' | Range<1, 6> | Interpolate<'nonzero'> | FromTheme<'gridTemplateRows'>> | Join<'flow', Join<'row' | 'col', '' | 'dense'> | 'dense'>;
|
445 | col: Join<'span', Range<1, 12> | Interpolate<'nonzero'>> | Join<'start', 'auto' | Range<1, 13> | Interpolate<'nonzero'> | FromTheme<'gridColumnStart'>> | Join<'end', 'auto' | Range<1, 13> | Interpolate<'nonzero'> | FromTheme<'gridColumnEnd'>> | FromTheme<'gridColumn'>;
|
446 | row: Join<'span', Range<1, 12> | Interpolate<'nonzero'>> | Join<'start', 'auto' | Range<1, 13> | Interpolate<'nonzero'> | FromTheme<'gridRowStart'>> | Join<'end', 'auto' | Range<1, 13> | Interpolate<'nonzero'> | FromTheme<'gridRowEnd'>> | FromTheme<'gridRow'>;
|
447 | auto: Join<'cols', 'auto' | FromTheme<'gridAutoColumns'>> | Join<'rows', 'auto' | FromTheme<'gridAutoRows'>>;
|
448 | gap: Join<'' | 'x' | 'y', FromTheme<'gap'>>;
|
449 | justify: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly' | Join<'items' | 'self', 'auto' | 'start' | 'end' | 'center' | 'stretch'>;
|
450 | content: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly';
|
451 | items: 'start' | 'end' | 'center' | 'baseline' | 'stretch';
|
452 | self: 'auto' | 'start' | 'end' | 'center' | 'stretch';
|
453 | place: Join<'content', 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly' | 'stretch'> | Join<'items' | 'self', 'auto' | 'start' | 'end' | 'center' | 'stretch'>;
|
454 | p: FromTheme<'padding'>;
|
455 | py: FromTheme<'padding'>;
|
456 | px: FromTheme<'padding'>;
|
457 | pt: FromTheme<'padding'>;
|
458 | pr: FromTheme<'padding'>;
|
459 | pb: FromTheme<'padding'>;
|
460 | pl: FromTheme<'padding'>;
|
461 | m: Negatable<FromTheme<'margin'>>;
|
462 | my: Negatable<FromTheme<'margin'>>;
|
463 | mx: Negatable<FromTheme<'margin'>>;
|
464 | mt: Negatable<FromTheme<'margin'>>;
|
465 | mr: Negatable<FromTheme<'margin'>>;
|
466 | mb: Negatable<FromTheme<'margin'>>;
|
467 | ml: Negatable<FromTheme<'margin'>>;
|
468 | space: Negatable<Join<'x' | 'y', FromTheme<'space'>>> | Join<'x' | 'y', 'reverse'>;
|
469 | w: FromTheme<'width'>;
|
470 | min: Join<'w', FromTheme<'minWidth'>> | Join<'h', FromTheme<'minHeight'>>;
|
471 | max: Join<'w', FromTheme<'maxWidth'>> | Join<'h', FromTheme<'maxHeight'>>;
|
472 | h: FromTheme<'height'>;
|
473 | font: FromTheme<'fontFamily'> | FromTheme<'fontWeight'> | 'italic' | 'not-italic';
|
474 | text: FromTheme<'fontSize'> | 'left' | 'right' | 'center' | 'justify' | FromTheme<'textColor'> | Join<'opacity', FromTheme<'textOpacity'>> | 'underline' | 'no-underline' | 'line-through' | 'uppercase' | 'lowercase' | 'capitalize' | 'normal-case';
|
475 | antialiased: '';
|
476 | 'subpixel-antialiased': '';
|
477 | italic: '';
|
478 | 'not-italic': '';
|
479 | 'normal-nums': '';
|
480 | ordinal: '';
|
481 | 'slashed-zero': '';
|
482 | 'lining-nums': '';
|
483 | 'oldstyle-nums': '';
|
484 | 'proportional-nums': '';
|
485 | 'tabular-nums': '';
|
486 | 'diagonal-fractions': '';
|
487 | 'stacked-fractions': '';
|
488 | tracking: FromTheme<'letterSpacing'>;
|
489 | leading: FromTheme<'lineHeight'>;
|
490 | list: 'item' | 'inside' | 'outside' | 'none' | 'disc' | 'circle' | 'sqaure' | 'decimal' | 'decimal-leading-zero' | Join<'lower' | 'upper', 'roman' | 'greek' | 'alpha' | 'latin'> | FromTheme<'listStyleType'>;
|
491 | placeholder: FromTheme<'placeholderColor'> | Join<'opacity', FromTheme<'placeholderOpacity'>>;
|
492 | underline: '';
|
493 | 'no-underline': '';
|
494 | 'line-through': '';
|
495 | uppercase: '';
|
496 | lowercase: '';
|
497 | capitalize: '';
|
498 | 'normal-case': '';
|
499 | truncate: '';
|
500 | align: 'baseline' | 'top' | 'middle' | 'bottom' | 'text-top' | 'text-bottom' | 'sub' | 'super';
|
501 | whitespace: 'normal' | 'nowrap' | 'pre' | 'pre-wrap' | 'pre-line' | 'break-spaces';
|
502 | break: 'normal' | 'words' | 'all';
|
503 | bg: 'fixed' | 'local' | 'scroll' | Join<'clip', 'border' | 'padding' | 'content' | 'text'> | FromTheme<'backgroundColor'> | Join<'opacity', FromTheme<'backgroundOpacity'>> | Join<'' | 'left' | 'right' | 'center', '' | 'bottom' | 'top' | 'center'> | FromTheme<'backgroundPosition'> | 'no-repeat' | Join<'repeat', '' | 'x' | 'y' | 'round' | 'space'> | Join<'gradient-to', Corners> | FromTheme<'backgroundImage'> | FromTheme<'backgroundSize'>;
|
504 | from: FromTheme<'gradientColorStops'>;
|
505 | via: FromTheme<'gradientColorStops'>;
|
506 | to: FromTheme<'gradientColorStops'>;
|
507 | rounded: Join<'' | Corners, FromTheme<'borderRadius'>>;
|
508 | border: Join<'' | Edges, FromTheme<'borderWidth'>> | FromTheme<'borderColor'> | Join<'opacity', FromTheme<'borderOpacity'>> | BorderStyle | 'collapse' | 'separate';
|
509 | divide: Join<'x' | 'y', 'reverse' | FromTheme<'divideWidth'>> | FromTheme<'divideColor'> | Join<'opacity', FromTheme<'divideOpacity'>> | BorderStyle;
|
510 | ring: 'inset' | FromTheme<'ringWidth'> | FromTheme<'ringColor'> | Join<'opacity', FromTheme<'ringOpacity'>> | Join<'offset', FromTheme<'ringOffsetWidth'> | FromTheme<'ringOffsetColor'>>;
|
511 | shadow: FromTheme<'boxShadow'>;
|
512 | opacity: FromTheme<'opacity'>;
|
513 | table: '' | 'caption' | 'cell' | 'column' | Join<'column' | 'footer' | 'header' | 'row', 'group'> | 'row' | 'auto' | 'fixed';
|
514 | transition: FromTheme<'transitionProperty'>;
|
515 | duration: FromTheme<'durations'>;
|
516 | ease: FromTheme<'transitionTimingFunction'>;
|
517 | delay: FromTheme<'transitionDelay'>;
|
518 | animate: FromTheme<'animation'>;
|
519 | transform: '' | 'gpu' | 'none';
|
520 | origin: 'center' | Join<'' | 'top' | 'bottom', '' | 'right' | 'left'>;
|
521 | rotate: Negatable<FromTheme<'rotate'>>;
|
522 | scale: Join<'' | 'x' | 'y', FromTheme<'scale'>>;
|
523 | skew: Negatable<Join<'' | 'x' | 'y', FromTheme<'skew'>>>;
|
524 | translate: Negatable<Join<'' | 'x' | 'y', FromTheme<'translate'>>>;
|
525 | appearance: 'none' | 'auto' | 'menulist-button' | 'textfield';
|
526 | cursor: FromTheme<'cursor'> | 'auto' | 'default' | 'pointer' | 'wait' | 'text' | 'move' | 'help' | 'not-allowed' | 'none' | 'context-menu' | 'progress' | 'cell' | 'crosshair' | 'vertical-text' | 'alias' | 'copy' | 'no-drop' | 'e-resize' | 'n-resize' | 'ne-resize' | 'nw-resize' | 's-resize' | 'se-resize' | 'sw-resize' | 'w-resize' | 'ew-resize' | 'ns-resize' | 'nesw-resize' | 'nwse-resize' | 'col-resize' | 'row-resize' | 'all-scroll' | 'zoom-in' | 'zoom-out' | 'grab' | 'grabbing';
|
527 | outline: FromTheme<'outline'>;
|
528 | 'pointer-events': 'auto' | 'none';
|
529 | resize: 'none' | 'x' | 'y' | '';
|
530 | select: 'none' | 'auto' | 'text' | 'contain' | 'all';
|
531 | fill: FromTheme<'fill'>;
|
532 | stroke: FromTheme<'stroke'> | FromTheme<'strokeWidth'>;
|
533 | 'sr-only': '';
|
534 | 'not-sr-only': '';
|
535 | filter: '' | 'none';
|
536 | blur: FromTheme<'blur'>;
|
537 | brightness: FromTheme<'brightness'>;
|
538 | contrast: FromTheme<'contrast'>;
|
539 | grayscale: FromTheme<'grayscale'>;
|
540 | 'hue-rotate': Negatable<FromTheme<'hueRotate'>>;
|
541 | invert: FromTheme<'invert'>;
|
542 | saturate: FromTheme<'saturate'>;
|
543 | sepia: FromTheme<'sepia'>;
|
544 | 'drop-shadow': FromTheme<'dropShadow'>;
|
545 | backdrop: Join<'filter', '' | 'none'> | Join<'blur', FromTheme<'backdropBlur'>> | Join<'brightness', FromTheme<'backdropBrightness'>> | Join<'contrast', FromTheme<'backdropContrast'>> | Join<'grayscale', FromTheme<'backdropGrayscale'>> | Join<'hue-rotate', Negatable<FromTheme<'backdropHueRotate'>>> | Join<'invert', FromTheme<'backdropInvert'>> | Join<'opacity', FromTheme<'backdropOpacity'>> | Join<'saturate', FromTheme<'backdropSaturate'>> | Join<'sepia', FromTheme<'backdropSepia'>>;
|
546 | 'mix-blend': BlendMode;
|
547 | 'bg-blend': BlendMode;
|
548 | }
|
549 | declare type ToString<T> = T extends string ? T : T extends number ? `${T}` : never;
|
550 | declare type JoinFromObject<T, Separator extends string = '-'> = {
|
551 | [P in keyof T]: Join<ToString<P>, ToString<T[P]>, Separator>;
|
552 | }[keyof T];
|
553 |
|
554 | interface Variants {
|
555 | }
|
556 |
|
557 | interface Plugins {
|
558 | }
|
559 | declare type CoreCompletionTokens = `${FromTheme<'screens'>}:` | `${'' | 'not-'}${SimplePseudoClasses}:` | `${Join<'group', '' | Interpolate<'string'>>}-${SimplePseudoClasses}:` | `${SimplePseudoElements}::` | `${CoreVariants}:` | JoinFromObject<CorePlugins>;
|
560 | declare type UserCompletionTokens = {
|
561 | [K in keyof Variants]: `${ToString<K>}:`;
|
562 | }[keyof Variants] | JoinFromObject<Plugins>;
|
563 | declare type CompletionTokens = CoreCompletionTokens | UserCompletionTokens;
|
564 |
|
565 | interface Apply {
|
566 | (strings: TemplateStringsArray, ...interpolations: Token[]): Directive<CSSRules>;
|
567 | (...tokens: Token[]): Directive<CSSRules>;
|
568 | }
|
569 | declare const apply: Apply;
|
570 |
|
571 | declare const tw: TW;
|
572 | declare const setup: (options?: Configuration | undefined) => void;
|
573 |
|
574 |
|
575 |
|
576 |
|
577 |
|
578 |
|
579 |
|
580 |
|
581 |
|
582 |
|
583 | declare const directive: <Data, T>(factory: (data: Data, context: Context) => MaybeThunk<T>, data: Data) => Directive<T>;
|
584 |
|
585 | declare const create: (config?: Configuration | undefined) => Instance;
|
586 |
|
587 | declare const mode: (report: (message: string) => void) => Mode;
|
588 | declare const warn: Mode;
|
589 | declare const strict: Mode;
|
590 | declare const silent: Mode;
|
591 |
|
592 | declare const noprefix: Prefixer;
|
593 | declare const autoprefix: Prefixer;
|
594 |
|
595 |
|
596 |
|
597 |
|
598 | declare const cssomSheet: ({ nonce, target, }?: SheetConfig<CSSStyleSheet>) => Sheet<CSSStyleSheet>;
|
599 |
|
600 |
|
601 |
|
602 | declare const voidSheet: () => Sheet<null>;
|
603 |
|
604 | declare const theme: ThemeHelper;
|
605 |
|
606 | declare const cyrb32: Hasher;
|
607 |
|
608 | export { Apply, BlendMode, BorderStyle, CSSAtKeyframes, CSSAtMedia, CSSAtSupports, CSSCustomProperties, CSSProperties, CSSPseudos, CSSRuleValue, CSSRules, CSSRulesThunk, CSSSimplePseudos, CompletionTokens, Configuration, Context, CoreCompletionTokens, CorePlugins, CoreVariants, Corners, CounterStyle, DarkMode, Directive, DirectiveHandler, Edges, Empty, Falsy, FontFace, FromTheme, GlobalValue, Hasher, InlineDirective, Instance, Interpolate, InterpolateKind, Join, JoinFromObject, MaybeArray, MaybeThunk, Mode, Negatable, NonEmptyString, Plugin, Plugins, Prefixer, Preflight, Range, ReportInfo, Rule, Sheet, SheetConfig, SheetInit, SheetInitCallback, SimplePseudoClasses, SimplePseudoElements, TW, TWCallable, Theme, ThemeColor, ThemeColorObject, ThemeConfiguration, ThemeContainer, ThemeFontSize, ThemeHelper, ThemeOutline, ThemeResolver, ThemeScreen, ThemeScreenValue, ThemeSection, ThemeSectionRecord, ThemeSectionResolver, ThemeSectionResolverContext, ThemeSectionType, ToString, Token, TokenGrouping, TypescriptCompat, Unwrap, UserCompletionTokens, Variants, apply, autoprefix, create, cssomSheet, directive, cyrb32 as hash, mode, noprefix, setup, silent, strict, theme, tw, voidSheet, warn };
|
609 |
|
610 |
|
\ | No newline at end of file |