tailwindcss 0.0.0-insiders.ea10bb9 → 0.0.0-insiders.ea3d9cd
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/README.md +1 -1
- package/index.css +5 -0
- package/lib/cli/build/index.js +23 -10
- package/lib/cli/build/plugin.js +136 -117
- package/lib/cli/build/utils.js +18 -8
- package/lib/cli/build/watching.js +16 -12
- package/lib/cli/help/index.js +6 -4
- package/lib/cli/index.js +223 -10
- package/lib/cli/init/index.js +29 -12
- package/lib/cli.js +1 -227
- package/lib/corePluginList.js +8 -1
- package/lib/corePlugins.js +374 -77
- package/lib/css/preflight.css +9 -1
- package/lib/featureFlags.js +30 -17
- package/lib/index.js +1 -47
- package/lib/lib/cacheInvalidation.js +7 -5
- package/lib/lib/collapseAdjacentRules.js +5 -3
- package/lib/lib/collapseDuplicateDeclarations.js +12 -10
- package/lib/lib/content.js +61 -31
- package/lib/lib/defaultExtractor.js +15 -8
- package/lib/lib/detectNesting.js +10 -2
- package/lib/lib/evaluateTailwindFunctions.js +24 -20
- package/lib/lib/expandApplyAtRules.js +43 -35
- package/lib/lib/expandTailwindAtRules.js +89 -22
- package/lib/lib/findAtConfigPath.js +9 -7
- package/lib/lib/generateRules.js +160 -98
- package/lib/lib/getModuleDependencies.js +85 -37
- package/lib/lib/handleImportAtRules.js +50 -0
- package/lib/lib/load-config.js +42 -0
- package/lib/lib/normalizeTailwindDirectives.js +5 -18
- package/lib/lib/offsets.js +93 -4
- package/lib/lib/partitionApplyAtRules.js +3 -1
- package/lib/lib/regex.js +21 -7
- package/lib/lib/remap-bitfield.js +89 -0
- package/lib/lib/resolveDefaultsAtRules.js +28 -24
- package/lib/lib/setupContextUtils.js +191 -142
- package/lib/lib/setupTrackingContext.js +50 -26
- package/lib/lib/sharedState.js +28 -9
- package/lib/lib/substituteScreenAtRules.js +5 -3
- package/lib/plugin.js +116 -0
- package/lib/postcss-plugins/nesting/index.js +3 -1
- package/lib/postcss-plugins/nesting/plugin.js +10 -8
- package/lib/processTailwindFeatures.js +14 -12
- package/lib/public/colors.js +49 -25
- 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 +12 -0
- package/lib/public/resolve-config.js +6 -4
- package/lib/util/applyImportantSelector.js +36 -0
- 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 +5 -3
- package/lib/util/color.js +30 -12
- 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 +7 -5
- package/lib/util/dataTypes.js +88 -23
- package/lib/util/defaults.js +9 -7
- package/lib/util/escapeClassName.js +10 -8
- package/lib/util/escapeCommas.js +3 -1
- package/lib/util/flattenColorPalette.js +3 -1
- package/lib/util/formatVariantSelector.js +138 -160
- package/lib/util/getAllConfigs.js +8 -6
- package/lib/util/hashConfig.js +6 -4
- package/lib/util/isKeyframeRule.js +3 -1
- package/lib/util/isPlainObject.js +3 -1
- package/lib/util/isSyntacticallyValidPropertyValue.js +3 -1
- package/lib/util/log.js +25 -4
- package/lib/util/nameClass.js +12 -6
- package/lib/util/negateValue.js +4 -2
- package/lib/util/normalizeConfig.js +63 -36
- 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 +53 -55
- package/lib/util/prefixSelector.js +27 -11
- package/lib/util/pseudoElements.js +209 -0
- package/lib/util/removeAlphaVariables.js +3 -1
- package/lib/util/resolveConfig.js +17 -15
- package/lib/util/resolveConfigPath.js +26 -10
- package/lib/util/responsive.js +6 -4
- package/lib/util/splitAtTopLevelOnly.js +10 -2
- 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 +27 -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/loadConfig.d.ts +4 -0
- package/loadConfig.js +2 -0
- package/package.json +46 -45
- package/resolveConfig.d.ts +11 -2
- package/src/cli/build/index.js +17 -9
- package/src/cli/build/plugin.js +96 -73
- package/src/cli/build/watching.js +4 -2
- package/src/cli/index.js +217 -3
- package/src/cli/init/index.js +37 -8
- package/src/cli.js +1 -221
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +237 -34
- package/src/css/preflight.css +9 -1
- package/src/featureFlags.js +7 -3
- package/src/index.js +1 -47
- package/src/lib/content.js +45 -18
- package/src/lib/defaultExtractor.js +9 -3
- package/src/lib/detectNesting.js +9 -1
- package/src/lib/evaluateTailwindFunctions.js +4 -1
- package/src/lib/expandApplyAtRules.js +8 -1
- package/src/lib/expandTailwindAtRules.js +73 -12
- package/src/lib/generateRules.js +127 -49
- package/src/lib/getModuleDependencies.js +70 -30
- package/src/lib/handleImportAtRules.js +34 -0
- package/src/lib/load-config.ts +31 -0
- package/src/lib/normalizeTailwindDirectives.js +0 -27
- package/src/lib/offsets.js +104 -1
- package/src/lib/remap-bitfield.js +82 -0
- package/src/lib/setupContextUtils.js +109 -69
- package/src/lib/setupTrackingContext.js +37 -14
- package/src/lib/sharedState.js +11 -4
- package/src/plugin.js +124 -0
- package/src/public/colors.js +22 -0
- package/src/public/default-config.js +1 -1
- package/src/public/default-theme.js +2 -2
- package/src/public/load-config.js +2 -0
- package/src/util/applyImportantSelector.js +27 -0
- package/src/util/color.js +18 -3
- package/src/util/colorNames.js +150 -0
- package/src/util/dataTypes.js +49 -9
- package/src/util/formatVariantSelector.js +160 -163
- package/src/util/getAllConfigs.js +2 -2
- package/src/util/log.js +24 -0
- package/src/util/negateValue.js +1 -1
- package/src/util/normalizeConfig.js +39 -11
- package/src/util/pluginUtils.js +16 -35
- package/src/util/prefixSelector.js +28 -10
- package/src/util/pseudoElements.js +167 -0
- package/src/util/resolveConfigPath.js +12 -1
- package/src/util/splitAtTopLevelOnly.js +8 -1
- package/src/util/validateConfig.js +23 -0
- 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/.gitignore +1 -0
- package/stubs/.prettierrc.json +6 -0
- package/stubs/{defaultConfig.stub.js → config.full.js} +197 -147
- package/stubs/{simpleConfig.stub.js → config.simple.js} +1 -2
- package/stubs/{defaultPostCssConfig.stub.js → postcss.config.cjs} +0 -1
- package/stubs/postcss.config.js +5 -0
- package/stubs/tailwind.config.cjs +2 -0
- package/stubs/tailwind.config.js +2 -0
- package/stubs/tailwind.config.ts +3 -0
- package/types/config.d.ts +17 -10
- package/types/generated/colors.d.ts +22 -0
- package/types/generated/corePluginList.d.ts +1 -1
- package/types/generated/default-theme.d.ts +110 -80
- package/CHANGELOG.md +0 -2336
- package/lib/cli/build/deps.js +0 -54
- package/lib/cli/shared.js +0 -12
- package/lib/cli-peer-dependencies.js +0 -28
- package/lib/constants.js +0 -44
- package/peers/index.js +0 -79512
- package/scripts/install-integrations.js +0 -27
- package/scripts/rebuildFixtures.js +0 -68
- package/src/cli/build/deps.js +0 -56
- package/src/cli/shared.js +0 -5
- package/src/cli-peer-dependencies.js +0 -15
- package/src/constants.js +0 -17
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-check
|
|
1
2
|
"use strict";
|
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
|
3
4
|
value: true
|
|
@@ -8,24 +9,27 @@ Object.defineProperty(exports, // DISABLE_TOUCH = TRUE
|
|
|
8
9
|
// plugins) then return it
|
|
9
10
|
"default", {
|
|
10
11
|
enumerable: true,
|
|
11
|
-
get: ()
|
|
12
|
+
get: function() {
|
|
13
|
+
return setupTrackingContext;
|
|
14
|
+
}
|
|
12
15
|
});
|
|
13
|
-
const _fs = /*#__PURE__*/
|
|
14
|
-
const
|
|
15
|
-
const _hashConfig = /*#__PURE__*/
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const _resolveConfigPath = /*#__PURE__*/ _interopRequireDefault(require("../util/resolveConfigPath"));
|
|
16
|
+
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
17
|
+
const _quicklru = /*#__PURE__*/ _interop_require_default(require("@alloc/quick-lru"));
|
|
18
|
+
const _hashConfig = /*#__PURE__*/ _interop_require_default(require("../util/hashConfig"));
|
|
19
|
+
const _resolveconfig = /*#__PURE__*/ _interop_require_default(require("../public/resolve-config"));
|
|
20
|
+
const _resolveConfigPath = /*#__PURE__*/ _interop_require_default(require("../util/resolveConfigPath"));
|
|
19
21
|
const _setupContextUtils = require("./setupContextUtils");
|
|
20
|
-
const _parseDependency = /*#__PURE__*/
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
|
|
22
|
+
const _parseDependency = /*#__PURE__*/ _interop_require_default(require("../util/parseDependency"));
|
|
23
|
+
const _validateConfig = require("../util/validateConfig.js");
|
|
24
|
+
const _content = require("./content.js");
|
|
25
|
+
const _loadconfig = require("../lib/load-config");
|
|
26
|
+
const _getModuleDependencies = /*#__PURE__*/ _interop_require_default(require("./getModuleDependencies"));
|
|
27
|
+
function _interop_require_default(obj) {
|
|
24
28
|
return obj && obj.__esModule ? obj : {
|
|
25
29
|
default: obj
|
|
26
30
|
};
|
|
27
31
|
}
|
|
28
|
-
let configPathCache = new
|
|
32
|
+
let configPathCache = new _quicklru.default({
|
|
29
33
|
maxSize: 100
|
|
30
34
|
});
|
|
31
35
|
let candidateFilesCache = new WeakMap();
|
|
@@ -33,7 +37,7 @@ function getCandidateFiles(context, tailwindConfig) {
|
|
|
33
37
|
if (candidateFilesCache.has(context)) {
|
|
34
38
|
return candidateFilesCache.get(context);
|
|
35
39
|
}
|
|
36
|
-
let candidateFiles = (0,
|
|
40
|
+
let candidateFiles = (0, _content.parseCandidateFiles)(context, tailwindConfig);
|
|
37
41
|
return candidateFilesCache.set(context, candidateFiles).get(context);
|
|
38
42
|
}
|
|
39
43
|
// Get the config object based on a path
|
|
@@ -41,7 +45,7 @@ function getTailwindConfig(configOrPath) {
|
|
|
41
45
|
let userConfigPath = (0, _resolveConfigPath.default)(configOrPath);
|
|
42
46
|
if (userConfigPath !== null) {
|
|
43
47
|
let [prevConfig, prevConfigHash, prevDeps, prevModified] = configPathCache.get(userConfigPath) || [];
|
|
44
|
-
let newDeps = (0, _getModuleDependencies.default)(userConfigPath)
|
|
48
|
+
let newDeps = (0, _getModuleDependencies.default)(userConfigPath);
|
|
45
49
|
let modified = false;
|
|
46
50
|
let newModified = new Map();
|
|
47
51
|
for (let file of newDeps){
|
|
@@ -61,11 +65,10 @@ function getTailwindConfig(configOrPath) {
|
|
|
61
65
|
];
|
|
62
66
|
}
|
|
63
67
|
// It has changed (based on timestamps), or first run
|
|
64
|
-
for (let
|
|
65
|
-
delete require.cache[
|
|
68
|
+
for (let file of newDeps){
|
|
69
|
+
delete require.cache[file];
|
|
66
70
|
}
|
|
67
|
-
let newConfig = (0,
|
|
68
|
-
newConfig = (0, _validateConfigJs.validateConfig)(newConfig);
|
|
71
|
+
let newConfig = (0, _validateConfig.validateConfig)((0, _resolveconfig.default)((0, _loadconfig.loadConfig)(userConfigPath)));
|
|
69
72
|
let newHash = (0, _hashConfig.default)(newConfig);
|
|
70
73
|
configPathCache.set(userConfigPath, [
|
|
71
74
|
newConfig,
|
|
@@ -80,13 +83,14 @@ function getTailwindConfig(configOrPath) {
|
|
|
80
83
|
newDeps
|
|
81
84
|
];
|
|
82
85
|
}
|
|
86
|
+
var _configOrPath_config, _ref;
|
|
83
87
|
// It's a plain object, not a path
|
|
84
|
-
let
|
|
85
|
-
|
|
88
|
+
let newConfig = (0, _resolveconfig.default)((_ref = (_configOrPath_config = configOrPath === null || configOrPath === void 0 ? void 0 : configOrPath.config) !== null && _configOrPath_config !== void 0 ? _configOrPath_config : configOrPath) !== null && _ref !== void 0 ? _ref : {});
|
|
89
|
+
newConfig = (0, _validateConfig.validateConfig)(newConfig);
|
|
86
90
|
return [
|
|
87
|
-
|
|
91
|
+
newConfig,
|
|
88
92
|
null,
|
|
89
|
-
(0, _hashConfig.default)(
|
|
93
|
+
(0, _hashConfig.default)(newConfig),
|
|
90
94
|
[]
|
|
91
95
|
];
|
|
92
96
|
}
|
|
@@ -111,7 +115,8 @@ function setupTrackingContext(configOrPath) {
|
|
|
111
115
|
}
|
|
112
116
|
}
|
|
113
117
|
}
|
|
114
|
-
let [context] = (0, _setupContextUtils.getContext)(root, result, tailwindConfig, userConfigPath, tailwindConfigHash, contextDependencies);
|
|
118
|
+
let [context, , mTimesToCommit] = (0, _setupContextUtils.getContext)(root, result, tailwindConfig, userConfigPath, tailwindConfigHash, contextDependencies);
|
|
119
|
+
let fileModifiedMap = (0, _setupContextUtils.getFileModifiedMap)(context);
|
|
115
120
|
let candidateFiles = getCandidateFiles(context, tailwindConfig);
|
|
116
121
|
// If there are no @tailwind or @apply rules, we don't consider this CSS file or it's
|
|
117
122
|
// dependencies to be dependencies of the context. Can reuse the context even if they change.
|
|
@@ -119,15 +124,28 @@ function setupTrackingContext(configOrPath) {
|
|
|
119
124
|
// because it's impossible for a layer in one file to end up in the actual @tailwind rule
|
|
120
125
|
// in another file since independent sources are effectively isolated.
|
|
121
126
|
if (tailwindDirectives.size > 0) {
|
|
122
|
-
let fileModifiedMap = (0, _setupContextUtils.getFileModifiedMap)(context);
|
|
123
127
|
// Add template paths as postcss dependencies.
|
|
124
128
|
for (let contentPath of candidateFiles){
|
|
125
129
|
for (let dependency of (0, _parseDependency.default)(contentPath)){
|
|
126
130
|
registerDependency(dependency);
|
|
127
131
|
}
|
|
128
132
|
}
|
|
129
|
-
|
|
130
|
-
|
|
133
|
+
let [changedContent, contentMTimesToCommit] = (0, _content.resolvedChangedContent)(context, candidateFiles, fileModifiedMap);
|
|
134
|
+
for (let content of changedContent){
|
|
135
|
+
context.changedContent.push(content);
|
|
136
|
+
}
|
|
137
|
+
// Add the mtimes of the content files to the commit list
|
|
138
|
+
// We can overwrite the existing values because unconditionally
|
|
139
|
+
// This is because:
|
|
140
|
+
// 1. Most of the files here won't be in the map yet
|
|
141
|
+
// 2. If they are that means it's a context dependency
|
|
142
|
+
// and we're reading this after the context. This means
|
|
143
|
+
// that the mtime we just read is strictly >= the context
|
|
144
|
+
// mtime. Unless the user / os is doing something weird
|
|
145
|
+
// in which the mtime would be going backwards. If that
|
|
146
|
+
// happens there's already going to be problems.
|
|
147
|
+
for (let [path, mtime] of contentMTimesToCommit.entries()){
|
|
148
|
+
mTimesToCommit.set(path, mtime);
|
|
131
149
|
}
|
|
132
150
|
}
|
|
133
151
|
for (let file of configDependencies){
|
|
@@ -136,6 +154,12 @@ function setupTrackingContext(configOrPath) {
|
|
|
136
154
|
file
|
|
137
155
|
});
|
|
138
156
|
}
|
|
157
|
+
// "commit" the new modified time for all context deps
|
|
158
|
+
// We do this here because we want content tracking to
|
|
159
|
+
// read the "old" mtime even when it's a context dependency.
|
|
160
|
+
for (let [path, mtime] of mTimesToCommit.entries()){
|
|
161
|
+
fileModifiedMap.set(path, mtime);
|
|
162
|
+
}
|
|
139
163
|
return context;
|
|
140
164
|
};
|
|
141
165
|
};
|
package/lib/lib/sharedState.js
CHANGED
|
@@ -9,18 +9,37 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
env: ()
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
env: function() {
|
|
13
|
+
return env;
|
|
14
|
+
},
|
|
15
|
+
contextMap: function() {
|
|
16
|
+
return contextMap;
|
|
17
|
+
},
|
|
18
|
+
configContextMap: function() {
|
|
19
|
+
return configContextMap;
|
|
20
|
+
},
|
|
21
|
+
contextSourcesMap: function() {
|
|
22
|
+
return contextSourcesMap;
|
|
23
|
+
},
|
|
24
|
+
sourceHashMap: function() {
|
|
25
|
+
return sourceHashMap;
|
|
26
|
+
},
|
|
27
|
+
NOT_ON_DEMAND: function() {
|
|
28
|
+
return NOT_ON_DEMAND;
|
|
29
|
+
},
|
|
30
|
+
NONE: function() {
|
|
31
|
+
return NONE;
|
|
32
|
+
},
|
|
33
|
+
resolveDebug: function() {
|
|
34
|
+
return resolveDebug;
|
|
35
|
+
}
|
|
20
36
|
});
|
|
21
|
-
const env = {
|
|
37
|
+
const env = typeof process !== "undefined" ? {
|
|
22
38
|
NODE_ENV: process.env.NODE_ENV,
|
|
23
39
|
DEBUG: resolveDebug(process.env.DEBUG)
|
|
40
|
+
} : {
|
|
41
|
+
NODE_ENV: "production",
|
|
42
|
+
DEBUG: false
|
|
24
43
|
};
|
|
25
44
|
const contextMap = new Map();
|
|
26
45
|
const configContextMap = new Map();
|
|
@@ -4,11 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
const _normalizeScreens = require("../util/normalizeScreens");
|
|
10
|
-
const _buildMediaQuery = /*#__PURE__*/
|
|
11
|
-
function
|
|
12
|
+
const _buildMediaQuery = /*#__PURE__*/ _interop_require_default(require("../util/buildMediaQuery"));
|
|
13
|
+
function _interop_require_default(obj) {
|
|
12
14
|
return obj && obj.__esModule ? obj : {
|
|
13
15
|
default: obj
|
|
14
16
|
};
|
package/lib/plugin.js
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
const _postcss = /*#__PURE__*/ _interop_require_default(require("postcss"));
|
|
6
|
+
const _lightningcss = /*#__PURE__*/ _interop_require_default(require("lightningcss"));
|
|
7
|
+
const _browserslist = /*#__PURE__*/ _interop_require_default(require("browserslist"));
|
|
8
|
+
const _setupTrackingContext = /*#__PURE__*/ _interop_require_default(require("./lib/setupTrackingContext"));
|
|
9
|
+
const _processTailwindFeatures = /*#__PURE__*/ _interop_require_default(require("./processTailwindFeatures"));
|
|
10
|
+
const _sharedState = require("./lib/sharedState");
|
|
11
|
+
const _findAtConfigPath = require("./lib/findAtConfigPath");
|
|
12
|
+
const _handleImportAtRules = require("./lib/handleImportAtRules");
|
|
13
|
+
function _interop_require_default(obj) {
|
|
14
|
+
return obj && obj.__esModule ? obj : {
|
|
15
|
+
default: obj
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
module.exports = function tailwindcss(configOrPath) {
|
|
19
|
+
return {
|
|
20
|
+
postcssPlugin: "tailwindcss",
|
|
21
|
+
plugins: [
|
|
22
|
+
_sharedState.env.DEBUG && function(root) {
|
|
23
|
+
console.log("\n");
|
|
24
|
+
console.time("JIT TOTAL");
|
|
25
|
+
return root;
|
|
26
|
+
},
|
|
27
|
+
...(0, _handleImportAtRules.handleImportAtRules)(),
|
|
28
|
+
function(root, result) {
|
|
29
|
+
var _findAtConfigPath1;
|
|
30
|
+
// Use the path for the `@config` directive if it exists, otherwise use the
|
|
31
|
+
// path for the file being processed
|
|
32
|
+
configOrPath = (_findAtConfigPath1 = (0, _findAtConfigPath.findAtConfigPath)(root, result)) !== null && _findAtConfigPath1 !== void 0 ? _findAtConfigPath1 : configOrPath;
|
|
33
|
+
let context = (0, _setupTrackingContext.default)(configOrPath);
|
|
34
|
+
if (root.type === "document") {
|
|
35
|
+
let roots = root.nodes.filter((node)=>node.type === "root");
|
|
36
|
+
for (const root of roots){
|
|
37
|
+
if (root.type === "root") {
|
|
38
|
+
(0, _processTailwindFeatures.default)(context)(root, result);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
(0, _processTailwindFeatures.default)(context)(root, result);
|
|
44
|
+
},
|
|
45
|
+
function lightningCssPlugin(_root, result) {
|
|
46
|
+
var _intermediateResult_map, _intermediateResult_map_toJSON;
|
|
47
|
+
var _result_map;
|
|
48
|
+
let map = (_result_map = result.map) !== null && _result_map !== void 0 ? _result_map : result.opts.map;
|
|
49
|
+
let intermediateResult = result.root.toResult({
|
|
50
|
+
map: map ? {
|
|
51
|
+
inline: true
|
|
52
|
+
} : false
|
|
53
|
+
});
|
|
54
|
+
var _intermediateResult_map_toJSON1;
|
|
55
|
+
let intermediateMap = (_intermediateResult_map_toJSON1 = (_intermediateResult_map = intermediateResult.map) === null || _intermediateResult_map === void 0 ? void 0 : (_intermediateResult_map_toJSON = _intermediateResult_map.toJSON) === null || _intermediateResult_map_toJSON === void 0 ? void 0 : _intermediateResult_map_toJSON.call(_intermediateResult_map)) !== null && _intermediateResult_map_toJSON1 !== void 0 ? _intermediateResult_map_toJSON1 : map;
|
|
56
|
+
try {
|
|
57
|
+
let transformed = _lightningcss.default.transform({
|
|
58
|
+
filename: result.opts.from,
|
|
59
|
+
code: Buffer.from(intermediateResult.css),
|
|
60
|
+
minify: false,
|
|
61
|
+
sourceMap: !!intermediateMap,
|
|
62
|
+
targets: typeof process !== "undefined" && process.env.JEST_WORKER_ID ? {
|
|
63
|
+
chrome: 111 << 16
|
|
64
|
+
} : _lightningcss.default.browserslistToTargets((0, _browserslist.default)(require("../package.json").browserslist)),
|
|
65
|
+
drafts: {
|
|
66
|
+
nesting: true,
|
|
67
|
+
customMedia: true
|
|
68
|
+
},
|
|
69
|
+
nonStandard: {
|
|
70
|
+
deepSelectorCombinator: true
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
let code = transformed.code.toString();
|
|
74
|
+
// https://postcss.org/api/#sourcemapoptions
|
|
75
|
+
if (intermediateMap && transformed.map != null) {
|
|
76
|
+
let prev = transformed.map.toString();
|
|
77
|
+
if (typeof intermediateMap === "object") {
|
|
78
|
+
intermediateMap.prev = prev;
|
|
79
|
+
} else {
|
|
80
|
+
code = `${code}\n/*# sourceMappingURL=data:application/json;base64,${Buffer.from(prev).toString("base64")} */`;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
result.root = _postcss.default.parse(code, {
|
|
84
|
+
...result.opts,
|
|
85
|
+
map: intermediateMap
|
|
86
|
+
});
|
|
87
|
+
} catch (err) {
|
|
88
|
+
if (err.source && typeof process !== "undefined" && process.env.JEST_WORKER_ID) {
|
|
89
|
+
let lines = err.source.split("\n");
|
|
90
|
+
err = new Error([
|
|
91
|
+
"Error formatting using Lightning CSS:",
|
|
92
|
+
"",
|
|
93
|
+
...[
|
|
94
|
+
"```css",
|
|
95
|
+
...lines.slice(Math.max(err.loc.line - 3, 0), err.loc.line),
|
|
96
|
+
" ".repeat(err.loc.column - 1) + "^-- " + err.toString(),
|
|
97
|
+
...lines.slice(err.loc.line, err.loc.line + 2),
|
|
98
|
+
"```"
|
|
99
|
+
]
|
|
100
|
+
].join("\n"));
|
|
101
|
+
}
|
|
102
|
+
if (Error.captureStackTrace) {
|
|
103
|
+
Error.captureStackTrace(err, lightningCssPlugin);
|
|
104
|
+
}
|
|
105
|
+
throw err;
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
_sharedState.env.DEBUG && function(root) {
|
|
109
|
+
console.timeEnd("JIT TOTAL");
|
|
110
|
+
console.log("\n");
|
|
111
|
+
return root;
|
|
112
|
+
}
|
|
113
|
+
].filter(Boolean)
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
module.exports.postcss = true;
|
|
@@ -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 _default;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
const _plugin = require("./plugin");
|
|
10
12
|
const _default = Object.assign(function(opts) {
|
|
@@ -4,16 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "nesting", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return nesting;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
|
-
const _postcss = /*#__PURE__*/
|
|
10
|
-
const
|
|
11
|
-
function
|
|
11
|
+
const _postcss = /*#__PURE__*/ _interop_require_default(require("postcss"));
|
|
12
|
+
const _postcssnested = /*#__PURE__*/ _interop_require_default(require("postcss-nested"));
|
|
13
|
+
function _interop_require_default(obj) {
|
|
12
14
|
return obj && obj.__esModule ? obj : {
|
|
13
15
|
default: obj
|
|
14
16
|
};
|
|
15
17
|
}
|
|
16
|
-
function nesting(opts =
|
|
18
|
+
function nesting(opts = _postcssnested.default) {
|
|
17
19
|
return (root, result)=>{
|
|
18
20
|
root.walkAtRules("screen", (rule)=>{
|
|
19
21
|
rule.name = "media";
|
|
@@ -28,15 +30,15 @@ function nesting(opts = _postcssNested.default) {
|
|
|
28
30
|
rule.remove();
|
|
29
31
|
});
|
|
30
32
|
let plugin = (()=>{
|
|
31
|
-
var
|
|
32
|
-
if (typeof opts === "function" || typeof opts === "object" && (opts === null || opts === void 0 ? void 0 : (
|
|
33
|
+
var _opts_hasOwnProperty;
|
|
34
|
+
if (typeof opts === "function" || typeof opts === "object" && (opts === null || opts === void 0 ? void 0 : (_opts_hasOwnProperty = opts.hasOwnProperty) === null || _opts_hasOwnProperty === void 0 ? void 0 : _opts_hasOwnProperty.call(opts, "postcssPlugin"))) {
|
|
33
35
|
return opts;
|
|
34
36
|
}
|
|
35
37
|
if (typeof opts === "string") {
|
|
36
38
|
return require(opts);
|
|
37
39
|
}
|
|
38
40
|
if (Object.keys(opts).length <= 0) {
|
|
39
|
-
return
|
|
41
|
+
return _postcssnested.default;
|
|
40
42
|
}
|
|
41
43
|
throw new Error("tailwindcss/nesting should be loaded with a nesting plugin.");
|
|
42
44
|
})();
|
|
@@ -4,21 +4,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return processTailwindFeatures;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
|
-
const _normalizeTailwindDirectives = /*#__PURE__*/
|
|
10
|
-
const _expandTailwindAtRules = /*#__PURE__*/
|
|
11
|
-
const _expandApplyAtRules = /*#__PURE__*/
|
|
12
|
-
const _evaluateTailwindFunctions = /*#__PURE__*/
|
|
13
|
-
const _substituteScreenAtRules = /*#__PURE__*/
|
|
14
|
-
const _resolveDefaultsAtRules = /*#__PURE__*/
|
|
15
|
-
const _collapseAdjacentRules = /*#__PURE__*/
|
|
16
|
-
const _collapseDuplicateDeclarations = /*#__PURE__*/
|
|
17
|
-
const _partitionApplyAtRules = /*#__PURE__*/
|
|
18
|
-
const _detectNesting = /*#__PURE__*/
|
|
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 _detectNesting = /*#__PURE__*/ _interop_require_default(require("./lib/detectNesting"));
|
|
19
21
|
const _setupContextUtils = require("./lib/setupContextUtils");
|
|
20
22
|
const _featureFlags = require("./featureFlags");
|
|
21
|
-
function
|
|
23
|
+
function _interop_require_default(obj) {
|
|
22
24
|
return obj && obj.__esModule ? obj : {
|
|
23
25
|
default: obj
|
|
24
26
|
};
|
package/lib/public/colors.js
CHANGED
|
@@ -4,10 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
|
-
const _log = /*#__PURE__*/
|
|
10
|
-
function
|
|
11
|
+
const _log = /*#__PURE__*/ _interop_require_default(require("../util/log"));
|
|
12
|
+
function _interop_require_default(obj) {
|
|
11
13
|
return obj && obj.__esModule ? obj : {
|
|
12
14
|
default: obj
|
|
13
15
|
};
|
|
@@ -34,7 +36,8 @@ const _default = {
|
|
|
34
36
|
600: "#475569",
|
|
35
37
|
700: "#334155",
|
|
36
38
|
800: "#1e293b",
|
|
37
|
-
900: "#0f172a"
|
|
39
|
+
900: "#0f172a",
|
|
40
|
+
950: "#020617"
|
|
38
41
|
},
|
|
39
42
|
gray: {
|
|
40
43
|
50: "#f9fafb",
|
|
@@ -46,7 +49,8 @@ const _default = {
|
|
|
46
49
|
600: "#4b5563",
|
|
47
50
|
700: "#374151",
|
|
48
51
|
800: "#1f2937",
|
|
49
|
-
900: "#111827"
|
|
52
|
+
900: "#111827",
|
|
53
|
+
950: "#030712"
|
|
50
54
|
},
|
|
51
55
|
zinc: {
|
|
52
56
|
50: "#fafafa",
|
|
@@ -58,7 +62,8 @@ const _default = {
|
|
|
58
62
|
600: "#52525b",
|
|
59
63
|
700: "#3f3f46",
|
|
60
64
|
800: "#27272a",
|
|
61
|
-
900: "#18181b"
|
|
65
|
+
900: "#18181b",
|
|
66
|
+
950: "#09090b"
|
|
62
67
|
},
|
|
63
68
|
neutral: {
|
|
64
69
|
50: "#fafafa",
|
|
@@ -70,7 +75,8 @@ const _default = {
|
|
|
70
75
|
600: "#525252",
|
|
71
76
|
700: "#404040",
|
|
72
77
|
800: "#262626",
|
|
73
|
-
900: "#171717"
|
|
78
|
+
900: "#171717",
|
|
79
|
+
950: "#0a0a0a"
|
|
74
80
|
},
|
|
75
81
|
stone: {
|
|
76
82
|
50: "#fafaf9",
|
|
@@ -82,7 +88,8 @@ const _default = {
|
|
|
82
88
|
600: "#57534e",
|
|
83
89
|
700: "#44403c",
|
|
84
90
|
800: "#292524",
|
|
85
|
-
900: "#1c1917"
|
|
91
|
+
900: "#1c1917",
|
|
92
|
+
950: "#0c0a09"
|
|
86
93
|
},
|
|
87
94
|
red: {
|
|
88
95
|
50: "#fef2f2",
|
|
@@ -94,7 +101,8 @@ const _default = {
|
|
|
94
101
|
600: "#dc2626",
|
|
95
102
|
700: "#b91c1c",
|
|
96
103
|
800: "#991b1b",
|
|
97
|
-
900: "#7f1d1d"
|
|
104
|
+
900: "#7f1d1d",
|
|
105
|
+
950: "#450a0a"
|
|
98
106
|
},
|
|
99
107
|
orange: {
|
|
100
108
|
50: "#fff7ed",
|
|
@@ -106,7 +114,8 @@ const _default = {
|
|
|
106
114
|
600: "#ea580c",
|
|
107
115
|
700: "#c2410c",
|
|
108
116
|
800: "#9a3412",
|
|
109
|
-
900: "#7c2d12"
|
|
117
|
+
900: "#7c2d12",
|
|
118
|
+
950: "#431407"
|
|
110
119
|
},
|
|
111
120
|
amber: {
|
|
112
121
|
50: "#fffbeb",
|
|
@@ -118,7 +127,8 @@ const _default = {
|
|
|
118
127
|
600: "#d97706",
|
|
119
128
|
700: "#b45309",
|
|
120
129
|
800: "#92400e",
|
|
121
|
-
900: "#78350f"
|
|
130
|
+
900: "#78350f",
|
|
131
|
+
950: "#451a03"
|
|
122
132
|
},
|
|
123
133
|
yellow: {
|
|
124
134
|
50: "#fefce8",
|
|
@@ -130,7 +140,8 @@ const _default = {
|
|
|
130
140
|
600: "#ca8a04",
|
|
131
141
|
700: "#a16207",
|
|
132
142
|
800: "#854d0e",
|
|
133
|
-
900: "#713f12"
|
|
143
|
+
900: "#713f12",
|
|
144
|
+
950: "#422006"
|
|
134
145
|
},
|
|
135
146
|
lime: {
|
|
136
147
|
50: "#f7fee7",
|
|
@@ -142,7 +153,8 @@ const _default = {
|
|
|
142
153
|
600: "#65a30d",
|
|
143
154
|
700: "#4d7c0f",
|
|
144
155
|
800: "#3f6212",
|
|
145
|
-
900: "#365314"
|
|
156
|
+
900: "#365314",
|
|
157
|
+
950: "#1a2e05"
|
|
146
158
|
},
|
|
147
159
|
green: {
|
|
148
160
|
50: "#f0fdf4",
|
|
@@ -154,7 +166,8 @@ const _default = {
|
|
|
154
166
|
600: "#16a34a",
|
|
155
167
|
700: "#15803d",
|
|
156
168
|
800: "#166534",
|
|
157
|
-
900: "#14532d"
|
|
169
|
+
900: "#14532d",
|
|
170
|
+
950: "#052e16"
|
|
158
171
|
},
|
|
159
172
|
emerald: {
|
|
160
173
|
50: "#ecfdf5",
|
|
@@ -166,7 +179,8 @@ const _default = {
|
|
|
166
179
|
600: "#059669",
|
|
167
180
|
700: "#047857",
|
|
168
181
|
800: "#065f46",
|
|
169
|
-
900: "#064e3b"
|
|
182
|
+
900: "#064e3b",
|
|
183
|
+
950: "#022c22"
|
|
170
184
|
},
|
|
171
185
|
teal: {
|
|
172
186
|
50: "#f0fdfa",
|
|
@@ -178,7 +192,8 @@ const _default = {
|
|
|
178
192
|
600: "#0d9488",
|
|
179
193
|
700: "#0f766e",
|
|
180
194
|
800: "#115e59",
|
|
181
|
-
900: "#134e4a"
|
|
195
|
+
900: "#134e4a",
|
|
196
|
+
950: "#042f2e"
|
|
182
197
|
},
|
|
183
198
|
cyan: {
|
|
184
199
|
50: "#ecfeff",
|
|
@@ -190,7 +205,8 @@ const _default = {
|
|
|
190
205
|
600: "#0891b2",
|
|
191
206
|
700: "#0e7490",
|
|
192
207
|
800: "#155e75",
|
|
193
|
-
900: "#164e63"
|
|
208
|
+
900: "#164e63",
|
|
209
|
+
950: "#083344"
|
|
194
210
|
},
|
|
195
211
|
sky: {
|
|
196
212
|
50: "#f0f9ff",
|
|
@@ -202,7 +218,8 @@ const _default = {
|
|
|
202
218
|
600: "#0284c7",
|
|
203
219
|
700: "#0369a1",
|
|
204
220
|
800: "#075985",
|
|
205
|
-
900: "#0c4a6e"
|
|
221
|
+
900: "#0c4a6e",
|
|
222
|
+
950: "#082f49"
|
|
206
223
|
},
|
|
207
224
|
blue: {
|
|
208
225
|
50: "#eff6ff",
|
|
@@ -214,7 +231,8 @@ const _default = {
|
|
|
214
231
|
600: "#2563eb",
|
|
215
232
|
700: "#1d4ed8",
|
|
216
233
|
800: "#1e40af",
|
|
217
|
-
900: "#1e3a8a"
|
|
234
|
+
900: "#1e3a8a",
|
|
235
|
+
950: "#172554"
|
|
218
236
|
},
|
|
219
237
|
indigo: {
|
|
220
238
|
50: "#eef2ff",
|
|
@@ -226,7 +244,8 @@ const _default = {
|
|
|
226
244
|
600: "#4f46e5",
|
|
227
245
|
700: "#4338ca",
|
|
228
246
|
800: "#3730a3",
|
|
229
|
-
900: "#312e81"
|
|
247
|
+
900: "#312e81",
|
|
248
|
+
950: "#1e1b4b"
|
|
230
249
|
},
|
|
231
250
|
violet: {
|
|
232
251
|
50: "#f5f3ff",
|
|
@@ -238,7 +257,8 @@ const _default = {
|
|
|
238
257
|
600: "#7c3aed",
|
|
239
258
|
700: "#6d28d9",
|
|
240
259
|
800: "#5b21b6",
|
|
241
|
-
900: "#4c1d95"
|
|
260
|
+
900: "#4c1d95",
|
|
261
|
+
950: "#2e1065"
|
|
242
262
|
},
|
|
243
263
|
purple: {
|
|
244
264
|
50: "#faf5ff",
|
|
@@ -250,7 +270,8 @@ const _default = {
|
|
|
250
270
|
600: "#9333ea",
|
|
251
271
|
700: "#7e22ce",
|
|
252
272
|
800: "#6b21a8",
|
|
253
|
-
900: "#581c87"
|
|
273
|
+
900: "#581c87",
|
|
274
|
+
950: "#3b0764"
|
|
254
275
|
},
|
|
255
276
|
fuchsia: {
|
|
256
277
|
50: "#fdf4ff",
|
|
@@ -262,7 +283,8 @@ const _default = {
|
|
|
262
283
|
600: "#c026d3",
|
|
263
284
|
700: "#a21caf",
|
|
264
285
|
800: "#86198f",
|
|
265
|
-
900: "#701a75"
|
|
286
|
+
900: "#701a75",
|
|
287
|
+
950: "#4a044e"
|
|
266
288
|
},
|
|
267
289
|
pink: {
|
|
268
290
|
50: "#fdf2f8",
|
|
@@ -274,7 +296,8 @@ const _default = {
|
|
|
274
296
|
600: "#db2777",
|
|
275
297
|
700: "#be185d",
|
|
276
298
|
800: "#9d174d",
|
|
277
|
-
900: "#831843"
|
|
299
|
+
900: "#831843",
|
|
300
|
+
950: "#500724"
|
|
278
301
|
},
|
|
279
302
|
rose: {
|
|
280
303
|
50: "#fff1f2",
|
|
@@ -286,7 +309,8 @@ const _default = {
|
|
|
286
309
|
600: "#e11d48",
|
|
287
310
|
700: "#be123c",
|
|
288
311
|
800: "#9f1239",
|
|
289
|
-
900: "#881337"
|
|
312
|
+
900: "#881337",
|
|
313
|
+
950: "#4c0519"
|
|
290
314
|
},
|
|
291
315
|
get lightBlue () {
|
|
292
316
|
warn({
|
|
@@ -4,10 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
|
-
const _createPlugin = /*#__PURE__*/
|
|
10
|
-
function
|
|
11
|
+
const _createPlugin = /*#__PURE__*/ _interop_require_default(require("../util/createPlugin"));
|
|
12
|
+
function _interop_require_default(obj) {
|
|
11
13
|
return obj && obj.__esModule ? obj : {
|
|
12
14
|
default: obj
|
|
13
15
|
};
|