Skip to content

Commit 49f9d13

Browse files
committed
chore(deps): commit tailwindcss 3.4.12(lts)
1 parent 6f7c24c commit 49f9d13

17 files changed

+1207
-124
lines changed

packages/tailwindcss-patch/test/__snapshots__/index.test.ts.snap

Lines changed: 368 additions & 0 deletions
Large diffs are not rendered by default.

packages/tailwindcss-patch/test/__snapshots__/postcss8-v3.test.ts.snap

Lines changed: 108 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,114 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

33
exports[`postcss > getCss 0.common 1`] = `
4-
"/*
5-
! tailwindcss v3.4.7 | MIT License | https://tailwindcss.com
4+
"*, ::before, ::after {
5+
--tw-border-spacing-x: 0;
6+
--tw-border-spacing-y: 0;
7+
--tw-translate-x: 0;
8+
--tw-translate-y: 0;
9+
--tw-rotate: 0;
10+
--tw-skew-x: 0;
11+
--tw-skew-y: 0;
12+
--tw-scale-x: 1;
13+
--tw-scale-y: 1;
14+
--tw-pan-x: ;
15+
--tw-pan-y: ;
16+
--tw-pinch-zoom: ;
17+
--tw-scroll-snap-strictness: proximity;
18+
--tw-gradient-from-position: ;
19+
--tw-gradient-via-position: ;
20+
--tw-gradient-to-position: ;
21+
--tw-ordinal: ;
22+
--tw-slashed-zero: ;
23+
--tw-numeric-figure: ;
24+
--tw-numeric-spacing: ;
25+
--tw-numeric-fraction: ;
26+
--tw-ring-inset: ;
27+
--tw-ring-offset-width: 0px;
28+
--tw-ring-offset-color: #fff;
29+
--tw-ring-color: rgb(59 130 246 / 0.5);
30+
--tw-ring-offset-shadow: 0 0 #0000;
31+
--tw-ring-shadow: 0 0 #0000;
32+
--tw-shadow: 0 0 #0000;
33+
--tw-shadow-colored: 0 0 #0000;
34+
--tw-blur: ;
35+
--tw-brightness: ;
36+
--tw-contrast: ;
37+
--tw-grayscale: ;
38+
--tw-hue-rotate: ;
39+
--tw-invert: ;
40+
--tw-saturate: ;
41+
--tw-sepia: ;
42+
--tw-drop-shadow: ;
43+
--tw-backdrop-blur: ;
44+
--tw-backdrop-brightness: ;
45+
--tw-backdrop-contrast: ;
46+
--tw-backdrop-grayscale: ;
47+
--tw-backdrop-hue-rotate: ;
48+
--tw-backdrop-invert: ;
49+
--tw-backdrop-opacity: ;
50+
--tw-backdrop-saturate: ;
51+
--tw-backdrop-sepia: ;
52+
--tw-contain-size: ;
53+
--tw-contain-layout: ;
54+
--tw-contain-paint: ;
55+
--tw-contain-style: ;
56+
}
57+
58+
::backdrop {
59+
--tw-border-spacing-x: 0;
60+
--tw-border-spacing-y: 0;
61+
--tw-translate-x: 0;
62+
--tw-translate-y: 0;
63+
--tw-rotate: 0;
64+
--tw-skew-x: 0;
65+
--tw-skew-y: 0;
66+
--tw-scale-x: 1;
67+
--tw-scale-y: 1;
68+
--tw-pan-x: ;
69+
--tw-pan-y: ;
70+
--tw-pinch-zoom: ;
71+
--tw-scroll-snap-strictness: proximity;
72+
--tw-gradient-from-position: ;
73+
--tw-gradient-via-position: ;
74+
--tw-gradient-to-position: ;
75+
--tw-ordinal: ;
76+
--tw-slashed-zero: ;
77+
--tw-numeric-figure: ;
78+
--tw-numeric-spacing: ;
79+
--tw-numeric-fraction: ;
80+
--tw-ring-inset: ;
81+
--tw-ring-offset-width: 0px;
82+
--tw-ring-offset-color: #fff;
83+
--tw-ring-color: rgb(59 130 246 / 0.5);
84+
--tw-ring-offset-shadow: 0 0 #0000;
85+
--tw-ring-shadow: 0 0 #0000;
86+
--tw-shadow: 0 0 #0000;
87+
--tw-shadow-colored: 0 0 #0000;
88+
--tw-blur: ;
89+
--tw-brightness: ;
90+
--tw-contrast: ;
91+
--tw-grayscale: ;
92+
--tw-hue-rotate: ;
93+
--tw-invert: ;
94+
--tw-saturate: ;
95+
--tw-sepia: ;
96+
--tw-drop-shadow: ;
97+
--tw-backdrop-blur: ;
98+
--tw-backdrop-brightness: ;
99+
--tw-backdrop-contrast: ;
100+
--tw-backdrop-grayscale: ;
101+
--tw-backdrop-hue-rotate: ;
102+
--tw-backdrop-invert: ;
103+
--tw-backdrop-opacity: ;
104+
--tw-backdrop-saturate: ;
105+
--tw-backdrop-sepia: ;
106+
--tw-contain-size: ;
107+
--tw-contain-layout: ;
108+
--tw-contain-paint: ;
109+
--tw-contain-style: ;
110+
}/*
111+
! tailwindcss v3.4.12 | MIT License | https://tailwindcss.com
6112
*//*
7113
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
8114
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
@@ -388,114 +494,6 @@ video {
388494
/* Make elements with the HTML hidden attribute stay hidden by default */
389495
[hidden] {
390496
display: none;
391-
}
392-
393-
*, ::before, ::after {
394-
--tw-border-spacing-x: 0;
395-
--tw-border-spacing-y: 0;
396-
--tw-translate-x: 0;
397-
--tw-translate-y: 0;
398-
--tw-rotate: 0;
399-
--tw-skew-x: 0;
400-
--tw-skew-y: 0;
401-
--tw-scale-x: 1;
402-
--tw-scale-y: 1;
403-
--tw-pan-x: ;
404-
--tw-pan-y: ;
405-
--tw-pinch-zoom: ;
406-
--tw-scroll-snap-strictness: proximity;
407-
--tw-gradient-from-position: ;
408-
--tw-gradient-via-position: ;
409-
--tw-gradient-to-position: ;
410-
--tw-ordinal: ;
411-
--tw-slashed-zero: ;
412-
--tw-numeric-figure: ;
413-
--tw-numeric-spacing: ;
414-
--tw-numeric-fraction: ;
415-
--tw-ring-inset: ;
416-
--tw-ring-offset-width: 0px;
417-
--tw-ring-offset-color: #fff;
418-
--tw-ring-color: rgb(59 130 246 / 0.5);
419-
--tw-ring-offset-shadow: 0 0 #0000;
420-
--tw-ring-shadow: 0 0 #0000;
421-
--tw-shadow: 0 0 #0000;
422-
--tw-shadow-colored: 0 0 #0000;
423-
--tw-blur: ;
424-
--tw-brightness: ;
425-
--tw-contrast: ;
426-
--tw-grayscale: ;
427-
--tw-hue-rotate: ;
428-
--tw-invert: ;
429-
--tw-saturate: ;
430-
--tw-sepia: ;
431-
--tw-drop-shadow: ;
432-
--tw-backdrop-blur: ;
433-
--tw-backdrop-brightness: ;
434-
--tw-backdrop-contrast: ;
435-
--tw-backdrop-grayscale: ;
436-
--tw-backdrop-hue-rotate: ;
437-
--tw-backdrop-invert: ;
438-
--tw-backdrop-opacity: ;
439-
--tw-backdrop-saturate: ;
440-
--tw-backdrop-sepia: ;
441-
--tw-contain-size: ;
442-
--tw-contain-layout: ;
443-
--tw-contain-paint: ;
444-
--tw-contain-style: ;
445-
}
446-
447-
::backdrop {
448-
--tw-border-spacing-x: 0;
449-
--tw-border-spacing-y: 0;
450-
--tw-translate-x: 0;
451-
--tw-translate-y: 0;
452-
--tw-rotate: 0;
453-
--tw-skew-x: 0;
454-
--tw-skew-y: 0;
455-
--tw-scale-x: 1;
456-
--tw-scale-y: 1;
457-
--tw-pan-x: ;
458-
--tw-pan-y: ;
459-
--tw-pinch-zoom: ;
460-
--tw-scroll-snap-strictness: proximity;
461-
--tw-gradient-from-position: ;
462-
--tw-gradient-via-position: ;
463-
--tw-gradient-to-position: ;
464-
--tw-ordinal: ;
465-
--tw-slashed-zero: ;
466-
--tw-numeric-figure: ;
467-
--tw-numeric-spacing: ;
468-
--tw-numeric-fraction: ;
469-
--tw-ring-inset: ;
470-
--tw-ring-offset-width: 0px;
471-
--tw-ring-offset-color: #fff;
472-
--tw-ring-color: rgb(59 130 246 / 0.5);
473-
--tw-ring-offset-shadow: 0 0 #0000;
474-
--tw-ring-shadow: 0 0 #0000;
475-
--tw-shadow: 0 0 #0000;
476-
--tw-shadow-colored: 0 0 #0000;
477-
--tw-blur: ;
478-
--tw-brightness: ;
479-
--tw-contrast: ;
480-
--tw-grayscale: ;
481-
--tw-hue-rotate: ;
482-
--tw-invert: ;
483-
--tw-saturate: ;
484-
--tw-sepia: ;
485-
--tw-drop-shadow: ;
486-
--tw-backdrop-blur: ;
487-
--tw-backdrop-brightness: ;
488-
--tw-backdrop-contrast: ;
489-
--tw-backdrop-grayscale: ;
490-
--tw-backdrop-hue-rotate: ;
491-
--tw-backdrop-invert: ;
492-
--tw-backdrop-opacity: ;
493-
--tw-backdrop-saturate: ;
494-
--tw-backdrop-sepia: ;
495-
--tw-contain-size: ;
496-
--tw-contain-layout: ;
497-
--tw-contain-paint: ;
498-
--tw-contain-style: ;
499497
}.text-3xl {
500498
font-size: 1.875rem;
501499
line-height: 2.25rem;

packages/tailwindcss-patch/test/cache.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import path from 'node:path'
2-
import fs from 'fs-extra'
3-
import { getCss } from './utils'
42
import { pkgName } from '@/constants'
53
import { CacheManager, TailwindcssPatcher } from '@/core'
64
import { getCacheOptions } from '@/core/cache'
5+
import fs from 'fs-extra'
6+
import { getCss } from './utils'
77

88
describe('cache', () => {
99
let cm: CacheManager

packages/tailwindcss-patch/test/config.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { resolve } from 'node:path'
2-
import { existsSync } from 'fs-extra'
2+
import { getConfig, getDefaultMangleUserConfig, getDefaultUserConfig, initConfig } from '@/config'
33
import { deleteAsync } from 'del'
4+
import { existsSync } from 'fs-extra'
45
import { fixturesRoot } from './utils'
5-
import { getConfig, getDefaultMangleUserConfig, getDefaultUserConfig, initConfig } from '@/config'
66

77
describe('config', () => {
88
it('0.default', async () => {
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"use strict";
2+
module.exports = require("./plugin");
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", {
3+
value: true
4+
});
5+
const _setupTrackingContext = /*#__PURE__*/ _interop_require_default(require("./lib/setupTrackingContext"));
6+
const _processTailwindFeatures = /*#__PURE__*/ _interop_require_default(require("./processTailwindFeatures"));
7+
const _sharedState = require("./lib/sharedState");
8+
const _findAtConfigPath = require("./lib/findAtConfigPath");
9+
function _interop_require_default(obj) {
10+
return obj && obj.__esModule ? obj : {
11+
default: obj
12+
};
13+
}
14+
module.exports = function tailwindcss(configOrPath) {
15+
return {
16+
postcssPlugin: "tailwindcss",
17+
plugins: [
18+
_sharedState.env.DEBUG && function(root) {
19+
console.log("\n");
20+
console.time("JIT TOTAL");
21+
return root;
22+
},
23+
async function(root, result) {
24+
var _findAtConfigPath1;
25+
// Use the path for the `@config` directive if it exists, otherwise use the
26+
// path for the file being processed
27+
configOrPath = (_findAtConfigPath1 = (0, _findAtConfigPath.findAtConfigPath)(root, result)) !== null && _findAtConfigPath1 !== void 0 ? _findAtConfigPath1 : configOrPath;
28+
let context = (0, _setupTrackingContext.default)(configOrPath);
29+
if (root.type === "document") {
30+
let roots = root.nodes.filter((node)=>node.type === "root");
31+
for (const root of roots){
32+
if (root.type === "root") {
33+
await (0, _processTailwindFeatures.default)(context)(root, result);
34+
}
35+
}
36+
return;
37+
}
38+
await (0, _processTailwindFeatures.default)(context)(root, result);
39+
},
40+
_sharedState.env.DEBUG && function(root) {
41+
console.timeEnd("JIT TOTAL");
42+
console.log("\n");
43+
return root;
44+
}
45+
].filter(Boolean)
46+
};
47+
};
48+
module.exports.postcss = true;
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", {
3+
value: true
4+
});
5+
Object.defineProperty(exports, "default", {
6+
enumerable: true,
7+
get: function() {
8+
return processTailwindFeatures;
9+
}
10+
});
11+
const _normalizeTailwindDirectives = /*#__PURE__*/ _interop_require_default(require("./lib/normalizeTailwindDirectives"));
12+
const _expandTailwindAtRules = /*#__PURE__*/ _interop_require_default(require("./lib/expandTailwindAtRules"));
13+
const _expandApplyAtRules = /*#__PURE__*/ _interop_require_default(require("./lib/expandApplyAtRules"));
14+
const _evaluateTailwindFunctions = /*#__PURE__*/ _interop_require_default(require("./lib/evaluateTailwindFunctions"));
15+
const _substituteScreenAtRules = /*#__PURE__*/ _interop_require_default(require("./lib/substituteScreenAtRules"));
16+
const _resolveDefaultsAtRules = /*#__PURE__*/ _interop_require_default(require("./lib/resolveDefaultsAtRules"));
17+
const _collapseAdjacentRules = /*#__PURE__*/ _interop_require_default(require("./lib/collapseAdjacentRules"));
18+
const _collapseDuplicateDeclarations = /*#__PURE__*/ _interop_require_default(require("./lib/collapseDuplicateDeclarations"));
19+
const _partitionApplyAtRules = /*#__PURE__*/ _interop_require_default(require("./lib/partitionApplyAtRules"));
20+
const _setupContextUtils = require("./lib/setupContextUtils");
21+
const _featureFlags = require("./featureFlags");
22+
function _interop_require_default(obj) {
23+
return obj && obj.__esModule ? obj : {
24+
default: obj
25+
};
26+
}
27+
function processTailwindFeatures(setupContext) {
28+
return async function(root, result) {
29+
let { tailwindDirectives , applyDirectives } = (0, _normalizeTailwindDirectives.default)(root);
30+
// Partition apply rules that are found in the css
31+
// itself.
32+
(0, _partitionApplyAtRules.default)()(root, result);
33+
let context = setupContext({
34+
tailwindDirectives,
35+
applyDirectives,
36+
registerDependency (dependency) {
37+
result.messages.push({
38+
plugin: "tailwindcss",
39+
parent: result.opts.from,
40+
...dependency
41+
});
42+
},
43+
createContext (tailwindConfig, changedContent) {
44+
return (0, _setupContextUtils.createContext)(tailwindConfig, changedContent, root);
45+
}
46+
})(root, result);
47+
if (context.tailwindConfig.separator === "-") {
48+
throw new Error("The '-' character cannot be used as a custom separator in JIT mode due to parsing ambiguity. Please use another character like '_' instead.");
49+
}
50+
(0, _featureFlags.issueFlagNotices)(context.tailwindConfig);
51+
await (0, _expandTailwindAtRules.default)(context)(root, result);
52+
// Partition apply rules that are generated by
53+
// addComponents, addUtilities and so on.
54+
(0, _partitionApplyAtRules.default)()(root, result);
55+
(0, _expandApplyAtRules.default)(context)(root, result);
56+
(0, _evaluateTailwindFunctions.default)(context)(root, result);
57+
(0, _substituteScreenAtRules.default)(context)(root, result);
58+
(0, _resolveDefaultsAtRules.default)(context)(root, result);
59+
(0, _collapseAdjacentRules.default)(context)(root, result);
60+
(0, _collapseDuplicateDeclarations.default)(context)(root, result);
61+
};
62+
}

0 commit comments

Comments
 (0)