tailwindcss 0.0.0-insiders.ea10bb9 → 0.0.0-insiders.ea4e1cd
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/lib/cli/build/deps.js +17 -9
- package/lib/cli/build/index.js +20 -10
- package/lib/cli/build/plugin.js +86 -70
- 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 +222 -10
- package/lib/cli/init/index.js +29 -12
- package/lib/cli-peer-dependencies.js +12 -4
- package/lib/cli.js +4 -226
- package/lib/corePluginList.js +7 -1
- package/lib/corePlugins.js +348 -75
- package/lib/css/preflight.css +2 -0
- package/lib/featureFlags.js +27 -15
- 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 +34 -30
- package/lib/lib/defaultExtractor.js +15 -8
- package/lib/lib/detectNesting.js +10 -2
- package/lib/lib/evaluateTailwindFunctions.js +22 -20
- package/lib/lib/expandApplyAtRules.js +43 -35
- package/lib/lib/expandTailwindAtRules.js +46 -19
- package/lib/lib/findAtConfigPath.js +9 -7
- package/lib/lib/generateRules.js +157 -92
- package/lib/lib/getModuleDependencies.js +85 -37
- package/lib/lib/load-config.js +42 -0
- package/lib/lib/normalizeTailwindDirectives.js +5 -3
- 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 +190 -131
- package/lib/lib/setupTrackingContext.js +49 -26
- package/lib/lib/sharedState.js +37 -10
- package/lib/lib/substituteScreenAtRules.js +5 -3
- package/lib/oxide/cli/build/deps.js +89 -0
- package/lib/oxide/cli/build/index.js +53 -0
- package/lib/oxide/cli/build/plugin.js +375 -0
- package/lib/oxide/cli/build/utils.js +87 -0
- package/lib/oxide/cli/build/watching.js +179 -0
- package/lib/oxide/cli/help/index.js +72 -0
- package/lib/oxide/cli/index.js +214 -0
- package/lib/oxide/cli/init/index.js +52 -0
- package/lib/oxide/cli.js +5 -0
- package/lib/oxide/postcss-plugin.js +2 -0
- package/lib/plugin.js +98 -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 +74 -17
- 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 +8 -4
- package/lib/util/nameClass.js +12 -6
- package/lib/util/negateValue.js +4 -2
- package/lib/util/normalizeConfig.js +28 -27
- 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 +54 -54
- package/lib/util/prefixSelector.js +27 -11
- package/lib/util/pseudoElements.js +229 -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 +16 -3
- package/lib/util/validateFormalSyntax.js +3 -1
- package/lib/util/withAlphaVariable.js +6 -2
- package/loadConfig.d.ts +4 -0
- package/loadConfig.js +2 -0
- package/package.json +45 -37
- package/peers/index.js +63324 -46417
- package/resolveConfig.d.ts +11 -2
- package/scripts/swap-engines.js +40 -0
- package/src/cli/build/index.js +13 -9
- package/src/cli/build/plugin.js +42 -32
- package/src/cli/build/watching.js +4 -2
- package/src/cli/index.js +216 -3
- package/src/cli/init/index.js +37 -8
- package/src/cli.js +4 -220
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +207 -32
- package/src/css/preflight.css +2 -0
- package/src/featureFlags.js +6 -0
- package/src/index.js +1 -47
- package/src/lib/content.js +12 -17
- package/src/lib/defaultExtractor.js +9 -3
- package/src/lib/detectNesting.js +9 -1
- package/src/lib/expandApplyAtRules.js +8 -1
- package/src/lib/expandTailwindAtRules.js +36 -7
- package/src/lib/generateRules.js +124 -42
- package/src/lib/getModuleDependencies.js +70 -30
- package/src/lib/load-config.ts +31 -0
- package/src/lib/offsets.js +104 -1
- package/src/lib/remap-bitfield.js +82 -0
- package/src/lib/setupContextUtils.js +103 -54
- package/src/lib/setupTrackingContext.js +36 -11
- package/src/lib/sharedState.js +15 -4
- package/src/oxide/cli/build/deps.ts +91 -0
- package/src/oxide/cli/build/index.ts +47 -0
- package/src/oxide/cli/build/plugin.ts +442 -0
- package/src/oxide/cli/build/utils.ts +74 -0
- package/src/oxide/cli/build/watching.ts +225 -0
- package/src/oxide/cli/help/index.ts +69 -0
- package/src/oxide/cli/index.ts +204 -0
- package/src/oxide/cli/init/index.ts +59 -0
- package/src/oxide/cli.ts +1 -0
- package/src/oxide/postcss-plugin.ts +1 -0
- package/src/plugin.js +107 -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 +33 -4
- package/src/util/formatVariantSelector.js +160 -163
- package/src/util/getAllConfigs.js +2 -2
- package/src/util/negateValue.js +1 -1
- package/src/util/normalizeConfig.js +2 -1
- package/src/util/pluginUtils.js +16 -31
- package/src/util/prefixSelector.js +28 -10
- package/src/util/pseudoElements.js +170 -0
- package/src/util/resolveConfigPath.js +12 -1
- package/src/util/splitAtTopLevelOnly.js +8 -1
- package/src/util/validateConfig.js +13 -0
- package/stubs/.gitignore +1 -0
- package/stubs/.prettierrc.json +6 -0
- package/stubs/{defaultConfig.stub.js → config.full.js} +183 -146
- package/stubs/{simpleConfig.stub.js → config.simple.js} +0 -1
- package/stubs/postcss.config.js +6 -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 +15 -9
- package/types/generated/colors.d.ts +22 -0
- package/types/generated/corePluginList.d.ts +1 -1
- package/types/generated/default-theme.d.ts +108 -79
- package/CHANGELOG.md +0 -2336
- package/lib/cli/shared.js +0 -12
- package/lib/constants.js +0 -44
- package/scripts/install-integrations.js +0 -27
- package/scripts/rebuildFixtures.js +0 -68
- package/src/cli/shared.js +0 -5
- package/src/constants.js +0 -17
- /package/stubs/{defaultPostCssConfig.stub.js → postcss.config.cjs} +0 -0
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
|
};
|
|
@@ -4,13 +4,15 @@ 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 _cloneDeep = require("../util/cloneDeep");
|
|
10
|
-
const
|
|
11
|
-
function
|
|
12
|
+
const _configfull = /*#__PURE__*/ _interop_require_default(require("../../stubs/config.full"));
|
|
13
|
+
function _interop_require_default(obj) {
|
|
12
14
|
return obj && obj.__esModule ? obj : {
|
|
13
15
|
default: obj
|
|
14
16
|
};
|
|
15
17
|
}
|
|
16
|
-
const _default = (0, _cloneDeep.cloneDeep)(
|
|
18
|
+
const _default = (0, _cloneDeep.cloneDeep)(_configfull.default);
|
|
@@ -4,13 +4,15 @@ 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 _cloneDeep = require("../util/cloneDeep");
|
|
10
|
-
const
|
|
11
|
-
function
|
|
12
|
+
const _configfull = /*#__PURE__*/ _interop_require_default(require("../../stubs/config.full"));
|
|
13
|
+
function _interop_require_default(obj) {
|
|
12
14
|
return obj && obj.__esModule ? obj : {
|
|
13
15
|
default: obj
|
|
14
16
|
};
|
|
15
17
|
}
|
|
16
|
-
const _default = (0, _cloneDeep.cloneDeep)(
|
|
18
|
+
const _default = (0, _cloneDeep.cloneDeep)(_configfull.default.theme);
|
|
@@ -0,0 +1,12 @@
|
|
|
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 _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _loadconfig = require("../lib/load-config");
|
|
12
|
+
const _default = _loadconfig.loadConfig;
|
|
@@ -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 resolveConfig;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
|
-
const _resolveConfig = /*#__PURE__*/
|
|
10
|
-
const _getAllConfigs = /*#__PURE__*/
|
|
11
|
-
function
|
|
11
|
+
const _resolveConfig = /*#__PURE__*/ _interop_require_default(require("../util/resolveConfig"));
|
|
12
|
+
const _getAllConfigs = /*#__PURE__*/ _interop_require_default(require("../util/getAllConfigs"));
|
|
13
|
+
function _interop_require_default(obj) {
|
|
12
14
|
return obj && obj.__esModule ? obj : {
|
|
13
15
|
default: obj
|
|
14
16
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "applyImportantSelector", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return applyImportantSelector;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _postcssselectorparser = /*#__PURE__*/ _interop_require_default(require("postcss-selector-parser"));
|
|
12
|
+
const _pseudoElements = require("./pseudoElements");
|
|
13
|
+
function _interop_require_default(obj) {
|
|
14
|
+
return obj && obj.__esModule ? obj : {
|
|
15
|
+
default: obj
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function applyImportantSelector(selector, important) {
|
|
19
|
+
let sel = (0, _postcssselectorparser.default)().astSync(selector);
|
|
20
|
+
sel.each((sel)=>{
|
|
21
|
+
// Wrap with :is if it's not already wrapped
|
|
22
|
+
let isWrapped = sel.nodes[0].type === "pseudo" && sel.nodes[0].value === ":is" && sel.nodes.every((node)=>node.type !== "combinator");
|
|
23
|
+
if (!isWrapped) {
|
|
24
|
+
sel.nodes = [
|
|
25
|
+
_postcssselectorparser.default.pseudo({
|
|
26
|
+
value: ":is",
|
|
27
|
+
nodes: [
|
|
28
|
+
sel.clone()
|
|
29
|
+
]
|
|
30
|
+
})
|
|
31
|
+
];
|
|
32
|
+
}
|
|
33
|
+
(0, _pseudoElements.movePseudos)(sel);
|
|
34
|
+
});
|
|
35
|
+
return `${important} ${sel.toString()}`;
|
|
36
|
+
}
|
package/lib/util/bigSign.js
CHANGED
|
@@ -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 bigSign;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
function bigSign(bigIntValue) {
|
|
10
12
|
return (bigIntValue > 0n) - (bigIntValue < 0n);
|
|
@@ -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 buildMediaQuery;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
function buildMediaQuery(screens) {
|
|
10
12
|
screens = Array.isArray(screens) ? screens : [
|
package/lib/util/cloneDeep.js
CHANGED
package/lib/util/cloneNodes.js
CHANGED
|
@@ -4,15 +4,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return cloneNodes;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
function cloneNodes(nodes, source = undefined, raws = undefined) {
|
|
10
12
|
return nodes.map((node)=>{
|
|
11
|
-
var
|
|
13
|
+
var _node_raws_tailwind;
|
|
12
14
|
let cloned = node.clone();
|
|
13
15
|
// We always want override the source map
|
|
14
16
|
// except when explicitly told not to
|
|
15
|
-
let shouldOverwriteSource = ((
|
|
17
|
+
let shouldOverwriteSource = ((_node_raws_tailwind = node.raws.tailwind) === null || _node_raws_tailwind === void 0 ? void 0 : _node_raws_tailwind.preserveSource) !== true || !cloned.source;
|
|
16
18
|
if (source !== undefined && shouldOverwriteSource) {
|
|
17
19
|
cloned.source = source;
|
|
18
20
|
if ("walk" in cloned) {
|
package/lib/util/color.js
CHANGED
|
@@ -9,11 +9,15 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
parseColor: ()
|
|
13
|
-
|
|
12
|
+
parseColor: function() {
|
|
13
|
+
return parseColor;
|
|
14
|
+
},
|
|
15
|
+
formatColor: function() {
|
|
16
|
+
return formatColor;
|
|
17
|
+
}
|
|
14
18
|
});
|
|
15
|
-
const
|
|
16
|
-
function
|
|
19
|
+
const _colorNames = /*#__PURE__*/ _interop_require_default(require("./colorNames"));
|
|
20
|
+
function _interop_require_default(obj) {
|
|
17
21
|
return obj && obj.__esModule ? obj : {
|
|
18
22
|
default: obj
|
|
19
23
|
};
|
|
@@ -24,10 +28,10 @@ let VALUE = /(?:\d+|\d*\.\d+)%?/;
|
|
|
24
28
|
let SEP = /(?:\s*,\s*|\s+)/;
|
|
25
29
|
let ALPHA_SEP = /\s*[,/]\s*/;
|
|
26
30
|
let CUSTOM_PROPERTY = /var\(--(?:[^ )]*?)\)/;
|
|
27
|
-
let RGB = new RegExp(`^(
|
|
28
|
-
let HSL = new RegExp(`^(
|
|
31
|
+
let RGB = new RegExp(`^(rgba?)\\(\\s*(${VALUE.source}|${CUSTOM_PROPERTY.source})(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${ALPHA_SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?\\s*\\)$`);
|
|
32
|
+
let HSL = new RegExp(`^(hsla?)\\(\\s*((?:${VALUE.source})(?:deg|rad|grad|turn)?|${CUSTOM_PROPERTY.source})(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${ALPHA_SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?\\s*\\)$`);
|
|
29
33
|
function parseColor(value, { loose =false } = {}) {
|
|
30
|
-
var
|
|
34
|
+
var _match_, _match__toString;
|
|
31
35
|
if (typeof value !== "string") {
|
|
32
36
|
return null;
|
|
33
37
|
}
|
|
@@ -43,10 +47,10 @@ function parseColor(value, { loose =false } = {}) {
|
|
|
43
47
|
alpha: "0"
|
|
44
48
|
};
|
|
45
49
|
}
|
|
46
|
-
if (value in
|
|
50
|
+
if (value in _colorNames.default) {
|
|
47
51
|
return {
|
|
48
52
|
mode: "rgb",
|
|
49
|
-
color:
|
|
53
|
+
color: _colorNames.default[value].map((v)=>v.toString())
|
|
50
54
|
};
|
|
51
55
|
}
|
|
52
56
|
let hex = value.replace(SHORT_HEX, (_, r, g, b, a)=>[
|
|
@@ -70,8 +74,8 @@ function parseColor(value, { loose =false } = {}) {
|
|
|
70
74
|
alpha: hex[4] ? (parseInt(hex[4], 16) / 255).toString() : undefined
|
|
71
75
|
};
|
|
72
76
|
}
|
|
73
|
-
var
|
|
74
|
-
let match = (
|
|
77
|
+
var _value_match;
|
|
78
|
+
let match = (_value_match = value.match(RGB)) !== null && _value_match !== void 0 ? _value_match : value.match(HSL);
|
|
75
79
|
if (match === null) {
|
|
76
80
|
return null;
|
|
77
81
|
}
|
|
@@ -80,6 +84,17 @@ function parseColor(value, { loose =false } = {}) {
|
|
|
80
84
|
match[3],
|
|
81
85
|
match[4]
|
|
82
86
|
].filter(Boolean).map((v)=>v.toString());
|
|
87
|
+
// rgba(var(--my-color), 0.1)
|
|
88
|
+
// hsla(var(--my-color), 0.1)
|
|
89
|
+
if (color.length === 2 && color[0].startsWith("var(")) {
|
|
90
|
+
return {
|
|
91
|
+
mode: match[1],
|
|
92
|
+
color: [
|
|
93
|
+
color[0]
|
|
94
|
+
],
|
|
95
|
+
alpha: color[1]
|
|
96
|
+
};
|
|
97
|
+
}
|
|
83
98
|
if (!loose && color.length !== 3) {
|
|
84
99
|
return null;
|
|
85
100
|
}
|
|
@@ -89,10 +104,13 @@ function parseColor(value, { loose =false } = {}) {
|
|
|
89
104
|
return {
|
|
90
105
|
mode: match[1],
|
|
91
106
|
color,
|
|
92
|
-
alpha: (
|
|
107
|
+
alpha: (_match_ = match[5]) === null || _match_ === void 0 ? void 0 : (_match__toString = _match_.toString) === null || _match__toString === void 0 ? void 0 : _match__toString.call(_match_)
|
|
93
108
|
};
|
|
94
109
|
}
|
|
95
110
|
function formatColor({ mode , color , alpha }) {
|
|
96
111
|
let hasAlpha = alpha !== undefined;
|
|
112
|
+
if (mode === "rgba" || mode === "hsla") {
|
|
113
|
+
return `${mode}(${color.join(", ")}${hasAlpha ? `, ${alpha}` : ""})`;
|
|
114
|
+
}
|
|
97
115
|
return `${mode}(${color.join(" ")}${hasAlpha ? ` / ${alpha}` : ""})`;
|
|
98
116
|
}
|