tailwindcss 0.0.0-oxide-insiders.dddaded → 0.0.0-oxide-insiders.b2e3cf2
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 +10 -18
- package/lib/cli/build/index.js +10 -41
- package/lib/cli/build/plugin.js +87 -268
- package/lib/cli/build/utils.js +18 -40
- package/lib/cli/build/watching.js +35 -151
- package/lib/cli/help/index.js +15 -58
- package/lib/cli/index.js +61 -120
- package/lib/cli/init/index.js +21 -43
- package/lib/cli-peer-dependencies.js +13 -15
- package/lib/cli.js +1 -5
- package/lib/corePluginList.js +3 -4
- package/lib/corePlugins.js +394 -857
- package/lib/featureFlags.js +14 -34
- package/lib/index.js +1 -5
- package/lib/lib/cacheInvalidation.js +29 -75
- package/lib/lib/collapseAdjacentRules.js +22 -43
- package/lib/lib/collapseDuplicateDeclarations.js +27 -68
- package/lib/lib/content.js +37 -126
- package/lib/lib/defaultExtractor.js +96 -199
- package/lib/lib/detectNesting.js +12 -36
- package/lib/lib/evaluateTailwindFunctions.js +101 -188
- package/lib/lib/expandApplyAtRules.js +177 -482
- package/lib/lib/expandTailwindAtRules.js +69 -237
- package/lib/lib/findAtConfigPath.js +13 -30
- package/lib/lib/generateRules.js +349 -765
- package/lib/lib/getModuleDependencies.js +27 -63
- package/lib/lib/load-config.js +16 -24
- package/lib/lib/normalizeTailwindDirectives.js +26 -70
- package/lib/lib/offsets.js +61 -224
- package/lib/lib/partitionApplyAtRules.js +29 -51
- package/lib/lib/regex.js +22 -30
- package/lib/lib/remap-bitfield.js +9 -84
- package/lib/lib/resolveDefaultsAtRules.js +50 -116
- package/lib/lib/setupContextUtils.js +576 -1099
- package/lib/lib/setupTrackingContext.js +54 -143
- package/lib/lib/sharedState.js +15 -59
- package/lib/lib/substituteScreenAtRules.js +8 -16
- package/lib/oxide/cli/build/deps.js +17 -32
- package/lib/oxide/cli/build/index.js +10 -40
- package/lib/oxide/cli/build/plugin.js +87 -267
- package/lib/oxide/cli/build/utils.js +18 -39
- package/lib/oxide/cli/build/watching.js +34 -149
- package/lib/oxide/cli/help/index.js +15 -57
- package/lib/oxide/cli/index.js +66 -127
- package/lib/oxide/cli/init/index.js +17 -36
- package/lib/oxide/cli.js +2 -3
- package/lib/plugin.js +30 -57
- package/lib/postcss-plugins/nesting/index.js +6 -10
- package/lib/postcss-plugins/nesting/plugin.js +17 -60
- package/lib/processTailwindFeatures.js +8 -37
- package/lib/public/colors.js +15 -22
- package/lib/public/create-plugin.js +5 -8
- package/lib/public/default-config.js +5 -9
- package/lib/public/default-theme.js +5 -9
- package/lib/public/load-config.js +4 -6
- package/lib/public/resolve-config.js +4 -6
- package/lib/util/applyImportantSelector.js +15 -24
- package/lib/util/bigSign.js +6 -7
- package/lib/util/buildMediaQuery.js +10 -17
- package/lib/util/cloneDeep.js +9 -17
- package/lib/util/cloneNodes.js +14 -27
- package/lib/util/color.js +45 -81
- package/lib/util/configurePlugins.js +9 -16
- package/lib/util/createPlugin.js +8 -15
- package/lib/util/createUtilityPlugin.js +15 -27
- package/lib/util/dataTypes.js +23 -144
- package/lib/util/defaults.js +9 -19
- package/lib/util/escapeClassName.js +6 -10
- package/lib/util/escapeCommas.js +6 -7
- package/lib/util/flattenColorPalette.js +6 -8
- package/lib/util/formatVariantSelector.js +49 -190
- package/lib/util/getAllConfigs.js +35 -42
- package/lib/util/hashConfig.js +6 -8
- package/lib/util/isKeyframeRule.js +6 -7
- package/lib/util/isPlainObject.js +8 -11
- package/lib/util/isSyntacticallyValidPropertyValue.js +13 -42
- package/lib/util/log.js +7 -14
- package/lib/util/nameClass.js +6 -21
- package/lib/util/negateValue.js +10 -26
- package/lib/util/normalizeConfig.js +63 -240
- package/lib/util/normalizeScreens.js +70 -137
- package/lib/util/parseAnimationValue.js +13 -61
- package/lib/util/parseBoxShadowValue.js +12 -57
- package/lib/util/parseDependency.js +13 -37
- package/lib/util/parseGlob.js +7 -22
- package/lib/util/parseObjectStyles.js +17 -26
- package/lib/util/pluginUtils.js +69 -176
- package/lib/util/prefixSelector.js +11 -28
- package/lib/util/pseudoElements.js +29 -105
- package/lib/util/removeAlphaVariables.js +8 -21
- package/lib/util/resolveConfig.js +103 -220
- package/lib/util/resolveConfigPath.js +12 -38
- package/lib/util/responsive.js +4 -6
- package/lib/util/splitAtTopLevelOnly.js +10 -44
- package/lib/util/tap.js +6 -8
- package/lib/util/toColorValue.js +6 -7
- package/lib/util/toPath.js +8 -26
- package/lib/util/transformThemeValue.js +12 -45
- package/lib/util/validateConfig.js +14 -22
- package/lib/util/validateFormalSyntax.js +5 -11
- package/lib/util/withAlphaVariable.js +28 -48
- package/package.json +3 -3
- package/peers/index.js +14 -16
- package/src/cli/build/plugin.js +1 -1
- package/src/cli.js +1 -1
- package/src/corePlugins.js +16 -17
- package/src/featureFlags.js +2 -3
- package/src/index.js +1 -5
- package/src/lib/expandTailwindAtRules.js +2 -2
- package/src/lib/sharedState.js +0 -15
- package/src/oxide/cli/build/plugin.ts +1 -1
- package/src/plugin.js +1 -1
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value:
|
|
4
|
-
})
|
|
5
|
-
|
|
6
|
-
enumerable: true,
|
|
3
|
+
value: !0
|
|
4
|
+
}), Object.defineProperty(exports, "default", {
|
|
5
|
+
enumerable: !0,
|
|
7
6
|
get: ()=>parseAnimationValue
|
|
8
7
|
});
|
|
9
8
|
const DIRECTIONS = new Set([
|
|
@@ -11,21 +10,17 @@ const DIRECTIONS = new Set([
|
|
|
11
10
|
"reverse",
|
|
12
11
|
"alternate",
|
|
13
12
|
"alternate-reverse"
|
|
14
|
-
])
|
|
15
|
-
const PLAY_STATES = new Set([
|
|
13
|
+
]), PLAY_STATES = new Set([
|
|
16
14
|
"running",
|
|
17
15
|
"paused"
|
|
18
|
-
])
|
|
19
|
-
const FILL_MODES = new Set([
|
|
16
|
+
]), FILL_MODES = new Set([
|
|
20
17
|
"none",
|
|
21
18
|
"forwards",
|
|
22
19
|
"backwards",
|
|
23
20
|
"both"
|
|
24
|
-
])
|
|
25
|
-
const ITERATION_COUNTS = new Set([
|
|
21
|
+
]), ITERATION_COUNTS = new Set([
|
|
26
22
|
"infinite"
|
|
27
|
-
])
|
|
28
|
-
const TIMINGS = new Set([
|
|
23
|
+
]), TIMINGS = new Set([
|
|
29
24
|
"linear",
|
|
30
25
|
"ease",
|
|
31
26
|
"ease-in",
|
|
@@ -33,59 +28,16 @@ const TIMINGS = new Set([
|
|
|
33
28
|
"ease-in-out",
|
|
34
29
|
"step-start",
|
|
35
30
|
"step-end"
|
|
36
|
-
])
|
|
37
|
-
const TIMING_FNS = [
|
|
31
|
+
]), TIMING_FNS = [
|
|
38
32
|
"cubic-bezier",
|
|
39
33
|
"steps"
|
|
40
|
-
]
|
|
41
|
-
const COMMA = /\,(?![^(]*\))/g // Comma separator that is not located between brackets. E.g.: `cubiz-bezier(a, b, c)` these don't count.
|
|
42
|
-
;
|
|
43
|
-
const SPACE = /\ +(?![^(]*\))/g // Similar to the one above, but with spaces instead.
|
|
44
|
-
;
|
|
45
|
-
const TIME = /^(-?[\d.]+m?s)$/;
|
|
46
|
-
const DIGIT = /^(\d+)$/;
|
|
34
|
+
], COMMA = /\,(?![^(]*\))/g, SPACE = /\ +(?![^(]*\))/g, TIME = /^(-?[\d.]+m?s)$/, DIGIT = /^(\d+)$/;
|
|
47
35
|
function parseAnimationValue(input) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
let value = animation.trim();
|
|
51
|
-
let result = {
|
|
36
|
+
return input.split(COMMA).map((animation)=>{
|
|
37
|
+
let value = animation.trim(), result = {
|
|
52
38
|
value
|
|
53
|
-
};
|
|
54
|
-
let parts =
|
|
55
|
-
let seen = new Set();
|
|
56
|
-
for (let part of parts){
|
|
57
|
-
if (!seen.has("DIRECTIONS") && DIRECTIONS.has(part)) {
|
|
58
|
-
result.direction = part;
|
|
59
|
-
seen.add("DIRECTIONS");
|
|
60
|
-
} else if (!seen.has("PLAY_STATES") && PLAY_STATES.has(part)) {
|
|
61
|
-
result.playState = part;
|
|
62
|
-
seen.add("PLAY_STATES");
|
|
63
|
-
} else if (!seen.has("FILL_MODES") && FILL_MODES.has(part)) {
|
|
64
|
-
result.fillMode = part;
|
|
65
|
-
seen.add("FILL_MODES");
|
|
66
|
-
} else if (!seen.has("ITERATION_COUNTS") && (ITERATION_COUNTS.has(part) || DIGIT.test(part))) {
|
|
67
|
-
result.iterationCount = part;
|
|
68
|
-
seen.add("ITERATION_COUNTS");
|
|
69
|
-
} else if (!seen.has("TIMING_FUNCTION") && TIMINGS.has(part)) {
|
|
70
|
-
result.timingFunction = part;
|
|
71
|
-
seen.add("TIMING_FUNCTION");
|
|
72
|
-
} else if (!seen.has("TIMING_FUNCTION") && TIMING_FNS.some((f)=>part.startsWith(`${f}(`))) {
|
|
73
|
-
result.timingFunction = part;
|
|
74
|
-
seen.add("TIMING_FUNCTION");
|
|
75
|
-
} else if (!seen.has("DURATION") && TIME.test(part)) {
|
|
76
|
-
result.duration = part;
|
|
77
|
-
seen.add("DURATION");
|
|
78
|
-
} else if (!seen.has("DELAY") && TIME.test(part)) {
|
|
79
|
-
result.delay = part;
|
|
80
|
-
seen.add("DELAY");
|
|
81
|
-
} else if (!seen.has("NAME")) {
|
|
82
|
-
result.name = part;
|
|
83
|
-
seen.add("NAME");
|
|
84
|
-
} else {
|
|
85
|
-
if (!result.unknown) result.unknown = [];
|
|
86
|
-
result.unknown.push(part);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
39
|
+
}, parts = value.split(SPACE), seen = new Set();
|
|
40
|
+
for (let part of parts)!seen.has("DIRECTIONS") && DIRECTIONS.has(part) ? (result.direction = part, seen.add("DIRECTIONS")) : !seen.has("PLAY_STATES") && PLAY_STATES.has(part) ? (result.playState = part, seen.add("PLAY_STATES")) : !seen.has("FILL_MODES") && FILL_MODES.has(part) ? (result.fillMode = part, seen.add("FILL_MODES")) : !seen.has("ITERATION_COUNTS") && (ITERATION_COUNTS.has(part) || DIGIT.test(part)) ? (result.iterationCount = part, seen.add("ITERATION_COUNTS")) : !seen.has("TIMING_FUNCTION") && TIMINGS.has(part) ? (result.timingFunction = part, seen.add("TIMING_FUNCTION")) : !seen.has("TIMING_FUNCTION") && TIMING_FNS.some((f)=>part.startsWith(`${f}(`)) ? (result.timingFunction = part, seen.add("TIMING_FUNCTION")) : !seen.has("DURATION") && TIME.test(part) ? (result.duration = part, seen.add("DURATION")) : !seen.has("DELAY") && TIME.test(part) ? (result.delay = part, seen.add("DELAY")) : seen.has("NAME") ? (result.unknown || (result.unknown = []), result.unknown.push(part)) : (result.name = part, seen.add("NAME"));
|
|
89
41
|
return result;
|
|
90
42
|
});
|
|
91
43
|
}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value:
|
|
4
|
-
})
|
|
5
|
-
function _export(target, all) {
|
|
3
|
+
value: !0
|
|
4
|
+
}), function(target, all) {
|
|
6
5
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable:
|
|
6
|
+
enumerable: !0,
|
|
8
7
|
get: all[name]
|
|
9
8
|
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
9
|
+
}(exports, {
|
|
12
10
|
parseBoxShadowValue: ()=>parseBoxShadowValue,
|
|
13
11
|
formatBoxShadowValue: ()=>formatBoxShadowValue
|
|
14
12
|
});
|
|
@@ -19,66 +17,23 @@ let KEYWORDS = new Set([
|
|
|
19
17
|
"initial",
|
|
20
18
|
"revert",
|
|
21
19
|
"unset"
|
|
22
|
-
]);
|
|
23
|
-
let SPACE = /\ +(?![^(]*\))/g // Similar to the one above, but with spaces instead.
|
|
24
|
-
;
|
|
25
|
-
let LENGTH = /^-?(\d+|\.\d+)(.*?)$/g;
|
|
20
|
+
]), SPACE = /\ +(?![^(]*\))/g, LENGTH = /^-?(\d+|\.\d+)(.*?)$/g;
|
|
26
21
|
function parseBoxShadowValue(input) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
let value = shadow.trim();
|
|
30
|
-
let result = {
|
|
22
|
+
return (0, _splitAtTopLevelOnly.splitAtTopLevelOnly)(input, ",").map((shadow)=>{
|
|
23
|
+
let value = shadow.trim(), result = {
|
|
31
24
|
raw: value
|
|
32
|
-
};
|
|
33
|
-
let parts =
|
|
34
|
-
|
|
35
|
-
for (let part of parts){
|
|
36
|
-
// Reset index, since the regex is stateful.
|
|
37
|
-
LENGTH.lastIndex = 0;
|
|
38
|
-
// Keyword
|
|
39
|
-
if (!seen.has("KEYWORD") && KEYWORDS.has(part)) {
|
|
40
|
-
result.keyword = part;
|
|
41
|
-
seen.add("KEYWORD");
|
|
42
|
-
} else if (LENGTH.test(part)) {
|
|
43
|
-
if (!seen.has("X")) {
|
|
44
|
-
result.x = part;
|
|
45
|
-
seen.add("X");
|
|
46
|
-
} else if (!seen.has("Y")) {
|
|
47
|
-
result.y = part;
|
|
48
|
-
seen.add("Y");
|
|
49
|
-
} else if (!seen.has("BLUR")) {
|
|
50
|
-
result.blur = part;
|
|
51
|
-
seen.add("BLUR");
|
|
52
|
-
} else if (!seen.has("SPREAD")) {
|
|
53
|
-
result.spread = part;
|
|
54
|
-
seen.add("SPREAD");
|
|
55
|
-
}
|
|
56
|
-
} else {
|
|
57
|
-
if (!result.color) {
|
|
58
|
-
result.color = part;
|
|
59
|
-
} else {
|
|
60
|
-
if (!result.unknown) result.unknown = [];
|
|
61
|
-
result.unknown.push(part);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
// Check if valid
|
|
66
|
-
result.valid = result.x !== undefined && result.y !== undefined;
|
|
67
|
-
return result;
|
|
25
|
+
}, parts = value.split(SPACE), seen = new Set();
|
|
26
|
+
for (let part of parts)LENGTH.lastIndex = 0, !seen.has("KEYWORD") && KEYWORDS.has(part) ? (result.keyword = part, seen.add("KEYWORD")) : LENGTH.test(part) ? seen.has("X") ? seen.has("Y") ? seen.has("BLUR") ? seen.has("SPREAD") || (result.spread = part, seen.add("SPREAD")) : (result.blur = part, seen.add("BLUR")) : (result.y = part, seen.add("Y")) : (result.x = part, seen.add("X")) : result.color ? (result.unknown || (result.unknown = []), result.unknown.push(part)) : result.color = part;
|
|
27
|
+
return result.valid = void 0 !== result.x && void 0 !== result.y, result;
|
|
68
28
|
});
|
|
69
29
|
}
|
|
70
30
|
function formatBoxShadowValue(shadows) {
|
|
71
|
-
return shadows.map((shadow)=>
|
|
72
|
-
if (!shadow.valid) {
|
|
73
|
-
return shadow.raw;
|
|
74
|
-
}
|
|
75
|
-
return [
|
|
31
|
+
return shadows.map((shadow)=>shadow.valid ? [
|
|
76
32
|
shadow.keyword,
|
|
77
33
|
shadow.x,
|
|
78
34
|
shadow.y,
|
|
79
35
|
shadow.blur,
|
|
80
36
|
shadow.spread,
|
|
81
37
|
shadow.color
|
|
82
|
-
].filter(Boolean).join(" ");
|
|
83
|
-
}).join(", ");
|
|
38
|
+
].filter(Boolean).join(" ") : shadow.raw).join(", ");
|
|
84
39
|
}
|
|
@@ -1,45 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* @typedef {{type: 'dependency', file: string} | {type: 'dir-dependency', dir: string, glob: string}} Dependency
|
|
4
|
-
*/ /**
|
|
5
|
-
*
|
|
6
|
-
* @param {import('../lib/content.js').ContentPath} contentPath
|
|
7
|
-
* @returns {Dependency[]}
|
|
8
|
-
*/ "use strict";
|
|
9
|
-
Object.defineProperty(exports, "__esModule", {
|
|
10
|
-
value: true
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "default", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: ()=>parseDependency
|
|
15
|
-
});
|
|
1
|
+
"use strict";
|
|
16
2
|
function parseDependency(contentPath) {
|
|
17
|
-
|
|
18
|
-
return [];
|
|
19
|
-
}
|
|
20
|
-
if (!contentPath.glob) {
|
|
21
|
-
return [
|
|
22
|
-
{
|
|
23
|
-
type: "dependency",
|
|
24
|
-
file: contentPath.base
|
|
25
|
-
}
|
|
26
|
-
];
|
|
27
|
-
}
|
|
28
|
-
if (process.env.ROLLUP_WATCH === "true") {
|
|
29
|
-
// rollup-plugin-postcss does not support dir-dependency messages
|
|
30
|
-
// but directories can be watched in the same way as files
|
|
31
|
-
return [
|
|
32
|
-
{
|
|
33
|
-
type: "dependency",
|
|
34
|
-
file: contentPath.base
|
|
35
|
-
}
|
|
36
|
-
];
|
|
37
|
-
}
|
|
38
|
-
return [
|
|
3
|
+
return contentPath.ignore ? [] : contentPath.glob && "true" !== process.env.ROLLUP_WATCH ? [
|
|
39
4
|
{
|
|
40
5
|
type: "dir-dependency",
|
|
41
6
|
dir: contentPath.base,
|
|
42
7
|
glob: contentPath.glob
|
|
43
8
|
}
|
|
9
|
+
] : [
|
|
10
|
+
{
|
|
11
|
+
type: "dependency",
|
|
12
|
+
file: contentPath.base
|
|
13
|
+
}
|
|
44
14
|
];
|
|
45
15
|
}
|
|
16
|
+
Object.defineProperty(exports, "__esModule", {
|
|
17
|
+
value: !0
|
|
18
|
+
}), Object.defineProperty(exports, "default", {
|
|
19
|
+
enumerable: !0,
|
|
20
|
+
get: ()=>parseDependency
|
|
21
|
+
});
|
package/lib/util/parseGlob.js
CHANGED
|
@@ -1,33 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value:
|
|
4
|
-
})
|
|
5
|
-
|
|
6
|
-
enumerable: true,
|
|
3
|
+
value: !0
|
|
4
|
+
}), Object.defineProperty(exports, "parseGlob", {
|
|
5
|
+
enumerable: !0,
|
|
7
6
|
get: ()=>parseGlob
|
|
8
7
|
});
|
|
9
|
-
const _globParent =
|
|
10
|
-
function _interopRequireDefault(obj) {
|
|
8
|
+
const _globParent = function(obj) {
|
|
11
9
|
return obj && obj.__esModule ? obj : {
|
|
12
10
|
default: obj
|
|
13
11
|
};
|
|
14
|
-
}
|
|
12
|
+
}(require("glob-parent"));
|
|
15
13
|
function parseGlob(pattern) {
|
|
16
|
-
let glob = pattern;
|
|
17
|
-
|
|
18
|
-
if (base !== ".") {
|
|
19
|
-
glob = pattern.substr(base.length);
|
|
20
|
-
if (glob.charAt(0) === "/") {
|
|
21
|
-
glob = glob.substr(1);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
if (glob.substr(0, 2) === "./") {
|
|
25
|
-
glob = glob.substr(2);
|
|
26
|
-
}
|
|
27
|
-
if (glob.charAt(0) === "/") {
|
|
28
|
-
glob = glob.substr(1);
|
|
29
|
-
}
|
|
30
|
-
return {
|
|
14
|
+
let glob = pattern, base = (0, _globParent.default)(pattern);
|
|
15
|
+
return "." !== base && "/" === (glob = pattern.substr(base.length)).charAt(0) && (glob = glob.substr(1)), "./" === glob.substr(0, 2) && (glob = glob.substr(2)), "/" === glob.charAt(0) && (glob = glob.substr(1)), {
|
|
31
16
|
base,
|
|
32
17
|
glob
|
|
33
18
|
};
|
|
@@ -1,34 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value:
|
|
3
|
+
value: !0
|
|
4
|
+
}), Object.defineProperty(exports, "default", {
|
|
5
|
+
enumerable: !0,
|
|
6
|
+
get: ()=>function parseObjectStyles(styles) {
|
|
7
|
+
return Array.isArray(styles) ? styles.flatMap((style)=>(0, _postcss.default)([
|
|
8
|
+
(0, _postcssNested.default)({
|
|
9
|
+
bubble: [
|
|
10
|
+
"screen"
|
|
11
|
+
]
|
|
12
|
+
})
|
|
13
|
+
]).process(style, {
|
|
14
|
+
parser: _postcssJs.default
|
|
15
|
+
}).root.nodes) : parseObjectStyles([
|
|
16
|
+
styles
|
|
17
|
+
]);
|
|
18
|
+
}
|
|
4
19
|
});
|
|
5
|
-
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: ()=>parseObjectStyles
|
|
8
|
-
});
|
|
9
|
-
const _postcss = /*#__PURE__*/ _interopRequireDefault(require("postcss"));
|
|
10
|
-
const _postcssNested = /*#__PURE__*/ _interopRequireDefault(require("postcss-nested"));
|
|
11
|
-
const _postcssJs = /*#__PURE__*/ _interopRequireDefault(require("postcss-js"));
|
|
20
|
+
const _postcss = _interopRequireDefault(require("postcss")), _postcssNested = _interopRequireDefault(require("postcss-nested")), _postcssJs = _interopRequireDefault(require("postcss-js"));
|
|
12
21
|
function _interopRequireDefault(obj) {
|
|
13
22
|
return obj && obj.__esModule ? obj : {
|
|
14
23
|
default: obj
|
|
15
24
|
};
|
|
16
25
|
}
|
|
17
|
-
function parseObjectStyles(styles) {
|
|
18
|
-
if (!Array.isArray(styles)) {
|
|
19
|
-
return parseObjectStyles([
|
|
20
|
-
styles
|
|
21
|
-
]);
|
|
22
|
-
}
|
|
23
|
-
return styles.flatMap((style)=>{
|
|
24
|
-
return (0, _postcss.default)([
|
|
25
|
-
(0, _postcssNested.default)({
|
|
26
|
-
bubble: [
|
|
27
|
-
"screen"
|
|
28
|
-
]
|
|
29
|
-
})
|
|
30
|
-
]).process(style, {
|
|
31
|
-
parser: _postcssJs.default
|
|
32
|
-
}).root.nodes;
|
|
33
|
-
});
|
|
34
|
-
}
|