tailwindcss 0.0.0-insiders.ddec022 → 0.0.0-insiders.de00a62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli/build/plugin.js +6 -6
- package/lib/cli/build/watching.js +1 -1
- package/lib/corePluginList.js +5 -1
- package/lib/corePlugins.js +170 -13
- package/lib/css/preflight.css +24 -8
- package/lib/lib/content.js +36 -3
- package/lib/lib/defaultExtractor.js +33 -25
- package/lib/lib/evaluateTailwindFunctions.js +5 -3
- package/lib/lib/expandApplyAtRules.js +6 -0
- package/lib/lib/expandTailwindAtRules.js +23 -6
- package/lib/lib/generateRules.js +47 -25
- package/lib/lib/load-config.js +14 -3
- package/lib/lib/offsets.js +51 -2
- package/lib/lib/resolveDefaultsAtRules.js +3 -1
- package/lib/lib/setupContextUtils.js +76 -37
- package/lib/lib/setupTrackingContext.js +2 -1
- package/lib/oxide/cli/build/plugin.js +6 -6
- package/lib/plugin.js +3 -3
- package/lib/processTailwindFeatures.js +2 -2
- package/lib/util/cloneNodes.js +33 -13
- package/lib/util/color.js +1 -1
- package/lib/util/dataTypes.js +135 -16
- package/lib/util/formatVariantSelector.js +10 -3
- package/lib/util/isPlainObject.js +1 -1
- package/lib/util/pluginUtils.js +13 -0
- package/lib/util/prefixSelector.js +1 -1
- package/lib/util/pseudoElements.js +21 -34
- package/lib/value-parser/LICENSE +22 -0
- package/lib/value-parser/README.md +3 -0
- package/lib/value-parser/index.d.js +2 -0
- package/lib/value-parser/index.js +22 -0
- package/lib/value-parser/parse.js +259 -0
- package/lib/value-parser/stringify.js +38 -0
- package/lib/value-parser/unit.js +86 -0
- package/lib/value-parser/walk.js +16 -0
- package/nesting/index.d.ts +4 -0
- package/package.json +5 -6
- package/peers/index.js +701 -617
- package/resolveConfig.d.ts +22 -3
- package/scripts/generate-types.js +1 -2
- package/src/cli/build/plugin.js +6 -6
- package/src/cli/build/watching.js +1 -1
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +149 -12
- package/src/css/preflight.css +24 -8
- package/src/featureFlags.js +1 -5
- package/src/lib/content.js +42 -1
- package/src/lib/defaultExtractor.js +30 -17
- package/src/lib/evaluateTailwindFunctions.js +4 -1
- package/src/lib/expandApplyAtRules.js +7 -0
- package/src/lib/expandTailwindAtRules.js +23 -6
- package/src/lib/generateRules.js +50 -26
- package/src/lib/load-config.ts +8 -0
- package/src/lib/offsets.js +61 -2
- package/src/lib/resolveDefaultsAtRules.js +5 -1
- package/src/lib/setupContextUtils.js +77 -38
- package/src/lib/setupTrackingContext.js +1 -3
- package/src/oxide/cli/build/plugin.ts +6 -6
- package/src/plugin.js +3 -3
- package/src/processTailwindFeatures.js +3 -2
- package/src/util/cloneNodes.js +35 -14
- package/src/util/color.js +1 -1
- package/src/util/dataTypes.js +143 -18
- package/src/util/formatVariantSelector.js +11 -3
- package/src/util/isPlainObject.js +1 -1
- package/src/util/pluginUtils.js +16 -0
- package/src/util/prefixSelector.js +1 -0
- package/src/util/pseudoElements.js +18 -17
- package/src/value-parser/LICENSE +22 -0
- package/src/value-parser/README.md +3 -0
- package/src/value-parser/index.d.ts +177 -0
- package/src/value-parser/index.js +28 -0
- package/src/value-parser/parse.js +303 -0
- package/src/value-parser/stringify.js +41 -0
- package/src/value-parser/unit.js +118 -0
- package/src/value-parser/walk.js +18 -0
- package/stubs/config.full.js +86 -14
- package/types/config.d.ts +17 -9
- package/types/generated/corePluginList.d.ts +1 -1
- package/types/generated/default-theme.d.ts +35 -9
- package/types/index.d.ts +7 -3
package/types/config.d.ts
CHANGED
|
@@ -46,13 +46,13 @@ type PrefixConfig = string
|
|
|
46
46
|
type SeparatorConfig = string
|
|
47
47
|
|
|
48
48
|
// Safelist related config
|
|
49
|
-
type SafelistConfig =
|
|
49
|
+
type SafelistConfig = string | { pattern: RegExp; variants?: string[] }
|
|
50
50
|
|
|
51
51
|
// Blocklist related config
|
|
52
|
-
type BlocklistConfig = string
|
|
52
|
+
type BlocklistConfig = string
|
|
53
53
|
|
|
54
54
|
// Presets related config
|
|
55
|
-
type PresetsConfig = Config
|
|
55
|
+
type PresetsConfig = Partial<Config>
|
|
56
56
|
|
|
57
57
|
// Future related config
|
|
58
58
|
type FutureConfigValues =
|
|
@@ -74,12 +74,19 @@ type DarkModeConfig =
|
|
|
74
74
|
| 'class'
|
|
75
75
|
// Use the `class` strategy with a custom class instead of `.dark`.
|
|
76
76
|
| ['class', string]
|
|
77
|
+
// Use the `selector` strategy — same as `class` but uses `:where()` for more predicable behavior
|
|
78
|
+
| 'selector'
|
|
79
|
+
// Use the `selector` strategy with a custom selector instead of `.dark`.
|
|
80
|
+
| ['selector', string]
|
|
81
|
+
// Use the `variant` strategy, which allows you to completely customize the selector
|
|
82
|
+
// It takes a string or an array of strings, which are passed directly to `addVariant()`
|
|
83
|
+
| ['variant', string | string[]]
|
|
77
84
|
|
|
78
85
|
type Screen = { raw: string } | { min: string } | { max: string } | { min: string; max: string }
|
|
79
86
|
type ScreensConfig = string[] | KeyValuePair<string, string | Screen | Screen[]>
|
|
80
87
|
|
|
81
88
|
// Theme related config
|
|
82
|
-
interface ThemeConfig {
|
|
89
|
+
export interface ThemeConfig {
|
|
83
90
|
// Responsiveness
|
|
84
91
|
screens: ResolvableTo<ScreensConfig>
|
|
85
92
|
supports: ResolvableTo<Record<string, string>>
|
|
@@ -234,8 +241,9 @@ interface ThemeConfig {
|
|
|
234
241
|
transitionDuration: ResolvableTo<KeyValuePair>
|
|
235
242
|
willChange: ResolvableTo<KeyValuePair>
|
|
236
243
|
content: ResolvableTo<KeyValuePair>
|
|
244
|
+
}
|
|
237
245
|
|
|
238
|
-
|
|
246
|
+
interface CustomThemeConfig extends ThemeConfig {
|
|
239
247
|
[key: string]: any
|
|
240
248
|
}
|
|
241
249
|
|
|
@@ -352,13 +360,13 @@ interface OptionalConfig {
|
|
|
352
360
|
important: Partial<ImportantConfig>
|
|
353
361
|
prefix: Partial<PrefixConfig>
|
|
354
362
|
separator: Partial<SeparatorConfig>
|
|
355
|
-
safelist:
|
|
356
|
-
blocklist:
|
|
357
|
-
presets:
|
|
363
|
+
safelist: Array<SafelistConfig>
|
|
364
|
+
blocklist: Array<BlocklistConfig>
|
|
365
|
+
presets: Array<PresetsConfig>
|
|
358
366
|
future: Partial<FutureConfig>
|
|
359
367
|
experimental: Partial<ExperimentalConfig>
|
|
360
368
|
darkMode: Partial<DarkModeConfig>
|
|
361
|
-
theme: Partial<
|
|
369
|
+
theme: Partial<CustomThemeConfig & { extend: Partial<CustomThemeConfig> }>
|
|
362
370
|
corePlugins: Partial<CorePluginsConfig>
|
|
363
371
|
plugins: Partial<PluginsConfig>
|
|
364
372
|
// Custom
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type CorePluginList = 'preflight' | 'container' | 'accessibility' | 'pointerEvents' | 'visibility' | 'position' | 'inset' | 'isolation' | 'zIndex' | 'order' | 'gridColumn' | 'gridColumnStart' | 'gridColumnEnd' | 'gridRow' | 'gridRowStart' | 'gridRowEnd' | 'float' | 'clear' | 'margin' | 'boxSizing' | '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' | 'wordBreak' | 'borderRadius' | 'borderWidth' | 'borderStyle' | 'borderColor' | 'borderOpacity' | 'backgroundColor' | 'backgroundOpacity' | 'backgroundImage' | 'gradientColorStops' | 'boxDecorationBreak' | 'backgroundSize' | 'backgroundAttachment' | 'backgroundClip' | 'backgroundPosition' | 'backgroundRepeat' | 'backgroundOrigin' | 'fill' | 'stroke' | 'strokeWidth' | 'objectFit' | 'objectPosition' | 'padding' | 'textAlign' | 'textIndent' | 'verticalAlign' | 'fontFamily' | 'fontSize' | 'fontWeight' | 'textTransform' | 'fontStyle' | 'fontVariantNumeric' | 'lineHeight' | 'letterSpacing' | 'textColor' | 'textOpacity' | 'textDecoration' | 'textDecorationColor' | 'textDecorationStyle' | 'textDecorationThickness' | 'textUnderlineOffset' | 'fontSmoothing' | 'placeholderColor' | 'placeholderOpacity' | 'caretColor' | 'accentColor' | 'opacity' | 'backgroundBlendMode' | 'mixBlendMode' | 'boxShadow' | 'boxShadowColor' | 'outlineStyle' | 'outlineWidth' | 'outlineOffset' | 'outlineColor' | 'ringWidth' | 'ringColor' | 'ringOpacity' | 'ringOffsetWidth' | 'ringOffsetColor' | 'blur' | 'brightness' | 'contrast' | 'dropShadow' | 'grayscale' | 'hueRotate' | 'invert' | 'saturate' | 'sepia' | 'filter' | 'backdropBlur' | 'backdropBrightness' | 'backdropContrast' | 'backdropGrayscale' | 'backdropHueRotate' | 'backdropInvert' | 'backdropOpacity' | 'backdropSaturate' | 'backdropSepia' | 'backdropFilter' | 'transitionProperty' | 'transitionDelay' | 'transitionDuration' | 'transitionTimingFunction' | 'willChange' | 'content'
|
|
1
|
+
export type CorePluginList = 'preflight' | 'container' | 'accessibility' | 'pointerEvents' | 'visibility' | 'position' | 'inset' | 'isolation' | 'zIndex' | 'order' | 'gridColumn' | 'gridColumnStart' | 'gridColumnEnd' | 'gridRow' | 'gridRowStart' | 'gridRowEnd' | 'float' | 'clear' | 'margin' | 'boxSizing' | 'lineClamp' | 'display' | 'aspectRatio' | 'size' | 'height' | 'maxHeight' | 'minHeight' | 'width' | 'minWidth' | 'maxWidth' | 'flex' | 'flexShrink' | 'flexGrow' | 'flexBasis' | 'tableLayout' | 'captionSide' | 'borderCollapse' | 'borderSpacing' | 'transformOrigin' | 'translate' | 'rotate' | 'skew' | 'scale' | 'transform' | 'animation' | 'cursor' | 'touchAction' | 'userSelect' | 'resize' | 'scrollSnapType' | 'scrollSnapAlign' | 'scrollSnapStop' | 'scrollMargin' | 'scrollPadding' | 'listStylePosition' | 'listStyleType' | 'listStyleImage' | 'appearance' | 'columns' | 'breakBefore' | 'breakInside' | 'breakAfter' | 'gridAutoColumns' | 'gridAutoFlow' | 'gridAutoRows' | 'gridTemplateColumns' | 'gridTemplateRows' | 'flexDirection' | 'flexWrap' | 'placeContent' | 'placeItems' | 'alignContent' | 'alignItems' | 'justifyContent' | 'justifyItems' | 'gap' | 'space' | 'divideWidth' | 'divideStyle' | 'divideColor' | 'divideOpacity' | 'placeSelf' | 'alignSelf' | 'justifySelf' | 'overflow' | 'overscrollBehavior' | 'scrollBehavior' | 'textOverflow' | 'hyphens' | 'whitespace' | 'textWrap' | 'wordBreak' | 'borderRadius' | 'borderWidth' | 'borderStyle' | 'borderColor' | 'borderOpacity' | 'backgroundColor' | 'backgroundOpacity' | 'backgroundImage' | 'gradientColorStops' | 'boxDecorationBreak' | 'backgroundSize' | 'backgroundAttachment' | 'backgroundClip' | 'backgroundPosition' | 'backgroundRepeat' | 'backgroundOrigin' | 'fill' | 'stroke' | 'strokeWidth' | 'objectFit' | 'objectPosition' | 'padding' | 'textAlign' | 'textIndent' | 'verticalAlign' | 'fontFamily' | 'fontSize' | 'fontWeight' | 'textTransform' | 'fontStyle' | 'fontVariantNumeric' | 'lineHeight' | 'letterSpacing' | 'textColor' | 'textOpacity' | 'textDecoration' | 'textDecorationColor' | 'textDecorationStyle' | 'textDecorationThickness' | 'textUnderlineOffset' | 'fontSmoothing' | 'placeholderColor' | 'placeholderOpacity' | 'caretColor' | 'accentColor' | 'opacity' | 'backgroundBlendMode' | 'mixBlendMode' | 'boxShadow' | 'boxShadowColor' | 'outlineStyle' | 'outlineWidth' | 'outlineOffset' | 'outlineColor' | 'ringWidth' | 'ringColor' | 'ringOpacity' | 'ringOffsetWidth' | 'ringOffsetColor' | 'blur' | 'brightness' | 'contrast' | 'dropShadow' | 'grayscale' | 'hueRotate' | 'invert' | 'saturate' | 'sepia' | 'filter' | 'backdropBlur' | 'backdropBrightness' | 'backdropContrast' | 'backdropGrayscale' | 'backdropHueRotate' | 'backdropInvert' | 'backdropOpacity' | 'backdropSaturate' | 'backdropSepia' | 'backdropFilter' | 'transitionProperty' | 'transitionDelay' | 'transitionDuration' | 'transitionTimingFunction' | 'willChange' | 'contain' | 'content' | 'forcedColorAdjust'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Config } from '../../types'
|
|
2
1
|
type CSSDeclarationList = Record<string, string>
|
|
3
|
-
export type DefaultTheme =
|
|
2
|
+
export type DefaultTheme = {
|
|
4
3
|
animation: Record<'none' | 'spin' | 'ping' | 'pulse' | 'bounce', string>
|
|
5
4
|
aria: Record<
|
|
5
|
+
| 'busy'
|
|
6
6
|
| 'checked'
|
|
7
7
|
| 'disabled'
|
|
8
8
|
| 'expanded'
|
|
@@ -206,16 +206,38 @@ export type DefaultTheme = Config['theme'] & {
|
|
|
206
206
|
string
|
|
207
207
|
>
|
|
208
208
|
gridRow: Record<
|
|
209
|
-
|
|
209
|
+
| 'auto'
|
|
210
|
+
| 'span-1'
|
|
211
|
+
| 'span-2'
|
|
212
|
+
| 'span-3'
|
|
213
|
+
| 'span-4'
|
|
214
|
+
| 'span-5'
|
|
215
|
+
| 'span-6'
|
|
216
|
+
| 'span-7'
|
|
217
|
+
| 'span-8'
|
|
218
|
+
| 'span-9'
|
|
219
|
+
| 'span-10'
|
|
220
|
+
| 'span-11'
|
|
221
|
+
| 'span-12'
|
|
222
|
+
| 'span-full',
|
|
223
|
+
string
|
|
224
|
+
>
|
|
225
|
+
gridRowEnd: Record<
|
|
226
|
+
'1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | 'auto',
|
|
227
|
+
string
|
|
228
|
+
>
|
|
229
|
+
gridRowStart: Record<
|
|
230
|
+
'1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | 'auto',
|
|
210
231
|
string
|
|
211
232
|
>
|
|
212
|
-
gridRowEnd: Record<'1' | '2' | '3' | '4' | '5' | '6' | '7' | 'auto', string>
|
|
213
|
-
gridRowStart: Record<'1' | '2' | '3' | '4' | '5' | '6' | '7' | 'auto', string>
|
|
214
233
|
gridTemplateColumns: Record<
|
|
215
|
-
'1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | 'none',
|
|
234
|
+
'1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | 'none' | 'subgrid',
|
|
235
|
+
string
|
|
236
|
+
>
|
|
237
|
+
gridTemplateRows: Record<
|
|
238
|
+
'1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | 'none' | 'subgrid',
|
|
216
239
|
string
|
|
217
240
|
>
|
|
218
|
-
gridTemplateRows: Record<'1' | '2' | '3' | '4' | '5' | '6' | 'none', string>
|
|
219
241
|
hueRotate: Record<'0' | '15' | '30' | '60' | '90' | '180', string>
|
|
220
242
|
invert: Record<'0' | 'DEFAULT', string>
|
|
221
243
|
keyframes: Record<'spin' | 'ping' | 'pulse' | 'bounce', Record<string, CSSDeclarationList>>
|
|
@@ -240,8 +262,6 @@ export type DefaultTheme = Config['theme'] & {
|
|
|
240
262
|
listStyleType: Record<'none' | 'disc' | 'decimal', string>
|
|
241
263
|
listStyleImage: Record<'none', string>
|
|
242
264
|
lineClamp: Record<'1' | '2' | '3' | '4' | '5' | '6', string>
|
|
243
|
-
minHeight: Record<'0' | 'full' | 'screen' | 'min' | 'max' | 'fit', string>
|
|
244
|
-
minWidth: Record<'0' | 'full' | 'min' | 'max' | 'fit', string>
|
|
245
265
|
objectPosition: Record<
|
|
246
266
|
| 'bottom'
|
|
247
267
|
| 'center'
|
|
@@ -258,15 +278,21 @@ export type DefaultTheme = Config['theme'] & {
|
|
|
258
278
|
| '0'
|
|
259
279
|
| '5'
|
|
260
280
|
| '10'
|
|
281
|
+
| '15'
|
|
261
282
|
| '20'
|
|
262
283
|
| '25'
|
|
263
284
|
| '30'
|
|
285
|
+
| '35'
|
|
264
286
|
| '40'
|
|
287
|
+
| '45'
|
|
265
288
|
| '50'
|
|
289
|
+
| '55'
|
|
266
290
|
| '60'
|
|
291
|
+
| '65'
|
|
267
292
|
| '70'
|
|
268
293
|
| '75'
|
|
269
294
|
| '80'
|
|
295
|
+
| '85'
|
|
270
296
|
| '90'
|
|
271
297
|
| '95'
|
|
272
298
|
| '100',
|
package/types/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { PluginCreator } from 'postcss'
|
|
1
|
+
import type { PluginCreator } from 'postcss'
|
|
2
2
|
import type { Config } from './config.d'
|
|
3
3
|
|
|
4
4
|
declare const plugin: PluginCreator<string | Config | { config: string | Config }>
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
declare type _Config = Config
|
|
7
|
+
declare namespace plugin {
|
|
8
|
+
export type { _Config as Config }
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export = plugin
|