tailwindcss 0.0.0-insiders.f4635e0 → 0.0.0-insiders.f4a2ccd

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 (238) hide show
  1. package/LICENSE +1 -2
  2. package/README.md +15 -7
  3. package/colors.d.ts +3 -0
  4. package/colors.js +2 -304
  5. package/defaultConfig.d.ts +3 -0
  6. package/defaultConfig.js +2 -4
  7. package/defaultTheme.d.ts +4 -0
  8. package/defaultTheme.js +2 -4
  9. package/lib/cli/build/deps.js +54 -0
  10. package/lib/cli/build/index.js +52 -0
  11. package/lib/cli/build/plugin.js +376 -0
  12. package/lib/cli/build/utils.js +78 -0
  13. package/lib/cli/build/watching.js +180 -0
  14. package/lib/cli/help/index.js +71 -0
  15. package/lib/cli/index.js +230 -0
  16. package/lib/cli/init/index.js +61 -0
  17. package/lib/cli-peer-dependencies.js +22 -14
  18. package/lib/cli.js +4 -762
  19. package/lib/corePluginList.js +182 -5
  20. package/lib/corePlugins.js +4109 -2952
  21. package/lib/css/preflight.css +24 -9
  22. package/lib/featureFlags.js +68 -50
  23. package/lib/index.js +5 -30
  24. package/lib/lib/cacheInvalidation.js +90 -0
  25. package/lib/lib/collapseAdjacentRules.js +52 -36
  26. package/lib/lib/collapseDuplicateDeclarations.js +83 -0
  27. package/lib/lib/content.js +177 -0
  28. package/lib/lib/defaultExtractor.js +241 -0
  29. package/lib/lib/detectNesting.js +39 -17
  30. package/lib/lib/evaluateTailwindFunctions.js +203 -161
  31. package/lib/lib/expandApplyAtRules.js +503 -221
  32. package/lib/lib/expandTailwindAtRules.js +255 -243
  33. package/lib/lib/findAtConfigPath.js +44 -0
  34. package/lib/lib/generateRules.js +831 -317
  35. package/lib/lib/getModuleDependencies.js +93 -49
  36. package/lib/lib/load-config.js +36 -0
  37. package/lib/lib/normalizeTailwindDirectives.js +79 -60
  38. package/lib/lib/offsets.js +304 -0
  39. package/lib/lib/partitionApplyAtRules.js +56 -0
  40. package/lib/lib/regex.js +60 -0
  41. package/lib/lib/remap-bitfield.js +87 -0
  42. package/lib/lib/resolveDefaultsAtRules.js +150 -94
  43. package/lib/lib/setupContextUtils.js +1197 -685
  44. package/lib/lib/setupTrackingContext.js +150 -177
  45. package/lib/lib/sharedState.js +70 -21
  46. package/lib/lib/substituteScreenAtRules.js +26 -28
  47. package/lib/oxide/cli/build/deps.js +81 -0
  48. package/lib/oxide/cli/build/index.js +51 -0
  49. package/lib/oxide/cli/build/plugin.js +373 -0
  50. package/lib/oxide/cli/build/utils.js +77 -0
  51. package/lib/oxide/cli/build/watching.js +177 -0
  52. package/lib/oxide/cli/help/index.js +70 -0
  53. package/lib/oxide/cli/index.js +214 -0
  54. package/lib/oxide/cli/init/index.js +50 -0
  55. package/lib/oxide/cli.js +5 -0
  56. package/lib/oxide/postcss-plugin.js +2 -0
  57. package/lib/plugin.js +98 -0
  58. package/{nesting → lib/postcss-plugins/nesting}/README.md +2 -2
  59. package/lib/postcss-plugins/nesting/index.js +19 -0
  60. package/lib/postcss-plugins/nesting/plugin.js +87 -0
  61. package/lib/processTailwindFeatures.js +58 -56
  62. package/lib/public/colors.js +353 -0
  63. package/lib/public/create-plugin.js +15 -0
  64. package/lib/public/default-config.js +16 -0
  65. package/lib/public/default-theme.js +16 -0
  66. package/lib/public/load-config.js +10 -0
  67. package/lib/public/resolve-config.js +22 -0
  68. package/lib/util/applyImportantSelector.js +22 -0
  69. package/lib/util/bigSign.js +7 -6
  70. package/lib/util/buildMediaQuery.js +21 -32
  71. package/lib/util/cloneDeep.js +16 -14
  72. package/lib/util/cloneNodes.js +29 -15
  73. package/lib/util/color.js +104 -66
  74. package/lib/util/configurePlugins.js +17 -15
  75. package/lib/util/createPlugin.js +23 -26
  76. package/lib/util/createUtilityPlugin.js +46 -46
  77. package/lib/util/dataTypes.js +266 -0
  78. package/lib/util/defaults.js +20 -15
  79. package/lib/util/escapeClassName.js +18 -17
  80. package/lib/util/escapeCommas.js +7 -6
  81. package/lib/util/flattenColorPalette.js +13 -12
  82. package/lib/util/formatVariantSelector.js +341 -0
  83. package/lib/util/getAllConfigs.js +44 -18
  84. package/lib/util/hashConfig.js +15 -12
  85. package/lib/util/isKeyframeRule.js +7 -6
  86. package/lib/util/isPlainObject.js +11 -11
  87. package/lib/util/isSyntacticallyValidPropertyValue.js +72 -0
  88. package/lib/util/log.js +52 -33
  89. package/lib/util/nameClass.js +35 -29
  90. package/lib/util/negateValue.js +31 -17
  91. package/lib/util/normalizeConfig.js +294 -0
  92. package/lib/util/normalizeScreens.js +170 -0
  93. package/lib/util/parseAnimationValue.js +85 -54
  94. package/lib/util/parseBoxShadowValue.js +84 -0
  95. package/lib/util/parseDependency.js +41 -70
  96. package/lib/util/parseGlob.js +34 -0
  97. package/lib/util/parseObjectStyles.js +30 -24
  98. package/lib/util/pluginUtils.js +234 -288
  99. package/lib/util/prefixSelector.js +33 -19
  100. package/lib/util/removeAlphaVariables.js +29 -0
  101. package/lib/util/resolveConfig.js +221 -256
  102. package/lib/util/resolveConfigPath.js +55 -48
  103. package/lib/util/responsive.js +18 -14
  104. package/lib/util/splitAtTopLevelOnly.js +49 -0
  105. package/lib/util/tap.js +8 -7
  106. package/lib/util/toColorValue.js +7 -6
  107. package/lib/util/toPath.js +27 -8
  108. package/lib/util/transformThemeValue.js +67 -28
  109. package/lib/util/validateConfig.js +24 -0
  110. package/lib/util/validateFormalSyntax.js +24 -0
  111. package/lib/util/withAlphaVariable.js +67 -57
  112. package/loadConfig.d.ts +4 -0
  113. package/loadConfig.js +2 -0
  114. package/nesting/index.js +2 -12
  115. package/package.json +69 -66
  116. package/peers/index.js +76328 -84169
  117. package/plugin.d.ts +11 -0
  118. package/plugin.js +1 -2
  119. package/resolveConfig.d.ts +12 -0
  120. package/resolveConfig.js +2 -7
  121. package/scripts/create-plugin-list.js +2 -2
  122. package/scripts/generate-types.js +105 -0
  123. package/scripts/release-channel.js +18 -0
  124. package/scripts/release-notes.js +21 -0
  125. package/scripts/swap-engines.js +40 -0
  126. package/scripts/type-utils.js +27 -0
  127. package/src/cli/build/deps.js +56 -0
  128. package/src/cli/build/index.js +49 -0
  129. package/src/cli/build/plugin.js +444 -0
  130. package/src/cli/build/utils.js +76 -0
  131. package/src/cli/build/watching.js +229 -0
  132. package/src/cli/help/index.js +70 -0
  133. package/src/cli/index.js +216 -0
  134. package/src/cli/init/index.js +79 -0
  135. package/src/cli-peer-dependencies.js +7 -1
  136. package/src/cli.js +4 -756
  137. package/src/corePluginList.js +1 -1
  138. package/src/corePlugins.js +2526 -1956
  139. package/src/css/preflight.css +24 -9
  140. package/src/featureFlags.js +33 -10
  141. package/src/index.js +4 -33
  142. package/src/lib/cacheInvalidation.js +52 -0
  143. package/src/lib/collapseAdjacentRules.js +21 -2
  144. package/src/lib/collapseDuplicateDeclarations.js +93 -0
  145. package/src/lib/content.js +208 -0
  146. package/src/lib/defaultExtractor.js +217 -0
  147. package/src/lib/detectNesting.js +30 -3
  148. package/src/lib/evaluateTailwindFunctions.js +84 -10
  149. package/src/lib/expandApplyAtRules.js +509 -153
  150. package/src/lib/expandTailwindAtRules.js +125 -104
  151. package/src/lib/findAtConfigPath.js +48 -0
  152. package/src/lib/generateRules.js +678 -70
  153. package/src/lib/getModuleDependencies.js +70 -30
  154. package/src/lib/load-config.ts +27 -0
  155. package/src/lib/normalizeTailwindDirectives.js +10 -3
  156. package/src/lib/offsets.js +373 -0
  157. package/src/lib/partitionApplyAtRules.js +52 -0
  158. package/src/lib/regex.js +74 -0
  159. package/src/lib/remap-bitfield.js +82 -0
  160. package/src/lib/resolveDefaultsAtRules.js +105 -47
  161. package/src/lib/setupContextUtils.js +848 -247
  162. package/src/lib/setupTrackingContext.js +53 -64
  163. package/src/lib/sharedState.js +60 -6
  164. package/src/lib/substituteScreenAtRules.js +6 -3
  165. package/src/oxide/cli/build/deps.ts +91 -0
  166. package/src/oxide/cli/build/index.ts +47 -0
  167. package/src/oxide/cli/build/plugin.ts +442 -0
  168. package/src/oxide/cli/build/utils.ts +74 -0
  169. package/src/oxide/cli/build/watching.ts +225 -0
  170. package/src/oxide/cli/help/index.ts +69 -0
  171. package/src/oxide/cli/index.ts +204 -0
  172. package/src/oxide/cli/init/index.ts +59 -0
  173. package/src/oxide/cli.ts +1 -0
  174. package/src/oxide/postcss-plugin.ts +1 -0
  175. package/src/plugin.js +107 -0
  176. package/src/postcss-plugins/nesting/README.md +42 -0
  177. package/src/postcss-plugins/nesting/index.js +13 -0
  178. package/src/postcss-plugins/nesting/plugin.js +80 -0
  179. package/src/processTailwindFeatures.js +18 -3
  180. package/src/public/colors.js +322 -0
  181. package/src/public/create-plugin.js +2 -0
  182. package/src/public/default-config.js +4 -0
  183. package/src/public/default-theme.js +4 -0
  184. package/src/public/load-config.js +2 -0
  185. package/src/public/resolve-config.js +7 -0
  186. package/src/util/applyImportantSelector.js +19 -0
  187. package/src/util/buildMediaQuery.js +14 -16
  188. package/src/util/cloneNodes.js +19 -2
  189. package/src/util/color.js +43 -11
  190. package/src/util/createUtilityPlugin.js +2 -11
  191. package/src/util/dataTypes.js +281 -0
  192. package/src/util/defaults.js +6 -0
  193. package/src/util/formatVariantSelector.js +412 -0
  194. package/src/util/getAllConfigs.js +21 -2
  195. package/src/util/isSyntacticallyValidPropertyValue.js +61 -0
  196. package/src/util/log.js +23 -22
  197. package/src/util/nameClass.js +6 -2
  198. package/src/util/negateValue.js +15 -5
  199. package/src/util/normalizeConfig.js +318 -0
  200. package/src/util/normalizeScreens.js +140 -0
  201. package/src/util/parseAnimationValue.js +7 -1
  202. package/src/util/parseBoxShadowValue.js +72 -0
  203. package/src/util/parseDependency.js +37 -38
  204. package/src/util/parseGlob.js +24 -0
  205. package/src/util/pluginUtils.js +219 -219
  206. package/src/util/prefixSelector.js +30 -13
  207. package/src/util/removeAlphaVariables.js +24 -0
  208. package/src/util/resolveConfig.js +86 -91
  209. package/src/util/resolveConfigPath.js +12 -1
  210. package/src/util/splitAtTopLevelOnly.js +52 -0
  211. package/src/util/toPath.js +23 -1
  212. package/src/util/transformThemeValue.js +33 -8
  213. package/src/util/validateConfig.js +13 -0
  214. package/src/util/validateFormalSyntax.js +34 -0
  215. package/src/util/withAlphaVariable.js +14 -9
  216. package/stubs/.gitignore +1 -0
  217. package/stubs/.prettierrc.json +6 -0
  218. package/stubs/{defaultConfig.stub.js → config.full.js} +332 -249
  219. package/stubs/{simpleConfig.stub.js → config.simple.js} +0 -1
  220. package/stubs/postcss.config.js +6 -0
  221. package/stubs/tailwind.config.cjs +2 -0
  222. package/stubs/tailwind.config.js +2 -0
  223. package/stubs/tailwind.config.ts +3 -0
  224. package/types/config.d.ts +373 -0
  225. package/types/generated/.gitkeep +0 -0
  226. package/types/generated/colors.d.ts +298 -0
  227. package/types/generated/corePluginList.d.ts +1 -0
  228. package/types/generated/default-theme.d.ts +347 -0
  229. package/types/index.d.ts +7 -0
  230. package/CHANGELOG.md +0 -1742
  231. package/lib/constants.js +0 -37
  232. package/lib/lib/setupWatchingContext.js +0 -331
  233. package/nesting/plugin.js +0 -41
  234. package/scripts/install-integrations.js +0 -27
  235. package/scripts/rebuildFixtures.js +0 -68
  236. package/src/constants.js +0 -17
  237. package/src/lib/setupWatchingContext.js +0 -307
  238. /package/stubs/{defaultPostCssConfig.stub.js → postcss.config.cjs} +0 -0
@@ -1,6 +1,5 @@
1
1
  module.exports = {
2
2
  content: [],
3
- darkMode: 'media', // or 'class'
4
3
  theme: {
5
4
  extend: {},
6
5
  },
@@ -0,0 +1,6 @@
1
+ export default {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {},
5
+ },
6
+ }
@@ -0,0 +1,2 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ module.exports = __CONFIG__
@@ -0,0 +1,2 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ export default __CONFIG__
@@ -0,0 +1,3 @@
1
+ import type { Config } from 'tailwindcss'
2
+
3
+ export default __CONFIG__ satisfies Config
@@ -0,0 +1,373 @@
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
+ // Blocklist related config
57
+ type BlocklistConfig = string[]
58
+
59
+ // Presets related config
60
+ type PresetsConfig = Config[]
61
+
62
+ // Future related config
63
+ type FutureConfigValues =
64
+ | 'hoverOnlyWhenSupported'
65
+ | 'respectDefaultRingColorOpacity'
66
+ | 'disableColorOpacityUtilitiesByDefault'
67
+ | 'relativeContentPathsByDefault'
68
+ type FutureConfig = Expand<'all' | Partial<Record<FutureConfigValues, boolean>>> | []
69
+
70
+ // Experimental related config
71
+ type ExperimentalConfigValues = 'optimizeUniversalDefaults' | 'matchVariant'
72
+ type ExperimentalConfig = Expand<'all' | Partial<Record<ExperimentalConfigValues, boolean>>> | []
73
+
74
+ // DarkMode related config
75
+ type DarkModeConfig =
76
+ // Use the `media` query strategy.
77
+ | 'media'
78
+ // Use the `class` strategy, which requires a `.dark` class on the `html`.
79
+ | 'class'
80
+ // Use the `class` strategy with a custom class instead of `.dark`.
81
+ | ['class', string]
82
+
83
+ type Screen = { raw: string } | { min: string } | { max: string } | { min: string; max: string }
84
+ type ScreensConfig = string[] | KeyValuePair<string, string | Screen | Screen[]>
85
+
86
+ // Theme related config
87
+ interface ThemeConfig {
88
+ // Responsiveness
89
+ screens: ResolvableTo<ScreensConfig>
90
+ supports: ResolvableTo<Record<string, string>>
91
+ data: ResolvableTo<Record<string, string>>
92
+
93
+ // Reusable base configs
94
+ colors: ResolvableTo<RecursiveKeyValuePair>
95
+ spacing: ResolvableTo<KeyValuePair>
96
+
97
+ // Components
98
+ container: ResolvableTo<
99
+ Partial<{
100
+ screens: ScreensConfig
101
+ center: boolean
102
+ padding: string | Record<string, string>
103
+ }>
104
+ >
105
+
106
+ // Utilities
107
+ inset: ThemeConfig['spacing']
108
+ zIndex: ResolvableTo<KeyValuePair>
109
+ order: ResolvableTo<KeyValuePair>
110
+ gridColumn: ResolvableTo<KeyValuePair>
111
+ gridColumnStart: ResolvableTo<KeyValuePair>
112
+ gridColumnEnd: ResolvableTo<KeyValuePair>
113
+ gridRow: ResolvableTo<KeyValuePair>
114
+ gridRowStart: ResolvableTo<KeyValuePair>
115
+ gridRowEnd: ResolvableTo<KeyValuePair>
116
+ margin: ThemeConfig['spacing']
117
+ aspectRatio: ResolvableTo<KeyValuePair>
118
+ height: ThemeConfig['spacing']
119
+ maxHeight: ThemeConfig['spacing']
120
+ minHeight: ResolvableTo<KeyValuePair>
121
+ width: ThemeConfig['spacing']
122
+ maxWidth: ResolvableTo<KeyValuePair>
123
+ minWidth: ResolvableTo<KeyValuePair>
124
+ flex: ResolvableTo<KeyValuePair>
125
+ flexShrink: ResolvableTo<KeyValuePair>
126
+ flexGrow: ResolvableTo<KeyValuePair>
127
+ flexBasis: ThemeConfig['spacing']
128
+ borderSpacing: ThemeConfig['spacing']
129
+ transformOrigin: ResolvableTo<KeyValuePair>
130
+ translate: ThemeConfig['spacing']
131
+ rotate: ResolvableTo<KeyValuePair>
132
+ skew: ResolvableTo<KeyValuePair>
133
+ scale: ResolvableTo<KeyValuePair>
134
+ animation: ResolvableTo<KeyValuePair>
135
+ keyframes: ResolvableTo<KeyValuePair<string, KeyValuePair<string, KeyValuePair>>>
136
+ cursor: ResolvableTo<KeyValuePair>
137
+ scrollMargin: ThemeConfig['spacing']
138
+ scrollPadding: ThemeConfig['spacing']
139
+ listStyleType: ResolvableTo<KeyValuePair>
140
+ columns: ResolvableTo<KeyValuePair>
141
+ gridAutoColumns: ResolvableTo<KeyValuePair>
142
+ gridAutoRows: ResolvableTo<KeyValuePair>
143
+ gridTemplateColumns: ResolvableTo<KeyValuePair>
144
+ gridTemplateRows: ResolvableTo<KeyValuePair>
145
+ gap: ThemeConfig['spacing']
146
+ space: ThemeConfig['spacing']
147
+ divideWidth: ThemeConfig['borderWidth']
148
+ divideColor: ThemeConfig['borderColor']
149
+ divideOpacity: ThemeConfig['borderOpacity']
150
+ borderRadius: ResolvableTo<KeyValuePair>
151
+ borderWidth: ResolvableTo<KeyValuePair>
152
+ borderColor: ThemeConfig['colors']
153
+ borderOpacity: ThemeConfig['opacity']
154
+ backgroundColor: ThemeConfig['colors']
155
+ backgroundOpacity: ThemeConfig['opacity']
156
+ backgroundImage: ResolvableTo<KeyValuePair>
157
+ gradientColorStops: ThemeConfig['colors']
158
+ backgroundSize: ResolvableTo<KeyValuePair>
159
+ backgroundPosition: ResolvableTo<KeyValuePair>
160
+ fill: ThemeConfig['colors']
161
+ stroke: ThemeConfig['colors']
162
+ strokeWidth: ResolvableTo<KeyValuePair>
163
+ objectPosition: ResolvableTo<KeyValuePair>
164
+ padding: ThemeConfig['spacing']
165
+ textIndent: ThemeConfig['spacing']
166
+ fontFamily: ResolvableTo<
167
+ KeyValuePair<
168
+ string,
169
+ | string
170
+ | string[]
171
+ | [
172
+ fontFamily: string | string[],
173
+ configuration: Partial<{
174
+ fontFeatureSettings: string
175
+ fontVariationSettings: string
176
+ }>
177
+ ]
178
+ >
179
+ >
180
+ fontSize: ResolvableTo<
181
+ KeyValuePair<
182
+ string,
183
+ | string
184
+ | [fontSize: string, lineHeight: string]
185
+ | [
186
+ fontSize: string,
187
+ configuration: Partial<{
188
+ lineHeight: string
189
+ letterSpacing: string
190
+ fontWeight: string | number
191
+ }>
192
+ ]
193
+ >
194
+ >
195
+ fontWeight: ResolvableTo<KeyValuePair>
196
+ lineHeight: ResolvableTo<KeyValuePair>
197
+ letterSpacing: ResolvableTo<KeyValuePair>
198
+ textColor: ThemeConfig['colors']
199
+ textOpacity: ThemeConfig['opacity']
200
+ textDecorationColor: ThemeConfig['colors']
201
+ textDecorationThickness: ResolvableTo<KeyValuePair>
202
+ textUnderlineOffset: ResolvableTo<KeyValuePair>
203
+ placeholderColor: ThemeConfig['colors']
204
+ placeholderOpacity: ThemeConfig['opacity']
205
+ caretColor: ThemeConfig['colors']
206
+ accentColor: ThemeConfig['colors']
207
+ opacity: ResolvableTo<KeyValuePair>
208
+ boxShadow: ResolvableTo<KeyValuePair>
209
+ boxShadowColor: ThemeConfig['colors']
210
+ outlineWidth: ResolvableTo<KeyValuePair>
211
+ outlineOffset: ResolvableTo<KeyValuePair>
212
+ outlineColor: ThemeConfig['colors']
213
+ ringWidth: ResolvableTo<KeyValuePair>
214
+ ringColor: ThemeConfig['colors']
215
+ ringOpacity: ThemeConfig['opacity']
216
+ ringOffsetWidth: ResolvableTo<KeyValuePair>
217
+ ringOffsetColor: ThemeConfig['colors']
218
+ blur: ResolvableTo<KeyValuePair>
219
+ brightness: ResolvableTo<KeyValuePair>
220
+ contrast: ResolvableTo<KeyValuePair>
221
+ dropShadow: ResolvableTo<KeyValuePair<string, string | string[]>>
222
+ grayscale: ResolvableTo<KeyValuePair>
223
+ hueRotate: ResolvableTo<KeyValuePair>
224
+ invert: ResolvableTo<KeyValuePair>
225
+ saturate: ResolvableTo<KeyValuePair>
226
+ sepia: ResolvableTo<KeyValuePair>
227
+ backdropBlur: ThemeConfig['blur']
228
+ backdropBrightness: ThemeConfig['brightness']
229
+ backdropContrast: ThemeConfig['contrast']
230
+ backdropGrayscale: ThemeConfig['grayscale']
231
+ backdropHueRotate: ThemeConfig['hueRotate']
232
+ backdropInvert: ThemeConfig['invert']
233
+ backdropOpacity: ThemeConfig['opacity']
234
+ backdropSaturate: ThemeConfig['saturate']
235
+ backdropSepia: ThemeConfig['sepia']
236
+ transitionProperty: ResolvableTo<KeyValuePair>
237
+ transitionTimingFunction: ResolvableTo<KeyValuePair>
238
+ transitionDelay: ResolvableTo<KeyValuePair>
239
+ transitionDuration: ResolvableTo<KeyValuePair>
240
+ willChange: ResolvableTo<KeyValuePair>
241
+ content: ResolvableTo<KeyValuePair>
242
+
243
+ // Custom
244
+ [key: string]: any
245
+ }
246
+
247
+ // Core plugins related config
248
+ type CorePluginsConfig = CorePluginList[] | Expand<Partial<Record<CorePluginList, boolean>>>
249
+
250
+ // Plugins related config
251
+ type ValueType =
252
+ | 'any'
253
+ | 'color'
254
+ | 'url'
255
+ | 'image'
256
+ | 'length'
257
+ | 'percentage'
258
+ | 'position'
259
+ | 'lookup'
260
+ | 'generic-name'
261
+ | 'family-name'
262
+ | 'number'
263
+ | 'line-width'
264
+ | 'absolute-size'
265
+ | 'relative-size'
266
+ | 'shadow'
267
+ export interface PluginAPI {
268
+ // for registering new static utility styles
269
+ addUtilities(
270
+ utilities: CSSRuleObject | CSSRuleObject[],
271
+ options?: Partial<{
272
+ respectPrefix: boolean
273
+ respectImportant: boolean
274
+ }>
275
+ ): void
276
+ // for registering new dynamic utility styles
277
+ matchUtilities<T = string, U = string>(
278
+ utilities: KeyValuePair<
279
+ string,
280
+ (value: T | string, extra: { modifier: U | string | null }) => CSSRuleObject | null
281
+ >,
282
+ options?: Partial<{
283
+ respectPrefix: boolean
284
+ respectImportant: boolean
285
+ type: ValueType | ValueType[]
286
+ values: KeyValuePair<string, T>
287
+ modifiers: 'any' | KeyValuePair<string, U>
288
+ supportsNegativeValues: boolean
289
+ }>
290
+ ): void
291
+ // for registering new static component styles
292
+ addComponents(
293
+ components: CSSRuleObject | CSSRuleObject[],
294
+ options?: Partial<{
295
+ respectPrefix: boolean
296
+ respectImportant: boolean
297
+ }>
298
+ ): void
299
+ // for registering new dynamic component styles
300
+ matchComponents<T = string, U = string>(
301
+ components: KeyValuePair<
302
+ string,
303
+ (value: T | string, extra: { modifier: U | string | null }) => CSSRuleObject | null
304
+ >,
305
+ options?: Partial<{
306
+ respectPrefix: boolean
307
+ respectImportant: boolean
308
+ type: ValueType | ValueType[]
309
+ values: KeyValuePair<string, T>
310
+ modifiers: 'any' | KeyValuePair<string, U>
311
+ supportsNegativeValues: boolean
312
+ }>
313
+ ): void
314
+ // for registering new base styles
315
+ addBase(base: CSSRuleObject | CSSRuleObject[]): void
316
+ // for registering custom variants
317
+ addVariant(name: string, definition: string | string[] | (() => string) | (() => string)[]): void
318
+ matchVariant<T = string>(
319
+ name: string,
320
+ cb: (value: T | string, extra: { modifier: string | null }) => string | string[],
321
+ options?: {
322
+ values?: KeyValuePair<string, T>
323
+ sort?(
324
+ a: { value: T | string; modifier: string | null },
325
+ b: { value: T | string; modifier: string | null }
326
+ ): number
327
+ }
328
+ ): void
329
+ // for looking up values in the user’s theme configuration
330
+ theme: <TDefaultValue = Config['theme']>(
331
+ path?: string,
332
+ defaultValue?: TDefaultValue
333
+ ) => TDefaultValue
334
+ // for looking up values in the user’s Tailwind configuration
335
+ config: <TDefaultValue = Config>(path?: string, defaultValue?: TDefaultValue) => TDefaultValue
336
+ // for checking if a core plugin is enabled
337
+ corePlugins(path: string): boolean
338
+ // for manually escaping strings meant to be used in class names
339
+ e: (className: string) => string
340
+ }
341
+ export type PluginCreator = (api: PluginAPI) => void
342
+ export type PluginsConfig = (
343
+ | PluginCreator
344
+ | { handler: PluginCreator; config?: Partial<Config> }
345
+ | {
346
+ (options: any): { handler: PluginCreator; config?: Partial<Config> }
347
+ __isOptionsFunction: true
348
+ }
349
+ )[]
350
+
351
+ // Top level config related
352
+ interface RequiredConfig {
353
+ content: ContentConfig
354
+ }
355
+
356
+ interface OptionalConfig {
357
+ important: Partial<ImportantConfig>
358
+ prefix: Partial<PrefixConfig>
359
+ separator: Partial<SeparatorConfig>
360
+ safelist: Partial<SafelistConfig>
361
+ blocklist: Partial<BlocklistConfig>
362
+ presets: Partial<PresetsConfig>
363
+ future: Partial<FutureConfig>
364
+ experimental: Partial<ExperimentalConfig>
365
+ darkMode: Partial<DarkModeConfig>
366
+ theme: Partial<ThemeConfig & { extend: Partial<ThemeConfig> }>
367
+ corePlugins: Partial<CorePluginsConfig>
368
+ plugins: Partial<PluginsConfig>
369
+ // Custom
370
+ [key: string]: any
371
+ }
372
+
373
+ 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
+ }