@weapp-tailwindcss/merge 0.0.0 → 0.0.1-alpha.0

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/dist/index.js CHANGED
@@ -1,2361 +1,216 @@
1
- var __defProp = Object.defineProperty;
2
- var __export = (target, all) => {
3
- for (var name in all)
4
- __defProp(target, name, { get: all[name], enumerable: true });
5
- };
1
+ // src/index.ts
2
+ import { cva as _cva } from "class-variance-authority";
3
+ import { clsx } from "clsx";
4
+ import { twMerge } from "tailwind-merge";
6
5
 
7
- // src/lib/class-group-utils.ts
8
- var CLASS_PART_SEPARATOR = "-";
9
- function createClassGroupUtils(config) {
10
- const classMap = createClassMap(config);
11
- const { conflictingClassGroups, conflictingClassGroupModifiers } = config;
12
- const getClassGroupId = (className) => {
13
- const classParts = className.split(CLASS_PART_SEPARATOR);
14
- if (classParts[0] === "" && classParts.length !== 1) {
15
- classParts.shift();
16
- }
17
- return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
18
- };
19
- const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
20
- const conflicts = conflictingClassGroups[classGroupId] || [];
21
- if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
22
- return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
23
- }
24
- return conflicts;
25
- };
26
- return {
27
- getClassGroupId,
28
- getConflictingClassGroupIds
29
- };
30
- }
31
- function getGroupRecursive(classParts, classPartObject) {
32
- if (classParts.length === 0) {
33
- return classPartObject.classGroupId;
6
+ // ../../node_modules/.pnpm/@weapp-core+escape@3.0.2/node_modules/@weapp-core/escape/dist/index.mjs
7
+ var MappingChars2String = {
8
+ "[": "_bl_",
9
+ "]": "_br_",
10
+ "(": "_pl_",
11
+ ")": "_qr_",
12
+ "#": "_h_",
13
+ "!": "_i_",
14
+ "/": "_s_",
15
+ "\\": "_bs_",
16
+ ".": "_d_",
17
+ ":": "_c_",
18
+ "%": "_p_",
19
+ ",": "_co_",
20
+ "'": "_q_",
21
+ '"': "_dq_",
22
+ "*": "_a_",
23
+ "&": "_am_",
24
+ "@": "_at_",
25
+ "{": "_bal_",
26
+ "}": "_bar_",
27
+ // ' ': '_sp_',
28
+ "+": "_plus_",
29
+ // '-': '_m_',
30
+ ";": "_se_",
31
+ "<": "_l_",
32
+ "~": "_t_",
33
+ "=": "_e_",
34
+ ">": "_g_",
35
+ "?": "_qu_",
36
+ "^": "_ca_",
37
+ "`": "_bq_",
38
+ "|": "_b_",
39
+ "$": "_do_"
40
+ // _: '_u_'
41
+ };
42
+ var MappingChars2StringEntries = Object.entries(MappingChars2String);
43
+ var SimpleMappingChars2String = {
44
+ "[": "_",
45
+ "]": "_",
46
+ "(": "_",
47
+ ")": "_",
48
+ "{": "_",
49
+ "}": "_",
50
+ "+": "a",
51
+ ",": "b",
52
+ ":": "c",
53
+ ".": "d",
54
+ "=": "e",
55
+ ";": "f",
56
+ ">": "g",
57
+ "#": "h",
58
+ "!": "i",
59
+ "@": "j",
60
+ "^": "k",
61
+ "<": "l",
62
+ "*": "m",
63
+ "&": "n",
64
+ "?": "o",
65
+ "%": "p",
66
+ "'": "q",
67
+ "$": "r",
68
+ "/": "s",
69
+ "~": "t",
70
+ "|": "u",
71
+ "`": "v",
72
+ "\\": "w",
73
+ '"': "x"
74
+ };
75
+ var SimpleMappingChars2StringEntries = Object.entries(SimpleMappingChars2String);
76
+ var MAX_ASCII_CHAR_CODE = 127;
77
+ function isPlainObject(value) {
78
+ if (value === null || typeof value !== "object") {
79
+ return false;
34
80
  }
35
- const currentClassPart = classParts[0];
36
- const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
37
- const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
38
- if (classGroupFromNextClassPart) {
39
- return classGroupFromNextClassPart;
81
+ const prototype = Object.getPrototypeOf(value);
82
+ if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
83
+ return false;
40
84
  }
41
- if (classPartObject.validators.length === 0) {
42
- return void 0;
85
+ if (Symbol.iterator in value) {
86
+ return false;
43
87
  }
44
- const classRest = classParts.join(CLASS_PART_SEPARATOR);
45
- return classPartObject.validators.find(({ validator }) => validator(classRest))?.classGroupId;
46
- }
47
- var arbitraryPropertyRegex = /^\[(.+)\]$/;
48
- function getGroupIdForArbitraryProperty(className) {
49
- if (arbitraryPropertyRegex.test(className)) {
50
- const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
51
- const property = arbitraryPropertyClassName?.substring(
52
- 0,
53
- arbitraryPropertyClassName.indexOf(":")
54
- );
55
- if (property) {
56
- return `arbitrary..${property}`;
57
- }
88
+ if (Symbol.toStringTag in value) {
89
+ return Object.prototype.toString.call(value) === "[object Module]";
58
90
  }
91
+ return true;
59
92
  }
60
- function createClassMap(config) {
61
- const { theme, prefix } = config;
62
- const classMap = {
63
- nextPart: /* @__PURE__ */ new Map(),
64
- validators: []
65
- };
66
- const prefixedClassGroupEntries = getPrefixedClassGroupEntries(
67
- Object.entries(config.classGroups),
68
- prefix
69
- );
70
- prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {
71
- processClassesRecursively(classGroup, classMap, classGroupId, theme);
72
- });
73
- return classMap;
74
- }
75
- function processClassesRecursively(classGroup, classPartObject, classGroupId, theme) {
76
- classGroup.forEach((classDefinition) => {
77
- if (typeof classDefinition === "string") {
78
- const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
79
- classPartObjectToEdit.classGroupId = classGroupId;
80
- return;
81
- }
82
- if (typeof classDefinition === "function") {
83
- if (isThemeGetter(classDefinition)) {
84
- processClassesRecursively(
85
- classDefinition(theme),
86
- classPartObject,
87
- classGroupId,
88
- theme
89
- );
90
- return;
91
- }
92
- classPartObject.validators.push({
93
- validator: classDefinition,
94
- classGroupId
95
- });
96
- return;
97
- }
98
- Object.entries(classDefinition).forEach(([key, classGroup2]) => {
99
- processClassesRecursively(
100
- classGroup2,
101
- getPart(classPartObject, key),
102
- classGroupId,
103
- theme
104
- );
105
- });
106
- });
107
- }
108
- function getPart(classPartObject, path) {
109
- let currentClassPartObject = classPartObject;
110
- path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
111
- if (!currentClassPartObject.nextPart.has(pathPart)) {
112
- currentClassPartObject.nextPart.set(pathPart, {
113
- nextPart: /* @__PURE__ */ new Map(),
114
- validators: []
115
- });
116
- }
117
- currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
118
- });
119
- return currentClassPartObject;
120
- }
121
- function isThemeGetter(func) {
122
- return func.isThemeGetter;
123
- }
124
- function getPrefixedClassGroupEntries(classGroupEntries, prefix) {
125
- if (!prefix) {
126
- return classGroupEntries;
93
+ function _defu(baseObject, defaults, namespace = ".", merger) {
94
+ if (!isPlainObject(defaults)) {
95
+ return _defu(baseObject, {}, namespace, merger);
127
96
  }
128
- return classGroupEntries.map(([classGroupId, classGroup]) => {
129
- const prefixedClassGroup = classGroup.map((classDefinition) => {
130
- if (typeof classDefinition === "string") {
131
- return prefix + classDefinition;
132
- }
133
- if (typeof classDefinition === "object") {
134
- return Object.fromEntries(
135
- Object.entries(classDefinition).map(([key, value]) => [prefix + key, value])
136
- );
137
- }
138
- return classDefinition;
139
- });
140
- return [classGroupId, prefixedClassGroup];
141
- });
142
- }
143
-
144
- // src/lib/lru-cache.ts
145
- function createLruCache(maxCacheSize) {
146
- if (maxCacheSize < 1) {
147
- return {
148
- get: () => void 0,
149
- set: () => {
150
- }
151
- };
152
- }
153
- let cacheSize = 0;
154
- let cache = /* @__PURE__ */ new Map();
155
- let previousCache = /* @__PURE__ */ new Map();
156
- const update = (key, value) => {
157
- cache.set(key, value);
158
- cacheSize++;
159
- if (cacheSize > maxCacheSize) {
160
- cacheSize = 0;
161
- previousCache = cache;
162
- cache = /* @__PURE__ */ new Map();
97
+ const object = Object.assign({}, defaults);
98
+ for (const key in baseObject) {
99
+ if (key === "__proto__" || key === "constructor") {
100
+ continue;
163
101
  }
164
- };
165
- return {
166
- get(key) {
167
- let value = cache.get(key);
168
- if (value !== void 0) {
169
- return value;
170
- }
171
- if ((value = previousCache.get(key)) !== void 0) {
172
- update(key, value);
173
- return value;
174
- }
175
- },
176
- set(key, value) {
177
- if (cache.has(key)) {
178
- cache.set(key, value);
179
- } else {
180
- update(key, value);
181
- }
102
+ const value = baseObject[key];
103
+ if (value === null || value === void 0) {
104
+ continue;
182
105
  }
183
- };
184
- }
185
-
186
- // src/lib/parse-class-name.ts
187
- var IMPORTANT_MODIFIER = "!";
188
- function createParseClassName(config) {
189
- const { separator, experimentalParseClassName } = config;
190
- const isSeparatorSingleCharacter = separator.length === 1;
191
- const firstSeparatorCharacter = separator[0];
192
- const separatorLength = separator.length;
193
- const parseClassName = (className) => {
194
- const modifiers = [];
195
- let bracketDepth = 0;
196
- let modifierStart = 0;
197
- let postfixModifierPosition;
198
- for (let index = 0; index < className.length; index++) {
199
- const currentCharacter = className[index];
200
- if (bracketDepth === 0) {
201
- if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {
202
- modifiers.push(className.slice(modifierStart, index));
203
- modifierStart = index + separatorLength;
204
- continue;
205
- }
206
- if (currentCharacter === "/") {
207
- postfixModifierPosition = index;
208
- continue;
209
- }
210
- }
211
- if (currentCharacter === "[") {
212
- bracketDepth++;
213
- } else if (currentCharacter === "]") {
214
- bracketDepth--;
215
- }
106
+ if (merger && merger(object, key, value, namespace)) {
107
+ continue;
216
108
  }
217
- const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
218
- const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);
219
- const baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;
220
- const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
221
- return {
222
- modifiers,
223
- hasImportantModifier,
224
- baseClassName,
225
- maybePostfixModifierPosition
226
- };
227
- };
228
- if (experimentalParseClassName) {
229
- return (className) => experimentalParseClassName({ className, parseClassName });
230
- }
231
- return parseClassName;
232
- }
233
- function sortModifiers(modifiers) {
234
- if (modifiers.length <= 1) {
235
- return modifiers;
236
- }
237
- const sortedModifiers = [];
238
- let unsortedModifiers = [];
239
- modifiers.forEach((modifier) => {
240
- const isArbitraryVariant = modifier[0] === "[";
241
- if (isArbitraryVariant) {
242
- sortedModifiers.push(...unsortedModifiers.sort(), modifier);
243
- unsortedModifiers = [];
109
+ if (Array.isArray(value) && Array.isArray(object[key])) {
110
+ object[key] = [...value, ...object[key]];
111
+ } else if (isPlainObject(value) && isPlainObject(object[key])) {
112
+ object[key] = _defu(
113
+ value,
114
+ object[key],
115
+ (namespace ? `${namespace}.` : "") + key.toString(),
116
+ merger
117
+ );
244
118
  } else {
245
- unsortedModifiers.push(modifier);
119
+ object[key] = value;
246
120
  }
247
- });
248
- sortedModifiers.push(...unsortedModifiers.sort());
249
- return sortedModifiers;
121
+ }
122
+ return object;
250
123
  }
251
-
252
- // src/lib/config-utils.ts
253
- function createConfigUtils(config) {
254
- return {
255
- cache: createLruCache(config.cacheSize),
256
- parseClassName: createParseClassName(config),
257
- ...createClassGroupUtils(config)
258
- };
124
+ function createDefu(merger) {
125
+ return (...arguments_) => (
126
+ // eslint-disable-next-line unicorn/no-array-reduce
127
+ arguments_.reduce((p, c) => _defu(p, c, "", merger), {})
128
+ );
259
129
  }
260
-
261
- // src/lib/merge-classlist.ts
262
- var SPLIT_CLASSES_REGEX = /\s+/;
263
- function mergeClassList(classList, configUtils) {
264
- const { parseClassName, getClassGroupId, getConflictingClassGroupIds } = configUtils;
265
- const classGroupsInConflict = [];
266
- const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
267
- let result = "";
268
- for (let index = classNames.length - 1; index >= 0; index -= 1) {
269
- const originalClassName = classNames[index];
270
- const { modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition } = parseClassName(originalClassName);
271
- let hasPostfixModifier = Boolean(maybePostfixModifierPosition);
272
- let classGroupId = getClassGroupId(
273
- hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName
274
- );
275
- if (!classGroupId) {
276
- if (!hasPostfixModifier) {
277
- result = originalClassName + (result.length > 0 ? ` ${result}` : result);
278
- continue;
279
- }
280
- classGroupId = getClassGroupId(baseClassName);
281
- if (!classGroupId) {
282
- result = originalClassName + (result.length > 0 ? ` ${result}` : result);
283
- continue;
284
- }
285
- hasPostfixModifier = false;
286
- }
287
- const variantModifier = sortModifiers(modifiers).join(":");
288
- const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
289
- const classId = modifierId + classGroupId;
290
- if (classGroupsInConflict.includes(classId)) {
291
- continue;
130
+ var defu = createDefu();
131
+ function isAsciiNumber(code) {
132
+ return code >= 48 && code <= 57;
133
+ }
134
+ function handleFirstCharacter(char, nextChar, ignoreHead) {
135
+ if (!ignoreHead) {
136
+ const code = char.codePointAt(0);
137
+ if (isAsciiNumber(code)) {
138
+ return `_${char}`;
292
139
  }
293
- classGroupsInConflict.push(classId);
294
- const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
295
- for (let i = 0; i < conflictGroups.length; ++i) {
296
- const group = conflictGroups[i];
297
- classGroupsInConflict.push(modifierId + group);
140
+ if (char === "-" && nextChar && isAsciiNumber(nextChar.codePointAt(0))) {
141
+ return `_${char}`;
298
142
  }
299
- result = originalClassName + (result.length > 0 ? ` ${result}` : result);
300
- }
301
- return result;
302
- }
303
-
304
- // src/lib/tw-join.ts
305
- function twJoin() {
306
- let index = 0;
307
- let argument;
308
- let resolvedValue;
309
- let string = "";
310
- while (index < arguments.length) {
311
- if (argument = arguments[index++]) {
312
- if (resolvedValue = toValue(argument)) {
313
- string && (string += " ");
314
- string += resolvedValue;
315
- }
143
+ if (char === "-" && nextChar === void 0) {
144
+ return `_${char}`;
316
145
  }
317
146
  }
318
- return string;
147
+ return char;
319
148
  }
320
- function toValue(mix) {
321
- if (typeof mix === "string") {
322
- return mix;
149
+ function escape(selectors, options) {
150
+ if (selectors.length === 0) {
151
+ return "";
323
152
  }
324
- let resolvedValue;
325
- let string = "";
326
- for (let k = 0; k < mix.length; k++) {
327
- if (mix[k]) {
328
- if (resolvedValue = toValue(mix[k])) {
329
- string && (string += " ");
330
- string += resolvedValue;
153
+ const { map, ignoreHead } = defu(options, {
154
+ map: SimpleMappingChars2String,
155
+ ignoreHead: false
156
+ });
157
+ const sb = [];
158
+ for (let i = 0; i < selectors.length; i++) {
159
+ const char = selectors[i];
160
+ const code = char.codePointAt(0);
161
+ if (code !== void 0) {
162
+ if (code > MAX_ASCII_CHAR_CODE) {
163
+ sb.push(`u${code.toString(16)}`);
164
+ } else {
165
+ const hit = map[char];
166
+ if (hit) {
167
+ sb.push(hit);
168
+ } else if (i === 0) {
169
+ sb.push(handleFirstCharacter(char, selectors[i + 1], ignoreHead));
170
+ } else {
171
+ sb.push(char);
172
+ }
331
173
  }
332
174
  }
333
175
  }
334
- return string;
176
+ return sb.join("");
335
177
  }
336
178
 
337
- // src/lib/create-tailwind-merge.ts
338
- function createTailwindMerge(createConfigFirst, ...createConfigRest) {
339
- let configUtils;
340
- let cacheGet;
341
- let cacheSet;
342
- let functionToCall = initTailwindMerge;
343
- function initTailwindMerge(classList) {
344
- const config = createConfigRest.reduce(
345
- (previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig),
346
- createConfigFirst()
347
- );
348
- configUtils = createConfigUtils(config);
349
- cacheGet = configUtils.cache.get;
350
- cacheSet = configUtils.cache.set;
351
- functionToCall = tailwindMerge;
352
- return tailwindMerge(classList);
179
+ // ../weapp-tailwindcss/dist/chunk-U7O2XXYR.mjs
180
+ function replaceWxml(original, options = {
181
+ keepEOL: false,
182
+ escapeMap: SimpleMappingChars2String
183
+ }) {
184
+ const { keepEOL, escapeMap, mangleContext, ignoreHead } = options;
185
+ let res = original;
186
+ if (!keepEOL) {
187
+ res = res.replaceAll(/[\n\r]+/g, "");
353
188
  }
354
- function tailwindMerge(classList) {
355
- const cachedResult = cacheGet(classList);
356
- if (cachedResult) {
357
- return cachedResult;
358
- }
359
- const result = mergeClassList(classList, configUtils);
360
- cacheSet(classList, result);
361
- return result;
189
+ if (mangleContext) {
190
+ res = mangleContext.wxmlHandler(res);
362
191
  }
363
- return function callTailwindMerge() {
364
- return functionToCall(twJoin.apply(null, arguments));
365
- };
366
- }
367
-
368
- // src/lib/from-theme.ts
369
- function fromTheme(key) {
370
- const themeGetter = (theme) => theme[key] || [];
371
- themeGetter.isThemeGetter = true;
372
- return themeGetter;
192
+ res = escape(res, {
193
+ map: escapeMap,
194
+ ignoreHead
195
+ });
196
+ return res;
373
197
  }
374
198
 
375
- // src/lib/validators.ts
376
- var validators_exports = {};
377
- __export(validators_exports, {
378
- isAny: () => isAny,
379
- isArbitraryImage: () => isArbitraryImage,
380
- isArbitraryLength: () => isArbitraryLength,
381
- isArbitraryNumber: () => isArbitraryNumber,
382
- isArbitraryPosition: () => isArbitraryPosition,
383
- isArbitraryShadow: () => isArbitraryShadow,
384
- isArbitrarySize: () => isArbitrarySize,
385
- isArbitraryValue: () => isArbitraryValue,
386
- isInteger: () => isInteger,
387
- isLength: () => isLength,
388
- isNumber: () => isNumber,
389
- isPercent: () => isPercent,
390
- isTshirtSize: () => isTshirtSize
391
- });
392
- var arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
393
- var fractionRegex = /^\d+\/\d+$/;
394
- var stringLengths = /* @__PURE__ */ new Set(["px", "full", "screen"]);
395
- var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
396
- var lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq([whib]|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
397
- var colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
398
- var shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
399
- var imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
400
- function isLength(value) {
401
- return isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);
402
- }
403
- function isArbitraryLength(value) {
404
- return getIsArbitraryValue(value, "length", isLengthOnly);
405
- }
406
- var isNumber = (value) => Boolean(value) && !Number.isNaN(Number(value));
407
- var isArbitraryNumber = (value) => getIsArbitraryValue(value, "number", isNumber);
408
- var isInteger = (value) => Boolean(value) && Number.isInteger(Number(value));
409
- var isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
410
- var isArbitraryValue = (value) => arbitraryValueRegex.test(value);
411
- var isTshirtSize = (value) => tshirtUnitRegex.test(value);
412
- var sizeLabels = /* @__PURE__ */ new Set(["length", "size", "percentage"]);
413
- var isArbitrarySize = (value) => getIsArbitraryValue(value, sizeLabels, isNever);
414
- function isArbitraryPosition(value) {
415
- return getIsArbitraryValue(value, "position", isNever);
416
- }
417
- var imageLabels = /* @__PURE__ */ new Set(["image", "url"]);
418
- var isArbitraryImage = (value) => getIsArbitraryValue(value, imageLabels, isImage);
419
- var isArbitraryShadow = (value) => getIsArbitraryValue(value, "", isShadow);
420
- var isAny = () => true;
421
- function getIsArbitraryValue(value, label, testValue) {
422
- const result = arbitraryValueRegex.exec(value);
423
- if (result) {
424
- if (result[1]) {
425
- return typeof label === "string" ? result[1] === label : label.has(result[1]);
426
- }
427
- return testValue(result[2]);
428
- }
429
- return false;
430
- }
431
- function isLengthOnly(value) {
432
- return lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
433
- }
434
- var isNever = () => false;
435
- var isShadow = (value) => shadowRegex.test(value);
436
- var isImage = (value) => imageRegex.test(value);
199
+ // ../weapp-tailwindcss/dist/escape.mjs
200
+ var weappTwIgnore = String.raw;
437
201
 
438
- // src/lib/default-config.ts
439
- function getDefaultConfig() {
440
- const colors = fromTheme("colors");
441
- const spacing = fromTheme("spacing");
442
- const blur = fromTheme("blur");
443
- const brightness = fromTheme("brightness");
444
- const borderColor = fromTheme("borderColor");
445
- const borderRadius = fromTheme("borderRadius");
446
- const borderSpacing = fromTheme("borderSpacing");
447
- const borderWidth = fromTheme("borderWidth");
448
- const contrast = fromTheme("contrast");
449
- const grayscale = fromTheme("grayscale");
450
- const hueRotate = fromTheme("hueRotate");
451
- const invert = fromTheme("invert");
452
- const gap = fromTheme("gap");
453
- const gradientColorStops = fromTheme("gradientColorStops");
454
- const gradientColorStopPositions = fromTheme("gradientColorStopPositions");
455
- const inset = fromTheme("inset");
456
- const margin = fromTheme("margin");
457
- const opacity = fromTheme("opacity");
458
- const padding = fromTheme("padding");
459
- const saturate = fromTheme("saturate");
460
- const scale = fromTheme("scale");
461
- const sepia = fromTheme("sepia");
462
- const skew = fromTheme("skew");
463
- const space = fromTheme("space");
464
- const translate = fromTheme("translate");
465
- const getOverscroll = () => ["auto", "contain", "none"];
466
- const getOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
467
- const getSpacingWithAutoAndArbitrary = () => ["auto", isArbitraryValue, spacing];
468
- const getSpacingWithArbitrary = () => [isArbitraryValue, spacing];
469
- const getLengthWithEmptyAndArbitrary = () => ["", isLength, isArbitraryLength];
470
- const getNumberWithAutoAndArbitrary = () => ["auto", isNumber, isArbitraryValue];
471
- const getPositions = () => [
472
- "bottom",
473
- "center",
474
- "left",
475
- "left-bottom",
476
- "left-top",
477
- "right",
478
- "right-bottom",
479
- "right-top",
480
- "top"
481
- ];
482
- const getLineStyles = () => ["solid", "dashed", "dotted", "double", "none"];
483
- const getBlendModes = () => [
484
- "normal",
485
- "multiply",
486
- "screen",
487
- "overlay",
488
- "darken",
489
- "lighten",
490
- "color-dodge",
491
- "color-burn",
492
- "hard-light",
493
- "soft-light",
494
- "difference",
495
- "exclusion",
496
- "hue",
497
- "saturation",
498
- "color",
499
- "luminosity"
500
- ];
501
- const getAlign = () => ["start", "end", "center", "between", "around", "evenly", "stretch"];
502
- const getZeroAndEmpty = () => ["", "0", isArbitraryValue];
503
- const getBreaks = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
504
- const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];
505
- return {
506
- cacheSize: 500,
507
- separator: ":",
508
- theme: {
509
- colors: [isAny],
510
- spacing: [isLength, isArbitraryLength],
511
- blur: ["none", "", isTshirtSize, isArbitraryValue],
512
- brightness: getNumberAndArbitrary(),
513
- borderColor: [colors],
514
- borderRadius: ["none", "", "full", isTshirtSize, isArbitraryValue],
515
- borderSpacing: getSpacingWithArbitrary(),
516
- borderWidth: getLengthWithEmptyAndArbitrary(),
517
- contrast: getNumberAndArbitrary(),
518
- grayscale: getZeroAndEmpty(),
519
- hueRotate: getNumberAndArbitrary(),
520
- invert: getZeroAndEmpty(),
521
- gap: getSpacingWithArbitrary(),
522
- gradientColorStops: [colors],
523
- gradientColorStopPositions: [isPercent, isArbitraryLength],
524
- inset: getSpacingWithAutoAndArbitrary(),
525
- margin: getSpacingWithAutoAndArbitrary(),
526
- opacity: getNumberAndArbitrary(),
527
- padding: getSpacingWithArbitrary(),
528
- saturate: getNumberAndArbitrary(),
529
- scale: getNumberAndArbitrary(),
530
- sepia: getZeroAndEmpty(),
531
- skew: getNumberAndArbitrary(),
532
- space: getSpacingWithArbitrary(),
533
- translate: getSpacingWithArbitrary()
534
- },
535
- classGroups: {
536
- // Layout
537
- /**
538
- * Aspect Ratio
539
- * @see https://tailwindcss.com/docs/aspect-ratio
540
- */
541
- "aspect": [{ aspect: ["auto", "square", "video", isArbitraryValue] }],
542
- /**
543
- * Container
544
- * @see https://tailwindcss.com/docs/container
545
- */
546
- "container": ["container"],
547
- /**
548
- * Columns
549
- * @see https://tailwindcss.com/docs/columns
550
- */
551
- "columns": [{ columns: [isTshirtSize] }],
552
- /**
553
- * Break After
554
- * @see https://tailwindcss.com/docs/break-after
555
- */
556
- "break-after": [{ "break-after": getBreaks() }],
557
- /**
558
- * Break Before
559
- * @see https://tailwindcss.com/docs/break-before
560
- */
561
- "break-before": [{ "break-before": getBreaks() }],
562
- /**
563
- * Break Inside
564
- * @see https://tailwindcss.com/docs/break-inside
565
- */
566
- "break-inside": [{ "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"] }],
567
- /**
568
- * Box Decoration Break
569
- * @see https://tailwindcss.com/docs/box-decoration-break
570
- */
571
- "box-decoration": [{ "box-decoration": ["slice", "clone"] }],
572
- /**
573
- * Box Sizing
574
- * @see https://tailwindcss.com/docs/box-sizing
575
- */
576
- "box": [{ box: ["border", "content"] }],
577
- /**
578
- * Display
579
- * @see https://tailwindcss.com/docs/display
580
- */
581
- "display": [
582
- "block",
583
- "inline-block",
584
- "inline",
585
- "flex",
586
- "inline-flex",
587
- "table",
588
- "inline-table",
589
- "table-caption",
590
- "table-cell",
591
- "table-column",
592
- "table-column-group",
593
- "table-footer-group",
594
- "table-header-group",
595
- "table-row-group",
596
- "table-row",
597
- "flow-root",
598
- "grid",
599
- "inline-grid",
600
- "contents",
601
- "list-item",
602
- "hidden"
603
- ],
604
- /**
605
- * Floats
606
- * @see https://tailwindcss.com/docs/float
607
- */
608
- "float": [{ float: ["right", "left", "none", "start", "end"] }],
609
- /**
610
- * Clear
611
- * @see https://tailwindcss.com/docs/clear
612
- */
613
- "clear": [{ clear: ["left", "right", "both", "none", "start", "end"] }],
614
- /**
615
- * Isolation
616
- * @see https://tailwindcss.com/docs/isolation
617
- */
618
- "isolation": ["isolate", "isolation-auto"],
619
- /**
620
- * Object Fit
621
- * @see https://tailwindcss.com/docs/object-fit
622
- */
623
- "object-fit": [{ object: ["contain", "cover", "fill", "none", "scale-down"] }],
624
- /**
625
- * Object Position
626
- * @see https://tailwindcss.com/docs/object-position
627
- */
628
- "object-position": [{ object: [...getPositions(), isArbitraryValue] }],
629
- /**
630
- * Overflow
631
- * @see https://tailwindcss.com/docs/overflow
632
- */
633
- "overflow": [{ overflow: getOverflow() }],
634
- /**
635
- * Overflow X
636
- * @see https://tailwindcss.com/docs/overflow
637
- */
638
- "overflow-x": [{ "overflow-x": getOverflow() }],
639
- /**
640
- * Overflow Y
641
- * @see https://tailwindcss.com/docs/overflow
642
- */
643
- "overflow-y": [{ "overflow-y": getOverflow() }],
644
- /**
645
- * Overscroll Behavior
646
- * @see https://tailwindcss.com/docs/overscroll-behavior
647
- */
648
- "overscroll": [{ overscroll: getOverscroll() }],
649
- /**
650
- * Overscroll Behavior X
651
- * @see https://tailwindcss.com/docs/overscroll-behavior
652
- */
653
- "overscroll-x": [{ "overscroll-x": getOverscroll() }],
654
- /**
655
- * Overscroll Behavior Y
656
- * @see https://tailwindcss.com/docs/overscroll-behavior
657
- */
658
- "overscroll-y": [{ "overscroll-y": getOverscroll() }],
659
- /**
660
- * Position
661
- * @see https://tailwindcss.com/docs/position
662
- */
663
- "position": ["static", "fixed", "absolute", "relative", "sticky"],
664
- /**
665
- * Top / Right / Bottom / Left
666
- * @see https://tailwindcss.com/docs/top-right-bottom-left
667
- */
668
- "inset": [{ inset: [inset] }],
669
- /**
670
- * Right / Left
671
- * @see https://tailwindcss.com/docs/top-right-bottom-left
672
- */
673
- "inset-x": [{ "inset-x": [inset] }],
674
- /**
675
- * Top / Bottom
676
- * @see https://tailwindcss.com/docs/top-right-bottom-left
677
- */
678
- "inset-y": [{ "inset-y": [inset] }],
679
- /**
680
- * Start
681
- * @see https://tailwindcss.com/docs/top-right-bottom-left
682
- */
683
- "start": [{ start: [inset] }],
684
- /**
685
- * End
686
- * @see https://tailwindcss.com/docs/top-right-bottom-left
687
- */
688
- "end": [{ end: [inset] }],
689
- /**
690
- * Top
691
- * @see https://tailwindcss.com/docs/top-right-bottom-left
692
- */
693
- "top": [{ top: [inset] }],
694
- /**
695
- * Right
696
- * @see https://tailwindcss.com/docs/top-right-bottom-left
697
- */
698
- "right": [{ right: [inset] }],
699
- /**
700
- * Bottom
701
- * @see https://tailwindcss.com/docs/top-right-bottom-left
702
- */
703
- "bottom": [{ bottom: [inset] }],
704
- /**
705
- * Left
706
- * @see https://tailwindcss.com/docs/top-right-bottom-left
707
- */
708
- "left": [{ left: [inset] }],
709
- /**
710
- * Visibility
711
- * @see https://tailwindcss.com/docs/visibility
712
- */
713
- "visibility": ["visible", "invisible", "collapse"],
714
- /**
715
- * Z-Index
716
- * @see https://tailwindcss.com/docs/z-index
717
- */
718
- "z": [{ z: ["auto", isInteger, isArbitraryValue] }],
719
- // Flexbox and Grid
720
- /**
721
- * Flex Basis
722
- * @see https://tailwindcss.com/docs/flex-basis
723
- */
724
- "basis": [{ basis: getSpacingWithAutoAndArbitrary() }],
725
- /**
726
- * Flex Direction
727
- * @see https://tailwindcss.com/docs/flex-direction
728
- */
729
- "flex-direction": [{ flex: ["row", "row-reverse", "col", "col-reverse"] }],
730
- /**
731
- * Flex Wrap
732
- * @see https://tailwindcss.com/docs/flex-wrap
733
- */
734
- "flex-wrap": [{ flex: ["wrap", "wrap-reverse", "nowrap"] }],
735
- /**
736
- * Flex
737
- * @see https://tailwindcss.com/docs/flex
738
- */
739
- "flex": [{ flex: ["1", "auto", "initial", "none", isArbitraryValue] }],
740
- /**
741
- * Flex Grow
742
- * @see https://tailwindcss.com/docs/flex-grow
743
- */
744
- "grow": [{ grow: getZeroAndEmpty() }],
745
- /**
746
- * Flex Shrink
747
- * @see https://tailwindcss.com/docs/flex-shrink
748
- */
749
- "shrink": [{ shrink: getZeroAndEmpty() }],
750
- /**
751
- * Order
752
- * @see https://tailwindcss.com/docs/order
753
- */
754
- "order": [{ order: ["first", "last", "none", isInteger, isArbitraryValue] }],
755
- /**
756
- * Grid Template Columns
757
- * @see https://tailwindcss.com/docs/grid-template-columns
758
- */
759
- "grid-cols": [{ "grid-cols": [isAny] }],
760
- /**
761
- * Grid Column Start / End
762
- * @see https://tailwindcss.com/docs/grid-column
763
- */
764
- "col-start-end": [
765
- {
766
- col: [
767
- "auto",
768
- { span: ["full", isInteger, isArbitraryValue] },
769
- isArbitraryValue
770
- ]
771
- }
772
- ],
773
- /**
774
- * Grid Column Start
775
- * @see https://tailwindcss.com/docs/grid-column
776
- */
777
- "col-start": [{ "col-start": getNumberWithAutoAndArbitrary() }],
778
- /**
779
- * Grid Column End
780
- * @see https://tailwindcss.com/docs/grid-column
781
- */
782
- "col-end": [{ "col-end": getNumberWithAutoAndArbitrary() }],
783
- /**
784
- * Grid Template Rows
785
- * @see https://tailwindcss.com/docs/grid-template-rows
786
- */
787
- "grid-rows": [{ "grid-rows": [isAny] }],
788
- /**
789
- * Grid Row Start / End
790
- * @see https://tailwindcss.com/docs/grid-row
791
- */
792
- "row-start-end": [
793
- { row: ["auto", { span: [isInteger, isArbitraryValue] }, isArbitraryValue] }
794
- ],
795
- /**
796
- * Grid Row Start
797
- * @see https://tailwindcss.com/docs/grid-row
798
- */
799
- "row-start": [{ "row-start": getNumberWithAutoAndArbitrary() }],
800
- /**
801
- * Grid Row End
802
- * @see https://tailwindcss.com/docs/grid-row
803
- */
804
- "row-end": [{ "row-end": getNumberWithAutoAndArbitrary() }],
805
- /**
806
- * Grid Auto Flow
807
- * @see https://tailwindcss.com/docs/grid-auto-flow
808
- */
809
- "grid-flow": [{ "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"] }],
810
- /**
811
- * Grid Auto Columns
812
- * @see https://tailwindcss.com/docs/grid-auto-columns
813
- */
814
- "auto-cols": [{ "auto-cols": ["auto", "min", "max", "fr", isArbitraryValue] }],
815
- /**
816
- * Grid Auto Rows
817
- * @see https://tailwindcss.com/docs/grid-auto-rows
818
- */
819
- "auto-rows": [{ "auto-rows": ["auto", "min", "max", "fr", isArbitraryValue] }],
820
- /**
821
- * Gap
822
- * @see https://tailwindcss.com/docs/gap
823
- */
824
- "gap": [{ gap: [gap] }],
825
- /**
826
- * Gap X
827
- * @see https://tailwindcss.com/docs/gap
828
- */
829
- "gap-x": [{ "gap-x": [gap] }],
830
- /**
831
- * Gap Y
832
- * @see https://tailwindcss.com/docs/gap
833
- */
834
- "gap-y": [{ "gap-y": [gap] }],
835
- /**
836
- * Justify Content
837
- * @see https://tailwindcss.com/docs/justify-content
838
- */
839
- "justify-content": [{ justify: ["normal", ...getAlign()] }],
840
- /**
841
- * Justify Items
842
- * @see https://tailwindcss.com/docs/justify-items
843
- */
844
- "justify-items": [{ "justify-items": ["start", "end", "center", "stretch"] }],
845
- /**
846
- * Justify Self
847
- * @see https://tailwindcss.com/docs/justify-self
848
- */
849
- "justify-self": [{ "justify-self": ["auto", "start", "end", "center", "stretch"] }],
850
- /**
851
- * Align Content
852
- * @see https://tailwindcss.com/docs/align-content
853
- */
854
- "align-content": [{ content: ["normal", ...getAlign(), "baseline"] }],
855
- /**
856
- * Align Items
857
- * @see https://tailwindcss.com/docs/align-items
858
- */
859
- "align-items": [{ items: ["start", "end", "center", "baseline", "stretch"] }],
860
- /**
861
- * Align Self
862
- * @see https://tailwindcss.com/docs/align-self
863
- */
864
- "align-self": [{ self: ["auto", "start", "end", "center", "stretch", "baseline"] }],
865
- /**
866
- * Place Content
867
- * @see https://tailwindcss.com/docs/place-content
868
- */
869
- "place-content": [{ "place-content": [...getAlign(), "baseline"] }],
870
- /**
871
- * Place Items
872
- * @see https://tailwindcss.com/docs/place-items
873
- */
874
- "place-items": [{ "place-items": ["start", "end", "center", "baseline", "stretch"] }],
875
- /**
876
- * Place Self
877
- * @see https://tailwindcss.com/docs/place-self
878
- */
879
- "place-self": [{ "place-self": ["auto", "start", "end", "center", "stretch"] }],
880
- // Spacing
881
- /**
882
- * Padding
883
- * @see https://tailwindcss.com/docs/padding
884
- */
885
- "p": [{ p: [padding] }],
886
- /**
887
- * Padding X
888
- * @see https://tailwindcss.com/docs/padding
889
- */
890
- "px": [{ px: [padding] }],
891
- /**
892
- * Padding Y
893
- * @see https://tailwindcss.com/docs/padding
894
- */
895
- "py": [{ py: [padding] }],
896
- /**
897
- * Padding Start
898
- * @see https://tailwindcss.com/docs/padding
899
- */
900
- "ps": [{ ps: [padding] }],
901
- /**
902
- * Padding End
903
- * @see https://tailwindcss.com/docs/padding
904
- */
905
- "pe": [{ pe: [padding] }],
906
- /**
907
- * Padding Top
908
- * @see https://tailwindcss.com/docs/padding
909
- */
910
- "pt": [{ pt: [padding] }],
911
- /**
912
- * Padding Right
913
- * @see https://tailwindcss.com/docs/padding
914
- */
915
- "pr": [{ pr: [padding] }],
916
- /**
917
- * Padding Bottom
918
- * @see https://tailwindcss.com/docs/padding
919
- */
920
- "pb": [{ pb: [padding] }],
921
- /**
922
- * Padding Left
923
- * @see https://tailwindcss.com/docs/padding
924
- */
925
- "pl": [{ pl: [padding] }],
926
- /**
927
- * Margin
928
- * @see https://tailwindcss.com/docs/margin
929
- */
930
- "m": [{ m: [margin] }],
931
- /**
932
- * Margin X
933
- * @see https://tailwindcss.com/docs/margin
934
- */
935
- "mx": [{ mx: [margin] }],
936
- /**
937
- * Margin Y
938
- * @see https://tailwindcss.com/docs/margin
939
- */
940
- "my": [{ my: [margin] }],
941
- /**
942
- * Margin Start
943
- * @see https://tailwindcss.com/docs/margin
944
- */
945
- "ms": [{ ms: [margin] }],
946
- /**
947
- * Margin End
948
- * @see https://tailwindcss.com/docs/margin
949
- */
950
- "me": [{ me: [margin] }],
951
- /**
952
- * Margin Top
953
- * @see https://tailwindcss.com/docs/margin
954
- */
955
- "mt": [{ mt: [margin] }],
956
- /**
957
- * Margin Right
958
- * @see https://tailwindcss.com/docs/margin
959
- */
960
- "mr": [{ mr: [margin] }],
961
- /**
962
- * Margin Bottom
963
- * @see https://tailwindcss.com/docs/margin
964
- */
965
- "mb": [{ mb: [margin] }],
966
- /**
967
- * Margin Left
968
- * @see https://tailwindcss.com/docs/margin
969
- */
970
- "ml": [{ ml: [margin] }],
971
- /**
972
- * Space Between X
973
- * @see https://tailwindcss.com/docs/space
974
- */
975
- "space-x": [{ "space-x": [space] }],
976
- /**
977
- * Space Between X Reverse
978
- * @see https://tailwindcss.com/docs/space
979
- */
980
- "space-x-reverse": ["space-x-reverse"],
981
- /**
982
- * Space Between Y
983
- * @see https://tailwindcss.com/docs/space
984
- */
985
- "space-y": [{ "space-y": [space] }],
986
- /**
987
- * Space Between Y Reverse
988
- * @see https://tailwindcss.com/docs/space
989
- */
990
- "space-y-reverse": ["space-y-reverse"],
991
- // Sizing
992
- /**
993
- * Width
994
- * @see https://tailwindcss.com/docs/width
995
- */
996
- "w": [
997
- {
998
- w: [
999
- "auto",
1000
- "min",
1001
- "max",
1002
- "fit",
1003
- "svw",
1004
- "lvw",
1005
- "dvw",
1006
- isArbitraryValue,
1007
- spacing
1008
- ]
1009
- }
1010
- ],
1011
- /**
1012
- * Min-Width
1013
- * @see https://tailwindcss.com/docs/min-width
1014
- */
1015
- "min-w": [{ "min-w": [isArbitraryValue, spacing, "min", "max", "fit"] }],
1016
- /**
1017
- * Max-Width
1018
- * @see https://tailwindcss.com/docs/max-width
1019
- */
1020
- "max-w": [
1021
- {
1022
- "max-w": [
1023
- isArbitraryValue,
1024
- spacing,
1025
- "none",
1026
- "full",
1027
- "min",
1028
- "max",
1029
- "fit",
1030
- "prose",
1031
- { screen: [isTshirtSize] },
1032
- isTshirtSize
1033
- ]
1034
- }
1035
- ],
1036
- /**
1037
- * Height
1038
- * @see https://tailwindcss.com/docs/height
1039
- */
1040
- "h": [
1041
- {
1042
- h: [
1043
- isArbitraryValue,
1044
- spacing,
1045
- "auto",
1046
- "min",
1047
- "max",
1048
- "fit",
1049
- "svh",
1050
- "lvh",
1051
- "dvh"
1052
- ]
1053
- }
1054
- ],
1055
- /**
1056
- * Min-Height
1057
- * @see https://tailwindcss.com/docs/min-height
1058
- */
1059
- "min-h": [
1060
- { "min-h": [isArbitraryValue, spacing, "min", "max", "fit", "svh", "lvh", "dvh"] }
1061
- ],
1062
- /**
1063
- * Max-Height
1064
- * @see https://tailwindcss.com/docs/max-height
1065
- */
1066
- "max-h": [
1067
- { "max-h": [isArbitraryValue, spacing, "min", "max", "fit", "svh", "lvh", "dvh"] }
1068
- ],
1069
- /**
1070
- * Size
1071
- * @see https://tailwindcss.com/docs/size
1072
- */
1073
- "size": [{ size: [isArbitraryValue, spacing, "auto", "min", "max", "fit"] }],
1074
- // Typography
1075
- /**
1076
- * Font Size
1077
- * @see https://tailwindcss.com/docs/font-size
1078
- */
1079
- "font-size": [{ text: ["base", isTshirtSize, isArbitraryLength] }],
1080
- /**
1081
- * Font Smoothing
1082
- * @see https://tailwindcss.com/docs/font-smoothing
1083
- */
1084
- "font-smoothing": ["antialiased", "subpixel-antialiased"],
1085
- /**
1086
- * Font Style
1087
- * @see https://tailwindcss.com/docs/font-style
1088
- */
1089
- "font-style": ["italic", "not-italic"],
1090
- /**
1091
- * Font Weight
1092
- * @see https://tailwindcss.com/docs/font-weight
1093
- */
1094
- "font-weight": [
1095
- {
1096
- font: [
1097
- "thin",
1098
- "extralight",
1099
- "light",
1100
- "normal",
1101
- "medium",
1102
- "semibold",
1103
- "bold",
1104
- "extrabold",
1105
- "black",
1106
- isArbitraryNumber
1107
- ]
1108
- }
1109
- ],
1110
- /**
1111
- * Font Family
1112
- * @see https://tailwindcss.com/docs/font-family
1113
- */
1114
- "font-family": [{ font: [isAny] }],
1115
- /**
1116
- * Font Variant Numeric
1117
- * @see https://tailwindcss.com/docs/font-variant-numeric
1118
- */
1119
- "fvn-normal": ["normal-nums"],
1120
- /**
1121
- * Font Variant Numeric
1122
- * @see https://tailwindcss.com/docs/font-variant-numeric
1123
- */
1124
- "fvn-ordinal": ["ordinal"],
1125
- /**
1126
- * Font Variant Numeric
1127
- * @see https://tailwindcss.com/docs/font-variant-numeric
1128
- */
1129
- "fvn-slashed-zero": ["slashed-zero"],
1130
- /**
1131
- * Font Variant Numeric
1132
- * @see https://tailwindcss.com/docs/font-variant-numeric
1133
- */
1134
- "fvn-figure": ["lining-nums", "oldstyle-nums"],
1135
- /**
1136
- * Font Variant Numeric
1137
- * @see https://tailwindcss.com/docs/font-variant-numeric
1138
- */
1139
- "fvn-spacing": ["proportional-nums", "tabular-nums"],
1140
- /**
1141
- * Font Variant Numeric
1142
- * @see https://tailwindcss.com/docs/font-variant-numeric
1143
- */
1144
- "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
1145
- /**
1146
- * Letter Spacing
1147
- * @see https://tailwindcss.com/docs/letter-spacing
1148
- */
1149
- "tracking": [
1150
- {
1151
- tracking: [
1152
- "tighter",
1153
- "tight",
1154
- "normal",
1155
- "wide",
1156
- "wider",
1157
- "widest",
1158
- isArbitraryValue
1159
- ]
1160
- }
1161
- ],
1162
- /**
1163
- * Line Clamp
1164
- * @see https://tailwindcss.com/docs/line-clamp
1165
- */
1166
- "line-clamp": [{ "line-clamp": ["none", isNumber, isArbitraryNumber] }],
1167
- /**
1168
- * Line Height
1169
- * @see https://tailwindcss.com/docs/line-height
1170
- */
1171
- "leading": [
1172
- {
1173
- leading: [
1174
- "none",
1175
- "tight",
1176
- "snug",
1177
- "normal",
1178
- "relaxed",
1179
- "loose",
1180
- isLength,
1181
- isArbitraryValue
1182
- ]
1183
- }
1184
- ],
1185
- /**
1186
- * List Style Image
1187
- * @see https://tailwindcss.com/docs/list-style-image
1188
- */
1189
- "list-image": [{ "list-image": ["none", isArbitraryValue] }],
1190
- /**
1191
- * List Style Type
1192
- * @see https://tailwindcss.com/docs/list-style-type
1193
- */
1194
- "list-style-type": [{ list: ["none", "disc", "decimal", isArbitraryValue] }],
1195
- /**
1196
- * List Style Position
1197
- * @see https://tailwindcss.com/docs/list-style-position
1198
- */
1199
- "list-style-position": [{ list: ["inside", "outside"] }],
1200
- /**
1201
- * Placeholder Color
1202
- * @deprecated since Tailwind CSS v3.0.0
1203
- * @see https://tailwindcss.com/docs/placeholder-color
1204
- */
1205
- "placeholder-color": [{ placeholder: [colors] }],
1206
- /**
1207
- * Placeholder Opacity
1208
- * @see https://tailwindcss.com/docs/placeholder-opacity
1209
- */
1210
- "placeholder-opacity": [{ "placeholder-opacity": [opacity] }],
1211
- /**
1212
- * Text Alignment
1213
- * @see https://tailwindcss.com/docs/text-align
1214
- */
1215
- "text-alignment": [{ text: ["left", "center", "right", "justify", "start", "end"] }],
1216
- /**
1217
- * Text Color
1218
- * @see https://tailwindcss.com/docs/text-color
1219
- */
1220
- "text-color": [{ text: [colors] }],
1221
- /**
1222
- * Text Opacity
1223
- * @see https://tailwindcss.com/docs/text-opacity
1224
- */
1225
- "text-opacity": [{ "text-opacity": [opacity] }],
1226
- /**
1227
- * Text Decoration
1228
- * @see https://tailwindcss.com/docs/text-decoration
1229
- */
1230
- "text-decoration": ["underline", "overline", "line-through", "no-underline"],
1231
- /**
1232
- * Text Decoration Style
1233
- * @see https://tailwindcss.com/docs/text-decoration-style
1234
- */
1235
- "text-decoration-style": [{ decoration: [...getLineStyles(), "wavy"] }],
1236
- /**
1237
- * Text Decoration Thickness
1238
- * @see https://tailwindcss.com/docs/text-decoration-thickness
1239
- */
1240
- "text-decoration-thickness": [
1241
- { decoration: ["auto", "from-font", isLength, isArbitraryLength] }
1242
- ],
1243
- /**
1244
- * Text Underline Offset
1245
- * @see https://tailwindcss.com/docs/text-underline-offset
1246
- */
1247
- "underline-offset": [{ "underline-offset": ["auto", isLength, isArbitraryValue] }],
1248
- /**
1249
- * Text Decoration Color
1250
- * @see https://tailwindcss.com/docs/text-decoration-color
1251
- */
1252
- "text-decoration-color": [{ decoration: [colors] }],
1253
- /**
1254
- * Text Transform
1255
- * @see https://tailwindcss.com/docs/text-transform
1256
- */
1257
- "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
1258
- /**
1259
- * Text Overflow
1260
- * @see https://tailwindcss.com/docs/text-overflow
1261
- */
1262
- "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
1263
- /**
1264
- * Text Wrap
1265
- * @see https://tailwindcss.com/docs/text-wrap
1266
- */
1267
- "text-wrap": [{ text: ["wrap", "nowrap", "balance", "pretty"] }],
1268
- /**
1269
- * Text Indent
1270
- * @see https://tailwindcss.com/docs/text-indent
1271
- */
1272
- "indent": [{ indent: getSpacingWithArbitrary() }],
1273
- /**
1274
- * Vertical Alignment
1275
- * @see https://tailwindcss.com/docs/vertical-align
1276
- */
1277
- "vertical-align": [
1278
- {
1279
- align: [
1280
- "baseline",
1281
- "top",
1282
- "middle",
1283
- "bottom",
1284
- "text-top",
1285
- "text-bottom",
1286
- "sub",
1287
- "super",
1288
- isArbitraryValue
1289
- ]
1290
- }
1291
- ],
1292
- /**
1293
- * Whitespace
1294
- * @see https://tailwindcss.com/docs/whitespace
1295
- */
1296
- "whitespace": [
1297
- { whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"] }
1298
- ],
1299
- /**
1300
- * Word Break
1301
- * @see https://tailwindcss.com/docs/word-break
1302
- */
1303
- "break": [{ break: ["normal", "words", "all", "keep"] }],
1304
- /**
1305
- * Hyphens
1306
- * @see https://tailwindcss.com/docs/hyphens
1307
- */
1308
- "hyphens": [{ hyphens: ["none", "manual", "auto"] }],
1309
- /**
1310
- * Content
1311
- * @see https://tailwindcss.com/docs/content
1312
- */
1313
- "content": [{ content: ["none", isArbitraryValue] }],
1314
- // Backgrounds
1315
- /**
1316
- * Background Attachment
1317
- * @see https://tailwindcss.com/docs/background-attachment
1318
- */
1319
- "bg-attachment": [{ bg: ["fixed", "local", "scroll"] }],
1320
- /**
1321
- * Background Clip
1322
- * @see https://tailwindcss.com/docs/background-clip
1323
- */
1324
- "bg-clip": [{ "bg-clip": ["border", "padding", "content", "text"] }],
1325
- /**
1326
- * Background Opacity
1327
- * @deprecated since Tailwind CSS v3.0.0
1328
- * @see https://tailwindcss.com/docs/background-opacity
1329
- */
1330
- "bg-opacity": [{ "bg-opacity": [opacity] }],
1331
- /**
1332
- * Background Origin
1333
- * @see https://tailwindcss.com/docs/background-origin
1334
- */
1335
- "bg-origin": [{ "bg-origin": ["border", "padding", "content"] }],
1336
- /**
1337
- * Background Position
1338
- * @see https://tailwindcss.com/docs/background-position
1339
- */
1340
- "bg-position": [{ bg: [...getPositions(), isArbitraryPosition] }],
1341
- /**
1342
- * Background Repeat
1343
- * @see https://tailwindcss.com/docs/background-repeat
1344
- */
1345
- "bg-repeat": [{ bg: ["no-repeat", { repeat: ["", "x", "y", "round", "space"] }] }],
1346
- /**
1347
- * Background Size
1348
- * @see https://tailwindcss.com/docs/background-size
1349
- */
1350
- "bg-size": [{ bg: ["auto", "cover", "contain", isArbitrarySize] }],
1351
- /**
1352
- * Background Image
1353
- * @see https://tailwindcss.com/docs/background-image
1354
- */
1355
- "bg-image": [
1356
- {
1357
- bg: [
1358
- "none",
1359
- { "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"] },
1360
- isArbitraryImage
1361
- ]
1362
- }
1363
- ],
1364
- /**
1365
- * Background Color
1366
- * @see https://tailwindcss.com/docs/background-color
1367
- */
1368
- "bg-color": [{ bg: [colors] }],
1369
- /**
1370
- * Gradient Color Stops From Position
1371
- * @see https://tailwindcss.com/docs/gradient-color-stops
1372
- */
1373
- "gradient-from-pos": [{ from: [gradientColorStopPositions] }],
1374
- /**
1375
- * Gradient Color Stops Via Position
1376
- * @see https://tailwindcss.com/docs/gradient-color-stops
1377
- */
1378
- "gradient-via-pos": [{ via: [gradientColorStopPositions] }],
1379
- /**
1380
- * Gradient Color Stops To Position
1381
- * @see https://tailwindcss.com/docs/gradient-color-stops
1382
- */
1383
- "gradient-to-pos": [{ to: [gradientColorStopPositions] }],
1384
- /**
1385
- * Gradient Color Stops From
1386
- * @see https://tailwindcss.com/docs/gradient-color-stops
1387
- */
1388
- "gradient-from": [{ from: [gradientColorStops] }],
1389
- /**
1390
- * Gradient Color Stops Via
1391
- * @see https://tailwindcss.com/docs/gradient-color-stops
1392
- */
1393
- "gradient-via": [{ via: [gradientColorStops] }],
1394
- /**
1395
- * Gradient Color Stops To
1396
- * @see https://tailwindcss.com/docs/gradient-color-stops
1397
- */
1398
- "gradient-to": [{ to: [gradientColorStops] }],
1399
- // Borders
1400
- /**
1401
- * Border Radius
1402
- * @see https://tailwindcss.com/docs/border-radius
1403
- */
1404
- "rounded": [{ rounded: [borderRadius] }],
1405
- /**
1406
- * Border Radius Start
1407
- * @see https://tailwindcss.com/docs/border-radius
1408
- */
1409
- "rounded-s": [{ "rounded-s": [borderRadius] }],
1410
- /**
1411
- * Border Radius End
1412
- * @see https://tailwindcss.com/docs/border-radius
1413
- */
1414
- "rounded-e": [{ "rounded-e": [borderRadius] }],
1415
- /**
1416
- * Border Radius Top
1417
- * @see https://tailwindcss.com/docs/border-radius
1418
- */
1419
- "rounded-t": [{ "rounded-t": [borderRadius] }],
1420
- /**
1421
- * Border Radius Right
1422
- * @see https://tailwindcss.com/docs/border-radius
1423
- */
1424
- "rounded-r": [{ "rounded-r": [borderRadius] }],
1425
- /**
1426
- * Border Radius Bottom
1427
- * @see https://tailwindcss.com/docs/border-radius
1428
- */
1429
- "rounded-b": [{ "rounded-b": [borderRadius] }],
1430
- /**
1431
- * Border Radius Left
1432
- * @see https://tailwindcss.com/docs/border-radius
1433
- */
1434
- "rounded-l": [{ "rounded-l": [borderRadius] }],
1435
- /**
1436
- * Border Radius Start Start
1437
- * @see https://tailwindcss.com/docs/border-radius
1438
- */
1439
- "rounded-ss": [{ "rounded-ss": [borderRadius] }],
1440
- /**
1441
- * Border Radius Start End
1442
- * @see https://tailwindcss.com/docs/border-radius
1443
- */
1444
- "rounded-se": [{ "rounded-se": [borderRadius] }],
1445
- /**
1446
- * Border Radius End End
1447
- * @see https://tailwindcss.com/docs/border-radius
1448
- */
1449
- "rounded-ee": [{ "rounded-ee": [borderRadius] }],
1450
- /**
1451
- * Border Radius End Start
1452
- * @see https://tailwindcss.com/docs/border-radius
1453
- */
1454
- "rounded-es": [{ "rounded-es": [borderRadius] }],
1455
- /**
1456
- * Border Radius Top Left
1457
- * @see https://tailwindcss.com/docs/border-radius
1458
- */
1459
- "rounded-tl": [{ "rounded-tl": [borderRadius] }],
1460
- /**
1461
- * Border Radius Top Right
1462
- * @see https://tailwindcss.com/docs/border-radius
1463
- */
1464
- "rounded-tr": [{ "rounded-tr": [borderRadius] }],
1465
- /**
1466
- * Border Radius Bottom Right
1467
- * @see https://tailwindcss.com/docs/border-radius
1468
- */
1469
- "rounded-br": [{ "rounded-br": [borderRadius] }],
1470
- /**
1471
- * Border Radius Bottom Left
1472
- * @see https://tailwindcss.com/docs/border-radius
1473
- */
1474
- "rounded-bl": [{ "rounded-bl": [borderRadius] }],
1475
- /**
1476
- * Border Width
1477
- * @see https://tailwindcss.com/docs/border-width
1478
- */
1479
- "border-w": [{ border: [borderWidth] }],
1480
- /**
1481
- * Border Width X
1482
- * @see https://tailwindcss.com/docs/border-width
1483
- */
1484
- "border-w-x": [{ "border-x": [borderWidth] }],
1485
- /**
1486
- * Border Width Y
1487
- * @see https://tailwindcss.com/docs/border-width
1488
- */
1489
- "border-w-y": [{ "border-y": [borderWidth] }],
1490
- /**
1491
- * Border Width Start
1492
- * @see https://tailwindcss.com/docs/border-width
1493
- */
1494
- "border-w-s": [{ "border-s": [borderWidth] }],
1495
- /**
1496
- * Border Width End
1497
- * @see https://tailwindcss.com/docs/border-width
1498
- */
1499
- "border-w-e": [{ "border-e": [borderWidth] }],
1500
- /**
1501
- * Border Width Top
1502
- * @see https://tailwindcss.com/docs/border-width
1503
- */
1504
- "border-w-t": [{ "border-t": [borderWidth] }],
1505
- /**
1506
- * Border Width Right
1507
- * @see https://tailwindcss.com/docs/border-width
1508
- */
1509
- "border-w-r": [{ "border-r": [borderWidth] }],
1510
- /**
1511
- * Border Width Bottom
1512
- * @see https://tailwindcss.com/docs/border-width
1513
- */
1514
- "border-w-b": [{ "border-b": [borderWidth] }],
1515
- /**
1516
- * Border Width Left
1517
- * @see https://tailwindcss.com/docs/border-width
1518
- */
1519
- "border-w-l": [{ "border-l": [borderWidth] }],
1520
- /**
1521
- * Border Opacity
1522
- * @see https://tailwindcss.com/docs/border-opacity
1523
- */
1524
- "border-opacity": [{ "border-opacity": [opacity] }],
1525
- /**
1526
- * Border Style
1527
- * @see https://tailwindcss.com/docs/border-style
1528
- */
1529
- "border-style": [{ border: [...getLineStyles(), "hidden"] }],
1530
- /**
1531
- * Divide Width X
1532
- * @see https://tailwindcss.com/docs/divide-width
1533
- */
1534
- "divide-x": [{ "divide-x": [borderWidth] }],
1535
- /**
1536
- * Divide Width X Reverse
1537
- * @see https://tailwindcss.com/docs/divide-width
1538
- */
1539
- "divide-x-reverse": ["divide-x-reverse"],
1540
- /**
1541
- * Divide Width Y
1542
- * @see https://tailwindcss.com/docs/divide-width
1543
- */
1544
- "divide-y": [{ "divide-y": [borderWidth] }],
1545
- /**
1546
- * Divide Width Y Reverse
1547
- * @see https://tailwindcss.com/docs/divide-width
1548
- */
1549
- "divide-y-reverse": ["divide-y-reverse"],
1550
- /**
1551
- * Divide Opacity
1552
- * @see https://tailwindcss.com/docs/divide-opacity
1553
- */
1554
- "divide-opacity": [{ "divide-opacity": [opacity] }],
1555
- /**
1556
- * Divide Style
1557
- * @see https://tailwindcss.com/docs/divide-style
1558
- */
1559
- "divide-style": [{ divide: getLineStyles() }],
1560
- /**
1561
- * Border Color
1562
- * @see https://tailwindcss.com/docs/border-color
1563
- */
1564
- "border-color": [{ border: [borderColor] }],
1565
- /**
1566
- * Border Color X
1567
- * @see https://tailwindcss.com/docs/border-color
1568
- */
1569
- "border-color-x": [{ "border-x": [borderColor] }],
1570
- /**
1571
- * Border Color Y
1572
- * @see https://tailwindcss.com/docs/border-color
1573
- */
1574
- "border-color-y": [{ "border-y": [borderColor] }],
1575
- /**
1576
- * Border Color S
1577
- * @see https://tailwindcss.com/docs/border-color
1578
- */
1579
- "border-color-s": [{ "border-s": [borderColor] }],
1580
- /**
1581
- * Border Color E
1582
- * @see https://tailwindcss.com/docs/border-color
1583
- */
1584
- "border-color-e": [{ "border-e": [borderColor] }],
1585
- /**
1586
- * Border Color Top
1587
- * @see https://tailwindcss.com/docs/border-color
1588
- */
1589
- "border-color-t": [{ "border-t": [borderColor] }],
1590
- /**
1591
- * Border Color Right
1592
- * @see https://tailwindcss.com/docs/border-color
1593
- */
1594
- "border-color-r": [{ "border-r": [borderColor] }],
1595
- /**
1596
- * Border Color Bottom
1597
- * @see https://tailwindcss.com/docs/border-color
1598
- */
1599
- "border-color-b": [{ "border-b": [borderColor] }],
1600
- /**
1601
- * Border Color Left
1602
- * @see https://tailwindcss.com/docs/border-color
1603
- */
1604
- "border-color-l": [{ "border-l": [borderColor] }],
1605
- /**
1606
- * Divide Color
1607
- * @see https://tailwindcss.com/docs/divide-color
1608
- */
1609
- "divide-color": [{ divide: [borderColor] }],
1610
- /**
1611
- * Outline Style
1612
- * @see https://tailwindcss.com/docs/outline-style
1613
- */
1614
- "outline-style": [{ outline: ["", ...getLineStyles()] }],
1615
- /**
1616
- * Outline Offset
1617
- * @see https://tailwindcss.com/docs/outline-offset
1618
- */
1619
- "outline-offset": [{ "outline-offset": [isLength, isArbitraryValue] }],
1620
- /**
1621
- * Outline Width
1622
- * @see https://tailwindcss.com/docs/outline-width
1623
- */
1624
- "outline-w": [{ outline: [isLength, isArbitraryLength] }],
1625
- /**
1626
- * Outline Color
1627
- * @see https://tailwindcss.com/docs/outline-color
1628
- */
1629
- "outline-color": [{ outline: [colors] }],
1630
- /**
1631
- * Ring Width
1632
- * @see https://tailwindcss.com/docs/ring-width
1633
- */
1634
- "ring-w": [{ ring: getLengthWithEmptyAndArbitrary() }],
1635
- /**
1636
- * Ring Width Inset
1637
- * @see https://tailwindcss.com/docs/ring-width
1638
- */
1639
- "ring-w-inset": ["ring-inset"],
1640
- /**
1641
- * Ring Color
1642
- * @see https://tailwindcss.com/docs/ring-color
1643
- */
1644
- "ring-color": [{ ring: [colors] }],
1645
- /**
1646
- * Ring Opacity
1647
- * @see https://tailwindcss.com/docs/ring-opacity
1648
- */
1649
- "ring-opacity": [{ "ring-opacity": [opacity] }],
1650
- /**
1651
- * Ring Offset Width
1652
- * @see https://tailwindcss.com/docs/ring-offset-width
1653
- */
1654
- "ring-offset-w": [{ "ring-offset": [isLength, isArbitraryLength] }],
1655
- /**
1656
- * Ring Offset Color
1657
- * @see https://tailwindcss.com/docs/ring-offset-color
1658
- */
1659
- "ring-offset-color": [{ "ring-offset": [colors] }],
1660
- // Effects
1661
- /**
1662
- * Box Shadow
1663
- * @see https://tailwindcss.com/docs/box-shadow
1664
- */
1665
- "shadow": [{ shadow: ["", "inner", "none", isTshirtSize, isArbitraryShadow] }],
1666
- /**
1667
- * Box Shadow Color
1668
- * @see https://tailwindcss.com/docs/box-shadow-color
1669
- */
1670
- "shadow-color": [{ shadow: [isAny] }],
1671
- /**
1672
- * Opacity
1673
- * @see https://tailwindcss.com/docs/opacity
1674
- */
1675
- "opacity": [{ opacity: [opacity] }],
1676
- /**
1677
- * Mix Blend Mode
1678
- * @see https://tailwindcss.com/docs/mix-blend-mode
1679
- */
1680
- "mix-blend": [{ "mix-blend": [...getBlendModes(), "plus-lighter", "plus-darker"] }],
1681
- /**
1682
- * Background Blend Mode
1683
- * @see https://tailwindcss.com/docs/background-blend-mode
1684
- */
1685
- "bg-blend": [{ "bg-blend": getBlendModes() }],
1686
- // Filters
1687
- /**
1688
- * Filter
1689
- * @deprecated since Tailwind CSS v3.0.0
1690
- * @see https://tailwindcss.com/docs/filter
1691
- */
1692
- "filter": [{ filter: ["", "none"] }],
1693
- /**
1694
- * Blur
1695
- * @see https://tailwindcss.com/docs/blur
1696
- */
1697
- "blur": [{ blur: [blur] }],
1698
- /**
1699
- * Brightness
1700
- * @see https://tailwindcss.com/docs/brightness
1701
- */
1702
- "brightness": [{ brightness: [brightness] }],
1703
- /**
1704
- * Contrast
1705
- * @see https://tailwindcss.com/docs/contrast
1706
- */
1707
- "contrast": [{ contrast: [contrast] }],
1708
- /**
1709
- * Drop Shadow
1710
- * @see https://tailwindcss.com/docs/drop-shadow
1711
- */
1712
- "drop-shadow": [{ "drop-shadow": ["", "none", isTshirtSize, isArbitraryValue] }],
1713
- /**
1714
- * Grayscale
1715
- * @see https://tailwindcss.com/docs/grayscale
1716
- */
1717
- "grayscale": [{ grayscale: [grayscale] }],
1718
- /**
1719
- * Hue Rotate
1720
- * @see https://tailwindcss.com/docs/hue-rotate
1721
- */
1722
- "hue-rotate": [{ "hue-rotate": [hueRotate] }],
1723
- /**
1724
- * Invert
1725
- * @see https://tailwindcss.com/docs/invert
1726
- */
1727
- "invert": [{ invert: [invert] }],
1728
- /**
1729
- * Saturate
1730
- * @see https://tailwindcss.com/docs/saturate
1731
- */
1732
- "saturate": [{ saturate: [saturate] }],
1733
- /**
1734
- * Sepia
1735
- * @see https://tailwindcss.com/docs/sepia
1736
- */
1737
- "sepia": [{ sepia: [sepia] }],
1738
- /**
1739
- * Backdrop Filter
1740
- * @deprecated since Tailwind CSS v3.0.0
1741
- * @see https://tailwindcss.com/docs/backdrop-filter
1742
- */
1743
- "backdrop-filter": [{ "backdrop-filter": ["", "none"] }],
1744
- /**
1745
- * Backdrop Blur
1746
- * @see https://tailwindcss.com/docs/backdrop-blur
1747
- */
1748
- "backdrop-blur": [{ "backdrop-blur": [blur] }],
1749
- /**
1750
- * Backdrop Brightness
1751
- * @see https://tailwindcss.com/docs/backdrop-brightness
1752
- */
1753
- "backdrop-brightness": [{ "backdrop-brightness": [brightness] }],
1754
- /**
1755
- * Backdrop Contrast
1756
- * @see https://tailwindcss.com/docs/backdrop-contrast
1757
- */
1758
- "backdrop-contrast": [{ "backdrop-contrast": [contrast] }],
1759
- /**
1760
- * Backdrop Grayscale
1761
- * @see https://tailwindcss.com/docs/backdrop-grayscale
1762
- */
1763
- "backdrop-grayscale": [{ "backdrop-grayscale": [grayscale] }],
1764
- /**
1765
- * Backdrop Hue Rotate
1766
- * @see https://tailwindcss.com/docs/backdrop-hue-rotate
1767
- */
1768
- "backdrop-hue-rotate": [{ "backdrop-hue-rotate": [hueRotate] }],
1769
- /**
1770
- * Backdrop Invert
1771
- * @see https://tailwindcss.com/docs/backdrop-invert
1772
- */
1773
- "backdrop-invert": [{ "backdrop-invert": [invert] }],
1774
- /**
1775
- * Backdrop Opacity
1776
- * @see https://tailwindcss.com/docs/backdrop-opacity
1777
- */
1778
- "backdrop-opacity": [{ "backdrop-opacity": [opacity] }],
1779
- /**
1780
- * Backdrop Saturate
1781
- * @see https://tailwindcss.com/docs/backdrop-saturate
1782
- */
1783
- "backdrop-saturate": [{ "backdrop-saturate": [saturate] }],
1784
- /**
1785
- * Backdrop Sepia
1786
- * @see https://tailwindcss.com/docs/backdrop-sepia
1787
- */
1788
- "backdrop-sepia": [{ "backdrop-sepia": [sepia] }],
1789
- // Tables
1790
- /**
1791
- * Border Collapse
1792
- * @see https://tailwindcss.com/docs/border-collapse
1793
- */
1794
- "border-collapse": [{ border: ["collapse", "separate"] }],
1795
- /**
1796
- * Border Spacing
1797
- * @see https://tailwindcss.com/docs/border-spacing
1798
- */
1799
- "border-spacing": [{ "border-spacing": [borderSpacing] }],
1800
- /**
1801
- * Border Spacing X
1802
- * @see https://tailwindcss.com/docs/border-spacing
1803
- */
1804
- "border-spacing-x": [{ "border-spacing-x": [borderSpacing] }],
1805
- /**
1806
- * Border Spacing Y
1807
- * @see https://tailwindcss.com/docs/border-spacing
1808
- */
1809
- "border-spacing-y": [{ "border-spacing-y": [borderSpacing] }],
1810
- /**
1811
- * Table Layout
1812
- * @see https://tailwindcss.com/docs/table-layout
1813
- */
1814
- "table-layout": [{ table: ["auto", "fixed"] }],
1815
- /**
1816
- * Caption Side
1817
- * @see https://tailwindcss.com/docs/caption-side
1818
- */
1819
- "caption": [{ caption: ["top", "bottom"] }],
1820
- // Transitions and Animation
1821
- /**
1822
- * Tranisition Property
1823
- * @see https://tailwindcss.com/docs/transition-property
1824
- */
1825
- "transition": [
1826
- {
1827
- transition: [
1828
- "none",
1829
- "all",
1830
- "",
1831
- "colors",
1832
- "opacity",
1833
- "shadow",
1834
- "transform",
1835
- isArbitraryValue
1836
- ]
1837
- }
1838
- ],
1839
- /**
1840
- * Transition Duration
1841
- * @see https://tailwindcss.com/docs/transition-duration
1842
- */
1843
- "duration": [{ duration: getNumberAndArbitrary() }],
1844
- /**
1845
- * Transition Timing Function
1846
- * @see https://tailwindcss.com/docs/transition-timing-function
1847
- */
1848
- "ease": [{ ease: ["linear", "in", "out", "in-out", isArbitraryValue] }],
1849
- /**
1850
- * Transition Delay
1851
- * @see https://tailwindcss.com/docs/transition-delay
1852
- */
1853
- "delay": [{ delay: getNumberAndArbitrary() }],
1854
- /**
1855
- * Animation
1856
- * @see https://tailwindcss.com/docs/animation
1857
- */
1858
- "animate": [{ animate: ["none", "spin", "ping", "pulse", "bounce", isArbitraryValue] }],
1859
- // Transforms
1860
- /**
1861
- * Transform
1862
- * @see https://tailwindcss.com/docs/transform
1863
- */
1864
- "transform": [{ transform: ["", "gpu", "none"] }],
1865
- /**
1866
- * Scale
1867
- * @see https://tailwindcss.com/docs/scale
1868
- */
1869
- "scale": [{ scale: [scale] }],
1870
- /**
1871
- * Scale X
1872
- * @see https://tailwindcss.com/docs/scale
1873
- */
1874
- "scale-x": [{ "scale-x": [scale] }],
1875
- /**
1876
- * Scale Y
1877
- * @see https://tailwindcss.com/docs/scale
1878
- */
1879
- "scale-y": [{ "scale-y": [scale] }],
1880
- /**
1881
- * Rotate
1882
- * @see https://tailwindcss.com/docs/rotate
1883
- */
1884
- "rotate": [{ rotate: [isInteger, isArbitraryValue] }],
1885
- /**
1886
- * Translate X
1887
- * @see https://tailwindcss.com/docs/translate
1888
- */
1889
- "translate-x": [{ "translate-x": [translate] }],
1890
- /**
1891
- * Translate Y
1892
- * @see https://tailwindcss.com/docs/translate
1893
- */
1894
- "translate-y": [{ "translate-y": [translate] }],
1895
- /**
1896
- * Skew X
1897
- * @see https://tailwindcss.com/docs/skew
1898
- */
1899
- "skew-x": [{ "skew-x": [skew] }],
1900
- /**
1901
- * Skew Y
1902
- * @see https://tailwindcss.com/docs/skew
1903
- */
1904
- "skew-y": [{ "skew-y": [skew] }],
1905
- /**
1906
- * Transform Origin
1907
- * @see https://tailwindcss.com/docs/transform-origin
1908
- */
1909
- "transform-origin": [
1910
- {
1911
- origin: [
1912
- "center",
1913
- "top",
1914
- "top-right",
1915
- "right",
1916
- "bottom-right",
1917
- "bottom",
1918
- "bottom-left",
1919
- "left",
1920
- "top-left",
1921
- isArbitraryValue
1922
- ]
1923
- }
1924
- ],
1925
- // Interactivity
1926
- /**
1927
- * Accent Color
1928
- * @see https://tailwindcss.com/docs/accent-color
1929
- */
1930
- "accent": [{ accent: ["auto", colors] }],
1931
- /**
1932
- * Appearance
1933
- * @see https://tailwindcss.com/docs/appearance
1934
- */
1935
- "appearance": [{ appearance: ["none", "auto"] }],
1936
- /**
1937
- * Cursor
1938
- * @see https://tailwindcss.com/docs/cursor
1939
- */
1940
- "cursor": [
1941
- {
1942
- cursor: [
1943
- "auto",
1944
- "default",
1945
- "pointer",
1946
- "wait",
1947
- "text",
1948
- "move",
1949
- "help",
1950
- "not-allowed",
1951
- "none",
1952
- "context-menu",
1953
- "progress",
1954
- "cell",
1955
- "crosshair",
1956
- "vertical-text",
1957
- "alias",
1958
- "copy",
1959
- "no-drop",
1960
- "grab",
1961
- "grabbing",
1962
- "all-scroll",
1963
- "col-resize",
1964
- "row-resize",
1965
- "n-resize",
1966
- "e-resize",
1967
- "s-resize",
1968
- "w-resize",
1969
- "ne-resize",
1970
- "nw-resize",
1971
- "se-resize",
1972
- "sw-resize",
1973
- "ew-resize",
1974
- "ns-resize",
1975
- "nesw-resize",
1976
- "nwse-resize",
1977
- "zoom-in",
1978
- "zoom-out",
1979
- isArbitraryValue
1980
- ]
1981
- }
1982
- ],
1983
- /**
1984
- * Caret Color
1985
- * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
1986
- */
1987
- "caret-color": [{ caret: [colors] }],
1988
- /**
1989
- * Pointer Events
1990
- * @see https://tailwindcss.com/docs/pointer-events
1991
- */
1992
- "pointer-events": [{ "pointer-events": ["none", "auto"] }],
1993
- /**
1994
- * Resize
1995
- * @see https://tailwindcss.com/docs/resize
1996
- */
1997
- "resize": [{ resize: ["none", "y", "x", ""] }],
1998
- /**
1999
- * Scroll Behavior
2000
- * @see https://tailwindcss.com/docs/scroll-behavior
2001
- */
2002
- "scroll-behavior": [{ scroll: ["auto", "smooth"] }],
2003
- /**
2004
- * Scroll Margin
2005
- * @see https://tailwindcss.com/docs/scroll-margin
2006
- */
2007
- "scroll-m": [{ "scroll-m": getSpacingWithArbitrary() }],
2008
- /**
2009
- * Scroll Margin X
2010
- * @see https://tailwindcss.com/docs/scroll-margin
2011
- */
2012
- "scroll-mx": [{ "scroll-mx": getSpacingWithArbitrary() }],
2013
- /**
2014
- * Scroll Margin Y
2015
- * @see https://tailwindcss.com/docs/scroll-margin
2016
- */
2017
- "scroll-my": [{ "scroll-my": getSpacingWithArbitrary() }],
2018
- /**
2019
- * Scroll Margin Start
2020
- * @see https://tailwindcss.com/docs/scroll-margin
2021
- */
2022
- "scroll-ms": [{ "scroll-ms": getSpacingWithArbitrary() }],
2023
- /**
2024
- * Scroll Margin End
2025
- * @see https://tailwindcss.com/docs/scroll-margin
2026
- */
2027
- "scroll-me": [{ "scroll-me": getSpacingWithArbitrary() }],
2028
- /**
2029
- * Scroll Margin Top
2030
- * @see https://tailwindcss.com/docs/scroll-margin
2031
- */
2032
- "scroll-mt": [{ "scroll-mt": getSpacingWithArbitrary() }],
2033
- /**
2034
- * Scroll Margin Right
2035
- * @see https://tailwindcss.com/docs/scroll-margin
2036
- */
2037
- "scroll-mr": [{ "scroll-mr": getSpacingWithArbitrary() }],
2038
- /**
2039
- * Scroll Margin Bottom
2040
- * @see https://tailwindcss.com/docs/scroll-margin
2041
- */
2042
- "scroll-mb": [{ "scroll-mb": getSpacingWithArbitrary() }],
2043
- /**
2044
- * Scroll Margin Left
2045
- * @see https://tailwindcss.com/docs/scroll-margin
2046
- */
2047
- "scroll-ml": [{ "scroll-ml": getSpacingWithArbitrary() }],
2048
- /**
2049
- * Scroll Padding
2050
- * @see https://tailwindcss.com/docs/scroll-padding
2051
- */
2052
- "scroll-p": [{ "scroll-p": getSpacingWithArbitrary() }],
2053
- /**
2054
- * Scroll Padding X
2055
- * @see https://tailwindcss.com/docs/scroll-padding
2056
- */
2057
- "scroll-px": [{ "scroll-px": getSpacingWithArbitrary() }],
2058
- /**
2059
- * Scroll Padding Y
2060
- * @see https://tailwindcss.com/docs/scroll-padding
2061
- */
2062
- "scroll-py": [{ "scroll-py": getSpacingWithArbitrary() }],
2063
- /**
2064
- * Scroll Padding Start
2065
- * @see https://tailwindcss.com/docs/scroll-padding
2066
- */
2067
- "scroll-ps": [{ "scroll-ps": getSpacingWithArbitrary() }],
2068
- /**
2069
- * Scroll Padding End
2070
- * @see https://tailwindcss.com/docs/scroll-padding
2071
- */
2072
- "scroll-pe": [{ "scroll-pe": getSpacingWithArbitrary() }],
2073
- /**
2074
- * Scroll Padding Top
2075
- * @see https://tailwindcss.com/docs/scroll-padding
2076
- */
2077
- "scroll-pt": [{ "scroll-pt": getSpacingWithArbitrary() }],
2078
- /**
2079
- * Scroll Padding Right
2080
- * @see https://tailwindcss.com/docs/scroll-padding
2081
- */
2082
- "scroll-pr": [{ "scroll-pr": getSpacingWithArbitrary() }],
2083
- /**
2084
- * Scroll Padding Bottom
2085
- * @see https://tailwindcss.com/docs/scroll-padding
2086
- */
2087
- "scroll-pb": [{ "scroll-pb": getSpacingWithArbitrary() }],
2088
- /**
2089
- * Scroll Padding Left
2090
- * @see https://tailwindcss.com/docs/scroll-padding
2091
- */
2092
- "scroll-pl": [{ "scroll-pl": getSpacingWithArbitrary() }],
2093
- /**
2094
- * Scroll Snap Align
2095
- * @see https://tailwindcss.com/docs/scroll-snap-align
2096
- */
2097
- "snap-align": [{ snap: ["start", "end", "center", "align-none"] }],
2098
- /**
2099
- * Scroll Snap Stop
2100
- * @see https://tailwindcss.com/docs/scroll-snap-stop
2101
- */
2102
- "snap-stop": [{ snap: ["normal", "always"] }],
2103
- /**
2104
- * Scroll Snap Type
2105
- * @see https://tailwindcss.com/docs/scroll-snap-type
2106
- */
2107
- "snap-type": [{ snap: ["none", "x", "y", "both"] }],
2108
- /**
2109
- * Scroll Snap Type Strictness
2110
- * @see https://tailwindcss.com/docs/scroll-snap-type
2111
- */
2112
- "snap-strictness": [{ snap: ["mandatory", "proximity"] }],
2113
- /**
2114
- * Touch Action
2115
- * @see https://tailwindcss.com/docs/touch-action
2116
- */
2117
- "touch": [
2118
- {
2119
- touch: ["auto", "none", "manipulation"]
2120
- }
2121
- ],
2122
- /**
2123
- * Touch Action X
2124
- * @see https://tailwindcss.com/docs/touch-action
2125
- */
2126
- "touch-x": [
2127
- {
2128
- "touch-pan": ["x", "left", "right"]
2129
- }
2130
- ],
2131
- /**
2132
- * Touch Action Y
2133
- * @see https://tailwindcss.com/docs/touch-action
2134
- */
2135
- "touch-y": [
2136
- {
2137
- "touch-pan": ["y", "up", "down"]
2138
- }
2139
- ],
2140
- /**
2141
- * Touch Action Pinch Zoom
2142
- * @see https://tailwindcss.com/docs/touch-action
2143
- */
2144
- "touch-pz": ["touch-pinch-zoom"],
2145
- /**
2146
- * User Select
2147
- * @see https://tailwindcss.com/docs/user-select
2148
- */
2149
- "select": [{ select: ["none", "text", "all", "auto"] }],
2150
- /**
2151
- * Will Change
2152
- * @see https://tailwindcss.com/docs/will-change
2153
- */
2154
- "will-change": [
2155
- { "will-change": ["auto", "scroll", "contents", "transform", isArbitraryValue] }
2156
- ],
2157
- // SVG
2158
- /**
2159
- * Fill
2160
- * @see https://tailwindcss.com/docs/fill
2161
- */
2162
- "fill": [{ fill: [colors, "none"] }],
2163
- /**
2164
- * Stroke Width
2165
- * @see https://tailwindcss.com/docs/stroke-width
2166
- */
2167
- "stroke-w": [{ stroke: [isLength, isArbitraryLength, isArbitraryNumber] }],
2168
- /**
2169
- * Stroke
2170
- * @see https://tailwindcss.com/docs/stroke
2171
- */
2172
- "stroke": [{ stroke: [colors, "none"] }],
2173
- // Accessibility
2174
- /**
2175
- * Screen Readers
2176
- * @see https://tailwindcss.com/docs/screen-readers
2177
- */
2178
- "sr": ["sr-only", "not-sr-only"],
2179
- /**
2180
- * Forced Color Adjust
2181
- * @see https://tailwindcss.com/docs/forced-color-adjust
2182
- */
2183
- "forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
2184
- },
2185
- conflictingClassGroups: {
2186
- "overflow": ["overflow-x", "overflow-y"],
2187
- "overscroll": ["overscroll-x", "overscroll-y"],
2188
- "inset": ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
2189
- "inset-x": ["right", "left"],
2190
- "inset-y": ["top", "bottom"],
2191
- "flex": ["basis", "grow", "shrink"],
2192
- "gap": ["gap-x", "gap-y"],
2193
- "p": ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
2194
- "px": ["pr", "pl"],
2195
- "py": ["pt", "pb"],
2196
- "m": ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
2197
- "mx": ["mr", "ml"],
2198
- "my": ["mt", "mb"],
2199
- "size": ["w", "h"],
2200
- "font-size": ["leading"],
2201
- "fvn-normal": [
2202
- "fvn-ordinal",
2203
- "fvn-slashed-zero",
2204
- "fvn-figure",
2205
- "fvn-spacing",
2206
- "fvn-fraction"
2207
- ],
2208
- "fvn-ordinal": ["fvn-normal"],
2209
- "fvn-slashed-zero": ["fvn-normal"],
2210
- "fvn-figure": ["fvn-normal"],
2211
- "fvn-spacing": ["fvn-normal"],
2212
- "fvn-fraction": ["fvn-normal"],
2213
- "line-clamp": ["display", "overflow"],
2214
- "rounded": [
2215
- "rounded-s",
2216
- "rounded-e",
2217
- "rounded-t",
2218
- "rounded-r",
2219
- "rounded-b",
2220
- "rounded-l",
2221
- "rounded-ss",
2222
- "rounded-se",
2223
- "rounded-ee",
2224
- "rounded-es",
2225
- "rounded-tl",
2226
- "rounded-tr",
2227
- "rounded-br",
2228
- "rounded-bl"
2229
- ],
2230
- "rounded-s": ["rounded-ss", "rounded-es"],
2231
- "rounded-e": ["rounded-se", "rounded-ee"],
2232
- "rounded-t": ["rounded-tl", "rounded-tr"],
2233
- "rounded-r": ["rounded-tr", "rounded-br"],
2234
- "rounded-b": ["rounded-br", "rounded-bl"],
2235
- "rounded-l": ["rounded-tl", "rounded-bl"],
2236
- "border-spacing": ["border-spacing-x", "border-spacing-y"],
2237
- "border-w": [
2238
- "border-w-s",
2239
- "border-w-e",
2240
- "border-w-t",
2241
- "border-w-r",
2242
- "border-w-b",
2243
- "border-w-l"
2244
- ],
2245
- "border-w-x": ["border-w-r", "border-w-l"],
2246
- "border-w-y": ["border-w-t", "border-w-b"],
2247
- "border-color": [
2248
- "border-color-s",
2249
- "border-color-e",
2250
- "border-color-t",
2251
- "border-color-r",
2252
- "border-color-b",
2253
- "border-color-l"
2254
- ],
2255
- "border-color-x": ["border-color-r", "border-color-l"],
2256
- "border-color-y": ["border-color-t", "border-color-b"],
2257
- "scroll-m": [
2258
- "scroll-mx",
2259
- "scroll-my",
2260
- "scroll-ms",
2261
- "scroll-me",
2262
- "scroll-mt",
2263
- "scroll-mr",
2264
- "scroll-mb",
2265
- "scroll-ml"
2266
- ],
2267
- "scroll-mx": ["scroll-mr", "scroll-ml"],
2268
- "scroll-my": ["scroll-mt", "scroll-mb"],
2269
- "scroll-p": [
2270
- "scroll-px",
2271
- "scroll-py",
2272
- "scroll-ps",
2273
- "scroll-pe",
2274
- "scroll-pt",
2275
- "scroll-pr",
2276
- "scroll-pb",
2277
- "scroll-pl"
2278
- ],
2279
- "scroll-px": ["scroll-pr", "scroll-pl"],
2280
- "scroll-py": ["scroll-pt", "scroll-pb"],
2281
- "touch": ["touch-x", "touch-y", "touch-pz"],
2282
- "touch-x": ["touch"],
2283
- "touch-y": ["touch"],
2284
- "touch-pz": ["touch"]
2285
- },
2286
- conflictingClassGroupModifiers: {
2287
- "font-size": ["leading"]
2288
- }
202
+ // src/index.ts
203
+ function cn(...inputs) {
204
+ return replaceWxml(twMerge(clsx(inputs)));
205
+ }
206
+ function cva(...inputs) {
207
+ const fn = _cva(...inputs);
208
+ return (...props) => {
209
+ return replaceWxml(fn(...props));
2289
210
  };
2290
211
  }
2291
-
2292
- // src/lib/merge-configs.ts
2293
- function mergeConfigs(baseConfig, {
2294
- cacheSize,
2295
- prefix,
2296
- separator,
2297
- experimentalParseClassName,
2298
- extend = {},
2299
- override = {}
2300
- }) {
2301
- overrideProperty(baseConfig, "cacheSize", cacheSize);
2302
- overrideProperty(baseConfig, "prefix", prefix);
2303
- overrideProperty(baseConfig, "separator", separator);
2304
- overrideProperty(baseConfig, "experimentalParseClassName", experimentalParseClassName);
2305
- for (const configKey in override) {
2306
- overrideConfigProperties(
2307
- baseConfig[configKey],
2308
- override[configKey]
2309
- );
2310
- }
2311
- for (const key in extend) {
2312
- mergeConfigProperties(
2313
- baseConfig[key],
2314
- extend[key]
2315
- );
2316
- }
2317
- return baseConfig;
2318
- }
2319
- function overrideProperty(baseObject, overrideKey, overrideValue) {
2320
- if (overrideValue !== void 0) {
2321
- baseObject[overrideKey] = overrideValue;
2322
- }
2323
- }
2324
- function overrideConfigProperties(baseObject, overrideObject) {
2325
- if (overrideObject) {
2326
- for (const key in overrideObject) {
2327
- overrideProperty(baseObject, key, overrideObject[key]);
2328
- }
2329
- }
2330
- }
2331
- function mergeConfigProperties(baseObject, mergeObject) {
2332
- if (mergeObject) {
2333
- for (const key in mergeObject) {
2334
- const mergeValue = mergeObject[key];
2335
- if (mergeValue !== void 0) {
2336
- baseObject[key] = (baseObject[key] || []).concat(mergeValue);
2337
- }
2338
- }
2339
- }
2340
- }
2341
-
2342
- // src/lib/extend-tailwind-merge.ts
2343
- function extendTailwindMerge(configExtension, ...createConfig) {
2344
- return typeof configExtension === "function" ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(
2345
- () => mergeConfigs(getDefaultConfig(), configExtension),
2346
- ...createConfig
2347
- );
2348
- }
2349
-
2350
- // src/lib/tw-merge.ts
2351
- var twMerge = createTailwindMerge(getDefaultConfig);
2352
212
  export {
2353
- createTailwindMerge,
2354
- extendTailwindMerge,
2355
- fromTheme,
2356
- getDefaultConfig,
2357
- mergeConfigs,
2358
- twJoin,
2359
- twMerge,
2360
- validators_exports as validators
213
+ cn,
214
+ cva,
215
+ weappTwIgnore
2361
216
  };