tailwindcss 0.0.0-insiders.dddaded → 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/deps.js +17 -9
- package/lib/cli/build/index.js +10 -8
- package/lib/cli/build/plugin.js +31 -29
- package/lib/cli/build/utils.js +18 -8
- package/lib/cli/build/watching.js +13 -11
- package/lib/cli/help/index.js +6 -4
- package/lib/cli/index.js +4 -4
- package/lib/cli/init/index.js +8 -6
- package/lib/cli-peer-dependencies.js +12 -4
- package/lib/cli.js +1 -1
- package/lib/corePluginList.js +8 -2
- package/lib/corePlugins.js +211 -48
- package/lib/css/preflight.css +24 -8
- package/lib/featureFlags.js +14 -9
- package/lib/index.js +1 -5
- package/lib/lib/cacheInvalidation.js +7 -5
- package/lib/lib/collapseAdjacentRules.js +3 -1
- package/lib/lib/collapseDuplicateDeclarations.js +10 -8
- package/lib/lib/content.js +51 -14
- package/lib/lib/defaultExtractor.js +38 -28
- package/lib/lib/detectNesting.js +3 -1
- package/lib/lib/evaluateTailwindFunctions.js +20 -16
- package/lib/lib/expandApplyAtRules.js +41 -33
- package/lib/lib/expandTailwindAtRules.js +38 -19
- package/lib/lib/findAtConfigPath.js +6 -4
- package/lib/lib/generateRules.js +83 -55
- package/lib/lib/getModuleDependencies.js +10 -8
- package/lib/lib/load-config.js +18 -5
- package/lib/lib/normalizeTailwindDirectives.js +5 -3
- package/lib/lib/offsets.js +58 -7
- package/lib/lib/partitionApplyAtRules.js +3 -1
- package/lib/lib/regex.js +21 -7
- package/lib/lib/remap-bitfield.js +3 -1
- package/lib/lib/resolveDefaultsAtRules.js +27 -21
- package/lib/lib/setupContextUtils.js +143 -94
- package/lib/lib/setupTrackingContext.js +27 -24
- package/lib/lib/sharedState.js +28 -24
- package/lib/lib/substituteScreenAtRules.js +5 -3
- package/lib/oxide/cli/build/deps.js +16 -8
- package/lib/oxide/cli/build/index.js +6 -4
- package/lib/oxide/cli/build/plugin.js +25 -23
- package/lib/oxide/cli/build/utils.js +18 -8
- package/lib/oxide/cli/build/watching.js +10 -8
- package/lib/oxide/cli/help/index.js +6 -4
- package/lib/oxide/cli/index.js +4 -4
- package/lib/oxide/cli/init/index.js +6 -4
- package/lib/plugin.js +9 -9
- package/lib/postcss-plugins/nesting/index.js +3 -1
- package/lib/postcss-plugins/nesting/plugin.js +8 -6
- package/lib/processTailwindFeatures.js +16 -14
- package/lib/public/colors.js +5 -3
- package/lib/public/create-plugin.js +5 -3
- package/lib/public/default-config.js +6 -4
- package/lib/public/default-theme.js +6 -4
- package/lib/public/load-config.js +5 -3
- package/lib/public/resolve-config.js +6 -4
- package/lib/util/applyImportantSelector.js +7 -5
- package/lib/util/bigSign.js +3 -1
- package/lib/util/buildMediaQuery.js +3 -1
- package/lib/util/cloneDeep.js +3 -1
- package/lib/util/cloneNodes.js +36 -14
- package/lib/util/color.js +11 -7
- package/lib/util/colorNames.js +752 -0
- package/lib/util/configurePlugins.js +3 -1
- package/lib/util/createPlugin.js +3 -1
- package/lib/util/createUtilityPlugin.js +5 -3
- package/lib/util/dataTypes.js +180 -31
- package/lib/util/defaults.js +6 -4
- package/lib/util/escapeClassName.js +7 -5
- package/lib/util/escapeCommas.js +3 -1
- package/lib/util/flattenColorPalette.js +3 -1
- package/lib/util/formatVariantSelector.js +36 -21
- package/lib/util/getAllConfigs.js +6 -4
- package/lib/util/hashConfig.js +6 -4
- package/lib/util/isKeyframeRule.js +3 -1
- package/lib/util/isPlainObject.js +4 -2
- package/lib/util/isSyntacticallyValidPropertyValue.js +3 -1
- package/lib/util/log.js +8 -4
- package/lib/util/nameClass.js +12 -6
- package/lib/util/negateValue.js +3 -1
- package/lib/util/normalizeConfig.js +7 -5
- package/lib/util/normalizeScreens.js +12 -4
- package/lib/util/parseAnimationValue.js +3 -1
- package/lib/util/parseBoxShadowValue.js +6 -2
- package/lib/util/parseDependency.js +3 -1
- package/lib/util/parseGlob.js +6 -4
- package/lib/util/parseObjectStyles.js +9 -7
- package/lib/util/pluginUtils.js +43 -18
- package/lib/util/prefixSelector.js +6 -4
- package/lib/util/pseudoElements.js +24 -35
- package/lib/util/removeAlphaVariables.js +3 -1
- package/lib/util/resolveConfig.js +10 -8
- package/lib/util/resolveConfigPath.js +9 -5
- package/lib/util/responsive.js +6 -4
- package/lib/util/splitAtTopLevelOnly.js +3 -1
- package/lib/util/tap.js +3 -1
- package/lib/util/toColorValue.js +3 -1
- package/lib/util/toPath.js +3 -1
- package/lib/util/transformThemeValue.js +6 -4
- package/lib/util/validateConfig.js +5 -3
- package/lib/util/validateFormalSyntax.js +3 -1
- package/lib/util/withAlphaVariable.js +6 -2
- 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 +31 -36
- package/peers/index.js +65266 -48224
- package/resolveConfig.d.ts +22 -3
- package/scripts/generate-types.js +1 -2
- package/src/cli/build/plugin.js +7 -7
- package/src/cli/build/watching.js +1 -1
- package/src/cli.js +1 -1
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +165 -29
- package/src/css/preflight.css +24 -8
- package/src/featureFlags.js +3 -8
- package/src/index.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 +26 -9
- 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 +2 -4
- package/src/lib/sharedState.js +0 -15
- package/src/oxide/cli/build/plugin.ts +7 -7
- package/src/plugin.js +4 -4
- package/src/processTailwindFeatures.js +3 -2
- package/src/util/cloneNodes.js +35 -14
- package/src/util/color.js +2 -2
- package/src/util/colorNames.js +150 -0
- 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 +17 -5
- 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/lib/corePlugins.js
CHANGED
|
@@ -9,30 +9,34 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
variantPlugins: ()
|
|
13
|
-
|
|
12
|
+
variantPlugins: function() {
|
|
13
|
+
return variantPlugins;
|
|
14
|
+
},
|
|
15
|
+
corePlugins: function() {
|
|
16
|
+
return corePlugins;
|
|
17
|
+
}
|
|
14
18
|
});
|
|
15
|
-
const _fs = /*#__PURE__*/
|
|
16
|
-
const _path = /*#__PURE__*/
|
|
17
|
-
const _postcss = /*#__PURE__*/
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const _log = /*#__PURE__*/ _interopRequireDefault(require("./util/log"));
|
|
19
|
+
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
20
|
+
const _path = /*#__PURE__*/ _interop_require_wildcard(require("path"));
|
|
21
|
+
const _postcss = /*#__PURE__*/ _interop_require_default(require("postcss"));
|
|
22
|
+
const _createUtilityPlugin = /*#__PURE__*/ _interop_require_default(require("./util/createUtilityPlugin"));
|
|
23
|
+
const _buildMediaQuery = /*#__PURE__*/ _interop_require_default(require("./util/buildMediaQuery"));
|
|
24
|
+
const _escapeClassName = /*#__PURE__*/ _interop_require_default(require("./util/escapeClassName"));
|
|
25
|
+
const _parseAnimationValue = /*#__PURE__*/ _interop_require_default(require("./util/parseAnimationValue"));
|
|
26
|
+
const _flattenColorPalette = /*#__PURE__*/ _interop_require_default(require("./util/flattenColorPalette"));
|
|
27
|
+
const _withAlphaVariable = /*#__PURE__*/ _interop_require_wildcard(require("./util/withAlphaVariable"));
|
|
28
|
+
const _toColorValue = /*#__PURE__*/ _interop_require_default(require("./util/toColorValue"));
|
|
29
|
+
const _isPlainObject = /*#__PURE__*/ _interop_require_default(require("./util/isPlainObject"));
|
|
30
|
+
const _transformThemeValue = /*#__PURE__*/ _interop_require_default(require("./util/transformThemeValue"));
|
|
31
|
+
const _packagejson = require("../package.json");
|
|
32
|
+
const _log = /*#__PURE__*/ _interop_require_default(require("./util/log"));
|
|
30
33
|
const _normalizeScreens = require("./util/normalizeScreens");
|
|
31
34
|
const _parseBoxShadowValue = require("./util/parseBoxShadowValue");
|
|
32
35
|
const _removeAlphaVariables = require("./util/removeAlphaVariables");
|
|
33
36
|
const _featureFlags = require("./featureFlags");
|
|
34
37
|
const _dataTypes = require("./util/dataTypes");
|
|
35
|
-
|
|
38
|
+
const _setupContextUtils = require("./lib/setupContextUtils");
|
|
39
|
+
function _interop_require_default(obj) {
|
|
36
40
|
return obj && obj.__esModule ? obj : {
|
|
37
41
|
default: obj
|
|
38
42
|
};
|
|
@@ -45,7 +49,7 @@ function _getRequireWildcardCache(nodeInterop) {
|
|
|
45
49
|
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
46
50
|
})(nodeInterop);
|
|
47
51
|
}
|
|
48
|
-
function
|
|
52
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
49
53
|
if (!nodeInterop && obj && obj.__esModule) {
|
|
50
54
|
return obj;
|
|
51
55
|
}
|
|
@@ -77,6 +81,9 @@ function _interopRequireWildcard(obj, nodeInterop) {
|
|
|
77
81
|
return newObj;
|
|
78
82
|
}
|
|
79
83
|
let variantPlugins = {
|
|
84
|
+
childVariant: ({ addVariant })=>{
|
|
85
|
+
addVariant("*", "& > *");
|
|
86
|
+
},
|
|
80
87
|
pseudoElementVariants: ({ addVariant })=>{
|
|
81
88
|
addVariant("first-letter", "&::first-letter");
|
|
82
89
|
addVariant("first-line", "&::first-line");
|
|
@@ -132,7 +139,7 @@ let variantPlugins = {
|
|
|
132
139
|
return "&::after";
|
|
133
140
|
});
|
|
134
141
|
},
|
|
135
|
-
pseudoClassVariants: ({ addVariant , matchVariant , config })=>{
|
|
142
|
+
pseudoClassVariants: ({ addVariant , matchVariant , config , prefix })=>{
|
|
136
143
|
let pseudoVariants = [
|
|
137
144
|
// Positional
|
|
138
145
|
[
|
|
@@ -213,17 +220,17 @@ let variantPlugins = {
|
|
|
213
220
|
}
|
|
214
221
|
let variants = {
|
|
215
222
|
group: (_, { modifier })=>modifier ? [
|
|
216
|
-
`:merge(.group\\/${(0, _escapeClassName.default)(modifier)})`,
|
|
223
|
+
`:merge(${prefix(".group")}\\/${(0, _escapeClassName.default)(modifier)})`,
|
|
217
224
|
" &"
|
|
218
225
|
] : [
|
|
219
|
-
`:merge(.group)`,
|
|
226
|
+
`:merge(${prefix(".group")})`,
|
|
220
227
|
" &"
|
|
221
228
|
],
|
|
222
229
|
peer: (_, { modifier })=>modifier ? [
|
|
223
|
-
`:merge(.peer\\/${(0, _escapeClassName.default)(modifier)})`,
|
|
230
|
+
`:merge(${prefix(".peer")}\\/${(0, _escapeClassName.default)(modifier)})`,
|
|
224
231
|
" ~ &"
|
|
225
232
|
] : [
|
|
226
|
-
`:merge(.peer)`,
|
|
233
|
+
`:merge(${prefix(".peer")})`,
|
|
227
234
|
" ~ &"
|
|
228
235
|
]
|
|
229
236
|
};
|
|
@@ -252,20 +259,23 @@ let variantPlugins = {
|
|
|
252
259
|
// result.replace(/&(\S+)?/g, (_, pseudo = '') => a + pseudo + b)
|
|
253
260
|
return result.slice(0, start) + a + result.slice(start + 1, end) + b + result.slice(end);
|
|
254
261
|
}, {
|
|
255
|
-
values: Object.fromEntries(pseudoVariants)
|
|
262
|
+
values: Object.fromEntries(pseudoVariants),
|
|
263
|
+
[_setupContextUtils.INTERNAL_FEATURES]: {
|
|
264
|
+
respectPrefix: false
|
|
265
|
+
}
|
|
256
266
|
});
|
|
257
267
|
}
|
|
258
268
|
},
|
|
259
269
|
directionVariants: ({ addVariant })=>{
|
|
260
|
-
addVariant("ltr", '
|
|
261
|
-
addVariant("rtl", '
|
|
270
|
+
addVariant("ltr", '&:where([dir="ltr"], [dir="ltr"] *)');
|
|
271
|
+
addVariant("rtl", '&:where([dir="rtl"], [dir="rtl"] *)');
|
|
262
272
|
},
|
|
263
273
|
reducedMotionVariants: ({ addVariant })=>{
|
|
264
274
|
addVariant("motion-safe", "@media (prefers-reduced-motion: no-preference)");
|
|
265
275
|
addVariant("motion-reduce", "@media (prefers-reduced-motion: reduce)");
|
|
266
276
|
},
|
|
267
277
|
darkVariants: ({ config , addVariant })=>{
|
|
268
|
-
let [mode,
|
|
278
|
+
let [mode, selector = ".dark"] = [].concat(config("darkMode", "media"));
|
|
269
279
|
if (mode === false) {
|
|
270
280
|
mode = "media";
|
|
271
281
|
_log.default.warn("darkmode-false", [
|
|
@@ -274,10 +284,48 @@ let variantPlugins = {
|
|
|
274
284
|
"https://tailwindcss.com/docs/upgrade-guide#remove-dark-mode-configuration"
|
|
275
285
|
]);
|
|
276
286
|
}
|
|
277
|
-
if (mode === "
|
|
278
|
-
|
|
287
|
+
if (mode === "variant") {
|
|
288
|
+
let formats;
|
|
289
|
+
if (Array.isArray(selector)) {
|
|
290
|
+
formats = selector;
|
|
291
|
+
} else if (typeof selector === "function") {
|
|
292
|
+
formats = selector;
|
|
293
|
+
} else if (typeof selector === "string") {
|
|
294
|
+
formats = [
|
|
295
|
+
selector
|
|
296
|
+
];
|
|
297
|
+
}
|
|
298
|
+
// TODO: We could also add these warnings if the user passes a function that returns string | string[]
|
|
299
|
+
// But this is an advanced enough use case that it's probably not necessary
|
|
300
|
+
if (Array.isArray(formats)) {
|
|
301
|
+
for (let format of formats){
|
|
302
|
+
if (format === ".dark") {
|
|
303
|
+
mode = false;
|
|
304
|
+
_log.default.warn("darkmode-variant-without-selector", [
|
|
305
|
+
"When using `variant` for `darkMode`, you must provide a selector.",
|
|
306
|
+
'Example: `darkMode: ["variant", ".your-selector &"]`'
|
|
307
|
+
]);
|
|
308
|
+
} else if (!format.includes("&")) {
|
|
309
|
+
mode = false;
|
|
310
|
+
_log.default.warn("darkmode-variant-without-ampersand", [
|
|
311
|
+
"When using `variant` for `darkMode`, your selector must contain `&`.",
|
|
312
|
+
'Example `darkMode: ["variant", ".your-selector &"]`'
|
|
313
|
+
]);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
selector = formats;
|
|
318
|
+
}
|
|
319
|
+
if (mode === "selector") {
|
|
320
|
+
// New preferred behavior
|
|
321
|
+
addVariant("dark", `&:where(${selector}, ${selector} *)`);
|
|
279
322
|
} else if (mode === "media") {
|
|
280
323
|
addVariant("dark", "@media (prefers-color-scheme: dark)");
|
|
324
|
+
} else if (mode === "variant") {
|
|
325
|
+
addVariant("dark", selector);
|
|
326
|
+
} else if (mode === "class") {
|
|
327
|
+
// Old behavior
|
|
328
|
+
addVariant("dark", `:is(${selector} &)`);
|
|
281
329
|
}
|
|
282
330
|
},
|
|
283
331
|
printVariant: ({ addVariant })=>{
|
|
@@ -378,11 +426,11 @@ let variantPlugins = {
|
|
|
378
426
|
});
|
|
379
427
|
// screens and min-* are sorted together when they can be
|
|
380
428
|
let id = "min-screens";
|
|
381
|
-
for (let
|
|
382
|
-
addVariant(
|
|
429
|
+
for (let screen of screens){
|
|
430
|
+
addVariant(screen.name, `@media ${(0, _buildMediaQuery.default)(screen)}`, {
|
|
383
431
|
id,
|
|
384
432
|
sort: areSimpleScreens && screensUseConsistentUnits ? minSort : undefined,
|
|
385
|
-
value:
|
|
433
|
+
value: screen
|
|
386
434
|
});
|
|
387
435
|
}
|
|
388
436
|
matchVariant("min", buildScreenVariant("min"), {
|
|
@@ -412,6 +460,17 @@ let variantPlugins = {
|
|
|
412
460
|
values: (_theme = theme("supports")) !== null && _theme !== void 0 ? _theme : {}
|
|
413
461
|
});
|
|
414
462
|
},
|
|
463
|
+
hasVariants: ({ matchVariant })=>{
|
|
464
|
+
matchVariant("has", (value)=>`&:has(${(0, _dataTypes.normalize)(value)})`, {
|
|
465
|
+
values: {}
|
|
466
|
+
});
|
|
467
|
+
matchVariant("group-has", (value, { modifier })=>modifier ? `:merge(.group\\/${modifier}):has(${(0, _dataTypes.normalize)(value)}) &` : `:merge(.group):has(${(0, _dataTypes.normalize)(value)}) &`, {
|
|
468
|
+
values: {}
|
|
469
|
+
});
|
|
470
|
+
matchVariant("peer-has", (value, { modifier })=>modifier ? `:merge(.peer\\/${modifier}):has(${(0, _dataTypes.normalize)(value)}) ~ &` : `:merge(.peer):has(${(0, _dataTypes.normalize)(value)}) ~ &`, {
|
|
471
|
+
values: {}
|
|
472
|
+
});
|
|
473
|
+
},
|
|
415
474
|
ariaVariants: ({ matchVariant , theme })=>{
|
|
416
475
|
var _theme;
|
|
417
476
|
matchVariant("aria", (value)=>`&[aria-${(0, _dataTypes.normalize)(value)}]`, {
|
|
@@ -447,6 +506,9 @@ let variantPlugins = {
|
|
|
447
506
|
prefersContrastVariants: ({ addVariant })=>{
|
|
448
507
|
addVariant("contrast-more", "@media (prefers-contrast: more)");
|
|
449
508
|
addVariant("contrast-less", "@media (prefers-contrast: less)");
|
|
509
|
+
},
|
|
510
|
+
forcedColorsVariants: ({ addVariant })=>{
|
|
511
|
+
addVariant("forced-colors", "@media (forced-colors: active)");
|
|
450
512
|
}
|
|
451
513
|
};
|
|
452
514
|
let cssTransformValue = [
|
|
@@ -484,7 +546,7 @@ let corePlugins = {
|
|
|
484
546
|
let preflightStyles = _postcss.default.parse(_fs.default.readFileSync(_path.join(__dirname, "./css/preflight.css"), "utf8"));
|
|
485
547
|
addBase([
|
|
486
548
|
_postcss.default.comment({
|
|
487
|
-
text: `! tailwindcss v${
|
|
549
|
+
text: `! tailwindcss v${_packagejson.version} | MIT License | https://tailwindcss.com`
|
|
488
550
|
}),
|
|
489
551
|
...preflightStyles.nodes
|
|
490
552
|
]);
|
|
@@ -767,6 +829,12 @@ let corePlugins = {
|
|
|
767
829
|
]),
|
|
768
830
|
float: ({ addUtilities })=>{
|
|
769
831
|
addUtilities({
|
|
832
|
+
".float-start": {
|
|
833
|
+
float: "inline-start"
|
|
834
|
+
},
|
|
835
|
+
".float-end": {
|
|
836
|
+
float: "inline-end"
|
|
837
|
+
},
|
|
770
838
|
".float-right": {
|
|
771
839
|
float: "right"
|
|
772
840
|
},
|
|
@@ -780,6 +848,12 @@ let corePlugins = {
|
|
|
780
848
|
},
|
|
781
849
|
clear: ({ addUtilities })=>{
|
|
782
850
|
addUtilities({
|
|
851
|
+
".clear-start": {
|
|
852
|
+
clear: "inline-start"
|
|
853
|
+
},
|
|
854
|
+
".clear-end": {
|
|
855
|
+
clear: "inline-end"
|
|
856
|
+
},
|
|
783
857
|
".clear-left": {
|
|
784
858
|
clear: "left"
|
|
785
859
|
},
|
|
@@ -963,6 +1037,15 @@ let corePlugins = {
|
|
|
963
1037
|
]
|
|
964
1038
|
]
|
|
965
1039
|
]),
|
|
1040
|
+
size: (0, _createUtilityPlugin.default)("size", [
|
|
1041
|
+
[
|
|
1042
|
+
"size",
|
|
1043
|
+
[
|
|
1044
|
+
"width",
|
|
1045
|
+
"height"
|
|
1046
|
+
]
|
|
1047
|
+
]
|
|
1048
|
+
]),
|
|
966
1049
|
height: (0, _createUtilityPlugin.default)("height", [
|
|
967
1050
|
[
|
|
968
1051
|
"h",
|
|
@@ -1280,7 +1363,7 @@ let corePlugins = {
|
|
|
1280
1363
|
});
|
|
1281
1364
|
},
|
|
1282
1365
|
animation: ({ matchUtilities , theme , config })=>{
|
|
1283
|
-
let prefixName = (name)
|
|
1366
|
+
let prefixName = (name)=>(0, _escapeClassName.default)(config("prefix") + name);
|
|
1284
1367
|
var _theme;
|
|
1285
1368
|
let keyframes = Object.fromEntries(Object.entries((_theme = theme("keyframes")) !== null && _theme !== void 0 ? _theme : {}).map(([key, value])=>{
|
|
1286
1369
|
return [
|
|
@@ -1606,6 +1689,9 @@ let corePlugins = {
|
|
|
1606
1689
|
addUtilities({
|
|
1607
1690
|
".appearance-none": {
|
|
1608
1691
|
appearance: "none"
|
|
1692
|
+
},
|
|
1693
|
+
".appearance-auto": {
|
|
1694
|
+
appearance: "auto"
|
|
1609
1695
|
}
|
|
1610
1696
|
});
|
|
1611
1697
|
},
|
|
@@ -1936,7 +2022,7 @@ let corePlugins = {
|
|
|
1936
2022
|
matchUtilities({
|
|
1937
2023
|
"space-x": (value)=>{
|
|
1938
2024
|
value = value === "0" ? "0px" : value;
|
|
1939
|
-
if (
|
|
2025
|
+
if (false) {
|
|
1940
2026
|
return {
|
|
1941
2027
|
"& > :not([hidden]) ~ :not([hidden])": {
|
|
1942
2028
|
"--tw-space-x-reverse": "0",
|
|
@@ -1980,7 +2066,7 @@ let corePlugins = {
|
|
|
1980
2066
|
matchUtilities({
|
|
1981
2067
|
"divide-x": (value)=>{
|
|
1982
2068
|
value = value === "0" ? "0px" : value;
|
|
1983
|
-
if (
|
|
2069
|
+
if (false) {
|
|
1984
2070
|
return {
|
|
1985
2071
|
"& > :not([hidden]) ~ :not([hidden])": {
|
|
1986
2072
|
"@defaults border-width": {},
|
|
@@ -2290,6 +2376,22 @@ let corePlugins = {
|
|
|
2290
2376
|
}
|
|
2291
2377
|
});
|
|
2292
2378
|
},
|
|
2379
|
+
textWrap: ({ addUtilities })=>{
|
|
2380
|
+
addUtilities({
|
|
2381
|
+
".text-wrap": {
|
|
2382
|
+
"text-wrap": "wrap"
|
|
2383
|
+
},
|
|
2384
|
+
".text-nowrap": {
|
|
2385
|
+
"text-wrap": "nowrap"
|
|
2386
|
+
},
|
|
2387
|
+
".text-balance": {
|
|
2388
|
+
"text-wrap": "balance"
|
|
2389
|
+
},
|
|
2390
|
+
".text-pretty": {
|
|
2391
|
+
"text-wrap": "pretty"
|
|
2392
|
+
}
|
|
2393
|
+
});
|
|
2394
|
+
},
|
|
2293
2395
|
wordBreak: ({ addUtilities })=>{
|
|
2294
2396
|
addUtilities({
|
|
2295
2397
|
".break-normal": {
|
|
@@ -2732,7 +2834,12 @@ let corePlugins = {
|
|
|
2732
2834
|
function transparentTo(value) {
|
|
2733
2835
|
return (0, _withAlphaVariable.withAlphaValue)(value, 0, "rgb(255 255 255 / 0)");
|
|
2734
2836
|
}
|
|
2735
|
-
return function({ matchUtilities , theme }) {
|
|
2837
|
+
return function({ matchUtilities , theme , addDefaults }) {
|
|
2838
|
+
addDefaults("gradient-color-stops", {
|
|
2839
|
+
"--tw-gradient-from-position": " ",
|
|
2840
|
+
"--tw-gradient-via-position": " ",
|
|
2841
|
+
"--tw-gradient-to-position": " "
|
|
2842
|
+
});
|
|
2736
2843
|
let options = {
|
|
2737
2844
|
values: (0, _flattenColorPalette.default)(theme("gradientColorStops")),
|
|
2738
2845
|
type: [
|
|
@@ -2751,10 +2858,9 @@ let corePlugins = {
|
|
|
2751
2858
|
from: (value)=>{
|
|
2752
2859
|
let transparentToValue = transparentTo(value);
|
|
2753
2860
|
return {
|
|
2754
|
-
"
|
|
2755
|
-
"--tw-gradient-from
|
|
2756
|
-
"--tw-gradient-to": `${transparentToValue}
|
|
2757
|
-
"--tw-gradient-to-position": " ",
|
|
2861
|
+
"@defaults gradient-color-stops": {},
|
|
2862
|
+
"--tw-gradient-from": `${(0, _toColorValue.default)(value)} var(--tw-gradient-from-position)`,
|
|
2863
|
+
"--tw-gradient-to": `${transparentToValue} var(--tw-gradient-to-position)`,
|
|
2758
2864
|
"--tw-gradient-stops": `var(--tw-gradient-from), var(--tw-gradient-to)`
|
|
2759
2865
|
};
|
|
2760
2866
|
}
|
|
@@ -2770,10 +2876,9 @@ let corePlugins = {
|
|
|
2770
2876
|
via: (value)=>{
|
|
2771
2877
|
let transparentToValue = transparentTo(value);
|
|
2772
2878
|
return {
|
|
2773
|
-
"
|
|
2879
|
+
"@defaults gradient-color-stops": {},
|
|
2774
2880
|
"--tw-gradient-to": `${transparentToValue} var(--tw-gradient-to-position)`,
|
|
2775
|
-
"--tw-gradient-
|
|
2776
|
-
"--tw-gradient-stops": `var(--tw-gradient-from), ${(0, _toColorValue.default)(value, "via")} var(--tw-gradient-via-position), var(--tw-gradient-to)`
|
|
2881
|
+
"--tw-gradient-stops": `var(--tw-gradient-from), ${(0, _toColorValue.default)(value)} var(--tw-gradient-via-position), var(--tw-gradient-to)`
|
|
2777
2882
|
};
|
|
2778
2883
|
}
|
|
2779
2884
|
}, options);
|
|
@@ -2786,8 +2891,8 @@ let corePlugins = {
|
|
|
2786
2891
|
}, positionOptions);
|
|
2787
2892
|
matchUtilities({
|
|
2788
2893
|
to: (value)=>({
|
|
2789
|
-
"
|
|
2790
|
-
"--tw-gradient-to
|
|
2894
|
+
"@defaults gradient-color-stops": {},
|
|
2895
|
+
"--tw-gradient-to": `${(0, _toColorValue.default)(value)} var(--tw-gradient-to-position)`
|
|
2791
2896
|
})
|
|
2792
2897
|
}, options);
|
|
2793
2898
|
matchUtilities({
|
|
@@ -3587,6 +3692,9 @@ let corePlugins = {
|
|
|
3587
3692
|
".mix-blend-luminosity": {
|
|
3588
3693
|
"mix-blend-mode": "luminosity"
|
|
3589
3694
|
},
|
|
3695
|
+
".mix-blend-plus-darker": {
|
|
3696
|
+
"mix-blend-mode": "plus-darker"
|
|
3697
|
+
},
|
|
3590
3698
|
".mix-blend-plus-lighter": {
|
|
3591
3699
|
"mix-blend-mode": "plus-lighter"
|
|
3592
3700
|
}
|
|
@@ -4152,6 +4260,51 @@ let corePlugins = {
|
|
|
4152
4260
|
]
|
|
4153
4261
|
]
|
|
4154
4262
|
]),
|
|
4263
|
+
contain: ({ addDefaults , addUtilities })=>{
|
|
4264
|
+
let cssContainValue = "var(--tw-contain-size) var(--tw-contain-layout) var(--tw-contain-paint) var(--tw-contain-style)";
|
|
4265
|
+
addDefaults("contain", {
|
|
4266
|
+
"--tw-contain-size": " ",
|
|
4267
|
+
"--tw-contain-layout": " ",
|
|
4268
|
+
"--tw-contain-paint": " ",
|
|
4269
|
+
"--tw-contain-style": " "
|
|
4270
|
+
});
|
|
4271
|
+
addUtilities({
|
|
4272
|
+
".contain-none": {
|
|
4273
|
+
contain: "none"
|
|
4274
|
+
},
|
|
4275
|
+
".contain-content": {
|
|
4276
|
+
contain: "content"
|
|
4277
|
+
},
|
|
4278
|
+
".contain-strict": {
|
|
4279
|
+
contain: "strict"
|
|
4280
|
+
},
|
|
4281
|
+
".contain-size": {
|
|
4282
|
+
"@defaults contain": {},
|
|
4283
|
+
"--tw-contain-size": "size",
|
|
4284
|
+
contain: cssContainValue
|
|
4285
|
+
},
|
|
4286
|
+
".contain-inline-size": {
|
|
4287
|
+
"@defaults contain": {},
|
|
4288
|
+
"--tw-contain-size": "inline-size",
|
|
4289
|
+
contain: cssContainValue
|
|
4290
|
+
},
|
|
4291
|
+
".contain-layout": {
|
|
4292
|
+
"@defaults contain": {},
|
|
4293
|
+
"--tw-contain-layout": "layout",
|
|
4294
|
+
contain: cssContainValue
|
|
4295
|
+
},
|
|
4296
|
+
".contain-paint": {
|
|
4297
|
+
"@defaults contain": {},
|
|
4298
|
+
"--tw-contain-paint": "paint",
|
|
4299
|
+
contain: cssContainValue
|
|
4300
|
+
},
|
|
4301
|
+
".contain-style": {
|
|
4302
|
+
"@defaults contain": {},
|
|
4303
|
+
"--tw-contain-style": "style",
|
|
4304
|
+
contain: cssContainValue
|
|
4305
|
+
}
|
|
4306
|
+
});
|
|
4307
|
+
},
|
|
4155
4308
|
content: (0, _createUtilityPlugin.default)("content", [
|
|
4156
4309
|
[
|
|
4157
4310
|
"content",
|
|
@@ -4163,5 +4316,15 @@ let corePlugins = {
|
|
|
4163
4316
|
]
|
|
4164
4317
|
]
|
|
4165
4318
|
]
|
|
4166
|
-
])
|
|
4319
|
+
]),
|
|
4320
|
+
forcedColorAdjust: ({ addUtilities })=>{
|
|
4321
|
+
addUtilities({
|
|
4322
|
+
".forced-color-adjust-auto": {
|
|
4323
|
+
"forced-color-adjust": "auto"
|
|
4324
|
+
},
|
|
4325
|
+
".forced-color-adjust-none": {
|
|
4326
|
+
"forced-color-adjust": "none"
|
|
4327
|
+
}
|
|
4328
|
+
});
|
|
4329
|
+
}
|
|
4167
4330
|
};
|
package/lib/css/preflight.css
CHANGED
|
@@ -24,16 +24,19 @@
|
|
|
24
24
|
4. Use the user's configured `sans` font-family by default.
|
|
25
25
|
5. Use the user's configured `sans` font-feature-settings by default.
|
|
26
26
|
6. Use the user's configured `sans` font-variation-settings by default.
|
|
27
|
+
7. Disable tap highlights on iOS
|
|
27
28
|
*/
|
|
28
29
|
|
|
29
|
-
html
|
|
30
|
+
html,
|
|
31
|
+
:host {
|
|
30
32
|
line-height: 1.5; /* 1 */
|
|
31
33
|
-webkit-text-size-adjust: 100%; /* 2 */
|
|
32
34
|
-moz-tab-size: 4; /* 3 */
|
|
33
35
|
tab-size: 4; /* 3 */
|
|
34
|
-
font-family: theme('fontFamily.sans', ui-sans-serif, system-ui,
|
|
36
|
+
font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */
|
|
35
37
|
font-feature-settings: theme('fontFamily.sans[1].fontFeatureSettings', normal); /* 5 */
|
|
36
38
|
font-variation-settings: theme('fontFamily.sans[1].fontVariationSettings', normal); /* 6 */
|
|
39
|
+
-webkit-tap-highlight-color: transparent; /* 7 */
|
|
37
40
|
}
|
|
38
41
|
|
|
39
42
|
/*
|
|
@@ -99,8 +102,10 @@ strong {
|
|
|
99
102
|
}
|
|
100
103
|
|
|
101
104
|
/*
|
|
102
|
-
1. Use the user's configured `mono` font
|
|
103
|
-
2.
|
|
105
|
+
1. Use the user's configured `mono` font-family by default.
|
|
106
|
+
2. Use the user's configured `mono` font-feature-settings by default.
|
|
107
|
+
3. Use the user's configured `mono` font-variation-settings by default.
|
|
108
|
+
4. Correct the odd `em` font sizing in all browsers.
|
|
104
109
|
*/
|
|
105
110
|
|
|
106
111
|
code,
|
|
@@ -108,7 +113,9 @@ kbd,
|
|
|
108
113
|
samp,
|
|
109
114
|
pre {
|
|
110
115
|
font-family: theme('fontFamily.mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace); /* 1 */
|
|
111
|
-
font-
|
|
116
|
+
font-feature-settings: theme('fontFamily.mono[1].fontFeatureSettings', normal); /* 2 */
|
|
117
|
+
font-variation-settings: theme('fontFamily.mono[1].fontVariationSettings', normal); /* 3 */
|
|
118
|
+
font-size: 1em; /* 4 */
|
|
112
119
|
}
|
|
113
120
|
|
|
114
121
|
/*
|
|
@@ -163,6 +170,8 @@ optgroup,
|
|
|
163
170
|
select,
|
|
164
171
|
textarea {
|
|
165
172
|
font-family: inherit; /* 1 */
|
|
173
|
+
font-feature-settings: inherit; /* 1 */
|
|
174
|
+
font-variation-settings: inherit; /* 1 */
|
|
166
175
|
font-size: 100%; /* 1 */
|
|
167
176
|
font-weight: inherit; /* 1 */
|
|
168
177
|
line-height: inherit; /* 1 */
|
|
@@ -186,9 +195,9 @@ select {
|
|
|
186
195
|
*/
|
|
187
196
|
|
|
188
197
|
button,
|
|
189
|
-
[type='button'],
|
|
190
|
-
[type='reset'],
|
|
191
|
-
[type='submit'] {
|
|
198
|
+
input:where([type='button']),
|
|
199
|
+
input:where([type='reset']),
|
|
200
|
+
input:where([type='submit']) {
|
|
192
201
|
-webkit-appearance: button; /* 1 */
|
|
193
202
|
background-color: transparent; /* 2 */
|
|
194
203
|
background-image: none; /* 2 */
|
|
@@ -300,6 +309,13 @@ menu {
|
|
|
300
309
|
padding: 0;
|
|
301
310
|
}
|
|
302
311
|
|
|
312
|
+
/*
|
|
313
|
+
Reset default styling for dialogs.
|
|
314
|
+
*/
|
|
315
|
+
dialog {
|
|
316
|
+
padding: 0;
|
|
317
|
+
}
|
|
318
|
+
|
|
303
319
|
/*
|
|
304
320
|
Prevent resizing textareas horizontally by default.
|
|
305
321
|
*/
|
package/lib/featureFlags.js
CHANGED
|
@@ -9,14 +9,19 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
flagEnabled: ()
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
flagEnabled: function() {
|
|
13
|
+
return flagEnabled;
|
|
14
|
+
},
|
|
15
|
+
issueFlagNotices: function() {
|
|
16
|
+
return issueFlagNotices;
|
|
17
|
+
},
|
|
18
|
+
default: function() {
|
|
19
|
+
return _default;
|
|
20
|
+
}
|
|
15
21
|
});
|
|
16
|
-
const _picocolors = /*#__PURE__*/
|
|
17
|
-
const _log = /*#__PURE__*/
|
|
18
|
-
|
|
19
|
-
function _interopRequireDefault(obj) {
|
|
22
|
+
const _picocolors = /*#__PURE__*/ _interop_require_default(require("picocolors"));
|
|
23
|
+
const _log = /*#__PURE__*/ _interop_require_default(require("./util/log"));
|
|
24
|
+
function _interop_require_default(obj) {
|
|
20
25
|
return obj && obj.__esModule ? obj : {
|
|
21
26
|
default: obj
|
|
22
27
|
};
|
|
@@ -25,10 +30,10 @@ let defaults = {
|
|
|
25
30
|
optimizeUniversalDefaults: false,
|
|
26
31
|
generalizedModifiers: true,
|
|
27
32
|
get disableColorOpacityUtilitiesByDefault () {
|
|
28
|
-
return
|
|
33
|
+
return false;
|
|
29
34
|
},
|
|
30
35
|
get relativeContentPathsByDefault () {
|
|
31
|
-
return
|
|
36
|
+
return false;
|
|
32
37
|
}
|
|
33
38
|
};
|
|
34
39
|
let featureFlags = {
|
package/lib/index.js
CHANGED
|
@@ -4,11 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "hasContentChanged", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return hasContentChanged;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
|
-
const _crypto = /*#__PURE__*/
|
|
10
|
-
const _sharedState = /*#__PURE__*/
|
|
11
|
-
function
|
|
11
|
+
const _crypto = /*#__PURE__*/ _interop_require_default(require("crypto"));
|
|
12
|
+
const _sharedState = /*#__PURE__*/ _interop_require_wildcard(require("./sharedState"));
|
|
13
|
+
function _interop_require_default(obj) {
|
|
12
14
|
return obj && obj.__esModule ? obj : {
|
|
13
15
|
default: obj
|
|
14
16
|
};
|
|
@@ -21,7 +23,7 @@ function _getRequireWildcardCache(nodeInterop) {
|
|
|
21
23
|
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
22
24
|
})(nodeInterop);
|
|
23
25
|
}
|
|
24
|
-
function
|
|
26
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
25
27
|
if (!nodeInterop && obj && obj.__esModule) {
|
|
26
28
|
return obj;
|
|
27
29
|
}
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return collapseDuplicateDeclarations;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
function collapseDuplicateDeclarations() {
|
|
10
12
|
return (root)=>{
|
|
@@ -51,21 +53,21 @@ function collapseDuplicateDeclarations() {
|
|
|
51
53
|
// with the same unit but the last one in the list.
|
|
52
54
|
for (let declarations of byProperty.values()){
|
|
53
55
|
let byUnit = new Map();
|
|
54
|
-
for (let
|
|
55
|
-
let unit = resolveUnit(
|
|
56
|
+
for (let decl of declarations){
|
|
57
|
+
let unit = resolveUnit(decl.value);
|
|
56
58
|
if (unit === null) {
|
|
57
59
|
continue;
|
|
58
60
|
}
|
|
59
61
|
if (!byUnit.has(unit)) {
|
|
60
62
|
byUnit.set(unit, new Set());
|
|
61
63
|
}
|
|
62
|
-
byUnit.get(unit).add(
|
|
64
|
+
byUnit.get(unit).add(decl);
|
|
63
65
|
}
|
|
64
|
-
for (let
|
|
66
|
+
for (let declarations of byUnit.values()){
|
|
65
67
|
// Get all but the last one
|
|
66
|
-
let removableDeclarations = Array.from(
|
|
67
|
-
for (let
|
|
68
|
-
|
|
68
|
+
let removableDeclarations = Array.from(declarations).slice(0, -1);
|
|
69
|
+
for (let decl of removableDeclarations){
|
|
70
|
+
decl.remove();
|
|
69
71
|
}
|
|
70
72
|
}
|
|
71
73
|
}
|