tailwindcss 4.0.0-alpha.3 → 4.0.0-alpha.30
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/chunk-AZANAYY2.mjs +1 -0
- package/dist/chunk-YMSQGVYX.mjs +1 -0
- package/dist/colors-b_6i0Oi7.d.ts +295 -0
- package/dist/colors.d.mts +295 -0
- package/dist/colors.d.ts +5 -0
- package/dist/colors.js +1 -0
- package/dist/colors.mjs +1 -0
- package/dist/default-theme.d.mts +1147 -0
- package/dist/default-theme.d.ts +1147 -0
- package/dist/default-theme.js +1 -0
- package/dist/default-theme.mjs +1 -0
- package/dist/lib.d.mts +156 -255
- package/dist/lib.d.ts +2 -323
- package/dist/lib.js +24 -11
- package/dist/lib.mjs +24 -11
- package/dist/plugin.d.mts +10 -0
- package/dist/plugin.d.ts +98 -0
- package/dist/plugin.js +1 -0
- package/dist/plugin.mjs +1 -0
- package/dist/resolve-config-BIFUA2FY.d.ts +29 -0
- package/dist/resolve-config-CCprQPpk.d.mts +186 -0
- package/dist/types-DxVE_W4f.d.mts +92 -0
- package/index.css +847 -3
- package/package.json +43 -8
- package/preflight.css +24 -53
- package/theme.css +281 -253
package/dist/lib.d.ts
CHANGED
@@ -1,324 +1,3 @@
|
|
1
|
-
|
2
|
-
modifiers: string[];
|
3
|
-
}
|
4
|
-
type ClassEntry = [string, ClassMetadata];
|
5
|
-
interface SelectorOptions {
|
6
|
-
modifier?: string;
|
7
|
-
value?: string;
|
8
|
-
}
|
9
|
-
interface VariantEntry {
|
10
|
-
name: string;
|
11
|
-
isArbitrary: boolean;
|
12
|
-
values: string[];
|
13
|
-
hasDash: boolean;
|
14
|
-
selectors: (options: SelectorOptions) => string[];
|
15
|
-
}
|
1
|
+
declare function postcssPluginWarning(): void;
|
16
2
|
|
17
|
-
|
18
|
-
private values;
|
19
|
-
constructor(values?: Map<string, string>);
|
20
|
-
add(key: string, value: string): void;
|
21
|
-
keysInNamespaces(themeKeys: ThemeKey[]): string[];
|
22
|
-
get(themeKeys: ThemeKey[]): string | null;
|
23
|
-
entries(): IterableIterator<[string, string]>;
|
24
|
-
clearNamespace(namespace: string): void;
|
25
|
-
resolveKey(candidateValue: string, themeKeys: ThemeKey[]): string | null;
|
26
|
-
resolve(candidateValue: string, themeKeys: ThemeKey[]): string | null;
|
27
|
-
resolveWith(candidateValue: string, themeKeys: ThemeKey[], nestedKeys?: `--${string}`[]): [string, Record<string, string>] | null;
|
28
|
-
namespace(namespace: string): Map<string | null, string>;
|
29
|
-
}
|
30
|
-
type ThemeKey = '--accent-color' | '--animate' | '--aspect-ratio' | '--backdrop-blur' | '--backdrop-brightness' | '--backdrop-contrast' | '--backdrop-grayscale' | '--backdrop-hue-rotate' | '--backdrop-invert' | '--backdrop-opacity' | '--backdrop-saturate' | '--backdrop-sepia' | '--background-color' | '--background-image' | '--blur' | '--border-color' | '--border-spacing' | '--border-width' | '--box-shadow-color' | '--breakpoint' | '--brightness' | '--caret-color' | '--color' | '--columns' | '--contrast' | '--cursor' | '--default-border-width' | '--default-ring-color' | '--default-ring-width' | '--divide-width' | '--divide-color' | '--drop-shadow' | '--fill' | '--flex-basis' | '--font-family' | '--font-size' | '--font-weight' | '--gap' | '--gradient-color-stop-positions' | '--grayscale' | '--grid-auto-columns' | '--grid-auto-rows' | '--grid-column' | '--grid-column-end' | '--grid-column-start' | '--grid-row' | '--grid-row-end' | '--grid-row-start' | '--grid-template-columns' | '--grid-template-rows' | '--height' | '--hue-rotate' | '--inset' | '--inset-shadow' | '--invert' | '--letter-spacing' | '--line-height' | '--line-clamp' | '--list-style-image' | '--list-style-type' | '--margin' | '--max-height' | '--max-width' | '--min-height' | '--min-width' | '--object-position' | '--opacity' | '--order' | '--outline-color' | '--outline-width' | '--outline-offset' | '--padding' | '--placeholder-color' | '--radius' | '--ring-color' | '--ring-offset-color' | '--ring-offset-width' | '--ring-width' | '--rotate' | '--saturate' | '--scale' | '--scroll-margin' | '--scroll-padding' | '--sepia' | '--shadow' | '--size' | '--skew' | '--space' | '--spacing' | '--stroke' | '--stroke-width' | '--text-color' | '--text-decoration-color' | '--text-decoration-thickness' | '--text-indent' | '--text-underline-offset' | '--transform-origin' | '--transition-delay' | '--transition-duration' | '--transition-property' | '--transition-timing-function' | '--translate' | '--width' | '--z-index';
|
31
|
-
|
32
|
-
type Rule = {
|
33
|
-
kind: 'rule';
|
34
|
-
selector: string;
|
35
|
-
nodes: AstNode[];
|
36
|
-
};
|
37
|
-
type Declaration = {
|
38
|
-
kind: 'declaration';
|
39
|
-
property: string;
|
40
|
-
value: string;
|
41
|
-
important: boolean;
|
42
|
-
};
|
43
|
-
type Comment = {
|
44
|
-
kind: 'comment';
|
45
|
-
value: string;
|
46
|
-
};
|
47
|
-
type AstNode = Rule | Declaration | Comment;
|
48
|
-
|
49
|
-
type ArbitraryUtilityValue = {
|
50
|
-
kind: 'arbitrary';
|
51
|
-
/**
|
52
|
-
* bg-[color:--my-color]
|
53
|
-
* ^^^^^
|
54
|
-
*/
|
55
|
-
dataType: string | null;
|
56
|
-
/**
|
57
|
-
* bg-[#0088cc]
|
58
|
-
* ^^^^^^^
|
59
|
-
* bg-[--my_variable]
|
60
|
-
* var(^^^^^^^^^^^^^)
|
61
|
-
*/
|
62
|
-
value: string;
|
63
|
-
/**
|
64
|
-
* bg-[--my_variable]
|
65
|
-
* ^^^^^^^^^^^^^
|
66
|
-
*/
|
67
|
-
dashedIdent: string | null;
|
68
|
-
};
|
69
|
-
type NamedUtilityValue = {
|
70
|
-
kind: 'named';
|
71
|
-
/**
|
72
|
-
* bg-red-500
|
73
|
-
* ^^^^^^^
|
74
|
-
*
|
75
|
-
* w-1/2
|
76
|
-
* ^
|
77
|
-
*/
|
78
|
-
value: string;
|
79
|
-
/**
|
80
|
-
* w-1/2
|
81
|
-
* ^^^
|
82
|
-
*/
|
83
|
-
fraction: string | null;
|
84
|
-
};
|
85
|
-
type ArbitraryModifier = {
|
86
|
-
kind: 'arbitrary';
|
87
|
-
/**
|
88
|
-
* bg-red-500/[50%]
|
89
|
-
* ^^^
|
90
|
-
*/
|
91
|
-
value: string;
|
92
|
-
/**
|
93
|
-
* bg-red-500/[--my_variable]
|
94
|
-
* ^^^^^^^^^^^^^
|
95
|
-
*/
|
96
|
-
dashedIdent: string | null;
|
97
|
-
};
|
98
|
-
type NamedModifier = {
|
99
|
-
kind: 'named';
|
100
|
-
/**
|
101
|
-
* bg-red-500/50
|
102
|
-
* ^^
|
103
|
-
*/
|
104
|
-
value: string;
|
105
|
-
};
|
106
|
-
type ArbitraryVariantValue = {
|
107
|
-
kind: 'arbitrary';
|
108
|
-
value: string;
|
109
|
-
};
|
110
|
-
type NamedVariantValue = {
|
111
|
-
kind: 'named';
|
112
|
-
value: string;
|
113
|
-
};
|
114
|
-
type Variant =
|
115
|
-
/**
|
116
|
-
* Arbitrary variants are variants that take a selector and generate a variant
|
117
|
-
* on the fly.
|
118
|
-
*
|
119
|
-
* E.g.: `[&_p]`
|
120
|
-
*/
|
121
|
-
{
|
122
|
-
kind: 'arbitrary';
|
123
|
-
selector: string;
|
124
|
-
compounds: boolean;
|
125
|
-
}
|
126
|
-
/**
|
127
|
-
* Static variants are variants that don't take any arguments.
|
128
|
-
*
|
129
|
-
* E.g.: `hover`
|
130
|
-
*/
|
131
|
-
| {
|
132
|
-
kind: 'static';
|
133
|
-
root: string;
|
134
|
-
compounds: boolean;
|
135
|
-
}
|
136
|
-
/**
|
137
|
-
* Functional variants are variants that can take an argument. The argument is
|
138
|
-
* either a named variant value or an arbitrary variant value.
|
139
|
-
*
|
140
|
-
* E.g.:
|
141
|
-
*
|
142
|
-
* - `aria-disabled`
|
143
|
-
* - `aria-[disabled]`
|
144
|
-
* - `@container-size` -> @container, with named value `size`
|
145
|
-
* - `@container-[inline-size]` -> @container, with arbitrary variant value `inline-size`
|
146
|
-
* - `@container` -> @container, with no value
|
147
|
-
*/
|
148
|
-
| {
|
149
|
-
kind: 'functional';
|
150
|
-
root: string;
|
151
|
-
value: ArbitraryVariantValue | NamedVariantValue | null;
|
152
|
-
modifier: ArbitraryModifier | NamedModifier | null;
|
153
|
-
compounds: boolean;
|
154
|
-
}
|
155
|
-
/**
|
156
|
-
* Compound variants are variants that take another variant as an argument.
|
157
|
-
*
|
158
|
-
* E.g.:
|
159
|
-
*
|
160
|
-
* - `has-[&_p]`
|
161
|
-
* - `group-*`
|
162
|
-
* - `peer-*`
|
163
|
-
*/
|
164
|
-
| {
|
165
|
-
kind: 'compound';
|
166
|
-
root: string;
|
167
|
-
modifier: ArbitraryModifier | NamedModifier | null;
|
168
|
-
variant: Variant;
|
169
|
-
compounds: boolean;
|
170
|
-
};
|
171
|
-
type Candidate =
|
172
|
-
/**
|
173
|
-
* Arbitrary candidates are candidates that register utilities on the fly with
|
174
|
-
* a property and a value.
|
175
|
-
*
|
176
|
-
* E.g.:
|
177
|
-
*
|
178
|
-
* - `[color:red]`
|
179
|
-
* - `[color:red]/50`
|
180
|
-
* - `[color:red]/50!`
|
181
|
-
*/
|
182
|
-
{
|
183
|
-
kind: 'arbitrary';
|
184
|
-
property: string;
|
185
|
-
value: string;
|
186
|
-
modifier: ArbitraryModifier | NamedModifier | null;
|
187
|
-
variants: Variant[];
|
188
|
-
important: boolean;
|
189
|
-
}
|
190
|
-
/**
|
191
|
-
* Static candidates are candidates that don't take any arguments.
|
192
|
-
*
|
193
|
-
* E.g.:
|
194
|
-
*
|
195
|
-
* - `underline`
|
196
|
-
* - `flex`
|
197
|
-
*/
|
198
|
-
| {
|
199
|
-
kind: 'static';
|
200
|
-
root: string;
|
201
|
-
variants: Variant[];
|
202
|
-
negative: boolean;
|
203
|
-
important: boolean;
|
204
|
-
}
|
205
|
-
/**
|
206
|
-
* Functional candidates are candidates that can take an argument.
|
207
|
-
*
|
208
|
-
* E.g.:
|
209
|
-
*
|
210
|
-
* - `bg-red-500`
|
211
|
-
* - `bg-[#0088cc]`
|
212
|
-
* - `w-1/2`
|
213
|
-
*/
|
214
|
-
| {
|
215
|
-
kind: 'functional';
|
216
|
-
root: string;
|
217
|
-
value: ArbitraryUtilityValue | NamedUtilityValue | null;
|
218
|
-
modifier: ArbitraryModifier | NamedModifier | null;
|
219
|
-
variants: Variant[];
|
220
|
-
negative: boolean;
|
221
|
-
important: boolean;
|
222
|
-
};
|
223
|
-
|
224
|
-
type CompileFn<T extends Candidate['kind']> = (value: Extract<Candidate, {
|
225
|
-
kind: T;
|
226
|
-
}>) => AstNode[] | undefined;
|
227
|
-
interface SuggestionGroup {
|
228
|
-
supportsNegative?: boolean;
|
229
|
-
values: (string | null)[];
|
230
|
-
modifiers: string[];
|
231
|
-
}
|
232
|
-
declare class Utilities {
|
233
|
-
private utilities;
|
234
|
-
private completions;
|
235
|
-
static(name: string, compileFn: CompileFn<'static'>): void;
|
236
|
-
functional(name: string, compileFn: CompileFn<'functional'>): void;
|
237
|
-
arbitrary(compileFn: CompileFn<'arbitrary'>): void;
|
238
|
-
has(name: string): boolean;
|
239
|
-
get(name: string | symbol): {
|
240
|
-
kind: "arbitrary" | "static" | "functional";
|
241
|
-
compileFn: CompileFn<any>;
|
242
|
-
} | undefined;
|
243
|
-
kind(name: string): "arbitrary" | "static" | "functional";
|
244
|
-
getCompletions(name: string): SuggestionGroup[];
|
245
|
-
suggest(name: string, groups: () => SuggestionGroup[]): void;
|
246
|
-
keys(): IterableIterator<string | symbol>;
|
247
|
-
entries(): IterableIterator<[string | symbol, {
|
248
|
-
kind: "arbitrary" | "static" | "functional";
|
249
|
-
compileFn: CompileFn<any>;
|
250
|
-
}]>;
|
251
|
-
getArbitrary(): CompileFn<any>;
|
252
|
-
private set;
|
253
|
-
}
|
254
|
-
|
255
|
-
type VariantFn<T extends Variant['kind']> = (rule: Rule, variant: Extract<Variant, {
|
256
|
-
kind: T;
|
257
|
-
}>) => null | void;
|
258
|
-
type CompareFn = (a: Variant, z: Variant) => number;
|
259
|
-
declare class Variants {
|
260
|
-
private compareFns;
|
261
|
-
private variants;
|
262
|
-
private completions;
|
263
|
-
/**
|
264
|
-
* Registering a group of variants should result in the same sort number for
|
265
|
-
* all the variants. This is to ensure that the variants are applied in the
|
266
|
-
* correct order.
|
267
|
-
*/
|
268
|
-
private groupOrder;
|
269
|
-
/**
|
270
|
-
* Keep track of the last sort order instead of using the size of the map to
|
271
|
-
* avoid unnecessarily skipping order numbers.
|
272
|
-
*/
|
273
|
-
private lastOrder;
|
274
|
-
static(name: string, applyFn: VariantFn<'static'>, { compounds }?: {
|
275
|
-
compounds?: boolean;
|
276
|
-
}): void;
|
277
|
-
functional(name: string, applyFn: VariantFn<'functional'>, { compounds }?: {
|
278
|
-
compounds?: boolean;
|
279
|
-
}): void;
|
280
|
-
compound(name: string, applyFn: VariantFn<'compound'>, { compounds }?: {
|
281
|
-
compounds?: boolean;
|
282
|
-
}): void;
|
283
|
-
group(fn: () => void, compareFn?: CompareFn): void;
|
284
|
-
has(name: string): boolean;
|
285
|
-
get(name: string): {
|
286
|
-
kind: "arbitrary" | "static" | "functional" | "compound";
|
287
|
-
order: number;
|
288
|
-
applyFn: VariantFn<any>;
|
289
|
-
compounds: boolean;
|
290
|
-
} | undefined;
|
291
|
-
kind(name: string): "arbitrary" | "static" | "functional" | "compound";
|
292
|
-
compounds(name: string): boolean;
|
293
|
-
suggest(name: string, suggestions: () => string[]): void;
|
294
|
-
getCompletions(name: string): string[];
|
295
|
-
compare(a: Variant | null, z: Variant | null): number;
|
296
|
-
keys(): IterableIterator<string>;
|
297
|
-
entries(): IterableIterator<[string, {
|
298
|
-
kind: "arbitrary" | "static" | "functional" | "compound";
|
299
|
-
order: number;
|
300
|
-
applyFn: VariantFn<any>;
|
301
|
-
compounds: boolean;
|
302
|
-
}]>;
|
303
|
-
private set;
|
304
|
-
private nextOrder;
|
305
|
-
}
|
306
|
-
|
307
|
-
type DesignSystem = {
|
308
|
-
theme: Theme;
|
309
|
-
utilities: Utilities;
|
310
|
-
variants: Variants;
|
311
|
-
candidatesToCss(classes: string[]): (string | null)[];
|
312
|
-
getClassOrder(classes: string[]): [string, bigint | null][];
|
313
|
-
getClassList(): ClassEntry[];
|
314
|
-
getVariants(): VariantEntry[];
|
315
|
-
};
|
316
|
-
|
317
|
-
declare function compile(css: string, rawCandidates: string[]): string;
|
318
|
-
declare function optimizeCss(input: string, { file, minify }?: {
|
319
|
-
file?: string;
|
320
|
-
minify?: boolean;
|
321
|
-
}): string;
|
322
|
-
declare function __unstable__loadDesignSystem(css: string): DesignSystem;
|
323
|
-
|
324
|
-
export { __unstable__loadDesignSystem, compile, optimizeCss };
|
3
|
+
export { postcssPluginWarning as default };
|