tailwindcss 0.0.0-insiders.ea80db2 → 0.0.0-insiders.ea90d3a
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 +13 -10
- package/defaultTheme.d.ts +2 -1
- package/lib/cli/build/deps.js +62 -0
- package/lib/cli/build/index.js +54 -0
- package/lib/cli/build/plugin.js +371 -0
- package/lib/cli/build/utils.js +88 -0
- package/lib/cli/build/watching.js +182 -0
- package/lib/cli/help/index.js +73 -0
- package/lib/cli/index.js +230 -0
- package/lib/cli/init/index.js +63 -0
- package/lib/cli-peer-dependencies.js +28 -7
- package/lib/cli.js +1 -759
- package/lib/corePluginList.js +16 -4
- package/lib/corePlugins.js +2421 -1738
- package/lib/css/preflight.css +31 -12
- package/lib/featureFlags.js +45 -25
- package/lib/index.js +1 -40
- package/lib/lib/cacheInvalidation.js +48 -25
- package/lib/lib/collapseAdjacentRules.js +17 -10
- package/lib/lib/collapseDuplicateDeclarations.js +13 -8
- package/lib/lib/content.js +214 -0
- package/lib/lib/defaultExtractor.js +240 -33
- package/lib/lib/detectNesting.js +21 -10
- package/lib/lib/evaluateTailwindFunctions.js +117 -50
- package/lib/lib/expandApplyAtRules.js +322 -215
- package/lib/lib/expandTailwindAtRules.js +132 -115
- package/lib/lib/findAtConfigPath.js +46 -0
- package/lib/lib/generateRules.js +466 -208
- package/lib/lib/getModuleDependencies.js +88 -37
- package/lib/lib/load-config.js +57 -0
- package/lib/lib/normalizeTailwindDirectives.js +38 -33
- package/lib/lib/offsets.js +355 -0
- package/lib/lib/partitionApplyAtRules.js +13 -8
- package/lib/lib/regex.js +74 -0
- package/lib/lib/remap-bitfield.js +89 -0
- package/lib/lib/resolveDefaultsAtRules.js +98 -74
- package/lib/lib/setupContextUtils.js +744 -319
- package/lib/lib/setupTrackingContext.js +63 -68
- package/lib/lib/sharedState.js +44 -17
- package/lib/lib/substituteScreenAtRules.js +14 -10
- package/lib/plugin.js +48 -0
- package/lib/postcss-plugins/nesting/README.md +2 -2
- package/lib/postcss-plugins/nesting/index.js +10 -6
- package/lib/postcss-plugins/nesting/plugin.js +24 -20
- package/lib/processTailwindFeatures.js +35 -30
- package/lib/public/colors.js +272 -246
- package/lib/public/create-plugin.js +9 -5
- package/lib/public/default-config.js +10 -6
- package/lib/public/default-theme.js +10 -6
- package/lib/public/load-config.js +12 -0
- package/lib/public/resolve-config.js +11 -6
- package/lib/util/applyImportantSelector.js +36 -0
- package/lib/util/bigSign.js +6 -1
- package/lib/util/buildMediaQuery.js +13 -6
- package/lib/util/cloneDeep.js +9 -6
- package/lib/util/cloneNodes.js +39 -10
- package/lib/util/color.js +67 -51
- package/lib/util/colorNames.js +752 -0
- package/lib/util/configurePlugins.js +7 -2
- package/lib/util/createPlugin.js +8 -5
- package/lib/util/createUtilityPlugin.js +13 -9
- package/lib/util/dataTypes.js +295 -113
- package/lib/util/defaults.js +12 -7
- package/lib/util/escapeClassName.js +13 -8
- package/lib/util/escapeCommas.js +7 -2
- package/lib/util/flattenColorPalette.js +11 -10
- package/lib/util/formatVariantSelector.js +235 -151
- package/lib/util/getAllConfigs.js +33 -12
- package/lib/util/hashConfig.js +9 -4
- package/lib/util/isKeyframeRule.js +7 -2
- package/lib/util/isPlainObject.js +8 -3
- package/lib/util/{isValidArbitraryValue.js → isSyntacticallyValidPropertyValue.js} +25 -15
- package/lib/util/log.js +23 -13
- package/lib/util/nameClass.js +27 -10
- package/lib/util/negateValue.js +25 -8
- package/lib/util/normalizeConfig.js +124 -82
- package/lib/util/normalizeScreens.js +127 -8
- package/lib/util/parseAnimationValue.js +44 -40
- package/lib/util/parseBoxShadowValue.js +33 -62
- package/lib/util/parseDependency.js +39 -55
- package/lib/util/parseGlob.js +36 -0
- package/lib/util/parseObjectStyles.js +15 -10
- package/lib/util/pluginUtils.js +169 -59
- package/lib/util/prefixSelector.js +29 -10
- package/lib/util/pseudoElements.js +212 -0
- package/lib/util/removeAlphaVariables.js +31 -0
- package/lib/util/resolveConfig.js +96 -95
- package/lib/util/resolveConfigPath.js +29 -10
- package/lib/util/responsive.js +11 -6
- package/lib/util/splitAtTopLevelOnly.js +51 -0
- package/lib/util/tap.js +6 -1
- package/lib/util/toColorValue.js +7 -2
- package/lib/util/toPath.js +22 -4
- package/lib/util/transformThemeValue.js +40 -26
- package/lib/util/validateConfig.js +37 -0
- package/lib/util/validateFormalSyntax.js +26 -0
- package/lib/util/withAlphaVariable.js +27 -15
- package/lib/value-parser/LICENSE +22 -0
- package/lib/value-parser/README.md +3 -0
- package/lib/value-parser/index.d.js +2 -0
- package/lib/value-parser/index.js +22 -0
- package/lib/value-parser/parse.js +259 -0
- package/lib/value-parser/stringify.js +38 -0
- package/lib/value-parser/unit.js +86 -0
- package/lib/value-parser/walk.js +16 -0
- package/loadConfig.d.ts +4 -0
- package/loadConfig.js +2 -0
- package/nesting/index.d.ts +4 -0
- package/package.json +50 -43
- package/peers/index.js +72234 -50887
- package/plugin.d.ts +10 -5
- package/resolveConfig.d.ts +31 -0
- package/scripts/generate-types.js +52 -0
- package/scripts/release-channel.js +18 -0
- package/scripts/release-notes.js +21 -0
- package/scripts/type-utils.js +27 -0
- package/src/cli/build/deps.js +56 -0
- package/src/cli/build/index.js +49 -0
- package/src/cli/build/plugin.js +437 -0
- package/src/cli/build/utils.js +76 -0
- package/src/cli/build/watching.js +229 -0
- package/src/cli/help/index.js +70 -0
- package/src/cli/index.js +216 -0
- package/src/cli/init/index.js +79 -0
- package/src/cli-peer-dependencies.js +7 -1
- package/src/cli.js +1 -836
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +665 -107
- package/src/css/preflight.css +31 -12
- package/src/featureFlags.js +10 -2
- package/src/index.js +1 -42
- package/src/lib/collapseAdjacentRules.js +5 -1
- package/src/lib/content.js +249 -0
- package/src/lib/defaultExtractor.js +215 -35
- package/src/lib/detectNesting.js +9 -1
- package/src/lib/evaluateTailwindFunctions.js +82 -8
- package/src/lib/expandApplyAtRules.js +329 -189
- package/src/lib/expandTailwindAtRules.js +46 -56
- package/src/lib/findAtConfigPath.js +48 -0
- package/src/lib/generateRules.js +439 -130
- package/src/lib/getModuleDependencies.js +70 -30
- package/src/lib/load-config.ts +44 -0
- package/src/lib/offsets.js +432 -0
- package/src/lib/regex.js +74 -0
- package/src/lib/remap-bitfield.js +82 -0
- package/src/lib/resolveDefaultsAtRules.js +57 -36
- package/src/lib/setupContextUtils.js +654 -182
- package/src/lib/setupTrackingContext.js +44 -58
- package/src/lib/sharedState.js +13 -4
- package/src/plugin.js +47 -0
- package/src/postcss-plugins/nesting/README.md +2 -2
- package/src/processTailwindFeatures.js +3 -2
- package/src/public/colors.js +22 -0
- package/src/public/default-config.js +1 -1
- package/src/public/default-theme.js +2 -2
- package/src/public/load-config.js +2 -0
- package/src/util/applyImportantSelector.js +27 -0
- package/src/util/buildMediaQuery.js +5 -3
- package/src/util/cloneNodes.js +35 -10
- package/src/util/color.js +35 -18
- package/src/util/colorNames.js +150 -0
- package/src/util/dataTypes.js +183 -25
- package/src/util/formatVariantSelector.js +272 -144
- package/src/util/getAllConfigs.js +21 -2
- package/src/util/isPlainObject.js +1 -1
- package/src/util/{isValidArbitraryValue.js → isSyntacticallyValidPropertyValue.js} +1 -1
- package/src/util/log.js +1 -1
- package/src/util/nameClass.js +4 -0
- package/src/util/negateValue.js +11 -3
- package/src/util/normalizeConfig.js +41 -10
- package/src/util/normalizeScreens.js +99 -4
- package/src/util/parseBoxShadowValue.js +3 -50
- package/src/util/parseDependency.js +37 -42
- package/src/util/parseGlob.js +24 -0
- package/src/util/pluginUtils.js +139 -24
- package/src/util/prefixSelector.js +29 -10
- package/src/util/pseudoElements.js +171 -0
- package/src/util/removeAlphaVariables.js +24 -0
- package/src/util/resolveConfig.js +70 -62
- package/src/util/resolveConfigPath.js +12 -1
- package/src/util/splitAtTopLevelOnly.js +52 -0
- package/src/util/toPath.js +1 -1
- package/src/util/transformThemeValue.js +13 -3
- package/src/util/validateConfig.js +26 -0
- package/src/util/validateFormalSyntax.js +34 -0
- package/src/util/withAlphaVariable.js +1 -1
- package/src/value-parser/LICENSE +22 -0
- package/src/value-parser/README.md +3 -0
- package/src/value-parser/index.d.ts +177 -0
- package/src/value-parser/index.js +28 -0
- package/src/value-parser/parse.js +303 -0
- package/src/value-parser/stringify.js +41 -0
- package/src/value-parser/unit.js +118 -0
- package/src/value-parser/walk.js +18 -0
- package/stubs/.gitignore +1 -0
- package/stubs/.prettierrc.json +6 -0
- package/stubs/{defaultConfig.stub.js → config.full.js} +287 -178
- package/stubs/postcss.config.js +6 -0
- package/stubs/tailwind.config.cjs +2 -0
- package/stubs/tailwind.config.js +2 -0
- package/stubs/tailwind.config.ts +3 -0
- package/types/config.d.ts +113 -60
- package/types/generated/colors.d.ts +22 -0
- package/types/generated/corePluginList.d.ts +1 -1
- package/types/generated/default-theme.d.ts +397 -0
- package/types/index.d.ts +11 -1
- package/CHANGELOG.md +0 -2099
- package/lib/constants.js +0 -37
- package/scripts/install-integrations.js +0 -27
- package/scripts/rebuildFixtures.js +0 -68
- package/src/constants.js +0 -17
- package/types.d.ts +0 -1
- /package/stubs/{simpleConfig.stub.js → config.simple.js} +0 -0
- /package/stubs/{defaultPostCssConfig.stub.js → postcss.config.cjs} +0 -0
package/types/config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CorePluginList } from './generated/
|
|
1
|
+
import type { CorePluginList } from './generated/corePluginList'
|
|
2
2
|
import type { DefaultColors } from './generated/colors'
|
|
3
3
|
|
|
4
4
|
// Helpers
|
|
@@ -11,11 +11,12 @@ type KeyValuePair<K extends keyof any = string, V = string> = Record<K, V>
|
|
|
11
11
|
interface RecursiveKeyValuePair<K extends keyof any = string, V = string> {
|
|
12
12
|
[key: string]: V | RecursiveKeyValuePair<K, V>
|
|
13
13
|
}
|
|
14
|
-
type ResolvableTo<T> = T | ((utils: PluginUtils) => T)
|
|
14
|
+
export type ResolvableTo<T> = T | ((utils: PluginUtils) => T)
|
|
15
|
+
type CSSRuleObject = RecursiveKeyValuePair<string, null | string | string[]>
|
|
15
16
|
|
|
16
17
|
interface PluginUtils {
|
|
17
18
|
colors: DefaultColors
|
|
18
|
-
theme(path: string, defaultValue
|
|
19
|
+
theme(path: string, defaultValue?: unknown): any
|
|
19
20
|
breakpoints<I = Record<string, unknown>, O = I>(arg: I): O
|
|
20
21
|
rgb(arg: string): (arg: Partial<{ opacityVariable: string; opacityValue: number }>) => string
|
|
21
22
|
hsl(arg: string): (arg: Partial<{ opacityVariable: string; opacityValue: number }>) => string
|
|
@@ -30,6 +31,7 @@ type ContentConfig =
|
|
|
30
31
|
| (FilePath | RawFile)[]
|
|
31
32
|
| {
|
|
32
33
|
files: (FilePath | RawFile)[]
|
|
34
|
+
relative?: boolean
|
|
33
35
|
extract?: ExtractorFn | { [extension: string]: ExtractorFn }
|
|
34
36
|
transform?: TransformerFn | { [extension: string]: TransformerFn }
|
|
35
37
|
}
|
|
@@ -44,59 +46,66 @@ type PrefixConfig = string
|
|
|
44
46
|
type SeparatorConfig = string
|
|
45
47
|
|
|
46
48
|
// Safelist related config
|
|
47
|
-
type SafelistConfig =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
variants: string[]
|
|
52
|
-
}[]
|
|
49
|
+
type SafelistConfig = string | { pattern: RegExp; variants?: string[] }
|
|
50
|
+
|
|
51
|
+
// Blocklist related config
|
|
52
|
+
type BlocklistConfig = string
|
|
53
53
|
|
|
54
54
|
// Presets related config
|
|
55
|
-
type PresetsConfig = Config
|
|
55
|
+
type PresetsConfig = Partial<Config>
|
|
56
56
|
|
|
57
57
|
// Future related config
|
|
58
|
-
type FutureConfigValues =
|
|
58
|
+
type FutureConfigValues =
|
|
59
|
+
| 'hoverOnlyWhenSupported'
|
|
60
|
+
| 'respectDefaultRingColorOpacity'
|
|
61
|
+
| 'disableColorOpacityUtilitiesByDefault'
|
|
62
|
+
| 'relativeContentPathsByDefault'
|
|
59
63
|
type FutureConfig = Expand<'all' | Partial<Record<FutureConfigValues, boolean>>> | []
|
|
60
64
|
|
|
61
65
|
// Experimental related config
|
|
62
|
-
type ExperimentalConfigValues = 'optimizeUniversalDefaults'
|
|
66
|
+
type ExperimentalConfigValues = 'optimizeUniversalDefaults' | 'matchVariant'
|
|
63
67
|
type ExperimentalConfig = Expand<'all' | Partial<Record<ExperimentalConfigValues, boolean>>> | []
|
|
64
68
|
|
|
65
69
|
// DarkMode related config
|
|
66
70
|
type DarkModeConfig =
|
|
67
|
-
|
|
71
|
+
// Use the `media` query strategy.
|
|
68
72
|
| 'media'
|
|
69
|
-
|
|
73
|
+
// Use the `class` strategy, which requires a `.dark` class on the `html`.
|
|
70
74
|
| 'class'
|
|
71
|
-
|
|
75
|
+
// Use the `class` strategy with a custom class instead of `.dark`.
|
|
72
76
|
| ['class', string]
|
|
77
|
+
// Use the `selector` strategy — same as `class` but uses `:where()` for more predicable behavior
|
|
78
|
+
| 'selector'
|
|
79
|
+
// Use the `selector` strategy with a custom selector instead of `.dark`.
|
|
80
|
+
| ['selector', string]
|
|
81
|
+
// Use the `variant` strategy, which allows you to completely customize the selector
|
|
82
|
+
// It takes a string or an array of strings, which are passed directly to `addVariant()`
|
|
83
|
+
| ['variant', string | string[]]
|
|
73
84
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
extend: Partial<Omit<ThemeConfig, 'extend'>>
|
|
85
|
+
type Screen = { raw: string } | { min: string } | { max: string } | { min: string; max: string }
|
|
86
|
+
type ScreensConfig = string[] | KeyValuePair<string, string | Screen | Screen[]>
|
|
77
87
|
|
|
78
|
-
|
|
79
|
-
|
|
88
|
+
// Theme related config
|
|
89
|
+
export interface ThemeConfig {
|
|
90
|
+
// Responsiveness
|
|
91
|
+
screens: ResolvableTo<ScreensConfig>
|
|
92
|
+
supports: ResolvableTo<Record<string, string>>
|
|
93
|
+
data: ResolvableTo<Record<string, string>>
|
|
80
94
|
|
|
81
|
-
|
|
95
|
+
// Reusable base configs
|
|
82
96
|
colors: ResolvableTo<RecursiveKeyValuePair>
|
|
83
97
|
spacing: ResolvableTo<KeyValuePair>
|
|
84
98
|
|
|
85
|
-
|
|
99
|
+
// Components
|
|
86
100
|
container: ResolvableTo<
|
|
87
101
|
Partial<{
|
|
88
|
-
screens:
|
|
89
|
-
| string[] /** List of breakpoints. E.g.: '400px', '500px' */
|
|
90
|
-
/** Named breakpoints. E.g.: { sm: '400px' } */
|
|
91
|
-
| Record<string | number, string>
|
|
92
|
-
/** Name breakpoints with explicit min and max values. E.g.: { sm: { min: '300px', max: '400px' } } */
|
|
93
|
-
| Record<string, { min: string; max: string }>
|
|
102
|
+
screens: ScreensConfig
|
|
94
103
|
center: boolean
|
|
95
104
|
padding: string | Record<string, string>
|
|
96
105
|
}>
|
|
97
106
|
>
|
|
98
107
|
|
|
99
|
-
|
|
108
|
+
// Utilities
|
|
100
109
|
inset: ThemeConfig['spacing']
|
|
101
110
|
zIndex: ResolvableTo<KeyValuePair>
|
|
102
111
|
order: ResolvableTo<KeyValuePair>
|
|
@@ -156,20 +165,34 @@ interface ThemeConfig {
|
|
|
156
165
|
objectPosition: ResolvableTo<KeyValuePair>
|
|
157
166
|
padding: ThemeConfig['spacing']
|
|
158
167
|
textIndent: ThemeConfig['spacing']
|
|
159
|
-
fontFamily: ResolvableTo<
|
|
168
|
+
fontFamily: ResolvableTo<
|
|
169
|
+
KeyValuePair<
|
|
170
|
+
string,
|
|
171
|
+
| string
|
|
172
|
+
| string[]
|
|
173
|
+
| [
|
|
174
|
+
fontFamily: string | string[],
|
|
175
|
+
configuration: Partial<{
|
|
176
|
+
fontFeatureSettings: string
|
|
177
|
+
fontVariationSettings: string
|
|
178
|
+
}>
|
|
179
|
+
]
|
|
180
|
+
>
|
|
181
|
+
>
|
|
160
182
|
fontSize: ResolvableTo<
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
183
|
+
KeyValuePair<
|
|
184
|
+
string,
|
|
185
|
+
| string
|
|
186
|
+
| [fontSize: string, lineHeight: string]
|
|
187
|
+
| [
|
|
166
188
|
fontSize: string,
|
|
167
189
|
configuration: Partial<{
|
|
168
190
|
lineHeight: string
|
|
169
191
|
letterSpacing: string
|
|
192
|
+
fontWeight: string | number
|
|
170
193
|
}>
|
|
171
194
|
]
|
|
172
|
-
|
|
195
|
+
>
|
|
173
196
|
>
|
|
174
197
|
fontWeight: ResolvableTo<KeyValuePair>
|
|
175
198
|
lineHeight: ResolvableTo<KeyValuePair>
|
|
@@ -197,7 +220,7 @@ interface ThemeConfig {
|
|
|
197
220
|
blur: ResolvableTo<KeyValuePair>
|
|
198
221
|
brightness: ResolvableTo<KeyValuePair>
|
|
199
222
|
contrast: ResolvableTo<KeyValuePair>
|
|
200
|
-
dropShadow: ResolvableTo<KeyValuePair
|
|
223
|
+
dropShadow: ResolvableTo<KeyValuePair<string, string | string[]>>
|
|
201
224
|
grayscale: ResolvableTo<KeyValuePair>
|
|
202
225
|
hueRotate: ResolvableTo<KeyValuePair>
|
|
203
226
|
invert: ResolvableTo<KeyValuePair>
|
|
@@ -220,6 +243,10 @@ interface ThemeConfig {
|
|
|
220
243
|
content: ResolvableTo<KeyValuePair>
|
|
221
244
|
}
|
|
222
245
|
|
|
246
|
+
interface CustomThemeConfig extends ThemeConfig {
|
|
247
|
+
[key: string]: any
|
|
248
|
+
}
|
|
249
|
+
|
|
223
250
|
// Core plugins related config
|
|
224
251
|
type CorePluginsConfig = CorePluginList[] | Expand<Partial<Record<CorePluginList, boolean>>>
|
|
225
252
|
|
|
@@ -241,62 +268,88 @@ type ValueType =
|
|
|
241
268
|
| 'relative-size'
|
|
242
269
|
| 'shadow'
|
|
243
270
|
export interface PluginAPI {
|
|
244
|
-
|
|
271
|
+
// for registering new static utility styles
|
|
245
272
|
addUtilities(
|
|
246
|
-
utilities:
|
|
273
|
+
utilities: CSSRuleObject | CSSRuleObject[],
|
|
247
274
|
options?: Partial<{
|
|
248
275
|
respectPrefix: boolean
|
|
249
276
|
respectImportant: boolean
|
|
250
277
|
}>
|
|
251
278
|
): void
|
|
252
|
-
|
|
253
|
-
matchUtilities<T>(
|
|
254
|
-
utilities: KeyValuePair<
|
|
279
|
+
// for registering new dynamic utility styles
|
|
280
|
+
matchUtilities<T = string, U = string>(
|
|
281
|
+
utilities: KeyValuePair<
|
|
282
|
+
string,
|
|
283
|
+
(value: T | string, extra: { modifier: U | string | null }) => CSSRuleObject | null
|
|
284
|
+
>,
|
|
255
285
|
options?: Partial<{
|
|
256
286
|
respectPrefix: boolean
|
|
257
287
|
respectImportant: boolean
|
|
258
288
|
type: ValueType | ValueType[]
|
|
259
289
|
values: KeyValuePair<string, T>
|
|
290
|
+
modifiers: 'any' | KeyValuePair<string, U>
|
|
260
291
|
supportsNegativeValues: boolean
|
|
261
292
|
}>
|
|
262
293
|
): void
|
|
263
|
-
|
|
294
|
+
// for registering new static component styles
|
|
264
295
|
addComponents(
|
|
265
|
-
components:
|
|
296
|
+
components: CSSRuleObject | CSSRuleObject[],
|
|
266
297
|
options?: Partial<{
|
|
267
298
|
respectPrefix: boolean
|
|
268
299
|
respectImportant: boolean
|
|
269
300
|
}>
|
|
270
301
|
): void
|
|
271
|
-
|
|
272
|
-
matchComponents<T>(
|
|
273
|
-
components: KeyValuePair<
|
|
302
|
+
// for registering new dynamic component styles
|
|
303
|
+
matchComponents<T = string, U = string>(
|
|
304
|
+
components: KeyValuePair<
|
|
305
|
+
string,
|
|
306
|
+
(value: T | string, extra: { modifier: U | string | null }) => CSSRuleObject | null
|
|
307
|
+
>,
|
|
274
308
|
options?: Partial<{
|
|
275
309
|
respectPrefix: boolean
|
|
276
310
|
respectImportant: boolean
|
|
277
311
|
type: ValueType | ValueType[]
|
|
278
312
|
values: KeyValuePair<string, T>
|
|
313
|
+
modifiers: 'any' | KeyValuePair<string, U>
|
|
279
314
|
supportsNegativeValues: boolean
|
|
280
315
|
}>
|
|
281
316
|
): void
|
|
282
|
-
|
|
283
|
-
addBase(base:
|
|
284
|
-
|
|
317
|
+
// for registering new base styles
|
|
318
|
+
addBase(base: CSSRuleObject | CSSRuleObject[]): void
|
|
319
|
+
// for registering custom variants
|
|
285
320
|
addVariant(name: string, definition: string | string[] | (() => string) | (() => string)[]): void
|
|
286
|
-
|
|
321
|
+
matchVariant<T = string>(
|
|
322
|
+
name: string,
|
|
323
|
+
cb: (value: T | string, extra: { modifier: string | null }) => string | string[],
|
|
324
|
+
options?: {
|
|
325
|
+
values?: KeyValuePair<string, T>
|
|
326
|
+
sort?(
|
|
327
|
+
a: { value: T | string; modifier: string | null },
|
|
328
|
+
b: { value: T | string; modifier: string | null }
|
|
329
|
+
): number
|
|
330
|
+
}
|
|
331
|
+
): void
|
|
332
|
+
// for looking up values in the user’s theme configuration
|
|
287
333
|
theme: <TDefaultValue = Config['theme']>(
|
|
288
334
|
path?: string,
|
|
289
335
|
defaultValue?: TDefaultValue
|
|
290
336
|
) => TDefaultValue
|
|
291
|
-
|
|
337
|
+
// for looking up values in the user’s Tailwind configuration
|
|
292
338
|
config: <TDefaultValue = Config>(path?: string, defaultValue?: TDefaultValue) => TDefaultValue
|
|
293
|
-
|
|
339
|
+
// for checking if a core plugin is enabled
|
|
294
340
|
corePlugins(path: string): boolean
|
|
295
|
-
|
|
341
|
+
// for manually escaping strings meant to be used in class names
|
|
296
342
|
e: (className: string) => string
|
|
297
343
|
}
|
|
298
344
|
export type PluginCreator = (api: PluginAPI) => void
|
|
299
|
-
export type PluginsConfig = (
|
|
345
|
+
export type PluginsConfig = (
|
|
346
|
+
| PluginCreator
|
|
347
|
+
| { handler: PluginCreator; config?: Partial<Config> }
|
|
348
|
+
| {
|
|
349
|
+
(options: any): { handler: PluginCreator; config?: Partial<Config> }
|
|
350
|
+
__isOptionsFunction: true
|
|
351
|
+
}
|
|
352
|
+
)[]
|
|
300
353
|
|
|
301
354
|
// Top level config related
|
|
302
355
|
interface RequiredConfig {
|
|
@@ -307,17 +360,17 @@ interface OptionalConfig {
|
|
|
307
360
|
important: Partial<ImportantConfig>
|
|
308
361
|
prefix: Partial<PrefixConfig>
|
|
309
362
|
separator: Partial<SeparatorConfig>
|
|
310
|
-
safelist:
|
|
311
|
-
|
|
363
|
+
safelist: Array<SafelistConfig>
|
|
364
|
+
blocklist: Array<BlocklistConfig>
|
|
365
|
+
presets: Array<PresetsConfig>
|
|
312
366
|
future: Partial<FutureConfig>
|
|
313
367
|
experimental: Partial<ExperimentalConfig>
|
|
314
368
|
darkMode: Partial<DarkModeConfig>
|
|
315
|
-
theme: Partial<
|
|
369
|
+
theme: Partial<CustomThemeConfig & { extend: Partial<CustomThemeConfig> }>
|
|
316
370
|
corePlugins: Partial<CorePluginsConfig>
|
|
317
371
|
plugins: Partial<PluginsConfig>
|
|
318
|
-
|
|
372
|
+
// Custom
|
|
319
373
|
[key: string]: any
|
|
320
374
|
}
|
|
321
375
|
|
|
322
376
|
export type Config = RequiredConfig & Partial<OptionalConfig>
|
|
323
|
-
|
|
@@ -15,6 +15,7 @@ export interface DefaultColors {
|
|
|
15
15
|
'700': '#334155'
|
|
16
16
|
'800': '#1e293b'
|
|
17
17
|
'900': '#0f172a'
|
|
18
|
+
'950': '#020617'
|
|
18
19
|
}
|
|
19
20
|
gray: {
|
|
20
21
|
'50': '#f9fafb'
|
|
@@ -27,6 +28,7 @@ export interface DefaultColors {
|
|
|
27
28
|
'700': '#374151'
|
|
28
29
|
'800': '#1f2937'
|
|
29
30
|
'900': '#111827'
|
|
31
|
+
'950': '#030712'
|
|
30
32
|
}
|
|
31
33
|
zinc: {
|
|
32
34
|
'50': '#fafafa'
|
|
@@ -39,6 +41,7 @@ export interface DefaultColors {
|
|
|
39
41
|
'700': '#3f3f46'
|
|
40
42
|
'800': '#27272a'
|
|
41
43
|
'900': '#18181b'
|
|
44
|
+
'950': '#09090b'
|
|
42
45
|
}
|
|
43
46
|
neutral: {
|
|
44
47
|
'50': '#fafafa'
|
|
@@ -51,6 +54,7 @@ export interface DefaultColors {
|
|
|
51
54
|
'700': '#404040'
|
|
52
55
|
'800': '#262626'
|
|
53
56
|
'900': '#171717'
|
|
57
|
+
'950': '#0a0a0a'
|
|
54
58
|
}
|
|
55
59
|
stone: {
|
|
56
60
|
'50': '#fafaf9'
|
|
@@ -63,6 +67,7 @@ export interface DefaultColors {
|
|
|
63
67
|
'700': '#44403c'
|
|
64
68
|
'800': '#292524'
|
|
65
69
|
'900': '#1c1917'
|
|
70
|
+
'950': '#0c0a09'
|
|
66
71
|
}
|
|
67
72
|
red: {
|
|
68
73
|
'50': '#fef2f2'
|
|
@@ -75,6 +80,7 @@ export interface DefaultColors {
|
|
|
75
80
|
'700': '#b91c1c'
|
|
76
81
|
'800': '#991b1b'
|
|
77
82
|
'900': '#7f1d1d'
|
|
83
|
+
'950': '#450a0a'
|
|
78
84
|
}
|
|
79
85
|
orange: {
|
|
80
86
|
'50': '#fff7ed'
|
|
@@ -87,6 +93,7 @@ export interface DefaultColors {
|
|
|
87
93
|
'700': '#c2410c'
|
|
88
94
|
'800': '#9a3412'
|
|
89
95
|
'900': '#7c2d12'
|
|
96
|
+
'950': '#431407'
|
|
90
97
|
}
|
|
91
98
|
amber: {
|
|
92
99
|
'50': '#fffbeb'
|
|
@@ -99,6 +106,7 @@ export interface DefaultColors {
|
|
|
99
106
|
'700': '#b45309'
|
|
100
107
|
'800': '#92400e'
|
|
101
108
|
'900': '#78350f'
|
|
109
|
+
'950': '#451a03'
|
|
102
110
|
}
|
|
103
111
|
yellow: {
|
|
104
112
|
'50': '#fefce8'
|
|
@@ -111,6 +119,7 @@ export interface DefaultColors {
|
|
|
111
119
|
'700': '#a16207'
|
|
112
120
|
'800': '#854d0e'
|
|
113
121
|
'900': '#713f12'
|
|
122
|
+
'950': '#422006'
|
|
114
123
|
}
|
|
115
124
|
lime: {
|
|
116
125
|
'50': '#f7fee7'
|
|
@@ -123,6 +132,7 @@ export interface DefaultColors {
|
|
|
123
132
|
'700': '#4d7c0f'
|
|
124
133
|
'800': '#3f6212'
|
|
125
134
|
'900': '#365314'
|
|
135
|
+
'950': '#1a2e05'
|
|
126
136
|
}
|
|
127
137
|
green: {
|
|
128
138
|
'50': '#f0fdf4'
|
|
@@ -135,6 +145,7 @@ export interface DefaultColors {
|
|
|
135
145
|
'700': '#15803d'
|
|
136
146
|
'800': '#166534'
|
|
137
147
|
'900': '#14532d'
|
|
148
|
+
'950': '#052e16'
|
|
138
149
|
}
|
|
139
150
|
emerald: {
|
|
140
151
|
'50': '#ecfdf5'
|
|
@@ -147,6 +158,7 @@ export interface DefaultColors {
|
|
|
147
158
|
'700': '#047857'
|
|
148
159
|
'800': '#065f46'
|
|
149
160
|
'900': '#064e3b'
|
|
161
|
+
'950': '#022c22'
|
|
150
162
|
}
|
|
151
163
|
teal: {
|
|
152
164
|
'50': '#f0fdfa'
|
|
@@ -159,6 +171,7 @@ export interface DefaultColors {
|
|
|
159
171
|
'700': '#0f766e'
|
|
160
172
|
'800': '#115e59'
|
|
161
173
|
'900': '#134e4a'
|
|
174
|
+
'950': '#042f2e'
|
|
162
175
|
}
|
|
163
176
|
cyan: {
|
|
164
177
|
'50': '#ecfeff'
|
|
@@ -171,6 +184,7 @@ export interface DefaultColors {
|
|
|
171
184
|
'700': '#0e7490'
|
|
172
185
|
'800': '#155e75'
|
|
173
186
|
'900': '#164e63'
|
|
187
|
+
'950': '#083344'
|
|
174
188
|
}
|
|
175
189
|
sky: {
|
|
176
190
|
'50': '#f0f9ff'
|
|
@@ -183,6 +197,7 @@ export interface DefaultColors {
|
|
|
183
197
|
'700': '#0369a1'
|
|
184
198
|
'800': '#075985'
|
|
185
199
|
'900': '#0c4a6e'
|
|
200
|
+
'950': '#082f49'
|
|
186
201
|
}
|
|
187
202
|
blue: {
|
|
188
203
|
'50': '#eff6ff'
|
|
@@ -195,6 +210,7 @@ export interface DefaultColors {
|
|
|
195
210
|
'700': '#1d4ed8'
|
|
196
211
|
'800': '#1e40af'
|
|
197
212
|
'900': '#1e3a8a'
|
|
213
|
+
'950': '#172554'
|
|
198
214
|
}
|
|
199
215
|
indigo: {
|
|
200
216
|
'50': '#eef2ff'
|
|
@@ -207,6 +223,7 @@ export interface DefaultColors {
|
|
|
207
223
|
'700': '#4338ca'
|
|
208
224
|
'800': '#3730a3'
|
|
209
225
|
'900': '#312e81'
|
|
226
|
+
'950': '#1e1b4b'
|
|
210
227
|
}
|
|
211
228
|
violet: {
|
|
212
229
|
'50': '#f5f3ff'
|
|
@@ -219,6 +236,7 @@ export interface DefaultColors {
|
|
|
219
236
|
'700': '#6d28d9'
|
|
220
237
|
'800': '#5b21b6'
|
|
221
238
|
'900': '#4c1d95'
|
|
239
|
+
'950': '#2e1065'
|
|
222
240
|
}
|
|
223
241
|
purple: {
|
|
224
242
|
'50': '#faf5ff'
|
|
@@ -231,6 +249,7 @@ export interface DefaultColors {
|
|
|
231
249
|
'700': '#7e22ce'
|
|
232
250
|
'800': '#6b21a8'
|
|
233
251
|
'900': '#581c87'
|
|
252
|
+
'950': '#3b0764'
|
|
234
253
|
}
|
|
235
254
|
fuchsia: {
|
|
236
255
|
'50': '#fdf4ff'
|
|
@@ -243,6 +262,7 @@ export interface DefaultColors {
|
|
|
243
262
|
'700': '#a21caf'
|
|
244
263
|
'800': '#86198f'
|
|
245
264
|
'900': '#701a75'
|
|
265
|
+
'950': '#4a044e'
|
|
246
266
|
}
|
|
247
267
|
pink: {
|
|
248
268
|
'50': '#fdf2f8'
|
|
@@ -255,6 +275,7 @@ export interface DefaultColors {
|
|
|
255
275
|
'700': '#be185d'
|
|
256
276
|
'800': '#9d174d'
|
|
257
277
|
'900': '#831843'
|
|
278
|
+
'950': '#500724'
|
|
258
279
|
}
|
|
259
280
|
rose: {
|
|
260
281
|
'50': '#fff1f2'
|
|
@@ -267,6 +288,7 @@ export interface DefaultColors {
|
|
|
267
288
|
'700': '#be123c'
|
|
268
289
|
'800': '#9f1239'
|
|
269
290
|
'900': '#881337'
|
|
291
|
+
'950': '#4c0519'
|
|
270
292
|
}
|
|
271
293
|
/** @deprecated As of Tailwind CSS v2.2, `lightBlue` has been renamed to `sky`. Update your configuration file to silence this warning. */ lightBlue: DefaultColors['sky']
|
|
272
294
|
/** @deprecated As of Tailwind CSS v3.0, `warmGray` has been renamed to `stone`. Update your configuration file to silence this warning. */ warmGray: DefaultColors['stone']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type CorePluginList = 'preflight' | 'container' | 'accessibility' | 'pointerEvents' | 'visibility' | 'position' | 'inset' | 'isolation' | 'zIndex' | 'order' | 'gridColumn' | 'gridColumnStart' | 'gridColumnEnd' | 'gridRow' | 'gridRowStart' | 'gridRowEnd' | 'float' | 'clear' | 'margin' | 'boxSizing' | 'display' | 'aspectRatio' | 'height' | 'maxHeight' | 'minHeight' | 'width' | 'minWidth' | 'maxWidth' | 'flex' | 'flexShrink' | 'flexGrow' | 'flexBasis' | 'tableLayout' | 'borderCollapse' | 'borderSpacing' | 'transformOrigin' | 'translate' | 'rotate' | 'skew' | 'scale' | 'transform' | 'animation' | 'cursor' | 'touchAction' | 'userSelect' | 'resize' | 'scrollSnapType' | 'scrollSnapAlign' | 'scrollSnapStop' | 'scrollMargin' | 'scrollPadding' | 'listStylePosition' | 'listStyleType' | 'appearance' | 'columns' | 'breakBefore' | 'breakInside' | 'breakAfter' | 'gridAutoColumns' | 'gridAutoFlow' | 'gridAutoRows' | 'gridTemplateColumns' | 'gridTemplateRows' | 'flexDirection' | 'flexWrap' | 'placeContent' | 'placeItems' | 'alignContent' | 'alignItems' | 'justifyContent' | 'justifyItems' | 'gap' | 'space' | 'divideWidth' | 'divideStyle' | 'divideColor' | 'divideOpacity' | 'placeSelf' | 'alignSelf' | 'justifySelf' | 'overflow' | 'overscrollBehavior' | 'scrollBehavior' | 'textOverflow' | 'whitespace' | 'wordBreak' | 'borderRadius' | 'borderWidth' | 'borderStyle' | 'borderColor' | 'borderOpacity' | 'backgroundColor' | 'backgroundOpacity' | 'backgroundImage' | 'gradientColorStops' | 'boxDecorationBreak' | 'backgroundSize' | 'backgroundAttachment' | 'backgroundClip' | 'backgroundPosition' | 'backgroundRepeat' | 'backgroundOrigin' | 'fill' | 'stroke' | 'strokeWidth' | 'objectFit' | 'objectPosition' | 'padding' | 'textAlign' | 'textIndent' | 'verticalAlign' | 'fontFamily' | 'fontSize' | 'fontWeight' | 'textTransform' | 'fontStyle' | 'fontVariantNumeric' | 'lineHeight' | 'letterSpacing' | 'textColor' | 'textOpacity' | 'textDecoration' | 'textDecorationColor' | 'textDecorationStyle' | 'textDecorationThickness' | 'textUnderlineOffset' | 'fontSmoothing' | 'placeholderColor' | 'placeholderOpacity' | 'caretColor' | 'accentColor' | 'opacity' | 'backgroundBlendMode' | 'mixBlendMode' | 'boxShadow' | 'boxShadowColor' | 'outlineStyle' | 'outlineWidth' | 'outlineOffset' | 'outlineColor' | 'ringWidth' | 'ringColor' | 'ringOpacity' | 'ringOffsetWidth' | 'ringOffsetColor' | 'blur' | 'brightness' | 'contrast' | 'dropShadow' | 'grayscale' | 'hueRotate' | 'invert' | 'saturate' | 'sepia' | 'filter' | 'backdropBlur' | 'backdropBrightness' | 'backdropContrast' | 'backdropGrayscale' | 'backdropHueRotate' | 'backdropInvert' | 'backdropOpacity' | 'backdropSaturate' | 'backdropSepia' | 'backdropFilter' | 'transitionProperty' | 'transitionDelay' | 'transitionDuration' | 'transitionTimingFunction' | 'willChange' | 'content'
|
|
1
|
+
export type CorePluginList = 'preflight' | 'container' | 'accessibility' | 'pointerEvents' | 'visibility' | 'position' | 'inset' | 'isolation' | 'zIndex' | 'order' | 'gridColumn' | 'gridColumnStart' | 'gridColumnEnd' | 'gridRow' | 'gridRowStart' | 'gridRowEnd' | 'float' | 'clear' | 'margin' | 'boxSizing' | 'lineClamp' | 'display' | 'aspectRatio' | 'size' | 'height' | 'maxHeight' | 'minHeight' | 'width' | 'minWidth' | 'maxWidth' | 'flex' | 'flexShrink' | 'flexGrow' | 'flexBasis' | 'tableLayout' | 'captionSide' | 'borderCollapse' | 'borderSpacing' | 'transformOrigin' | 'translate' | 'rotate' | 'skew' | 'scale' | 'transform' | 'animation' | 'cursor' | 'touchAction' | 'userSelect' | 'resize' | 'scrollSnapType' | 'scrollSnapAlign' | 'scrollSnapStop' | 'scrollMargin' | 'scrollPadding' | 'listStylePosition' | 'listStyleType' | 'listStyleImage' | 'appearance' | 'columns' | 'breakBefore' | 'breakInside' | 'breakAfter' | 'gridAutoColumns' | 'gridAutoFlow' | 'gridAutoRows' | 'gridTemplateColumns' | 'gridTemplateRows' | 'flexDirection' | 'flexWrap' | 'placeContent' | 'placeItems' | 'alignContent' | 'alignItems' | 'justifyContent' | 'justifyItems' | 'gap' | 'space' | 'divideWidth' | 'divideStyle' | 'divideColor' | 'divideOpacity' | 'placeSelf' | 'alignSelf' | 'justifySelf' | 'overflow' | 'overscrollBehavior' | 'scrollBehavior' | 'textOverflow' | 'hyphens' | 'whitespace' | 'textWrap' | 'wordBreak' | 'borderRadius' | 'borderWidth' | 'borderStyle' | 'borderColor' | 'borderOpacity' | 'backgroundColor' | 'backgroundOpacity' | 'backgroundImage' | 'gradientColorStops' | 'boxDecorationBreak' | 'backgroundSize' | 'backgroundAttachment' | 'backgroundClip' | 'backgroundPosition' | 'backgroundRepeat' | 'backgroundOrigin' | 'fill' | 'stroke' | 'strokeWidth' | 'objectFit' | 'objectPosition' | 'padding' | 'textAlign' | 'textIndent' | 'verticalAlign' | 'fontFamily' | 'fontSize' | 'fontWeight' | 'textTransform' | 'fontStyle' | 'fontVariantNumeric' | 'lineHeight' | 'letterSpacing' | 'textColor' | 'textOpacity' | 'textDecoration' | 'textDecorationColor' | 'textDecorationStyle' | 'textDecorationThickness' | 'textUnderlineOffset' | 'fontSmoothing' | 'placeholderColor' | 'placeholderOpacity' | 'caretColor' | 'accentColor' | 'opacity' | 'backgroundBlendMode' | 'mixBlendMode' | 'boxShadow' | 'boxShadowColor' | 'outlineStyle' | 'outlineWidth' | 'outlineOffset' | 'outlineColor' | 'ringWidth' | 'ringColor' | 'ringOpacity' | 'ringOffsetWidth' | 'ringOffsetColor' | 'blur' | 'brightness' | 'contrast' | 'dropShadow' | 'grayscale' | 'hueRotate' | 'invert' | 'saturate' | 'sepia' | 'filter' | 'backdropBlur' | 'backdropBrightness' | 'backdropContrast' | 'backdropGrayscale' | 'backdropHueRotate' | 'backdropInvert' | 'backdropOpacity' | 'backdropSaturate' | 'backdropSepia' | 'backdropFilter' | 'transitionProperty' | 'transitionDelay' | 'transitionDuration' | 'transitionTimingFunction' | 'willChange' | 'contain' | 'content' | 'forcedColorAdjust'
|