@powerhousedao/powerhouse-vetra-packages 6.2.3-dev.23 → 6.2.3-dev.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/browser/assets/{entry-4ObkElbc.js → entry-GDzXcBs1.js} +10 -6
  2. package/dist/browser/assets/{projection-entry-4FDMlGcp.js → projection-entry-BJpyPvov.js} +7 -13
  3. package/dist/browser/{documents-C-lAnv6o.js → documents-CRzouuNR.js} +45 -35
  4. package/dist/browser/{documents-C-lAnv6o.js.map → documents-CRzouuNR.js.map} +1 -1
  5. package/dist/browser/{editor-DNV-46lY.js → editor-CYdXmSpt.js} +2 -3
  6. package/dist/browser/{editor-DNV-46lY.js.map → editor-CYdXmSpt.js.map} +1 -1
  7. package/dist/browser/{editor-CQ4wUFK5.js → editor-Dk_HEgr2.js} +943 -66
  8. package/dist/browser/editor-Dk_HEgr2.js.map +1 -0
  9. package/dist/browser/editors/document-model-editor/module.js +1 -1
  10. package/dist/browser/editors/document-model-editor/module.js.map +1 -1
  11. package/dist/browser/editors/generic-drive-explorer/index.js +68 -57
  12. package/dist/browser/editors/generic-drive-explorer/index.js.map +1 -1
  13. package/dist/browser/editors/generic-drive-explorer/module.js +1 -1
  14. package/dist/browser/editors/generic-drive-explorer/module.js.map +1 -1
  15. package/dist/browser/{src-CVV6HzQZ-D-OQvEkh.js → folder-view-DjGlA0kT.js} +901 -1643
  16. package/dist/browser/folder-view-DjGlA0kT.js.map +1 -0
  17. package/dist/browser/{graphql-editor-DoXZvdNr.js → graphql-editor-C9Nc_cOY.js} +97 -85
  18. package/dist/browser/graphql-editor-C9Nc_cOY.js.map +1 -0
  19. package/dist/{node/hooks-Di3FASx-.mjs → browser/hooks-eQxBX7g4.js} +824 -444
  20. package/dist/browser/{hooks-Bh1JCohS.js.map → hooks-eQxBX7g4.js.map} +1 -1
  21. package/dist/browser/index.js +16 -14
  22. package/dist/browser/index.js.map +1 -1
  23. package/dist/browser/{json-editor-DBhkG5TF.js → json-editor-DfRD-pfk.js} +7 -7
  24. package/dist/browser/{json-editor-DBhkG5TF.js.map → json-editor-DfRD-pfk.js.map} +1 -1
  25. package/dist/browser/{parser-BBzK7bLd.js → parser-DtbeHA3H.js} +7 -6
  26. package/dist/browser/{parser-BBzK7bLd.js.map → parser-DtbeHA3H.js.map} +1 -1
  27. package/dist/browser/{chunk-BVTlhY3a.js → rolldown-runtime-DC62tzP2.js} +12 -3
  28. package/dist/browser/src-CrUksCLW-Co0PBoNN.js +5255 -0
  29. package/dist/browser/src-CrUksCLW-Co0PBoNN.js.map +1 -0
  30. package/dist/browser/{state-schemas-B47wHvDV.js → state-schemas-BSc_36Vd.js} +12 -10
  31. package/dist/browser/{state-schemas-B47wHvDV.js.map → state-schemas-BSc_36Vd.js.map} +1 -1
  32. package/dist/browser/{tslib.es6-CeIASJ2O.js → tslib.es6-Cno80yFJ.js} +1 -1
  33. package/dist/browser/{tslib.es6-CeIASJ2O.js.map → tslib.es6-Cno80yFJ.js.map} +1 -1
  34. package/dist/node/{documents-XAQfHX5Q.mjs → documents-D70S9PZL.mjs} +2 -2
  35. package/dist/node/documents-D70S9PZL.mjs.map +1 -0
  36. package/dist/node/{editor-Cp2TC5MJ.mjs → editor-BZZ0eN3p.mjs} +2 -3
  37. package/dist/node/{editor-Cp2TC5MJ.mjs.map → editor-BZZ0eN3p.mjs.map} +1 -1
  38. package/dist/node/{editor-BiiLqEe9.mjs → editor-CeSEXEgf.mjs} +866 -68
  39. package/dist/node/editor-CeSEXEgf.mjs.map +1 -0
  40. package/dist/node/editors/document-model-editor/module.mjs +1 -1
  41. package/dist/node/editors/document-model-editor/module.mjs.map +1 -1
  42. package/dist/node/editors/generic-drive-explorer/index.mjs +19 -13
  43. package/dist/node/editors/generic-drive-explorer/index.mjs.map +1 -1
  44. package/dist/node/editors/generic-drive-explorer/module.mjs +1 -1
  45. package/dist/node/editors/generic-drive-explorer/module.mjs.map +1 -1
  46. package/dist/node/{src-CVV6HzQZ-CvqjXbXk.mjs → folder-view-B2Jo-wsr.mjs} +891 -2311
  47. package/dist/node/{src-CVV6HzQZ-CvqjXbXk.mjs.map → folder-view-B2Jo-wsr.mjs.map} +1 -1
  48. package/dist/node/{graphql-BvV3tC1U.mjs → graphql-Dp4j7rmx.mjs} +50 -49
  49. package/dist/node/{graphql-BvV3tC1U.mjs.map → graphql-Dp4j7rmx.mjs.map} +1 -1
  50. package/dist/node/{graphql-editor-BhF6KN6y.mjs → graphql-editor-CBJXEY_C.mjs} +76 -61
  51. package/dist/node/graphql-editor-CBJXEY_C.mjs.map +1 -0
  52. package/dist/{browser/hooks-Bh1JCohS.js → node/hooks-C2b46djt.mjs} +824 -444
  53. package/dist/node/{hooks-Di3FASx-.mjs.map → hooks-C2b46djt.mjs.map} +1 -1
  54. package/dist/node/index.mjs +16 -15
  55. package/dist/node/index.mjs.map +1 -1
  56. package/dist/node/{json-editor-Cqc0zuz0.mjs → json-editor-DaqHARBD.mjs} +7 -7
  57. package/dist/node/{json-editor-Cqc0zuz0.mjs.map → json-editor-DaqHARBD.mjs.map} +1 -1
  58. package/dist/node/{schema-context-mHmP3Cl6.mjs → schema-context-CojjnSE6.mjs} +6 -5
  59. package/dist/node/schema-context-CojjnSE6.mjs.map +1 -0
  60. package/dist/node/src-CrUksCLW-BHpiSprT.mjs +5936 -0
  61. package/dist/node/src-CrUksCLW-BHpiSprT.mjs.map +1 -0
  62. package/dist/node/{state-schemas-DXG02fMh.mjs → state-schemas-CWuLjYFF.mjs} +13 -10
  63. package/dist/node/{state-schemas-DXG02fMh.mjs.map → state-schemas-CWuLjYFF.mjs.map} +1 -1
  64. package/dist/node/{tslib.es6-DdiHgz9e.mjs → tslib.es6-VORZjfk3.mjs} +45 -7
  65. package/dist/node/{tslib.es6-DdiHgz9e.mjs.map → tslib.es6-VORZjfk3.mjs.map} +1 -1
  66. package/package.json +11 -10
  67. package/dist/browser/button-sZQCXeCo.js +0 -803
  68. package/dist/browser/button-sZQCXeCo.js.map +0 -1
  69. package/dist/browser/dist-D3_ER0Dn.js +0 -2314
  70. package/dist/browser/dist-D3_ER0Dn.js.map +0 -1
  71. package/dist/browser/editor-CQ4wUFK5.js.map +0 -1
  72. package/dist/browser/folder-view-CzItU0hn.js +0 -957
  73. package/dist/browser/folder-view-CzItU0hn.js.map +0 -1
  74. package/dist/browser/graphql-editor-DoXZvdNr.js.map +0 -1
  75. package/dist/browser/schema-context-p2bhyog_.js +0 -69
  76. package/dist/browser/schema-context-p2bhyog_.js.map +0 -1
  77. package/dist/browser/src-CVV6HzQZ-D-OQvEkh.js.map +0 -1
  78. package/dist/node/button-5bnYEAVq.mjs +0 -785
  79. package/dist/node/button-5bnYEAVq.mjs.map +0 -1
  80. package/dist/node/chunk-17FXJ3dL.mjs +0 -31
  81. package/dist/node/dist-Bf_PIbO7.mjs +0 -2314
  82. package/dist/node/dist-Bf_PIbO7.mjs.map +0 -1
  83. package/dist/node/documents-XAQfHX5Q.mjs.map +0 -1
  84. package/dist/node/editor-BiiLqEe9.mjs.map +0 -1
  85. package/dist/node/folder-view-m_rH84Nz.mjs +0 -962
  86. package/dist/node/folder-view-m_rH84Nz.mjs.map +0 -1
  87. package/dist/node/graphql-editor-BhF6KN6y.mjs.map +0 -1
  88. package/dist/node/schema-context-mHmP3Cl6.mjs.map +0 -1
@@ -1,2314 +0,0 @@
1
- import * as React$1 from "react";
2
- import { jsx } from "react/jsx-runtime";
3
- import * as ReactDOM$1 from "react-dom";
4
- //#region ../../node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.mjs
5
- /**
6
- * Concatenates two arrays faster than the array spread operator.
7
- */
8
- const concatArrays = (array1, array2) => {
9
- const combinedArray = new Array(array1.length + array2.length);
10
- for (let i = 0; i < array1.length; i++) combinedArray[i] = array1[i];
11
- for (let i = 0; i < array2.length; i++) combinedArray[array1.length + i] = array2[i];
12
- return combinedArray;
13
- };
14
- const createClassValidatorObject = (classGroupId, validator) => ({
15
- classGroupId,
16
- validator
17
- });
18
- const createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators = null, classGroupId) => ({
19
- nextPart,
20
- validators,
21
- classGroupId
22
- });
23
- const CLASS_PART_SEPARATOR = "-";
24
- const EMPTY_CONFLICTS = [];
25
- const ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
26
- const createClassGroupUtils = (config) => {
27
- const classMap = createClassMap(config);
28
- const { conflictingClassGroups, conflictingClassGroupModifiers } = config;
29
- const getClassGroupId = (className) => {
30
- if (className.startsWith("[") && className.endsWith("]")) return getGroupIdForArbitraryProperty(className);
31
- const classParts = className.split(CLASS_PART_SEPARATOR);
32
- return getGroupRecursive(classParts, classParts[0] === "" && classParts.length > 1 ? 1 : 0, classMap);
33
- };
34
- const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
35
- if (hasPostfixModifier) {
36
- const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
37
- const baseConflicts = conflictingClassGroups[classGroupId];
38
- if (modifierConflicts) {
39
- if (baseConflicts) return concatArrays(baseConflicts, modifierConflicts);
40
- return modifierConflicts;
41
- }
42
- return baseConflicts || EMPTY_CONFLICTS;
43
- }
44
- return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
45
- };
46
- return {
47
- getClassGroupId,
48
- getConflictingClassGroupIds
49
- };
50
- };
51
- const getGroupRecursive = (classParts, startIndex, classPartObject) => {
52
- if (classParts.length - startIndex === 0) return classPartObject.classGroupId;
53
- const currentClassPart = classParts[startIndex];
54
- const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
55
- if (nextClassPartObject) {
56
- const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
57
- if (result) return result;
58
- }
59
- const validators = classPartObject.validators;
60
- if (validators === null) return;
61
- const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
62
- const validatorsLength = validators.length;
63
- for (let i = 0; i < validatorsLength; i++) {
64
- const validatorObj = validators[i];
65
- if (validatorObj.validator(classRest)) return validatorObj.classGroupId;
66
- }
67
- };
68
- /**
69
- * Get the class group ID for an arbitrary property.
70
- *
71
- * @param className - The class name to get the group ID for. Is expected to be string starting with `[` and ending with `]`.
72
- */
73
- const getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
74
- const content = className.slice(1, -1);
75
- const colonIndex = content.indexOf(":");
76
- const property = content.slice(0, colonIndex);
77
- return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
78
- })();
79
- /**
80
- * Exported for testing only
81
- */
82
- const createClassMap = (config) => {
83
- const { theme, classGroups } = config;
84
- return processClassGroups(classGroups, theme);
85
- };
86
- const processClassGroups = (classGroups, theme) => {
87
- const classMap = createClassPartObject();
88
- for (const classGroupId in classGroups) {
89
- const group = classGroups[classGroupId];
90
- processClassesRecursively(group, classMap, classGroupId, theme);
91
- }
92
- return classMap;
93
- };
94
- const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
95
- const len = classGroup.length;
96
- for (let i = 0; i < len; i++) {
97
- const classDefinition = classGroup[i];
98
- processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
99
- }
100
- };
101
- const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
102
- if (typeof classDefinition === "string") {
103
- processStringDefinition(classDefinition, classPartObject, classGroupId);
104
- return;
105
- }
106
- if (typeof classDefinition === "function") {
107
- processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
108
- return;
109
- }
110
- processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
111
- };
112
- const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
113
- const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
114
- classPartObjectToEdit.classGroupId = classGroupId;
115
- };
116
- const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
117
- if (isThemeGetter(classDefinition)) {
118
- processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
119
- return;
120
- }
121
- if (classPartObject.validators === null) classPartObject.validators = [];
122
- classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
123
- };
124
- const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
125
- const entries = Object.entries(classDefinition);
126
- const len = entries.length;
127
- for (let i = 0; i < len; i++) {
128
- const [key, value] = entries[i];
129
- processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
130
- }
131
- };
132
- const getPart = (classPartObject, path) => {
133
- let current = classPartObject;
134
- const parts = path.split(CLASS_PART_SEPARATOR);
135
- const len = parts.length;
136
- for (let i = 0; i < len; i++) {
137
- const part = parts[i];
138
- let next = current.nextPart.get(part);
139
- if (!next) {
140
- next = createClassPartObject();
141
- current.nextPart.set(part, next);
142
- }
143
- current = next;
144
- }
145
- return current;
146
- };
147
- const isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true;
148
- const createLruCache = (maxCacheSize) => {
149
- if (maxCacheSize < 1) return {
150
- get: () => void 0,
151
- set: () => {}
152
- };
153
- let cacheSize = 0;
154
- let cache = Object.create(null);
155
- let previousCache = Object.create(null);
156
- const update = (key, value) => {
157
- cache[key] = value;
158
- cacheSize++;
159
- if (cacheSize > maxCacheSize) {
160
- cacheSize = 0;
161
- previousCache = cache;
162
- cache = Object.create(null);
163
- }
164
- };
165
- return {
166
- get(key) {
167
- let value = cache[key];
168
- if (value !== void 0) return value;
169
- if ((value = previousCache[key]) !== void 0) {
170
- update(key, value);
171
- return value;
172
- }
173
- },
174
- set(key, value) {
175
- if (key in cache) cache[key] = value;
176
- else update(key, value);
177
- }
178
- };
179
- };
180
- const IMPORTANT_MODIFIER = "!";
181
- const MODIFIER_SEPARATOR = ":";
182
- const EMPTY_MODIFIERS = [];
183
- const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
184
- modifiers,
185
- hasImportantModifier,
186
- baseClassName,
187
- maybePostfixModifierPosition,
188
- isExternal
189
- });
190
- const createParseClassName = (config) => {
191
- const { prefix, experimentalParseClassName } = config;
192
- /**
193
- * Parse class name into parts.
194
- *
195
- * Inspired by `splitAtTopLevelOnly` used in Tailwind CSS
196
- * @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js
197
- */
198
- let parseClassName = (className) => {
199
- const modifiers = [];
200
- let bracketDepth = 0;
201
- let parenDepth = 0;
202
- let modifierStart = 0;
203
- let postfixModifierPosition;
204
- const len = className.length;
205
- for (let index = 0; index < len; index++) {
206
- const currentCharacter = className[index];
207
- if (bracketDepth === 0 && parenDepth === 0) {
208
- if (currentCharacter === MODIFIER_SEPARATOR) {
209
- modifiers.push(className.slice(modifierStart, index));
210
- modifierStart = index + 1;
211
- continue;
212
- }
213
- if (currentCharacter === "/") {
214
- postfixModifierPosition = index;
215
- continue;
216
- }
217
- }
218
- if (currentCharacter === "[") bracketDepth++;
219
- else if (currentCharacter === "]") bracketDepth--;
220
- else if (currentCharacter === "(") parenDepth++;
221
- else if (currentCharacter === ")") parenDepth--;
222
- }
223
- const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
224
- let baseClassName = baseClassNameWithImportantModifier;
225
- let hasImportantModifier = false;
226
- if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
227
- baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
228
- hasImportantModifier = true;
229
- } else if (baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)) {
230
- baseClassName = baseClassNameWithImportantModifier.slice(1);
231
- hasImportantModifier = true;
232
- }
233
- const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
234
- return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
235
- };
236
- if (prefix) {
237
- const fullPrefix = prefix + MODIFIER_SEPARATOR;
238
- const parseClassNameOriginal = parseClassName;
239
- parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, void 0, true);
240
- }
241
- if (experimentalParseClassName) {
242
- const parseClassNameOriginal = parseClassName;
243
- parseClassName = (className) => experimentalParseClassName({
244
- className,
245
- parseClassName: parseClassNameOriginal
246
- });
247
- }
248
- return parseClassName;
249
- };
250
- /**
251
- * Sorts modifiers according to following schema:
252
- * - Predefined modifiers are sorted alphabetically
253
- * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it
254
- */
255
- const createSortModifiers = (config) => {
256
- const modifierWeights = /* @__PURE__ */ new Map();
257
- config.orderSensitiveModifiers.forEach((mod, index) => {
258
- modifierWeights.set(mod, 1e6 + index);
259
- });
260
- return (modifiers) => {
261
- const result = [];
262
- let currentSegment = [];
263
- for (let i = 0; i < modifiers.length; i++) {
264
- const modifier = modifiers[i];
265
- const isArbitrary = modifier[0] === "[";
266
- const isOrderSensitive = modifierWeights.has(modifier);
267
- if (isArbitrary || isOrderSensitive) {
268
- if (currentSegment.length > 0) {
269
- currentSegment.sort();
270
- result.push(...currentSegment);
271
- currentSegment = [];
272
- }
273
- result.push(modifier);
274
- } else currentSegment.push(modifier);
275
- }
276
- if (currentSegment.length > 0) {
277
- currentSegment.sort();
278
- result.push(...currentSegment);
279
- }
280
- return result;
281
- };
282
- };
283
- const createConfigUtils = (config) => ({
284
- cache: createLruCache(config.cacheSize),
285
- parseClassName: createParseClassName(config),
286
- sortModifiers: createSortModifiers(config),
287
- ...createClassGroupUtils(config)
288
- });
289
- const SPLIT_CLASSES_REGEX = /\s+/;
290
- const mergeClassList = (classList, configUtils) => {
291
- const { parseClassName, getClassGroupId, getConflictingClassGroupIds, sortModifiers } = configUtils;
292
- /**
293
- * Set of classGroupIds in following format:
294
- * `{importantModifier}{variantModifiers}{classGroupId}`
295
- * @example 'float'
296
- * @example 'hover:focus:bg-color'
297
- * @example 'md:!pr'
298
- */
299
- const classGroupsInConflict = [];
300
- const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
301
- let result = "";
302
- for (let index = classNames.length - 1; index >= 0; index -= 1) {
303
- const originalClassName = classNames[index];
304
- const { isExternal, modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition } = parseClassName(originalClassName);
305
- if (isExternal) {
306
- result = originalClassName + (result.length > 0 ? " " + result : result);
307
- continue;
308
- }
309
- let hasPostfixModifier = !!maybePostfixModifierPosition;
310
- let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
311
- if (!classGroupId) {
312
- if (!hasPostfixModifier) {
313
- result = originalClassName + (result.length > 0 ? " " + result : result);
314
- continue;
315
- }
316
- classGroupId = getClassGroupId(baseClassName);
317
- if (!classGroupId) {
318
- result = originalClassName + (result.length > 0 ? " " + result : result);
319
- continue;
320
- }
321
- hasPostfixModifier = false;
322
- }
323
- const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":");
324
- const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
325
- const classId = modifierId + classGroupId;
326
- if (classGroupsInConflict.indexOf(classId) > -1) continue;
327
- classGroupsInConflict.push(classId);
328
- const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
329
- for (let i = 0; i < conflictGroups.length; ++i) {
330
- const group = conflictGroups[i];
331
- classGroupsInConflict.push(modifierId + group);
332
- }
333
- result = originalClassName + (result.length > 0 ? " " + result : result);
334
- }
335
- return result;
336
- };
337
- /**
338
- * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.
339
- *
340
- * Specifically:
341
- * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js
342
- * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts
343
- *
344
- * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
345
- */
346
- const twJoin = (...classLists) => {
347
- let index = 0;
348
- let argument;
349
- let resolvedValue;
350
- let string = "";
351
- while (index < classLists.length) if (argument = classLists[index++]) {
352
- if (resolvedValue = toValue(argument)) {
353
- string && (string += " ");
354
- string += resolvedValue;
355
- }
356
- }
357
- return string;
358
- };
359
- const toValue = (mix) => {
360
- if (typeof mix === "string") return mix;
361
- let resolvedValue;
362
- let string = "";
363
- for (let k = 0; k < mix.length; k++) if (mix[k]) {
364
- if (resolvedValue = toValue(mix[k])) {
365
- string && (string += " ");
366
- string += resolvedValue;
367
- }
368
- }
369
- return string;
370
- };
371
- const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
372
- let configUtils;
373
- let cacheGet;
374
- let cacheSet;
375
- let functionToCall;
376
- const initTailwindMerge = (classList) => {
377
- configUtils = createConfigUtils(createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst()));
378
- cacheGet = configUtils.cache.get;
379
- cacheSet = configUtils.cache.set;
380
- functionToCall = tailwindMerge;
381
- return tailwindMerge(classList);
382
- };
383
- const tailwindMerge = (classList) => {
384
- const cachedResult = cacheGet(classList);
385
- if (cachedResult) return cachedResult;
386
- const result = mergeClassList(classList, configUtils);
387
- cacheSet(classList, result);
388
- return result;
389
- };
390
- functionToCall = initTailwindMerge;
391
- return (...args) => functionToCall(twJoin(...args));
392
- };
393
- const fallbackThemeArr = [];
394
- const fromTheme = (key) => {
395
- const themeGetter = (theme) => theme[key] || fallbackThemeArr;
396
- themeGetter.isThemeGetter = true;
397
- return themeGetter;
398
- };
399
- const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
400
- const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
401
- const fractionRegex = /^\d+\/\d+$/;
402
- const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
403
- const 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$/;
404
- const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
405
- const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
406
- const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
407
- const isFraction = (value) => fractionRegex.test(value);
408
- const isNumber = (value) => !!value && !Number.isNaN(Number(value));
409
- const isInteger = (value) => !!value && Number.isInteger(Number(value));
410
- const isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
411
- const isTshirtSize = (value) => tshirtUnitRegex.test(value);
412
- const isAny = () => true;
413
- const isLengthOnly = (value) => lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
414
- const isNever = () => false;
415
- const isShadow = (value) => shadowRegex.test(value);
416
- const isImage = (value) => imageRegex.test(value);
417
- const isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value);
418
- const isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever);
419
- const isArbitraryValue = (value) => arbitraryValueRegex.test(value);
420
- const isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
421
- const isArbitraryNumber = (value) => getIsArbitraryValue(value, isLabelNumber, isNumber);
422
- const isArbitraryPosition = (value) => getIsArbitraryValue(value, isLabelPosition, isNever);
423
- const isArbitraryImage = (value) => getIsArbitraryValue(value, isLabelImage, isImage);
424
- const isArbitraryShadow = (value) => getIsArbitraryValue(value, isLabelShadow, isShadow);
425
- const isArbitraryVariable = (value) => arbitraryVariableRegex.test(value);
426
- const isArbitraryVariableLength = (value) => getIsArbitraryVariable(value, isLabelLength);
427
- const isArbitraryVariableFamilyName = (value) => getIsArbitraryVariable(value, isLabelFamilyName);
428
- const isArbitraryVariablePosition = (value) => getIsArbitraryVariable(value, isLabelPosition);
429
- const isArbitraryVariableSize = (value) => getIsArbitraryVariable(value, isLabelSize);
430
- const isArbitraryVariableImage = (value) => getIsArbitraryVariable(value, isLabelImage);
431
- const isArbitraryVariableShadow = (value) => getIsArbitraryVariable(value, isLabelShadow, true);
432
- const getIsArbitraryValue = (value, testLabel, testValue) => {
433
- const result = arbitraryValueRegex.exec(value);
434
- if (result) {
435
- if (result[1]) return testLabel(result[1]);
436
- return testValue(result[2]);
437
- }
438
- return false;
439
- };
440
- const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {
441
- const result = arbitraryVariableRegex.exec(value);
442
- if (result) {
443
- if (result[1]) return testLabel(result[1]);
444
- return shouldMatchNoLabel;
445
- }
446
- return false;
447
- };
448
- const isLabelPosition = (label) => label === "position" || label === "percentage";
449
- const isLabelImage = (label) => label === "image" || label === "url";
450
- const isLabelSize = (label) => label === "length" || label === "size" || label === "bg-size";
451
- const isLabelLength = (label) => label === "length";
452
- const isLabelNumber = (label) => label === "number";
453
- const isLabelFamilyName = (label) => label === "family-name";
454
- const isLabelShadow = (label) => label === "shadow";
455
- const getDefaultConfig = () => {
456
- /**
457
- * Theme getters for theme variable namespaces
458
- * @see https://tailwindcss.com/docs/theme#theme-variable-namespaces
459
- */
460
- const themeColor = fromTheme("color");
461
- const themeFont = fromTheme("font");
462
- const themeText = fromTheme("text");
463
- const themeFontWeight = fromTheme("font-weight");
464
- const themeTracking = fromTheme("tracking");
465
- const themeLeading = fromTheme("leading");
466
- const themeBreakpoint = fromTheme("breakpoint");
467
- const themeContainer = fromTheme("container");
468
- const themeSpacing = fromTheme("spacing");
469
- const themeRadius = fromTheme("radius");
470
- const themeShadow = fromTheme("shadow");
471
- const themeInsetShadow = fromTheme("inset-shadow");
472
- const themeTextShadow = fromTheme("text-shadow");
473
- const themeDropShadow = fromTheme("drop-shadow");
474
- const themeBlur = fromTheme("blur");
475
- const themePerspective = fromTheme("perspective");
476
- const themeAspect = fromTheme("aspect");
477
- const themeEase = fromTheme("ease");
478
- const themeAnimate = fromTheme("animate");
479
- /**
480
- * Helpers to avoid repeating the same scales
481
- *
482
- * We use functions that create a new array every time they're called instead of static arrays.
483
- * This ensures that users who modify any scale by mutating the array (e.g. with `array.push(element)`) don't accidentally mutate arrays in other parts of the config.
484
- */
485
- const scaleBreak = () => [
486
- "auto",
487
- "avoid",
488
- "all",
489
- "avoid-page",
490
- "page",
491
- "left",
492
- "right",
493
- "column"
494
- ];
495
- const scalePosition = () => [
496
- "center",
497
- "top",
498
- "bottom",
499
- "left",
500
- "right",
501
- "top-left",
502
- "left-top",
503
- "top-right",
504
- "right-top",
505
- "bottom-right",
506
- "right-bottom",
507
- "bottom-left",
508
- "left-bottom"
509
- ];
510
- const scalePositionWithArbitrary = () => [
511
- ...scalePosition(),
512
- isArbitraryVariable,
513
- isArbitraryValue
514
- ];
515
- const scaleOverflow = () => [
516
- "auto",
517
- "hidden",
518
- "clip",
519
- "visible",
520
- "scroll"
521
- ];
522
- const scaleOverscroll = () => [
523
- "auto",
524
- "contain",
525
- "none"
526
- ];
527
- const scaleUnambiguousSpacing = () => [
528
- isArbitraryVariable,
529
- isArbitraryValue,
530
- themeSpacing
531
- ];
532
- const scaleInset = () => [
533
- isFraction,
534
- "full",
535
- "auto",
536
- ...scaleUnambiguousSpacing()
537
- ];
538
- const scaleGridTemplateColsRows = () => [
539
- isInteger,
540
- "none",
541
- "subgrid",
542
- isArbitraryVariable,
543
- isArbitraryValue
544
- ];
545
- const scaleGridColRowStartAndEnd = () => [
546
- "auto",
547
- { span: [
548
- "full",
549
- isInteger,
550
- isArbitraryVariable,
551
- isArbitraryValue
552
- ] },
553
- isInteger,
554
- isArbitraryVariable,
555
- isArbitraryValue
556
- ];
557
- const scaleGridColRowStartOrEnd = () => [
558
- isInteger,
559
- "auto",
560
- isArbitraryVariable,
561
- isArbitraryValue
562
- ];
563
- const scaleGridAutoColsRows = () => [
564
- "auto",
565
- "min",
566
- "max",
567
- "fr",
568
- isArbitraryVariable,
569
- isArbitraryValue
570
- ];
571
- const scaleAlignPrimaryAxis = () => [
572
- "start",
573
- "end",
574
- "center",
575
- "between",
576
- "around",
577
- "evenly",
578
- "stretch",
579
- "baseline",
580
- "center-safe",
581
- "end-safe"
582
- ];
583
- const scaleAlignSecondaryAxis = () => [
584
- "start",
585
- "end",
586
- "center",
587
- "stretch",
588
- "center-safe",
589
- "end-safe"
590
- ];
591
- const scaleMargin = () => ["auto", ...scaleUnambiguousSpacing()];
592
- const scaleSizing = () => [
593
- isFraction,
594
- "auto",
595
- "full",
596
- "dvw",
597
- "dvh",
598
- "lvw",
599
- "lvh",
600
- "svw",
601
- "svh",
602
- "min",
603
- "max",
604
- "fit",
605
- ...scaleUnambiguousSpacing()
606
- ];
607
- const scaleColor = () => [
608
- themeColor,
609
- isArbitraryVariable,
610
- isArbitraryValue
611
- ];
612
- const scaleBgPosition = () => [
613
- ...scalePosition(),
614
- isArbitraryVariablePosition,
615
- isArbitraryPosition,
616
- { position: [isArbitraryVariable, isArbitraryValue] }
617
- ];
618
- const scaleBgRepeat = () => ["no-repeat", { repeat: [
619
- "",
620
- "x",
621
- "y",
622
- "space",
623
- "round"
624
- ] }];
625
- const scaleBgSize = () => [
626
- "auto",
627
- "cover",
628
- "contain",
629
- isArbitraryVariableSize,
630
- isArbitrarySize,
631
- { size: [isArbitraryVariable, isArbitraryValue] }
632
- ];
633
- const scaleGradientStopPosition = () => [
634
- isPercent,
635
- isArbitraryVariableLength,
636
- isArbitraryLength
637
- ];
638
- const scaleRadius = () => [
639
- "",
640
- "none",
641
- "full",
642
- themeRadius,
643
- isArbitraryVariable,
644
- isArbitraryValue
645
- ];
646
- const scaleBorderWidth = () => [
647
- "",
648
- isNumber,
649
- isArbitraryVariableLength,
650
- isArbitraryLength
651
- ];
652
- const scaleLineStyle = () => [
653
- "solid",
654
- "dashed",
655
- "dotted",
656
- "double"
657
- ];
658
- const scaleBlendMode = () => [
659
- "normal",
660
- "multiply",
661
- "screen",
662
- "overlay",
663
- "darken",
664
- "lighten",
665
- "color-dodge",
666
- "color-burn",
667
- "hard-light",
668
- "soft-light",
669
- "difference",
670
- "exclusion",
671
- "hue",
672
- "saturation",
673
- "color",
674
- "luminosity"
675
- ];
676
- const scaleMaskImagePosition = () => [
677
- isNumber,
678
- isPercent,
679
- isArbitraryVariablePosition,
680
- isArbitraryPosition
681
- ];
682
- const scaleBlur = () => [
683
- "",
684
- "none",
685
- themeBlur,
686
- isArbitraryVariable,
687
- isArbitraryValue
688
- ];
689
- const scaleRotate = () => [
690
- "none",
691
- isNumber,
692
- isArbitraryVariable,
693
- isArbitraryValue
694
- ];
695
- const scaleScale = () => [
696
- "none",
697
- isNumber,
698
- isArbitraryVariable,
699
- isArbitraryValue
700
- ];
701
- const scaleSkew = () => [
702
- isNumber,
703
- isArbitraryVariable,
704
- isArbitraryValue
705
- ];
706
- const scaleTranslate = () => [
707
- isFraction,
708
- "full",
709
- ...scaleUnambiguousSpacing()
710
- ];
711
- return {
712
- cacheSize: 500,
713
- theme: {
714
- animate: [
715
- "spin",
716
- "ping",
717
- "pulse",
718
- "bounce"
719
- ],
720
- aspect: ["video"],
721
- blur: [isTshirtSize],
722
- breakpoint: [isTshirtSize],
723
- color: [isAny],
724
- container: [isTshirtSize],
725
- "drop-shadow": [isTshirtSize],
726
- ease: [
727
- "in",
728
- "out",
729
- "in-out"
730
- ],
731
- font: [isAnyNonArbitrary],
732
- "font-weight": [
733
- "thin",
734
- "extralight",
735
- "light",
736
- "normal",
737
- "medium",
738
- "semibold",
739
- "bold",
740
- "extrabold",
741
- "black"
742
- ],
743
- "inset-shadow": [isTshirtSize],
744
- leading: [
745
- "none",
746
- "tight",
747
- "snug",
748
- "normal",
749
- "relaxed",
750
- "loose"
751
- ],
752
- perspective: [
753
- "dramatic",
754
- "near",
755
- "normal",
756
- "midrange",
757
- "distant",
758
- "none"
759
- ],
760
- radius: [isTshirtSize],
761
- shadow: [isTshirtSize],
762
- spacing: ["px", isNumber],
763
- text: [isTshirtSize],
764
- "text-shadow": [isTshirtSize],
765
- tracking: [
766
- "tighter",
767
- "tight",
768
- "normal",
769
- "wide",
770
- "wider",
771
- "widest"
772
- ]
773
- },
774
- classGroups: {
775
- aspect: [{ aspect: [
776
- "auto",
777
- "square",
778
- isFraction,
779
- isArbitraryValue,
780
- isArbitraryVariable,
781
- themeAspect
782
- ] }],
783
- container: ["container"],
784
- columns: [{ columns: [
785
- isNumber,
786
- isArbitraryValue,
787
- isArbitraryVariable,
788
- themeContainer
789
- ] }],
790
- "break-after": [{ "break-after": scaleBreak() }],
791
- "break-before": [{ "break-before": scaleBreak() }],
792
- "break-inside": [{ "break-inside": [
793
- "auto",
794
- "avoid",
795
- "avoid-page",
796
- "avoid-column"
797
- ] }],
798
- "box-decoration": [{ "box-decoration": ["slice", "clone"] }],
799
- box: [{ box: ["border", "content"] }],
800
- display: [
801
- "block",
802
- "inline-block",
803
- "inline",
804
- "flex",
805
- "inline-flex",
806
- "table",
807
- "inline-table",
808
- "table-caption",
809
- "table-cell",
810
- "table-column",
811
- "table-column-group",
812
- "table-footer-group",
813
- "table-header-group",
814
- "table-row-group",
815
- "table-row",
816
- "flow-root",
817
- "grid",
818
- "inline-grid",
819
- "contents",
820
- "list-item",
821
- "hidden"
822
- ],
823
- sr: ["sr-only", "not-sr-only"],
824
- float: [{ float: [
825
- "right",
826
- "left",
827
- "none",
828
- "start",
829
- "end"
830
- ] }],
831
- clear: [{ clear: [
832
- "left",
833
- "right",
834
- "both",
835
- "none",
836
- "start",
837
- "end"
838
- ] }],
839
- isolation: ["isolate", "isolation-auto"],
840
- "object-fit": [{ object: [
841
- "contain",
842
- "cover",
843
- "fill",
844
- "none",
845
- "scale-down"
846
- ] }],
847
- "object-position": [{ object: scalePositionWithArbitrary() }],
848
- overflow: [{ overflow: scaleOverflow() }],
849
- "overflow-x": [{ "overflow-x": scaleOverflow() }],
850
- "overflow-y": [{ "overflow-y": scaleOverflow() }],
851
- overscroll: [{ overscroll: scaleOverscroll() }],
852
- "overscroll-x": [{ "overscroll-x": scaleOverscroll() }],
853
- "overscroll-y": [{ "overscroll-y": scaleOverscroll() }],
854
- position: [
855
- "static",
856
- "fixed",
857
- "absolute",
858
- "relative",
859
- "sticky"
860
- ],
861
- inset: [{ inset: scaleInset() }],
862
- "inset-x": [{ "inset-x": scaleInset() }],
863
- "inset-y": [{ "inset-y": scaleInset() }],
864
- start: [{ start: scaleInset() }],
865
- end: [{ end: scaleInset() }],
866
- top: [{ top: scaleInset() }],
867
- right: [{ right: scaleInset() }],
868
- bottom: [{ bottom: scaleInset() }],
869
- left: [{ left: scaleInset() }],
870
- visibility: [
871
- "visible",
872
- "invisible",
873
- "collapse"
874
- ],
875
- z: [{ z: [
876
- isInteger,
877
- "auto",
878
- isArbitraryVariable,
879
- isArbitraryValue
880
- ] }],
881
- basis: [{ basis: [
882
- isFraction,
883
- "full",
884
- "auto",
885
- themeContainer,
886
- ...scaleUnambiguousSpacing()
887
- ] }],
888
- "flex-direction": [{ flex: [
889
- "row",
890
- "row-reverse",
891
- "col",
892
- "col-reverse"
893
- ] }],
894
- "flex-wrap": [{ flex: [
895
- "nowrap",
896
- "wrap",
897
- "wrap-reverse"
898
- ] }],
899
- flex: [{ flex: [
900
- isNumber,
901
- isFraction,
902
- "auto",
903
- "initial",
904
- "none",
905
- isArbitraryValue
906
- ] }],
907
- grow: [{ grow: [
908
- "",
909
- isNumber,
910
- isArbitraryVariable,
911
- isArbitraryValue
912
- ] }],
913
- shrink: [{ shrink: [
914
- "",
915
- isNumber,
916
- isArbitraryVariable,
917
- isArbitraryValue
918
- ] }],
919
- order: [{ order: [
920
- isInteger,
921
- "first",
922
- "last",
923
- "none",
924
- isArbitraryVariable,
925
- isArbitraryValue
926
- ] }],
927
- "grid-cols": [{ "grid-cols": scaleGridTemplateColsRows() }],
928
- "col-start-end": [{ col: scaleGridColRowStartAndEnd() }],
929
- "col-start": [{ "col-start": scaleGridColRowStartOrEnd() }],
930
- "col-end": [{ "col-end": scaleGridColRowStartOrEnd() }],
931
- "grid-rows": [{ "grid-rows": scaleGridTemplateColsRows() }],
932
- "row-start-end": [{ row: scaleGridColRowStartAndEnd() }],
933
- "row-start": [{ "row-start": scaleGridColRowStartOrEnd() }],
934
- "row-end": [{ "row-end": scaleGridColRowStartOrEnd() }],
935
- "grid-flow": [{ "grid-flow": [
936
- "row",
937
- "col",
938
- "dense",
939
- "row-dense",
940
- "col-dense"
941
- ] }],
942
- "auto-cols": [{ "auto-cols": scaleGridAutoColsRows() }],
943
- "auto-rows": [{ "auto-rows": scaleGridAutoColsRows() }],
944
- gap: [{ gap: scaleUnambiguousSpacing() }],
945
- "gap-x": [{ "gap-x": scaleUnambiguousSpacing() }],
946
- "gap-y": [{ "gap-y": scaleUnambiguousSpacing() }],
947
- "justify-content": [{ justify: [...scaleAlignPrimaryAxis(), "normal"] }],
948
- "justify-items": [{ "justify-items": [...scaleAlignSecondaryAxis(), "normal"] }],
949
- "justify-self": [{ "justify-self": ["auto", ...scaleAlignSecondaryAxis()] }],
950
- "align-content": [{ content: ["normal", ...scaleAlignPrimaryAxis()] }],
951
- "align-items": [{ items: [...scaleAlignSecondaryAxis(), { baseline: ["", "last"] }] }],
952
- "align-self": [{ self: [
953
- "auto",
954
- ...scaleAlignSecondaryAxis(),
955
- { baseline: ["", "last"] }
956
- ] }],
957
- "place-content": [{ "place-content": scaleAlignPrimaryAxis() }],
958
- "place-items": [{ "place-items": [...scaleAlignSecondaryAxis(), "baseline"] }],
959
- "place-self": [{ "place-self": ["auto", ...scaleAlignSecondaryAxis()] }],
960
- p: [{ p: scaleUnambiguousSpacing() }],
961
- px: [{ px: scaleUnambiguousSpacing() }],
962
- py: [{ py: scaleUnambiguousSpacing() }],
963
- ps: [{ ps: scaleUnambiguousSpacing() }],
964
- pe: [{ pe: scaleUnambiguousSpacing() }],
965
- pt: [{ pt: scaleUnambiguousSpacing() }],
966
- pr: [{ pr: scaleUnambiguousSpacing() }],
967
- pb: [{ pb: scaleUnambiguousSpacing() }],
968
- pl: [{ pl: scaleUnambiguousSpacing() }],
969
- m: [{ m: scaleMargin() }],
970
- mx: [{ mx: scaleMargin() }],
971
- my: [{ my: scaleMargin() }],
972
- ms: [{ ms: scaleMargin() }],
973
- me: [{ me: scaleMargin() }],
974
- mt: [{ mt: scaleMargin() }],
975
- mr: [{ mr: scaleMargin() }],
976
- mb: [{ mb: scaleMargin() }],
977
- ml: [{ ml: scaleMargin() }],
978
- "space-x": [{ "space-x": scaleUnambiguousSpacing() }],
979
- "space-x-reverse": ["space-x-reverse"],
980
- "space-y": [{ "space-y": scaleUnambiguousSpacing() }],
981
- "space-y-reverse": ["space-y-reverse"],
982
- size: [{ size: scaleSizing() }],
983
- w: [{ w: [
984
- themeContainer,
985
- "screen",
986
- ...scaleSizing()
987
- ] }],
988
- "min-w": [{ "min-w": [
989
- themeContainer,
990
- "screen",
991
- "none",
992
- ...scaleSizing()
993
- ] }],
994
- "max-w": [{ "max-w": [
995
- themeContainer,
996
- "screen",
997
- "none",
998
- "prose",
999
- { screen: [themeBreakpoint] },
1000
- ...scaleSizing()
1001
- ] }],
1002
- h: [{ h: [
1003
- "screen",
1004
- "lh",
1005
- ...scaleSizing()
1006
- ] }],
1007
- "min-h": [{ "min-h": [
1008
- "screen",
1009
- "lh",
1010
- "none",
1011
- ...scaleSizing()
1012
- ] }],
1013
- "max-h": [{ "max-h": [
1014
- "screen",
1015
- "lh",
1016
- ...scaleSizing()
1017
- ] }],
1018
- "font-size": [{ text: [
1019
- "base",
1020
- themeText,
1021
- isArbitraryVariableLength,
1022
- isArbitraryLength
1023
- ] }],
1024
- "font-smoothing": ["antialiased", "subpixel-antialiased"],
1025
- "font-style": ["italic", "not-italic"],
1026
- "font-weight": [{ font: [
1027
- themeFontWeight,
1028
- isArbitraryVariable,
1029
- isArbitraryNumber
1030
- ] }],
1031
- "font-stretch": [{ "font-stretch": [
1032
- "ultra-condensed",
1033
- "extra-condensed",
1034
- "condensed",
1035
- "semi-condensed",
1036
- "normal",
1037
- "semi-expanded",
1038
- "expanded",
1039
- "extra-expanded",
1040
- "ultra-expanded",
1041
- isPercent,
1042
- isArbitraryValue
1043
- ] }],
1044
- "font-family": [{ font: [
1045
- isArbitraryVariableFamilyName,
1046
- isArbitraryValue,
1047
- themeFont
1048
- ] }],
1049
- "fvn-normal": ["normal-nums"],
1050
- "fvn-ordinal": ["ordinal"],
1051
- "fvn-slashed-zero": ["slashed-zero"],
1052
- "fvn-figure": ["lining-nums", "oldstyle-nums"],
1053
- "fvn-spacing": ["proportional-nums", "tabular-nums"],
1054
- "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
1055
- tracking: [{ tracking: [
1056
- themeTracking,
1057
- isArbitraryVariable,
1058
- isArbitraryValue
1059
- ] }],
1060
- "line-clamp": [{ "line-clamp": [
1061
- isNumber,
1062
- "none",
1063
- isArbitraryVariable,
1064
- isArbitraryNumber
1065
- ] }],
1066
- leading: [{ leading: [themeLeading, ...scaleUnambiguousSpacing()] }],
1067
- "list-image": [{ "list-image": [
1068
- "none",
1069
- isArbitraryVariable,
1070
- isArbitraryValue
1071
- ] }],
1072
- "list-style-position": [{ list: ["inside", "outside"] }],
1073
- "list-style-type": [{ list: [
1074
- "disc",
1075
- "decimal",
1076
- "none",
1077
- isArbitraryVariable,
1078
- isArbitraryValue
1079
- ] }],
1080
- "text-alignment": [{ text: [
1081
- "left",
1082
- "center",
1083
- "right",
1084
- "justify",
1085
- "start",
1086
- "end"
1087
- ] }],
1088
- "placeholder-color": [{ placeholder: scaleColor() }],
1089
- "text-color": [{ text: scaleColor() }],
1090
- "text-decoration": [
1091
- "underline",
1092
- "overline",
1093
- "line-through",
1094
- "no-underline"
1095
- ],
1096
- "text-decoration-style": [{ decoration: [...scaleLineStyle(), "wavy"] }],
1097
- "text-decoration-thickness": [{ decoration: [
1098
- isNumber,
1099
- "from-font",
1100
- "auto",
1101
- isArbitraryVariable,
1102
- isArbitraryLength
1103
- ] }],
1104
- "text-decoration-color": [{ decoration: scaleColor() }],
1105
- "underline-offset": [{ "underline-offset": [
1106
- isNumber,
1107
- "auto",
1108
- isArbitraryVariable,
1109
- isArbitraryValue
1110
- ] }],
1111
- "text-transform": [
1112
- "uppercase",
1113
- "lowercase",
1114
- "capitalize",
1115
- "normal-case"
1116
- ],
1117
- "text-overflow": [
1118
- "truncate",
1119
- "text-ellipsis",
1120
- "text-clip"
1121
- ],
1122
- "text-wrap": [{ text: [
1123
- "wrap",
1124
- "nowrap",
1125
- "balance",
1126
- "pretty"
1127
- ] }],
1128
- indent: [{ indent: scaleUnambiguousSpacing() }],
1129
- "vertical-align": [{ align: [
1130
- "baseline",
1131
- "top",
1132
- "middle",
1133
- "bottom",
1134
- "text-top",
1135
- "text-bottom",
1136
- "sub",
1137
- "super",
1138
- isArbitraryVariable,
1139
- isArbitraryValue
1140
- ] }],
1141
- whitespace: [{ whitespace: [
1142
- "normal",
1143
- "nowrap",
1144
- "pre",
1145
- "pre-line",
1146
- "pre-wrap",
1147
- "break-spaces"
1148
- ] }],
1149
- break: [{ break: [
1150
- "normal",
1151
- "words",
1152
- "all",
1153
- "keep"
1154
- ] }],
1155
- wrap: [{ wrap: [
1156
- "break-word",
1157
- "anywhere",
1158
- "normal"
1159
- ] }],
1160
- hyphens: [{ hyphens: [
1161
- "none",
1162
- "manual",
1163
- "auto"
1164
- ] }],
1165
- content: [{ content: [
1166
- "none",
1167
- isArbitraryVariable,
1168
- isArbitraryValue
1169
- ] }],
1170
- "bg-attachment": [{ bg: [
1171
- "fixed",
1172
- "local",
1173
- "scroll"
1174
- ] }],
1175
- "bg-clip": [{ "bg-clip": [
1176
- "border",
1177
- "padding",
1178
- "content",
1179
- "text"
1180
- ] }],
1181
- "bg-origin": [{ "bg-origin": [
1182
- "border",
1183
- "padding",
1184
- "content"
1185
- ] }],
1186
- "bg-position": [{ bg: scaleBgPosition() }],
1187
- "bg-repeat": [{ bg: scaleBgRepeat() }],
1188
- "bg-size": [{ bg: scaleBgSize() }],
1189
- "bg-image": [{ bg: [
1190
- "none",
1191
- {
1192
- linear: [
1193
- { to: [
1194
- "t",
1195
- "tr",
1196
- "r",
1197
- "br",
1198
- "b",
1199
- "bl",
1200
- "l",
1201
- "tl"
1202
- ] },
1203
- isInteger,
1204
- isArbitraryVariable,
1205
- isArbitraryValue
1206
- ],
1207
- radial: [
1208
- "",
1209
- isArbitraryVariable,
1210
- isArbitraryValue
1211
- ],
1212
- conic: [
1213
- isInteger,
1214
- isArbitraryVariable,
1215
- isArbitraryValue
1216
- ]
1217
- },
1218
- isArbitraryVariableImage,
1219
- isArbitraryImage
1220
- ] }],
1221
- "bg-color": [{ bg: scaleColor() }],
1222
- "gradient-from-pos": [{ from: scaleGradientStopPosition() }],
1223
- "gradient-via-pos": [{ via: scaleGradientStopPosition() }],
1224
- "gradient-to-pos": [{ to: scaleGradientStopPosition() }],
1225
- "gradient-from": [{ from: scaleColor() }],
1226
- "gradient-via": [{ via: scaleColor() }],
1227
- "gradient-to": [{ to: scaleColor() }],
1228
- rounded: [{ rounded: scaleRadius() }],
1229
- "rounded-s": [{ "rounded-s": scaleRadius() }],
1230
- "rounded-e": [{ "rounded-e": scaleRadius() }],
1231
- "rounded-t": [{ "rounded-t": scaleRadius() }],
1232
- "rounded-r": [{ "rounded-r": scaleRadius() }],
1233
- "rounded-b": [{ "rounded-b": scaleRadius() }],
1234
- "rounded-l": [{ "rounded-l": scaleRadius() }],
1235
- "rounded-ss": [{ "rounded-ss": scaleRadius() }],
1236
- "rounded-se": [{ "rounded-se": scaleRadius() }],
1237
- "rounded-ee": [{ "rounded-ee": scaleRadius() }],
1238
- "rounded-es": [{ "rounded-es": scaleRadius() }],
1239
- "rounded-tl": [{ "rounded-tl": scaleRadius() }],
1240
- "rounded-tr": [{ "rounded-tr": scaleRadius() }],
1241
- "rounded-br": [{ "rounded-br": scaleRadius() }],
1242
- "rounded-bl": [{ "rounded-bl": scaleRadius() }],
1243
- "border-w": [{ border: scaleBorderWidth() }],
1244
- "border-w-x": [{ "border-x": scaleBorderWidth() }],
1245
- "border-w-y": [{ "border-y": scaleBorderWidth() }],
1246
- "border-w-s": [{ "border-s": scaleBorderWidth() }],
1247
- "border-w-e": [{ "border-e": scaleBorderWidth() }],
1248
- "border-w-t": [{ "border-t": scaleBorderWidth() }],
1249
- "border-w-r": [{ "border-r": scaleBorderWidth() }],
1250
- "border-w-b": [{ "border-b": scaleBorderWidth() }],
1251
- "border-w-l": [{ "border-l": scaleBorderWidth() }],
1252
- "divide-x": [{ "divide-x": scaleBorderWidth() }],
1253
- "divide-x-reverse": ["divide-x-reverse"],
1254
- "divide-y": [{ "divide-y": scaleBorderWidth() }],
1255
- "divide-y-reverse": ["divide-y-reverse"],
1256
- "border-style": [{ border: [
1257
- ...scaleLineStyle(),
1258
- "hidden",
1259
- "none"
1260
- ] }],
1261
- "divide-style": [{ divide: [
1262
- ...scaleLineStyle(),
1263
- "hidden",
1264
- "none"
1265
- ] }],
1266
- "border-color": [{ border: scaleColor() }],
1267
- "border-color-x": [{ "border-x": scaleColor() }],
1268
- "border-color-y": [{ "border-y": scaleColor() }],
1269
- "border-color-s": [{ "border-s": scaleColor() }],
1270
- "border-color-e": [{ "border-e": scaleColor() }],
1271
- "border-color-t": [{ "border-t": scaleColor() }],
1272
- "border-color-r": [{ "border-r": scaleColor() }],
1273
- "border-color-b": [{ "border-b": scaleColor() }],
1274
- "border-color-l": [{ "border-l": scaleColor() }],
1275
- "divide-color": [{ divide: scaleColor() }],
1276
- "outline-style": [{ outline: [
1277
- ...scaleLineStyle(),
1278
- "none",
1279
- "hidden"
1280
- ] }],
1281
- "outline-offset": [{ "outline-offset": [
1282
- isNumber,
1283
- isArbitraryVariable,
1284
- isArbitraryValue
1285
- ] }],
1286
- "outline-w": [{ outline: [
1287
- "",
1288
- isNumber,
1289
- isArbitraryVariableLength,
1290
- isArbitraryLength
1291
- ] }],
1292
- "outline-color": [{ outline: scaleColor() }],
1293
- shadow: [{ shadow: [
1294
- "",
1295
- "none",
1296
- themeShadow,
1297
- isArbitraryVariableShadow,
1298
- isArbitraryShadow
1299
- ] }],
1300
- "shadow-color": [{ shadow: scaleColor() }],
1301
- "inset-shadow": [{ "inset-shadow": [
1302
- "none",
1303
- themeInsetShadow,
1304
- isArbitraryVariableShadow,
1305
- isArbitraryShadow
1306
- ] }],
1307
- "inset-shadow-color": [{ "inset-shadow": scaleColor() }],
1308
- "ring-w": [{ ring: scaleBorderWidth() }],
1309
- "ring-w-inset": ["ring-inset"],
1310
- "ring-color": [{ ring: scaleColor() }],
1311
- "ring-offset-w": [{ "ring-offset": [isNumber, isArbitraryLength] }],
1312
- "ring-offset-color": [{ "ring-offset": scaleColor() }],
1313
- "inset-ring-w": [{ "inset-ring": scaleBorderWidth() }],
1314
- "inset-ring-color": [{ "inset-ring": scaleColor() }],
1315
- "text-shadow": [{ "text-shadow": [
1316
- "none",
1317
- themeTextShadow,
1318
- isArbitraryVariableShadow,
1319
- isArbitraryShadow
1320
- ] }],
1321
- "text-shadow-color": [{ "text-shadow": scaleColor() }],
1322
- opacity: [{ opacity: [
1323
- isNumber,
1324
- isArbitraryVariable,
1325
- isArbitraryValue
1326
- ] }],
1327
- "mix-blend": [{ "mix-blend": [
1328
- ...scaleBlendMode(),
1329
- "plus-darker",
1330
- "plus-lighter"
1331
- ] }],
1332
- "bg-blend": [{ "bg-blend": scaleBlendMode() }],
1333
- "mask-clip": [{ "mask-clip": [
1334
- "border",
1335
- "padding",
1336
- "content",
1337
- "fill",
1338
- "stroke",
1339
- "view"
1340
- ] }, "mask-no-clip"],
1341
- "mask-composite": [{ mask: [
1342
- "add",
1343
- "subtract",
1344
- "intersect",
1345
- "exclude"
1346
- ] }],
1347
- "mask-image-linear-pos": [{ "mask-linear": [isNumber] }],
1348
- "mask-image-linear-from-pos": [{ "mask-linear-from": scaleMaskImagePosition() }],
1349
- "mask-image-linear-to-pos": [{ "mask-linear-to": scaleMaskImagePosition() }],
1350
- "mask-image-linear-from-color": [{ "mask-linear-from": scaleColor() }],
1351
- "mask-image-linear-to-color": [{ "mask-linear-to": scaleColor() }],
1352
- "mask-image-t-from-pos": [{ "mask-t-from": scaleMaskImagePosition() }],
1353
- "mask-image-t-to-pos": [{ "mask-t-to": scaleMaskImagePosition() }],
1354
- "mask-image-t-from-color": [{ "mask-t-from": scaleColor() }],
1355
- "mask-image-t-to-color": [{ "mask-t-to": scaleColor() }],
1356
- "mask-image-r-from-pos": [{ "mask-r-from": scaleMaskImagePosition() }],
1357
- "mask-image-r-to-pos": [{ "mask-r-to": scaleMaskImagePosition() }],
1358
- "mask-image-r-from-color": [{ "mask-r-from": scaleColor() }],
1359
- "mask-image-r-to-color": [{ "mask-r-to": scaleColor() }],
1360
- "mask-image-b-from-pos": [{ "mask-b-from": scaleMaskImagePosition() }],
1361
- "mask-image-b-to-pos": [{ "mask-b-to": scaleMaskImagePosition() }],
1362
- "mask-image-b-from-color": [{ "mask-b-from": scaleColor() }],
1363
- "mask-image-b-to-color": [{ "mask-b-to": scaleColor() }],
1364
- "mask-image-l-from-pos": [{ "mask-l-from": scaleMaskImagePosition() }],
1365
- "mask-image-l-to-pos": [{ "mask-l-to": scaleMaskImagePosition() }],
1366
- "mask-image-l-from-color": [{ "mask-l-from": scaleColor() }],
1367
- "mask-image-l-to-color": [{ "mask-l-to": scaleColor() }],
1368
- "mask-image-x-from-pos": [{ "mask-x-from": scaleMaskImagePosition() }],
1369
- "mask-image-x-to-pos": [{ "mask-x-to": scaleMaskImagePosition() }],
1370
- "mask-image-x-from-color": [{ "mask-x-from": scaleColor() }],
1371
- "mask-image-x-to-color": [{ "mask-x-to": scaleColor() }],
1372
- "mask-image-y-from-pos": [{ "mask-y-from": scaleMaskImagePosition() }],
1373
- "mask-image-y-to-pos": [{ "mask-y-to": scaleMaskImagePosition() }],
1374
- "mask-image-y-from-color": [{ "mask-y-from": scaleColor() }],
1375
- "mask-image-y-to-color": [{ "mask-y-to": scaleColor() }],
1376
- "mask-image-radial": [{ "mask-radial": [isArbitraryVariable, isArbitraryValue] }],
1377
- "mask-image-radial-from-pos": [{ "mask-radial-from": scaleMaskImagePosition() }],
1378
- "mask-image-radial-to-pos": [{ "mask-radial-to": scaleMaskImagePosition() }],
1379
- "mask-image-radial-from-color": [{ "mask-radial-from": scaleColor() }],
1380
- "mask-image-radial-to-color": [{ "mask-radial-to": scaleColor() }],
1381
- "mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }],
1382
- "mask-image-radial-size": [{ "mask-radial": [{
1383
- closest: ["side", "corner"],
1384
- farthest: ["side", "corner"]
1385
- }] }],
1386
- "mask-image-radial-pos": [{ "mask-radial-at": scalePosition() }],
1387
- "mask-image-conic-pos": [{ "mask-conic": [isNumber] }],
1388
- "mask-image-conic-from-pos": [{ "mask-conic-from": scaleMaskImagePosition() }],
1389
- "mask-image-conic-to-pos": [{ "mask-conic-to": scaleMaskImagePosition() }],
1390
- "mask-image-conic-from-color": [{ "mask-conic-from": scaleColor() }],
1391
- "mask-image-conic-to-color": [{ "mask-conic-to": scaleColor() }],
1392
- "mask-mode": [{ mask: [
1393
- "alpha",
1394
- "luminance",
1395
- "match"
1396
- ] }],
1397
- "mask-origin": [{ "mask-origin": [
1398
- "border",
1399
- "padding",
1400
- "content",
1401
- "fill",
1402
- "stroke",
1403
- "view"
1404
- ] }],
1405
- "mask-position": [{ mask: scaleBgPosition() }],
1406
- "mask-repeat": [{ mask: scaleBgRepeat() }],
1407
- "mask-size": [{ mask: scaleBgSize() }],
1408
- "mask-type": [{ "mask-type": ["alpha", "luminance"] }],
1409
- "mask-image": [{ mask: [
1410
- "none",
1411
- isArbitraryVariable,
1412
- isArbitraryValue
1413
- ] }],
1414
- filter: [{ filter: [
1415
- "",
1416
- "none",
1417
- isArbitraryVariable,
1418
- isArbitraryValue
1419
- ] }],
1420
- blur: [{ blur: scaleBlur() }],
1421
- brightness: [{ brightness: [
1422
- isNumber,
1423
- isArbitraryVariable,
1424
- isArbitraryValue
1425
- ] }],
1426
- contrast: [{ contrast: [
1427
- isNumber,
1428
- isArbitraryVariable,
1429
- isArbitraryValue
1430
- ] }],
1431
- "drop-shadow": [{ "drop-shadow": [
1432
- "",
1433
- "none",
1434
- themeDropShadow,
1435
- isArbitraryVariableShadow,
1436
- isArbitraryShadow
1437
- ] }],
1438
- "drop-shadow-color": [{ "drop-shadow": scaleColor() }],
1439
- grayscale: [{ grayscale: [
1440
- "",
1441
- isNumber,
1442
- isArbitraryVariable,
1443
- isArbitraryValue
1444
- ] }],
1445
- "hue-rotate": [{ "hue-rotate": [
1446
- isNumber,
1447
- isArbitraryVariable,
1448
- isArbitraryValue
1449
- ] }],
1450
- invert: [{ invert: [
1451
- "",
1452
- isNumber,
1453
- isArbitraryVariable,
1454
- isArbitraryValue
1455
- ] }],
1456
- saturate: [{ saturate: [
1457
- isNumber,
1458
- isArbitraryVariable,
1459
- isArbitraryValue
1460
- ] }],
1461
- sepia: [{ sepia: [
1462
- "",
1463
- isNumber,
1464
- isArbitraryVariable,
1465
- isArbitraryValue
1466
- ] }],
1467
- "backdrop-filter": [{ "backdrop-filter": [
1468
- "",
1469
- "none",
1470
- isArbitraryVariable,
1471
- isArbitraryValue
1472
- ] }],
1473
- "backdrop-blur": [{ "backdrop-blur": scaleBlur() }],
1474
- "backdrop-brightness": [{ "backdrop-brightness": [
1475
- isNumber,
1476
- isArbitraryVariable,
1477
- isArbitraryValue
1478
- ] }],
1479
- "backdrop-contrast": [{ "backdrop-contrast": [
1480
- isNumber,
1481
- isArbitraryVariable,
1482
- isArbitraryValue
1483
- ] }],
1484
- "backdrop-grayscale": [{ "backdrop-grayscale": [
1485
- "",
1486
- isNumber,
1487
- isArbitraryVariable,
1488
- isArbitraryValue
1489
- ] }],
1490
- "backdrop-hue-rotate": [{ "backdrop-hue-rotate": [
1491
- isNumber,
1492
- isArbitraryVariable,
1493
- isArbitraryValue
1494
- ] }],
1495
- "backdrop-invert": [{ "backdrop-invert": [
1496
- "",
1497
- isNumber,
1498
- isArbitraryVariable,
1499
- isArbitraryValue
1500
- ] }],
1501
- "backdrop-opacity": [{ "backdrop-opacity": [
1502
- isNumber,
1503
- isArbitraryVariable,
1504
- isArbitraryValue
1505
- ] }],
1506
- "backdrop-saturate": [{ "backdrop-saturate": [
1507
- isNumber,
1508
- isArbitraryVariable,
1509
- isArbitraryValue
1510
- ] }],
1511
- "backdrop-sepia": [{ "backdrop-sepia": [
1512
- "",
1513
- isNumber,
1514
- isArbitraryVariable,
1515
- isArbitraryValue
1516
- ] }],
1517
- "border-collapse": [{ border: ["collapse", "separate"] }],
1518
- "border-spacing": [{ "border-spacing": scaleUnambiguousSpacing() }],
1519
- "border-spacing-x": [{ "border-spacing-x": scaleUnambiguousSpacing() }],
1520
- "border-spacing-y": [{ "border-spacing-y": scaleUnambiguousSpacing() }],
1521
- "table-layout": [{ table: ["auto", "fixed"] }],
1522
- caption: [{ caption: ["top", "bottom"] }],
1523
- transition: [{ transition: [
1524
- "",
1525
- "all",
1526
- "colors",
1527
- "opacity",
1528
- "shadow",
1529
- "transform",
1530
- "none",
1531
- isArbitraryVariable,
1532
- isArbitraryValue
1533
- ] }],
1534
- "transition-behavior": [{ transition: ["normal", "discrete"] }],
1535
- duration: [{ duration: [
1536
- isNumber,
1537
- "initial",
1538
- isArbitraryVariable,
1539
- isArbitraryValue
1540
- ] }],
1541
- ease: [{ ease: [
1542
- "linear",
1543
- "initial",
1544
- themeEase,
1545
- isArbitraryVariable,
1546
- isArbitraryValue
1547
- ] }],
1548
- delay: [{ delay: [
1549
- isNumber,
1550
- isArbitraryVariable,
1551
- isArbitraryValue
1552
- ] }],
1553
- animate: [{ animate: [
1554
- "none",
1555
- themeAnimate,
1556
- isArbitraryVariable,
1557
- isArbitraryValue
1558
- ] }],
1559
- backface: [{ backface: ["hidden", "visible"] }],
1560
- perspective: [{ perspective: [
1561
- themePerspective,
1562
- isArbitraryVariable,
1563
- isArbitraryValue
1564
- ] }],
1565
- "perspective-origin": [{ "perspective-origin": scalePositionWithArbitrary() }],
1566
- rotate: [{ rotate: scaleRotate() }],
1567
- "rotate-x": [{ "rotate-x": scaleRotate() }],
1568
- "rotate-y": [{ "rotate-y": scaleRotate() }],
1569
- "rotate-z": [{ "rotate-z": scaleRotate() }],
1570
- scale: [{ scale: scaleScale() }],
1571
- "scale-x": [{ "scale-x": scaleScale() }],
1572
- "scale-y": [{ "scale-y": scaleScale() }],
1573
- "scale-z": [{ "scale-z": scaleScale() }],
1574
- "scale-3d": ["scale-3d"],
1575
- skew: [{ skew: scaleSkew() }],
1576
- "skew-x": [{ "skew-x": scaleSkew() }],
1577
- "skew-y": [{ "skew-y": scaleSkew() }],
1578
- transform: [{ transform: [
1579
- isArbitraryVariable,
1580
- isArbitraryValue,
1581
- "",
1582
- "none",
1583
- "gpu",
1584
- "cpu"
1585
- ] }],
1586
- "transform-origin": [{ origin: scalePositionWithArbitrary() }],
1587
- "transform-style": [{ transform: ["3d", "flat"] }],
1588
- translate: [{ translate: scaleTranslate() }],
1589
- "translate-x": [{ "translate-x": scaleTranslate() }],
1590
- "translate-y": [{ "translate-y": scaleTranslate() }],
1591
- "translate-z": [{ "translate-z": scaleTranslate() }],
1592
- "translate-none": ["translate-none"],
1593
- accent: [{ accent: scaleColor() }],
1594
- appearance: [{ appearance: ["none", "auto"] }],
1595
- "caret-color": [{ caret: scaleColor() }],
1596
- "color-scheme": [{ scheme: [
1597
- "normal",
1598
- "dark",
1599
- "light",
1600
- "light-dark",
1601
- "only-dark",
1602
- "only-light"
1603
- ] }],
1604
- cursor: [{ cursor: [
1605
- "auto",
1606
- "default",
1607
- "pointer",
1608
- "wait",
1609
- "text",
1610
- "move",
1611
- "help",
1612
- "not-allowed",
1613
- "none",
1614
- "context-menu",
1615
- "progress",
1616
- "cell",
1617
- "crosshair",
1618
- "vertical-text",
1619
- "alias",
1620
- "copy",
1621
- "no-drop",
1622
- "grab",
1623
- "grabbing",
1624
- "all-scroll",
1625
- "col-resize",
1626
- "row-resize",
1627
- "n-resize",
1628
- "e-resize",
1629
- "s-resize",
1630
- "w-resize",
1631
- "ne-resize",
1632
- "nw-resize",
1633
- "se-resize",
1634
- "sw-resize",
1635
- "ew-resize",
1636
- "ns-resize",
1637
- "nesw-resize",
1638
- "nwse-resize",
1639
- "zoom-in",
1640
- "zoom-out",
1641
- isArbitraryVariable,
1642
- isArbitraryValue
1643
- ] }],
1644
- "field-sizing": [{ "field-sizing": ["fixed", "content"] }],
1645
- "pointer-events": [{ "pointer-events": ["auto", "none"] }],
1646
- resize: [{ resize: [
1647
- "none",
1648
- "",
1649
- "y",
1650
- "x"
1651
- ] }],
1652
- "scroll-behavior": [{ scroll: ["auto", "smooth"] }],
1653
- "scroll-m": [{ "scroll-m": scaleUnambiguousSpacing() }],
1654
- "scroll-mx": [{ "scroll-mx": scaleUnambiguousSpacing() }],
1655
- "scroll-my": [{ "scroll-my": scaleUnambiguousSpacing() }],
1656
- "scroll-ms": [{ "scroll-ms": scaleUnambiguousSpacing() }],
1657
- "scroll-me": [{ "scroll-me": scaleUnambiguousSpacing() }],
1658
- "scroll-mt": [{ "scroll-mt": scaleUnambiguousSpacing() }],
1659
- "scroll-mr": [{ "scroll-mr": scaleUnambiguousSpacing() }],
1660
- "scroll-mb": [{ "scroll-mb": scaleUnambiguousSpacing() }],
1661
- "scroll-ml": [{ "scroll-ml": scaleUnambiguousSpacing() }],
1662
- "scroll-p": [{ "scroll-p": scaleUnambiguousSpacing() }],
1663
- "scroll-px": [{ "scroll-px": scaleUnambiguousSpacing() }],
1664
- "scroll-py": [{ "scroll-py": scaleUnambiguousSpacing() }],
1665
- "scroll-ps": [{ "scroll-ps": scaleUnambiguousSpacing() }],
1666
- "scroll-pe": [{ "scroll-pe": scaleUnambiguousSpacing() }],
1667
- "scroll-pt": [{ "scroll-pt": scaleUnambiguousSpacing() }],
1668
- "scroll-pr": [{ "scroll-pr": scaleUnambiguousSpacing() }],
1669
- "scroll-pb": [{ "scroll-pb": scaleUnambiguousSpacing() }],
1670
- "scroll-pl": [{ "scroll-pl": scaleUnambiguousSpacing() }],
1671
- "snap-align": [{ snap: [
1672
- "start",
1673
- "end",
1674
- "center",
1675
- "align-none"
1676
- ] }],
1677
- "snap-stop": [{ snap: ["normal", "always"] }],
1678
- "snap-type": [{ snap: [
1679
- "none",
1680
- "x",
1681
- "y",
1682
- "both"
1683
- ] }],
1684
- "snap-strictness": [{ snap: ["mandatory", "proximity"] }],
1685
- touch: [{ touch: [
1686
- "auto",
1687
- "none",
1688
- "manipulation"
1689
- ] }],
1690
- "touch-x": [{ "touch-pan": [
1691
- "x",
1692
- "left",
1693
- "right"
1694
- ] }],
1695
- "touch-y": [{ "touch-pan": [
1696
- "y",
1697
- "up",
1698
- "down"
1699
- ] }],
1700
- "touch-pz": ["touch-pinch-zoom"],
1701
- select: [{ select: [
1702
- "none",
1703
- "text",
1704
- "all",
1705
- "auto"
1706
- ] }],
1707
- "will-change": [{ "will-change": [
1708
- "auto",
1709
- "scroll",
1710
- "contents",
1711
- "transform",
1712
- isArbitraryVariable,
1713
- isArbitraryValue
1714
- ] }],
1715
- fill: [{ fill: ["none", ...scaleColor()] }],
1716
- "stroke-w": [{ stroke: [
1717
- isNumber,
1718
- isArbitraryVariableLength,
1719
- isArbitraryLength,
1720
- isArbitraryNumber
1721
- ] }],
1722
- stroke: [{ stroke: ["none", ...scaleColor()] }],
1723
- "forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
1724
- },
1725
- conflictingClassGroups: {
1726
- overflow: ["overflow-x", "overflow-y"],
1727
- overscroll: ["overscroll-x", "overscroll-y"],
1728
- inset: [
1729
- "inset-x",
1730
- "inset-y",
1731
- "start",
1732
- "end",
1733
- "top",
1734
- "right",
1735
- "bottom",
1736
- "left"
1737
- ],
1738
- "inset-x": ["right", "left"],
1739
- "inset-y": ["top", "bottom"],
1740
- flex: [
1741
- "basis",
1742
- "grow",
1743
- "shrink"
1744
- ],
1745
- gap: ["gap-x", "gap-y"],
1746
- p: [
1747
- "px",
1748
- "py",
1749
- "ps",
1750
- "pe",
1751
- "pt",
1752
- "pr",
1753
- "pb",
1754
- "pl"
1755
- ],
1756
- px: ["pr", "pl"],
1757
- py: ["pt", "pb"],
1758
- m: [
1759
- "mx",
1760
- "my",
1761
- "ms",
1762
- "me",
1763
- "mt",
1764
- "mr",
1765
- "mb",
1766
- "ml"
1767
- ],
1768
- mx: ["mr", "ml"],
1769
- my: ["mt", "mb"],
1770
- size: ["w", "h"],
1771
- "font-size": ["leading"],
1772
- "fvn-normal": [
1773
- "fvn-ordinal",
1774
- "fvn-slashed-zero",
1775
- "fvn-figure",
1776
- "fvn-spacing",
1777
- "fvn-fraction"
1778
- ],
1779
- "fvn-ordinal": ["fvn-normal"],
1780
- "fvn-slashed-zero": ["fvn-normal"],
1781
- "fvn-figure": ["fvn-normal"],
1782
- "fvn-spacing": ["fvn-normal"],
1783
- "fvn-fraction": ["fvn-normal"],
1784
- "line-clamp": ["display", "overflow"],
1785
- rounded: [
1786
- "rounded-s",
1787
- "rounded-e",
1788
- "rounded-t",
1789
- "rounded-r",
1790
- "rounded-b",
1791
- "rounded-l",
1792
- "rounded-ss",
1793
- "rounded-se",
1794
- "rounded-ee",
1795
- "rounded-es",
1796
- "rounded-tl",
1797
- "rounded-tr",
1798
- "rounded-br",
1799
- "rounded-bl"
1800
- ],
1801
- "rounded-s": ["rounded-ss", "rounded-es"],
1802
- "rounded-e": ["rounded-se", "rounded-ee"],
1803
- "rounded-t": ["rounded-tl", "rounded-tr"],
1804
- "rounded-r": ["rounded-tr", "rounded-br"],
1805
- "rounded-b": ["rounded-br", "rounded-bl"],
1806
- "rounded-l": ["rounded-tl", "rounded-bl"],
1807
- "border-spacing": ["border-spacing-x", "border-spacing-y"],
1808
- "border-w": [
1809
- "border-w-x",
1810
- "border-w-y",
1811
- "border-w-s",
1812
- "border-w-e",
1813
- "border-w-t",
1814
- "border-w-r",
1815
- "border-w-b",
1816
- "border-w-l"
1817
- ],
1818
- "border-w-x": ["border-w-r", "border-w-l"],
1819
- "border-w-y": ["border-w-t", "border-w-b"],
1820
- "border-color": [
1821
- "border-color-x",
1822
- "border-color-y",
1823
- "border-color-s",
1824
- "border-color-e",
1825
- "border-color-t",
1826
- "border-color-r",
1827
- "border-color-b",
1828
- "border-color-l"
1829
- ],
1830
- "border-color-x": ["border-color-r", "border-color-l"],
1831
- "border-color-y": ["border-color-t", "border-color-b"],
1832
- translate: [
1833
- "translate-x",
1834
- "translate-y",
1835
- "translate-none"
1836
- ],
1837
- "translate-none": [
1838
- "translate",
1839
- "translate-x",
1840
- "translate-y",
1841
- "translate-z"
1842
- ],
1843
- "scroll-m": [
1844
- "scroll-mx",
1845
- "scroll-my",
1846
- "scroll-ms",
1847
- "scroll-me",
1848
- "scroll-mt",
1849
- "scroll-mr",
1850
- "scroll-mb",
1851
- "scroll-ml"
1852
- ],
1853
- "scroll-mx": ["scroll-mr", "scroll-ml"],
1854
- "scroll-my": ["scroll-mt", "scroll-mb"],
1855
- "scroll-p": [
1856
- "scroll-px",
1857
- "scroll-py",
1858
- "scroll-ps",
1859
- "scroll-pe",
1860
- "scroll-pt",
1861
- "scroll-pr",
1862
- "scroll-pb",
1863
- "scroll-pl"
1864
- ],
1865
- "scroll-px": ["scroll-pr", "scroll-pl"],
1866
- "scroll-py": ["scroll-pt", "scroll-pb"],
1867
- touch: [
1868
- "touch-x",
1869
- "touch-y",
1870
- "touch-pz"
1871
- ],
1872
- "touch-x": ["touch"],
1873
- "touch-y": ["touch"],
1874
- "touch-pz": ["touch"]
1875
- },
1876
- conflictingClassGroupModifiers: { "font-size": ["leading"] },
1877
- orderSensitiveModifiers: [
1878
- "*",
1879
- "**",
1880
- "after",
1881
- "backdrop",
1882
- "before",
1883
- "details-content",
1884
- "file",
1885
- "first-letter",
1886
- "first-line",
1887
- "marker",
1888
- "placeholder",
1889
- "selection"
1890
- ]
1891
- };
1892
- };
1893
- const twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
1894
- typeof window !== "undefined" && window.document && window.document.createElement;
1895
- function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
1896
- return function handleEvent(event) {
1897
- originalEventHandler?.(event);
1898
- if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler?.(event);
1899
- };
1900
- }
1901
- //#endregion
1902
- //#region ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
1903
- function setRef(ref, value) {
1904
- if (typeof ref === "function") return ref(value);
1905
- else if (ref !== null && ref !== void 0) ref.current = value;
1906
- }
1907
- function composeRefs(...refs) {
1908
- return (node) => {
1909
- let hasCleanup = false;
1910
- const cleanups = refs.map((ref) => {
1911
- const cleanup = setRef(ref, node);
1912
- if (!hasCleanup && typeof cleanup == "function") hasCleanup = true;
1913
- return cleanup;
1914
- });
1915
- if (hasCleanup) return () => {
1916
- for (let i = 0; i < cleanups.length; i++) {
1917
- const cleanup = cleanups[i];
1918
- if (typeof cleanup == "function") cleanup();
1919
- else setRef(refs[i], null);
1920
- }
1921
- };
1922
- };
1923
- }
1924
- function useComposedRefs(...refs) {
1925
- return React$1.useCallback(composeRefs(...refs), refs);
1926
- }
1927
- //#endregion
1928
- //#region ../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-context/dist/index.mjs
1929
- function createContext2(rootComponentName, defaultContext) {
1930
- const Context = React$1.createContext(defaultContext);
1931
- const Provider = (props) => {
1932
- const { children, ...context } = props;
1933
- const value = React$1.useMemo(() => context, Object.values(context));
1934
- return /* @__PURE__ */ jsx(Context.Provider, {
1935
- value,
1936
- children
1937
- });
1938
- };
1939
- Provider.displayName = rootComponentName + "Provider";
1940
- function useContext2(consumerName) {
1941
- const context = React$1.useContext(Context);
1942
- if (context) return context;
1943
- if (defaultContext !== void 0) return defaultContext;
1944
- throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
1945
- }
1946
- return [Provider, useContext2];
1947
- }
1948
- function createContextScope(scopeName, createContextScopeDeps = []) {
1949
- let defaultContexts = [];
1950
- function createContext3(rootComponentName, defaultContext) {
1951
- const BaseContext = React$1.createContext(defaultContext);
1952
- const index = defaultContexts.length;
1953
- defaultContexts = [...defaultContexts, defaultContext];
1954
- const Provider = (props) => {
1955
- const { scope, children, ...context } = props;
1956
- const Context = scope?.[scopeName]?.[index] || BaseContext;
1957
- const value = React$1.useMemo(() => context, Object.values(context));
1958
- return /* @__PURE__ */ jsx(Context.Provider, {
1959
- value,
1960
- children
1961
- });
1962
- };
1963
- Provider.displayName = rootComponentName + "Provider";
1964
- function useContext2(consumerName, scope) {
1965
- const Context = scope?.[scopeName]?.[index] || BaseContext;
1966
- const context = React$1.useContext(Context);
1967
- if (context) return context;
1968
- if (defaultContext !== void 0) return defaultContext;
1969
- throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
1970
- }
1971
- return [Provider, useContext2];
1972
- }
1973
- const createScope = () => {
1974
- const scopeContexts = defaultContexts.map((defaultContext) => {
1975
- return React$1.createContext(defaultContext);
1976
- });
1977
- return function useScope(scope) {
1978
- const contexts = scope?.[scopeName] || scopeContexts;
1979
- return React$1.useMemo(() => ({ [`__scope${scopeName}`]: {
1980
- ...scope,
1981
- [scopeName]: contexts
1982
- } }), [scope, contexts]);
1983
- };
1984
- };
1985
- createScope.scopeName = scopeName;
1986
- return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
1987
- }
1988
- function composeContextScopes(...scopes) {
1989
- const baseScope = scopes[0];
1990
- if (scopes.length === 1) return baseScope;
1991
- const createScope = () => {
1992
- const scopeHooks = scopes.map((createScope2) => ({
1993
- useScope: createScope2(),
1994
- scopeName: createScope2.scopeName
1995
- }));
1996
- return function useComposedScopes(overrideScopes) {
1997
- const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
1998
- const currentScope = useScope(overrideScopes)[`__scope${scopeName}`];
1999
- return {
2000
- ...nextScopes2,
2001
- ...currentScope
2002
- };
2003
- }, {});
2004
- return React$1.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
2005
- };
2006
- };
2007
- createScope.scopeName = baseScope.scopeName;
2008
- return createScope;
2009
- }
2010
- //#endregion
2011
- //#region ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
2012
- var useLayoutEffect2 = globalThis?.document ? React$1.useLayoutEffect : () => {};
2013
- //#endregion
2014
- //#region ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
2015
- var useInsertionEffect = React$1[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
2016
- function useControllableState({ prop, defaultProp, onChange = () => {}, caller }) {
2017
- const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
2018
- defaultProp,
2019
- onChange
2020
- });
2021
- const isControlled = prop !== void 0;
2022
- const value = isControlled ? prop : uncontrolledProp;
2023
- {
2024
- const isControlledRef = React$1.useRef(prop !== void 0);
2025
- React$1.useEffect(() => {
2026
- const wasControlled = isControlledRef.current;
2027
- if (wasControlled !== isControlled) {
2028
- const from = wasControlled ? "controlled" : "uncontrolled";
2029
- const to = isControlled ? "controlled" : "uncontrolled";
2030
- console.warn(`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`);
2031
- }
2032
- isControlledRef.current = isControlled;
2033
- }, [isControlled, caller]);
2034
- }
2035
- return [value, React$1.useCallback((nextValue) => {
2036
- if (isControlled) {
2037
- const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
2038
- if (value2 !== prop) onChangeRef.current?.(value2);
2039
- } else setUncontrolledProp(nextValue);
2040
- }, [
2041
- isControlled,
2042
- prop,
2043
- setUncontrolledProp,
2044
- onChangeRef
2045
- ])];
2046
- }
2047
- function useUncontrolledState({ defaultProp, onChange }) {
2048
- const [value, setValue] = React$1.useState(defaultProp);
2049
- const prevValueRef = React$1.useRef(value);
2050
- const onChangeRef = React$1.useRef(onChange);
2051
- useInsertionEffect(() => {
2052
- onChangeRef.current = onChange;
2053
- }, [onChange]);
2054
- React$1.useEffect(() => {
2055
- if (prevValueRef.current !== value) {
2056
- onChangeRef.current?.(value);
2057
- prevValueRef.current = value;
2058
- }
2059
- }, [value, prevValueRef]);
2060
- return [
2061
- value,
2062
- setValue,
2063
- onChangeRef
2064
- ];
2065
- }
2066
- function isFunction(value) {
2067
- return typeof value === "function";
2068
- }
2069
- //#endregion
2070
- //#region ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-slot/dist/index.mjs
2071
- /* @__NO_SIDE_EFFECTS__ */
2072
- function createSlot(ownerName) {
2073
- const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
2074
- const Slot2 = React$1.forwardRef((props, forwardedRef) => {
2075
- const { children, ...slotProps } = props;
2076
- const childrenArray = React$1.Children.toArray(children);
2077
- const slottable = childrenArray.find(isSlottable);
2078
- if (slottable) {
2079
- const newElement = slottable.props.children;
2080
- const newChildren = childrenArray.map((child) => {
2081
- if (child === slottable) {
2082
- if (React$1.Children.count(newElement) > 1) return React$1.Children.only(null);
2083
- return React$1.isValidElement(newElement) ? newElement.props.children : null;
2084
- } else return child;
2085
- });
2086
- return /* @__PURE__ */ jsx(SlotClone, {
2087
- ...slotProps,
2088
- ref: forwardedRef,
2089
- children: React$1.isValidElement(newElement) ? React$1.cloneElement(newElement, void 0, newChildren) : null
2090
- });
2091
- }
2092
- return /* @__PURE__ */ jsx(SlotClone, {
2093
- ...slotProps,
2094
- ref: forwardedRef,
2095
- children
2096
- });
2097
- });
2098
- Slot2.displayName = `${ownerName}.Slot`;
2099
- return Slot2;
2100
- }
2101
- /* @__NO_SIDE_EFFECTS__ */
2102
- function createSlotClone(ownerName) {
2103
- const SlotClone = React$1.forwardRef((props, forwardedRef) => {
2104
- const { children, ...slotProps } = props;
2105
- if (React$1.isValidElement(children)) {
2106
- const childrenRef = getElementRef$1(children);
2107
- const props2 = mergeProps(slotProps, children.props);
2108
- if (children.type !== React$1.Fragment) props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
2109
- return React$1.cloneElement(children, props2);
2110
- }
2111
- return React$1.Children.count(children) > 1 ? React$1.Children.only(null) : null;
2112
- });
2113
- SlotClone.displayName = `${ownerName}.SlotClone`;
2114
- return SlotClone;
2115
- }
2116
- var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
2117
- function isSlottable(child) {
2118
- return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
2119
- }
2120
- function mergeProps(slotProps, childProps) {
2121
- const overrideProps = { ...childProps };
2122
- for (const propName in childProps) {
2123
- const slotPropValue = slotProps[propName];
2124
- const childPropValue = childProps[propName];
2125
- if (/^on[A-Z]/.test(propName)) {
2126
- if (slotPropValue && childPropValue) overrideProps[propName] = (...args) => {
2127
- const result = childPropValue(...args);
2128
- slotPropValue(...args);
2129
- return result;
2130
- };
2131
- else if (slotPropValue) overrideProps[propName] = slotPropValue;
2132
- } else if (propName === "style") overrideProps[propName] = {
2133
- ...slotPropValue,
2134
- ...childPropValue
2135
- };
2136
- else if (propName === "className") overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
2137
- }
2138
- return {
2139
- ...slotProps,
2140
- ...overrideProps
2141
- };
2142
- }
2143
- function getElementRef$1(element) {
2144
- let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
2145
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
2146
- if (mayWarn) return element.ref;
2147
- getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
2148
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
2149
- if (mayWarn) return element.props.ref;
2150
- return element.props.ref || element.ref;
2151
- }
2152
- //#endregion
2153
- //#region ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.2.3_@types+react@19.2.14__@types+re_0935c7b95cefcdb4f10a34e92035e5e3/node_modules/@radix-ui/react-primitive/dist/index.mjs
2154
- var Primitive = [
2155
- "a",
2156
- "button",
2157
- "div",
2158
- "form",
2159
- "h2",
2160
- "h3",
2161
- "img",
2162
- "input",
2163
- "label",
2164
- "li",
2165
- "nav",
2166
- "ol",
2167
- "p",
2168
- "select",
2169
- "span",
2170
- "svg",
2171
- "ul"
2172
- ].reduce((primitive, node) => {
2173
- const Slot = /* @__PURE__ */ createSlot(`Primitive.${node}`);
2174
- const Node = React$1.forwardRef((props, forwardedRef) => {
2175
- const { asChild, ...primitiveProps } = props;
2176
- const Comp = asChild ? Slot : node;
2177
- if (typeof window !== "undefined") window[Symbol.for("radix-ui")] = true;
2178
- return /* @__PURE__ */ jsx(Comp, {
2179
- ...primitiveProps,
2180
- ref: forwardedRef
2181
- });
2182
- });
2183
- Node.displayName = `Primitive.${node}`;
2184
- return {
2185
- ...primitive,
2186
- [node]: Node
2187
- };
2188
- }, {});
2189
- function dispatchDiscreteCustomEvent(target, event) {
2190
- if (target) ReactDOM$1.flushSync(() => target.dispatchEvent(event));
2191
- }
2192
- //#endregion
2193
- //#region ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
2194
- function useCallbackRef(callback) {
2195
- const callbackRef = React$1.useRef(callback);
2196
- React$1.useEffect(() => {
2197
- callbackRef.current = callback;
2198
- });
2199
- return React$1.useMemo(() => (...args) => callbackRef.current?.(...args), []);
2200
- }
2201
- //#endregion
2202
- //#region ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-id/dist/index.mjs
2203
- var useReactId = React$1[" useId ".trim().toString()] || (() => void 0);
2204
- var count = 0;
2205
- function useId$1(deterministicId) {
2206
- const [id, setId] = React$1.useState(useReactId());
2207
- useLayoutEffect2(() => {
2208
- if (!deterministicId) setId((reactId) => reactId ?? String(count++));
2209
- }, [deterministicId]);
2210
- return deterministicId || (id ? `radix-${id}` : "");
2211
- }
2212
- //#endregion
2213
- //#region ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.5_@types+react-dom@19.2.3_@types+react@19.2.14__@types+rea_abbc8bcf75333b39bfe32b13ef7abc0e/node_modules/@radix-ui/react-presence/dist/index.mjs
2214
- function useStateMachine(initialState, machine) {
2215
- return React$1.useReducer((state, event) => {
2216
- return machine[state][event] ?? state;
2217
- }, initialState);
2218
- }
2219
- var Presence = (props) => {
2220
- const { present, children } = props;
2221
- const presence = usePresence(present);
2222
- const child = typeof children === "function" ? children({ present: presence.isPresent }) : React$1.Children.only(children);
2223
- const ref = useComposedRefs(presence.ref, getElementRef(child));
2224
- return typeof children === "function" || presence.isPresent ? React$1.cloneElement(child, { ref }) : null;
2225
- };
2226
- Presence.displayName = "Presence";
2227
- function usePresence(present) {
2228
- const [node, setNode] = React$1.useState();
2229
- const stylesRef = React$1.useRef(null);
2230
- const prevPresentRef = React$1.useRef(present);
2231
- const prevAnimationNameRef = React$1.useRef("none");
2232
- const [state, send] = useStateMachine(present ? "mounted" : "unmounted", {
2233
- mounted: {
2234
- UNMOUNT: "unmounted",
2235
- ANIMATION_OUT: "unmountSuspended"
2236
- },
2237
- unmountSuspended: {
2238
- MOUNT: "mounted",
2239
- ANIMATION_END: "unmounted"
2240
- },
2241
- unmounted: { MOUNT: "mounted" }
2242
- });
2243
- React$1.useEffect(() => {
2244
- const currentAnimationName = getAnimationName(stylesRef.current);
2245
- prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
2246
- }, [state]);
2247
- useLayoutEffect2(() => {
2248
- const styles = stylesRef.current;
2249
- const wasPresent = prevPresentRef.current;
2250
- if (wasPresent !== present) {
2251
- const prevAnimationName = prevAnimationNameRef.current;
2252
- const currentAnimationName = getAnimationName(styles);
2253
- if (present) send("MOUNT");
2254
- else if (currentAnimationName === "none" || styles?.display === "none") send("UNMOUNT");
2255
- else if (wasPresent && prevAnimationName !== currentAnimationName) send("ANIMATION_OUT");
2256
- else send("UNMOUNT");
2257
- prevPresentRef.current = present;
2258
- }
2259
- }, [present, send]);
2260
- useLayoutEffect2(() => {
2261
- if (node) {
2262
- let timeoutId;
2263
- const ownerWindow = node.ownerDocument.defaultView ?? window;
2264
- const handleAnimationEnd = (event) => {
2265
- const isCurrentAnimation = getAnimationName(stylesRef.current).includes(CSS.escape(event.animationName));
2266
- if (event.target === node && isCurrentAnimation) {
2267
- send("ANIMATION_END");
2268
- if (!prevPresentRef.current) {
2269
- const currentFillMode = node.style.animationFillMode;
2270
- node.style.animationFillMode = "forwards";
2271
- timeoutId = ownerWindow.setTimeout(() => {
2272
- if (node.style.animationFillMode === "forwards") node.style.animationFillMode = currentFillMode;
2273
- });
2274
- }
2275
- }
2276
- };
2277
- const handleAnimationStart = (event) => {
2278
- if (event.target === node) prevAnimationNameRef.current = getAnimationName(stylesRef.current);
2279
- };
2280
- node.addEventListener("animationstart", handleAnimationStart);
2281
- node.addEventListener("animationcancel", handleAnimationEnd);
2282
- node.addEventListener("animationend", handleAnimationEnd);
2283
- return () => {
2284
- ownerWindow.clearTimeout(timeoutId);
2285
- node.removeEventListener("animationstart", handleAnimationStart);
2286
- node.removeEventListener("animationcancel", handleAnimationEnd);
2287
- node.removeEventListener("animationend", handleAnimationEnd);
2288
- };
2289
- } else send("ANIMATION_END");
2290
- }, [node, send]);
2291
- return {
2292
- isPresent: ["mounted", "unmountSuspended"].includes(state),
2293
- ref: React$1.useCallback((node2) => {
2294
- stylesRef.current = node2 ? getComputedStyle(node2) : null;
2295
- setNode(node2);
2296
- }, [])
2297
- };
2298
- }
2299
- function getAnimationName(styles) {
2300
- return styles?.animationName || "none";
2301
- }
2302
- function getElementRef(element) {
2303
- let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
2304
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
2305
- if (mayWarn) return element.ref;
2306
- getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
2307
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
2308
- if (mayWarn) return element.props.ref;
2309
- return element.props.ref || element.ref;
2310
- }
2311
- //#endregion
2312
- export { dispatchDiscreteCustomEvent as a, useLayoutEffect2 as c, composeRefs as d, useComposedRefs as f, twMerge as h, Primitive as i, createContext2 as l, twJoin as m, useId$1 as n, createSlot as o, composeEventHandlers as p, useCallbackRef as r, useControllableState as s, Presence as t, createContextScope as u };
2313
-
2314
- //# sourceMappingURL=dist-D3_ER0Dn.js.map