@@ -26,7 +26,7 @@ module.exports = function tailwindcss(configOrPath) {
26
26
console .log (" \\ n" );
27
27
console .time (" JIT TOTAL" );
28
28
return root ;
29
- }, function (root , result ) {
29
+ }, async function (root , result ) {
30
30
contextRef .value .length = 0 ;
31
31
var _findAtConfigPath1;
32
32
// Use the path for the \`@config\` directive if it exists, otherwise use the
@@ -37,12 +37,12 @@ module.exports = function tailwindcss(configOrPath) {
37
37
let roots = root .nodes .filter (node => node .type === " root" );
38
38
for (const root of roots ) {
39
39
if (root .type === " root" ) {
40
- contextRef .value .push ((0 , _processTailwindFeatures .default )(context )(root , result ));
40
+ contextRef .value .push (await (0 , _processTailwindFeatures .default )(context )(root , result ));
41
41
}
42
42
}
43
43
return ;
44
44
}
45
- contextRef .value .push ((0 , _processTailwindFeatures .default )(context )(root , result ));
45
+ contextRef .value .push (await (0 , _processTailwindFeatures .default )(context )(root , result ));
46
46
}, false && function lightningCssPlugin(_root , result ) {
47
47
let postcss = require (" postcss" );
48
48
let lightningcss = require (" lightningcss" );
@@ -120,7 +120,7 @@ function _interop_require_default(obj) {
120
120
};
121
121
}
122
122
function processTailwindFeatures(setupContext ) {
123
- return function (root , result ) {
123
+ return async function (root , result ) {
124
124
let {
125
125
tailwindDirectives,
126
126
applyDirectives
@@ -147,7 +147,7 @@ function processTailwindFeatures(setupContext) {
147
147
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." );
148
148
}
149
149
(0 , _featureFlags .issueFlagNotices )(context .tailwindConfig );
150
- (0 , _expandTailwindAtRules .default )(context )(root , result );
150
+ await (0 , _expandTailwindAtRules .default )(context )(root , result );
151
151
// Partition apply rules that are generated by
152
152
// addComponents, addUtilities and so on.
153
153
(0 , _partitionApplyAtRules .default )()(root , result );
@@ -1549,3 +1549,166 @@ function processTailwindFeatures(setupContext) {
1549
1549
}" ,
1550
1550
}
1551
1551
` ;
1552
+
1553
+ exports [` versions-patch patch tailwindcss3.3.3 1` ] = `
1554
+ {
1555
+ " plugin" : " " use strict " ;
1556
+
1557
+ Object .defineProperty (exports , " __esModule" , {
1558
+ value: true
1559
+ });
1560
+ const _setupTrackingContext = /* #__PURE__*/ _interop_require_default (require (" ./lib/setupTrackingContext" ));
1561
+ const _processTailwindFeatures = /* #__PURE__*/ _interop_require_default (require (" ./processTailwindFeatures" ));
1562
+ const _sharedState = require (" ./lib/sharedState" );
1563
+ const _findAtConfigPath = require (" ./lib/findAtConfigPath" );
1564
+ function _interop_require_default(obj ) {
1565
+ return obj && obj .__esModule ? obj : {
1566
+ default : obj
1567
+ };
1568
+ }
1569
+ const contextRef = {
1570
+ value: []
1571
+ };
1572
+ module .exports = function tailwindcss(configOrPath ) {
1573
+ return {
1574
+ postcssPlugin: " tailwindcss" ,
1575
+ plugins: [_sharedState .env .DEBUG && function (root ) {
1576
+ console .log (" \\ n" );
1577
+ console .time (" JIT TOTAL" );
1578
+ return root ;
1579
+ }, async function (root , result ) {
1580
+ contextRef .value .length = 0 ;
1581
+ var _findAtConfigPath1;
1582
+ // Use the path for the \`@config\` directive if it exists, otherwise use the
1583
+ // path for the file being processed
1584
+ configOrPath = (_findAtConfigPath1 = (0 , _findAtConfigPath .findAtConfigPath )(root , result )) !== null && _findAtConfigPath1 !== void 0 ? _findAtConfigPath1 : configOrPath ;
1585
+ let context = (0 , _setupTrackingContext .default )(configOrPath );
1586
+ if (root .type === " document" ) {
1587
+ let roots = root .nodes .filter (node => node .type === " root" );
1588
+ for (const root of roots ) {
1589
+ if (root .type === " root" ) {
1590
+ contextRef .value .push (await (0 , _processTailwindFeatures .default )(context )(root , result ));
1591
+ }
1592
+ }
1593
+ return ;
1594
+ }
1595
+ contextRef .value .push (await (0 , _processTailwindFeatures .default )(context )(root , result ));
1596
+ }, false && function lightningCssPlugin(_root , result ) {
1597
+ let postcss = require (" postcss" );
1598
+ let lightningcss = require (" lightningcss" );
1599
+ let browserslist = require (" browserslist" );
1600
+ try {
1601
+ let transformed = lightningcss .transform ({
1602
+ filename: result .opts .from ,
1603
+ code: Buffer .from (result .root .toString ()),
1604
+ minify: false ,
1605
+ sourceMap: !! result .map ,
1606
+ inputSourceMap: result .map ? result .map .toString () : undefined ,
1607
+ targets: typeof process !== " undefined" && process .env .JEST_WORKER_ID ? {
1608
+ chrome: 106 << 16
1609
+ } : lightningcss .browserslistToTargets (browserslist (require (" ../package.json" ).browserslist )),
1610
+ drafts: {
1611
+ nesting: true ,
1612
+ customMedia: true
1613
+ }
1614
+ });
1615
+ var _result_map;
1616
+ result .map = Object .assign ((_result_map = result .map ) !== null && _result_map !== void 0 ? _result_map : {}, {
1617
+ toJSON() {
1618
+ return transformed .map .toJSON ();
1619
+ },
1620
+ toString() {
1621
+ return transformed .map .toString ();
1622
+ }
1623
+ });
1624
+ result .root = postcss .parse (transformed .code .toString (" utf8" ));
1625
+ } catch (err ) {
1626
+ if (typeof process !== " undefined" && process .env .JEST_WORKER_ID ) {
1627
+ let lines = err .source .split (" \\ n" );
1628
+ err = new Error ([" Error formatting using Lightning CSS:" , " " , ... [" \`\`\` css" , ... lines .slice (Math .max (err .loc .line - 3 , 0 ), err .loc .line ), " " .repeat (err .loc .column - 1 ) + " ^-- " + err .toString (), ... lines .slice (err .loc .line , err .loc .line + 2 ), " \`\`\` " ]].join (" \\ n" ));
1629
+ }
1630
+ if (Error .captureStackTrace ) {
1631
+ Error .captureStackTrace (err , lightningCssPlugin );
1632
+ }
1633
+ throw err ;
1634
+ }
1635
+ }, _sharedState .env .DEBUG && function (root ) {
1636
+ console .timeEnd (" JIT TOTAL" );
1637
+ console .log (" \\ n" );
1638
+ return root ;
1639
+ }].filter (Boolean )
1640
+ };
1641
+ };
1642
+ module .exports .postcss = true ;
1643
+ module .exports .contextRef = contextRef ;" ,
1644
+ " processTailwindFeatures" : " " use strict " ;
1645
+
1646
+ Object .defineProperty (exports , " __esModule" , {
1647
+ value: true
1648
+ });
1649
+ Object .defineProperty (exports , " default" , {
1650
+ enumerable: true ,
1651
+ get : function () {
1652
+ return processTailwindFeatures ;
1653
+ }
1654
+ });
1655
+ const _normalizeTailwindDirectives = /* #__PURE__*/ _interop_require_default (require (" ./lib/normalizeTailwindDirectives" ));
1656
+ const _expandTailwindAtRules = /* #__PURE__*/ _interop_require_default (require (" ./lib/expandTailwindAtRules" ));
1657
+ const _expandApplyAtRules = /* #__PURE__*/ _interop_require_default (require (" ./lib/expandApplyAtRules" ));
1658
+ const _evaluateTailwindFunctions = /* #__PURE__*/ _interop_require_default (require (" ./lib/evaluateTailwindFunctions" ));
1659
+ const _substituteScreenAtRules = /* #__PURE__*/ _interop_require_default (require (" ./lib/substituteScreenAtRules" ));
1660
+ const _resolveDefaultsAtRules = /* #__PURE__*/ _interop_require_default (require (" ./lib/resolveDefaultsAtRules" ));
1661
+ const _collapseAdjacentRules = /* #__PURE__*/ _interop_require_default (require (" ./lib/collapseAdjacentRules" ));
1662
+ const _collapseDuplicateDeclarations = /* #__PURE__*/ _interop_require_default (require (" ./lib/collapseDuplicateDeclarations" ));
1663
+ const _partitionApplyAtRules = /* #__PURE__*/ _interop_require_default (require (" ./lib/partitionApplyAtRules" ));
1664
+ const _detectNesting = /* #__PURE__*/ _interop_require_default (require (" ./lib/detectNesting" ));
1665
+ const _setupContextUtils = require (" ./lib/setupContextUtils" );
1666
+ const _featureFlags = require (" ./featureFlags" );
1667
+ function _interop_require_default(obj ) {
1668
+ return obj && obj .__esModule ? obj : {
1669
+ default : obj
1670
+ };
1671
+ }
1672
+ function processTailwindFeatures(setupContext ) {
1673
+ return async function (root , result ) {
1674
+ let {
1675
+ tailwindDirectives,
1676
+ applyDirectives
1677
+ } = (0 , _normalizeTailwindDirectives .default )(root );
1678
+ (0 , _detectNesting .default )()(root , result );
1679
+ // Partition apply rules that are found in the css
1680
+ // itself.
1681
+ (0 , _partitionApplyAtRules .default )()(root , result );
1682
+ let context = setupContext ({
1683
+ tailwindDirectives ,
1684
+ applyDirectives ,
1685
+ registerDependency(dependency ) {
1686
+ result .messages .push ({
1687
+ plugin: " tailwindcss" ,
1688
+ parent: result .opts .from ,
1689
+ ... dependency
1690
+ });
1691
+ },
1692
+ createContext(tailwindConfig , changedContent ) {
1693
+ return (0 , _setupContextUtils .createContext )(tailwindConfig , changedContent , root );
1694
+ }
1695
+ })(root , result );
1696
+ if (context .tailwindConfig .separator === " -" ) {
1697
+ 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." );
1698
+ }
1699
+ (0 , _featureFlags .issueFlagNotices )(context .tailwindConfig );
1700
+ await (0 , _expandTailwindAtRules .default )(context )(root , result );
1701
+ // Partition apply rules that are generated by
1702
+ // addComponents, addUtilities and so on.
1703
+ (0 , _partitionApplyAtRules .default )()(root , result );
1704
+ (0 , _expandApplyAtRules .default )(context )(root , result );
1705
+ (0 , _evaluateTailwindFunctions .default )(context )(root , result );
1706
+ (0 , _substituteScreenAtRules .default )(context )(root , result );
1707
+ (0 , _resolveDefaultsAtRules .default )(context )(root , result );
1708
+ (0 , _collapseAdjacentRules .default )(context )(root , result );
1709
+ (0 , _collapseDuplicateDeclarations .default )(context )(root , result );
1710
+ return context ;
1711
+ };
1712
+ }" ,
1713
+ }
1714
+ ` ;
0 commit comments