@youthfulhps/prettier-plugin-tailwindcss-normalizer 0.3.4

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.
Files changed (63) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +3 -0
  3. package/dist/ast-transformer.d.ts +4 -0
  4. package/dist/ast-transformer.js +180 -0
  5. package/dist/index.d.ts +3 -0
  6. package/dist/index.js +75 -0
  7. package/dist/mappings/effects/index.d.ts +2 -0
  8. package/dist/mappings/effects/index.js +7 -0
  9. package/dist/mappings/effects/shadows-opacity.d.ts +2 -0
  10. package/dist/mappings/effects/shadows-opacity.js +33 -0
  11. package/dist/mappings/filters/blur-effects.d.ts +2 -0
  12. package/dist/mappings/filters/blur-effects.js +141 -0
  13. package/dist/mappings/filters/index.d.ts +2 -0
  14. package/dist/mappings/filters/index.js +7 -0
  15. package/dist/mappings/index.d.ts +2 -0
  16. package/dist/mappings/index.js +23 -0
  17. package/dist/mappings/interactivity/index.d.ts +2 -0
  18. package/dist/mappings/interactivity/index.js +7 -0
  19. package/dist/mappings/interactivity/outline-ring-scroll.d.ts +2 -0
  20. package/dist/mappings/interactivity/outline-ring-scroll.js +68 -0
  21. package/dist/mappings/layout/borders-rounded.d.ts +2 -0
  22. package/dist/mappings/layout/borders-rounded.js +153 -0
  23. package/dist/mappings/layout/index.d.ts +2 -0
  24. package/dist/mappings/layout/index.js +9 -0
  25. package/dist/mappings/layout/positioning.d.ts +2 -0
  26. package/dist/mappings/layout/positioning.js +99 -0
  27. package/dist/mappings/sizing/height.d.ts +2 -0
  28. package/dist/mappings/sizing/height.js +173 -0
  29. package/dist/mappings/sizing/index.d.ts +2 -0
  30. package/dist/mappings/sizing/index.js +11 -0
  31. package/dist/mappings/sizing/size.d.ts +2 -0
  32. package/dist/mappings/sizing/size.js +62 -0
  33. package/dist/mappings/sizing/width.d.ts +2 -0
  34. package/dist/mappings/sizing/width.js +166 -0
  35. package/dist/mappings/spacing/gap-space.d.ts +2 -0
  36. package/dist/mappings/spacing/gap-space.js +70 -0
  37. package/dist/mappings/spacing/index.d.ts +2 -0
  38. package/dist/mappings/spacing/index.js +11 -0
  39. package/dist/mappings/spacing/margin.d.ts +2 -0
  40. package/dist/mappings/spacing/margin.js +587 -0
  41. package/dist/mappings/spacing/padding.d.ts +2 -0
  42. package/dist/mappings/spacing/padding.js +305 -0
  43. package/dist/mappings/transforms/index.d.ts +2 -0
  44. package/dist/mappings/transforms/index.js +7 -0
  45. package/dist/mappings/transforms/rotate-scale-translate.d.ts +2 -0
  46. package/dist/mappings/transforms/rotate-scale-translate.js +64 -0
  47. package/dist/mappings/transitions/duration-delay.d.ts +2 -0
  48. package/dist/mappings/transitions/duration-delay.js +36 -0
  49. package/dist/mappings/transitions/index.d.ts +2 -0
  50. package/dist/mappings/transitions/index.js +7 -0
  51. package/dist/mappings/typography/font-size.d.ts +2 -0
  52. package/dist/mappings/typography/font-size.js +40 -0
  53. package/dist/mappings/typography/index.d.ts +2 -0
  54. package/dist/mappings/typography/index.js +7 -0
  55. package/dist/normalizer.d.ts +3 -0
  56. package/dist/normalizer.js +123 -0
  57. package/dist/types/prettier-compat.d.ts +20 -0
  58. package/dist/types/prettier-compat.js +10 -0
  59. package/dist/types.d.ts +93 -0
  60. package/dist/types.js +2 -0
  61. package/dist/utils/version-utils.d.ts +6 -0
  62. package/dist/utils/version-utils.js +89 -0
  63. package/package.json +69 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 prettier-plugin-tailwindcss-normalizer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # prettier-plugin-tailwindcss-normalizer
2
+
3
+ A Prettier plugin that normalizes Tailwind CSS arbitrary values into standard utility classes.
@@ -0,0 +1,4 @@
1
+ export declare function transformJSXAST(code: string): string;
2
+ export declare function transformHTMLAST(code: string): string;
3
+ export declare function transformVueTemplate(code: string): string;
4
+ export declare function transformByFileType(code: string, filepath?: string): string;
@@ -0,0 +1,180 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.transformJSXAST = transformJSXAST;
7
+ exports.transformHTMLAST = transformHTMLAST;
8
+ exports.transformVueTemplate = transformVueTemplate;
9
+ exports.transformByFileType = transformByFileType;
10
+ const parser_1 = require("@babel/parser");
11
+ const traverse_1 = __importDefault(require("@babel/traverse"));
12
+ const generator_1 = __importDefault(require("@babel/generator"));
13
+ const normalizer_1 = require("./normalizer");
14
+ function transformJSXAST(code) {
15
+ try {
16
+ const ast = (0, parser_1.parse)(code, {
17
+ sourceType: "module",
18
+ plugins: [
19
+ "jsx",
20
+ "typescript",
21
+ "decorators-legacy",
22
+ "classProperties",
23
+ "objectRestSpread",
24
+ ],
25
+ });
26
+ const supportedAttributes = ["className"];
27
+ const supportedFunctions = ["clsx", "classnames", "cn"];
28
+ (0, traverse_1.default)(ast, {
29
+ JSXAttribute(path) {
30
+ const attributeName = path.node.name;
31
+ if (attributeName.type === "JSXIdentifier" &&
32
+ supportedAttributes.includes(attributeName.name)) {
33
+ const value = path.node.value;
34
+ if (value && value.type === "StringLiteral") {
35
+ value.value = (0, normalizer_1.normalizeClassNames)(value.value);
36
+ }
37
+ else if (value &&
38
+ value.type === "JSXExpressionContainer" &&
39
+ value.expression.type === "StringLiteral") {
40
+ value.expression.value = (0, normalizer_1.normalizeClassNames)(value.expression.value);
41
+ }
42
+ else if (value &&
43
+ value.type === "JSXExpressionContainer" &&
44
+ value.expression.type === "TemplateLiteral") {
45
+ value.expression.quasis.forEach((quasi) => {
46
+ if (quasi.value.raw) {
47
+ const normalized = normalizeClassNamesInTemplateLiteral(quasi.value.raw);
48
+ quasi.value.raw = normalized;
49
+ quasi.value.cooked = normalized;
50
+ }
51
+ });
52
+ }
53
+ }
54
+ },
55
+ CallExpression(path) {
56
+ const callee = path.node.callee;
57
+ if (callee.type === "Identifier" &&
58
+ supportedFunctions.includes(callee.name)) {
59
+ path.node.arguments.forEach((arg) => {
60
+ if (arg.type === "StringLiteral") {
61
+ arg.value = (0, normalizer_1.normalizeClassNames)(arg.value);
62
+ }
63
+ });
64
+ }
65
+ },
66
+ StringLiteral(path) {
67
+ if (path.parent?.type === "JSXAttribute") {
68
+ return;
69
+ }
70
+ if (path.parent?.type === "CallExpression" &&
71
+ path.parent.callee?.type === "Identifier" &&
72
+ supportedFunctions.includes(path.parent.callee.name)) {
73
+ return;
74
+ }
75
+ if (isTailwindClassString(path.node.value)) {
76
+ path.node.value = (0, normalizer_1.normalizeClassNames)(path.node.value);
77
+ }
78
+ },
79
+ });
80
+ return (0, generator_1.default)(ast, {
81
+ retainLines: true,
82
+ compact: false,
83
+ }).code;
84
+ }
85
+ catch (error) {
86
+ return code;
87
+ }
88
+ }
89
+ function transformHTMLAST(code) {
90
+ try {
91
+ const supportedAttributes = ["class"];
92
+ let result = code;
93
+ supportedAttributes.forEach((attr) => {
94
+ const regex = new RegExp(`(<[^>]+\\s)(${attr}\\s*=\\s*)(["'])([^"']*?)\\3`, "g");
95
+ result = result.replace(regex, (match, tagStart, attrName, quote, classValue) => {
96
+ const normalized = (0, normalizer_1.normalizeClassNames)(classValue);
97
+ return `${tagStart}${attrName}${quote}${normalized}${quote}`;
98
+ });
99
+ });
100
+ return result;
101
+ }
102
+ catch (error) {
103
+ return code;
104
+ }
105
+ }
106
+ function transformVueTemplate(code) {
107
+ try {
108
+ let result = code;
109
+ result = result.replace(/(:class|v-bind:class)\s*=\s*(["'])(.*?)\2/g, (match, attrName, outerQuote, content) => {
110
+ const innerQuoteMatch = content.match(/^(['"])(.*?)\1$/);
111
+ if (innerQuoteMatch) {
112
+ const [, innerQuote, innerClasses] = innerQuoteMatch;
113
+ const normalized = (0, normalizer_1.normalizeClassNames)(innerClasses);
114
+ return `${attrName}=${outerQuote}${innerQuote}${normalized}${innerQuote}${outerQuote}`;
115
+ }
116
+ else {
117
+ const normalized = (0, normalizer_1.normalizeClassNames)(content);
118
+ return `${attrName}=${outerQuote}${normalized}${outerQuote}`;
119
+ }
120
+ });
121
+ result = result.replace(/\bclass\s*=\s*(["'])([^"']*?)\1/g, (match, quote, classValue) => {
122
+ const normalized = (0, normalizer_1.normalizeClassNames)(classValue);
123
+ return `class=${quote}${normalized}${quote}`;
124
+ });
125
+ return result;
126
+ }
127
+ catch (error) {
128
+ return code;
129
+ }
130
+ }
131
+ function isTailwindClassString(str) {
132
+ if (!str || str.length < 3)
133
+ return false;
134
+ const hasArbitraryValues = /[a-z:-]+\[[^\]]+\]/.test(str);
135
+ if (!hasArbitraryValues)
136
+ return false;
137
+ const hasSpaces = str.includes(" ");
138
+ const isUrl = str.includes("://") || str.includes(".com") || str.includes(".org");
139
+ const hasCommonWords = /\b(the|and|is|are|in|on|at|to|for|of|with|by)\b/i.test(str);
140
+ const hasNumbers = /^\d+$/.test(str.trim());
141
+ if (isUrl || hasCommonWords || hasNumbers)
142
+ return false;
143
+ if (hasSpaces) {
144
+ const parts = str.trim().split(/\s+/);
145
+ const classLikeParts = parts.filter((part) => /^[a-z][a-z0-9-]*(:?[a-z][a-z0-9-]*)*(\[[^\]]+\])?$/.test(part));
146
+ return classLikeParts.length >= Math.ceil(parts.length / 2);
147
+ }
148
+ return /^[a-z][a-z0-9-]*(:?[a-z][a-z0-9-]*)*(\[[^\]]+\])+$/.test(str);
149
+ }
150
+ function normalizeClassNamesInTemplateLiteral(rawString) {
151
+ const interpolations = [];
152
+ const withPlaceholders = rawString.replace(/\$\{[^}]*\}/g, (match) => {
153
+ const placeholder = `__INTERPOLATION_${interpolations.length}__`;
154
+ interpolations.push(match);
155
+ return placeholder;
156
+ });
157
+ const normalized = (0, normalizer_1.normalizeClassNames)(withPlaceholders);
158
+ return interpolations.reduce((result, interpolation, index) => {
159
+ return result.replace(`__INTERPOLATION_${index}__`, interpolation);
160
+ }, normalized);
161
+ }
162
+ function transformByFileType(code, filepath) {
163
+ if (!filepath) {
164
+ return code;
165
+ }
166
+ const extension = filepath.split(".").pop()?.toLowerCase();
167
+ switch (extension) {
168
+ case "jsx":
169
+ case "tsx":
170
+ return transformJSXAST(code);
171
+ case "html":
172
+ return transformHTMLAST(code);
173
+ case "vue":
174
+ return code.replace(/(<template[^>]*>)([\s\S]*?)(<\/template>)/g, (match, openTag, content, closeTag) => {
175
+ return openTag + transformVueTemplate(content) + closeTag;
176
+ });
177
+ default:
178
+ return code;
179
+ }
180
+ }
@@ -0,0 +1,3 @@
1
+ import { CompatPlugin } from "./types/prettier-compat";
2
+ declare const plugin: CompatPlugin;
3
+ export default plugin;
package/dist/index.js ADDED
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const ast_transformer_1 = require("./ast-transformer");
4
+ const version_utils_1 = require("./utils/version-utils");
5
+ const plugin = {
6
+ languages: [
7
+ {
8
+ name: "HTML",
9
+ parsers: ["html"],
10
+ extensions: [".html"],
11
+ },
12
+ {
13
+ name: "Vue",
14
+ parsers: ["vue"],
15
+ extensions: [".vue"],
16
+ },
17
+ {
18
+ name: "Angular",
19
+ parsers: ["angular"],
20
+ extensions: [".component.html"],
21
+ },
22
+ {
23
+ name: "JavaScript",
24
+ parsers: ["babel"],
25
+ extensions: [".js", ".jsx"],
26
+ },
27
+ {
28
+ name: "TypeScript",
29
+ parsers: ["babel-ts"],
30
+ extensions: [".ts", ".tsx"],
31
+ },
32
+ ],
33
+ parsers: {
34
+ html: {
35
+ ...(0, version_utils_1.safeLoadParser)("html"),
36
+ preprocess: (text, options) => {
37
+ return (0, ast_transformer_1.transformByFileType)(text, options.filepath || "file.html");
38
+ },
39
+ },
40
+ vue: {
41
+ ...(0, version_utils_1.safeLoadParser)("html", "vue"),
42
+ preprocess: (text, options) => {
43
+ return (0, ast_transformer_1.transformByFileType)(text, options.filepath || "file.vue");
44
+ },
45
+ },
46
+ angular: {
47
+ ...(0, version_utils_1.safeLoadParser)("angular"),
48
+ preprocess: (text, options) => {
49
+ return (0, ast_transformer_1.transformByFileType)(text, options.filepath || "file.html");
50
+ },
51
+ },
52
+ babel: {
53
+ ...(0, version_utils_1.safeLoadParser)("babel"),
54
+ preprocess: (text, options) => {
55
+ const filepath = options.filepath || "";
56
+ if (filepath.endsWith(".jsx") || filepath.endsWith(".tsx")) {
57
+ return (0, ast_transformer_1.transformByFileType)(text, filepath);
58
+ }
59
+ return text;
60
+ },
61
+ },
62
+ "babel-ts": {
63
+ ...(0, version_utils_1.safeLoadParser)("babel", "babel-ts"),
64
+ preprocess: (text, options) => {
65
+ const filepath = options.filepath || "";
66
+ if (filepath.endsWith(".tsx")) {
67
+ return (0, ast_transformer_1.transformByFileType)(text, filepath);
68
+ }
69
+ return text;
70
+ },
71
+ },
72
+ },
73
+ };
74
+ module.exports = plugin;
75
+ exports.default = plugin;
@@ -0,0 +1,2 @@
1
+ import { TailwindMapping } from "../../types";
2
+ export declare const allEffectsMappings: TailwindMapping;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.allEffectsMappings = void 0;
4
+ const shadows_opacity_1 = require("./shadows-opacity");
5
+ exports.allEffectsMappings = {
6
+ ...shadows_opacity_1.effectsMappings,
7
+ };
@@ -0,0 +1,2 @@
1
+ import { ValueMapping } from "../../types";
2
+ export declare const effectsMappings: Record<string, ValueMapping>;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.effectsMappings = void 0;
4
+ exports.effectsMappings = {
5
+ shadow: {
6
+ "0 1px 2px 0 rgb(0 0 0 / 0.05)": "shadow-sm",
7
+ "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)": "shadow",
8
+ "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)": "shadow-md",
9
+ "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)": "shadow-lg",
10
+ "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)": "shadow-xl",
11
+ "0 25px 50px -12px rgb(0 0 0 / 0.25)": "shadow-2xl",
12
+ "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)": "shadow-inner",
13
+ none: "shadow-none",
14
+ },
15
+ opacity: {
16
+ "0": "opacity-0",
17
+ "0.05": "opacity-5",
18
+ "0.1": "opacity-10",
19
+ "0.15": "opacity-15",
20
+ "0.2": "opacity-20",
21
+ "0.25": "opacity-25",
22
+ "0.3": "opacity-30",
23
+ "0.4": "opacity-40",
24
+ "0.5": "opacity-50",
25
+ "0.6": "opacity-60",
26
+ "0.7": "opacity-70",
27
+ "0.75": "opacity-75",
28
+ "0.8": "opacity-80",
29
+ "0.9": "opacity-90",
30
+ "0.95": "opacity-95",
31
+ "1": "opacity-100",
32
+ },
33
+ };
@@ -0,0 +1,2 @@
1
+ import { ValueMapping } from "../../types";
2
+ export declare const filtersMappings: Record<string, ValueMapping>;
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.filtersMappings = void 0;
4
+ exports.filtersMappings = {
5
+ blur: {
6
+ "0": "blur-none",
7
+ "4px": "blur-sm",
8
+ "8px": "blur",
9
+ "12px": "blur-md",
10
+ "16px": "blur-lg",
11
+ "24px": "blur-xl",
12
+ "40px": "blur-2xl",
13
+ "64px": "blur-3xl",
14
+ },
15
+ brightness: {
16
+ "0": "brightness-0",
17
+ "0.5": "brightness-50",
18
+ "0.75": "brightness-75",
19
+ "0.9": "brightness-90",
20
+ "0.95": "brightness-95",
21
+ "1": "brightness-100",
22
+ "1.05": "brightness-105",
23
+ "1.1": "brightness-110",
24
+ "1.25": "brightness-125",
25
+ "1.5": "brightness-150",
26
+ "2": "brightness-200",
27
+ },
28
+ contrast: {
29
+ "0": "contrast-0",
30
+ "0.5": "contrast-50",
31
+ "0.75": "contrast-75",
32
+ "1": "contrast-100",
33
+ "1.25": "contrast-125",
34
+ "1.5": "contrast-150",
35
+ "2": "contrast-200",
36
+ },
37
+ grayscale: {
38
+ "0": "grayscale-0",
39
+ "1": "grayscale",
40
+ },
41
+ invert: {
42
+ "0": "invert-0",
43
+ "1": "invert",
44
+ },
45
+ saturate: {
46
+ "0": "saturate-0",
47
+ "0.5": "saturate-50",
48
+ "1": "saturate-100",
49
+ "1.5": "saturate-150",
50
+ "2": "saturate-200",
51
+ },
52
+ sepia: {
53
+ "0": "sepia-0",
54
+ "1": "sepia",
55
+ },
56
+ "hue-rotate": {
57
+ "0deg": "hue-rotate-0",
58
+ "15deg": "hue-rotate-15",
59
+ "30deg": "hue-rotate-30",
60
+ "60deg": "hue-rotate-60",
61
+ "90deg": "hue-rotate-90",
62
+ "180deg": "hue-rotate-180",
63
+ },
64
+ "backdrop-blur": {
65
+ "0": "backdrop-blur-none",
66
+ "4px": "backdrop-blur-sm",
67
+ "8px": "backdrop-blur",
68
+ "12px": "backdrop-blur-md",
69
+ "16px": "backdrop-blur-lg",
70
+ "24px": "backdrop-blur-xl",
71
+ "40px": "backdrop-blur-2xl",
72
+ "64px": "backdrop-blur-3xl",
73
+ },
74
+ "backdrop-brightness": {
75
+ "0": "backdrop-brightness-0",
76
+ "0.5": "backdrop-brightness-50",
77
+ "0.75": "backdrop-brightness-75",
78
+ "0.9": "backdrop-brightness-90",
79
+ "0.95": "backdrop-brightness-95",
80
+ "1": "backdrop-brightness-100",
81
+ "1.05": "backdrop-brightness-105",
82
+ "1.1": "backdrop-brightness-110",
83
+ "1.25": "backdrop-brightness-125",
84
+ "1.5": "backdrop-brightness-150",
85
+ "2": "backdrop-brightness-200",
86
+ },
87
+ "backdrop-contrast": {
88
+ "0": "backdrop-contrast-0",
89
+ "0.5": "backdrop-contrast-50",
90
+ "0.75": "backdrop-contrast-75",
91
+ "1": "backdrop-contrast-100",
92
+ "1.25": "backdrop-contrast-125",
93
+ "1.5": "backdrop-contrast-150",
94
+ "2": "backdrop-contrast-200",
95
+ },
96
+ "backdrop-grayscale": {
97
+ "0": "backdrop-grayscale-0",
98
+ "1": "backdrop-grayscale",
99
+ },
100
+ "backdrop-hue-rotate": {
101
+ "0deg": "backdrop-hue-rotate-0",
102
+ "15deg": "backdrop-hue-rotate-15",
103
+ "30deg": "backdrop-hue-rotate-30",
104
+ "60deg": "backdrop-hue-rotate-60",
105
+ "90deg": "backdrop-hue-rotate-90",
106
+ "180deg": "backdrop-hue-rotate-180",
107
+ },
108
+ "backdrop-invert": {
109
+ "0": "backdrop-invert-0",
110
+ "1": "backdrop-invert",
111
+ },
112
+ "backdrop-opacity": {
113
+ "0": "backdrop-opacity-0",
114
+ "0.05": "backdrop-opacity-5",
115
+ "0.1": "backdrop-opacity-10",
116
+ "0.15": "backdrop-opacity-15",
117
+ "0.2": "backdrop-opacity-20",
118
+ "0.25": "backdrop-opacity-25",
119
+ "0.3": "backdrop-opacity-30",
120
+ "0.4": "backdrop-opacity-40",
121
+ "0.5": "backdrop-opacity-50",
122
+ "0.6": "backdrop-opacity-60",
123
+ "0.7": "backdrop-opacity-70",
124
+ "0.75": "backdrop-opacity-75",
125
+ "0.8": "backdrop-opacity-80",
126
+ "0.9": "backdrop-opacity-90",
127
+ "0.95": "backdrop-opacity-95",
128
+ "1": "backdrop-opacity-100",
129
+ },
130
+ "backdrop-saturate": {
131
+ "0": "backdrop-saturate-0",
132
+ "0.5": "backdrop-saturate-50",
133
+ "1": "backdrop-saturate-100",
134
+ "1.5": "backdrop-saturate-150",
135
+ "2": "backdrop-saturate-200",
136
+ },
137
+ "backdrop-sepia": {
138
+ "0": "backdrop-sepia-0",
139
+ "1": "backdrop-sepia",
140
+ },
141
+ };
@@ -0,0 +1,2 @@
1
+ import { TailwindMapping } from "../../types";
2
+ export declare const allFiltersMappings: TailwindMapping;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.allFiltersMappings = void 0;
4
+ const blur_effects_1 = require("./blur-effects");
5
+ exports.allFiltersMappings = {
6
+ ...blur_effects_1.filtersMappings,
7
+ };
@@ -0,0 +1,2 @@
1
+ import { TailwindMapping } from "../types";
2
+ export declare const TAILWIND_MAPPINGS: TailwindMapping;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TAILWIND_MAPPINGS = void 0;
4
+ const spacing_1 = require("./spacing");
5
+ const sizing_1 = require("./sizing");
6
+ const layout_1 = require("./layout");
7
+ const typography_1 = require("./typography");
8
+ const effects_1 = require("./effects");
9
+ const transitions_1 = require("./transitions");
10
+ const interactivity_1 = require("./interactivity");
11
+ const transforms_1 = require("./transforms");
12
+ const filters_1 = require("./filters");
13
+ exports.TAILWIND_MAPPINGS = {
14
+ ...spacing_1.spacingMappings,
15
+ ...sizing_1.sizingMappings,
16
+ ...layout_1.layoutMappings,
17
+ ...typography_1.typographyMappings,
18
+ ...effects_1.allEffectsMappings,
19
+ ...transitions_1.allTransitionsMappings,
20
+ ...interactivity_1.allInteractivityMappings,
21
+ ...transforms_1.allTransformsMappings,
22
+ ...filters_1.allFiltersMappings,
23
+ };
@@ -0,0 +1,2 @@
1
+ import { TailwindMapping } from "../../types";
2
+ export declare const allInteractivityMappings: TailwindMapping;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.allInteractivityMappings = void 0;
4
+ const outline_ring_scroll_1 = require("./outline-ring-scroll");
5
+ exports.allInteractivityMappings = {
6
+ ...outline_ring_scroll_1.interactivityMappings,
7
+ };
@@ -0,0 +1,2 @@
1
+ import { ValueMapping } from "../../types";
2
+ export declare const interactivityMappings: Record<string, ValueMapping>;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.interactivityMappings = void 0;
4
+ exports.interactivityMappings = {
5
+ outline: {
6
+ "0px": "outline-0",
7
+ "1px": "outline-1",
8
+ "2px": "outline-2",
9
+ "4px": "outline-4",
10
+ "8px": "outline-8",
11
+ },
12
+ "outline-offset": {
13
+ "0px": "outline-offset-0",
14
+ "1px": "outline-offset-1",
15
+ "2px": "outline-offset-2",
16
+ "4px": "outline-offset-4",
17
+ "8px": "outline-offset-8",
18
+ },
19
+ ring: {
20
+ "0px": "ring-0",
21
+ "1px": "ring-1",
22
+ "2px": "ring-2",
23
+ "4px": "ring-4",
24
+ "8px": "ring-8",
25
+ inset: "ring-inset",
26
+ },
27
+ "ring-offset": {
28
+ "0px": "ring-offset-0",
29
+ "1px": "ring-offset-1",
30
+ "2px": "ring-offset-2",
31
+ "4px": "ring-offset-4",
32
+ "8px": "ring-offset-8",
33
+ },
34
+ "scroll-m": {
35
+ "0px": "scroll-m-0",
36
+ "1px": "scroll-m-px",
37
+ "4px": "scroll-m-1",
38
+ "8px": "scroll-m-2",
39
+ "12px": "scroll-m-3",
40
+ "16px": "scroll-m-4",
41
+ "20px": "scroll-m-5",
42
+ "24px": "scroll-m-6",
43
+ },
44
+ "scroll-p": {
45
+ "0px": "scroll-p-0",
46
+ "1px": "scroll-p-px",
47
+ "4px": "scroll-p-1",
48
+ "8px": "scroll-p-2",
49
+ "12px": "scroll-p-3",
50
+ "16px": "scroll-p-4",
51
+ "20px": "scroll-p-5",
52
+ "24px": "scroll-p-6",
53
+ },
54
+ "focus:ring": {
55
+ "0px": "focus:ring-0",
56
+ "1px": "focus:ring-1",
57
+ "2px": "focus:ring-2",
58
+ "4px": "focus:ring-4",
59
+ "8px": "focus:ring-8",
60
+ },
61
+ "focus:ring-offset": {
62
+ "0px": "focus:ring-offset-0",
63
+ "1px": "focus:ring-offset-1",
64
+ "2px": "focus:ring-offset-2",
65
+ "4px": "focus:ring-offset-4",
66
+ "8px": "focus:ring-offset-8",
67
+ },
68
+ };
@@ -0,0 +1,2 @@
1
+ import { ValueMapping } from "../../types";
2
+ export declare const bordersRoundedMappings: Record<string, ValueMapping>;