eslint-plugin-better-tailwindcss 3.5.0 → 3.5.2
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/cjs/tailwindcss/shorthand-classes.async.d.ts +1 -1
- package/lib/cjs/tailwindcss/shorthand-classes.async.d.ts.map +1 -1
- package/lib/cjs/tailwindcss/shorthand-classes.async.js +74 -94
- package/lib/cjs/tailwindcss/shorthand-classes.async.js.map +1 -1
- package/lib/cjs/tailwindcss/shorthand-classes.async.v3.d.ts.map +1 -1
- package/lib/cjs/tailwindcss/shorthand-classes.async.v3.js +33 -20
- package/lib/cjs/tailwindcss/shorthand-classes.async.v3.js.map +1 -1
- package/lib/cjs/tailwindcss/shorthand-classes.async.v4.d.ts.map +1 -1
- package/lib/cjs/tailwindcss/shorthand-classes.async.v4.js +32 -22
- package/lib/cjs/tailwindcss/shorthand-classes.async.v4.js.map +1 -1
- package/lib/esm/tailwindcss/shorthand-classes.async.d.ts +1 -1
- package/lib/esm/tailwindcss/shorthand-classes.async.d.ts.map +1 -1
- package/lib/esm/tailwindcss/shorthand-classes.async.js +74 -94
- package/lib/esm/tailwindcss/shorthand-classes.async.js.map +1 -1
- package/lib/esm/tailwindcss/shorthand-classes.async.v3.d.ts.map +1 -1
- package/lib/esm/tailwindcss/shorthand-classes.async.v3.js +33 -20
- package/lib/esm/tailwindcss/shorthand-classes.async.v3.js.map +1 -1
- package/lib/esm/tailwindcss/shorthand-classes.async.v4.d.ts.map +1 -1
- package/lib/esm/tailwindcss/shorthand-classes.async.v4.js +32 -22
- package/lib/esm/tailwindcss/shorthand-classes.async.v4.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { GetShorthandClassesResponse } from "./shorthand-classes.js";
|
|
2
2
|
export declare const shorthands: [string[], string[]][][];
|
|
3
|
-
export declare function getShorthands(classes: string[]): GetShorthandClassesResponse;
|
|
3
|
+
export declare function getShorthands(classes: string[]): GetShorthandClassesResponse[];
|
|
4
4
|
//# sourceMappingURL=shorthand-classes.async.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shorthand-classes.async.d.ts","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,2BAA2B,EAAc,MAAM,wBAAwB,CAAC;AAGtF,eAAO,MAAM,UAAU,0BAmFD,CAAC;AAEvB,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,2BAA2B,
|
|
1
|
+
{"version":3,"file":"shorthand-classes.async.d.ts","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,2BAA2B,EAAc,MAAM,wBAAwB,CAAC;AAGtF,eAAO,MAAM,UAAU,0BAmFD,CAAC;AAEvB,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,2BAA2B,EAAE,CAuD9E"}
|
|
@@ -5,145 +5,125 @@ exports.getShorthands = getShorthands;
|
|
|
5
5
|
const string_js_1 = require("../async-utils/string.js");
|
|
6
6
|
exports.shorthands = [
|
|
7
7
|
[
|
|
8
|
-
[["w-(.*)", "h-(.*)"], ["size-$1"]]
|
|
8
|
+
[["^w-(.*)", "^h-(.*)"], ["size-$1"]]
|
|
9
9
|
],
|
|
10
10
|
[
|
|
11
|
-
[["ml-(.*)", "mr-(.*)", "mt-(.*)", "mb-(.*)"], ["m-$1"]],
|
|
12
|
-
[["mx-(.*)", "my-(.*)"], ["m-$1"]],
|
|
13
|
-
[["ms-(.*)", "me-(.*)"], ["mx-$1"]],
|
|
14
|
-
[["ml-(.*)", "mr-(.*)"], ["mx-$1"]],
|
|
15
|
-
[["mt-(.*)", "mb-(.*)"], ["my-$1"]]
|
|
11
|
+
[["^ml-(.*)", "^mr-(.*)", "^mt-(.*)", "^mb-(.*)"], ["m-$1"]],
|
|
12
|
+
[["^mx-(.*)", "^my-(.*)"], ["m-$1"]],
|
|
13
|
+
[["^ms-(.*)", "^me-(.*)"], ["mx-$1"]],
|
|
14
|
+
[["^ml-(.*)", "^mr-(.*)"], ["mx-$1"]],
|
|
15
|
+
[["^mt-(.*)", "^mb-(.*)"], ["my-$1"]]
|
|
16
16
|
],
|
|
17
17
|
[
|
|
18
|
-
[["pl-(.*)", "pr-(.*)", "pt-(.*)", "pb-(.*)"], ["p-$1"]],
|
|
19
|
-
[["px-(.*)", "py-(.*)"], ["p-$1"]],
|
|
20
|
-
[["ps-(.*)", "pe-(.*)"], ["px-$1"]],
|
|
21
|
-
[["pl-(.*)", "pr-(.*)"], ["px-$1"]],
|
|
22
|
-
[["pt-(.*)", "pb-(.*)"], ["py-$1"]]
|
|
18
|
+
[["^pl-(.*)", "^pr-(.*)", "^pt-(.*)", "^pb-(.*)"], ["p-$1"]],
|
|
19
|
+
[["^px-(.*)", "^py-(.*)"], ["p-$1"]],
|
|
20
|
+
[["^ps-(.*)", "^pe-(.*)"], ["px-$1"]],
|
|
21
|
+
[["^pl-(.*)", "^pr-(.*)"], ["px-$1"]],
|
|
22
|
+
[["^pt-(.*)", "^pb-(.*)"], ["py-$1"]]
|
|
23
23
|
],
|
|
24
24
|
[
|
|
25
|
-
[["border-t-(.*)", "border-b-(.*)", "border-l-(.*)", "border-r-(.*)"], ["border-$1"]],
|
|
26
|
-
[["border-x-(.*)", "border-y-(.*)"], ["border-$1"]],
|
|
27
|
-
[["border-s-(.*)", "border-e-(.*)"], ["border-x-$1"]],
|
|
28
|
-
[["border-l-(.*)", "border-r-(.*)"], ["border-x-$1"]],
|
|
29
|
-
[["border-t-(.*)", "border-b-(.*)"], ["border-y-$1"]]
|
|
25
|
+
[["^border-t-(.*)", "^border-b-(.*)", "^border-l-(.*)", "^border-r-(.*)"], ["border-$1"]],
|
|
26
|
+
[["^border-x-(.*)", "^border-y-(.*)"], ["border-$1"]],
|
|
27
|
+
[["^border-s-(.*)", "^border-e-(.*)"], ["border-x-$1"]],
|
|
28
|
+
[["^border-l-(.*)", "^border-r-(.*)"], ["border-x-$1"]],
|
|
29
|
+
[["^border-t-(.*)", "^border-b-(.*)"], ["border-y-$1"]]
|
|
30
30
|
],
|
|
31
31
|
[
|
|
32
|
-
[["border-spacing-x-(.*)", "border-spacing-y-(.*)"], ["border-spacing-$1"]]
|
|
32
|
+
[["^border-spacing-x-(.*)", "^border-spacing-y-(.*)"], ["border-spacing-$1"]]
|
|
33
33
|
],
|
|
34
34
|
[
|
|
35
|
-
[["rounded-tl-(.*)", "rounded-tr-(.*)", "rounded-bl-(.*)", "rounded-br-(.*)"], ["rounded-$1"]],
|
|
36
|
-
[["rounded-tl-(.*)", "rounded-tr-(.*)"], ["rounded-t-$1"]],
|
|
37
|
-
[["rounded-bl-(.*)", "rounded-br-(.*)"], ["rounded-b-$1"]],
|
|
38
|
-
[["rounded-tl-(.*)", "rounded-bl-(.*)"], ["rounded-l-$1"]],
|
|
39
|
-
[["rounded-tr-(.*)", "rounded-br-(.*)"], ["rounded-r-$1"]]
|
|
35
|
+
[["^rounded-tl-(.*)", "^rounded-tr-(.*)", "^rounded-bl-(.*)", "^rounded-br-(.*)"], ["rounded-$1"]],
|
|
36
|
+
[["^rounded-tl-(.*)", "^rounded-tr-(.*)"], ["rounded-t-$1"]],
|
|
37
|
+
[["^rounded-bl-(.*)", "^rounded-br-(.*)"], ["rounded-b-$1"]],
|
|
38
|
+
[["^rounded-tl-(.*)", "^rounded-bl-(.*)"], ["rounded-l-$1"]],
|
|
39
|
+
[["^rounded-tr-(.*)", "^rounded-br-(.*)"], ["rounded-r-$1"]]
|
|
40
40
|
],
|
|
41
41
|
[
|
|
42
|
-
[["scroll-mt-(.*)", "scroll-mb-(.*)", "scroll-ml-(.*)", "scroll-mr-(.*)"], ["scroll-m-$1"]],
|
|
43
|
-
[["scroll-mx-(.*)", "scroll-my-(.*)"], ["scroll-m-$1"]],
|
|
44
|
-
[["scroll-ms-(.*)", "scroll-me-(.*)"], ["scroll-mx-$1"]],
|
|
45
|
-
[["scroll-ml-(.*)", "scroll-mr-(.*)"], ["scroll-mx-$1"]],
|
|
46
|
-
[["scroll-mt-(.*)", "scroll-mb-(.*)"], ["scroll-my-$1"]]
|
|
42
|
+
[["^scroll-mt-(.*)", "^scroll-mb-(.*)", "^scroll-ml-(.*)", "^scroll-mr-(.*)"], ["scroll-m-$1"]],
|
|
43
|
+
[["^scroll-mx-(.*)", "^scroll-my-(.*)"], ["scroll-m-$1"]],
|
|
44
|
+
[["^scroll-ms-(.*)", "^scroll-me-(.*)"], ["scroll-mx-$1"]],
|
|
45
|
+
[["^scroll-ml-(.*)", "^scroll-mr-(.*)"], ["scroll-mx-$1"]],
|
|
46
|
+
[["^scroll-mt-(.*)", "^scroll-mb-(.*)"], ["scroll-my-$1"]]
|
|
47
47
|
],
|
|
48
48
|
[
|
|
49
|
-
[["scroll-pt-(.*)", "scroll-pb-(.*)", "scroll-pl-(.*)", "scroll-pr-(.*)"], ["scroll-p-$1"]],
|
|
50
|
-
[["scroll-px-(.*)", "scroll-py-(.*)"], ["scroll-p-$1"]],
|
|
51
|
-
[["scroll-pl-(.*)", "scroll-pr-(.*)"], ["scroll-px-$1"]],
|
|
52
|
-
[["scroll-ps-(.*)", "scroll-pe-(.*)"], ["scroll-px-$1"]],
|
|
53
|
-
[["scroll-pt-(.*)", "scroll-pb-(.*)"], ["scroll-py-$1"]]
|
|
49
|
+
[["^scroll-pt-(.*)", "^scroll-pb-(.*)", "^scroll-pl-(.*)", "^scroll-pr-(.*)"], ["scroll-p-$1"]],
|
|
50
|
+
[["^scroll-px-(.*)", "^scroll-py-(.*)"], ["scroll-p-$1"]],
|
|
51
|
+
[["^scroll-pl-(.*)", "^scroll-pr-(.*)"], ["scroll-px-$1"]],
|
|
52
|
+
[["^scroll-ps-(.*)", "^scroll-pe-(.*)"], ["scroll-px-$1"]],
|
|
53
|
+
[["^scroll-pt-(.*)", "^scroll-pb-(.*)"], ["scroll-py-$1"]]
|
|
54
54
|
],
|
|
55
55
|
[
|
|
56
|
-
[["top-(.*)", "right-(.*)", "bottom-(.*)", "left-(.*)"], ["inset-$1"]],
|
|
57
|
-
[["inset-x-(.*)", "inset-y-(.*)"], ["inset-$1"]]
|
|
56
|
+
[["^top-(.*)", "^right-(.*)", "^bottom-(.*)", "^left-(.*)"], ["inset-$1"]],
|
|
57
|
+
[["^inset-x-(.*)", "^inset-y-(.*)"], ["inset-$1"]]
|
|
58
58
|
],
|
|
59
59
|
[
|
|
60
|
-
[["divide-x-(.*)", "divide-y-(.*)"], ["divide-$1"]]
|
|
60
|
+
[["^divide-x-(.*)", "^divide-y-(.*)"], ["divide-$1"]]
|
|
61
61
|
],
|
|
62
62
|
[
|
|
63
|
-
[["space-x-(.*)", "space-y-(.*)"], ["space-$1"]]
|
|
63
|
+
[["^space-x-(.*)", "^space-y-(.*)"], ["space-$1"]]
|
|
64
64
|
],
|
|
65
65
|
[
|
|
66
|
-
[["gap-x-(.*)", "gap-y-(.*)"], ["gap-$1"]]
|
|
66
|
+
[["^gap-x-(.*)", "^gap-y-(.*)"], ["gap-$1"]]
|
|
67
67
|
],
|
|
68
68
|
[
|
|
69
|
-
[["translate-x-(.*)", "translate-y-(.*)"], ["translate-$1"]]
|
|
69
|
+
[["^translate-x-(.*)", "^translate-y-(.*)"], ["translate-$1"]]
|
|
70
70
|
],
|
|
71
71
|
[
|
|
72
|
-
[["rotate-x-(.*)", "rotate-y-(.*)"], ["rotate-$1"]]
|
|
72
|
+
[["^rotate-x-(.*)", "^rotate-y-(.*)"], ["rotate-$1"]]
|
|
73
73
|
],
|
|
74
74
|
[
|
|
75
|
-
[["skew-x-(.*)", "skew-y-(.*)"], ["skew-$1"]]
|
|
75
|
+
[["^skew-x-(.*)", "^skew-y-(.*)"], ["skew-$1"]]
|
|
76
76
|
],
|
|
77
77
|
[
|
|
78
|
-
[["scale-x-(.*)", "scale-y-(.*)", "scale-z-(.*)"], ["scale-$1", "scale-3d"]],
|
|
79
|
-
[["scale-x-(.*)", "scale-y-(.*)"], ["scale-$1"]]
|
|
78
|
+
[["^scale-x-(.*)", "^scale-y-(.*)", "^scale-z-(.*)"], ["scale-$1", "scale-3d"]],
|
|
79
|
+
[["^scale-x-(.*)", "^scale-y-(.*)"], ["scale-$1"]]
|
|
80
80
|
],
|
|
81
81
|
[
|
|
82
|
-
[["content-(.*)", "justify-content-(.*)"], ["place-content-$1"]],
|
|
83
|
-
[["items-(.*)", "justify-items-(.*)"], ["place-items-$1"]],
|
|
84
|
-
[["self-(.*)", "justify-self-(.*)"], ["place-self-$1"]]
|
|
82
|
+
[["^content-(.*)", "^justify-content-(.*)"], ["place-content-$1"]],
|
|
83
|
+
[["^items-(.*)", "^justify-items-(.*)"], ["place-items-$1"]],
|
|
84
|
+
[["^self-(.*)", "^justify-self-(.*)"], ["place-self-$1"]]
|
|
85
85
|
],
|
|
86
86
|
[
|
|
87
|
-
[["overflow-hidden", "text-ellipsis", "whitespace-nowrap"], ["truncate"]]
|
|
87
|
+
[["^overflow-hidden", "^text-ellipsis", "^whitespace-nowrap"], ["truncate"]]
|
|
88
88
|
]
|
|
89
89
|
];
|
|
90
90
|
function getShorthands(classes) {
|
|
91
|
-
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
classNameLoop: for (const className of classes) {
|
|
109
|
-
const match = className.match(new RegExp(classPattern));
|
|
110
|
-
if (!match) {
|
|
111
|
-
continue classNameLoop;
|
|
91
|
+
const possibleShorthandClassesGroups = [];
|
|
92
|
+
for (const shorthandGroup of exports.shorthands) {
|
|
93
|
+
const sortedShorthandGroup = shorthandGroup.sort((a, b) => b[0].length - a[0].length);
|
|
94
|
+
const possibleShorthandClasses = [];
|
|
95
|
+
shorthandLoop: for (const [classPatterns, substitutes] of sortedShorthandGroup) {
|
|
96
|
+
const longhands = [];
|
|
97
|
+
const groups = [];
|
|
98
|
+
for (const classPattern of classPatterns) {
|
|
99
|
+
classNameLoop: for (const className of classes) {
|
|
100
|
+
const match = className.match(new RegExp(classPattern));
|
|
101
|
+
if (!match) {
|
|
102
|
+
continue classNameLoop;
|
|
103
|
+
}
|
|
104
|
+
for (let m = 0; m < match.length; m++) {
|
|
105
|
+
if (groups[m] === undefined) {
|
|
106
|
+
groups[m] = match[m];
|
|
107
|
+
continue;
|
|
112
108
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
important ?? (important = isImportant);
|
|
116
|
-
negative ?? (negative = isNegative);
|
|
117
|
-
if (important !== isImportant || negative !== isNegative) {
|
|
118
|
-
continue shorthandLoop;
|
|
109
|
+
if (m === 0) {
|
|
110
|
+
continue;
|
|
119
111
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
groups[m] = match[m];
|
|
123
|
-
continue;
|
|
124
|
-
}
|
|
125
|
-
if (m === 0) {
|
|
126
|
-
continue;
|
|
127
|
-
}
|
|
128
|
-
if (groups[m] !== match[m]) {
|
|
129
|
-
continue shorthandLoop;
|
|
130
|
-
}
|
|
112
|
+
if (groups[m] !== match[m]) {
|
|
113
|
+
continue shorthandLoop;
|
|
131
114
|
}
|
|
132
|
-
longhands.push(className);
|
|
133
115
|
}
|
|
116
|
+
longhands.push(className);
|
|
134
117
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
118
|
+
}
|
|
119
|
+
if (longhands.length === classPatterns.length) {
|
|
120
|
+
possibleShorthandClasses.push([longhands, substitutes.map(substitute => (0, string_js_1.replacePlaceholders)(substitute, groups))]);
|
|
139
121
|
}
|
|
140
122
|
}
|
|
141
|
-
if (
|
|
142
|
-
|
|
143
|
-
break;
|
|
123
|
+
if (possibleShorthandClasses.length > 0) {
|
|
124
|
+
possibleShorthandClassesGroups.push(possibleShorthandClasses.sort((a, b) => b[0].length - a[0].length));
|
|
144
125
|
}
|
|
145
|
-
finalShorthandClasses = structuredClone(shorthandClasses);
|
|
146
126
|
}
|
|
147
|
-
return
|
|
127
|
+
return possibleShorthandClassesGroups;
|
|
148
128
|
}
|
|
149
129
|
//# sourceMappingURL=shorthand-classes.async.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shorthand-classes.async.js","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.ts"],"names":[],"mappings":";;;AA0FA,
|
|
1
|
+
{"version":3,"file":"shorthand-classes.async.js","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.ts"],"names":[],"mappings":";;;AA0FA,sCAuDC;AAjJD,wDAA+D;AAKlD,QAAA,UAAU,GAAG;IACxB;QACE,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;KACtC;IACD;QACE,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;QAC5D,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;QACpC,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;QACrC,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;QACrC,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;KACtC;IACD;QACE,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;QAC5D,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;QACpC,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;QAC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,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;QAC1G,CAAC;IAEH,CAAC;IAED,OAAO,8BAA8B,CAAC;AACxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shorthand-classes.async.v3.d.ts","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.v3.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAG1E,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,2BAA2B,
|
|
1
|
+
{"version":3,"file":"shorthand-classes.async.v3.d.ts","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.v3.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAG1E,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,2BAA2B,CA6DhG"}
|
|
@@ -11,31 +11,44 @@ function getShorthandClasses(context, classes) {
|
|
|
11
11
|
const separator = context.tailwindConfig.separator ?? ":";
|
|
12
12
|
const rawMap = classes.reduce((acc, className) => {
|
|
13
13
|
const classVariants = variants.find(([name]) => name === className)?.[1] ?? [];
|
|
14
|
-
|
|
14
|
+
let base = className
|
|
15
15
|
.replace(classVariants.join(separator), "")
|
|
16
16
|
.replace(prefix, "")
|
|
17
17
|
.replace(/^:/, "");
|
|
18
|
-
|
|
18
|
+
const isNegative = base.startsWith("-");
|
|
19
|
+
base = base.replace(/^-/, "");
|
|
20
|
+
const isImportant = base.startsWith("!");
|
|
21
|
+
base = base.replace(/^!/, "");
|
|
22
|
+
acc[base] = { className, isImportant, isNegative, variants: classVariants };
|
|
19
23
|
return acc;
|
|
20
24
|
}, {});
|
|
21
25
|
return (0, shorthand_classes_async_js_1.getShorthands)(Object.keys(rawMap))
|
|
22
|
-
.
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
.filter(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
26
|
+
.reduce((acc, shorthandGroups) => {
|
|
27
|
+
for (const [longhands, shorthands] of shorthandGroups) {
|
|
28
|
+
const { isImportant, isNegative, variants } = rawMap[longhands[0]];
|
|
29
|
+
const important = isImportant ? "!" : "";
|
|
30
|
+
const negative = isNegative ? "-" : "";
|
|
31
|
+
const longhandClasses = longhands.map(longhand => rawMap[longhand].className);
|
|
32
|
+
const shorthandClasses = shorthands.map(shorthand => [
|
|
33
|
+
...variants,
|
|
34
|
+
[
|
|
35
|
+
prefix,
|
|
36
|
+
important,
|
|
37
|
+
negative,
|
|
38
|
+
shorthand
|
|
39
|
+
].join("")
|
|
40
|
+
].filter(chunk => !!chunk).join(separator));
|
|
41
|
+
if (longhands.some(longhand => rawMap[longhand].isImportant !== isImportant) ||
|
|
42
|
+
longhands.some(longhand => rawMap[longhand].isNegative !== isNegative) ||
|
|
43
|
+
longhands.some(longhand => rawMap[longhand].variants.join(separator) !== variants.join(separator)) ||
|
|
44
|
+
shorthandClasses.length === 0 ||
|
|
45
|
+
(0, unregistered_classes_async_v3_js_1.getUnregisteredClasses)(context, shorthandClasses).length > 0) {
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
acc.push([longhandClasses, shorthandClasses]);
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
return acc;
|
|
52
|
+
}, []);
|
|
40
53
|
}
|
|
41
54
|
//# sourceMappingURL=shorthand-classes.async.v3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shorthand-classes.async.v3.js","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.v3.ts"],"names":[],"mappings":";;AAQA,
|
|
1
|
+
{"version":3,"file":"shorthand-classes.async.v3.js","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.v3.ts"],"names":[],"mappings":";;AAQA,kDA6DC;AArED,6EAAgE;AAChE,6DAAiD;AACjD,6EAA6D;AAC7D,yFAA4E;AAK5E,SAAgB,mBAAmB,CAAC,OAAY,EAAE,OAAiB;IACjE,MAAM,QAAQ,GAAG,IAAA,6CAAgB,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,IAAA,8BAAS,EAAC,OAAO,CAAC,CAAC;IAClC,MAAM,SAAS,GAAG,OAAO,CAAC,cAAc,CAAC,SAAS,IAAI,GAAG,CAAC;IAE1D,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAA6G,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE;QAC3J,MAAM,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAE/E,IAAI,IAAI,GAAG,SAAS;aACjB,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC;aAC1C,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;aACnB,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAErB,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACxC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAE9B,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACzC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAE9B,GAAG,CAAC,IAAI,CAAC,GA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AQ,CAAC,CAAC,UAAU,KAAK,UAAU,CAAC;gBACtE,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBAClG,gBAAgB,CAAC,MAAM,KAAK,CAAC;gBAC7B,IAAA,yDAAsB,EAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC,MAAM,GAAG,CAAC,EAC7D,CAAC;gBACA,SAAS;YACX,CAAC;YAED,GAAG,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC,CAAC;YAE9C,MAAM;QAER,CAAC;QAED,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shorthand-classes.async.v4.d.ts","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.v4.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAG1E,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,2BAA2B,
|
|
1
|
+
{"version":3,"file":"shorthand-classes.async.v4.d.ts","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.v4.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAG1E,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,2BAA2B,CA6DhG"}
|
|
@@ -11,34 +11,44 @@ function getShorthandClasses(context, classes) {
|
|
|
11
11
|
const separator = ":";
|
|
12
12
|
const rawMap = classes.reduce((acc, className) => {
|
|
13
13
|
const classVariants = variants.find(([name]) => name === className)?.[1] ?? [];
|
|
14
|
-
|
|
14
|
+
let base = className
|
|
15
15
|
.replace(classVariants.join(separator), "")
|
|
16
16
|
.replace(prefix, "")
|
|
17
17
|
.replace(/^:/, "");
|
|
18
|
-
|
|
18
|
+
const isNegative = base.startsWith("-");
|
|
19
|
+
base = base.replace(/^-/, "");
|
|
20
|
+
const isImportant = base.endsWith("!");
|
|
21
|
+
base = base.replace(/!$/, "");
|
|
22
|
+
acc[base] = { className, isImportant, isNegative, variants: classVariants };
|
|
19
23
|
return acc;
|
|
20
24
|
}, {});
|
|
21
25
|
return (0, shorthand_classes_async_js_1.getShorthands)(Object.keys(rawMap))
|
|
22
|
-
.
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
longhands.map(longhand => rawMap[longhand])
|
|
28
|
-
shorthands.map(shorthand => [
|
|
26
|
+
.reduce((acc, shorthandGroups) => {
|
|
27
|
+
for (const [longhands, shorthands] of shorthandGroups) {
|
|
28
|
+
const { isImportant, isNegative, variants } = rawMap[longhands[0]];
|
|
29
|
+
const important = isImportant ? "!" : "";
|
|
30
|
+
const negative = isNegative ? "-" : "";
|
|
31
|
+
const longhandClasses = longhands.map(longhand => rawMap[longhand].className);
|
|
32
|
+
const shorthandClasses = shorthands.map(shorthand => [
|
|
29
33
|
prefix,
|
|
30
|
-
...
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
...variants,
|
|
35
|
+
[
|
|
36
|
+
negative,
|
|
37
|
+
shorthand,
|
|
38
|
+
important
|
|
39
|
+
].join("")
|
|
40
|
+
].filter(chunk => !!chunk).join(separator));
|
|
41
|
+
if (longhands.some(longhand => rawMap[longhand].isImportant !== isImportant) ||
|
|
42
|
+
longhands.some(longhand => rawMap[longhand].isNegative !== isNegative) ||
|
|
43
|
+
longhands.some(longhand => rawMap[longhand].variants.join(separator) !== variants.join(separator)) ||
|
|
44
|
+
shorthandClasses.length === 0 ||
|
|
45
|
+
(0, unregistered_classes_async_v4_js_1.getUnregisteredClasses)(context, shorthandClasses).length > 0) {
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
acc.push([longhandClasses, shorthandClasses]);
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
return acc;
|
|
52
|
+
}, []);
|
|
43
53
|
}
|
|
44
54
|
//# sourceMappingURL=shorthand-classes.async.v4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shorthand-classes.async.v4.js","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.v4.ts"],"names":[],"mappings":";;AAQA,
|
|
1
|
+
{"version":3,"file":"shorthand-classes.async.v4.js","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.v4.ts"],"names":[],"mappings":";;AAQA,kDA6DC;AArED,6EAAgE;AAChE,6DAAiD;AACjD,6EAA6D;AAC7D,yFAA4E;AAK5E,SAAgB,mBAAmB,CAAC,OAAY,EAAE,OAAiB;IACjE,MAAM,QAAQ,GAAG,IAAA,6CAAgB,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,IAAA,8BAAS,EAAC,OAAO,CAAC,CAAC;IAClC,MAAM,SAAS,GAAG,GAAG,CAAC;IAEtB,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAA6G,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE;QAC3J,MAAM,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAE/E,IAAI,IAAI,GAAG,SAAS;aACjB,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,E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C;gBACnD,MAAM;gBACN,GAAG,QAAQ;gBACX;oBACE,QAAQ;oBACR,SAAS;oBACT,SAAS;iBACV,CAAC,IAAI,CAAC,EAAE,CAAC;aACX,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;YAE5C,IACE,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,KAAK,WAAW,CAAC;gBACxE,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,UAAU,KAAK,UAAU,CAAC;gBACtE,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBAClG,gBAAgB,CAAC,MAAM,KAAK,CAAC;gBAC7B,IAAA,yDAAsB,EAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC,MAAM,GAAG,CAAC,EAC7D,CAAC;gBACA,SAAS;YACX,CAAC;YAED,GAAG,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC,CAAC;YAE9C,MAAM;QAER,CAAC;QAED,OAAO,GAAG,CAAC;IACb,CAAC,EAAE,EAAE,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { GetShorthandClassesResponse } from "./shorthand-classes.js";
|
|
2
2
|
export declare const shorthands: [string[], string[]][][];
|
|
3
|
-
export declare function getShorthands(classes: string[]): GetShorthandClassesResponse;
|
|
3
|
+
export declare function getShorthands(classes: string[]): GetShorthandClassesResponse[];
|
|
4
4
|
//# sourceMappingURL=shorthand-classes.async.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shorthand-classes.async.d.ts","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,2BAA2B,EAAc,MAAM,wBAAwB,CAAC;AAGtF,eAAO,MAAM,UAAU,0BAmFD,CAAC;AAEvB,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,2BAA2B,
|
|
1
|
+
{"version":3,"file":"shorthand-classes.async.d.ts","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,2BAA2B,EAAc,MAAM,wBAAwB,CAAC;AAGtF,eAAO,MAAM,UAAU,0BAmFD,CAAC;AAEvB,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,2BAA2B,EAAE,CAuD9E"}
|
|
@@ -1,145 +1,125 @@
|
|
|
1
1
|
import { replacePlaceholders } from "../async-utils/string.js";
|
|
2
2
|
export const shorthands = [
|
|
3
3
|
[
|
|
4
|
-
[["w-(.*)", "h-(.*)"], ["size-$1"]]
|
|
4
|
+
[["^w-(.*)", "^h-(.*)"], ["size-$1"]]
|
|
5
5
|
],
|
|
6
6
|
[
|
|
7
|
-
[["ml-(.*)", "mr-(.*)", "mt-(.*)", "mb-(.*)"], ["m-$1"]],
|
|
8
|
-
[["mx-(.*)", "my-(.*)"], ["m-$1"]],
|
|
9
|
-
[["ms-(.*)", "me-(.*)"], ["mx-$1"]],
|
|
10
|
-
[["ml-(.*)", "mr-(.*)"], ["mx-$1"]],
|
|
11
|
-
[["mt-(.*)", "mb-(.*)"], ["my-$1"]]
|
|
7
|
+
[["^ml-(.*)", "^mr-(.*)", "^mt-(.*)", "^mb-(.*)"], ["m-$1"]],
|
|
8
|
+
[["^mx-(.*)", "^my-(.*)"], ["m-$1"]],
|
|
9
|
+
[["^ms-(.*)", "^me-(.*)"], ["mx-$1"]],
|
|
10
|
+
[["^ml-(.*)", "^mr-(.*)"], ["mx-$1"]],
|
|
11
|
+
[["^mt-(.*)", "^mb-(.*)"], ["my-$1"]]
|
|
12
12
|
],
|
|
13
13
|
[
|
|
14
|
-
[["pl-(.*)", "pr-(.*)", "pt-(.*)", "pb-(.*)"], ["p-$1"]],
|
|
15
|
-
[["px-(.*)", "py-(.*)"], ["p-$1"]],
|
|
16
|
-
[["ps-(.*)", "pe-(.*)"], ["px-$1"]],
|
|
17
|
-
[["pl-(.*)", "pr-(.*)"], ["px-$1"]],
|
|
18
|
-
[["pt-(.*)", "pb-(.*)"], ["py-$1"]]
|
|
14
|
+
[["^pl-(.*)", "^pr-(.*)", "^pt-(.*)", "^pb-(.*)"], ["p-$1"]],
|
|
15
|
+
[["^px-(.*)", "^py-(.*)"], ["p-$1"]],
|
|
16
|
+
[["^ps-(.*)", "^pe-(.*)"], ["px-$1"]],
|
|
17
|
+
[["^pl-(.*)", "^pr-(.*)"], ["px-$1"]],
|
|
18
|
+
[["^pt-(.*)", "^pb-(.*)"], ["py-$1"]]
|
|
19
19
|
],
|
|
20
20
|
[
|
|
21
|
-
[["border-t-(.*)", "border-b-(.*)", "border-l-(.*)", "border-r-(.*)"], ["border-$1"]],
|
|
22
|
-
[["border-x-(.*)", "border-y-(.*)"], ["border-$1"]],
|
|
23
|
-
[["border-s-(.*)", "border-e-(.*)"], ["border-x-$1"]],
|
|
24
|
-
[["border-l-(.*)", "border-r-(.*)"], ["border-x-$1"]],
|
|
25
|
-
[["border-t-(.*)", "border-b-(.*)"], ["border-y-$1"]]
|
|
21
|
+
[["^border-t-(.*)", "^border-b-(.*)", "^border-l-(.*)", "^border-r-(.*)"], ["border-$1"]],
|
|
22
|
+
[["^border-x-(.*)", "^border-y-(.*)"], ["border-$1"]],
|
|
23
|
+
[["^border-s-(.*)", "^border-e-(.*)"], ["border-x-$1"]],
|
|
24
|
+
[["^border-l-(.*)", "^border-r-(.*)"], ["border-x-$1"]],
|
|
25
|
+
[["^border-t-(.*)", "^border-b-(.*)"], ["border-y-$1"]]
|
|
26
26
|
],
|
|
27
27
|
[
|
|
28
|
-
[["border-spacing-x-(.*)", "border-spacing-y-(.*)"], ["border-spacing-$1"]]
|
|
28
|
+
[["^border-spacing-x-(.*)", "^border-spacing-y-(.*)"], ["border-spacing-$1"]]
|
|
29
29
|
],
|
|
30
30
|
[
|
|
31
|
-
[["rounded-tl-(.*)", "rounded-tr-(.*)", "rounded-bl-(.*)", "rounded-br-(.*)"], ["rounded-$1"]],
|
|
32
|
-
[["rounded-tl-(.*)", "rounded-tr-(.*)"], ["rounded-t-$1"]],
|
|
33
|
-
[["rounded-bl-(.*)", "rounded-br-(.*)"], ["rounded-b-$1"]],
|
|
34
|
-
[["rounded-tl-(.*)", "rounded-bl-(.*)"], ["rounded-l-$1"]],
|
|
35
|
-
[["rounded-tr-(.*)", "rounded-br-(.*)"], ["rounded-r-$1"]]
|
|
31
|
+
[["^rounded-tl-(.*)", "^rounded-tr-(.*)", "^rounded-bl-(.*)", "^rounded-br-(.*)"], ["rounded-$1"]],
|
|
32
|
+
[["^rounded-tl-(.*)", "^rounded-tr-(.*)"], ["rounded-t-$1"]],
|
|
33
|
+
[["^rounded-bl-(.*)", "^rounded-br-(.*)"], ["rounded-b-$1"]],
|
|
34
|
+
[["^rounded-tl-(.*)", "^rounded-bl-(.*)"], ["rounded-l-$1"]],
|
|
35
|
+
[["^rounded-tr-(.*)", "^rounded-br-(.*)"], ["rounded-r-$1"]]
|
|
36
36
|
],
|
|
37
37
|
[
|
|
38
|
-
[["scroll-mt-(.*)", "scroll-mb-(.*)", "scroll-ml-(.*)", "scroll-mr-(.*)"], ["scroll-m-$1"]],
|
|
39
|
-
[["scroll-mx-(.*)", "scroll-my-(.*)"], ["scroll-m-$1"]],
|
|
40
|
-
[["scroll-ms-(.*)", "scroll-me-(.*)"], ["scroll-mx-$1"]],
|
|
41
|
-
[["scroll-ml-(.*)", "scroll-mr-(.*)"], ["scroll-mx-$1"]],
|
|
42
|
-
[["scroll-mt-(.*)", "scroll-mb-(.*)"], ["scroll-my-$1"]]
|
|
38
|
+
[["^scroll-mt-(.*)", "^scroll-mb-(.*)", "^scroll-ml-(.*)", "^scroll-mr-(.*)"], ["scroll-m-$1"]],
|
|
39
|
+
[["^scroll-mx-(.*)", "^scroll-my-(.*)"], ["scroll-m-$1"]],
|
|
40
|
+
[["^scroll-ms-(.*)", "^scroll-me-(.*)"], ["scroll-mx-$1"]],
|
|
41
|
+
[["^scroll-ml-(.*)", "^scroll-mr-(.*)"], ["scroll-mx-$1"]],
|
|
42
|
+
[["^scroll-mt-(.*)", "^scroll-mb-(.*)"], ["scroll-my-$1"]]
|
|
43
43
|
],
|
|
44
44
|
[
|
|
45
|
-
[["scroll-pt-(.*)", "scroll-pb-(.*)", "scroll-pl-(.*)", "scroll-pr-(.*)"], ["scroll-p-$1"]],
|
|
46
|
-
[["scroll-px-(.*)", "scroll-py-(.*)"], ["scroll-p-$1"]],
|
|
47
|
-
[["scroll-pl-(.*)", "scroll-pr-(.*)"], ["scroll-px-$1"]],
|
|
48
|
-
[["scroll-ps-(.*)", "scroll-pe-(.*)"], ["scroll-px-$1"]],
|
|
49
|
-
[["scroll-pt-(.*)", "scroll-pb-(.*)"], ["scroll-py-$1"]]
|
|
45
|
+
[["^scroll-pt-(.*)", "^scroll-pb-(.*)", "^scroll-pl-(.*)", "^scroll-pr-(.*)"], ["scroll-p-$1"]],
|
|
46
|
+
[["^scroll-px-(.*)", "^scroll-py-(.*)"], ["scroll-p-$1"]],
|
|
47
|
+
[["^scroll-pl-(.*)", "^scroll-pr-(.*)"], ["scroll-px-$1"]],
|
|
48
|
+
[["^scroll-ps-(.*)", "^scroll-pe-(.*)"], ["scroll-px-$1"]],
|
|
49
|
+
[["^scroll-pt-(.*)", "^scroll-pb-(.*)"], ["scroll-py-$1"]]
|
|
50
50
|
],
|
|
51
51
|
[
|
|
52
|
-
[["top-(.*)", "right-(.*)", "bottom-(.*)", "left-(.*)"], ["inset-$1"]],
|
|
53
|
-
[["inset-x-(.*)", "inset-y-(.*)"], ["inset-$1"]]
|
|
52
|
+
[["^top-(.*)", "^right-(.*)", "^bottom-(.*)", "^left-(.*)"], ["inset-$1"]],
|
|
53
|
+
[["^inset-x-(.*)", "^inset-y-(.*)"], ["inset-$1"]]
|
|
54
54
|
],
|
|
55
55
|
[
|
|
56
|
-
[["divide-x-(.*)", "divide-y-(.*)"], ["divide-$1"]]
|
|
56
|
+
[["^divide-x-(.*)", "^divide-y-(.*)"], ["divide-$1"]]
|
|
57
57
|
],
|
|
58
58
|
[
|
|
59
|
-
[["space-x-(.*)", "space-y-(.*)"], ["space-$1"]]
|
|
59
|
+
[["^space-x-(.*)", "^space-y-(.*)"], ["space-$1"]]
|
|
60
60
|
],
|
|
61
61
|
[
|
|
62
|
-
[["gap-x-(.*)", "gap-y-(.*)"], ["gap-$1"]]
|
|
62
|
+
[["^gap-x-(.*)", "^gap-y-(.*)"], ["gap-$1"]]
|
|
63
63
|
],
|
|
64
64
|
[
|
|
65
|
-
[["translate-x-(.*)", "translate-y-(.*)"], ["translate-$1"]]
|
|
65
|
+
[["^translate-x-(.*)", "^translate-y-(.*)"], ["translate-$1"]]
|
|
66
66
|
],
|
|
67
67
|
[
|
|
68
|
-
[["rotate-x-(.*)", "rotate-y-(.*)"], ["rotate-$1"]]
|
|
68
|
+
[["^rotate-x-(.*)", "^rotate-y-(.*)"], ["rotate-$1"]]
|
|
69
69
|
],
|
|
70
70
|
[
|
|
71
|
-
[["skew-x-(.*)", "skew-y-(.*)"], ["skew-$1"]]
|
|
71
|
+
[["^skew-x-(.*)", "^skew-y-(.*)"], ["skew-$1"]]
|
|
72
72
|
],
|
|
73
73
|
[
|
|
74
|
-
[["scale-x-(.*)", "scale-y-(.*)", "scale-z-(.*)"], ["scale-$1", "scale-3d"]],
|
|
75
|
-
[["scale-x-(.*)", "scale-y-(.*)"], ["scale-$1"]]
|
|
74
|
+
[["^scale-x-(.*)", "^scale-y-(.*)", "^scale-z-(.*)"], ["scale-$1", "scale-3d"]],
|
|
75
|
+
[["^scale-x-(.*)", "^scale-y-(.*)"], ["scale-$1"]]
|
|
76
76
|
],
|
|
77
77
|
[
|
|
78
|
-
[["content-(.*)", "justify-content-(.*)"], ["place-content-$1"]],
|
|
79
|
-
[["items-(.*)", "justify-items-(.*)"], ["place-items-$1"]],
|
|
80
|
-
[["self-(.*)", "justify-self-(.*)"], ["place-self-$1"]]
|
|
78
|
+
[["^content-(.*)", "^justify-content-(.*)"], ["place-content-$1"]],
|
|
79
|
+
[["^items-(.*)", "^justify-items-(.*)"], ["place-items-$1"]],
|
|
80
|
+
[["^self-(.*)", "^justify-self-(.*)"], ["place-self-$1"]]
|
|
81
81
|
],
|
|
82
82
|
[
|
|
83
|
-
[["overflow-hidden", "text-ellipsis", "whitespace-nowrap"], ["truncate"]]
|
|
83
|
+
[["^overflow-hidden", "^text-ellipsis", "^whitespace-nowrap"], ["truncate"]]
|
|
84
84
|
]
|
|
85
85
|
];
|
|
86
86
|
export function getShorthands(classes) {
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
classNameLoop: for (const className of classes) {
|
|
105
|
-
const match = className.match(new RegExp(classPattern));
|
|
106
|
-
if (!match) {
|
|
107
|
-
continue classNameLoop;
|
|
87
|
+
const possibleShorthandClassesGroups = [];
|
|
88
|
+
for (const shorthandGroup of shorthands) {
|
|
89
|
+
const sortedShorthandGroup = shorthandGroup.sort((a, b) => b[0].length - a[0].length);
|
|
90
|
+
const possibleShorthandClasses = [];
|
|
91
|
+
shorthandLoop: for (const [classPatterns, substitutes] of sortedShorthandGroup) {
|
|
92
|
+
const longhands = [];
|
|
93
|
+
const groups = [];
|
|
94
|
+
for (const classPattern of classPatterns) {
|
|
95
|
+
classNameLoop: for (const className of classes) {
|
|
96
|
+
const match = className.match(new RegExp(classPattern));
|
|
97
|
+
if (!match) {
|
|
98
|
+
continue classNameLoop;
|
|
99
|
+
}
|
|
100
|
+
for (let m = 0; m < match.length; m++) {
|
|
101
|
+
if (groups[m] === undefined) {
|
|
102
|
+
groups[m] = match[m];
|
|
103
|
+
continue;
|
|
108
104
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
important ?? (important = isImportant);
|
|
112
|
-
negative ?? (negative = isNegative);
|
|
113
|
-
if (important !== isImportant || negative !== isNegative) {
|
|
114
|
-
continue shorthandLoop;
|
|
105
|
+
if (m === 0) {
|
|
106
|
+
continue;
|
|
115
107
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
groups[m] = match[m];
|
|
119
|
-
continue;
|
|
120
|
-
}
|
|
121
|
-
if (m === 0) {
|
|
122
|
-
continue;
|
|
123
|
-
}
|
|
124
|
-
if (groups[m] !== match[m]) {
|
|
125
|
-
continue shorthandLoop;
|
|
126
|
-
}
|
|
108
|
+
if (groups[m] !== match[m]) {
|
|
109
|
+
continue shorthandLoop;
|
|
127
110
|
}
|
|
128
|
-
longhands.push(className);
|
|
129
111
|
}
|
|
112
|
+
longhands.push(className);
|
|
130
113
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
114
|
+
}
|
|
115
|
+
if (longhands.length === classPatterns.length) {
|
|
116
|
+
possibleShorthandClasses.push([longhands, substitutes.map(substitute => replacePlaceholders(substitute, groups))]);
|
|
135
117
|
}
|
|
136
118
|
}
|
|
137
|
-
if (
|
|
138
|
-
|
|
139
|
-
break;
|
|
119
|
+
if (possibleShorthandClasses.length > 0) {
|
|
120
|
+
possibleShorthandClassesGroups.push(possibleShorthandClasses.sort((a, b) => b[0].length - a[0].length));
|
|
140
121
|
}
|
|
141
|
-
finalShorthandClasses = structuredClone(shorthandClasses);
|
|
142
122
|
}
|
|
143
|
-
return
|
|
123
|
+
return possibleShorthandClassesGroups;
|
|
144
124
|
}
|
|
145
125
|
//# sourceMappingURL=shorthand-classes.async.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shorthand-classes.async.js","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAK/D,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB;QACE,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"shorthand-classes.async.js","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAK/D,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB;QACE,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;KACtC;IACD;QACE,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;QAC5D,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;QACpC,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;QACrC,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;QACrC,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;KACtC;IACD;QACE,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;QAC5D,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;QACpC,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC,OA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AAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;QAC1G,CAAC;IAEH,CAAC;IAED,OAAO,8BAA8B,CAAC;AACxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shorthand-classes.async.v3.d.ts","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.v3.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAG1E,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,2BAA2B,
|
|
1
|
+
{"version":3,"file":"shorthand-classes.async.v3.d.ts","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.v3.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAG1E,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,2BAA2B,CA6DhG"}
|
|
@@ -8,31 +8,44 @@ export function getShorthandClasses(context, classes) {
|
|
|
8
8
|
const separator = context.tailwindConfig.separator ?? ":";
|
|
9
9
|
const rawMap = classes.reduce((acc, className) => {
|
|
10
10
|
const classVariants = variants.find(([name]) => name === className)?.[1] ?? [];
|
|
11
|
-
|
|
11
|
+
let base = className
|
|
12
12
|
.replace(classVariants.join(separator), "")
|
|
13
13
|
.replace(prefix, "")
|
|
14
14
|
.replace(/^:/, "");
|
|
15
|
-
|
|
15
|
+
const isNegative = base.startsWith("-");
|
|
16
|
+
base = base.replace(/^-/, "");
|
|
17
|
+
const isImportant = base.startsWith("!");
|
|
18
|
+
base = base.replace(/^!/, "");
|
|
19
|
+
acc[base] = { className, isImportant, isNegative, variants: classVariants };
|
|
16
20
|
return acc;
|
|
17
21
|
}, {});
|
|
18
22
|
return getShorthands(Object.keys(rawMap))
|
|
19
|
-
.
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
.filter(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
.reduce((acc, shorthandGroups) => {
|
|
24
|
+
for (const [longhands, shorthands] of shorthandGroups) {
|
|
25
|
+
const { isImportant, isNegative, variants } = rawMap[longhands[0]];
|
|
26
|
+
const important = isImportant ? "!" : "";
|
|
27
|
+
const negative = isNegative ? "-" : "";
|
|
28
|
+
const longhandClasses = longhands.map(longhand => rawMap[longhand].className);
|
|
29
|
+
const shorthandClasses = shorthands.map(shorthand => [
|
|
30
|
+
...variants,
|
|
31
|
+
[
|
|
32
|
+
prefix,
|
|
33
|
+
important,
|
|
34
|
+
negative,
|
|
35
|
+
shorthand
|
|
36
|
+
].join("")
|
|
37
|
+
].filter(chunk => !!chunk).join(separator));
|
|
38
|
+
if (longhands.some(longhand => rawMap[longhand].isImportant !== isImportant) ||
|
|
39
|
+
longhands.some(longhand => rawMap[longhand].isNegative !== isNegative) ||
|
|
40
|
+
longhands.some(longhand => rawMap[longhand].variants.join(separator) !== variants.join(separator)) ||
|
|
41
|
+
shorthandClasses.length === 0 ||
|
|
42
|
+
getUnregisteredClasses(context, shorthandClasses).length > 0) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
acc.push([longhandClasses, shorthandClasses]);
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
return acc;
|
|
49
|
+
}, []);
|
|
37
50
|
}
|
|
38
51
|
//# sourceMappingURL=shorthand-classes.async.v3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shorthand-classes.async.v3.js","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.v3.ts"],"names":[],"m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],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAG1E,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,2BAA2B,
|
|
1
|
+
{"version":3,"file":"shorthand-classes.async.v4.d.ts","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.v4.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAG1E,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,2BAA2B,CA6DhG"}
|
|
@@ -8,34 +8,44 @@ export function getShorthandClasses(context, classes) {
|
|
|
8
8
|
const separator = ":";
|
|
9
9
|
const rawMap = classes.reduce((acc, className) => {
|
|
10
10
|
const classVariants = variants.find(([name]) => name === className)?.[1] ?? [];
|
|
11
|
-
|
|
11
|
+
let base = className
|
|
12
12
|
.replace(classVariants.join(separator), "")
|
|
13
13
|
.replace(prefix, "")
|
|
14
14
|
.replace(/^:/, "");
|
|
15
|
-
|
|
15
|
+
const isNegative = base.startsWith("-");
|
|
16
|
+
base = base.replace(/^-/, "");
|
|
17
|
+
const isImportant = base.endsWith("!");
|
|
18
|
+
base = base.replace(/!$/, "");
|
|
19
|
+
acc[base] = { className, isImportant, isNegative, variants: classVariants };
|
|
16
20
|
return acc;
|
|
17
21
|
}, {});
|
|
18
22
|
return getShorthands(Object.keys(rawMap))
|
|
19
|
-
.
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
longhands.map(longhand => rawMap[longhand])
|
|
25
|
-
shorthands.map(shorthand => [
|
|
23
|
+
.reduce((acc, shorthandGroups) => {
|
|
24
|
+
for (const [longhands, shorthands] of shorthandGroups) {
|
|
25
|
+
const { isImportant, isNegative, variants } = rawMap[longhands[0]];
|
|
26
|
+
const important = isImportant ? "!" : "";
|
|
27
|
+
const negative = isNegative ? "-" : "";
|
|
28
|
+
const longhandClasses = longhands.map(longhand => rawMap[longhand].className);
|
|
29
|
+
const shorthandClasses = shorthands.map(shorthand => [
|
|
26
30
|
prefix,
|
|
27
|
-
...
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
...variants,
|
|
32
|
+
[
|
|
33
|
+
negative,
|
|
34
|
+
shorthand,
|
|
35
|
+
important
|
|
36
|
+
].join("")
|
|
37
|
+
].filter(chunk => !!chunk).join(separator));
|
|
38
|
+
if (longhands.some(longhand => rawMap[longhand].isImportant !== isImportant) ||
|
|
39
|
+
longhands.some(longhand => rawMap[longhand].isNegative !== isNegative) ||
|
|
40
|
+
longhands.some(longhand => rawMap[longhand].variants.join(separator) !== variants.join(separator)) ||
|
|
41
|
+
shorthandClasses.length === 0 ||
|
|
42
|
+
getUnregisteredClasses(context, shorthandClasses).length > 0) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
acc.push([longhandClasses, shorthandClasses]);
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
return acc;
|
|
49
|
+
}, []);
|
|
40
50
|
}
|
|
41
51
|
//# sourceMappingURL=shorthand-classes.async.v4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shorthand-classes.async.v4.js","sourceRoot":"","sources":["../../../src/tailwindcss/shorthand-classes.async.v4.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAK5E,M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