tailwindcss 0.0.0-insiders.ea80db2 → 0.0.0-insiders.eae2b7a
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 -9
- package/defaultTheme.d.ts +2 -1
- package/index.css +5 -0
- package/lib/cli/build/index.js +57 -0
- package/lib/cli/build/plugin.js +427 -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 +231 -0
- package/lib/cli/init/index.js +63 -0
- package/lib/cli.js +1 -759
- package/lib/corePluginList.js +12 -3
- package/lib/corePlugins.js +2308 -1739
- package/lib/css/preflight.css +13 -5
- package/lib/featureFlags.js +50 -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 +207 -0
- package/lib/lib/defaultExtractor.js +232 -33
- package/lib/lib/detectNesting.js +21 -10
- package/lib/lib/evaluateTailwindFunctions.js +117 -50
- package/lib/lib/expandApplyAtRules.js +316 -215
- package/lib/lib/expandTailwindAtRules.js +167 -115
- package/lib/lib/findAtConfigPath.js +46 -0
- package/lib/lib/generateRules.js +444 -211
- package/lib/lib/getModuleDependencies.js +88 -37
- package/lib/lib/handleImportAtRules.js +50 -0
- package/lib/lib/load-config.js +42 -0
- package/lib/lib/normalizeTailwindDirectives.js +29 -39
- package/lib/lib/offsets.js +306 -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 +96 -74
- package/lib/lib/setupContextUtils.js +672 -300
- 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 +160 -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 +34 -29
- 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 +12 -3
- package/lib/util/color.js +66 -50
- 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 +182 -111
- 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 +228 -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 +7 -2
- package/lib/util/{isValidArbitraryValue.js → isSyntacticallyValidPropertyValue.js} +25 -15
- package/lib/util/log.js +40 -13
- package/lib/util/nameClass.js +27 -10
- package/lib/util/negateValue.js +25 -8
- package/lib/util/normalizeConfig.js +155 -87
- 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 +154 -59
- package/lib/util/prefixSelector.js +29 -10
- package/lib/util/pseudoElements.js +209 -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 +48 -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/package.json +54 -52
- package/plugin.d.ts +10 -5
- package/resolveConfig.d.ts +12 -0
- package/scripts/generate-types.js +53 -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/index.js +53 -0
- package/src/cli/build/plugin.js +465 -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 +217 -0
- package/src/cli/init/index.js +79 -0
- package/src/cli.js +1 -836
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +576 -106
- package/src/css/preflight.css +13 -5
- package/src/featureFlags.js +17 -3
- package/src/index.js +1 -42
- package/src/lib/collapseAdjacentRules.js +5 -1
- package/src/lib/content.js +240 -0
- package/src/lib/defaultExtractor.js +202 -35
- package/src/lib/detectNesting.js +9 -1
- package/src/lib/evaluateTailwindFunctions.js +82 -8
- package/src/lib/expandApplyAtRules.js +322 -189
- package/src/lib/expandTailwindAtRules.js +82 -59
- package/src/lib/findAtConfigPath.js +48 -0
- package/src/lib/generateRules.js +413 -132
- package/src/lib/getModuleDependencies.js +70 -30
- package/src/lib/handleImportAtRules.js +34 -0
- package/src/lib/load-config.ts +31 -0
- package/src/lib/normalizeTailwindDirectives.js +0 -27
- package/src/lib/offsets.js +373 -0
- package/src/lib/regex.js +74 -0
- package/src/lib/remap-bitfield.js +82 -0
- package/src/lib/resolveDefaultsAtRules.js +53 -36
- package/src/lib/setupContextUtils.js +570 -151
- package/src/lib/setupTrackingContext.js +44 -58
- package/src/lib/sharedState.js +13 -4
- package/src/plugin.js +128 -0
- package/src/postcss-plugins/nesting/README.md +2 -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 +5 -1
- package/src/util/color.js +34 -17
- package/src/util/colorNames.js +150 -0
- package/src/util/dataTypes.js +67 -23
- package/src/util/formatVariantSelector.js +264 -144
- package/src/util/getAllConfigs.js +21 -2
- package/src/util/{isValidArbitraryValue.js → isSyntacticallyValidPropertyValue.js} +1 -1
- package/src/util/log.js +25 -1
- package/src/util/nameClass.js +4 -0
- package/src/util/negateValue.js +11 -3
- package/src/util/normalizeConfig.js +78 -20
- 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 +118 -23
- package/src/util/prefixSelector.js +28 -10
- package/src/util/pseudoElements.js +167 -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 +36 -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} +215 -165
- package/stubs/{simpleConfig.stub.js → config.simple.js} +1 -1
- package/stubs/{defaultPostCssConfig.stub.js → postcss.config.cjs} +0 -1
- package/stubs/postcss.config.js +5 -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 +102 -56
- package/types/generated/colors.d.ts +22 -0
- package/types/generated/corePluginList.d.ts +1 -1
- package/types/generated/default-theme.d.ts +372 -0
- package/types/index.d.ts +7 -1
- package/CHANGELOG.md +0 -2099
- package/lib/cli-peer-dependencies.js +0 -15
- package/lib/constants.js +0 -37
- package/peers/index.js +0 -75156
- package/scripts/install-integrations.js +0 -27
- package/scripts/rebuildFixtures.js +0 -68
- package/src/cli-peer-dependencies.js +0 -9
- package/src/constants.js +0 -17
- package/types.d.ts +0 -1
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,60 @@ 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
55
|
type PresetsConfig = Config[]
|
|
56
56
|
|
|
57
57
|
// Future related config
|
|
58
|
-
type FutureConfigValues =
|
|
58
|
+
type FutureConfigValues =
|
|
59
|
+
| 'hoverOnlyWhenSupported'
|
|
60
|
+
| 'respectDefaultRingColorOpacity'
|
|
61
|
+
| 'disableColorOpacityUtilitiesByDefault'
|
|
62
|
+
| 'relativeContentPathsByDefault'
|
|
63
|
+
| 'logicalSiblingUtilities'
|
|
59
64
|
type FutureConfig = Expand<'all' | Partial<Record<FutureConfigValues, boolean>>> | []
|
|
60
65
|
|
|
61
66
|
// Experimental related config
|
|
62
|
-
type ExperimentalConfigValues = 'optimizeUniversalDefaults'
|
|
67
|
+
type ExperimentalConfigValues = 'optimizeUniversalDefaults' | 'oxideParser'
|
|
63
68
|
type ExperimentalConfig = Expand<'all' | Partial<Record<ExperimentalConfigValues, boolean>>> | []
|
|
64
69
|
|
|
65
70
|
// DarkMode related config
|
|
66
71
|
type DarkModeConfig =
|
|
67
|
-
|
|
72
|
+
// Use the `media` query strategy.
|
|
68
73
|
| 'media'
|
|
69
|
-
|
|
74
|
+
// Use the `class` strategy, which requires a `.dark` class on the `html`.
|
|
70
75
|
| 'class'
|
|
71
|
-
|
|
76
|
+
// Use the `class` strategy with a custom class instead of `.dark`.
|
|
72
77
|
| ['class', string]
|
|
73
78
|
|
|
79
|
+
type Screen = { raw: string } | { min: string } | { max: string } | { min: string; max: string }
|
|
80
|
+
type ScreensConfig = string[] | KeyValuePair<string, string | Screen | Screen[]>
|
|
81
|
+
|
|
74
82
|
// Theme related config
|
|
75
83
|
interface ThemeConfig {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
84
|
+
// Responsiveness
|
|
85
|
+
screens: ResolvableTo<ScreensConfig>
|
|
86
|
+
supports: ResolvableTo<Record<string, string>>
|
|
87
|
+
data: ResolvableTo<Record<string, string>>
|
|
80
88
|
|
|
81
|
-
|
|
89
|
+
// Reusable base configs
|
|
82
90
|
colors: ResolvableTo<RecursiveKeyValuePair>
|
|
83
91
|
spacing: ResolvableTo<KeyValuePair>
|
|
84
92
|
|
|
85
|
-
|
|
93
|
+
// Components
|
|
86
94
|
container: ResolvableTo<
|
|
87
95
|
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 }>
|
|
96
|
+
screens: ScreensConfig
|
|
94
97
|
center: boolean
|
|
95
98
|
padding: string | Record<string, string>
|
|
96
99
|
}>
|
|
97
100
|
>
|
|
98
101
|
|
|
99
|
-
|
|
102
|
+
// Utilities
|
|
100
103
|
inset: ThemeConfig['spacing']
|
|
101
104
|
zIndex: ResolvableTo<KeyValuePair>
|
|
102
105
|
order: ResolvableTo<KeyValuePair>
|
|
@@ -156,20 +159,34 @@ interface ThemeConfig {
|
|
|
156
159
|
objectPosition: ResolvableTo<KeyValuePair>
|
|
157
160
|
padding: ThemeConfig['spacing']
|
|
158
161
|
textIndent: ThemeConfig['spacing']
|
|
159
|
-
fontFamily: ResolvableTo<
|
|
162
|
+
fontFamily: ResolvableTo<
|
|
163
|
+
KeyValuePair<
|
|
164
|
+
string,
|
|
165
|
+
| string
|
|
166
|
+
| string[]
|
|
167
|
+
| [
|
|
168
|
+
fontFamily: string | string[],
|
|
169
|
+
configuration: Partial<{
|
|
170
|
+
fontFeatureSettings: string
|
|
171
|
+
fontVariationSettings: string
|
|
172
|
+
}>
|
|
173
|
+
]
|
|
174
|
+
>
|
|
175
|
+
>
|
|
160
176
|
fontSize: ResolvableTo<
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
177
|
+
KeyValuePair<
|
|
178
|
+
string,
|
|
179
|
+
| string
|
|
180
|
+
| [fontSize: string, lineHeight: string]
|
|
181
|
+
| [
|
|
166
182
|
fontSize: string,
|
|
167
183
|
configuration: Partial<{
|
|
168
184
|
lineHeight: string
|
|
169
185
|
letterSpacing: string
|
|
186
|
+
fontWeight: string | number
|
|
170
187
|
}>
|
|
171
188
|
]
|
|
172
|
-
|
|
189
|
+
>
|
|
173
190
|
>
|
|
174
191
|
fontWeight: ResolvableTo<KeyValuePair>
|
|
175
192
|
lineHeight: ResolvableTo<KeyValuePair>
|
|
@@ -197,7 +214,7 @@ interface ThemeConfig {
|
|
|
197
214
|
blur: ResolvableTo<KeyValuePair>
|
|
198
215
|
brightness: ResolvableTo<KeyValuePair>
|
|
199
216
|
contrast: ResolvableTo<KeyValuePair>
|
|
200
|
-
dropShadow: ResolvableTo<KeyValuePair
|
|
217
|
+
dropShadow: ResolvableTo<KeyValuePair<string, string | string[]>>
|
|
201
218
|
grayscale: ResolvableTo<KeyValuePair>
|
|
202
219
|
hueRotate: ResolvableTo<KeyValuePair>
|
|
203
220
|
invert: ResolvableTo<KeyValuePair>
|
|
@@ -218,6 +235,9 @@ interface ThemeConfig {
|
|
|
218
235
|
transitionDuration: ResolvableTo<KeyValuePair>
|
|
219
236
|
willChange: ResolvableTo<KeyValuePair>
|
|
220
237
|
content: ResolvableTo<KeyValuePair>
|
|
238
|
+
|
|
239
|
+
// Custom
|
|
240
|
+
[key: string]: any
|
|
221
241
|
}
|
|
222
242
|
|
|
223
243
|
// Core plugins related config
|
|
@@ -241,62 +261,88 @@ type ValueType =
|
|
|
241
261
|
| 'relative-size'
|
|
242
262
|
| 'shadow'
|
|
243
263
|
export interface PluginAPI {
|
|
244
|
-
|
|
264
|
+
// for registering new static utility styles
|
|
245
265
|
addUtilities(
|
|
246
|
-
utilities:
|
|
266
|
+
utilities: CSSRuleObject | CSSRuleObject[],
|
|
247
267
|
options?: Partial<{
|
|
248
268
|
respectPrefix: boolean
|
|
249
269
|
respectImportant: boolean
|
|
250
270
|
}>
|
|
251
271
|
): void
|
|
252
|
-
|
|
253
|
-
matchUtilities<T>(
|
|
254
|
-
utilities: KeyValuePair<
|
|
272
|
+
// for registering new dynamic utility styles
|
|
273
|
+
matchUtilities<T = string, U = string>(
|
|
274
|
+
utilities: KeyValuePair<
|
|
275
|
+
string,
|
|
276
|
+
(value: T | string, extra: { modifier: U | string | null }) => CSSRuleObject | null
|
|
277
|
+
>,
|
|
255
278
|
options?: Partial<{
|
|
256
279
|
respectPrefix: boolean
|
|
257
280
|
respectImportant: boolean
|
|
258
281
|
type: ValueType | ValueType[]
|
|
259
282
|
values: KeyValuePair<string, T>
|
|
283
|
+
modifiers: 'any' | KeyValuePair<string, U>
|
|
260
284
|
supportsNegativeValues: boolean
|
|
261
285
|
}>
|
|
262
286
|
): void
|
|
263
|
-
|
|
287
|
+
// for registering new static component styles
|
|
264
288
|
addComponents(
|
|
265
|
-
components:
|
|
289
|
+
components: CSSRuleObject | CSSRuleObject[],
|
|
266
290
|
options?: Partial<{
|
|
267
291
|
respectPrefix: boolean
|
|
268
292
|
respectImportant: boolean
|
|
269
293
|
}>
|
|
270
294
|
): void
|
|
271
|
-
|
|
272
|
-
matchComponents<T>(
|
|
273
|
-
components: KeyValuePair<
|
|
295
|
+
// for registering new dynamic component styles
|
|
296
|
+
matchComponents<T = string, U = string>(
|
|
297
|
+
components: KeyValuePair<
|
|
298
|
+
string,
|
|
299
|
+
(value: T | string, extra: { modifier: U | string | null }) => CSSRuleObject | null
|
|
300
|
+
>,
|
|
274
301
|
options?: Partial<{
|
|
275
302
|
respectPrefix: boolean
|
|
276
303
|
respectImportant: boolean
|
|
277
304
|
type: ValueType | ValueType[]
|
|
278
305
|
values: KeyValuePair<string, T>
|
|
306
|
+
modifiers: 'any' | KeyValuePair<string, U>
|
|
279
307
|
supportsNegativeValues: boolean
|
|
280
308
|
}>
|
|
281
309
|
): void
|
|
282
|
-
|
|
283
|
-
addBase(base:
|
|
284
|
-
|
|
310
|
+
// for registering new base styles
|
|
311
|
+
addBase(base: CSSRuleObject | CSSRuleObject[]): void
|
|
312
|
+
// for registering custom variants
|
|
285
313
|
addVariant(name: string, definition: string | string[] | (() => string) | (() => string)[]): void
|
|
286
|
-
|
|
314
|
+
matchVariant<T = string>(
|
|
315
|
+
name: string,
|
|
316
|
+
cb: (value: T | string, extra: { modifier: string | null }) => string | string[],
|
|
317
|
+
options?: {
|
|
318
|
+
values?: KeyValuePair<string, T>
|
|
319
|
+
sort?(
|
|
320
|
+
a: { value: T | string; modifier: string | null },
|
|
321
|
+
b: { value: T | string; modifier: string | null }
|
|
322
|
+
): number
|
|
323
|
+
}
|
|
324
|
+
): void
|
|
325
|
+
// for looking up values in the user’s theme configuration
|
|
287
326
|
theme: <TDefaultValue = Config['theme']>(
|
|
288
327
|
path?: string,
|
|
289
328
|
defaultValue?: TDefaultValue
|
|
290
329
|
) => TDefaultValue
|
|
291
|
-
|
|
330
|
+
// for looking up values in the user’s Tailwind configuration
|
|
292
331
|
config: <TDefaultValue = Config>(path?: string, defaultValue?: TDefaultValue) => TDefaultValue
|
|
293
|
-
|
|
332
|
+
// for checking if a core plugin is enabled
|
|
294
333
|
corePlugins(path: string): boolean
|
|
295
|
-
|
|
334
|
+
// for manually escaping strings meant to be used in class names
|
|
296
335
|
e: (className: string) => string
|
|
297
336
|
}
|
|
298
337
|
export type PluginCreator = (api: PluginAPI) => void
|
|
299
|
-
export type PluginsConfig = (
|
|
338
|
+
export type PluginsConfig = (
|
|
339
|
+
| PluginCreator
|
|
340
|
+
| { handler: PluginCreator; config?: Partial<Config> }
|
|
341
|
+
| {
|
|
342
|
+
(options: any): { handler: PluginCreator; config?: Partial<Config> }
|
|
343
|
+
__isOptionsFunction: true
|
|
344
|
+
}
|
|
345
|
+
)[]
|
|
300
346
|
|
|
301
347
|
// Top level config related
|
|
302
348
|
interface RequiredConfig {
|
|
@@ -308,16 +354,16 @@ interface OptionalConfig {
|
|
|
308
354
|
prefix: Partial<PrefixConfig>
|
|
309
355
|
separator: Partial<SeparatorConfig>
|
|
310
356
|
safelist: Partial<SafelistConfig>
|
|
357
|
+
blocklist: Partial<BlocklistConfig>
|
|
311
358
|
presets: Partial<PresetsConfig>
|
|
312
359
|
future: Partial<FutureConfig>
|
|
313
360
|
experimental: Partial<ExperimentalConfig>
|
|
314
361
|
darkMode: Partial<DarkModeConfig>
|
|
315
|
-
theme: Partial<ThemeConfig>
|
|
362
|
+
theme: Partial<ThemeConfig & { extend: Partial<ThemeConfig> }>
|
|
316
363
|
corePlugins: Partial<CorePluginsConfig>
|
|
317
364
|
plugins: Partial<PluginsConfig>
|
|
318
|
-
|
|
365
|
+
// Custom
|
|
319
366
|
[key: string]: any
|
|
320
367
|
}
|
|
321
368
|
|
|
322
369
|
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' | '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' | 'content'
|