tailwindcss 0.0.0-insiders.7b94fea → 0.0.0-insiders.7d8eb21

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.
Files changed (190) hide show
  1. package/CHANGELOG.md +588 -3
  2. package/LICENSE +1 -2
  3. package/README.md +15 -7
  4. package/colors.d.ts +3 -0
  5. package/colors.js +2 -1
  6. package/defaultConfig.d.ts +3 -0
  7. package/defaultConfig.js +2 -1
  8. package/defaultTheme.d.ts +4 -0
  9. package/defaultTheme.js +2 -1
  10. package/lib/cli/build/deps.js +54 -0
  11. package/lib/cli/build/index.js +48 -0
  12. package/lib/cli/build/plugin.js +362 -0
  13. package/lib/cli/build/utils.js +78 -0
  14. package/lib/cli/build/watching.js +178 -0
  15. package/lib/cli/help/index.js +71 -0
  16. package/lib/cli/index.js +18 -0
  17. package/lib/cli/init/index.js +46 -0
  18. package/lib/cli/shared.js +12 -0
  19. package/lib/cli-peer-dependencies.js +20 -7
  20. package/lib/cli.js +108 -571
  21. package/lib/constants.js +27 -20
  22. package/lib/corePluginList.js +15 -4
  23. package/lib/corePlugins.js +2229 -1868
  24. package/lib/css/preflight.css +22 -9
  25. package/lib/featureFlags.js +39 -25
  26. package/lib/index.js +28 -12
  27. package/lib/lib/cacheInvalidation.js +90 -0
  28. package/lib/lib/collapseAdjacentRules.js +28 -10
  29. package/lib/lib/collapseDuplicateDeclarations.js +83 -0
  30. package/lib/lib/content.js +177 -0
  31. package/lib/lib/defaultExtractor.js +241 -0
  32. package/lib/lib/detectNesting.js +27 -3
  33. package/lib/lib/evaluateTailwindFunctions.js +117 -50
  34. package/lib/lib/expandApplyAtRules.js +457 -159
  35. package/lib/lib/expandTailwindAtRules.js +130 -127
  36. package/lib/lib/findAtConfigPath.js +44 -0
  37. package/lib/lib/generateRules.js +610 -141
  38. package/lib/lib/getModuleDependencies.js +11 -8
  39. package/lib/lib/normalizeTailwindDirectives.js +43 -32
  40. package/lib/lib/offsets.js +285 -0
  41. package/lib/lib/partitionApplyAtRules.js +56 -0
  42. package/lib/lib/regex.js +60 -0
  43. package/lib/lib/remap-bitfield.js +87 -0
  44. package/lib/lib/resolveDefaultsAtRules.js +114 -81
  45. package/lib/lib/setupContextUtils.js +718 -323
  46. package/lib/lib/setupTrackingContext.js +43 -71
  47. package/lib/lib/sharedState.js +50 -9
  48. package/lib/lib/substituteScreenAtRules.js +13 -8
  49. package/{nesting → lib/postcss-plugins/nesting}/README.md +2 -2
  50. package/lib/postcss-plugins/nesting/index.js +19 -0
  51. package/lib/postcss-plugins/nesting/plugin.js +87 -0
  52. package/lib/processTailwindFeatures.js +36 -21
  53. package/lib/public/colors.js +247 -245
  54. package/lib/public/create-plugin.js +6 -4
  55. package/lib/public/default-config.js +7 -5
  56. package/lib/public/default-theme.js +7 -5
  57. package/lib/public/resolve-config.js +8 -5
  58. package/lib/util/bigSign.js +4 -1
  59. package/lib/util/buildMediaQuery.js +18 -24
  60. package/lib/util/cloneDeep.js +7 -6
  61. package/lib/util/cloneNodes.js +21 -3
  62. package/lib/util/color.js +54 -40
  63. package/lib/util/configurePlugins.js +5 -2
  64. package/lib/util/createPlugin.js +6 -6
  65. package/lib/util/createUtilityPlugin.js +12 -14
  66. package/lib/util/dataTypes.js +164 -100
  67. package/lib/util/defaults.js +12 -3
  68. package/lib/util/escapeClassName.js +9 -6
  69. package/lib/util/escapeCommas.js +5 -2
  70. package/lib/util/flattenColorPalette.js +9 -12
  71. package/lib/util/formatVariantSelector.js +353 -0
  72. package/lib/util/getAllConfigs.js +29 -10
  73. package/lib/util/hashConfig.js +6 -3
  74. package/lib/util/isKeyframeRule.js +5 -2
  75. package/lib/util/isPlainObject.js +5 -2
  76. package/lib/util/isSyntacticallyValidPropertyValue.js +72 -0
  77. package/lib/util/log.js +22 -12
  78. package/lib/util/nameClass.js +20 -8
  79. package/lib/util/negateValue.js +23 -6
  80. package/lib/util/normalizeConfig.js +147 -60
  81. package/lib/util/normalizeScreens.js +170 -0
  82. package/lib/util/parseAnimationValue.js +42 -40
  83. package/lib/util/parseBoxShadowValue.js +84 -0
  84. package/lib/util/parseDependency.js +38 -56
  85. package/lib/util/parseGlob.js +34 -0
  86. package/lib/util/parseObjectStyles.js +11 -8
  87. package/lib/util/pluginUtils.js +182 -181
  88. package/lib/util/prefixSelector.js +27 -13
  89. package/lib/util/removeAlphaVariables.js +29 -0
  90. package/lib/util/resolveConfig.js +97 -73
  91. package/lib/util/resolveConfigPath.js +11 -9
  92. package/lib/util/responsive.js +8 -5
  93. package/lib/util/splitAtTopLevelOnly.js +43 -0
  94. package/lib/util/tap.js +4 -1
  95. package/lib/util/toColorValue.js +5 -3
  96. package/lib/util/toPath.js +24 -3
  97. package/lib/util/transformThemeValue.js +49 -31
  98. package/lib/util/validateConfig.js +24 -0
  99. package/lib/util/validateFormalSyntax.js +24 -0
  100. package/lib/util/withAlphaVariable.js +23 -15
  101. package/nesting/index.js +2 -12
  102. package/package.json +51 -50
  103. package/peers/index.js +15019 -12583
  104. package/plugin.d.ts +11 -0
  105. package/plugin.js +2 -1
  106. package/resolveConfig.d.ts +12 -0
  107. package/resolveConfig.js +2 -1
  108. package/scripts/generate-types.js +105 -0
  109. package/scripts/release-channel.js +18 -0
  110. package/scripts/release-notes.js +21 -0
  111. package/scripts/type-utils.js +27 -0
  112. package/src/cli/build/deps.js +56 -0
  113. package/src/cli/build/index.js +49 -0
  114. package/src/cli/build/plugin.js +434 -0
  115. package/src/cli/build/utils.js +76 -0
  116. package/src/cli/build/watching.js +227 -0
  117. package/src/cli/help/index.js +70 -0
  118. package/src/cli/index.js +3 -0
  119. package/src/cli/init/index.js +50 -0
  120. package/src/cli/shared.js +5 -0
  121. package/src/cli-peer-dependencies.js +7 -1
  122. package/src/cli.js +50 -577
  123. package/src/corePluginList.js +1 -1
  124. package/src/corePlugins.js +886 -598
  125. package/src/css/preflight.css +22 -9
  126. package/src/featureFlags.js +24 -8
  127. package/src/index.js +19 -6
  128. package/src/lib/cacheInvalidation.js +52 -0
  129. package/src/lib/collapseAdjacentRules.js +21 -2
  130. package/src/lib/collapseDuplicateDeclarations.js +93 -0
  131. package/src/lib/content.js +213 -0
  132. package/src/lib/defaultExtractor.js +217 -0
  133. package/src/lib/detectNesting.js +30 -3
  134. package/src/lib/evaluateTailwindFunctions.js +84 -10
  135. package/src/lib/expandApplyAtRules.js +508 -153
  136. package/src/lib/expandTailwindAtRules.js +82 -79
  137. package/src/lib/findAtConfigPath.js +48 -0
  138. package/src/lib/generateRules.js +625 -111
  139. package/src/lib/normalizeTailwindDirectives.js +7 -1
  140. package/src/lib/offsets.js +351 -0
  141. package/src/lib/partitionApplyAtRules.js +52 -0
  142. package/src/lib/regex.js +74 -0
  143. package/src/lib/remap-bitfield.js +82 -0
  144. package/src/lib/resolveDefaultsAtRules.js +98 -60
  145. package/src/lib/setupContextUtils.js +666 -168
  146. package/src/lib/setupTrackingContext.js +16 -52
  147. package/src/lib/sharedState.js +44 -4
  148. package/src/lib/substituteScreenAtRules.js +6 -3
  149. package/src/postcss-plugins/nesting/README.md +42 -0
  150. package/src/postcss-plugins/nesting/index.js +13 -0
  151. package/src/postcss-plugins/nesting/plugin.js +80 -0
  152. package/src/processTailwindFeatures.js +17 -2
  153. package/src/util/buildMediaQuery.js +14 -16
  154. package/src/util/cloneNodes.js +19 -2
  155. package/src/util/color.js +31 -14
  156. package/src/util/createUtilityPlugin.js +2 -2
  157. package/src/util/dataTypes.js +86 -21
  158. package/src/util/defaults.js +6 -0
  159. package/src/util/formatVariantSelector.js +412 -0
  160. package/src/util/getAllConfigs.js +19 -0
  161. package/src/util/isSyntacticallyValidPropertyValue.js +61 -0
  162. package/src/util/log.js +11 -7
  163. package/src/util/nameClass.js +6 -2
  164. package/src/util/negateValue.js +14 -4
  165. package/src/util/normalizeConfig.js +72 -5
  166. package/src/util/normalizeScreens.js +140 -0
  167. package/src/util/parseBoxShadowValue.js +72 -0
  168. package/src/util/parseDependency.js +37 -42
  169. package/src/util/parseGlob.js +24 -0
  170. package/src/util/pluginUtils.js +169 -143
  171. package/src/util/prefixSelector.js +30 -13
  172. package/src/util/removeAlphaVariables.js +24 -0
  173. package/src/util/resolveConfig.js +81 -27
  174. package/src/util/splitAtTopLevelOnly.js +45 -0
  175. package/src/util/toPath.js +23 -1
  176. package/src/util/transformThemeValue.js +33 -8
  177. package/src/util/validateConfig.js +13 -0
  178. package/src/util/validateFormalSyntax.js +34 -0
  179. package/src/util/withAlphaVariable.js +1 -1
  180. package/stubs/defaultConfig.stub.js +246 -213
  181. package/stubs/simpleConfig.stub.js +1 -0
  182. package/types/config.d.ts +363 -0
  183. package/types/generated/.gitkeep +0 -0
  184. package/types/generated/colors.d.ts +276 -0
  185. package/types/generated/corePluginList.d.ts +1 -0
  186. package/types/generated/default-theme.d.ts +342 -0
  187. package/types/index.d.ts +7 -0
  188. package/lib/lib/setupWatchingContext.js +0 -284
  189. package/nesting/plugin.js +0 -41
  190. package/src/lib/setupWatchingContext.js +0 -304
@@ -0,0 +1,363 @@
1
+ import type { CorePluginList } from './generated/corePluginList'
2
+ import type { DefaultColors } from './generated/colors'
3
+
4
+ // Helpers
5
+ type Expand<T> = T extends object
6
+ ? T extends infer O
7
+ ? { [K in keyof O]: Expand<O[K]> }
8
+ : never
9
+ : T
10
+ type KeyValuePair<K extends keyof any = string, V = string> = Record<K, V>
11
+ interface RecursiveKeyValuePair<K extends keyof any = string, V = string> {
12
+ [key: string]: V | RecursiveKeyValuePair<K, V>
13
+ }
14
+ export type ResolvableTo<T> = T | ((utils: PluginUtils) => T)
15
+ type CSSRuleObject = RecursiveKeyValuePair<string, null | string | string[]>
16
+
17
+ interface PluginUtils {
18
+ colors: DefaultColors
19
+ theme(path: string, defaultValue?: unknown): any
20
+ breakpoints<I = Record<string, unknown>, O = I>(arg: I): O
21
+ rgb(arg: string): (arg: Partial<{ opacityVariable: string; opacityValue: number }>) => string
22
+ hsl(arg: string): (arg: Partial<{ opacityVariable: string; opacityValue: number }>) => string
23
+ }
24
+
25
+ // Content related config
26
+ type FilePath = string
27
+ type RawFile = { raw: string; extension?: string }
28
+ type ExtractorFn = (content: string) => string[]
29
+ type TransformerFn = (content: string) => string
30
+ type ContentConfig =
31
+ | (FilePath | RawFile)[]
32
+ | {
33
+ files: (FilePath | RawFile)[]
34
+ relative?: boolean
35
+ extract?: ExtractorFn | { [extension: string]: ExtractorFn }
36
+ transform?: TransformerFn | { [extension: string]: TransformerFn }
37
+ }
38
+
39
+ // Important related config
40
+ type ImportantConfig = boolean | string
41
+
42
+ // Prefix related config
43
+ type PrefixConfig = string
44
+
45
+ // Separator related config
46
+ type SeparatorConfig = string
47
+
48
+ // Safelist related config
49
+ type SafelistConfig =
50
+ | string[]
51
+ | {
52
+ pattern: RegExp
53
+ variants?: string[]
54
+ }[]
55
+
56
+ // Presets related config
57
+ type PresetsConfig = Config[]
58
+
59
+ // Future related config
60
+ type FutureConfigValues =
61
+ | 'hoverOnlyWhenSupported'
62
+ | 'respectDefaultRingColorOpacity'
63
+ | 'disableColorOpacityUtilitiesByDefault'
64
+ | 'relativeContentPathsByDefault'
65
+ type FutureConfig = Expand<'all' | Partial<Record<FutureConfigValues, boolean>>> | []
66
+
67
+ // Experimental related config
68
+ type ExperimentalConfigValues = 'optimizeUniversalDefaults' | 'matchVariant'
69
+ type ExperimentalConfig = Expand<'all' | Partial<Record<ExperimentalConfigValues, boolean>>> | []
70
+
71
+ // DarkMode related config
72
+ type DarkModeConfig =
73
+ // Use the `media` query strategy.
74
+ | 'media'
75
+ // Use the `class` strategy, which requires a `.dark` class on the `html`.
76
+ | 'class'
77
+ // Use the `class` strategy with a custom class instead of `.dark`.
78
+ | ['class', string]
79
+
80
+ type Screen = { raw: string } | { min: string } | { max: string } | { min: string; max: string }
81
+ type ScreensConfig = string[] | KeyValuePair<string, string | Screen | Screen[]>
82
+
83
+ // Theme related config
84
+ interface ThemeConfig {
85
+ // Responsiveness
86
+ screens: ResolvableTo<ScreensConfig>
87
+ supports: ResolvableTo<Record<string, string>>
88
+ data: ResolvableTo<Record<string, string>>
89
+
90
+ // Reusable base configs
91
+ colors: ResolvableTo<RecursiveKeyValuePair>
92
+ spacing: ResolvableTo<KeyValuePair>
93
+
94
+ // Components
95
+ container: ResolvableTo<
96
+ Partial<{
97
+ screens: ScreensConfig
98
+ center: boolean
99
+ padding: string | Record<string, string>
100
+ }>
101
+ >
102
+
103
+ // Utilities
104
+ inset: ThemeConfig['spacing']
105
+ zIndex: ResolvableTo<KeyValuePair>
106
+ order: ResolvableTo<KeyValuePair>
107
+ gridColumn: ResolvableTo<KeyValuePair>
108
+ gridColumnStart: ResolvableTo<KeyValuePair>
109
+ gridColumnEnd: ResolvableTo<KeyValuePair>
110
+ gridRow: ResolvableTo<KeyValuePair>
111
+ gridRowStart: ResolvableTo<KeyValuePair>
112
+ gridRowEnd: ResolvableTo<KeyValuePair>
113
+ margin: ThemeConfig['spacing']
114
+ aspectRatio: ResolvableTo<KeyValuePair>
115
+ height: ThemeConfig['spacing']
116
+ maxHeight: ThemeConfig['spacing']
117
+ minHeight: ResolvableTo<KeyValuePair>
118
+ width: ThemeConfig['spacing']
119
+ maxWidth: ResolvableTo<KeyValuePair>
120
+ minWidth: ResolvableTo<KeyValuePair>
121
+ flex: ResolvableTo<KeyValuePair>
122
+ flexShrink: ResolvableTo<KeyValuePair>
123
+ flexGrow: ResolvableTo<KeyValuePair>
124
+ flexBasis: ThemeConfig['spacing']
125
+ borderSpacing: ThemeConfig['spacing']
126
+ transformOrigin: ResolvableTo<KeyValuePair>
127
+ translate: ThemeConfig['spacing']
128
+ rotate: ResolvableTo<KeyValuePair>
129
+ skew: ResolvableTo<KeyValuePair>
130
+ scale: ResolvableTo<KeyValuePair>
131
+ animation: ResolvableTo<KeyValuePair>
132
+ keyframes: ResolvableTo<KeyValuePair<string, KeyValuePair<string, KeyValuePair>>>
133
+ cursor: ResolvableTo<KeyValuePair>
134
+ scrollMargin: ThemeConfig['spacing']
135
+ scrollPadding: ThemeConfig['spacing']
136
+ listStyleType: ResolvableTo<KeyValuePair>
137
+ columns: ResolvableTo<KeyValuePair>
138
+ gridAutoColumns: ResolvableTo<KeyValuePair>
139
+ gridAutoRows: ResolvableTo<KeyValuePair>
140
+ gridTemplateColumns: ResolvableTo<KeyValuePair>
141
+ gridTemplateRows: ResolvableTo<KeyValuePair>
142
+ gap: ThemeConfig['spacing']
143
+ space: ThemeConfig['spacing']
144
+ divideWidth: ThemeConfig['borderWidth']
145
+ divideColor: ThemeConfig['borderColor']
146
+ divideOpacity: ThemeConfig['borderOpacity']
147
+ borderRadius: ResolvableTo<KeyValuePair>
148
+ borderWidth: ResolvableTo<KeyValuePair>
149
+ borderColor: ThemeConfig['colors']
150
+ borderOpacity: ThemeConfig['opacity']
151
+ backgroundColor: ThemeConfig['colors']
152
+ backgroundOpacity: ThemeConfig['opacity']
153
+ backgroundImage: ResolvableTo<KeyValuePair>
154
+ gradientColorStops: ThemeConfig['colors']
155
+ backgroundSize: ResolvableTo<KeyValuePair>
156
+ backgroundPosition: ResolvableTo<KeyValuePair>
157
+ fill: ThemeConfig['colors']
158
+ stroke: ThemeConfig['colors']
159
+ strokeWidth: ResolvableTo<KeyValuePair>
160
+ objectPosition: ResolvableTo<KeyValuePair>
161
+ padding: ThemeConfig['spacing']
162
+ textIndent: ThemeConfig['spacing']
163
+ fontFamily: ResolvableTo<
164
+ KeyValuePair<
165
+ string,
166
+ | string
167
+ | string[]
168
+ | [fontFamily: string | string[], configuration: Partial<{ fontFeatureSettings: string }>]
169
+ >
170
+ >
171
+ fontSize: ResolvableTo<
172
+ KeyValuePair<
173
+ string,
174
+ | string
175
+ | [fontSize: string, lineHeight: string]
176
+ | [
177
+ fontSize: string,
178
+ configuration: Partial<{
179
+ lineHeight: string
180
+ letterSpacing: string
181
+ fontWeight: string | number
182
+ }>
183
+ ]
184
+ >
185
+ >
186
+ fontWeight: ResolvableTo<KeyValuePair>
187
+ lineHeight: ResolvableTo<KeyValuePair>
188
+ letterSpacing: ResolvableTo<KeyValuePair>
189
+ textColor: ThemeConfig['colors']
190
+ textOpacity: ThemeConfig['opacity']
191
+ textDecorationColor: ThemeConfig['colors']
192
+ textDecorationThickness: ResolvableTo<KeyValuePair>
193
+ textUnderlineOffset: ResolvableTo<KeyValuePair>
194
+ placeholderColor: ThemeConfig['colors']
195
+ placeholderOpacity: ThemeConfig['opacity']
196
+ caretColor: ThemeConfig['colors']
197
+ accentColor: ThemeConfig['colors']
198
+ opacity: ResolvableTo<KeyValuePair>
199
+ boxShadow: ResolvableTo<KeyValuePair>
200
+ boxShadowColor: ThemeConfig['colors']
201
+ outlineWidth: ResolvableTo<KeyValuePair>
202
+ outlineOffset: ResolvableTo<KeyValuePair>
203
+ outlineColor: ThemeConfig['colors']
204
+ ringWidth: ResolvableTo<KeyValuePair>
205
+ ringColor: ThemeConfig['colors']
206
+ ringOpacity: ThemeConfig['opacity']
207
+ ringOffsetWidth: ResolvableTo<KeyValuePair>
208
+ ringOffsetColor: ThemeConfig['colors']
209
+ blur: ResolvableTo<KeyValuePair>
210
+ brightness: ResolvableTo<KeyValuePair>
211
+ contrast: ResolvableTo<KeyValuePair>
212
+ dropShadow: ResolvableTo<KeyValuePair<string, string | string[]>>
213
+ grayscale: ResolvableTo<KeyValuePair>
214
+ hueRotate: ResolvableTo<KeyValuePair>
215
+ invert: ResolvableTo<KeyValuePair>
216
+ saturate: ResolvableTo<KeyValuePair>
217
+ sepia: ResolvableTo<KeyValuePair>
218
+ backdropBlur: ThemeConfig['blur']
219
+ backdropBrightness: ThemeConfig['brightness']
220
+ backdropContrast: ThemeConfig['contrast']
221
+ backdropGrayscale: ThemeConfig['grayscale']
222
+ backdropHueRotate: ThemeConfig['hueRotate']
223
+ backdropInvert: ThemeConfig['invert']
224
+ backdropOpacity: ThemeConfig['opacity']
225
+ backdropSaturate: ThemeConfig['saturate']
226
+ backdropSepia: ThemeConfig['sepia']
227
+ transitionProperty: ResolvableTo<KeyValuePair>
228
+ transitionTimingFunction: ResolvableTo<KeyValuePair>
229
+ transitionDelay: ResolvableTo<KeyValuePair>
230
+ transitionDuration: ResolvableTo<KeyValuePair>
231
+ willChange: ResolvableTo<KeyValuePair>
232
+ content: ResolvableTo<KeyValuePair>
233
+
234
+ // Custom
235
+ [key: string]: any
236
+ }
237
+
238
+ // Core plugins related config
239
+ type CorePluginsConfig = CorePluginList[] | Expand<Partial<Record<CorePluginList, boolean>>>
240
+
241
+ // Plugins related config
242
+ type ValueType =
243
+ | 'any'
244
+ | 'color'
245
+ | 'url'
246
+ | 'image'
247
+ | 'length'
248
+ | 'percentage'
249
+ | 'position'
250
+ | 'lookup'
251
+ | 'generic-name'
252
+ | 'family-name'
253
+ | 'number'
254
+ | 'line-width'
255
+ | 'absolute-size'
256
+ | 'relative-size'
257
+ | 'shadow'
258
+ export interface PluginAPI {
259
+ // for registering new static utility styles
260
+ addUtilities(
261
+ utilities: CSSRuleObject | CSSRuleObject[],
262
+ options?: Partial<{
263
+ respectPrefix: boolean
264
+ respectImportant: boolean
265
+ }>
266
+ ): void
267
+ // for registering new dynamic utility styles
268
+ matchUtilities<T = string, U = string>(
269
+ utilities: KeyValuePair<
270
+ string,
271
+ (value: T | string, extra: { modifier: U | string | null }) => CSSRuleObject | null
272
+ >,
273
+ options?: Partial<{
274
+ respectPrefix: boolean
275
+ respectImportant: boolean
276
+ type: ValueType | ValueType[]
277
+ values: KeyValuePair<string, T>
278
+ modifiers: 'any' | KeyValuePair<string, U>
279
+ supportsNegativeValues: boolean
280
+ }>
281
+ ): void
282
+ // for registering new static component styles
283
+ addComponents(
284
+ components: CSSRuleObject | CSSRuleObject[],
285
+ options?: Partial<{
286
+ respectPrefix: boolean
287
+ respectImportant: boolean
288
+ }>
289
+ ): void
290
+ // for registering new dynamic component styles
291
+ matchComponents<T = string, U = string>(
292
+ components: KeyValuePair<
293
+ string,
294
+ (value: T | string, extra: { modifier: U | string | null }) => CSSRuleObject | null
295
+ >,
296
+ options?: Partial<{
297
+ respectPrefix: boolean
298
+ respectImportant: boolean
299
+ type: ValueType | ValueType[]
300
+ values: KeyValuePair<string, T>
301
+ modifiers: 'any' | KeyValuePair<string, U>
302
+ supportsNegativeValues: boolean
303
+ }>
304
+ ): void
305
+ // for registering new base styles
306
+ addBase(base: CSSRuleObject | CSSRuleObject[]): void
307
+ // for registering custom variants
308
+ addVariant(name: string, definition: string | string[] | (() => string) | (() => string)[]): void
309
+ matchVariant<T = string>(
310
+ name: string,
311
+ cb: (value: T | string, extra: { modifier: string | null }) => string | string[],
312
+ options?: {
313
+ values?: KeyValuePair<string, T>
314
+ sort?(
315
+ a: { value: T | string; modifier: string | null },
316
+ b: { value: T | string; modifier: string | null }
317
+ ): number
318
+ }
319
+ ): void
320
+ // for looking up values in the user’s theme configuration
321
+ theme: <TDefaultValue = Config['theme']>(
322
+ path?: string,
323
+ defaultValue?: TDefaultValue
324
+ ) => TDefaultValue
325
+ // for looking up values in the user’s Tailwind configuration
326
+ config: <TDefaultValue = Config>(path?: string, defaultValue?: TDefaultValue) => TDefaultValue
327
+ // for checking if a core plugin is enabled
328
+ corePlugins(path: string): boolean
329
+ // for manually escaping strings meant to be used in class names
330
+ e: (className: string) => string
331
+ }
332
+ export type PluginCreator = (api: PluginAPI) => void
333
+ export type PluginsConfig = (
334
+ | PluginCreator
335
+ | { handler: PluginCreator; config?: Partial<Config> }
336
+ | {
337
+ (options: any): { handler: PluginCreator; config?: Partial<Config> }
338
+ __isOptionsFunction: true
339
+ }
340
+ )[]
341
+
342
+ // Top level config related
343
+ interface RequiredConfig {
344
+ content: ContentConfig
345
+ }
346
+
347
+ interface OptionalConfig {
348
+ important: Partial<ImportantConfig>
349
+ prefix: Partial<PrefixConfig>
350
+ separator: Partial<SeparatorConfig>
351
+ safelist: Partial<SafelistConfig>
352
+ presets: Partial<PresetsConfig>
353
+ future: Partial<FutureConfig>
354
+ experimental: Partial<ExperimentalConfig>
355
+ darkMode: Partial<DarkModeConfig>
356
+ theme: Partial<ThemeConfig & { extend: Partial<ThemeConfig> }>
357
+ corePlugins: Partial<CorePluginsConfig>
358
+ plugins: Partial<PluginsConfig>
359
+ // Custom
360
+ [key: string]: any
361
+ }
362
+
363
+ export type Config = RequiredConfig & Partial<OptionalConfig>
File without changes
@@ -0,0 +1,276 @@
1
+ export interface DefaultColors {
2
+ inherit: 'inherit'
3
+ current: 'currentColor'
4
+ transparent: 'transparent'
5
+ black: '#000'
6
+ white: '#fff'
7
+ slate: {
8
+ '50': '#f8fafc'
9
+ '100': '#f1f5f9'
10
+ '200': '#e2e8f0'
11
+ '300': '#cbd5e1'
12
+ '400': '#94a3b8'
13
+ '500': '#64748b'
14
+ '600': '#475569'
15
+ '700': '#334155'
16
+ '800': '#1e293b'
17
+ '900': '#0f172a'
18
+ }
19
+ gray: {
20
+ '50': '#f9fafb'
21
+ '100': '#f3f4f6'
22
+ '200': '#e5e7eb'
23
+ '300': '#d1d5db'
24
+ '400': '#9ca3af'
25
+ '500': '#6b7280'
26
+ '600': '#4b5563'
27
+ '700': '#374151'
28
+ '800': '#1f2937'
29
+ '900': '#111827'
30
+ }
31
+ zinc: {
32
+ '50': '#fafafa'
33
+ '100': '#f4f4f5'
34
+ '200': '#e4e4e7'
35
+ '300': '#d4d4d8'
36
+ '400': '#a1a1aa'
37
+ '500': '#71717a'
38
+ '600': '#52525b'
39
+ '700': '#3f3f46'
40
+ '800': '#27272a'
41
+ '900': '#18181b'
42
+ }
43
+ neutral: {
44
+ '50': '#fafafa'
45
+ '100': '#f5f5f5'
46
+ '200': '#e5e5e5'
47
+ '300': '#d4d4d4'
48
+ '400': '#a3a3a3'
49
+ '500': '#737373'
50
+ '600': '#525252'
51
+ '700': '#404040'
52
+ '800': '#262626'
53
+ '900': '#171717'
54
+ }
55
+ stone: {
56
+ '50': '#fafaf9'
57
+ '100': '#f5f5f4'
58
+ '200': '#e7e5e4'
59
+ '300': '#d6d3d1'
60
+ '400': '#a8a29e'
61
+ '500': '#78716c'
62
+ '600': '#57534e'
63
+ '700': '#44403c'
64
+ '800': '#292524'
65
+ '900': '#1c1917'
66
+ }
67
+ red: {
68
+ '50': '#fef2f2'
69
+ '100': '#fee2e2'
70
+ '200': '#fecaca'
71
+ '300': '#fca5a5'
72
+ '400': '#f87171'
73
+ '500': '#ef4444'
74
+ '600': '#dc2626'
75
+ '700': '#b91c1c'
76
+ '800': '#991b1b'
77
+ '900': '#7f1d1d'
78
+ }
79
+ orange: {
80
+ '50': '#fff7ed'
81
+ '100': '#ffedd5'
82
+ '200': '#fed7aa'
83
+ '300': '#fdba74'
84
+ '400': '#fb923c'
85
+ '500': '#f97316'
86
+ '600': '#ea580c'
87
+ '700': '#c2410c'
88
+ '800': '#9a3412'
89
+ '900': '#7c2d12'
90
+ }
91
+ amber: {
92
+ '50': '#fffbeb'
93
+ '100': '#fef3c7'
94
+ '200': '#fde68a'
95
+ '300': '#fcd34d'
96
+ '400': '#fbbf24'
97
+ '500': '#f59e0b'
98
+ '600': '#d97706'
99
+ '700': '#b45309'
100
+ '800': '#92400e'
101
+ '900': '#78350f'
102
+ }
103
+ yellow: {
104
+ '50': '#fefce8'
105
+ '100': '#fef9c3'
106
+ '200': '#fef08a'
107
+ '300': '#fde047'
108
+ '400': '#facc15'
109
+ '500': '#eab308'
110
+ '600': '#ca8a04'
111
+ '700': '#a16207'
112
+ '800': '#854d0e'
113
+ '900': '#713f12'
114
+ }
115
+ lime: {
116
+ '50': '#f7fee7'
117
+ '100': '#ecfccb'
118
+ '200': '#d9f99d'
119
+ '300': '#bef264'
120
+ '400': '#a3e635'
121
+ '500': '#84cc16'
122
+ '600': '#65a30d'
123
+ '700': '#4d7c0f'
124
+ '800': '#3f6212'
125
+ '900': '#365314'
126
+ }
127
+ green: {
128
+ '50': '#f0fdf4'
129
+ '100': '#dcfce7'
130
+ '200': '#bbf7d0'
131
+ '300': '#86efac'
132
+ '400': '#4ade80'
133
+ '500': '#22c55e'
134
+ '600': '#16a34a'
135
+ '700': '#15803d'
136
+ '800': '#166534'
137
+ '900': '#14532d'
138
+ }
139
+ emerald: {
140
+ '50': '#ecfdf5'
141
+ '100': '#d1fae5'
142
+ '200': '#a7f3d0'
143
+ '300': '#6ee7b7'
144
+ '400': '#34d399'
145
+ '500': '#10b981'
146
+ '600': '#059669'
147
+ '700': '#047857'
148
+ '800': '#065f46'
149
+ '900': '#064e3b'
150
+ }
151
+ teal: {
152
+ '50': '#f0fdfa'
153
+ '100': '#ccfbf1'
154
+ '200': '#99f6e4'
155
+ '300': '#5eead4'
156
+ '400': '#2dd4bf'
157
+ '500': '#14b8a6'
158
+ '600': '#0d9488'
159
+ '700': '#0f766e'
160
+ '800': '#115e59'
161
+ '900': '#134e4a'
162
+ }
163
+ cyan: {
164
+ '50': '#ecfeff'
165
+ '100': '#cffafe'
166
+ '200': '#a5f3fc'
167
+ '300': '#67e8f9'
168
+ '400': '#22d3ee'
169
+ '500': '#06b6d4'
170
+ '600': '#0891b2'
171
+ '700': '#0e7490'
172
+ '800': '#155e75'
173
+ '900': '#164e63'
174
+ }
175
+ sky: {
176
+ '50': '#f0f9ff'
177
+ '100': '#e0f2fe'
178
+ '200': '#bae6fd'
179
+ '300': '#7dd3fc'
180
+ '400': '#38bdf8'
181
+ '500': '#0ea5e9'
182
+ '600': '#0284c7'
183
+ '700': '#0369a1'
184
+ '800': '#075985'
185
+ '900': '#0c4a6e'
186
+ }
187
+ blue: {
188
+ '50': '#eff6ff'
189
+ '100': '#dbeafe'
190
+ '200': '#bfdbfe'
191
+ '300': '#93c5fd'
192
+ '400': '#60a5fa'
193
+ '500': '#3b82f6'
194
+ '600': '#2563eb'
195
+ '700': '#1d4ed8'
196
+ '800': '#1e40af'
197
+ '900': '#1e3a8a'
198
+ }
199
+ indigo: {
200
+ '50': '#eef2ff'
201
+ '100': '#e0e7ff'
202
+ '200': '#c7d2fe'
203
+ '300': '#a5b4fc'
204
+ '400': '#818cf8'
205
+ '500': '#6366f1'
206
+ '600': '#4f46e5'
207
+ '700': '#4338ca'
208
+ '800': '#3730a3'
209
+ '900': '#312e81'
210
+ }
211
+ violet: {
212
+ '50': '#f5f3ff'
213
+ '100': '#ede9fe'
214
+ '200': '#ddd6fe'
215
+ '300': '#c4b5fd'
216
+ '400': '#a78bfa'
217
+ '500': '#8b5cf6'
218
+ '600': '#7c3aed'
219
+ '700': '#6d28d9'
220
+ '800': '#5b21b6'
221
+ '900': '#4c1d95'
222
+ }
223
+ purple: {
224
+ '50': '#faf5ff'
225
+ '100': '#f3e8ff'
226
+ '200': '#e9d5ff'
227
+ '300': '#d8b4fe'
228
+ '400': '#c084fc'
229
+ '500': '#a855f7'
230
+ '600': '#9333ea'
231
+ '700': '#7e22ce'
232
+ '800': '#6b21a8'
233
+ '900': '#581c87'
234
+ }
235
+ fuchsia: {
236
+ '50': '#fdf4ff'
237
+ '100': '#fae8ff'
238
+ '200': '#f5d0fe'
239
+ '300': '#f0abfc'
240
+ '400': '#e879f9'
241
+ '500': '#d946ef'
242
+ '600': '#c026d3'
243
+ '700': '#a21caf'
244
+ '800': '#86198f'
245
+ '900': '#701a75'
246
+ }
247
+ pink: {
248
+ '50': '#fdf2f8'
249
+ '100': '#fce7f3'
250
+ '200': '#fbcfe8'
251
+ '300': '#f9a8d4'
252
+ '400': '#f472b6'
253
+ '500': '#ec4899'
254
+ '600': '#db2777'
255
+ '700': '#be185d'
256
+ '800': '#9d174d'
257
+ '900': '#831843'
258
+ }
259
+ rose: {
260
+ '50': '#fff1f2'
261
+ '100': '#ffe4e6'
262
+ '200': '#fecdd3'
263
+ '300': '#fda4af'
264
+ '400': '#fb7185'
265
+ '500': '#f43f5e'
266
+ '600': '#e11d48'
267
+ '700': '#be123c'
268
+ '800': '#9f1239'
269
+ '900': '#881337'
270
+ }
271
+ /** @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
+ /** @deprecated As of Tailwind CSS v3.0, `warmGray` has been renamed to `stone`. Update your configuration file to silence this warning. */ warmGray: DefaultColors['stone']
273
+ /** @deprecated As of Tailwind CSS v3.0, `trueGray` has been renamed to `neutral`. Update your configuration file to silence this warning. */ trueGray: DefaultColors['neutral']
274
+ /** @deprecated As of Tailwind CSS v3.0, `coolGray` has been renamed to `gray`. Update your configuration file to silence this warning. */ coolGray: DefaultColors['gray']
275
+ /** @deprecated As of Tailwind CSS v3.0, `blueGray` has been renamed to `slate`. Update your configuration file to silence this warning. */ blueGray: DefaultColors['slate']
276
+ }
@@ -0,0 +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'