@hiroi/react-youtube 0.0.1

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.mjs ADDED
@@ -0,0 +1,3115 @@
1
+ // ../../node_modules/clsx/dist/clsx.mjs
2
+ function r(e) {
3
+ var t, f, n = "";
4
+ if ("string" == typeof e || "number" == typeof e) n += e;
5
+ else if ("object" == typeof e) if (Array.isArray(e)) {
6
+ var o = e.length;
7
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
8
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
9
+ return n;
10
+ }
11
+ function clsx() {
12
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
13
+ return n;
14
+ }
15
+
16
+ // ../../node_modules/tailwind-merge/dist/bundle-mjs.mjs
17
+ var concatArrays = (array1, array2) => {
18
+ const combinedArray = new Array(array1.length + array2.length);
19
+ for (let i = 0; i < array1.length; i++) {
20
+ combinedArray[i] = array1[i];
21
+ }
22
+ for (let i = 0; i < array2.length; i++) {
23
+ combinedArray[array1.length + i] = array2[i];
24
+ }
25
+ return combinedArray;
26
+ };
27
+ var createClassValidatorObject = (classGroupId, validator) => ({
28
+ classGroupId,
29
+ validator
30
+ });
31
+ var createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators = null, classGroupId) => ({
32
+ nextPart,
33
+ validators,
34
+ classGroupId
35
+ });
36
+ var CLASS_PART_SEPARATOR = "-";
37
+ var EMPTY_CONFLICTS = [];
38
+ var ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
39
+ var createClassGroupUtils = (config) => {
40
+ const classMap = createClassMap(config);
41
+ const {
42
+ conflictingClassGroups,
43
+ conflictingClassGroupModifiers
44
+ } = config;
45
+ const getClassGroupId = (className) => {
46
+ if (className.startsWith("[") && className.endsWith("]")) {
47
+ return getGroupIdForArbitraryProperty(className);
48
+ }
49
+ const classParts = className.split(CLASS_PART_SEPARATOR);
50
+ const startIndex = classParts[0] === "" && classParts.length > 1 ? 1 : 0;
51
+ return getGroupRecursive(classParts, startIndex, classMap);
52
+ };
53
+ const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
54
+ if (hasPostfixModifier) {
55
+ const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
56
+ const baseConflicts = conflictingClassGroups[classGroupId];
57
+ if (modifierConflicts) {
58
+ if (baseConflicts) {
59
+ return concatArrays(baseConflicts, modifierConflicts);
60
+ }
61
+ return modifierConflicts;
62
+ }
63
+ return baseConflicts || EMPTY_CONFLICTS;
64
+ }
65
+ return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
66
+ };
67
+ return {
68
+ getClassGroupId,
69
+ getConflictingClassGroupIds
70
+ };
71
+ };
72
+ var getGroupRecursive = (classParts, startIndex, classPartObject) => {
73
+ const classPathsLength = classParts.length - startIndex;
74
+ if (classPathsLength === 0) {
75
+ return classPartObject.classGroupId;
76
+ }
77
+ const currentClassPart = classParts[startIndex];
78
+ const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
79
+ if (nextClassPartObject) {
80
+ const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
81
+ if (result) return result;
82
+ }
83
+ const validators = classPartObject.validators;
84
+ if (validators === null) {
85
+ return void 0;
86
+ }
87
+ const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
88
+ const validatorsLength = validators.length;
89
+ for (let i = 0; i < validatorsLength; i++) {
90
+ const validatorObj = validators[i];
91
+ if (validatorObj.validator(classRest)) {
92
+ return validatorObj.classGroupId;
93
+ }
94
+ }
95
+ return void 0;
96
+ };
97
+ var getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
98
+ const content = className.slice(1, -1);
99
+ const colonIndex = content.indexOf(":");
100
+ const property = content.slice(0, colonIndex);
101
+ return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
102
+ })();
103
+ var createClassMap = (config) => {
104
+ const {
105
+ theme,
106
+ classGroups
107
+ } = config;
108
+ return processClassGroups(classGroups, theme);
109
+ };
110
+ var processClassGroups = (classGroups, theme) => {
111
+ const classMap = createClassPartObject();
112
+ for (const classGroupId in classGroups) {
113
+ const group = classGroups[classGroupId];
114
+ processClassesRecursively(group, classMap, classGroupId, theme);
115
+ }
116
+ return classMap;
117
+ };
118
+ var processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
119
+ const len = classGroup.length;
120
+ for (let i = 0; i < len; i++) {
121
+ const classDefinition = classGroup[i];
122
+ processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
123
+ }
124
+ };
125
+ var processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
126
+ if (typeof classDefinition === "string") {
127
+ processStringDefinition(classDefinition, classPartObject, classGroupId);
128
+ return;
129
+ }
130
+ if (typeof classDefinition === "function") {
131
+ processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
132
+ return;
133
+ }
134
+ processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
135
+ };
136
+ var processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
137
+ const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
138
+ classPartObjectToEdit.classGroupId = classGroupId;
139
+ };
140
+ var processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
141
+ if (isThemeGetter(classDefinition)) {
142
+ processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
143
+ return;
144
+ }
145
+ if (classPartObject.validators === null) {
146
+ classPartObject.validators = [];
147
+ }
148
+ classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
149
+ };
150
+ var processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
151
+ const entries = Object.entries(classDefinition);
152
+ const len = entries.length;
153
+ for (let i = 0; i < len; i++) {
154
+ const [key, value] = entries[i];
155
+ processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
156
+ }
157
+ };
158
+ var getPart = (classPartObject, path) => {
159
+ let current = classPartObject;
160
+ const parts = path.split(CLASS_PART_SEPARATOR);
161
+ const len = parts.length;
162
+ for (let i = 0; i < len; i++) {
163
+ const part = parts[i];
164
+ let next = current.nextPart.get(part);
165
+ if (!next) {
166
+ next = createClassPartObject();
167
+ current.nextPart.set(part, next);
168
+ }
169
+ current = next;
170
+ }
171
+ return current;
172
+ };
173
+ var isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true;
174
+ var createLruCache = (maxCacheSize) => {
175
+ if (maxCacheSize < 1) {
176
+ return {
177
+ get: () => void 0,
178
+ set: () => {
179
+ }
180
+ };
181
+ }
182
+ let cacheSize = 0;
183
+ let cache = /* @__PURE__ */ Object.create(null);
184
+ let previousCache = /* @__PURE__ */ Object.create(null);
185
+ const update = (key, value) => {
186
+ cache[key] = value;
187
+ cacheSize++;
188
+ if (cacheSize > maxCacheSize) {
189
+ cacheSize = 0;
190
+ previousCache = cache;
191
+ cache = /* @__PURE__ */ Object.create(null);
192
+ }
193
+ };
194
+ return {
195
+ get(key) {
196
+ let value = cache[key];
197
+ if (value !== void 0) {
198
+ return value;
199
+ }
200
+ if ((value = previousCache[key]) !== void 0) {
201
+ update(key, value);
202
+ return value;
203
+ }
204
+ },
205
+ set(key, value) {
206
+ if (key in cache) {
207
+ cache[key] = value;
208
+ } else {
209
+ update(key, value);
210
+ }
211
+ }
212
+ };
213
+ };
214
+ var IMPORTANT_MODIFIER = "!";
215
+ var MODIFIER_SEPARATOR = ":";
216
+ var EMPTY_MODIFIERS = [];
217
+ var createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
218
+ modifiers,
219
+ hasImportantModifier,
220
+ baseClassName,
221
+ maybePostfixModifierPosition,
222
+ isExternal
223
+ });
224
+ var createParseClassName = (config) => {
225
+ const {
226
+ prefix,
227
+ experimentalParseClassName
228
+ } = config;
229
+ let parseClassName = (className) => {
230
+ const modifiers = [];
231
+ let bracketDepth = 0;
232
+ let parenDepth = 0;
233
+ let modifierStart = 0;
234
+ let postfixModifierPosition;
235
+ const len = className.length;
236
+ for (let index = 0; index < len; index++) {
237
+ const currentCharacter = className[index];
238
+ if (bracketDepth === 0 && parenDepth === 0) {
239
+ if (currentCharacter === MODIFIER_SEPARATOR) {
240
+ modifiers.push(className.slice(modifierStart, index));
241
+ modifierStart = index + 1;
242
+ continue;
243
+ }
244
+ if (currentCharacter === "/") {
245
+ postfixModifierPosition = index;
246
+ continue;
247
+ }
248
+ }
249
+ if (currentCharacter === "[") bracketDepth++;
250
+ else if (currentCharacter === "]") bracketDepth--;
251
+ else if (currentCharacter === "(") parenDepth++;
252
+ else if (currentCharacter === ")") parenDepth--;
253
+ }
254
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
255
+ let baseClassName = baseClassNameWithImportantModifier;
256
+ let hasImportantModifier = false;
257
+ if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
258
+ baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
259
+ hasImportantModifier = true;
260
+ } else if (
261
+ /**
262
+ * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
263
+ * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
264
+ */
265
+ baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)
266
+ ) {
267
+ baseClassName = baseClassNameWithImportantModifier.slice(1);
268
+ hasImportantModifier = true;
269
+ }
270
+ const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
271
+ return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
272
+ };
273
+ if (prefix) {
274
+ const fullPrefix = prefix + MODIFIER_SEPARATOR;
275
+ const parseClassNameOriginal = parseClassName;
276
+ parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, void 0, true);
277
+ }
278
+ if (experimentalParseClassName) {
279
+ const parseClassNameOriginal = parseClassName;
280
+ parseClassName = (className) => experimentalParseClassName({
281
+ className,
282
+ parseClassName: parseClassNameOriginal
283
+ });
284
+ }
285
+ return parseClassName;
286
+ };
287
+ var createSortModifiers = (config) => {
288
+ const modifierWeights = /* @__PURE__ */ new Map();
289
+ config.orderSensitiveModifiers.forEach((mod, index) => {
290
+ modifierWeights.set(mod, 1e6 + index);
291
+ });
292
+ return (modifiers) => {
293
+ const result = [];
294
+ let currentSegment = [];
295
+ for (let i = 0; i < modifiers.length; i++) {
296
+ const modifier = modifiers[i];
297
+ const isArbitrary = modifier[0] === "[";
298
+ const isOrderSensitive = modifierWeights.has(modifier);
299
+ if (isArbitrary || isOrderSensitive) {
300
+ if (currentSegment.length > 0) {
301
+ currentSegment.sort();
302
+ result.push(...currentSegment);
303
+ currentSegment = [];
304
+ }
305
+ result.push(modifier);
306
+ } else {
307
+ currentSegment.push(modifier);
308
+ }
309
+ }
310
+ if (currentSegment.length > 0) {
311
+ currentSegment.sort();
312
+ result.push(...currentSegment);
313
+ }
314
+ return result;
315
+ };
316
+ };
317
+ var createConfigUtils = (config) => ({
318
+ cache: createLruCache(config.cacheSize),
319
+ parseClassName: createParseClassName(config),
320
+ sortModifiers: createSortModifiers(config),
321
+ ...createClassGroupUtils(config)
322
+ });
323
+ var SPLIT_CLASSES_REGEX = /\s+/;
324
+ var mergeClassList = (classList, configUtils) => {
325
+ const {
326
+ parseClassName,
327
+ getClassGroupId,
328
+ getConflictingClassGroupIds,
329
+ sortModifiers
330
+ } = configUtils;
331
+ const classGroupsInConflict = [];
332
+ const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
333
+ let result = "";
334
+ for (let index = classNames.length - 1; index >= 0; index -= 1) {
335
+ const originalClassName = classNames[index];
336
+ const {
337
+ isExternal,
338
+ modifiers,
339
+ hasImportantModifier,
340
+ baseClassName,
341
+ maybePostfixModifierPosition
342
+ } = parseClassName(originalClassName);
343
+ if (isExternal) {
344
+ result = originalClassName + (result.length > 0 ? " " + result : result);
345
+ continue;
346
+ }
347
+ let hasPostfixModifier = !!maybePostfixModifierPosition;
348
+ let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
349
+ if (!classGroupId) {
350
+ if (!hasPostfixModifier) {
351
+ result = originalClassName + (result.length > 0 ? " " + result : result);
352
+ continue;
353
+ }
354
+ classGroupId = getClassGroupId(baseClassName);
355
+ if (!classGroupId) {
356
+ result = originalClassName + (result.length > 0 ? " " + result : result);
357
+ continue;
358
+ }
359
+ hasPostfixModifier = false;
360
+ }
361
+ const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":");
362
+ const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
363
+ const classId = modifierId + classGroupId;
364
+ if (classGroupsInConflict.indexOf(classId) > -1) {
365
+ continue;
366
+ }
367
+ classGroupsInConflict.push(classId);
368
+ const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
369
+ for (let i = 0; i < conflictGroups.length; ++i) {
370
+ const group = conflictGroups[i];
371
+ classGroupsInConflict.push(modifierId + group);
372
+ }
373
+ result = originalClassName + (result.length > 0 ? " " + result : result);
374
+ }
375
+ return result;
376
+ };
377
+ var twJoin = (...classLists) => {
378
+ let index = 0;
379
+ let argument;
380
+ let resolvedValue;
381
+ let string = "";
382
+ while (index < classLists.length) {
383
+ if (argument = classLists[index++]) {
384
+ if (resolvedValue = toValue(argument)) {
385
+ string && (string += " ");
386
+ string += resolvedValue;
387
+ }
388
+ }
389
+ }
390
+ return string;
391
+ };
392
+ var toValue = (mix) => {
393
+ if (typeof mix === "string") {
394
+ return mix;
395
+ }
396
+ let resolvedValue;
397
+ let string = "";
398
+ for (let k = 0; k < mix.length; k++) {
399
+ if (mix[k]) {
400
+ if (resolvedValue = toValue(mix[k])) {
401
+ string && (string += " ");
402
+ string += resolvedValue;
403
+ }
404
+ }
405
+ }
406
+ return string;
407
+ };
408
+ var createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
409
+ let configUtils;
410
+ let cacheGet;
411
+ let cacheSet;
412
+ let functionToCall;
413
+ const initTailwindMerge = (classList) => {
414
+ const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
415
+ configUtils = createConfigUtils(config);
416
+ cacheGet = configUtils.cache.get;
417
+ cacheSet = configUtils.cache.set;
418
+ functionToCall = tailwindMerge;
419
+ return tailwindMerge(classList);
420
+ };
421
+ const tailwindMerge = (classList) => {
422
+ const cachedResult = cacheGet(classList);
423
+ if (cachedResult) {
424
+ return cachedResult;
425
+ }
426
+ const result = mergeClassList(classList, configUtils);
427
+ cacheSet(classList, result);
428
+ return result;
429
+ };
430
+ functionToCall = initTailwindMerge;
431
+ return (...args) => functionToCall(twJoin(...args));
432
+ };
433
+ var fallbackThemeArr = [];
434
+ var fromTheme = (key) => {
435
+ const themeGetter = (theme) => theme[key] || fallbackThemeArr;
436
+ themeGetter.isThemeGetter = true;
437
+ return themeGetter;
438
+ };
439
+ var arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
440
+ var arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
441
+ var fractionRegex = /^\d+\/\d+$/;
442
+ var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
443
+ var lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
444
+ var colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
445
+ var shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
446
+ var imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
447
+ var isFraction = (value) => fractionRegex.test(value);
448
+ var isNumber = (value) => !!value && !Number.isNaN(Number(value));
449
+ var isInteger = (value) => !!value && Number.isInteger(Number(value));
450
+ var isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
451
+ var isTshirtSize = (value) => tshirtUnitRegex.test(value);
452
+ var isAny = () => true;
453
+ var isLengthOnly = (value) => (
454
+ // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
455
+ // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
456
+ // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
457
+ lengthUnitRegex.test(value) && !colorFunctionRegex.test(value)
458
+ );
459
+ var isNever = () => false;
460
+ var isShadow = (value) => shadowRegex.test(value);
461
+ var isImage = (value) => imageRegex.test(value);
462
+ var isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value);
463
+ var isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever);
464
+ var isArbitraryValue = (value) => arbitraryValueRegex.test(value);
465
+ var isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
466
+ var isArbitraryNumber = (value) => getIsArbitraryValue(value, isLabelNumber, isNumber);
467
+ var isArbitraryPosition = (value) => getIsArbitraryValue(value, isLabelPosition, isNever);
468
+ var isArbitraryImage = (value) => getIsArbitraryValue(value, isLabelImage, isImage);
469
+ var isArbitraryShadow = (value) => getIsArbitraryValue(value, isLabelShadow, isShadow);
470
+ var isArbitraryVariable = (value) => arbitraryVariableRegex.test(value);
471
+ var isArbitraryVariableLength = (value) => getIsArbitraryVariable(value, isLabelLength);
472
+ var isArbitraryVariableFamilyName = (value) => getIsArbitraryVariable(value, isLabelFamilyName);
473
+ var isArbitraryVariablePosition = (value) => getIsArbitraryVariable(value, isLabelPosition);
474
+ var isArbitraryVariableSize = (value) => getIsArbitraryVariable(value, isLabelSize);
475
+ var isArbitraryVariableImage = (value) => getIsArbitraryVariable(value, isLabelImage);
476
+ var isArbitraryVariableShadow = (value) => getIsArbitraryVariable(value, isLabelShadow, true);
477
+ var getIsArbitraryValue = (value, testLabel, testValue) => {
478
+ const result = arbitraryValueRegex.exec(value);
479
+ if (result) {
480
+ if (result[1]) {
481
+ return testLabel(result[1]);
482
+ }
483
+ return testValue(result[2]);
484
+ }
485
+ return false;
486
+ };
487
+ var getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {
488
+ const result = arbitraryVariableRegex.exec(value);
489
+ if (result) {
490
+ if (result[1]) {
491
+ return testLabel(result[1]);
492
+ }
493
+ return shouldMatchNoLabel;
494
+ }
495
+ return false;
496
+ };
497
+ var isLabelPosition = (label) => label === "position" || label === "percentage";
498
+ var isLabelImage = (label) => label === "image" || label === "url";
499
+ var isLabelSize = (label) => label === "length" || label === "size" || label === "bg-size";
500
+ var isLabelLength = (label) => label === "length";
501
+ var isLabelNumber = (label) => label === "number";
502
+ var isLabelFamilyName = (label) => label === "family-name";
503
+ var isLabelShadow = (label) => label === "shadow";
504
+ var getDefaultConfig = () => {
505
+ const themeColor = fromTheme("color");
506
+ const themeFont = fromTheme("font");
507
+ const themeText = fromTheme("text");
508
+ const themeFontWeight = fromTheme("font-weight");
509
+ const themeTracking = fromTheme("tracking");
510
+ const themeLeading = fromTheme("leading");
511
+ const themeBreakpoint = fromTheme("breakpoint");
512
+ const themeContainer = fromTheme("container");
513
+ const themeSpacing = fromTheme("spacing");
514
+ const themeRadius = fromTheme("radius");
515
+ const themeShadow = fromTheme("shadow");
516
+ const themeInsetShadow = fromTheme("inset-shadow");
517
+ const themeTextShadow = fromTheme("text-shadow");
518
+ const themeDropShadow = fromTheme("drop-shadow");
519
+ const themeBlur = fromTheme("blur");
520
+ const themePerspective = fromTheme("perspective");
521
+ const themeAspect = fromTheme("aspect");
522
+ const themeEase = fromTheme("ease");
523
+ const themeAnimate = fromTheme("animate");
524
+ const scaleBreak = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
525
+ const scalePosition = () => [
526
+ "center",
527
+ "top",
528
+ "bottom",
529
+ "left",
530
+ "right",
531
+ "top-left",
532
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
533
+ "left-top",
534
+ "top-right",
535
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
536
+ "right-top",
537
+ "bottom-right",
538
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
539
+ "right-bottom",
540
+ "bottom-left",
541
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
542
+ "left-bottom"
543
+ ];
544
+ const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];
545
+ const scaleOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
546
+ const scaleOverscroll = () => ["auto", "contain", "none"];
547
+ const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];
548
+ const scaleInset = () => [isFraction, "full", "auto", ...scaleUnambiguousSpacing()];
549
+ const scaleGridTemplateColsRows = () => [isInteger, "none", "subgrid", isArbitraryVariable, isArbitraryValue];
550
+ const scaleGridColRowStartAndEnd = () => ["auto", {
551
+ span: ["full", isInteger, isArbitraryVariable, isArbitraryValue]
552
+ }, isInteger, isArbitraryVariable, isArbitraryValue];
553
+ const scaleGridColRowStartOrEnd = () => [isInteger, "auto", isArbitraryVariable, isArbitraryValue];
554
+ const scaleGridAutoColsRows = () => ["auto", "min", "max", "fr", isArbitraryVariable, isArbitraryValue];
555
+ const scaleAlignPrimaryAxis = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"];
556
+ const scaleAlignSecondaryAxis = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"];
557
+ const scaleMargin = () => ["auto", ...scaleUnambiguousSpacing()];
558
+ const scaleSizing = () => [isFraction, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...scaleUnambiguousSpacing()];
559
+ const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
560
+ const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {
561
+ position: [isArbitraryVariable, isArbitraryValue]
562
+ }];
563
+ const scaleBgRepeat = () => ["no-repeat", {
564
+ repeat: ["", "x", "y", "space", "round"]
565
+ }];
566
+ const scaleBgSize = () => ["auto", "cover", "contain", isArbitraryVariableSize, isArbitrarySize, {
567
+ size: [isArbitraryVariable, isArbitraryValue]
568
+ }];
569
+ const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];
570
+ const scaleRadius = () => [
571
+ // Deprecated since Tailwind CSS v4.0.0
572
+ "",
573
+ "none",
574
+ "full",
575
+ themeRadius,
576
+ isArbitraryVariable,
577
+ isArbitraryValue
578
+ ];
579
+ const scaleBorderWidth = () => ["", isNumber, isArbitraryVariableLength, isArbitraryLength];
580
+ const scaleLineStyle = () => ["solid", "dashed", "dotted", "double"];
581
+ const scaleBlendMode = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
582
+ const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];
583
+ const scaleBlur = () => [
584
+ // Deprecated since Tailwind CSS v4.0.0
585
+ "",
586
+ "none",
587
+ themeBlur,
588
+ isArbitraryVariable,
589
+ isArbitraryValue
590
+ ];
591
+ const scaleRotate = () => ["none", isNumber, isArbitraryVariable, isArbitraryValue];
592
+ const scaleScale = () => ["none", isNumber, isArbitraryVariable, isArbitraryValue];
593
+ const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];
594
+ const scaleTranslate = () => [isFraction, "full", ...scaleUnambiguousSpacing()];
595
+ return {
596
+ cacheSize: 500,
597
+ theme: {
598
+ animate: ["spin", "ping", "pulse", "bounce"],
599
+ aspect: ["video"],
600
+ blur: [isTshirtSize],
601
+ breakpoint: [isTshirtSize],
602
+ color: [isAny],
603
+ container: [isTshirtSize],
604
+ "drop-shadow": [isTshirtSize],
605
+ ease: ["in", "out", "in-out"],
606
+ font: [isAnyNonArbitrary],
607
+ "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
608
+ "inset-shadow": [isTshirtSize],
609
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
610
+ perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
611
+ radius: [isTshirtSize],
612
+ shadow: [isTshirtSize],
613
+ spacing: ["px", isNumber],
614
+ text: [isTshirtSize],
615
+ "text-shadow": [isTshirtSize],
616
+ tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
617
+ },
618
+ classGroups: {
619
+ // --------------
620
+ // --- Layout ---
621
+ // --------------
622
+ /**
623
+ * Aspect Ratio
624
+ * @see https://tailwindcss.com/docs/aspect-ratio
625
+ */
626
+ aspect: [{
627
+ aspect: ["auto", "square", isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]
628
+ }],
629
+ /**
630
+ * Container
631
+ * @see https://tailwindcss.com/docs/container
632
+ * @deprecated since Tailwind CSS v4.0.0
633
+ */
634
+ container: ["container"],
635
+ /**
636
+ * Columns
637
+ * @see https://tailwindcss.com/docs/columns
638
+ */
639
+ columns: [{
640
+ columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]
641
+ }],
642
+ /**
643
+ * Break After
644
+ * @see https://tailwindcss.com/docs/break-after
645
+ */
646
+ "break-after": [{
647
+ "break-after": scaleBreak()
648
+ }],
649
+ /**
650
+ * Break Before
651
+ * @see https://tailwindcss.com/docs/break-before
652
+ */
653
+ "break-before": [{
654
+ "break-before": scaleBreak()
655
+ }],
656
+ /**
657
+ * Break Inside
658
+ * @see https://tailwindcss.com/docs/break-inside
659
+ */
660
+ "break-inside": [{
661
+ "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
662
+ }],
663
+ /**
664
+ * Box Decoration Break
665
+ * @see https://tailwindcss.com/docs/box-decoration-break
666
+ */
667
+ "box-decoration": [{
668
+ "box-decoration": ["slice", "clone"]
669
+ }],
670
+ /**
671
+ * Box Sizing
672
+ * @see https://tailwindcss.com/docs/box-sizing
673
+ */
674
+ box: [{
675
+ box: ["border", "content"]
676
+ }],
677
+ /**
678
+ * Display
679
+ * @see https://tailwindcss.com/docs/display
680
+ */
681
+ display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
682
+ /**
683
+ * Screen Reader Only
684
+ * @see https://tailwindcss.com/docs/display#screen-reader-only
685
+ */
686
+ sr: ["sr-only", "not-sr-only"],
687
+ /**
688
+ * Floats
689
+ * @see https://tailwindcss.com/docs/float
690
+ */
691
+ float: [{
692
+ float: ["right", "left", "none", "start", "end"]
693
+ }],
694
+ /**
695
+ * Clear
696
+ * @see https://tailwindcss.com/docs/clear
697
+ */
698
+ clear: [{
699
+ clear: ["left", "right", "both", "none", "start", "end"]
700
+ }],
701
+ /**
702
+ * Isolation
703
+ * @see https://tailwindcss.com/docs/isolation
704
+ */
705
+ isolation: ["isolate", "isolation-auto"],
706
+ /**
707
+ * Object Fit
708
+ * @see https://tailwindcss.com/docs/object-fit
709
+ */
710
+ "object-fit": [{
711
+ object: ["contain", "cover", "fill", "none", "scale-down"]
712
+ }],
713
+ /**
714
+ * Object Position
715
+ * @see https://tailwindcss.com/docs/object-position
716
+ */
717
+ "object-position": [{
718
+ object: scalePositionWithArbitrary()
719
+ }],
720
+ /**
721
+ * Overflow
722
+ * @see https://tailwindcss.com/docs/overflow
723
+ */
724
+ overflow: [{
725
+ overflow: scaleOverflow()
726
+ }],
727
+ /**
728
+ * Overflow X
729
+ * @see https://tailwindcss.com/docs/overflow
730
+ */
731
+ "overflow-x": [{
732
+ "overflow-x": scaleOverflow()
733
+ }],
734
+ /**
735
+ * Overflow Y
736
+ * @see https://tailwindcss.com/docs/overflow
737
+ */
738
+ "overflow-y": [{
739
+ "overflow-y": scaleOverflow()
740
+ }],
741
+ /**
742
+ * Overscroll Behavior
743
+ * @see https://tailwindcss.com/docs/overscroll-behavior
744
+ */
745
+ overscroll: [{
746
+ overscroll: scaleOverscroll()
747
+ }],
748
+ /**
749
+ * Overscroll Behavior X
750
+ * @see https://tailwindcss.com/docs/overscroll-behavior
751
+ */
752
+ "overscroll-x": [{
753
+ "overscroll-x": scaleOverscroll()
754
+ }],
755
+ /**
756
+ * Overscroll Behavior Y
757
+ * @see https://tailwindcss.com/docs/overscroll-behavior
758
+ */
759
+ "overscroll-y": [{
760
+ "overscroll-y": scaleOverscroll()
761
+ }],
762
+ /**
763
+ * Position
764
+ * @see https://tailwindcss.com/docs/position
765
+ */
766
+ position: ["static", "fixed", "absolute", "relative", "sticky"],
767
+ /**
768
+ * Top / Right / Bottom / Left
769
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
770
+ */
771
+ inset: [{
772
+ inset: scaleInset()
773
+ }],
774
+ /**
775
+ * Right / Left
776
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
777
+ */
778
+ "inset-x": [{
779
+ "inset-x": scaleInset()
780
+ }],
781
+ /**
782
+ * Top / Bottom
783
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
784
+ */
785
+ "inset-y": [{
786
+ "inset-y": scaleInset()
787
+ }],
788
+ /**
789
+ * Start
790
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
791
+ */
792
+ start: [{
793
+ start: scaleInset()
794
+ }],
795
+ /**
796
+ * End
797
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
798
+ */
799
+ end: [{
800
+ end: scaleInset()
801
+ }],
802
+ /**
803
+ * Top
804
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
805
+ */
806
+ top: [{
807
+ top: scaleInset()
808
+ }],
809
+ /**
810
+ * Right
811
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
812
+ */
813
+ right: [{
814
+ right: scaleInset()
815
+ }],
816
+ /**
817
+ * Bottom
818
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
819
+ */
820
+ bottom: [{
821
+ bottom: scaleInset()
822
+ }],
823
+ /**
824
+ * Left
825
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
826
+ */
827
+ left: [{
828
+ left: scaleInset()
829
+ }],
830
+ /**
831
+ * Visibility
832
+ * @see https://tailwindcss.com/docs/visibility
833
+ */
834
+ visibility: ["visible", "invisible", "collapse"],
835
+ /**
836
+ * Z-Index
837
+ * @see https://tailwindcss.com/docs/z-index
838
+ */
839
+ z: [{
840
+ z: [isInteger, "auto", isArbitraryVariable, isArbitraryValue]
841
+ }],
842
+ // ------------------------
843
+ // --- Flexbox and Grid ---
844
+ // ------------------------
845
+ /**
846
+ * Flex Basis
847
+ * @see https://tailwindcss.com/docs/flex-basis
848
+ */
849
+ basis: [{
850
+ basis: [isFraction, "full", "auto", themeContainer, ...scaleUnambiguousSpacing()]
851
+ }],
852
+ /**
853
+ * Flex Direction
854
+ * @see https://tailwindcss.com/docs/flex-direction
855
+ */
856
+ "flex-direction": [{
857
+ flex: ["row", "row-reverse", "col", "col-reverse"]
858
+ }],
859
+ /**
860
+ * Flex Wrap
861
+ * @see https://tailwindcss.com/docs/flex-wrap
862
+ */
863
+ "flex-wrap": [{
864
+ flex: ["nowrap", "wrap", "wrap-reverse"]
865
+ }],
866
+ /**
867
+ * Flex
868
+ * @see https://tailwindcss.com/docs/flex
869
+ */
870
+ flex: [{
871
+ flex: [isNumber, isFraction, "auto", "initial", "none", isArbitraryValue]
872
+ }],
873
+ /**
874
+ * Flex Grow
875
+ * @see https://tailwindcss.com/docs/flex-grow
876
+ */
877
+ grow: [{
878
+ grow: ["", isNumber, isArbitraryVariable, isArbitraryValue]
879
+ }],
880
+ /**
881
+ * Flex Shrink
882
+ * @see https://tailwindcss.com/docs/flex-shrink
883
+ */
884
+ shrink: [{
885
+ shrink: ["", isNumber, isArbitraryVariable, isArbitraryValue]
886
+ }],
887
+ /**
888
+ * Order
889
+ * @see https://tailwindcss.com/docs/order
890
+ */
891
+ order: [{
892
+ order: [isInteger, "first", "last", "none", isArbitraryVariable, isArbitraryValue]
893
+ }],
894
+ /**
895
+ * Grid Template Columns
896
+ * @see https://tailwindcss.com/docs/grid-template-columns
897
+ */
898
+ "grid-cols": [{
899
+ "grid-cols": scaleGridTemplateColsRows()
900
+ }],
901
+ /**
902
+ * Grid Column Start / End
903
+ * @see https://tailwindcss.com/docs/grid-column
904
+ */
905
+ "col-start-end": [{
906
+ col: scaleGridColRowStartAndEnd()
907
+ }],
908
+ /**
909
+ * Grid Column Start
910
+ * @see https://tailwindcss.com/docs/grid-column
911
+ */
912
+ "col-start": [{
913
+ "col-start": scaleGridColRowStartOrEnd()
914
+ }],
915
+ /**
916
+ * Grid Column End
917
+ * @see https://tailwindcss.com/docs/grid-column
918
+ */
919
+ "col-end": [{
920
+ "col-end": scaleGridColRowStartOrEnd()
921
+ }],
922
+ /**
923
+ * Grid Template Rows
924
+ * @see https://tailwindcss.com/docs/grid-template-rows
925
+ */
926
+ "grid-rows": [{
927
+ "grid-rows": scaleGridTemplateColsRows()
928
+ }],
929
+ /**
930
+ * Grid Row Start / End
931
+ * @see https://tailwindcss.com/docs/grid-row
932
+ */
933
+ "row-start-end": [{
934
+ row: scaleGridColRowStartAndEnd()
935
+ }],
936
+ /**
937
+ * Grid Row Start
938
+ * @see https://tailwindcss.com/docs/grid-row
939
+ */
940
+ "row-start": [{
941
+ "row-start": scaleGridColRowStartOrEnd()
942
+ }],
943
+ /**
944
+ * Grid Row End
945
+ * @see https://tailwindcss.com/docs/grid-row
946
+ */
947
+ "row-end": [{
948
+ "row-end": scaleGridColRowStartOrEnd()
949
+ }],
950
+ /**
951
+ * Grid Auto Flow
952
+ * @see https://tailwindcss.com/docs/grid-auto-flow
953
+ */
954
+ "grid-flow": [{
955
+ "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
956
+ }],
957
+ /**
958
+ * Grid Auto Columns
959
+ * @see https://tailwindcss.com/docs/grid-auto-columns
960
+ */
961
+ "auto-cols": [{
962
+ "auto-cols": scaleGridAutoColsRows()
963
+ }],
964
+ /**
965
+ * Grid Auto Rows
966
+ * @see https://tailwindcss.com/docs/grid-auto-rows
967
+ */
968
+ "auto-rows": [{
969
+ "auto-rows": scaleGridAutoColsRows()
970
+ }],
971
+ /**
972
+ * Gap
973
+ * @see https://tailwindcss.com/docs/gap
974
+ */
975
+ gap: [{
976
+ gap: scaleUnambiguousSpacing()
977
+ }],
978
+ /**
979
+ * Gap X
980
+ * @see https://tailwindcss.com/docs/gap
981
+ */
982
+ "gap-x": [{
983
+ "gap-x": scaleUnambiguousSpacing()
984
+ }],
985
+ /**
986
+ * Gap Y
987
+ * @see https://tailwindcss.com/docs/gap
988
+ */
989
+ "gap-y": [{
990
+ "gap-y": scaleUnambiguousSpacing()
991
+ }],
992
+ /**
993
+ * Justify Content
994
+ * @see https://tailwindcss.com/docs/justify-content
995
+ */
996
+ "justify-content": [{
997
+ justify: [...scaleAlignPrimaryAxis(), "normal"]
998
+ }],
999
+ /**
1000
+ * Justify Items
1001
+ * @see https://tailwindcss.com/docs/justify-items
1002
+ */
1003
+ "justify-items": [{
1004
+ "justify-items": [...scaleAlignSecondaryAxis(), "normal"]
1005
+ }],
1006
+ /**
1007
+ * Justify Self
1008
+ * @see https://tailwindcss.com/docs/justify-self
1009
+ */
1010
+ "justify-self": [{
1011
+ "justify-self": ["auto", ...scaleAlignSecondaryAxis()]
1012
+ }],
1013
+ /**
1014
+ * Align Content
1015
+ * @see https://tailwindcss.com/docs/align-content
1016
+ */
1017
+ "align-content": [{
1018
+ content: ["normal", ...scaleAlignPrimaryAxis()]
1019
+ }],
1020
+ /**
1021
+ * Align Items
1022
+ * @see https://tailwindcss.com/docs/align-items
1023
+ */
1024
+ "align-items": [{
1025
+ items: [...scaleAlignSecondaryAxis(), {
1026
+ baseline: ["", "last"]
1027
+ }]
1028
+ }],
1029
+ /**
1030
+ * Align Self
1031
+ * @see https://tailwindcss.com/docs/align-self
1032
+ */
1033
+ "align-self": [{
1034
+ self: ["auto", ...scaleAlignSecondaryAxis(), {
1035
+ baseline: ["", "last"]
1036
+ }]
1037
+ }],
1038
+ /**
1039
+ * Place Content
1040
+ * @see https://tailwindcss.com/docs/place-content
1041
+ */
1042
+ "place-content": [{
1043
+ "place-content": scaleAlignPrimaryAxis()
1044
+ }],
1045
+ /**
1046
+ * Place Items
1047
+ * @see https://tailwindcss.com/docs/place-items
1048
+ */
1049
+ "place-items": [{
1050
+ "place-items": [...scaleAlignSecondaryAxis(), "baseline"]
1051
+ }],
1052
+ /**
1053
+ * Place Self
1054
+ * @see https://tailwindcss.com/docs/place-self
1055
+ */
1056
+ "place-self": [{
1057
+ "place-self": ["auto", ...scaleAlignSecondaryAxis()]
1058
+ }],
1059
+ // Spacing
1060
+ /**
1061
+ * Padding
1062
+ * @see https://tailwindcss.com/docs/padding
1063
+ */
1064
+ p: [{
1065
+ p: scaleUnambiguousSpacing()
1066
+ }],
1067
+ /**
1068
+ * Padding X
1069
+ * @see https://tailwindcss.com/docs/padding
1070
+ */
1071
+ px: [{
1072
+ px: scaleUnambiguousSpacing()
1073
+ }],
1074
+ /**
1075
+ * Padding Y
1076
+ * @see https://tailwindcss.com/docs/padding
1077
+ */
1078
+ py: [{
1079
+ py: scaleUnambiguousSpacing()
1080
+ }],
1081
+ /**
1082
+ * Padding Start
1083
+ * @see https://tailwindcss.com/docs/padding
1084
+ */
1085
+ ps: [{
1086
+ ps: scaleUnambiguousSpacing()
1087
+ }],
1088
+ /**
1089
+ * Padding End
1090
+ * @see https://tailwindcss.com/docs/padding
1091
+ */
1092
+ pe: [{
1093
+ pe: scaleUnambiguousSpacing()
1094
+ }],
1095
+ /**
1096
+ * Padding Top
1097
+ * @see https://tailwindcss.com/docs/padding
1098
+ */
1099
+ pt: [{
1100
+ pt: scaleUnambiguousSpacing()
1101
+ }],
1102
+ /**
1103
+ * Padding Right
1104
+ * @see https://tailwindcss.com/docs/padding
1105
+ */
1106
+ pr: [{
1107
+ pr: scaleUnambiguousSpacing()
1108
+ }],
1109
+ /**
1110
+ * Padding Bottom
1111
+ * @see https://tailwindcss.com/docs/padding
1112
+ */
1113
+ pb: [{
1114
+ pb: scaleUnambiguousSpacing()
1115
+ }],
1116
+ /**
1117
+ * Padding Left
1118
+ * @see https://tailwindcss.com/docs/padding
1119
+ */
1120
+ pl: [{
1121
+ pl: scaleUnambiguousSpacing()
1122
+ }],
1123
+ /**
1124
+ * Margin
1125
+ * @see https://tailwindcss.com/docs/margin
1126
+ */
1127
+ m: [{
1128
+ m: scaleMargin()
1129
+ }],
1130
+ /**
1131
+ * Margin X
1132
+ * @see https://tailwindcss.com/docs/margin
1133
+ */
1134
+ mx: [{
1135
+ mx: scaleMargin()
1136
+ }],
1137
+ /**
1138
+ * Margin Y
1139
+ * @see https://tailwindcss.com/docs/margin
1140
+ */
1141
+ my: [{
1142
+ my: scaleMargin()
1143
+ }],
1144
+ /**
1145
+ * Margin Start
1146
+ * @see https://tailwindcss.com/docs/margin
1147
+ */
1148
+ ms: [{
1149
+ ms: scaleMargin()
1150
+ }],
1151
+ /**
1152
+ * Margin End
1153
+ * @see https://tailwindcss.com/docs/margin
1154
+ */
1155
+ me: [{
1156
+ me: scaleMargin()
1157
+ }],
1158
+ /**
1159
+ * Margin Top
1160
+ * @see https://tailwindcss.com/docs/margin
1161
+ */
1162
+ mt: [{
1163
+ mt: scaleMargin()
1164
+ }],
1165
+ /**
1166
+ * Margin Right
1167
+ * @see https://tailwindcss.com/docs/margin
1168
+ */
1169
+ mr: [{
1170
+ mr: scaleMargin()
1171
+ }],
1172
+ /**
1173
+ * Margin Bottom
1174
+ * @see https://tailwindcss.com/docs/margin
1175
+ */
1176
+ mb: [{
1177
+ mb: scaleMargin()
1178
+ }],
1179
+ /**
1180
+ * Margin Left
1181
+ * @see https://tailwindcss.com/docs/margin
1182
+ */
1183
+ ml: [{
1184
+ ml: scaleMargin()
1185
+ }],
1186
+ /**
1187
+ * Space Between X
1188
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1189
+ */
1190
+ "space-x": [{
1191
+ "space-x": scaleUnambiguousSpacing()
1192
+ }],
1193
+ /**
1194
+ * Space Between X Reverse
1195
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1196
+ */
1197
+ "space-x-reverse": ["space-x-reverse"],
1198
+ /**
1199
+ * Space Between Y
1200
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1201
+ */
1202
+ "space-y": [{
1203
+ "space-y": scaleUnambiguousSpacing()
1204
+ }],
1205
+ /**
1206
+ * Space Between Y Reverse
1207
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1208
+ */
1209
+ "space-y-reverse": ["space-y-reverse"],
1210
+ // --------------
1211
+ // --- Sizing ---
1212
+ // --------------
1213
+ /**
1214
+ * Size
1215
+ * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
1216
+ */
1217
+ size: [{
1218
+ size: scaleSizing()
1219
+ }],
1220
+ /**
1221
+ * Width
1222
+ * @see https://tailwindcss.com/docs/width
1223
+ */
1224
+ w: [{
1225
+ w: [themeContainer, "screen", ...scaleSizing()]
1226
+ }],
1227
+ /**
1228
+ * Min-Width
1229
+ * @see https://tailwindcss.com/docs/min-width
1230
+ */
1231
+ "min-w": [{
1232
+ "min-w": [
1233
+ themeContainer,
1234
+ "screen",
1235
+ /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1236
+ "none",
1237
+ ...scaleSizing()
1238
+ ]
1239
+ }],
1240
+ /**
1241
+ * Max-Width
1242
+ * @see https://tailwindcss.com/docs/max-width
1243
+ */
1244
+ "max-w": [{
1245
+ "max-w": [
1246
+ themeContainer,
1247
+ "screen",
1248
+ "none",
1249
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1250
+ "prose",
1251
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1252
+ {
1253
+ screen: [themeBreakpoint]
1254
+ },
1255
+ ...scaleSizing()
1256
+ ]
1257
+ }],
1258
+ /**
1259
+ * Height
1260
+ * @see https://tailwindcss.com/docs/height
1261
+ */
1262
+ h: [{
1263
+ h: ["screen", "lh", ...scaleSizing()]
1264
+ }],
1265
+ /**
1266
+ * Min-Height
1267
+ * @see https://tailwindcss.com/docs/min-height
1268
+ */
1269
+ "min-h": [{
1270
+ "min-h": ["screen", "lh", "none", ...scaleSizing()]
1271
+ }],
1272
+ /**
1273
+ * Max-Height
1274
+ * @see https://tailwindcss.com/docs/max-height
1275
+ */
1276
+ "max-h": [{
1277
+ "max-h": ["screen", "lh", ...scaleSizing()]
1278
+ }],
1279
+ // ------------------
1280
+ // --- Typography ---
1281
+ // ------------------
1282
+ /**
1283
+ * Font Size
1284
+ * @see https://tailwindcss.com/docs/font-size
1285
+ */
1286
+ "font-size": [{
1287
+ text: ["base", themeText, isArbitraryVariableLength, isArbitraryLength]
1288
+ }],
1289
+ /**
1290
+ * Font Smoothing
1291
+ * @see https://tailwindcss.com/docs/font-smoothing
1292
+ */
1293
+ "font-smoothing": ["antialiased", "subpixel-antialiased"],
1294
+ /**
1295
+ * Font Style
1296
+ * @see https://tailwindcss.com/docs/font-style
1297
+ */
1298
+ "font-style": ["italic", "not-italic"],
1299
+ /**
1300
+ * Font Weight
1301
+ * @see https://tailwindcss.com/docs/font-weight
1302
+ */
1303
+ "font-weight": [{
1304
+ font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber]
1305
+ }],
1306
+ /**
1307
+ * Font Stretch
1308
+ * @see https://tailwindcss.com/docs/font-stretch
1309
+ */
1310
+ "font-stretch": [{
1311
+ "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", isPercent, isArbitraryValue]
1312
+ }],
1313
+ /**
1314
+ * Font Family
1315
+ * @see https://tailwindcss.com/docs/font-family
1316
+ */
1317
+ "font-family": [{
1318
+ font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont]
1319
+ }],
1320
+ /**
1321
+ * Font Variant Numeric
1322
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1323
+ */
1324
+ "fvn-normal": ["normal-nums"],
1325
+ /**
1326
+ * Font Variant Numeric
1327
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1328
+ */
1329
+ "fvn-ordinal": ["ordinal"],
1330
+ /**
1331
+ * Font Variant Numeric
1332
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1333
+ */
1334
+ "fvn-slashed-zero": ["slashed-zero"],
1335
+ /**
1336
+ * Font Variant Numeric
1337
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1338
+ */
1339
+ "fvn-figure": ["lining-nums", "oldstyle-nums"],
1340
+ /**
1341
+ * Font Variant Numeric
1342
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1343
+ */
1344
+ "fvn-spacing": ["proportional-nums", "tabular-nums"],
1345
+ /**
1346
+ * Font Variant Numeric
1347
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1348
+ */
1349
+ "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
1350
+ /**
1351
+ * Letter Spacing
1352
+ * @see https://tailwindcss.com/docs/letter-spacing
1353
+ */
1354
+ tracking: [{
1355
+ tracking: [themeTracking, isArbitraryVariable, isArbitraryValue]
1356
+ }],
1357
+ /**
1358
+ * Line Clamp
1359
+ * @see https://tailwindcss.com/docs/line-clamp
1360
+ */
1361
+ "line-clamp": [{
1362
+ "line-clamp": [isNumber, "none", isArbitraryVariable, isArbitraryNumber]
1363
+ }],
1364
+ /**
1365
+ * Line Height
1366
+ * @see https://tailwindcss.com/docs/line-height
1367
+ */
1368
+ leading: [{
1369
+ leading: [
1370
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1371
+ themeLeading,
1372
+ ...scaleUnambiguousSpacing()
1373
+ ]
1374
+ }],
1375
+ /**
1376
+ * List Style Image
1377
+ * @see https://tailwindcss.com/docs/list-style-image
1378
+ */
1379
+ "list-image": [{
1380
+ "list-image": ["none", isArbitraryVariable, isArbitraryValue]
1381
+ }],
1382
+ /**
1383
+ * List Style Position
1384
+ * @see https://tailwindcss.com/docs/list-style-position
1385
+ */
1386
+ "list-style-position": [{
1387
+ list: ["inside", "outside"]
1388
+ }],
1389
+ /**
1390
+ * List Style Type
1391
+ * @see https://tailwindcss.com/docs/list-style-type
1392
+ */
1393
+ "list-style-type": [{
1394
+ list: ["disc", "decimal", "none", isArbitraryVariable, isArbitraryValue]
1395
+ }],
1396
+ /**
1397
+ * Text Alignment
1398
+ * @see https://tailwindcss.com/docs/text-align
1399
+ */
1400
+ "text-alignment": [{
1401
+ text: ["left", "center", "right", "justify", "start", "end"]
1402
+ }],
1403
+ /**
1404
+ * Placeholder Color
1405
+ * @deprecated since Tailwind CSS v3.0.0
1406
+ * @see https://v3.tailwindcss.com/docs/placeholder-color
1407
+ */
1408
+ "placeholder-color": [{
1409
+ placeholder: scaleColor()
1410
+ }],
1411
+ /**
1412
+ * Text Color
1413
+ * @see https://tailwindcss.com/docs/text-color
1414
+ */
1415
+ "text-color": [{
1416
+ text: scaleColor()
1417
+ }],
1418
+ /**
1419
+ * Text Decoration
1420
+ * @see https://tailwindcss.com/docs/text-decoration
1421
+ */
1422
+ "text-decoration": ["underline", "overline", "line-through", "no-underline"],
1423
+ /**
1424
+ * Text Decoration Style
1425
+ * @see https://tailwindcss.com/docs/text-decoration-style
1426
+ */
1427
+ "text-decoration-style": [{
1428
+ decoration: [...scaleLineStyle(), "wavy"]
1429
+ }],
1430
+ /**
1431
+ * Text Decoration Thickness
1432
+ * @see https://tailwindcss.com/docs/text-decoration-thickness
1433
+ */
1434
+ "text-decoration-thickness": [{
1435
+ decoration: [isNumber, "from-font", "auto", isArbitraryVariable, isArbitraryLength]
1436
+ }],
1437
+ /**
1438
+ * Text Decoration Color
1439
+ * @see https://tailwindcss.com/docs/text-decoration-color
1440
+ */
1441
+ "text-decoration-color": [{
1442
+ decoration: scaleColor()
1443
+ }],
1444
+ /**
1445
+ * Text Underline Offset
1446
+ * @see https://tailwindcss.com/docs/text-underline-offset
1447
+ */
1448
+ "underline-offset": [{
1449
+ "underline-offset": [isNumber, "auto", isArbitraryVariable, isArbitraryValue]
1450
+ }],
1451
+ /**
1452
+ * Text Transform
1453
+ * @see https://tailwindcss.com/docs/text-transform
1454
+ */
1455
+ "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
1456
+ /**
1457
+ * Text Overflow
1458
+ * @see https://tailwindcss.com/docs/text-overflow
1459
+ */
1460
+ "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
1461
+ /**
1462
+ * Text Wrap
1463
+ * @see https://tailwindcss.com/docs/text-wrap
1464
+ */
1465
+ "text-wrap": [{
1466
+ text: ["wrap", "nowrap", "balance", "pretty"]
1467
+ }],
1468
+ /**
1469
+ * Text Indent
1470
+ * @see https://tailwindcss.com/docs/text-indent
1471
+ */
1472
+ indent: [{
1473
+ indent: scaleUnambiguousSpacing()
1474
+ }],
1475
+ /**
1476
+ * Vertical Alignment
1477
+ * @see https://tailwindcss.com/docs/vertical-align
1478
+ */
1479
+ "vertical-align": [{
1480
+ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryVariable, isArbitraryValue]
1481
+ }],
1482
+ /**
1483
+ * Whitespace
1484
+ * @see https://tailwindcss.com/docs/whitespace
1485
+ */
1486
+ whitespace: [{
1487
+ whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
1488
+ }],
1489
+ /**
1490
+ * Word Break
1491
+ * @see https://tailwindcss.com/docs/word-break
1492
+ */
1493
+ break: [{
1494
+ break: ["normal", "words", "all", "keep"]
1495
+ }],
1496
+ /**
1497
+ * Overflow Wrap
1498
+ * @see https://tailwindcss.com/docs/overflow-wrap
1499
+ */
1500
+ wrap: [{
1501
+ wrap: ["break-word", "anywhere", "normal"]
1502
+ }],
1503
+ /**
1504
+ * Hyphens
1505
+ * @see https://tailwindcss.com/docs/hyphens
1506
+ */
1507
+ hyphens: [{
1508
+ hyphens: ["none", "manual", "auto"]
1509
+ }],
1510
+ /**
1511
+ * Content
1512
+ * @see https://tailwindcss.com/docs/content
1513
+ */
1514
+ content: [{
1515
+ content: ["none", isArbitraryVariable, isArbitraryValue]
1516
+ }],
1517
+ // -------------------
1518
+ // --- Backgrounds ---
1519
+ // -------------------
1520
+ /**
1521
+ * Background Attachment
1522
+ * @see https://tailwindcss.com/docs/background-attachment
1523
+ */
1524
+ "bg-attachment": [{
1525
+ bg: ["fixed", "local", "scroll"]
1526
+ }],
1527
+ /**
1528
+ * Background Clip
1529
+ * @see https://tailwindcss.com/docs/background-clip
1530
+ */
1531
+ "bg-clip": [{
1532
+ "bg-clip": ["border", "padding", "content", "text"]
1533
+ }],
1534
+ /**
1535
+ * Background Origin
1536
+ * @see https://tailwindcss.com/docs/background-origin
1537
+ */
1538
+ "bg-origin": [{
1539
+ "bg-origin": ["border", "padding", "content"]
1540
+ }],
1541
+ /**
1542
+ * Background Position
1543
+ * @see https://tailwindcss.com/docs/background-position
1544
+ */
1545
+ "bg-position": [{
1546
+ bg: scaleBgPosition()
1547
+ }],
1548
+ /**
1549
+ * Background Repeat
1550
+ * @see https://tailwindcss.com/docs/background-repeat
1551
+ */
1552
+ "bg-repeat": [{
1553
+ bg: scaleBgRepeat()
1554
+ }],
1555
+ /**
1556
+ * Background Size
1557
+ * @see https://tailwindcss.com/docs/background-size
1558
+ */
1559
+ "bg-size": [{
1560
+ bg: scaleBgSize()
1561
+ }],
1562
+ /**
1563
+ * Background Image
1564
+ * @see https://tailwindcss.com/docs/background-image
1565
+ */
1566
+ "bg-image": [{
1567
+ bg: ["none", {
1568
+ linear: [{
1569
+ to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1570
+ }, isInteger, isArbitraryVariable, isArbitraryValue],
1571
+ radial: ["", isArbitraryVariable, isArbitraryValue],
1572
+ conic: [isInteger, isArbitraryVariable, isArbitraryValue]
1573
+ }, isArbitraryVariableImage, isArbitraryImage]
1574
+ }],
1575
+ /**
1576
+ * Background Color
1577
+ * @see https://tailwindcss.com/docs/background-color
1578
+ */
1579
+ "bg-color": [{
1580
+ bg: scaleColor()
1581
+ }],
1582
+ /**
1583
+ * Gradient Color Stops From Position
1584
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1585
+ */
1586
+ "gradient-from-pos": [{
1587
+ from: scaleGradientStopPosition()
1588
+ }],
1589
+ /**
1590
+ * Gradient Color Stops Via Position
1591
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1592
+ */
1593
+ "gradient-via-pos": [{
1594
+ via: scaleGradientStopPosition()
1595
+ }],
1596
+ /**
1597
+ * Gradient Color Stops To Position
1598
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1599
+ */
1600
+ "gradient-to-pos": [{
1601
+ to: scaleGradientStopPosition()
1602
+ }],
1603
+ /**
1604
+ * Gradient Color Stops From
1605
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1606
+ */
1607
+ "gradient-from": [{
1608
+ from: scaleColor()
1609
+ }],
1610
+ /**
1611
+ * Gradient Color Stops Via
1612
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1613
+ */
1614
+ "gradient-via": [{
1615
+ via: scaleColor()
1616
+ }],
1617
+ /**
1618
+ * Gradient Color Stops To
1619
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1620
+ */
1621
+ "gradient-to": [{
1622
+ to: scaleColor()
1623
+ }],
1624
+ // ---------------
1625
+ // --- Borders ---
1626
+ // ---------------
1627
+ /**
1628
+ * Border Radius
1629
+ * @see https://tailwindcss.com/docs/border-radius
1630
+ */
1631
+ rounded: [{
1632
+ rounded: scaleRadius()
1633
+ }],
1634
+ /**
1635
+ * Border Radius Start
1636
+ * @see https://tailwindcss.com/docs/border-radius
1637
+ */
1638
+ "rounded-s": [{
1639
+ "rounded-s": scaleRadius()
1640
+ }],
1641
+ /**
1642
+ * Border Radius End
1643
+ * @see https://tailwindcss.com/docs/border-radius
1644
+ */
1645
+ "rounded-e": [{
1646
+ "rounded-e": scaleRadius()
1647
+ }],
1648
+ /**
1649
+ * Border Radius Top
1650
+ * @see https://tailwindcss.com/docs/border-radius
1651
+ */
1652
+ "rounded-t": [{
1653
+ "rounded-t": scaleRadius()
1654
+ }],
1655
+ /**
1656
+ * Border Radius Right
1657
+ * @see https://tailwindcss.com/docs/border-radius
1658
+ */
1659
+ "rounded-r": [{
1660
+ "rounded-r": scaleRadius()
1661
+ }],
1662
+ /**
1663
+ * Border Radius Bottom
1664
+ * @see https://tailwindcss.com/docs/border-radius
1665
+ */
1666
+ "rounded-b": [{
1667
+ "rounded-b": scaleRadius()
1668
+ }],
1669
+ /**
1670
+ * Border Radius Left
1671
+ * @see https://tailwindcss.com/docs/border-radius
1672
+ */
1673
+ "rounded-l": [{
1674
+ "rounded-l": scaleRadius()
1675
+ }],
1676
+ /**
1677
+ * Border Radius Start Start
1678
+ * @see https://tailwindcss.com/docs/border-radius
1679
+ */
1680
+ "rounded-ss": [{
1681
+ "rounded-ss": scaleRadius()
1682
+ }],
1683
+ /**
1684
+ * Border Radius Start End
1685
+ * @see https://tailwindcss.com/docs/border-radius
1686
+ */
1687
+ "rounded-se": [{
1688
+ "rounded-se": scaleRadius()
1689
+ }],
1690
+ /**
1691
+ * Border Radius End End
1692
+ * @see https://tailwindcss.com/docs/border-radius
1693
+ */
1694
+ "rounded-ee": [{
1695
+ "rounded-ee": scaleRadius()
1696
+ }],
1697
+ /**
1698
+ * Border Radius End Start
1699
+ * @see https://tailwindcss.com/docs/border-radius
1700
+ */
1701
+ "rounded-es": [{
1702
+ "rounded-es": scaleRadius()
1703
+ }],
1704
+ /**
1705
+ * Border Radius Top Left
1706
+ * @see https://tailwindcss.com/docs/border-radius
1707
+ */
1708
+ "rounded-tl": [{
1709
+ "rounded-tl": scaleRadius()
1710
+ }],
1711
+ /**
1712
+ * Border Radius Top Right
1713
+ * @see https://tailwindcss.com/docs/border-radius
1714
+ */
1715
+ "rounded-tr": [{
1716
+ "rounded-tr": scaleRadius()
1717
+ }],
1718
+ /**
1719
+ * Border Radius Bottom Right
1720
+ * @see https://tailwindcss.com/docs/border-radius
1721
+ */
1722
+ "rounded-br": [{
1723
+ "rounded-br": scaleRadius()
1724
+ }],
1725
+ /**
1726
+ * Border Radius Bottom Left
1727
+ * @see https://tailwindcss.com/docs/border-radius
1728
+ */
1729
+ "rounded-bl": [{
1730
+ "rounded-bl": scaleRadius()
1731
+ }],
1732
+ /**
1733
+ * Border Width
1734
+ * @see https://tailwindcss.com/docs/border-width
1735
+ */
1736
+ "border-w": [{
1737
+ border: scaleBorderWidth()
1738
+ }],
1739
+ /**
1740
+ * Border Width X
1741
+ * @see https://tailwindcss.com/docs/border-width
1742
+ */
1743
+ "border-w-x": [{
1744
+ "border-x": scaleBorderWidth()
1745
+ }],
1746
+ /**
1747
+ * Border Width Y
1748
+ * @see https://tailwindcss.com/docs/border-width
1749
+ */
1750
+ "border-w-y": [{
1751
+ "border-y": scaleBorderWidth()
1752
+ }],
1753
+ /**
1754
+ * Border Width Start
1755
+ * @see https://tailwindcss.com/docs/border-width
1756
+ */
1757
+ "border-w-s": [{
1758
+ "border-s": scaleBorderWidth()
1759
+ }],
1760
+ /**
1761
+ * Border Width End
1762
+ * @see https://tailwindcss.com/docs/border-width
1763
+ */
1764
+ "border-w-e": [{
1765
+ "border-e": scaleBorderWidth()
1766
+ }],
1767
+ /**
1768
+ * Border Width Top
1769
+ * @see https://tailwindcss.com/docs/border-width
1770
+ */
1771
+ "border-w-t": [{
1772
+ "border-t": scaleBorderWidth()
1773
+ }],
1774
+ /**
1775
+ * Border Width Right
1776
+ * @see https://tailwindcss.com/docs/border-width
1777
+ */
1778
+ "border-w-r": [{
1779
+ "border-r": scaleBorderWidth()
1780
+ }],
1781
+ /**
1782
+ * Border Width Bottom
1783
+ * @see https://tailwindcss.com/docs/border-width
1784
+ */
1785
+ "border-w-b": [{
1786
+ "border-b": scaleBorderWidth()
1787
+ }],
1788
+ /**
1789
+ * Border Width Left
1790
+ * @see https://tailwindcss.com/docs/border-width
1791
+ */
1792
+ "border-w-l": [{
1793
+ "border-l": scaleBorderWidth()
1794
+ }],
1795
+ /**
1796
+ * Divide Width X
1797
+ * @see https://tailwindcss.com/docs/border-width#between-children
1798
+ */
1799
+ "divide-x": [{
1800
+ "divide-x": scaleBorderWidth()
1801
+ }],
1802
+ /**
1803
+ * Divide Width X Reverse
1804
+ * @see https://tailwindcss.com/docs/border-width#between-children
1805
+ */
1806
+ "divide-x-reverse": ["divide-x-reverse"],
1807
+ /**
1808
+ * Divide Width Y
1809
+ * @see https://tailwindcss.com/docs/border-width#between-children
1810
+ */
1811
+ "divide-y": [{
1812
+ "divide-y": scaleBorderWidth()
1813
+ }],
1814
+ /**
1815
+ * Divide Width Y Reverse
1816
+ * @see https://tailwindcss.com/docs/border-width#between-children
1817
+ */
1818
+ "divide-y-reverse": ["divide-y-reverse"],
1819
+ /**
1820
+ * Border Style
1821
+ * @see https://tailwindcss.com/docs/border-style
1822
+ */
1823
+ "border-style": [{
1824
+ border: [...scaleLineStyle(), "hidden", "none"]
1825
+ }],
1826
+ /**
1827
+ * Divide Style
1828
+ * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
1829
+ */
1830
+ "divide-style": [{
1831
+ divide: [...scaleLineStyle(), "hidden", "none"]
1832
+ }],
1833
+ /**
1834
+ * Border Color
1835
+ * @see https://tailwindcss.com/docs/border-color
1836
+ */
1837
+ "border-color": [{
1838
+ border: scaleColor()
1839
+ }],
1840
+ /**
1841
+ * Border Color X
1842
+ * @see https://tailwindcss.com/docs/border-color
1843
+ */
1844
+ "border-color-x": [{
1845
+ "border-x": scaleColor()
1846
+ }],
1847
+ /**
1848
+ * Border Color Y
1849
+ * @see https://tailwindcss.com/docs/border-color
1850
+ */
1851
+ "border-color-y": [{
1852
+ "border-y": scaleColor()
1853
+ }],
1854
+ /**
1855
+ * Border Color S
1856
+ * @see https://tailwindcss.com/docs/border-color
1857
+ */
1858
+ "border-color-s": [{
1859
+ "border-s": scaleColor()
1860
+ }],
1861
+ /**
1862
+ * Border Color E
1863
+ * @see https://tailwindcss.com/docs/border-color
1864
+ */
1865
+ "border-color-e": [{
1866
+ "border-e": scaleColor()
1867
+ }],
1868
+ /**
1869
+ * Border Color Top
1870
+ * @see https://tailwindcss.com/docs/border-color
1871
+ */
1872
+ "border-color-t": [{
1873
+ "border-t": scaleColor()
1874
+ }],
1875
+ /**
1876
+ * Border Color Right
1877
+ * @see https://tailwindcss.com/docs/border-color
1878
+ */
1879
+ "border-color-r": [{
1880
+ "border-r": scaleColor()
1881
+ }],
1882
+ /**
1883
+ * Border Color Bottom
1884
+ * @see https://tailwindcss.com/docs/border-color
1885
+ */
1886
+ "border-color-b": [{
1887
+ "border-b": scaleColor()
1888
+ }],
1889
+ /**
1890
+ * Border Color Left
1891
+ * @see https://tailwindcss.com/docs/border-color
1892
+ */
1893
+ "border-color-l": [{
1894
+ "border-l": scaleColor()
1895
+ }],
1896
+ /**
1897
+ * Divide Color
1898
+ * @see https://tailwindcss.com/docs/divide-color
1899
+ */
1900
+ "divide-color": [{
1901
+ divide: scaleColor()
1902
+ }],
1903
+ /**
1904
+ * Outline Style
1905
+ * @see https://tailwindcss.com/docs/outline-style
1906
+ */
1907
+ "outline-style": [{
1908
+ outline: [...scaleLineStyle(), "none", "hidden"]
1909
+ }],
1910
+ /**
1911
+ * Outline Offset
1912
+ * @see https://tailwindcss.com/docs/outline-offset
1913
+ */
1914
+ "outline-offset": [{
1915
+ "outline-offset": [isNumber, isArbitraryVariable, isArbitraryValue]
1916
+ }],
1917
+ /**
1918
+ * Outline Width
1919
+ * @see https://tailwindcss.com/docs/outline-width
1920
+ */
1921
+ "outline-w": [{
1922
+ outline: ["", isNumber, isArbitraryVariableLength, isArbitraryLength]
1923
+ }],
1924
+ /**
1925
+ * Outline Color
1926
+ * @see https://tailwindcss.com/docs/outline-color
1927
+ */
1928
+ "outline-color": [{
1929
+ outline: scaleColor()
1930
+ }],
1931
+ // ---------------
1932
+ // --- Effects ---
1933
+ // ---------------
1934
+ /**
1935
+ * Box Shadow
1936
+ * @see https://tailwindcss.com/docs/box-shadow
1937
+ */
1938
+ shadow: [{
1939
+ shadow: [
1940
+ // Deprecated since Tailwind CSS v4.0.0
1941
+ "",
1942
+ "none",
1943
+ themeShadow,
1944
+ isArbitraryVariableShadow,
1945
+ isArbitraryShadow
1946
+ ]
1947
+ }],
1948
+ /**
1949
+ * Box Shadow Color
1950
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
1951
+ */
1952
+ "shadow-color": [{
1953
+ shadow: scaleColor()
1954
+ }],
1955
+ /**
1956
+ * Inset Box Shadow
1957
+ * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
1958
+ */
1959
+ "inset-shadow": [{
1960
+ "inset-shadow": ["none", themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]
1961
+ }],
1962
+ /**
1963
+ * Inset Box Shadow Color
1964
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
1965
+ */
1966
+ "inset-shadow-color": [{
1967
+ "inset-shadow": scaleColor()
1968
+ }],
1969
+ /**
1970
+ * Ring Width
1971
+ * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
1972
+ */
1973
+ "ring-w": [{
1974
+ ring: scaleBorderWidth()
1975
+ }],
1976
+ /**
1977
+ * Ring Width Inset
1978
+ * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
1979
+ * @deprecated since Tailwind CSS v4.0.0
1980
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
1981
+ */
1982
+ "ring-w-inset": ["ring-inset"],
1983
+ /**
1984
+ * Ring Color
1985
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
1986
+ */
1987
+ "ring-color": [{
1988
+ ring: scaleColor()
1989
+ }],
1990
+ /**
1991
+ * Ring Offset Width
1992
+ * @see https://v3.tailwindcss.com/docs/ring-offset-width
1993
+ * @deprecated since Tailwind CSS v4.0.0
1994
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
1995
+ */
1996
+ "ring-offset-w": [{
1997
+ "ring-offset": [isNumber, isArbitraryLength]
1998
+ }],
1999
+ /**
2000
+ * Ring Offset Color
2001
+ * @see https://v3.tailwindcss.com/docs/ring-offset-color
2002
+ * @deprecated since Tailwind CSS v4.0.0
2003
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
2004
+ */
2005
+ "ring-offset-color": [{
2006
+ "ring-offset": scaleColor()
2007
+ }],
2008
+ /**
2009
+ * Inset Ring Width
2010
+ * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
2011
+ */
2012
+ "inset-ring-w": [{
2013
+ "inset-ring": scaleBorderWidth()
2014
+ }],
2015
+ /**
2016
+ * Inset Ring Color
2017
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
2018
+ */
2019
+ "inset-ring-color": [{
2020
+ "inset-ring": scaleColor()
2021
+ }],
2022
+ /**
2023
+ * Text Shadow
2024
+ * @see https://tailwindcss.com/docs/text-shadow
2025
+ */
2026
+ "text-shadow": [{
2027
+ "text-shadow": ["none", themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]
2028
+ }],
2029
+ /**
2030
+ * Text Shadow Color
2031
+ * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
2032
+ */
2033
+ "text-shadow-color": [{
2034
+ "text-shadow": scaleColor()
2035
+ }],
2036
+ /**
2037
+ * Opacity
2038
+ * @see https://tailwindcss.com/docs/opacity
2039
+ */
2040
+ opacity: [{
2041
+ opacity: [isNumber, isArbitraryVariable, isArbitraryValue]
2042
+ }],
2043
+ /**
2044
+ * Mix Blend Mode
2045
+ * @see https://tailwindcss.com/docs/mix-blend-mode
2046
+ */
2047
+ "mix-blend": [{
2048
+ "mix-blend": [...scaleBlendMode(), "plus-darker", "plus-lighter"]
2049
+ }],
2050
+ /**
2051
+ * Background Blend Mode
2052
+ * @see https://tailwindcss.com/docs/background-blend-mode
2053
+ */
2054
+ "bg-blend": [{
2055
+ "bg-blend": scaleBlendMode()
2056
+ }],
2057
+ /**
2058
+ * Mask Clip
2059
+ * @see https://tailwindcss.com/docs/mask-clip
2060
+ */
2061
+ "mask-clip": [{
2062
+ "mask-clip": ["border", "padding", "content", "fill", "stroke", "view"]
2063
+ }, "mask-no-clip"],
2064
+ /**
2065
+ * Mask Composite
2066
+ * @see https://tailwindcss.com/docs/mask-composite
2067
+ */
2068
+ "mask-composite": [{
2069
+ mask: ["add", "subtract", "intersect", "exclude"]
2070
+ }],
2071
+ /**
2072
+ * Mask Image
2073
+ * @see https://tailwindcss.com/docs/mask-image
2074
+ */
2075
+ "mask-image-linear-pos": [{
2076
+ "mask-linear": [isNumber]
2077
+ }],
2078
+ "mask-image-linear-from-pos": [{
2079
+ "mask-linear-from": scaleMaskImagePosition()
2080
+ }],
2081
+ "mask-image-linear-to-pos": [{
2082
+ "mask-linear-to": scaleMaskImagePosition()
2083
+ }],
2084
+ "mask-image-linear-from-color": [{
2085
+ "mask-linear-from": scaleColor()
2086
+ }],
2087
+ "mask-image-linear-to-color": [{
2088
+ "mask-linear-to": scaleColor()
2089
+ }],
2090
+ "mask-image-t-from-pos": [{
2091
+ "mask-t-from": scaleMaskImagePosition()
2092
+ }],
2093
+ "mask-image-t-to-pos": [{
2094
+ "mask-t-to": scaleMaskImagePosition()
2095
+ }],
2096
+ "mask-image-t-from-color": [{
2097
+ "mask-t-from": scaleColor()
2098
+ }],
2099
+ "mask-image-t-to-color": [{
2100
+ "mask-t-to": scaleColor()
2101
+ }],
2102
+ "mask-image-r-from-pos": [{
2103
+ "mask-r-from": scaleMaskImagePosition()
2104
+ }],
2105
+ "mask-image-r-to-pos": [{
2106
+ "mask-r-to": scaleMaskImagePosition()
2107
+ }],
2108
+ "mask-image-r-from-color": [{
2109
+ "mask-r-from": scaleColor()
2110
+ }],
2111
+ "mask-image-r-to-color": [{
2112
+ "mask-r-to": scaleColor()
2113
+ }],
2114
+ "mask-image-b-from-pos": [{
2115
+ "mask-b-from": scaleMaskImagePosition()
2116
+ }],
2117
+ "mask-image-b-to-pos": [{
2118
+ "mask-b-to": scaleMaskImagePosition()
2119
+ }],
2120
+ "mask-image-b-from-color": [{
2121
+ "mask-b-from": scaleColor()
2122
+ }],
2123
+ "mask-image-b-to-color": [{
2124
+ "mask-b-to": scaleColor()
2125
+ }],
2126
+ "mask-image-l-from-pos": [{
2127
+ "mask-l-from": scaleMaskImagePosition()
2128
+ }],
2129
+ "mask-image-l-to-pos": [{
2130
+ "mask-l-to": scaleMaskImagePosition()
2131
+ }],
2132
+ "mask-image-l-from-color": [{
2133
+ "mask-l-from": scaleColor()
2134
+ }],
2135
+ "mask-image-l-to-color": [{
2136
+ "mask-l-to": scaleColor()
2137
+ }],
2138
+ "mask-image-x-from-pos": [{
2139
+ "mask-x-from": scaleMaskImagePosition()
2140
+ }],
2141
+ "mask-image-x-to-pos": [{
2142
+ "mask-x-to": scaleMaskImagePosition()
2143
+ }],
2144
+ "mask-image-x-from-color": [{
2145
+ "mask-x-from": scaleColor()
2146
+ }],
2147
+ "mask-image-x-to-color": [{
2148
+ "mask-x-to": scaleColor()
2149
+ }],
2150
+ "mask-image-y-from-pos": [{
2151
+ "mask-y-from": scaleMaskImagePosition()
2152
+ }],
2153
+ "mask-image-y-to-pos": [{
2154
+ "mask-y-to": scaleMaskImagePosition()
2155
+ }],
2156
+ "mask-image-y-from-color": [{
2157
+ "mask-y-from": scaleColor()
2158
+ }],
2159
+ "mask-image-y-to-color": [{
2160
+ "mask-y-to": scaleColor()
2161
+ }],
2162
+ "mask-image-radial": [{
2163
+ "mask-radial": [isArbitraryVariable, isArbitraryValue]
2164
+ }],
2165
+ "mask-image-radial-from-pos": [{
2166
+ "mask-radial-from": scaleMaskImagePosition()
2167
+ }],
2168
+ "mask-image-radial-to-pos": [{
2169
+ "mask-radial-to": scaleMaskImagePosition()
2170
+ }],
2171
+ "mask-image-radial-from-color": [{
2172
+ "mask-radial-from": scaleColor()
2173
+ }],
2174
+ "mask-image-radial-to-color": [{
2175
+ "mask-radial-to": scaleColor()
2176
+ }],
2177
+ "mask-image-radial-shape": [{
2178
+ "mask-radial": ["circle", "ellipse"]
2179
+ }],
2180
+ "mask-image-radial-size": [{
2181
+ "mask-radial": [{
2182
+ closest: ["side", "corner"],
2183
+ farthest: ["side", "corner"]
2184
+ }]
2185
+ }],
2186
+ "mask-image-radial-pos": [{
2187
+ "mask-radial-at": scalePosition()
2188
+ }],
2189
+ "mask-image-conic-pos": [{
2190
+ "mask-conic": [isNumber]
2191
+ }],
2192
+ "mask-image-conic-from-pos": [{
2193
+ "mask-conic-from": scaleMaskImagePosition()
2194
+ }],
2195
+ "mask-image-conic-to-pos": [{
2196
+ "mask-conic-to": scaleMaskImagePosition()
2197
+ }],
2198
+ "mask-image-conic-from-color": [{
2199
+ "mask-conic-from": scaleColor()
2200
+ }],
2201
+ "mask-image-conic-to-color": [{
2202
+ "mask-conic-to": scaleColor()
2203
+ }],
2204
+ /**
2205
+ * Mask Mode
2206
+ * @see https://tailwindcss.com/docs/mask-mode
2207
+ */
2208
+ "mask-mode": [{
2209
+ mask: ["alpha", "luminance", "match"]
2210
+ }],
2211
+ /**
2212
+ * Mask Origin
2213
+ * @see https://tailwindcss.com/docs/mask-origin
2214
+ */
2215
+ "mask-origin": [{
2216
+ "mask-origin": ["border", "padding", "content", "fill", "stroke", "view"]
2217
+ }],
2218
+ /**
2219
+ * Mask Position
2220
+ * @see https://tailwindcss.com/docs/mask-position
2221
+ */
2222
+ "mask-position": [{
2223
+ mask: scaleBgPosition()
2224
+ }],
2225
+ /**
2226
+ * Mask Repeat
2227
+ * @see https://tailwindcss.com/docs/mask-repeat
2228
+ */
2229
+ "mask-repeat": [{
2230
+ mask: scaleBgRepeat()
2231
+ }],
2232
+ /**
2233
+ * Mask Size
2234
+ * @see https://tailwindcss.com/docs/mask-size
2235
+ */
2236
+ "mask-size": [{
2237
+ mask: scaleBgSize()
2238
+ }],
2239
+ /**
2240
+ * Mask Type
2241
+ * @see https://tailwindcss.com/docs/mask-type
2242
+ */
2243
+ "mask-type": [{
2244
+ "mask-type": ["alpha", "luminance"]
2245
+ }],
2246
+ /**
2247
+ * Mask Image
2248
+ * @see https://tailwindcss.com/docs/mask-image
2249
+ */
2250
+ "mask-image": [{
2251
+ mask: ["none", isArbitraryVariable, isArbitraryValue]
2252
+ }],
2253
+ // ---------------
2254
+ // --- Filters ---
2255
+ // ---------------
2256
+ /**
2257
+ * Filter
2258
+ * @see https://tailwindcss.com/docs/filter
2259
+ */
2260
+ filter: [{
2261
+ filter: [
2262
+ // Deprecated since Tailwind CSS v3.0.0
2263
+ "",
2264
+ "none",
2265
+ isArbitraryVariable,
2266
+ isArbitraryValue
2267
+ ]
2268
+ }],
2269
+ /**
2270
+ * Blur
2271
+ * @see https://tailwindcss.com/docs/blur
2272
+ */
2273
+ blur: [{
2274
+ blur: scaleBlur()
2275
+ }],
2276
+ /**
2277
+ * Brightness
2278
+ * @see https://tailwindcss.com/docs/brightness
2279
+ */
2280
+ brightness: [{
2281
+ brightness: [isNumber, isArbitraryVariable, isArbitraryValue]
2282
+ }],
2283
+ /**
2284
+ * Contrast
2285
+ * @see https://tailwindcss.com/docs/contrast
2286
+ */
2287
+ contrast: [{
2288
+ contrast: [isNumber, isArbitraryVariable, isArbitraryValue]
2289
+ }],
2290
+ /**
2291
+ * Drop Shadow
2292
+ * @see https://tailwindcss.com/docs/drop-shadow
2293
+ */
2294
+ "drop-shadow": [{
2295
+ "drop-shadow": [
2296
+ // Deprecated since Tailwind CSS v4.0.0
2297
+ "",
2298
+ "none",
2299
+ themeDropShadow,
2300
+ isArbitraryVariableShadow,
2301
+ isArbitraryShadow
2302
+ ]
2303
+ }],
2304
+ /**
2305
+ * Drop Shadow Color
2306
+ * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
2307
+ */
2308
+ "drop-shadow-color": [{
2309
+ "drop-shadow": scaleColor()
2310
+ }],
2311
+ /**
2312
+ * Grayscale
2313
+ * @see https://tailwindcss.com/docs/grayscale
2314
+ */
2315
+ grayscale: [{
2316
+ grayscale: ["", isNumber, isArbitraryVariable, isArbitraryValue]
2317
+ }],
2318
+ /**
2319
+ * Hue Rotate
2320
+ * @see https://tailwindcss.com/docs/hue-rotate
2321
+ */
2322
+ "hue-rotate": [{
2323
+ "hue-rotate": [isNumber, isArbitraryVariable, isArbitraryValue]
2324
+ }],
2325
+ /**
2326
+ * Invert
2327
+ * @see https://tailwindcss.com/docs/invert
2328
+ */
2329
+ invert: [{
2330
+ invert: ["", isNumber, isArbitraryVariable, isArbitraryValue]
2331
+ }],
2332
+ /**
2333
+ * Saturate
2334
+ * @see https://tailwindcss.com/docs/saturate
2335
+ */
2336
+ saturate: [{
2337
+ saturate: [isNumber, isArbitraryVariable, isArbitraryValue]
2338
+ }],
2339
+ /**
2340
+ * Sepia
2341
+ * @see https://tailwindcss.com/docs/sepia
2342
+ */
2343
+ sepia: [{
2344
+ sepia: ["", isNumber, isArbitraryVariable, isArbitraryValue]
2345
+ }],
2346
+ /**
2347
+ * Backdrop Filter
2348
+ * @see https://tailwindcss.com/docs/backdrop-filter
2349
+ */
2350
+ "backdrop-filter": [{
2351
+ "backdrop-filter": [
2352
+ // Deprecated since Tailwind CSS v3.0.0
2353
+ "",
2354
+ "none",
2355
+ isArbitraryVariable,
2356
+ isArbitraryValue
2357
+ ]
2358
+ }],
2359
+ /**
2360
+ * Backdrop Blur
2361
+ * @see https://tailwindcss.com/docs/backdrop-blur
2362
+ */
2363
+ "backdrop-blur": [{
2364
+ "backdrop-blur": scaleBlur()
2365
+ }],
2366
+ /**
2367
+ * Backdrop Brightness
2368
+ * @see https://tailwindcss.com/docs/backdrop-brightness
2369
+ */
2370
+ "backdrop-brightness": [{
2371
+ "backdrop-brightness": [isNumber, isArbitraryVariable, isArbitraryValue]
2372
+ }],
2373
+ /**
2374
+ * Backdrop Contrast
2375
+ * @see https://tailwindcss.com/docs/backdrop-contrast
2376
+ */
2377
+ "backdrop-contrast": [{
2378
+ "backdrop-contrast": [isNumber, isArbitraryVariable, isArbitraryValue]
2379
+ }],
2380
+ /**
2381
+ * Backdrop Grayscale
2382
+ * @see https://tailwindcss.com/docs/backdrop-grayscale
2383
+ */
2384
+ "backdrop-grayscale": [{
2385
+ "backdrop-grayscale": ["", isNumber, isArbitraryVariable, isArbitraryValue]
2386
+ }],
2387
+ /**
2388
+ * Backdrop Hue Rotate
2389
+ * @see https://tailwindcss.com/docs/backdrop-hue-rotate
2390
+ */
2391
+ "backdrop-hue-rotate": [{
2392
+ "backdrop-hue-rotate": [isNumber, isArbitraryVariable, isArbitraryValue]
2393
+ }],
2394
+ /**
2395
+ * Backdrop Invert
2396
+ * @see https://tailwindcss.com/docs/backdrop-invert
2397
+ */
2398
+ "backdrop-invert": [{
2399
+ "backdrop-invert": ["", isNumber, isArbitraryVariable, isArbitraryValue]
2400
+ }],
2401
+ /**
2402
+ * Backdrop Opacity
2403
+ * @see https://tailwindcss.com/docs/backdrop-opacity
2404
+ */
2405
+ "backdrop-opacity": [{
2406
+ "backdrop-opacity": [isNumber, isArbitraryVariable, isArbitraryValue]
2407
+ }],
2408
+ /**
2409
+ * Backdrop Saturate
2410
+ * @see https://tailwindcss.com/docs/backdrop-saturate
2411
+ */
2412
+ "backdrop-saturate": [{
2413
+ "backdrop-saturate": [isNumber, isArbitraryVariable, isArbitraryValue]
2414
+ }],
2415
+ /**
2416
+ * Backdrop Sepia
2417
+ * @see https://tailwindcss.com/docs/backdrop-sepia
2418
+ */
2419
+ "backdrop-sepia": [{
2420
+ "backdrop-sepia": ["", isNumber, isArbitraryVariable, isArbitraryValue]
2421
+ }],
2422
+ // --------------
2423
+ // --- Tables ---
2424
+ // --------------
2425
+ /**
2426
+ * Border Collapse
2427
+ * @see https://tailwindcss.com/docs/border-collapse
2428
+ */
2429
+ "border-collapse": [{
2430
+ border: ["collapse", "separate"]
2431
+ }],
2432
+ /**
2433
+ * Border Spacing
2434
+ * @see https://tailwindcss.com/docs/border-spacing
2435
+ */
2436
+ "border-spacing": [{
2437
+ "border-spacing": scaleUnambiguousSpacing()
2438
+ }],
2439
+ /**
2440
+ * Border Spacing X
2441
+ * @see https://tailwindcss.com/docs/border-spacing
2442
+ */
2443
+ "border-spacing-x": [{
2444
+ "border-spacing-x": scaleUnambiguousSpacing()
2445
+ }],
2446
+ /**
2447
+ * Border Spacing Y
2448
+ * @see https://tailwindcss.com/docs/border-spacing
2449
+ */
2450
+ "border-spacing-y": [{
2451
+ "border-spacing-y": scaleUnambiguousSpacing()
2452
+ }],
2453
+ /**
2454
+ * Table Layout
2455
+ * @see https://tailwindcss.com/docs/table-layout
2456
+ */
2457
+ "table-layout": [{
2458
+ table: ["auto", "fixed"]
2459
+ }],
2460
+ /**
2461
+ * Caption Side
2462
+ * @see https://tailwindcss.com/docs/caption-side
2463
+ */
2464
+ caption: [{
2465
+ caption: ["top", "bottom"]
2466
+ }],
2467
+ // ---------------------------------
2468
+ // --- Transitions and Animation ---
2469
+ // ---------------------------------
2470
+ /**
2471
+ * Transition Property
2472
+ * @see https://tailwindcss.com/docs/transition-property
2473
+ */
2474
+ transition: [{
2475
+ transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", isArbitraryVariable, isArbitraryValue]
2476
+ }],
2477
+ /**
2478
+ * Transition Behavior
2479
+ * @see https://tailwindcss.com/docs/transition-behavior
2480
+ */
2481
+ "transition-behavior": [{
2482
+ transition: ["normal", "discrete"]
2483
+ }],
2484
+ /**
2485
+ * Transition Duration
2486
+ * @see https://tailwindcss.com/docs/transition-duration
2487
+ */
2488
+ duration: [{
2489
+ duration: [isNumber, "initial", isArbitraryVariable, isArbitraryValue]
2490
+ }],
2491
+ /**
2492
+ * Transition Timing Function
2493
+ * @see https://tailwindcss.com/docs/transition-timing-function
2494
+ */
2495
+ ease: [{
2496
+ ease: ["linear", "initial", themeEase, isArbitraryVariable, isArbitraryValue]
2497
+ }],
2498
+ /**
2499
+ * Transition Delay
2500
+ * @see https://tailwindcss.com/docs/transition-delay
2501
+ */
2502
+ delay: [{
2503
+ delay: [isNumber, isArbitraryVariable, isArbitraryValue]
2504
+ }],
2505
+ /**
2506
+ * Animation
2507
+ * @see https://tailwindcss.com/docs/animation
2508
+ */
2509
+ animate: [{
2510
+ animate: ["none", themeAnimate, isArbitraryVariable, isArbitraryValue]
2511
+ }],
2512
+ // ------------------
2513
+ // --- Transforms ---
2514
+ // ------------------
2515
+ /**
2516
+ * Backface Visibility
2517
+ * @see https://tailwindcss.com/docs/backface-visibility
2518
+ */
2519
+ backface: [{
2520
+ backface: ["hidden", "visible"]
2521
+ }],
2522
+ /**
2523
+ * Perspective
2524
+ * @see https://tailwindcss.com/docs/perspective
2525
+ */
2526
+ perspective: [{
2527
+ perspective: [themePerspective, isArbitraryVariable, isArbitraryValue]
2528
+ }],
2529
+ /**
2530
+ * Perspective Origin
2531
+ * @see https://tailwindcss.com/docs/perspective-origin
2532
+ */
2533
+ "perspective-origin": [{
2534
+ "perspective-origin": scalePositionWithArbitrary()
2535
+ }],
2536
+ /**
2537
+ * Rotate
2538
+ * @see https://tailwindcss.com/docs/rotate
2539
+ */
2540
+ rotate: [{
2541
+ rotate: scaleRotate()
2542
+ }],
2543
+ /**
2544
+ * Rotate X
2545
+ * @see https://tailwindcss.com/docs/rotate
2546
+ */
2547
+ "rotate-x": [{
2548
+ "rotate-x": scaleRotate()
2549
+ }],
2550
+ /**
2551
+ * Rotate Y
2552
+ * @see https://tailwindcss.com/docs/rotate
2553
+ */
2554
+ "rotate-y": [{
2555
+ "rotate-y": scaleRotate()
2556
+ }],
2557
+ /**
2558
+ * Rotate Z
2559
+ * @see https://tailwindcss.com/docs/rotate
2560
+ */
2561
+ "rotate-z": [{
2562
+ "rotate-z": scaleRotate()
2563
+ }],
2564
+ /**
2565
+ * Scale
2566
+ * @see https://tailwindcss.com/docs/scale
2567
+ */
2568
+ scale: [{
2569
+ scale: scaleScale()
2570
+ }],
2571
+ /**
2572
+ * Scale X
2573
+ * @see https://tailwindcss.com/docs/scale
2574
+ */
2575
+ "scale-x": [{
2576
+ "scale-x": scaleScale()
2577
+ }],
2578
+ /**
2579
+ * Scale Y
2580
+ * @see https://tailwindcss.com/docs/scale
2581
+ */
2582
+ "scale-y": [{
2583
+ "scale-y": scaleScale()
2584
+ }],
2585
+ /**
2586
+ * Scale Z
2587
+ * @see https://tailwindcss.com/docs/scale
2588
+ */
2589
+ "scale-z": [{
2590
+ "scale-z": scaleScale()
2591
+ }],
2592
+ /**
2593
+ * Scale 3D
2594
+ * @see https://tailwindcss.com/docs/scale
2595
+ */
2596
+ "scale-3d": ["scale-3d"],
2597
+ /**
2598
+ * Skew
2599
+ * @see https://tailwindcss.com/docs/skew
2600
+ */
2601
+ skew: [{
2602
+ skew: scaleSkew()
2603
+ }],
2604
+ /**
2605
+ * Skew X
2606
+ * @see https://tailwindcss.com/docs/skew
2607
+ */
2608
+ "skew-x": [{
2609
+ "skew-x": scaleSkew()
2610
+ }],
2611
+ /**
2612
+ * Skew Y
2613
+ * @see https://tailwindcss.com/docs/skew
2614
+ */
2615
+ "skew-y": [{
2616
+ "skew-y": scaleSkew()
2617
+ }],
2618
+ /**
2619
+ * Transform
2620
+ * @see https://tailwindcss.com/docs/transform
2621
+ */
2622
+ transform: [{
2623
+ transform: [isArbitraryVariable, isArbitraryValue, "", "none", "gpu", "cpu"]
2624
+ }],
2625
+ /**
2626
+ * Transform Origin
2627
+ * @see https://tailwindcss.com/docs/transform-origin
2628
+ */
2629
+ "transform-origin": [{
2630
+ origin: scalePositionWithArbitrary()
2631
+ }],
2632
+ /**
2633
+ * Transform Style
2634
+ * @see https://tailwindcss.com/docs/transform-style
2635
+ */
2636
+ "transform-style": [{
2637
+ transform: ["3d", "flat"]
2638
+ }],
2639
+ /**
2640
+ * Translate
2641
+ * @see https://tailwindcss.com/docs/translate
2642
+ */
2643
+ translate: [{
2644
+ translate: scaleTranslate()
2645
+ }],
2646
+ /**
2647
+ * Translate X
2648
+ * @see https://tailwindcss.com/docs/translate
2649
+ */
2650
+ "translate-x": [{
2651
+ "translate-x": scaleTranslate()
2652
+ }],
2653
+ /**
2654
+ * Translate Y
2655
+ * @see https://tailwindcss.com/docs/translate
2656
+ */
2657
+ "translate-y": [{
2658
+ "translate-y": scaleTranslate()
2659
+ }],
2660
+ /**
2661
+ * Translate Z
2662
+ * @see https://tailwindcss.com/docs/translate
2663
+ */
2664
+ "translate-z": [{
2665
+ "translate-z": scaleTranslate()
2666
+ }],
2667
+ /**
2668
+ * Translate None
2669
+ * @see https://tailwindcss.com/docs/translate
2670
+ */
2671
+ "translate-none": ["translate-none"],
2672
+ // ---------------------
2673
+ // --- Interactivity ---
2674
+ // ---------------------
2675
+ /**
2676
+ * Accent Color
2677
+ * @see https://tailwindcss.com/docs/accent-color
2678
+ */
2679
+ accent: [{
2680
+ accent: scaleColor()
2681
+ }],
2682
+ /**
2683
+ * Appearance
2684
+ * @see https://tailwindcss.com/docs/appearance
2685
+ */
2686
+ appearance: [{
2687
+ appearance: ["none", "auto"]
2688
+ }],
2689
+ /**
2690
+ * Caret Color
2691
+ * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
2692
+ */
2693
+ "caret-color": [{
2694
+ caret: scaleColor()
2695
+ }],
2696
+ /**
2697
+ * Color Scheme
2698
+ * @see https://tailwindcss.com/docs/color-scheme
2699
+ */
2700
+ "color-scheme": [{
2701
+ scheme: ["normal", "dark", "light", "light-dark", "only-dark", "only-light"]
2702
+ }],
2703
+ /**
2704
+ * Cursor
2705
+ * @see https://tailwindcss.com/docs/cursor
2706
+ */
2707
+ cursor: [{
2708
+ cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", isArbitraryVariable, isArbitraryValue]
2709
+ }],
2710
+ /**
2711
+ * Field Sizing
2712
+ * @see https://tailwindcss.com/docs/field-sizing
2713
+ */
2714
+ "field-sizing": [{
2715
+ "field-sizing": ["fixed", "content"]
2716
+ }],
2717
+ /**
2718
+ * Pointer Events
2719
+ * @see https://tailwindcss.com/docs/pointer-events
2720
+ */
2721
+ "pointer-events": [{
2722
+ "pointer-events": ["auto", "none"]
2723
+ }],
2724
+ /**
2725
+ * Resize
2726
+ * @see https://tailwindcss.com/docs/resize
2727
+ */
2728
+ resize: [{
2729
+ resize: ["none", "", "y", "x"]
2730
+ }],
2731
+ /**
2732
+ * Scroll Behavior
2733
+ * @see https://tailwindcss.com/docs/scroll-behavior
2734
+ */
2735
+ "scroll-behavior": [{
2736
+ scroll: ["auto", "smooth"]
2737
+ }],
2738
+ /**
2739
+ * Scroll Margin
2740
+ * @see https://tailwindcss.com/docs/scroll-margin
2741
+ */
2742
+ "scroll-m": [{
2743
+ "scroll-m": scaleUnambiguousSpacing()
2744
+ }],
2745
+ /**
2746
+ * Scroll Margin X
2747
+ * @see https://tailwindcss.com/docs/scroll-margin
2748
+ */
2749
+ "scroll-mx": [{
2750
+ "scroll-mx": scaleUnambiguousSpacing()
2751
+ }],
2752
+ /**
2753
+ * Scroll Margin Y
2754
+ * @see https://tailwindcss.com/docs/scroll-margin
2755
+ */
2756
+ "scroll-my": [{
2757
+ "scroll-my": scaleUnambiguousSpacing()
2758
+ }],
2759
+ /**
2760
+ * Scroll Margin Start
2761
+ * @see https://tailwindcss.com/docs/scroll-margin
2762
+ */
2763
+ "scroll-ms": [{
2764
+ "scroll-ms": scaleUnambiguousSpacing()
2765
+ }],
2766
+ /**
2767
+ * Scroll Margin End
2768
+ * @see https://tailwindcss.com/docs/scroll-margin
2769
+ */
2770
+ "scroll-me": [{
2771
+ "scroll-me": scaleUnambiguousSpacing()
2772
+ }],
2773
+ /**
2774
+ * Scroll Margin Top
2775
+ * @see https://tailwindcss.com/docs/scroll-margin
2776
+ */
2777
+ "scroll-mt": [{
2778
+ "scroll-mt": scaleUnambiguousSpacing()
2779
+ }],
2780
+ /**
2781
+ * Scroll Margin Right
2782
+ * @see https://tailwindcss.com/docs/scroll-margin
2783
+ */
2784
+ "scroll-mr": [{
2785
+ "scroll-mr": scaleUnambiguousSpacing()
2786
+ }],
2787
+ /**
2788
+ * Scroll Margin Bottom
2789
+ * @see https://tailwindcss.com/docs/scroll-margin
2790
+ */
2791
+ "scroll-mb": [{
2792
+ "scroll-mb": scaleUnambiguousSpacing()
2793
+ }],
2794
+ /**
2795
+ * Scroll Margin Left
2796
+ * @see https://tailwindcss.com/docs/scroll-margin
2797
+ */
2798
+ "scroll-ml": [{
2799
+ "scroll-ml": scaleUnambiguousSpacing()
2800
+ }],
2801
+ /**
2802
+ * Scroll Padding
2803
+ * @see https://tailwindcss.com/docs/scroll-padding
2804
+ */
2805
+ "scroll-p": [{
2806
+ "scroll-p": scaleUnambiguousSpacing()
2807
+ }],
2808
+ /**
2809
+ * Scroll Padding X
2810
+ * @see https://tailwindcss.com/docs/scroll-padding
2811
+ */
2812
+ "scroll-px": [{
2813
+ "scroll-px": scaleUnambiguousSpacing()
2814
+ }],
2815
+ /**
2816
+ * Scroll Padding Y
2817
+ * @see https://tailwindcss.com/docs/scroll-padding
2818
+ */
2819
+ "scroll-py": [{
2820
+ "scroll-py": scaleUnambiguousSpacing()
2821
+ }],
2822
+ /**
2823
+ * Scroll Padding Start
2824
+ * @see https://tailwindcss.com/docs/scroll-padding
2825
+ */
2826
+ "scroll-ps": [{
2827
+ "scroll-ps": scaleUnambiguousSpacing()
2828
+ }],
2829
+ /**
2830
+ * Scroll Padding End
2831
+ * @see https://tailwindcss.com/docs/scroll-padding
2832
+ */
2833
+ "scroll-pe": [{
2834
+ "scroll-pe": scaleUnambiguousSpacing()
2835
+ }],
2836
+ /**
2837
+ * Scroll Padding Top
2838
+ * @see https://tailwindcss.com/docs/scroll-padding
2839
+ */
2840
+ "scroll-pt": [{
2841
+ "scroll-pt": scaleUnambiguousSpacing()
2842
+ }],
2843
+ /**
2844
+ * Scroll Padding Right
2845
+ * @see https://tailwindcss.com/docs/scroll-padding
2846
+ */
2847
+ "scroll-pr": [{
2848
+ "scroll-pr": scaleUnambiguousSpacing()
2849
+ }],
2850
+ /**
2851
+ * Scroll Padding Bottom
2852
+ * @see https://tailwindcss.com/docs/scroll-padding
2853
+ */
2854
+ "scroll-pb": [{
2855
+ "scroll-pb": scaleUnambiguousSpacing()
2856
+ }],
2857
+ /**
2858
+ * Scroll Padding Left
2859
+ * @see https://tailwindcss.com/docs/scroll-padding
2860
+ */
2861
+ "scroll-pl": [{
2862
+ "scroll-pl": scaleUnambiguousSpacing()
2863
+ }],
2864
+ /**
2865
+ * Scroll Snap Align
2866
+ * @see https://tailwindcss.com/docs/scroll-snap-align
2867
+ */
2868
+ "snap-align": [{
2869
+ snap: ["start", "end", "center", "align-none"]
2870
+ }],
2871
+ /**
2872
+ * Scroll Snap Stop
2873
+ * @see https://tailwindcss.com/docs/scroll-snap-stop
2874
+ */
2875
+ "snap-stop": [{
2876
+ snap: ["normal", "always"]
2877
+ }],
2878
+ /**
2879
+ * Scroll Snap Type
2880
+ * @see https://tailwindcss.com/docs/scroll-snap-type
2881
+ */
2882
+ "snap-type": [{
2883
+ snap: ["none", "x", "y", "both"]
2884
+ }],
2885
+ /**
2886
+ * Scroll Snap Type Strictness
2887
+ * @see https://tailwindcss.com/docs/scroll-snap-type
2888
+ */
2889
+ "snap-strictness": [{
2890
+ snap: ["mandatory", "proximity"]
2891
+ }],
2892
+ /**
2893
+ * Touch Action
2894
+ * @see https://tailwindcss.com/docs/touch-action
2895
+ */
2896
+ touch: [{
2897
+ touch: ["auto", "none", "manipulation"]
2898
+ }],
2899
+ /**
2900
+ * Touch Action X
2901
+ * @see https://tailwindcss.com/docs/touch-action
2902
+ */
2903
+ "touch-x": [{
2904
+ "touch-pan": ["x", "left", "right"]
2905
+ }],
2906
+ /**
2907
+ * Touch Action Y
2908
+ * @see https://tailwindcss.com/docs/touch-action
2909
+ */
2910
+ "touch-y": [{
2911
+ "touch-pan": ["y", "up", "down"]
2912
+ }],
2913
+ /**
2914
+ * Touch Action Pinch Zoom
2915
+ * @see https://tailwindcss.com/docs/touch-action
2916
+ */
2917
+ "touch-pz": ["touch-pinch-zoom"],
2918
+ /**
2919
+ * User Select
2920
+ * @see https://tailwindcss.com/docs/user-select
2921
+ */
2922
+ select: [{
2923
+ select: ["none", "text", "all", "auto"]
2924
+ }],
2925
+ /**
2926
+ * Will Change
2927
+ * @see https://tailwindcss.com/docs/will-change
2928
+ */
2929
+ "will-change": [{
2930
+ "will-change": ["auto", "scroll", "contents", "transform", isArbitraryVariable, isArbitraryValue]
2931
+ }],
2932
+ // -----------
2933
+ // --- SVG ---
2934
+ // -----------
2935
+ /**
2936
+ * Fill
2937
+ * @see https://tailwindcss.com/docs/fill
2938
+ */
2939
+ fill: [{
2940
+ fill: ["none", ...scaleColor()]
2941
+ }],
2942
+ /**
2943
+ * Stroke Width
2944
+ * @see https://tailwindcss.com/docs/stroke-width
2945
+ */
2946
+ "stroke-w": [{
2947
+ stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]
2948
+ }],
2949
+ /**
2950
+ * Stroke
2951
+ * @see https://tailwindcss.com/docs/stroke
2952
+ */
2953
+ stroke: [{
2954
+ stroke: ["none", ...scaleColor()]
2955
+ }],
2956
+ // ---------------------
2957
+ // --- Accessibility ---
2958
+ // ---------------------
2959
+ /**
2960
+ * Forced Color Adjust
2961
+ * @see https://tailwindcss.com/docs/forced-color-adjust
2962
+ */
2963
+ "forced-color-adjust": [{
2964
+ "forced-color-adjust": ["auto", "none"]
2965
+ }]
2966
+ },
2967
+ conflictingClassGroups: {
2968
+ overflow: ["overflow-x", "overflow-y"],
2969
+ overscroll: ["overscroll-x", "overscroll-y"],
2970
+ inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
2971
+ "inset-x": ["right", "left"],
2972
+ "inset-y": ["top", "bottom"],
2973
+ flex: ["basis", "grow", "shrink"],
2974
+ gap: ["gap-x", "gap-y"],
2975
+ p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
2976
+ px: ["pr", "pl"],
2977
+ py: ["pt", "pb"],
2978
+ m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
2979
+ mx: ["mr", "ml"],
2980
+ my: ["mt", "mb"],
2981
+ size: ["w", "h"],
2982
+ "font-size": ["leading"],
2983
+ "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
2984
+ "fvn-ordinal": ["fvn-normal"],
2985
+ "fvn-slashed-zero": ["fvn-normal"],
2986
+ "fvn-figure": ["fvn-normal"],
2987
+ "fvn-spacing": ["fvn-normal"],
2988
+ "fvn-fraction": ["fvn-normal"],
2989
+ "line-clamp": ["display", "overflow"],
2990
+ rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"],
2991
+ "rounded-s": ["rounded-ss", "rounded-es"],
2992
+ "rounded-e": ["rounded-se", "rounded-ee"],
2993
+ "rounded-t": ["rounded-tl", "rounded-tr"],
2994
+ "rounded-r": ["rounded-tr", "rounded-br"],
2995
+ "rounded-b": ["rounded-br", "rounded-bl"],
2996
+ "rounded-l": ["rounded-tl", "rounded-bl"],
2997
+ "border-spacing": ["border-spacing-x", "border-spacing-y"],
2998
+ "border-w": ["border-w-x", "border-w-y", "border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
2999
+ "border-w-x": ["border-w-r", "border-w-l"],
3000
+ "border-w-y": ["border-w-t", "border-w-b"],
3001
+ "border-color": ["border-color-x", "border-color-y", "border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
3002
+ "border-color-x": ["border-color-r", "border-color-l"],
3003
+ "border-color-y": ["border-color-t", "border-color-b"],
3004
+ translate: ["translate-x", "translate-y", "translate-none"],
3005
+ "translate-none": ["translate", "translate-x", "translate-y", "translate-z"],
3006
+ "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
3007
+ "scroll-mx": ["scroll-mr", "scroll-ml"],
3008
+ "scroll-my": ["scroll-mt", "scroll-mb"],
3009
+ "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
3010
+ "scroll-px": ["scroll-pr", "scroll-pl"],
3011
+ "scroll-py": ["scroll-pt", "scroll-pb"],
3012
+ touch: ["touch-x", "touch-y", "touch-pz"],
3013
+ "touch-x": ["touch"],
3014
+ "touch-y": ["touch"],
3015
+ "touch-pz": ["touch"]
3016
+ },
3017
+ conflictingClassGroupModifiers: {
3018
+ "font-size": ["leading"]
3019
+ },
3020
+ orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
3021
+ };
3022
+ };
3023
+ var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
3024
+
3025
+ // ../utils/src/tw.ts
3026
+ function twClsx(...inputs) {
3027
+ return twMerge(clsx(inputs));
3028
+ }
3029
+
3030
+ // src/youtube.tsx
3031
+ import { useCallback, useEffect, useRef } from "react";
3032
+ import { jsx } from "react/jsx-runtime";
3033
+ var iframeApiPromise = null;
3034
+ function loadYouTubeIframeAPI() {
3035
+ if (window.YT?.Player) return Promise.resolve(window.YT);
3036
+ if (iframeApiPromise) return iframeApiPromise;
3037
+ iframeApiPromise = new Promise((resolve, reject) => {
3038
+ const existing = document.querySelector('script[src="https://www.youtube.com/iframe_api"]');
3039
+ if (!existing) {
3040
+ const tag = document.createElement("script");
3041
+ tag.src = "https://www.youtube.com/iframe_api";
3042
+ tag.async = true;
3043
+ tag.onerror = () => reject(new Error("YouTube IFrame API load failed"));
3044
+ document.head.appendChild(tag);
3045
+ }
3046
+ const prevReady = window.onYouTubeIframeAPIReady;
3047
+ window.onYouTubeIframeAPIReady = () => {
3048
+ prevReady?.();
3049
+ if (window.YT?.Player) resolve(window.YT);
3050
+ };
3051
+ });
3052
+ return iframeApiPromise;
3053
+ }
3054
+ function useYTPlayer() {
3055
+ useEffect(() => {
3056
+ loadYouTubeIframeAPI();
3057
+ }, []);
3058
+ const createPlayer = useCallback(async (container, options) => {
3059
+ const YT = await loadYouTubeIframeAPI();
3060
+ return new YT.Player(container, options);
3061
+ }, []);
3062
+ return { createPlayer };
3063
+ }
3064
+ function YouTube({ videoId, className, onReady, onEnded, onLoaded, onStateChange }) {
3065
+ const ref = useRef(null);
3066
+ const { createPlayer } = useYTPlayer();
3067
+ useEffect(() => {
3068
+ createPlayer("yt-player", {
3069
+ videoId,
3070
+ playerVars: {
3071
+ playsinline: 1
3072
+ },
3073
+ events: {
3074
+ onReady: (e) => {
3075
+ ref.current = e.target;
3076
+ onReady?.(e);
3077
+ },
3078
+ onStateChange: (e) => {
3079
+ switch (e.data) {
3080
+ case PlayerStates.ENDED: {
3081
+ onEnded?.();
3082
+ break;
3083
+ }
3084
+ case PlayerStates.UNSTARTED: {
3085
+ onLoaded?.();
3086
+ break;
3087
+ }
3088
+ }
3089
+ onStateChange?.(e.data);
3090
+ }
3091
+ }
3092
+ });
3093
+ return () => {
3094
+ ref.current?.destroy();
3095
+ ref.current = null;
3096
+ };
3097
+ }, [createPlayer]);
3098
+ useEffect(() => {
3099
+ if (!ref.current) return;
3100
+ if (!videoId) return;
3101
+ ref.current.cueVideoById({ videoId });
3102
+ }, [videoId]);
3103
+ return /* @__PURE__ */ jsx("div", { className: twClsx("overflow-hidden", className), children: /* @__PURE__ */ jsx("div", { id: "yt-player" }) });
3104
+ }
3105
+ var PlayerStates = {
3106
+ UNSTARTED: -1,
3107
+ ENDED: 0,
3108
+ PLAYING: 1,
3109
+ PAUSED: 2,
3110
+ BUFFERING: 3,
3111
+ CUED: 5
3112
+ };
3113
+ export {
3114
+ YouTube
3115
+ };