tailwindcss 0.0.0-insiders.d3e754a → 0.0.0-insiders.d3f2221

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