tailwindcss 0.0.0-insiders.df011dc → 0.0.0-insiders.e2d5f21
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/CHANGELOG.md +106 -1
- package/README.md +1 -1
- package/colors.js +1 -304
- package/defaultConfig.js +1 -4
- package/defaultTheme.js +1 -4
- package/lib/cli-peer-dependencies.js +4 -9
- package/lib/cli.js +646 -705
- package/lib/constants.js +15 -15
- package/lib/corePluginList.js +174 -4
- package/lib/corePlugins.js +3637 -2934
- package/lib/css/preflight.css +14 -1
- package/lib/featureFlags.js +44 -44
- package/lib/index.js +25 -24
- package/lib/lib/collapseAdjacentRules.js +33 -35
- package/lib/lib/collapseDuplicateDeclarations.js +29 -0
- package/lib/lib/detectNesting.js +34 -0
- package/lib/lib/evaluateTailwindFunctions.js +134 -155
- package/lib/lib/expandApplyAtRules.js +183 -200
- package/lib/lib/expandTailwindAtRules.js +219 -232
- package/lib/lib/generateRules.js +478 -311
- package/lib/lib/getModuleDependencies.js +36 -41
- package/lib/lib/normalizeTailwindDirectives.js +66 -58
- package/lib/lib/resolveDefaultsAtRules.js +110 -90
- package/lib/lib/setupContextUtils.js +740 -580
- package/lib/lib/setupTrackingContext.js +142 -162
- package/lib/lib/setupWatchingContext.js +235 -278
- package/lib/lib/sharedState.js +7 -17
- package/lib/lib/substituteScreenAtRules.js +22 -26
- package/lib/processTailwindFeatures.js +38 -44
- package/lib/public/colors.js +329 -0
- package/lib/public/create-plugin.js +13 -0
- package/lib/public/default-config.js +14 -0
- package/lib/public/default-theme.js +14 -0
- package/lib/public/resolve-config.js +19 -0
- package/lib/util/bigSign.js +3 -5
- package/lib/util/buildMediaQuery.js +15 -31
- package/lib/util/cloneDeep.js +14 -13
- package/lib/util/cloneNodes.js +9 -13
- package/lib/util/color.js +69 -59
- package/lib/util/configurePlugins.js +13 -14
- package/lib/util/createPlugin.js +21 -24
- package/lib/util/createUtilityPlugin.js +47 -45
- package/lib/util/dataTypes.js +231 -0
- package/lib/util/defaults.js +10 -14
- package/lib/util/escapeClassName.js +12 -14
- package/lib/util/escapeCommas.js +3 -5
- package/lib/util/flattenColorPalette.js +14 -10
- package/lib/util/formatVariantSelector.js +186 -0
- package/lib/util/getAllConfigs.js +23 -16
- package/lib/util/hashConfig.js +10 -10
- package/lib/util/isKeyframeRule.js +3 -5
- package/lib/util/isPlainObject.js +7 -10
- package/lib/util/isValidArbitraryValue.js +64 -0
- package/lib/util/log.js +39 -30
- package/lib/util/nameClass.js +23 -23
- package/lib/util/negateValue.js +14 -15
- package/lib/util/normalizeConfig.js +208 -0
- package/lib/util/normalizeScreens.js +58 -0
- package/lib/util/parseAnimationValue.js +82 -53
- package/lib/util/parseBoxShadowValue.js +77 -0
- package/lib/util/parseDependency.js +49 -60
- package/lib/util/parseObjectStyles.js +23 -20
- package/lib/util/pluginUtils.js +153 -285
- package/lib/util/prefixSelector.js +14 -16
- package/lib/util/resolveConfig.js +194 -249
- package/lib/util/resolveConfigPath.js +38 -45
- package/lib/util/responsive.js +12 -11
- package/lib/util/tap.js +4 -6
- package/lib/util/toColorValue.js +4 -5
- package/lib/util/toPath.js +4 -6
- package/lib/util/transformThemeValue.js +57 -26
- package/lib/util/withAlphaVariable.js +56 -54
- package/package.json +27 -37
- package/peers/index.js +73099 -84294
- package/plugin.js +1 -3
- package/resolveConfig.js +1 -7
- package/scripts/create-plugin-list.js +2 -2
- package/src/cli.js +27 -18
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +2124 -1968
- package/src/css/preflight.css +14 -1
- package/src/featureFlags.js +12 -6
- package/src/lib/collapseDuplicateDeclarations.js +28 -0
- package/src/lib/detectNesting.js +39 -0
- package/src/lib/evaluateTailwindFunctions.js +5 -2
- package/src/lib/expandTailwindAtRules.js +24 -32
- package/src/lib/generateRules.js +230 -20
- package/src/lib/normalizeTailwindDirectives.js +3 -2
- package/src/lib/resolveDefaultsAtRules.js +46 -30
- package/src/lib/setupContextUtils.js +275 -113
- package/src/lib/setupTrackingContext.js +9 -8
- package/src/lib/setupWatchingContext.js +12 -7
- package/src/lib/sharedState.js +1 -4
- package/src/lib/substituteScreenAtRules.js +6 -3
- package/src/processTailwindFeatures.js +8 -1
- package/src/public/colors.js +300 -0
- package/src/public/create-plugin.js +2 -0
- package/src/public/default-config.js +4 -0
- package/src/public/default-theme.js +4 -0
- package/src/public/resolve-config.js +7 -0
- package/src/util/buildMediaQuery.js +14 -18
- package/src/util/createUtilityPlugin.js +2 -11
- package/src/util/dataTypes.js +246 -0
- package/src/util/formatVariantSelector.js +196 -0
- package/src/util/isValidArbitraryValue.js +61 -0
- package/src/util/log.js +18 -21
- package/src/util/nameClass.js +10 -6
- package/src/util/negateValue.js +4 -2
- package/src/util/normalizeConfig.js +249 -0
- package/src/util/normalizeScreens.js +42 -0
- package/src/util/parseAnimationValue.js +7 -1
- package/src/util/parseBoxShadowValue.js +71 -0
- package/src/util/parseDependency.js +4 -0
- package/src/util/pluginUtils.js +101 -204
- package/src/util/prefixSelector.js +1 -4
- package/src/util/resolveConfig.js +12 -65
- package/src/util/transformThemeValue.js +22 -7
- package/src/util/withAlphaVariable.js +13 -8
- package/stubs/defaultConfig.stub.js +163 -97
- package/stubs/simpleConfig.stub.js +0 -1
package/plugin.js
CHANGED
package/resolveConfig.js
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
const getAllConfigs = require('./lib/util/getAllConfigs').default
|
|
3
|
-
|
|
4
|
-
module.exports = function resolveConfig(...configs) {
|
|
5
|
-
const [, ...defaultConfigs] = getAllConfigs(configs[0])
|
|
6
|
-
return resolveConfigObjects([...configs, ...defaultConfigs])
|
|
7
|
-
}
|
|
1
|
+
module.exports = require('./lib/public/resolve-config').default
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { corePlugins } from '../src/corePlugins'
|
|
2
2
|
import fs from 'fs'
|
|
3
3
|
import path from 'path'
|
|
4
4
|
|
|
5
|
-
let corePluginList = Object.keys(corePlugins)
|
|
5
|
+
let corePluginList = Object.keys(corePlugins)
|
|
6
6
|
|
|
7
7
|
fs.writeFileSync(
|
|
8
8
|
path.join(process.cwd(), 'src', 'corePluginList.js'),
|
package/src/cli.js
CHANGED
|
@@ -15,9 +15,10 @@ import fastGlob from 'fast-glob'
|
|
|
15
15
|
import getModuleDependencies from './lib/getModuleDependencies'
|
|
16
16
|
import log from './util/log'
|
|
17
17
|
import packageJson from '../package.json'
|
|
18
|
+
import normalizePath from 'normalize-path'
|
|
18
19
|
|
|
19
20
|
let env = {
|
|
20
|
-
DEBUG: process.env.DEBUG !== undefined,
|
|
21
|
+
DEBUG: process.env.DEBUG !== undefined && process.env.DEBUG !== '0',
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
// ---
|
|
@@ -419,34 +420,35 @@ async function build() {
|
|
|
419
420
|
let resolvedConfig = resolveConfigInternal(config)
|
|
420
421
|
|
|
421
422
|
if (args['--purge']) {
|
|
422
|
-
log.warn(
|
|
423
|
+
log.warn('purge-flag-deprecated', [
|
|
424
|
+
'The `--purge` flag has been deprecated.',
|
|
425
|
+
'Please use `--content` instead.',
|
|
426
|
+
])
|
|
423
427
|
if (!args['--content']) {
|
|
424
|
-
args['--content'] = ['--purge']
|
|
428
|
+
args['--content'] = args['--purge']
|
|
425
429
|
}
|
|
426
430
|
}
|
|
427
431
|
|
|
428
432
|
if (args['--content']) {
|
|
429
|
-
resolvedConfig.content = args['--content'].split(/(?<!{[^}]+),/)
|
|
433
|
+
resolvedConfig.content.files = args['--content'].split(/(?<!{[^}]+),/)
|
|
430
434
|
}
|
|
431
435
|
|
|
432
436
|
return resolvedConfig
|
|
433
437
|
}
|
|
434
438
|
|
|
435
|
-
function extractContent(config) {
|
|
436
|
-
return config.content.content.concat(config.content.safelist)
|
|
437
|
-
}
|
|
438
|
-
|
|
439
439
|
function extractFileGlobs(config) {
|
|
440
|
-
return
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
440
|
+
return config.content.files
|
|
441
|
+
.filter((file) => {
|
|
442
|
+
// Strings in this case are files / globs. If it is something else,
|
|
443
|
+
// like an object it's probably a raw content object. But this object
|
|
444
|
+
// is not watchable, so let's remove it.
|
|
445
|
+
return typeof file === 'string'
|
|
446
|
+
})
|
|
447
|
+
.map((glob) => normalizePath(glob))
|
|
446
448
|
}
|
|
447
449
|
|
|
448
450
|
function extractRawContent(config) {
|
|
449
|
-
return
|
|
451
|
+
return config.content.files.filter((file) => {
|
|
450
452
|
return typeof file === 'object' && file !== null
|
|
451
453
|
})
|
|
452
454
|
}
|
|
@@ -461,7 +463,7 @@ async function build() {
|
|
|
461
463
|
for (let file of files) {
|
|
462
464
|
changedContent.push({
|
|
463
465
|
content: fs.readFileSync(path.resolve(file), 'utf8'),
|
|
464
|
-
extension: path.extname(file),
|
|
466
|
+
extension: path.extname(file).slice(1),
|
|
465
467
|
})
|
|
466
468
|
}
|
|
467
469
|
|
|
@@ -698,6 +700,13 @@ async function build() {
|
|
|
698
700
|
|
|
699
701
|
watcher = chokidar.watch([...contextDependencies, ...extractFileGlobs(config)], {
|
|
700
702
|
ignoreInitial: true,
|
|
703
|
+
awaitWriteFinish:
|
|
704
|
+
process.platform === 'win32'
|
|
705
|
+
? {
|
|
706
|
+
stabilityThreshold: 50,
|
|
707
|
+
pollInterval: 10,
|
|
708
|
+
}
|
|
709
|
+
: false,
|
|
701
710
|
})
|
|
702
711
|
|
|
703
712
|
let chain = Promise.resolve()
|
|
@@ -723,7 +732,7 @@ async function build() {
|
|
|
723
732
|
chain = chain.then(async () => {
|
|
724
733
|
changedContent.push({
|
|
725
734
|
content: fs.readFileSync(path.resolve(file), 'utf8'),
|
|
726
|
-
extension: path.extname(file),
|
|
735
|
+
extension: path.extname(file).slice(1),
|
|
727
736
|
})
|
|
728
737
|
|
|
729
738
|
await rebuild(config)
|
|
@@ -735,7 +744,7 @@ async function build() {
|
|
|
735
744
|
chain = chain.then(async () => {
|
|
736
745
|
changedContent.push({
|
|
737
746
|
content: fs.readFileSync(path.resolve(file), 'utf8'),
|
|
738
|
-
extension: path.extname(file),
|
|
747
|
+
extension: path.extname(file).slice(1),
|
|
739
748
|
})
|
|
740
749
|
|
|
741
750
|
await rebuild(config)
|
package/src/corePluginList.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default ["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","tableLayout","borderCollapse","transformOrigin","translate","rotate","skew","scale","transform","animation","cursor","userSelect","resize","listStylePosition","listStyleType","appearance","columns","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","fontSmoothing","placeholderColor","placeholderOpacity","caretColor","accentColor","opacity","backgroundBlendMode","mixBlendMode","boxShadow","
|
|
1
|
+
export default ["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","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"]
|