@cherrystudio/file-preview 0.1.3 → 0.2.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.
@@ -1,3079 +1,8 @@
1
+ import { b as useComposedRefs, f as Button, p as cn, v as createSlot, y as createSlottable } from "./useTranslation-BJY4EKsz.js";
1
2
  import * as React$1 from "react";
2
- import { createContext, createElement, forwardRef, use, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
3
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { useLayoutEffect } from "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
4
5
  import * as ReactDOM from "react-dom";
5
- import { createPortal } from "react-dom";
6
- //#region ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.3_@types+react@19.2.7_react@19.2.3/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
7
- function setRef$1(ref, value) {
8
- if (typeof ref === "function") return ref(value);
9
- else if (ref !== null && ref !== void 0) ref.current = value;
10
- }
11
- function composeRefs(...refs) {
12
- return (node) => {
13
- let hasCleanup = false;
14
- const cleanups = refs.map((ref) => {
15
- const cleanup = setRef$1(ref, node);
16
- if (!hasCleanup && typeof cleanup == "function") hasCleanup = true;
17
- return cleanup;
18
- });
19
- if (hasCleanup) return () => {
20
- for (let i = 0; i < cleanups.length; i++) {
21
- const cleanup = cleanups[i];
22
- if (typeof cleanup == "function") cleanup();
23
- else setRef$1(refs[i], null);
24
- }
25
- };
26
- };
27
- }
28
- function useComposedRefs(...refs) {
29
- return React$1.useCallback(composeRefs(...refs), refs);
30
- }
31
- //#endregion
32
- //#region ../../node_modules/.pnpm/@radix-ui+react-slot@1.3.0_@types+react@19.2.7_react@19.2.3/node_modules/@radix-ui/react-slot/dist/index.mjs
33
- // @__NO_SIDE_EFFECTS__
34
- function createSlot(ownerName) {
35
- const Slot2 = React$1.forwardRef((props, forwardedRef) => {
36
- let { children, ...slotProps } = props;
37
- let slottableElement = null;
38
- let hasSlottable = false;
39
- const newChildren = [];
40
- if (isLazyComponent(children) && typeof use$1 === "function") children = use$1(children._payload);
41
- React$1.Children.forEach(children, (maybeSlottable) => {
42
- if (isSlottable(maybeSlottable)) {
43
- hasSlottable = true;
44
- const slottable = maybeSlottable;
45
- let child = "child" in slottable.props ? slottable.props.child : slottable.props.children;
46
- if (isLazyComponent(child) && typeof use$1 === "function") child = use$1(child._payload);
47
- slottableElement = getSlottableElementFromSlottable(slottable, child);
48
- newChildren.push(slottableElement?.props?.children);
49
- } else newChildren.push(maybeSlottable);
50
- });
51
- if (slottableElement) slottableElement = React$1.cloneElement(slottableElement, void 0, newChildren);
52
- else if (!hasSlottable && React$1.Children.count(children) === 1 && React$1.isValidElement(children)) slottableElement = children;
53
- const slottableElementRef = slottableElement ? getElementRef$1(slottableElement) : void 0;
54
- const composedRef = useComposedRefs(forwardedRef, slottableElementRef);
55
- if (!slottableElement) {
56
- if (children || children === 0) throw new Error(hasSlottable ? createSlottableError(ownerName) : createSlotError(ownerName));
57
- return children;
58
- }
59
- const mergedProps = mergeProps(slotProps, slottableElement.props ?? {});
60
- if (slottableElement.type !== React$1.Fragment) mergedProps.ref = forwardedRef ? composedRef : slottableElementRef;
61
- return React$1.cloneElement(slottableElement, mergedProps);
62
- });
63
- Slot2.displayName = `${ownerName}.Slot`;
64
- return Slot2;
65
- }
66
- var Slot = /* @__PURE__ */ createSlot("Slot");
67
- var SLOTTABLE_IDENTIFIER = Symbol.for("radix.slottable");
68
- // @__NO_SIDE_EFFECTS__
69
- function createSlottable(ownerName) {
70
- const Slottable2 = (props) => "child" in props ? props.children(props.child) : props.children;
71
- Slottable2.displayName = `${ownerName}.Slottable`;
72
- Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
73
- return Slottable2;
74
- }
75
- var getSlottableElementFromSlottable = (slottable, child) => {
76
- if ("child" in slottable.props) {
77
- const child2 = slottable.props.child;
78
- if (!React$1.isValidElement(child2)) return null;
79
- return React$1.cloneElement(child2, void 0, slottable.props.children(child2.props.children));
80
- }
81
- return React$1.isValidElement(child) ? child : null;
82
- };
83
- function mergeProps(slotProps, childProps) {
84
- const overrideProps = { ...childProps };
85
- for (const propName in childProps) {
86
- const slotPropValue = slotProps[propName];
87
- const childPropValue = childProps[propName];
88
- if (/^on[A-Z]/.test(propName)) {
89
- if (slotPropValue && childPropValue) overrideProps[propName] = (...args) => {
90
- const result = childPropValue(...args);
91
- slotPropValue(...args);
92
- return result;
93
- };
94
- else if (slotPropValue) overrideProps[propName] = slotPropValue;
95
- } else if (propName === "style") overrideProps[propName] = {
96
- ...slotPropValue,
97
- ...childPropValue
98
- };
99
- else if (propName === "className") overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
100
- }
101
- return {
102
- ...slotProps,
103
- ...overrideProps
104
- };
105
- }
106
- function getElementRef$1(element) {
107
- let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
108
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
109
- if (mayWarn) return element.ref;
110
- getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
111
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
112
- if (mayWarn) return element.props.ref;
113
- return element.props.ref || element.ref;
114
- }
115
- function isSlottable(child) {
116
- return React$1.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
117
- }
118
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
119
- function isLazyComponent(element) {
120
- return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
121
- }
122
- function isPromiseLike(value) {
123
- return typeof value === "object" && value !== null && "then" in value;
124
- }
125
- var createSlotError = (ownerName) => {
126
- return `${ownerName} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`;
127
- };
128
- var createSlottableError = (ownerName) => {
129
- return `${ownerName} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`;
130
- };
131
- var use$1 = React$1[" use ".trim().toString()];
132
- //#endregion
133
- //#region ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
134
- function r(e) {
135
- var t, f, n = "";
136
- if ("string" == typeof e || "number" == typeof e) n += e;
137
- else if ("object" == typeof e) if (Array.isArray(e)) {
138
- var o = e.length;
139
- for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
140
- } else for (f in e) e[f] && (n && (n += " "), n += f);
141
- return n;
142
- }
143
- function clsx() {
144
- for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
145
- return n;
146
- }
147
- //#endregion
148
- //#region ../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs
149
- /**
150
- * Copyright 2022 Joe Bell. All rights reserved.
151
- *
152
- * This file is licensed to you under the Apache License, Version 2.0
153
- * (the "License"); you may not use this file except in compliance with the
154
- * License. You may obtain a copy of the License at
155
- *
156
- * http://www.apache.org/licenses/LICENSE-2.0
157
- *
158
- * Unless required by applicable law or agreed to in writing, software
159
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
160
- * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the
161
- * License for the specific language governing permissions and limitations under
162
- * the License.
163
- */ var falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
164
- var cx = clsx;
165
- var cva = (base, config) => (props) => {
166
- var _config_compoundVariants;
167
- if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
168
- const { variants, defaultVariants } = config;
169
- const getVariantClassNames = Object.keys(variants).map((variant) => {
170
- const variantProp = props === null || props === void 0 ? void 0 : props[variant];
171
- const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
172
- if (variantProp === null) return null;
173
- const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
174
- return variants[variant][variantKey];
175
- });
176
- const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
177
- let [key, value] = param;
178
- if (value === void 0) return acc;
179
- acc[key] = value;
180
- return acc;
181
- }, {});
182
- return cx(base, getVariantClassNames, config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
183
- let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
184
- return Object.entries(compoundVariantOptions).every((param) => {
185
- let [key, value] = param;
186
- return Array.isArray(value) ? value.includes({
187
- ...defaultVariants,
188
- ...propsWithoutUndefined
189
- }[key]) : {
190
- ...defaultVariants,
191
- ...propsWithoutUndefined
192
- }[key] === value;
193
- }) ? [
194
- ...acc,
195
- cvClass,
196
- cvClassName
197
- ] : acc;
198
- }, []), props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
199
- };
200
- //#endregion
201
- //#region ../../node_modules/.pnpm/lucide-react@0.545.0_react@19.2.3/node_modules/lucide-react/dist/esm/shared/src/utils.js
202
- /**
203
- * @license lucide-react v0.545.0 - ISC
204
- *
205
- * This source code is licensed under the ISC license.
206
- * See the LICENSE file in the root directory of this source tree.
207
- */
208
- var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
209
- var toCamelCase = (string) => string.replace(/^([A-Z])|[\s-_]+(\w)/g, (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase());
210
- var toPascalCase = (string) => {
211
- const camelCase = toCamelCase(string);
212
- return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
213
- };
214
- var mergeClasses = (...classes) => classes.filter((className, index, array) => {
215
- return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
216
- }).join(" ").trim();
217
- var hasA11yProp = (props) => {
218
- for (const prop in props) if (prop.startsWith("aria-") || prop === "role" || prop === "title") return true;
219
- };
220
- //#endregion
221
- //#region ../../node_modules/.pnpm/lucide-react@0.545.0_react@19.2.3/node_modules/lucide-react/dist/esm/defaultAttributes.js
222
- /**
223
- * @license lucide-react v0.545.0 - ISC
224
- *
225
- * This source code is licensed under the ISC license.
226
- * See the LICENSE file in the root directory of this source tree.
227
- */
228
- var defaultAttributes = {
229
- xmlns: "http://www.w3.org/2000/svg",
230
- width: 24,
231
- height: 24,
232
- viewBox: "0 0 24 24",
233
- fill: "none",
234
- stroke: "currentColor",
235
- strokeWidth: 2,
236
- strokeLinecap: "round",
237
- strokeLinejoin: "round"
238
- };
239
- //#endregion
240
- //#region ../../node_modules/.pnpm/lucide-react@0.545.0_react@19.2.3/node_modules/lucide-react/dist/esm/Icon.js
241
- /**
242
- * @license lucide-react v0.545.0 - ISC
243
- *
244
- * This source code is licensed under the ISC license.
245
- * See the LICENSE file in the root directory of this source tree.
246
- */
247
- var Icon = forwardRef(({ color = "currentColor", size = 24, strokeWidth = 2, absoluteStrokeWidth, className = "", children, iconNode, ...rest }, ref) => createElement("svg", {
248
- ref,
249
- ...defaultAttributes,
250
- width: size,
251
- height: size,
252
- stroke: color,
253
- strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
254
- className: mergeClasses("lucide", className),
255
- ...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
256
- ...rest
257
- }, [...iconNode.map(([tag, attrs]) => createElement(tag, attrs)), ...Array.isArray(children) ? children : [children]]));
258
- //#endregion
259
- //#region ../../node_modules/.pnpm/lucide-react@0.545.0_react@19.2.3/node_modules/lucide-react/dist/esm/createLucideIcon.js
260
- /**
261
- * @license lucide-react v0.545.0 - ISC
262
- *
263
- * This source code is licensed under the ISC license.
264
- * See the LICENSE file in the root directory of this source tree.
265
- */
266
- var createLucideIcon = (iconName, iconNode) => {
267
- const Component = forwardRef(({ className, ...props }, ref) => createElement(Icon, {
268
- ref,
269
- iconNode,
270
- className: mergeClasses(`lucide-${toKebabCase(toPascalCase(iconName))}`, `lucide-${iconName}`, className),
271
- ...props
272
- }));
273
- Component.displayName = toPascalCase(iconName);
274
- return Component;
275
- };
276
- /**
277
- * @license lucide-react v0.545.0 - ISC
278
- *
279
- * This source code is licensed under the ISC license.
280
- * See the LICENSE file in the root directory of this source tree.
281
- */
282
- var FileWarning = createLucideIcon("file-warning", [
283
- ["path", {
284
- d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",
285
- key: "1rqfz7"
286
- }],
287
- ["path", {
288
- d: "M12 9v4",
289
- key: "juzpu7"
290
- }],
291
- ["path", {
292
- d: "M12 17h.01",
293
- key: "p32p05"
294
- }]
295
- ]);
296
- /**
297
- * @license lucide-react v0.545.0 - ISC
298
- *
299
- * This source code is licensed under the ISC license.
300
- * See the LICENSE file in the root directory of this source tree.
301
- */
302
- var LoaderCircle = createLucideIcon("loader-circle", [["path", {
303
- d: "M21 12a9 9 0 1 1-6.219-8.56",
304
- key: "13zald"
305
- }]]);
306
- /**
307
- * @license lucide-react v0.545.0 - ISC
308
- *
309
- * This source code is licensed under the ISC license.
310
- * See the LICENSE file in the root directory of this source tree.
311
- */
312
- var Loader = createLucideIcon("loader", [
313
- ["path", {
314
- d: "M12 2v4",
315
- key: "3427ic"
316
- }],
317
- ["path", {
318
- d: "m16.2 7.8 2.9-2.9",
319
- key: "r700ao"
320
- }],
321
- ["path", {
322
- d: "M18 12h4",
323
- key: "wj9ykh"
324
- }],
325
- ["path", {
326
- d: "m16.2 16.2 2.9 2.9",
327
- key: "1bxg5t"
328
- }],
329
- ["path", {
330
- d: "M12 18v4",
331
- key: "jadmvz"
332
- }],
333
- ["path", {
334
- d: "m4.9 19.1 2.9-2.9",
335
- key: "bwix9q"
336
- }],
337
- ["path", {
338
- d: "M2 12h4",
339
- key: "j09sii"
340
- }],
341
- ["path", {
342
- d: "m4.9 4.9 2.9 2.9",
343
- key: "giyufr"
344
- }]
345
- ]);
346
- //#endregion
347
- //#region ../../node_modules/.pnpm/tailwind-merge@2.6.1/node_modules/tailwind-merge/dist/bundle-mjs.mjs
348
- var CLASS_PART_SEPARATOR = "-";
349
- var createClassGroupUtils = (config) => {
350
- const classMap = createClassMap(config);
351
- const { conflictingClassGroups, conflictingClassGroupModifiers } = config;
352
- const getClassGroupId = (className) => {
353
- const classParts = className.split(CLASS_PART_SEPARATOR);
354
- if (classParts[0] === "" && classParts.length !== 1) classParts.shift();
355
- return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
356
- };
357
- const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
358
- const conflicts = conflictingClassGroups[classGroupId] || [];
359
- if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
360
- return conflicts;
361
- };
362
- return {
363
- getClassGroupId,
364
- getConflictingClassGroupIds
365
- };
366
- };
367
- var getGroupRecursive = (classParts, classPartObject) => {
368
- if (classParts.length === 0) return classPartObject.classGroupId;
369
- const currentClassPart = classParts[0];
370
- const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
371
- const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
372
- if (classGroupFromNextClassPart) return classGroupFromNextClassPart;
373
- if (classPartObject.validators.length === 0) return;
374
- const classRest = classParts.join(CLASS_PART_SEPARATOR);
375
- return classPartObject.validators.find(({ validator }) => validator(classRest))?.classGroupId;
376
- };
377
- var arbitraryPropertyRegex = /^\[(.+)\]$/;
378
- var getGroupIdForArbitraryProperty = (className) => {
379
- if (arbitraryPropertyRegex.test(className)) {
380
- const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
381
- const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(":"));
382
- if (property) return "arbitrary.." + property;
383
- }
384
- };
385
- /**
386
- * Exported for testing only
387
- */
388
- var createClassMap = (config) => {
389
- const { theme, prefix } = config;
390
- const classMap = {
391
- nextPart: /* @__PURE__ */ new Map(),
392
- validators: []
393
- };
394
- getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix).forEach(([classGroupId, classGroup]) => {
395
- processClassesRecursively(classGroup, classMap, classGroupId, theme);
396
- });
397
- return classMap;
398
- };
399
- var processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
400
- classGroup.forEach((classDefinition) => {
401
- if (typeof classDefinition === "string") {
402
- const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
403
- classPartObjectToEdit.classGroupId = classGroupId;
404
- return;
405
- }
406
- if (typeof classDefinition === "function") {
407
- if (isThemeGetter(classDefinition)) {
408
- processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
409
- return;
410
- }
411
- classPartObject.validators.push({
412
- validator: classDefinition,
413
- classGroupId
414
- });
415
- return;
416
- }
417
- Object.entries(classDefinition).forEach(([key, classGroup]) => {
418
- processClassesRecursively(classGroup, getPart(classPartObject, key), classGroupId, theme);
419
- });
420
- });
421
- };
422
- var getPart = (classPartObject, path) => {
423
- let currentClassPartObject = classPartObject;
424
- path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
425
- if (!currentClassPartObject.nextPart.has(pathPart)) currentClassPartObject.nextPart.set(pathPart, {
426
- nextPart: /* @__PURE__ */ new Map(),
427
- validators: []
428
- });
429
- currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
430
- });
431
- return currentClassPartObject;
432
- };
433
- var isThemeGetter = (func) => func.isThemeGetter;
434
- var getPrefixedClassGroupEntries = (classGroupEntries, prefix) => {
435
- if (!prefix) return classGroupEntries;
436
- return classGroupEntries.map(([classGroupId, classGroup]) => {
437
- return [classGroupId, classGroup.map((classDefinition) => {
438
- if (typeof classDefinition === "string") return prefix + classDefinition;
439
- if (typeof classDefinition === "object") return Object.fromEntries(Object.entries(classDefinition).map(([key, value]) => [prefix + key, value]));
440
- return classDefinition;
441
- })];
442
- });
443
- };
444
- var createLruCache = (maxCacheSize) => {
445
- if (maxCacheSize < 1) return {
446
- get: () => void 0,
447
- set: () => {}
448
- };
449
- let cacheSize = 0;
450
- let cache = /* @__PURE__ */ new Map();
451
- let previousCache = /* @__PURE__ */ new Map();
452
- const update = (key, value) => {
453
- cache.set(key, value);
454
- cacheSize++;
455
- if (cacheSize > maxCacheSize) {
456
- cacheSize = 0;
457
- previousCache = cache;
458
- cache = /* @__PURE__ */ new Map();
459
- }
460
- };
461
- return {
462
- get(key) {
463
- let value = cache.get(key);
464
- if (value !== void 0) return value;
465
- if ((value = previousCache.get(key)) !== void 0) {
466
- update(key, value);
467
- return value;
468
- }
469
- },
470
- set(key, value) {
471
- if (cache.has(key)) cache.set(key, value);
472
- else update(key, value);
473
- }
474
- };
475
- };
476
- var IMPORTANT_MODIFIER = "!";
477
- var createParseClassName = (config) => {
478
- const { separator, experimentalParseClassName } = config;
479
- const isSeparatorSingleCharacter = separator.length === 1;
480
- const firstSeparatorCharacter = separator[0];
481
- const separatorLength = separator.length;
482
- const parseClassName = (className) => {
483
- const modifiers = [];
484
- let bracketDepth = 0;
485
- let modifierStart = 0;
486
- let postfixModifierPosition;
487
- for (let index = 0; index < className.length; index++) {
488
- let currentCharacter = className[index];
489
- if (bracketDepth === 0) {
490
- if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {
491
- modifiers.push(className.slice(modifierStart, index));
492
- modifierStart = index + separatorLength;
493
- continue;
494
- }
495
- if (currentCharacter === "/") {
496
- postfixModifierPosition = index;
497
- continue;
498
- }
499
- }
500
- if (currentCharacter === "[") bracketDepth++;
501
- else if (currentCharacter === "]") bracketDepth--;
502
- }
503
- const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
504
- const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);
505
- return {
506
- modifiers,
507
- hasImportantModifier,
508
- baseClassName: hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier,
509
- maybePostfixModifierPosition: postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0
510
- };
511
- };
512
- if (experimentalParseClassName) return (className) => experimentalParseClassName({
513
- className,
514
- parseClassName
515
- });
516
- return parseClassName;
517
- };
518
- /**
519
- * Sorts modifiers according to following schema:
520
- * - Predefined modifiers are sorted alphabetically
521
- * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it
522
- */
523
- var sortModifiers = (modifiers) => {
524
- if (modifiers.length <= 1) return modifiers;
525
- const sortedModifiers = [];
526
- let unsortedModifiers = [];
527
- modifiers.forEach((modifier) => {
528
- if (modifier[0] === "[") {
529
- sortedModifiers.push(...unsortedModifiers.sort(), modifier);
530
- unsortedModifiers = [];
531
- } else unsortedModifiers.push(modifier);
532
- });
533
- sortedModifiers.push(...unsortedModifiers.sort());
534
- return sortedModifiers;
535
- };
536
- var createConfigUtils = (config) => ({
537
- cache: createLruCache(config.cacheSize),
538
- parseClassName: createParseClassName(config),
539
- ...createClassGroupUtils(config)
540
- });
541
- var SPLIT_CLASSES_REGEX = /\s+/;
542
- var mergeClassList = (classList, configUtils) => {
543
- const { parseClassName, getClassGroupId, getConflictingClassGroupIds } = configUtils;
544
- /**
545
- * Set of classGroupIds in following format:
546
- * `{importantModifier}{variantModifiers}{classGroupId}`
547
- * @example 'float'
548
- * @example 'hover:focus:bg-color'
549
- * @example 'md:!pr'
550
- */
551
- const classGroupsInConflict = [];
552
- const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
553
- let result = "";
554
- for (let index = classNames.length - 1; index >= 0; index -= 1) {
555
- const originalClassName = classNames[index];
556
- const { modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition } = parseClassName(originalClassName);
557
- let hasPostfixModifier = Boolean(maybePostfixModifierPosition);
558
- let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
559
- if (!classGroupId) {
560
- if (!hasPostfixModifier) {
561
- result = originalClassName + (result.length > 0 ? " " + result : result);
562
- continue;
563
- }
564
- classGroupId = getClassGroupId(baseClassName);
565
- if (!classGroupId) {
566
- result = originalClassName + (result.length > 0 ? " " + result : result);
567
- continue;
568
- }
569
- hasPostfixModifier = false;
570
- }
571
- const variantModifier = sortModifiers(modifiers).join(":");
572
- const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
573
- const classId = modifierId + classGroupId;
574
- if (classGroupsInConflict.includes(classId)) continue;
575
- classGroupsInConflict.push(classId);
576
- const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
577
- for (let i = 0; i < conflictGroups.length; ++i) {
578
- const group = conflictGroups[i];
579
- classGroupsInConflict.push(modifierId + group);
580
- }
581
- result = originalClassName + (result.length > 0 ? " " + result : result);
582
- }
583
- return result;
584
- };
585
- /**
586
- * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.
587
- *
588
- * Specifically:
589
- * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js
590
- * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts
591
- *
592
- * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
593
- */
594
- function twJoin() {
595
- let index = 0;
596
- let argument;
597
- let resolvedValue;
598
- let string = "";
599
- while (index < arguments.length) if (argument = arguments[index++]) {
600
- if (resolvedValue = toValue(argument)) {
601
- string && (string += " ");
602
- string += resolvedValue;
603
- }
604
- }
605
- return string;
606
- }
607
- var toValue = (mix) => {
608
- if (typeof mix === "string") return mix;
609
- let resolvedValue;
610
- let string = "";
611
- for (let k = 0; k < mix.length; k++) if (mix[k]) {
612
- if (resolvedValue = toValue(mix[k])) {
613
- string && (string += " ");
614
- string += resolvedValue;
615
- }
616
- }
617
- return string;
618
- };
619
- function createTailwindMerge(createConfigFirst, ...createConfigRest) {
620
- let configUtils;
621
- let cacheGet;
622
- let cacheSet;
623
- let functionToCall = initTailwindMerge;
624
- function initTailwindMerge(classList) {
625
- configUtils = createConfigUtils(createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst()));
626
- cacheGet = configUtils.cache.get;
627
- cacheSet = configUtils.cache.set;
628
- functionToCall = tailwindMerge;
629
- return tailwindMerge(classList);
630
- }
631
- function tailwindMerge(classList) {
632
- const cachedResult = cacheGet(classList);
633
- if (cachedResult) return cachedResult;
634
- const result = mergeClassList(classList, configUtils);
635
- cacheSet(classList, result);
636
- return result;
637
- }
638
- return function callTailwindMerge() {
639
- return functionToCall(twJoin.apply(null, arguments));
640
- };
641
- }
642
- var fromTheme = (key) => {
643
- const themeGetter = (theme) => theme[key] || [];
644
- themeGetter.isThemeGetter = true;
645
- return themeGetter;
646
- };
647
- var arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
648
- var fractionRegex = /^\d+\/\d+$/;
649
- var stringLengths = /*#__PURE__*/ new Set([
650
- "px",
651
- "full",
652
- "screen"
653
- ]);
654
- var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
655
- 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$/;
656
- var colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
657
- var shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
658
- var imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
659
- var isLength = (value) => isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);
660
- var isArbitraryLength = (value) => getIsArbitraryValue(value, "length", isLengthOnly);
661
- var isNumber = (value) => Boolean(value) && !Number.isNaN(Number(value));
662
- var isArbitraryNumber = (value) => getIsArbitraryValue(value, "number", isNumber);
663
- var isInteger = (value) => Boolean(value) && Number.isInteger(Number(value));
664
- var isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
665
- var isArbitraryValue = (value) => arbitraryValueRegex.test(value);
666
- var isTshirtSize = (value) => tshirtUnitRegex.test(value);
667
- var sizeLabels = /*#__PURE__*/ new Set([
668
- "length",
669
- "size",
670
- "percentage"
671
- ]);
672
- var isArbitrarySize = (value) => getIsArbitraryValue(value, sizeLabels, isNever);
673
- var isArbitraryPosition = (value) => getIsArbitraryValue(value, "position", isNever);
674
- var imageLabels = /*#__PURE__*/ new Set(["image", "url"]);
675
- var isArbitraryImage = (value) => getIsArbitraryValue(value, imageLabels, isImage);
676
- var isArbitraryShadow = (value) => getIsArbitraryValue(value, "", isShadow);
677
- var isAny = () => true;
678
- var getIsArbitraryValue = (value, label, testValue) => {
679
- const result = arbitraryValueRegex.exec(value);
680
- if (result) {
681
- if (result[1]) return typeof label === "string" ? result[1] === label : label.has(result[1]);
682
- return testValue(result[2]);
683
- }
684
- return false;
685
- };
686
- var isLengthOnly = (value) => lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
687
- var isNever = () => false;
688
- var isShadow = (value) => shadowRegex.test(value);
689
- var isImage = (value) => imageRegex.test(value);
690
- var getDefaultConfig = () => {
691
- const colors = fromTheme("colors");
692
- const spacing = fromTheme("spacing");
693
- const blur = fromTheme("blur");
694
- const brightness = fromTheme("brightness");
695
- const borderColor = fromTheme("borderColor");
696
- const borderRadius = fromTheme("borderRadius");
697
- const borderSpacing = fromTheme("borderSpacing");
698
- const borderWidth = fromTheme("borderWidth");
699
- const contrast = fromTheme("contrast");
700
- const grayscale = fromTheme("grayscale");
701
- const hueRotate = fromTheme("hueRotate");
702
- const invert = fromTheme("invert");
703
- const gap = fromTheme("gap");
704
- const gradientColorStops = fromTheme("gradientColorStops");
705
- const gradientColorStopPositions = fromTheme("gradientColorStopPositions");
706
- const inset = fromTheme("inset");
707
- const margin = fromTheme("margin");
708
- const opacity = fromTheme("opacity");
709
- const padding = fromTheme("padding");
710
- const saturate = fromTheme("saturate");
711
- const scale = fromTheme("scale");
712
- const sepia = fromTheme("sepia");
713
- const skew = fromTheme("skew");
714
- const space = fromTheme("space");
715
- const translate = fromTheme("translate");
716
- const getOverscroll = () => [
717
- "auto",
718
- "contain",
719
- "none"
720
- ];
721
- const getOverflow = () => [
722
- "auto",
723
- "hidden",
724
- "clip",
725
- "visible",
726
- "scroll"
727
- ];
728
- const getSpacingWithAutoAndArbitrary = () => [
729
- "auto",
730
- isArbitraryValue,
731
- spacing
732
- ];
733
- const getSpacingWithArbitrary = () => [isArbitraryValue, spacing];
734
- const getLengthWithEmptyAndArbitrary = () => [
735
- "",
736
- isLength,
737
- isArbitraryLength
738
- ];
739
- const getNumberWithAutoAndArbitrary = () => [
740
- "auto",
741
- isNumber,
742
- isArbitraryValue
743
- ];
744
- const getPositions = () => [
745
- "bottom",
746
- "center",
747
- "left",
748
- "left-bottom",
749
- "left-top",
750
- "right",
751
- "right-bottom",
752
- "right-top",
753
- "top"
754
- ];
755
- const getLineStyles = () => [
756
- "solid",
757
- "dashed",
758
- "dotted",
759
- "double",
760
- "none"
761
- ];
762
- const getBlendModes = () => [
763
- "normal",
764
- "multiply",
765
- "screen",
766
- "overlay",
767
- "darken",
768
- "lighten",
769
- "color-dodge",
770
- "color-burn",
771
- "hard-light",
772
- "soft-light",
773
- "difference",
774
- "exclusion",
775
- "hue",
776
- "saturation",
777
- "color",
778
- "luminosity"
779
- ];
780
- const getAlign = () => [
781
- "start",
782
- "end",
783
- "center",
784
- "between",
785
- "around",
786
- "evenly",
787
- "stretch"
788
- ];
789
- const getZeroAndEmpty = () => [
790
- "",
791
- "0",
792
- isArbitraryValue
793
- ];
794
- const getBreaks = () => [
795
- "auto",
796
- "avoid",
797
- "all",
798
- "avoid-page",
799
- "page",
800
- "left",
801
- "right",
802
- "column"
803
- ];
804
- const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];
805
- return {
806
- cacheSize: 500,
807
- separator: ":",
808
- theme: {
809
- colors: [isAny],
810
- spacing: [isLength, isArbitraryLength],
811
- blur: [
812
- "none",
813
- "",
814
- isTshirtSize,
815
- isArbitraryValue
816
- ],
817
- brightness: getNumberAndArbitrary(),
818
- borderColor: [colors],
819
- borderRadius: [
820
- "none",
821
- "",
822
- "full",
823
- isTshirtSize,
824
- isArbitraryValue
825
- ],
826
- borderSpacing: getSpacingWithArbitrary(),
827
- borderWidth: getLengthWithEmptyAndArbitrary(),
828
- contrast: getNumberAndArbitrary(),
829
- grayscale: getZeroAndEmpty(),
830
- hueRotate: getNumberAndArbitrary(),
831
- invert: getZeroAndEmpty(),
832
- gap: getSpacingWithArbitrary(),
833
- gradientColorStops: [colors],
834
- gradientColorStopPositions: [isPercent, isArbitraryLength],
835
- inset: getSpacingWithAutoAndArbitrary(),
836
- margin: getSpacingWithAutoAndArbitrary(),
837
- opacity: getNumberAndArbitrary(),
838
- padding: getSpacingWithArbitrary(),
839
- saturate: getNumberAndArbitrary(),
840
- scale: getNumberAndArbitrary(),
841
- sepia: getZeroAndEmpty(),
842
- skew: getNumberAndArbitrary(),
843
- space: getSpacingWithArbitrary(),
844
- translate: getSpacingWithArbitrary()
845
- },
846
- classGroups: {
847
- /**
848
- * Aspect Ratio
849
- * @see https://tailwindcss.com/docs/aspect-ratio
850
- */
851
- aspect: [{ aspect: [
852
- "auto",
853
- "square",
854
- "video",
855
- isArbitraryValue
856
- ] }],
857
- /**
858
- * Container
859
- * @see https://tailwindcss.com/docs/container
860
- */
861
- container: ["container"],
862
- /**
863
- * Columns
864
- * @see https://tailwindcss.com/docs/columns
865
- */
866
- columns: [{ columns: [isTshirtSize] }],
867
- /**
868
- * Break After
869
- * @see https://tailwindcss.com/docs/break-after
870
- */
871
- "break-after": [{ "break-after": getBreaks() }],
872
- /**
873
- * Break Before
874
- * @see https://tailwindcss.com/docs/break-before
875
- */
876
- "break-before": [{ "break-before": getBreaks() }],
877
- /**
878
- * Break Inside
879
- * @see https://tailwindcss.com/docs/break-inside
880
- */
881
- "break-inside": [{ "break-inside": [
882
- "auto",
883
- "avoid",
884
- "avoid-page",
885
- "avoid-column"
886
- ] }],
887
- /**
888
- * Box Decoration Break
889
- * @see https://tailwindcss.com/docs/box-decoration-break
890
- */
891
- "box-decoration": [{ "box-decoration": ["slice", "clone"] }],
892
- /**
893
- * Box Sizing
894
- * @see https://tailwindcss.com/docs/box-sizing
895
- */
896
- box: [{ box: ["border", "content"] }],
897
- /**
898
- * Display
899
- * @see https://tailwindcss.com/docs/display
900
- */
901
- display: [
902
- "block",
903
- "inline-block",
904
- "inline",
905
- "flex",
906
- "inline-flex",
907
- "table",
908
- "inline-table",
909
- "table-caption",
910
- "table-cell",
911
- "table-column",
912
- "table-column-group",
913
- "table-footer-group",
914
- "table-header-group",
915
- "table-row-group",
916
- "table-row",
917
- "flow-root",
918
- "grid",
919
- "inline-grid",
920
- "contents",
921
- "list-item",
922
- "hidden"
923
- ],
924
- /**
925
- * Floats
926
- * @see https://tailwindcss.com/docs/float
927
- */
928
- float: [{ float: [
929
- "right",
930
- "left",
931
- "none",
932
- "start",
933
- "end"
934
- ] }],
935
- /**
936
- * Clear
937
- * @see https://tailwindcss.com/docs/clear
938
- */
939
- clear: [{ clear: [
940
- "left",
941
- "right",
942
- "both",
943
- "none",
944
- "start",
945
- "end"
946
- ] }],
947
- /**
948
- * Isolation
949
- * @see https://tailwindcss.com/docs/isolation
950
- */
951
- isolation: ["isolate", "isolation-auto"],
952
- /**
953
- * Object Fit
954
- * @see https://tailwindcss.com/docs/object-fit
955
- */
956
- "object-fit": [{ object: [
957
- "contain",
958
- "cover",
959
- "fill",
960
- "none",
961
- "scale-down"
962
- ] }],
963
- /**
964
- * Object Position
965
- * @see https://tailwindcss.com/docs/object-position
966
- */
967
- "object-position": [{ object: [...getPositions(), isArbitraryValue] }],
968
- /**
969
- * Overflow
970
- * @see https://tailwindcss.com/docs/overflow
971
- */
972
- overflow: [{ overflow: getOverflow() }],
973
- /**
974
- * Overflow X
975
- * @see https://tailwindcss.com/docs/overflow
976
- */
977
- "overflow-x": [{ "overflow-x": getOverflow() }],
978
- /**
979
- * Overflow Y
980
- * @see https://tailwindcss.com/docs/overflow
981
- */
982
- "overflow-y": [{ "overflow-y": getOverflow() }],
983
- /**
984
- * Overscroll Behavior
985
- * @see https://tailwindcss.com/docs/overscroll-behavior
986
- */
987
- overscroll: [{ overscroll: getOverscroll() }],
988
- /**
989
- * Overscroll Behavior X
990
- * @see https://tailwindcss.com/docs/overscroll-behavior
991
- */
992
- "overscroll-x": [{ "overscroll-x": getOverscroll() }],
993
- /**
994
- * Overscroll Behavior Y
995
- * @see https://tailwindcss.com/docs/overscroll-behavior
996
- */
997
- "overscroll-y": [{ "overscroll-y": getOverscroll() }],
998
- /**
999
- * Position
1000
- * @see https://tailwindcss.com/docs/position
1001
- */
1002
- position: [
1003
- "static",
1004
- "fixed",
1005
- "absolute",
1006
- "relative",
1007
- "sticky"
1008
- ],
1009
- /**
1010
- * Top / Right / Bottom / Left
1011
- * @see https://tailwindcss.com/docs/top-right-bottom-left
1012
- */
1013
- inset: [{ inset: [inset] }],
1014
- /**
1015
- * Right / Left
1016
- * @see https://tailwindcss.com/docs/top-right-bottom-left
1017
- */
1018
- "inset-x": [{ "inset-x": [inset] }],
1019
- /**
1020
- * Top / Bottom
1021
- * @see https://tailwindcss.com/docs/top-right-bottom-left
1022
- */
1023
- "inset-y": [{ "inset-y": [inset] }],
1024
- /**
1025
- * Start
1026
- * @see https://tailwindcss.com/docs/top-right-bottom-left
1027
- */
1028
- start: [{ start: [inset] }],
1029
- /**
1030
- * End
1031
- * @see https://tailwindcss.com/docs/top-right-bottom-left
1032
- */
1033
- end: [{ end: [inset] }],
1034
- /**
1035
- * Top
1036
- * @see https://tailwindcss.com/docs/top-right-bottom-left
1037
- */
1038
- top: [{ top: [inset] }],
1039
- /**
1040
- * Right
1041
- * @see https://tailwindcss.com/docs/top-right-bottom-left
1042
- */
1043
- right: [{ right: [inset] }],
1044
- /**
1045
- * Bottom
1046
- * @see https://tailwindcss.com/docs/top-right-bottom-left
1047
- */
1048
- bottom: [{ bottom: [inset] }],
1049
- /**
1050
- * Left
1051
- * @see https://tailwindcss.com/docs/top-right-bottom-left
1052
- */
1053
- left: [{ left: [inset] }],
1054
- /**
1055
- * Visibility
1056
- * @see https://tailwindcss.com/docs/visibility
1057
- */
1058
- visibility: [
1059
- "visible",
1060
- "invisible",
1061
- "collapse"
1062
- ],
1063
- /**
1064
- * Z-Index
1065
- * @see https://tailwindcss.com/docs/z-index
1066
- */
1067
- z: [{ z: [
1068
- "auto",
1069
- isInteger,
1070
- isArbitraryValue
1071
- ] }],
1072
- /**
1073
- * Flex Basis
1074
- * @see https://tailwindcss.com/docs/flex-basis
1075
- */
1076
- basis: [{ basis: getSpacingWithAutoAndArbitrary() }],
1077
- /**
1078
- * Flex Direction
1079
- * @see https://tailwindcss.com/docs/flex-direction
1080
- */
1081
- "flex-direction": [{ flex: [
1082
- "row",
1083
- "row-reverse",
1084
- "col",
1085
- "col-reverse"
1086
- ] }],
1087
- /**
1088
- * Flex Wrap
1089
- * @see https://tailwindcss.com/docs/flex-wrap
1090
- */
1091
- "flex-wrap": [{ flex: [
1092
- "wrap",
1093
- "wrap-reverse",
1094
- "nowrap"
1095
- ] }],
1096
- /**
1097
- * Flex
1098
- * @see https://tailwindcss.com/docs/flex
1099
- */
1100
- flex: [{ flex: [
1101
- "1",
1102
- "auto",
1103
- "initial",
1104
- "none",
1105
- isArbitraryValue
1106
- ] }],
1107
- /**
1108
- * Flex Grow
1109
- * @see https://tailwindcss.com/docs/flex-grow
1110
- */
1111
- grow: [{ grow: getZeroAndEmpty() }],
1112
- /**
1113
- * Flex Shrink
1114
- * @see https://tailwindcss.com/docs/flex-shrink
1115
- */
1116
- shrink: [{ shrink: getZeroAndEmpty() }],
1117
- /**
1118
- * Order
1119
- * @see https://tailwindcss.com/docs/order
1120
- */
1121
- order: [{ order: [
1122
- "first",
1123
- "last",
1124
- "none",
1125
- isInteger,
1126
- isArbitraryValue
1127
- ] }],
1128
- /**
1129
- * Grid Template Columns
1130
- * @see https://tailwindcss.com/docs/grid-template-columns
1131
- */
1132
- "grid-cols": [{ "grid-cols": [isAny] }],
1133
- /**
1134
- * Grid Column Start / End
1135
- * @see https://tailwindcss.com/docs/grid-column
1136
- */
1137
- "col-start-end": [{ col: [
1138
- "auto",
1139
- { span: [
1140
- "full",
1141
- isInteger,
1142
- isArbitraryValue
1143
- ] },
1144
- isArbitraryValue
1145
- ] }],
1146
- /**
1147
- * Grid Column Start
1148
- * @see https://tailwindcss.com/docs/grid-column
1149
- */
1150
- "col-start": [{ "col-start": getNumberWithAutoAndArbitrary() }],
1151
- /**
1152
- * Grid Column End
1153
- * @see https://tailwindcss.com/docs/grid-column
1154
- */
1155
- "col-end": [{ "col-end": getNumberWithAutoAndArbitrary() }],
1156
- /**
1157
- * Grid Template Rows
1158
- * @see https://tailwindcss.com/docs/grid-template-rows
1159
- */
1160
- "grid-rows": [{ "grid-rows": [isAny] }],
1161
- /**
1162
- * Grid Row Start / End
1163
- * @see https://tailwindcss.com/docs/grid-row
1164
- */
1165
- "row-start-end": [{ row: [
1166
- "auto",
1167
- { span: [isInteger, isArbitraryValue] },
1168
- isArbitraryValue
1169
- ] }],
1170
- /**
1171
- * Grid Row Start
1172
- * @see https://tailwindcss.com/docs/grid-row
1173
- */
1174
- "row-start": [{ "row-start": getNumberWithAutoAndArbitrary() }],
1175
- /**
1176
- * Grid Row End
1177
- * @see https://tailwindcss.com/docs/grid-row
1178
- */
1179
- "row-end": [{ "row-end": getNumberWithAutoAndArbitrary() }],
1180
- /**
1181
- * Grid Auto Flow
1182
- * @see https://tailwindcss.com/docs/grid-auto-flow
1183
- */
1184
- "grid-flow": [{ "grid-flow": [
1185
- "row",
1186
- "col",
1187
- "dense",
1188
- "row-dense",
1189
- "col-dense"
1190
- ] }],
1191
- /**
1192
- * Grid Auto Columns
1193
- * @see https://tailwindcss.com/docs/grid-auto-columns
1194
- */
1195
- "auto-cols": [{ "auto-cols": [
1196
- "auto",
1197
- "min",
1198
- "max",
1199
- "fr",
1200
- isArbitraryValue
1201
- ] }],
1202
- /**
1203
- * Grid Auto Rows
1204
- * @see https://tailwindcss.com/docs/grid-auto-rows
1205
- */
1206
- "auto-rows": [{ "auto-rows": [
1207
- "auto",
1208
- "min",
1209
- "max",
1210
- "fr",
1211
- isArbitraryValue
1212
- ] }],
1213
- /**
1214
- * Gap
1215
- * @see https://tailwindcss.com/docs/gap
1216
- */
1217
- gap: [{ gap: [gap] }],
1218
- /**
1219
- * Gap X
1220
- * @see https://tailwindcss.com/docs/gap
1221
- */
1222
- "gap-x": [{ "gap-x": [gap] }],
1223
- /**
1224
- * Gap Y
1225
- * @see https://tailwindcss.com/docs/gap
1226
- */
1227
- "gap-y": [{ "gap-y": [gap] }],
1228
- /**
1229
- * Justify Content
1230
- * @see https://tailwindcss.com/docs/justify-content
1231
- */
1232
- "justify-content": [{ justify: ["normal", ...getAlign()] }],
1233
- /**
1234
- * Justify Items
1235
- * @see https://tailwindcss.com/docs/justify-items
1236
- */
1237
- "justify-items": [{ "justify-items": [
1238
- "start",
1239
- "end",
1240
- "center",
1241
- "stretch"
1242
- ] }],
1243
- /**
1244
- * Justify Self
1245
- * @see https://tailwindcss.com/docs/justify-self
1246
- */
1247
- "justify-self": [{ "justify-self": [
1248
- "auto",
1249
- "start",
1250
- "end",
1251
- "center",
1252
- "stretch"
1253
- ] }],
1254
- /**
1255
- * Align Content
1256
- * @see https://tailwindcss.com/docs/align-content
1257
- */
1258
- "align-content": [{ content: [
1259
- "normal",
1260
- ...getAlign(),
1261
- "baseline"
1262
- ] }],
1263
- /**
1264
- * Align Items
1265
- * @see https://tailwindcss.com/docs/align-items
1266
- */
1267
- "align-items": [{ items: [
1268
- "start",
1269
- "end",
1270
- "center",
1271
- "baseline",
1272
- "stretch"
1273
- ] }],
1274
- /**
1275
- * Align Self
1276
- * @see https://tailwindcss.com/docs/align-self
1277
- */
1278
- "align-self": [{ self: [
1279
- "auto",
1280
- "start",
1281
- "end",
1282
- "center",
1283
- "stretch",
1284
- "baseline"
1285
- ] }],
1286
- /**
1287
- * Place Content
1288
- * @see https://tailwindcss.com/docs/place-content
1289
- */
1290
- "place-content": [{ "place-content": [...getAlign(), "baseline"] }],
1291
- /**
1292
- * Place Items
1293
- * @see https://tailwindcss.com/docs/place-items
1294
- */
1295
- "place-items": [{ "place-items": [
1296
- "start",
1297
- "end",
1298
- "center",
1299
- "baseline",
1300
- "stretch"
1301
- ] }],
1302
- /**
1303
- * Place Self
1304
- * @see https://tailwindcss.com/docs/place-self
1305
- */
1306
- "place-self": [{ "place-self": [
1307
- "auto",
1308
- "start",
1309
- "end",
1310
- "center",
1311
- "stretch"
1312
- ] }],
1313
- /**
1314
- * Padding
1315
- * @see https://tailwindcss.com/docs/padding
1316
- */
1317
- p: [{ p: [padding] }],
1318
- /**
1319
- * Padding X
1320
- * @see https://tailwindcss.com/docs/padding
1321
- */
1322
- px: [{ px: [padding] }],
1323
- /**
1324
- * Padding Y
1325
- * @see https://tailwindcss.com/docs/padding
1326
- */
1327
- py: [{ py: [padding] }],
1328
- /**
1329
- * Padding Start
1330
- * @see https://tailwindcss.com/docs/padding
1331
- */
1332
- ps: [{ ps: [padding] }],
1333
- /**
1334
- * Padding End
1335
- * @see https://tailwindcss.com/docs/padding
1336
- */
1337
- pe: [{ pe: [padding] }],
1338
- /**
1339
- * Padding Top
1340
- * @see https://tailwindcss.com/docs/padding
1341
- */
1342
- pt: [{ pt: [padding] }],
1343
- /**
1344
- * Padding Right
1345
- * @see https://tailwindcss.com/docs/padding
1346
- */
1347
- pr: [{ pr: [padding] }],
1348
- /**
1349
- * Padding Bottom
1350
- * @see https://tailwindcss.com/docs/padding
1351
- */
1352
- pb: [{ pb: [padding] }],
1353
- /**
1354
- * Padding Left
1355
- * @see https://tailwindcss.com/docs/padding
1356
- */
1357
- pl: [{ pl: [padding] }],
1358
- /**
1359
- * Margin
1360
- * @see https://tailwindcss.com/docs/margin
1361
- */
1362
- m: [{ m: [margin] }],
1363
- /**
1364
- * Margin X
1365
- * @see https://tailwindcss.com/docs/margin
1366
- */
1367
- mx: [{ mx: [margin] }],
1368
- /**
1369
- * Margin Y
1370
- * @see https://tailwindcss.com/docs/margin
1371
- */
1372
- my: [{ my: [margin] }],
1373
- /**
1374
- * Margin Start
1375
- * @see https://tailwindcss.com/docs/margin
1376
- */
1377
- ms: [{ ms: [margin] }],
1378
- /**
1379
- * Margin End
1380
- * @see https://tailwindcss.com/docs/margin
1381
- */
1382
- me: [{ me: [margin] }],
1383
- /**
1384
- * Margin Top
1385
- * @see https://tailwindcss.com/docs/margin
1386
- */
1387
- mt: [{ mt: [margin] }],
1388
- /**
1389
- * Margin Right
1390
- * @see https://tailwindcss.com/docs/margin
1391
- */
1392
- mr: [{ mr: [margin] }],
1393
- /**
1394
- * Margin Bottom
1395
- * @see https://tailwindcss.com/docs/margin
1396
- */
1397
- mb: [{ mb: [margin] }],
1398
- /**
1399
- * Margin Left
1400
- * @see https://tailwindcss.com/docs/margin
1401
- */
1402
- ml: [{ ml: [margin] }],
1403
- /**
1404
- * Space Between X
1405
- * @see https://tailwindcss.com/docs/space
1406
- */
1407
- "space-x": [{ "space-x": [space] }],
1408
- /**
1409
- * Space Between X Reverse
1410
- * @see https://tailwindcss.com/docs/space
1411
- */
1412
- "space-x-reverse": ["space-x-reverse"],
1413
- /**
1414
- * Space Between Y
1415
- * @see https://tailwindcss.com/docs/space
1416
- */
1417
- "space-y": [{ "space-y": [space] }],
1418
- /**
1419
- * Space Between Y Reverse
1420
- * @see https://tailwindcss.com/docs/space
1421
- */
1422
- "space-y-reverse": ["space-y-reverse"],
1423
- /**
1424
- * Width
1425
- * @see https://tailwindcss.com/docs/width
1426
- */
1427
- w: [{ w: [
1428
- "auto",
1429
- "min",
1430
- "max",
1431
- "fit",
1432
- "svw",
1433
- "lvw",
1434
- "dvw",
1435
- isArbitraryValue,
1436
- spacing
1437
- ] }],
1438
- /**
1439
- * Min-Width
1440
- * @see https://tailwindcss.com/docs/min-width
1441
- */
1442
- "min-w": [{ "min-w": [
1443
- isArbitraryValue,
1444
- spacing,
1445
- "min",
1446
- "max",
1447
- "fit"
1448
- ] }],
1449
- /**
1450
- * Max-Width
1451
- * @see https://tailwindcss.com/docs/max-width
1452
- */
1453
- "max-w": [{ "max-w": [
1454
- isArbitraryValue,
1455
- spacing,
1456
- "none",
1457
- "full",
1458
- "min",
1459
- "max",
1460
- "fit",
1461
- "prose",
1462
- { screen: [isTshirtSize] },
1463
- isTshirtSize
1464
- ] }],
1465
- /**
1466
- * Height
1467
- * @see https://tailwindcss.com/docs/height
1468
- */
1469
- h: [{ h: [
1470
- isArbitraryValue,
1471
- spacing,
1472
- "auto",
1473
- "min",
1474
- "max",
1475
- "fit",
1476
- "svh",
1477
- "lvh",
1478
- "dvh"
1479
- ] }],
1480
- /**
1481
- * Min-Height
1482
- * @see https://tailwindcss.com/docs/min-height
1483
- */
1484
- "min-h": [{ "min-h": [
1485
- isArbitraryValue,
1486
- spacing,
1487
- "min",
1488
- "max",
1489
- "fit",
1490
- "svh",
1491
- "lvh",
1492
- "dvh"
1493
- ] }],
1494
- /**
1495
- * Max-Height
1496
- * @see https://tailwindcss.com/docs/max-height
1497
- */
1498
- "max-h": [{ "max-h": [
1499
- isArbitraryValue,
1500
- spacing,
1501
- "min",
1502
- "max",
1503
- "fit",
1504
- "svh",
1505
- "lvh",
1506
- "dvh"
1507
- ] }],
1508
- /**
1509
- * Size
1510
- * @see https://tailwindcss.com/docs/size
1511
- */
1512
- size: [{ size: [
1513
- isArbitraryValue,
1514
- spacing,
1515
- "auto",
1516
- "min",
1517
- "max",
1518
- "fit"
1519
- ] }],
1520
- /**
1521
- * Font Size
1522
- * @see https://tailwindcss.com/docs/font-size
1523
- */
1524
- "font-size": [{ text: [
1525
- "base",
1526
- isTshirtSize,
1527
- isArbitraryLength
1528
- ] }],
1529
- /**
1530
- * Font Smoothing
1531
- * @see https://tailwindcss.com/docs/font-smoothing
1532
- */
1533
- "font-smoothing": ["antialiased", "subpixel-antialiased"],
1534
- /**
1535
- * Font Style
1536
- * @see https://tailwindcss.com/docs/font-style
1537
- */
1538
- "font-style": ["italic", "not-italic"],
1539
- /**
1540
- * Font Weight
1541
- * @see https://tailwindcss.com/docs/font-weight
1542
- */
1543
- "font-weight": [{ font: [
1544
- "thin",
1545
- "extralight",
1546
- "light",
1547
- "normal",
1548
- "medium",
1549
- "semibold",
1550
- "bold",
1551
- "extrabold",
1552
- "black",
1553
- isArbitraryNumber
1554
- ] }],
1555
- /**
1556
- * Font Family
1557
- * @see https://tailwindcss.com/docs/font-family
1558
- */
1559
- "font-family": [{ font: [isAny] }],
1560
- /**
1561
- * Font Variant Numeric
1562
- * @see https://tailwindcss.com/docs/font-variant-numeric
1563
- */
1564
- "fvn-normal": ["normal-nums"],
1565
- /**
1566
- * Font Variant Numeric
1567
- * @see https://tailwindcss.com/docs/font-variant-numeric
1568
- */
1569
- "fvn-ordinal": ["ordinal"],
1570
- /**
1571
- * Font Variant Numeric
1572
- * @see https://tailwindcss.com/docs/font-variant-numeric
1573
- */
1574
- "fvn-slashed-zero": ["slashed-zero"],
1575
- /**
1576
- * Font Variant Numeric
1577
- * @see https://tailwindcss.com/docs/font-variant-numeric
1578
- */
1579
- "fvn-figure": ["lining-nums", "oldstyle-nums"],
1580
- /**
1581
- * Font Variant Numeric
1582
- * @see https://tailwindcss.com/docs/font-variant-numeric
1583
- */
1584
- "fvn-spacing": ["proportional-nums", "tabular-nums"],
1585
- /**
1586
- * Font Variant Numeric
1587
- * @see https://tailwindcss.com/docs/font-variant-numeric
1588
- */
1589
- "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
1590
- /**
1591
- * Letter Spacing
1592
- * @see https://tailwindcss.com/docs/letter-spacing
1593
- */
1594
- tracking: [{ tracking: [
1595
- "tighter",
1596
- "tight",
1597
- "normal",
1598
- "wide",
1599
- "wider",
1600
- "widest",
1601
- isArbitraryValue
1602
- ] }],
1603
- /**
1604
- * Line Clamp
1605
- * @see https://tailwindcss.com/docs/line-clamp
1606
- */
1607
- "line-clamp": [{ "line-clamp": [
1608
- "none",
1609
- isNumber,
1610
- isArbitraryNumber
1611
- ] }],
1612
- /**
1613
- * Line Height
1614
- * @see https://tailwindcss.com/docs/line-height
1615
- */
1616
- leading: [{ leading: [
1617
- "none",
1618
- "tight",
1619
- "snug",
1620
- "normal",
1621
- "relaxed",
1622
- "loose",
1623
- isLength,
1624
- isArbitraryValue
1625
- ] }],
1626
- /**
1627
- * List Style Image
1628
- * @see https://tailwindcss.com/docs/list-style-image
1629
- */
1630
- "list-image": [{ "list-image": ["none", isArbitraryValue] }],
1631
- /**
1632
- * List Style Type
1633
- * @see https://tailwindcss.com/docs/list-style-type
1634
- */
1635
- "list-style-type": [{ list: [
1636
- "none",
1637
- "disc",
1638
- "decimal",
1639
- isArbitraryValue
1640
- ] }],
1641
- /**
1642
- * List Style Position
1643
- * @see https://tailwindcss.com/docs/list-style-position
1644
- */
1645
- "list-style-position": [{ list: ["inside", "outside"] }],
1646
- /**
1647
- * Placeholder Color
1648
- * @deprecated since Tailwind CSS v3.0.0
1649
- * @see https://tailwindcss.com/docs/placeholder-color
1650
- */
1651
- "placeholder-color": [{ placeholder: [colors] }],
1652
- /**
1653
- * Placeholder Opacity
1654
- * @see https://tailwindcss.com/docs/placeholder-opacity
1655
- */
1656
- "placeholder-opacity": [{ "placeholder-opacity": [opacity] }],
1657
- /**
1658
- * Text Alignment
1659
- * @see https://tailwindcss.com/docs/text-align
1660
- */
1661
- "text-alignment": [{ text: [
1662
- "left",
1663
- "center",
1664
- "right",
1665
- "justify",
1666
- "start",
1667
- "end"
1668
- ] }],
1669
- /**
1670
- * Text Color
1671
- * @see https://tailwindcss.com/docs/text-color
1672
- */
1673
- "text-color": [{ text: [colors] }],
1674
- /**
1675
- * Text Opacity
1676
- * @see https://tailwindcss.com/docs/text-opacity
1677
- */
1678
- "text-opacity": [{ "text-opacity": [opacity] }],
1679
- /**
1680
- * Text Decoration
1681
- * @see https://tailwindcss.com/docs/text-decoration
1682
- */
1683
- "text-decoration": [
1684
- "underline",
1685
- "overline",
1686
- "line-through",
1687
- "no-underline"
1688
- ],
1689
- /**
1690
- * Text Decoration Style
1691
- * @see https://tailwindcss.com/docs/text-decoration-style
1692
- */
1693
- "text-decoration-style": [{ decoration: [...getLineStyles(), "wavy"] }],
1694
- /**
1695
- * Text Decoration Thickness
1696
- * @see https://tailwindcss.com/docs/text-decoration-thickness
1697
- */
1698
- "text-decoration-thickness": [{ decoration: [
1699
- "auto",
1700
- "from-font",
1701
- isLength,
1702
- isArbitraryLength
1703
- ] }],
1704
- /**
1705
- * Text Underline Offset
1706
- * @see https://tailwindcss.com/docs/text-underline-offset
1707
- */
1708
- "underline-offset": [{ "underline-offset": [
1709
- "auto",
1710
- isLength,
1711
- isArbitraryValue
1712
- ] }],
1713
- /**
1714
- * Text Decoration Color
1715
- * @see https://tailwindcss.com/docs/text-decoration-color
1716
- */
1717
- "text-decoration-color": [{ decoration: [colors] }],
1718
- /**
1719
- * Text Transform
1720
- * @see https://tailwindcss.com/docs/text-transform
1721
- */
1722
- "text-transform": [
1723
- "uppercase",
1724
- "lowercase",
1725
- "capitalize",
1726
- "normal-case"
1727
- ],
1728
- /**
1729
- * Text Overflow
1730
- * @see https://tailwindcss.com/docs/text-overflow
1731
- */
1732
- "text-overflow": [
1733
- "truncate",
1734
- "text-ellipsis",
1735
- "text-clip"
1736
- ],
1737
- /**
1738
- * Text Wrap
1739
- * @see https://tailwindcss.com/docs/text-wrap
1740
- */
1741
- "text-wrap": [{ text: [
1742
- "wrap",
1743
- "nowrap",
1744
- "balance",
1745
- "pretty"
1746
- ] }],
1747
- /**
1748
- * Text Indent
1749
- * @see https://tailwindcss.com/docs/text-indent
1750
- */
1751
- indent: [{ indent: getSpacingWithArbitrary() }],
1752
- /**
1753
- * Vertical Alignment
1754
- * @see https://tailwindcss.com/docs/vertical-align
1755
- */
1756
- "vertical-align": [{ align: [
1757
- "baseline",
1758
- "top",
1759
- "middle",
1760
- "bottom",
1761
- "text-top",
1762
- "text-bottom",
1763
- "sub",
1764
- "super",
1765
- isArbitraryValue
1766
- ] }],
1767
- /**
1768
- * Whitespace
1769
- * @see https://tailwindcss.com/docs/whitespace
1770
- */
1771
- whitespace: [{ whitespace: [
1772
- "normal",
1773
- "nowrap",
1774
- "pre",
1775
- "pre-line",
1776
- "pre-wrap",
1777
- "break-spaces"
1778
- ] }],
1779
- /**
1780
- * Word Break
1781
- * @see https://tailwindcss.com/docs/word-break
1782
- */
1783
- break: [{ break: [
1784
- "normal",
1785
- "words",
1786
- "all",
1787
- "keep"
1788
- ] }],
1789
- /**
1790
- * Hyphens
1791
- * @see https://tailwindcss.com/docs/hyphens
1792
- */
1793
- hyphens: [{ hyphens: [
1794
- "none",
1795
- "manual",
1796
- "auto"
1797
- ] }],
1798
- /**
1799
- * Content
1800
- * @see https://tailwindcss.com/docs/content
1801
- */
1802
- content: [{ content: ["none", isArbitraryValue] }],
1803
- /**
1804
- * Background Attachment
1805
- * @see https://tailwindcss.com/docs/background-attachment
1806
- */
1807
- "bg-attachment": [{ bg: [
1808
- "fixed",
1809
- "local",
1810
- "scroll"
1811
- ] }],
1812
- /**
1813
- * Background Clip
1814
- * @see https://tailwindcss.com/docs/background-clip
1815
- */
1816
- "bg-clip": [{ "bg-clip": [
1817
- "border",
1818
- "padding",
1819
- "content",
1820
- "text"
1821
- ] }],
1822
- /**
1823
- * Background Opacity
1824
- * @deprecated since Tailwind CSS v3.0.0
1825
- * @see https://tailwindcss.com/docs/background-opacity
1826
- */
1827
- "bg-opacity": [{ "bg-opacity": [opacity] }],
1828
- /**
1829
- * Background Origin
1830
- * @see https://tailwindcss.com/docs/background-origin
1831
- */
1832
- "bg-origin": [{ "bg-origin": [
1833
- "border",
1834
- "padding",
1835
- "content"
1836
- ] }],
1837
- /**
1838
- * Background Position
1839
- * @see https://tailwindcss.com/docs/background-position
1840
- */
1841
- "bg-position": [{ bg: [...getPositions(), isArbitraryPosition] }],
1842
- /**
1843
- * Background Repeat
1844
- * @see https://tailwindcss.com/docs/background-repeat
1845
- */
1846
- "bg-repeat": [{ bg: ["no-repeat", { repeat: [
1847
- "",
1848
- "x",
1849
- "y",
1850
- "round",
1851
- "space"
1852
- ] }] }],
1853
- /**
1854
- * Background Size
1855
- * @see https://tailwindcss.com/docs/background-size
1856
- */
1857
- "bg-size": [{ bg: [
1858
- "auto",
1859
- "cover",
1860
- "contain",
1861
- isArbitrarySize
1862
- ] }],
1863
- /**
1864
- * Background Image
1865
- * @see https://tailwindcss.com/docs/background-image
1866
- */
1867
- "bg-image": [{ bg: [
1868
- "none",
1869
- { "gradient-to": [
1870
- "t",
1871
- "tr",
1872
- "r",
1873
- "br",
1874
- "b",
1875
- "bl",
1876
- "l",
1877
- "tl"
1878
- ] },
1879
- isArbitraryImage
1880
- ] }],
1881
- /**
1882
- * Background Color
1883
- * @see https://tailwindcss.com/docs/background-color
1884
- */
1885
- "bg-color": [{ bg: [colors] }],
1886
- /**
1887
- * Gradient Color Stops From Position
1888
- * @see https://tailwindcss.com/docs/gradient-color-stops
1889
- */
1890
- "gradient-from-pos": [{ from: [gradientColorStopPositions] }],
1891
- /**
1892
- * Gradient Color Stops Via Position
1893
- * @see https://tailwindcss.com/docs/gradient-color-stops
1894
- */
1895
- "gradient-via-pos": [{ via: [gradientColorStopPositions] }],
1896
- /**
1897
- * Gradient Color Stops To Position
1898
- * @see https://tailwindcss.com/docs/gradient-color-stops
1899
- */
1900
- "gradient-to-pos": [{ to: [gradientColorStopPositions] }],
1901
- /**
1902
- * Gradient Color Stops From
1903
- * @see https://tailwindcss.com/docs/gradient-color-stops
1904
- */
1905
- "gradient-from": [{ from: [gradientColorStops] }],
1906
- /**
1907
- * Gradient Color Stops Via
1908
- * @see https://tailwindcss.com/docs/gradient-color-stops
1909
- */
1910
- "gradient-via": [{ via: [gradientColorStops] }],
1911
- /**
1912
- * Gradient Color Stops To
1913
- * @see https://tailwindcss.com/docs/gradient-color-stops
1914
- */
1915
- "gradient-to": [{ to: [gradientColorStops] }],
1916
- /**
1917
- * Border Radius
1918
- * @see https://tailwindcss.com/docs/border-radius
1919
- */
1920
- rounded: [{ rounded: [borderRadius] }],
1921
- /**
1922
- * Border Radius Start
1923
- * @see https://tailwindcss.com/docs/border-radius
1924
- */
1925
- "rounded-s": [{ "rounded-s": [borderRadius] }],
1926
- /**
1927
- * Border Radius End
1928
- * @see https://tailwindcss.com/docs/border-radius
1929
- */
1930
- "rounded-e": [{ "rounded-e": [borderRadius] }],
1931
- /**
1932
- * Border Radius Top
1933
- * @see https://tailwindcss.com/docs/border-radius
1934
- */
1935
- "rounded-t": [{ "rounded-t": [borderRadius] }],
1936
- /**
1937
- * Border Radius Right
1938
- * @see https://tailwindcss.com/docs/border-radius
1939
- */
1940
- "rounded-r": [{ "rounded-r": [borderRadius] }],
1941
- /**
1942
- * Border Radius Bottom
1943
- * @see https://tailwindcss.com/docs/border-radius
1944
- */
1945
- "rounded-b": [{ "rounded-b": [borderRadius] }],
1946
- /**
1947
- * Border Radius Left
1948
- * @see https://tailwindcss.com/docs/border-radius
1949
- */
1950
- "rounded-l": [{ "rounded-l": [borderRadius] }],
1951
- /**
1952
- * Border Radius Start Start
1953
- * @see https://tailwindcss.com/docs/border-radius
1954
- */
1955
- "rounded-ss": [{ "rounded-ss": [borderRadius] }],
1956
- /**
1957
- * Border Radius Start End
1958
- * @see https://tailwindcss.com/docs/border-radius
1959
- */
1960
- "rounded-se": [{ "rounded-se": [borderRadius] }],
1961
- /**
1962
- * Border Radius End End
1963
- * @see https://tailwindcss.com/docs/border-radius
1964
- */
1965
- "rounded-ee": [{ "rounded-ee": [borderRadius] }],
1966
- /**
1967
- * Border Radius End Start
1968
- * @see https://tailwindcss.com/docs/border-radius
1969
- */
1970
- "rounded-es": [{ "rounded-es": [borderRadius] }],
1971
- /**
1972
- * Border Radius Top Left
1973
- * @see https://tailwindcss.com/docs/border-radius
1974
- */
1975
- "rounded-tl": [{ "rounded-tl": [borderRadius] }],
1976
- /**
1977
- * Border Radius Top Right
1978
- * @see https://tailwindcss.com/docs/border-radius
1979
- */
1980
- "rounded-tr": [{ "rounded-tr": [borderRadius] }],
1981
- /**
1982
- * Border Radius Bottom Right
1983
- * @see https://tailwindcss.com/docs/border-radius
1984
- */
1985
- "rounded-br": [{ "rounded-br": [borderRadius] }],
1986
- /**
1987
- * Border Radius Bottom Left
1988
- * @see https://tailwindcss.com/docs/border-radius
1989
- */
1990
- "rounded-bl": [{ "rounded-bl": [borderRadius] }],
1991
- /**
1992
- * Border Width
1993
- * @see https://tailwindcss.com/docs/border-width
1994
- */
1995
- "border-w": [{ border: [borderWidth] }],
1996
- /**
1997
- * Border Width X
1998
- * @see https://tailwindcss.com/docs/border-width
1999
- */
2000
- "border-w-x": [{ "border-x": [borderWidth] }],
2001
- /**
2002
- * Border Width Y
2003
- * @see https://tailwindcss.com/docs/border-width
2004
- */
2005
- "border-w-y": [{ "border-y": [borderWidth] }],
2006
- /**
2007
- * Border Width Start
2008
- * @see https://tailwindcss.com/docs/border-width
2009
- */
2010
- "border-w-s": [{ "border-s": [borderWidth] }],
2011
- /**
2012
- * Border Width End
2013
- * @see https://tailwindcss.com/docs/border-width
2014
- */
2015
- "border-w-e": [{ "border-e": [borderWidth] }],
2016
- /**
2017
- * Border Width Top
2018
- * @see https://tailwindcss.com/docs/border-width
2019
- */
2020
- "border-w-t": [{ "border-t": [borderWidth] }],
2021
- /**
2022
- * Border Width Right
2023
- * @see https://tailwindcss.com/docs/border-width
2024
- */
2025
- "border-w-r": [{ "border-r": [borderWidth] }],
2026
- /**
2027
- * Border Width Bottom
2028
- * @see https://tailwindcss.com/docs/border-width
2029
- */
2030
- "border-w-b": [{ "border-b": [borderWidth] }],
2031
- /**
2032
- * Border Width Left
2033
- * @see https://tailwindcss.com/docs/border-width
2034
- */
2035
- "border-w-l": [{ "border-l": [borderWidth] }],
2036
- /**
2037
- * Border Opacity
2038
- * @see https://tailwindcss.com/docs/border-opacity
2039
- */
2040
- "border-opacity": [{ "border-opacity": [opacity] }],
2041
- /**
2042
- * Border Style
2043
- * @see https://tailwindcss.com/docs/border-style
2044
- */
2045
- "border-style": [{ border: [...getLineStyles(), "hidden"] }],
2046
- /**
2047
- * Divide Width X
2048
- * @see https://tailwindcss.com/docs/divide-width
2049
- */
2050
- "divide-x": [{ "divide-x": [borderWidth] }],
2051
- /**
2052
- * Divide Width X Reverse
2053
- * @see https://tailwindcss.com/docs/divide-width
2054
- */
2055
- "divide-x-reverse": ["divide-x-reverse"],
2056
- /**
2057
- * Divide Width Y
2058
- * @see https://tailwindcss.com/docs/divide-width
2059
- */
2060
- "divide-y": [{ "divide-y": [borderWidth] }],
2061
- /**
2062
- * Divide Width Y Reverse
2063
- * @see https://tailwindcss.com/docs/divide-width
2064
- */
2065
- "divide-y-reverse": ["divide-y-reverse"],
2066
- /**
2067
- * Divide Opacity
2068
- * @see https://tailwindcss.com/docs/divide-opacity
2069
- */
2070
- "divide-opacity": [{ "divide-opacity": [opacity] }],
2071
- /**
2072
- * Divide Style
2073
- * @see https://tailwindcss.com/docs/divide-style
2074
- */
2075
- "divide-style": [{ divide: getLineStyles() }],
2076
- /**
2077
- * Border Color
2078
- * @see https://tailwindcss.com/docs/border-color
2079
- */
2080
- "border-color": [{ border: [borderColor] }],
2081
- /**
2082
- * Border Color X
2083
- * @see https://tailwindcss.com/docs/border-color
2084
- */
2085
- "border-color-x": [{ "border-x": [borderColor] }],
2086
- /**
2087
- * Border Color Y
2088
- * @see https://tailwindcss.com/docs/border-color
2089
- */
2090
- "border-color-y": [{ "border-y": [borderColor] }],
2091
- /**
2092
- * Border Color S
2093
- * @see https://tailwindcss.com/docs/border-color
2094
- */
2095
- "border-color-s": [{ "border-s": [borderColor] }],
2096
- /**
2097
- * Border Color E
2098
- * @see https://tailwindcss.com/docs/border-color
2099
- */
2100
- "border-color-e": [{ "border-e": [borderColor] }],
2101
- /**
2102
- * Border Color Top
2103
- * @see https://tailwindcss.com/docs/border-color
2104
- */
2105
- "border-color-t": [{ "border-t": [borderColor] }],
2106
- /**
2107
- * Border Color Right
2108
- * @see https://tailwindcss.com/docs/border-color
2109
- */
2110
- "border-color-r": [{ "border-r": [borderColor] }],
2111
- /**
2112
- * Border Color Bottom
2113
- * @see https://tailwindcss.com/docs/border-color
2114
- */
2115
- "border-color-b": [{ "border-b": [borderColor] }],
2116
- /**
2117
- * Border Color Left
2118
- * @see https://tailwindcss.com/docs/border-color
2119
- */
2120
- "border-color-l": [{ "border-l": [borderColor] }],
2121
- /**
2122
- * Divide Color
2123
- * @see https://tailwindcss.com/docs/divide-color
2124
- */
2125
- "divide-color": [{ divide: [borderColor] }],
2126
- /**
2127
- * Outline Style
2128
- * @see https://tailwindcss.com/docs/outline-style
2129
- */
2130
- "outline-style": [{ outline: ["", ...getLineStyles()] }],
2131
- /**
2132
- * Outline Offset
2133
- * @see https://tailwindcss.com/docs/outline-offset
2134
- */
2135
- "outline-offset": [{ "outline-offset": [isLength, isArbitraryValue] }],
2136
- /**
2137
- * Outline Width
2138
- * @see https://tailwindcss.com/docs/outline-width
2139
- */
2140
- "outline-w": [{ outline: [isLength, isArbitraryLength] }],
2141
- /**
2142
- * Outline Color
2143
- * @see https://tailwindcss.com/docs/outline-color
2144
- */
2145
- "outline-color": [{ outline: [colors] }],
2146
- /**
2147
- * Ring Width
2148
- * @see https://tailwindcss.com/docs/ring-width
2149
- */
2150
- "ring-w": [{ ring: getLengthWithEmptyAndArbitrary() }],
2151
- /**
2152
- * Ring Width Inset
2153
- * @see https://tailwindcss.com/docs/ring-width
2154
- */
2155
- "ring-w-inset": ["ring-inset"],
2156
- /**
2157
- * Ring Color
2158
- * @see https://tailwindcss.com/docs/ring-color
2159
- */
2160
- "ring-color": [{ ring: [colors] }],
2161
- /**
2162
- * Ring Opacity
2163
- * @see https://tailwindcss.com/docs/ring-opacity
2164
- */
2165
- "ring-opacity": [{ "ring-opacity": [opacity] }],
2166
- /**
2167
- * Ring Offset Width
2168
- * @see https://tailwindcss.com/docs/ring-offset-width
2169
- */
2170
- "ring-offset-w": [{ "ring-offset": [isLength, isArbitraryLength] }],
2171
- /**
2172
- * Ring Offset Color
2173
- * @see https://tailwindcss.com/docs/ring-offset-color
2174
- */
2175
- "ring-offset-color": [{ "ring-offset": [colors] }],
2176
- /**
2177
- * Box Shadow
2178
- * @see https://tailwindcss.com/docs/box-shadow
2179
- */
2180
- shadow: [{ shadow: [
2181
- "",
2182
- "inner",
2183
- "none",
2184
- isTshirtSize,
2185
- isArbitraryShadow
2186
- ] }],
2187
- /**
2188
- * Box Shadow Color
2189
- * @see https://tailwindcss.com/docs/box-shadow-color
2190
- */
2191
- "shadow-color": [{ shadow: [isAny] }],
2192
- /**
2193
- * Opacity
2194
- * @see https://tailwindcss.com/docs/opacity
2195
- */
2196
- opacity: [{ opacity: [opacity] }],
2197
- /**
2198
- * Mix Blend Mode
2199
- * @see https://tailwindcss.com/docs/mix-blend-mode
2200
- */
2201
- "mix-blend": [{ "mix-blend": [
2202
- ...getBlendModes(),
2203
- "plus-lighter",
2204
- "plus-darker"
2205
- ] }],
2206
- /**
2207
- * Background Blend Mode
2208
- * @see https://tailwindcss.com/docs/background-blend-mode
2209
- */
2210
- "bg-blend": [{ "bg-blend": getBlendModes() }],
2211
- /**
2212
- * Filter
2213
- * @deprecated since Tailwind CSS v3.0.0
2214
- * @see https://tailwindcss.com/docs/filter
2215
- */
2216
- filter: [{ filter: ["", "none"] }],
2217
- /**
2218
- * Blur
2219
- * @see https://tailwindcss.com/docs/blur
2220
- */
2221
- blur: [{ blur: [blur] }],
2222
- /**
2223
- * Brightness
2224
- * @see https://tailwindcss.com/docs/brightness
2225
- */
2226
- brightness: [{ brightness: [brightness] }],
2227
- /**
2228
- * Contrast
2229
- * @see https://tailwindcss.com/docs/contrast
2230
- */
2231
- contrast: [{ contrast: [contrast] }],
2232
- /**
2233
- * Drop Shadow
2234
- * @see https://tailwindcss.com/docs/drop-shadow
2235
- */
2236
- "drop-shadow": [{ "drop-shadow": [
2237
- "",
2238
- "none",
2239
- isTshirtSize,
2240
- isArbitraryValue
2241
- ] }],
2242
- /**
2243
- * Grayscale
2244
- * @see https://tailwindcss.com/docs/grayscale
2245
- */
2246
- grayscale: [{ grayscale: [grayscale] }],
2247
- /**
2248
- * Hue Rotate
2249
- * @see https://tailwindcss.com/docs/hue-rotate
2250
- */
2251
- "hue-rotate": [{ "hue-rotate": [hueRotate] }],
2252
- /**
2253
- * Invert
2254
- * @see https://tailwindcss.com/docs/invert
2255
- */
2256
- invert: [{ invert: [invert] }],
2257
- /**
2258
- * Saturate
2259
- * @see https://tailwindcss.com/docs/saturate
2260
- */
2261
- saturate: [{ saturate: [saturate] }],
2262
- /**
2263
- * Sepia
2264
- * @see https://tailwindcss.com/docs/sepia
2265
- */
2266
- sepia: [{ sepia: [sepia] }],
2267
- /**
2268
- * Backdrop Filter
2269
- * @deprecated since Tailwind CSS v3.0.0
2270
- * @see https://tailwindcss.com/docs/backdrop-filter
2271
- */
2272
- "backdrop-filter": [{ "backdrop-filter": ["", "none"] }],
2273
- /**
2274
- * Backdrop Blur
2275
- * @see https://tailwindcss.com/docs/backdrop-blur
2276
- */
2277
- "backdrop-blur": [{ "backdrop-blur": [blur] }],
2278
- /**
2279
- * Backdrop Brightness
2280
- * @see https://tailwindcss.com/docs/backdrop-brightness
2281
- */
2282
- "backdrop-brightness": [{ "backdrop-brightness": [brightness] }],
2283
- /**
2284
- * Backdrop Contrast
2285
- * @see https://tailwindcss.com/docs/backdrop-contrast
2286
- */
2287
- "backdrop-contrast": [{ "backdrop-contrast": [contrast] }],
2288
- /**
2289
- * Backdrop Grayscale
2290
- * @see https://tailwindcss.com/docs/backdrop-grayscale
2291
- */
2292
- "backdrop-grayscale": [{ "backdrop-grayscale": [grayscale] }],
2293
- /**
2294
- * Backdrop Hue Rotate
2295
- * @see https://tailwindcss.com/docs/backdrop-hue-rotate
2296
- */
2297
- "backdrop-hue-rotate": [{ "backdrop-hue-rotate": [hueRotate] }],
2298
- /**
2299
- * Backdrop Invert
2300
- * @see https://tailwindcss.com/docs/backdrop-invert
2301
- */
2302
- "backdrop-invert": [{ "backdrop-invert": [invert] }],
2303
- /**
2304
- * Backdrop Opacity
2305
- * @see https://tailwindcss.com/docs/backdrop-opacity
2306
- */
2307
- "backdrop-opacity": [{ "backdrop-opacity": [opacity] }],
2308
- /**
2309
- * Backdrop Saturate
2310
- * @see https://tailwindcss.com/docs/backdrop-saturate
2311
- */
2312
- "backdrop-saturate": [{ "backdrop-saturate": [saturate] }],
2313
- /**
2314
- * Backdrop Sepia
2315
- * @see https://tailwindcss.com/docs/backdrop-sepia
2316
- */
2317
- "backdrop-sepia": [{ "backdrop-sepia": [sepia] }],
2318
- /**
2319
- * Border Collapse
2320
- * @see https://tailwindcss.com/docs/border-collapse
2321
- */
2322
- "border-collapse": [{ border: ["collapse", "separate"] }],
2323
- /**
2324
- * Border Spacing
2325
- * @see https://tailwindcss.com/docs/border-spacing
2326
- */
2327
- "border-spacing": [{ "border-spacing": [borderSpacing] }],
2328
- /**
2329
- * Border Spacing X
2330
- * @see https://tailwindcss.com/docs/border-spacing
2331
- */
2332
- "border-spacing-x": [{ "border-spacing-x": [borderSpacing] }],
2333
- /**
2334
- * Border Spacing Y
2335
- * @see https://tailwindcss.com/docs/border-spacing
2336
- */
2337
- "border-spacing-y": [{ "border-spacing-y": [borderSpacing] }],
2338
- /**
2339
- * Table Layout
2340
- * @see https://tailwindcss.com/docs/table-layout
2341
- */
2342
- "table-layout": [{ table: ["auto", "fixed"] }],
2343
- /**
2344
- * Caption Side
2345
- * @see https://tailwindcss.com/docs/caption-side
2346
- */
2347
- caption: [{ caption: ["top", "bottom"] }],
2348
- /**
2349
- * Tranisition Property
2350
- * @see https://tailwindcss.com/docs/transition-property
2351
- */
2352
- transition: [{ transition: [
2353
- "none",
2354
- "all",
2355
- "",
2356
- "colors",
2357
- "opacity",
2358
- "shadow",
2359
- "transform",
2360
- isArbitraryValue
2361
- ] }],
2362
- /**
2363
- * Transition Duration
2364
- * @see https://tailwindcss.com/docs/transition-duration
2365
- */
2366
- duration: [{ duration: getNumberAndArbitrary() }],
2367
- /**
2368
- * Transition Timing Function
2369
- * @see https://tailwindcss.com/docs/transition-timing-function
2370
- */
2371
- ease: [{ ease: [
2372
- "linear",
2373
- "in",
2374
- "out",
2375
- "in-out",
2376
- isArbitraryValue
2377
- ] }],
2378
- /**
2379
- * Transition Delay
2380
- * @see https://tailwindcss.com/docs/transition-delay
2381
- */
2382
- delay: [{ delay: getNumberAndArbitrary() }],
2383
- /**
2384
- * Animation
2385
- * @see https://tailwindcss.com/docs/animation
2386
- */
2387
- animate: [{ animate: [
2388
- "none",
2389
- "spin",
2390
- "ping",
2391
- "pulse",
2392
- "bounce",
2393
- isArbitraryValue
2394
- ] }],
2395
- /**
2396
- * Transform
2397
- * @see https://tailwindcss.com/docs/transform
2398
- */
2399
- transform: [{ transform: [
2400
- "",
2401
- "gpu",
2402
- "none"
2403
- ] }],
2404
- /**
2405
- * Scale
2406
- * @see https://tailwindcss.com/docs/scale
2407
- */
2408
- scale: [{ scale: [scale] }],
2409
- /**
2410
- * Scale X
2411
- * @see https://tailwindcss.com/docs/scale
2412
- */
2413
- "scale-x": [{ "scale-x": [scale] }],
2414
- /**
2415
- * Scale Y
2416
- * @see https://tailwindcss.com/docs/scale
2417
- */
2418
- "scale-y": [{ "scale-y": [scale] }],
2419
- /**
2420
- * Rotate
2421
- * @see https://tailwindcss.com/docs/rotate
2422
- */
2423
- rotate: [{ rotate: [isInteger, isArbitraryValue] }],
2424
- /**
2425
- * Translate X
2426
- * @see https://tailwindcss.com/docs/translate
2427
- */
2428
- "translate-x": [{ "translate-x": [translate] }],
2429
- /**
2430
- * Translate Y
2431
- * @see https://tailwindcss.com/docs/translate
2432
- */
2433
- "translate-y": [{ "translate-y": [translate] }],
2434
- /**
2435
- * Skew X
2436
- * @see https://tailwindcss.com/docs/skew
2437
- */
2438
- "skew-x": [{ "skew-x": [skew] }],
2439
- /**
2440
- * Skew Y
2441
- * @see https://tailwindcss.com/docs/skew
2442
- */
2443
- "skew-y": [{ "skew-y": [skew] }],
2444
- /**
2445
- * Transform Origin
2446
- * @see https://tailwindcss.com/docs/transform-origin
2447
- */
2448
- "transform-origin": [{ origin: [
2449
- "center",
2450
- "top",
2451
- "top-right",
2452
- "right",
2453
- "bottom-right",
2454
- "bottom",
2455
- "bottom-left",
2456
- "left",
2457
- "top-left",
2458
- isArbitraryValue
2459
- ] }],
2460
- /**
2461
- * Accent Color
2462
- * @see https://tailwindcss.com/docs/accent-color
2463
- */
2464
- accent: [{ accent: ["auto", colors] }],
2465
- /**
2466
- * Appearance
2467
- * @see https://tailwindcss.com/docs/appearance
2468
- */
2469
- appearance: [{ appearance: ["none", "auto"] }],
2470
- /**
2471
- * Cursor
2472
- * @see https://tailwindcss.com/docs/cursor
2473
- */
2474
- cursor: [{ cursor: [
2475
- "auto",
2476
- "default",
2477
- "pointer",
2478
- "wait",
2479
- "text",
2480
- "move",
2481
- "help",
2482
- "not-allowed",
2483
- "none",
2484
- "context-menu",
2485
- "progress",
2486
- "cell",
2487
- "crosshair",
2488
- "vertical-text",
2489
- "alias",
2490
- "copy",
2491
- "no-drop",
2492
- "grab",
2493
- "grabbing",
2494
- "all-scroll",
2495
- "col-resize",
2496
- "row-resize",
2497
- "n-resize",
2498
- "e-resize",
2499
- "s-resize",
2500
- "w-resize",
2501
- "ne-resize",
2502
- "nw-resize",
2503
- "se-resize",
2504
- "sw-resize",
2505
- "ew-resize",
2506
- "ns-resize",
2507
- "nesw-resize",
2508
- "nwse-resize",
2509
- "zoom-in",
2510
- "zoom-out",
2511
- isArbitraryValue
2512
- ] }],
2513
- /**
2514
- * Caret Color
2515
- * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
2516
- */
2517
- "caret-color": [{ caret: [colors] }],
2518
- /**
2519
- * Pointer Events
2520
- * @see https://tailwindcss.com/docs/pointer-events
2521
- */
2522
- "pointer-events": [{ "pointer-events": ["none", "auto"] }],
2523
- /**
2524
- * Resize
2525
- * @see https://tailwindcss.com/docs/resize
2526
- */
2527
- resize: [{ resize: [
2528
- "none",
2529
- "y",
2530
- "x",
2531
- ""
2532
- ] }],
2533
- /**
2534
- * Scroll Behavior
2535
- * @see https://tailwindcss.com/docs/scroll-behavior
2536
- */
2537
- "scroll-behavior": [{ scroll: ["auto", "smooth"] }],
2538
- /**
2539
- * Scroll Margin
2540
- * @see https://tailwindcss.com/docs/scroll-margin
2541
- */
2542
- "scroll-m": [{ "scroll-m": getSpacingWithArbitrary() }],
2543
- /**
2544
- * Scroll Margin X
2545
- * @see https://tailwindcss.com/docs/scroll-margin
2546
- */
2547
- "scroll-mx": [{ "scroll-mx": getSpacingWithArbitrary() }],
2548
- /**
2549
- * Scroll Margin Y
2550
- * @see https://tailwindcss.com/docs/scroll-margin
2551
- */
2552
- "scroll-my": [{ "scroll-my": getSpacingWithArbitrary() }],
2553
- /**
2554
- * Scroll Margin Start
2555
- * @see https://tailwindcss.com/docs/scroll-margin
2556
- */
2557
- "scroll-ms": [{ "scroll-ms": getSpacingWithArbitrary() }],
2558
- /**
2559
- * Scroll Margin End
2560
- * @see https://tailwindcss.com/docs/scroll-margin
2561
- */
2562
- "scroll-me": [{ "scroll-me": getSpacingWithArbitrary() }],
2563
- /**
2564
- * Scroll Margin Top
2565
- * @see https://tailwindcss.com/docs/scroll-margin
2566
- */
2567
- "scroll-mt": [{ "scroll-mt": getSpacingWithArbitrary() }],
2568
- /**
2569
- * Scroll Margin Right
2570
- * @see https://tailwindcss.com/docs/scroll-margin
2571
- */
2572
- "scroll-mr": [{ "scroll-mr": getSpacingWithArbitrary() }],
2573
- /**
2574
- * Scroll Margin Bottom
2575
- * @see https://tailwindcss.com/docs/scroll-margin
2576
- */
2577
- "scroll-mb": [{ "scroll-mb": getSpacingWithArbitrary() }],
2578
- /**
2579
- * Scroll Margin Left
2580
- * @see https://tailwindcss.com/docs/scroll-margin
2581
- */
2582
- "scroll-ml": [{ "scroll-ml": getSpacingWithArbitrary() }],
2583
- /**
2584
- * Scroll Padding
2585
- * @see https://tailwindcss.com/docs/scroll-padding
2586
- */
2587
- "scroll-p": [{ "scroll-p": getSpacingWithArbitrary() }],
2588
- /**
2589
- * Scroll Padding X
2590
- * @see https://tailwindcss.com/docs/scroll-padding
2591
- */
2592
- "scroll-px": [{ "scroll-px": getSpacingWithArbitrary() }],
2593
- /**
2594
- * Scroll Padding Y
2595
- * @see https://tailwindcss.com/docs/scroll-padding
2596
- */
2597
- "scroll-py": [{ "scroll-py": getSpacingWithArbitrary() }],
2598
- /**
2599
- * Scroll Padding Start
2600
- * @see https://tailwindcss.com/docs/scroll-padding
2601
- */
2602
- "scroll-ps": [{ "scroll-ps": getSpacingWithArbitrary() }],
2603
- /**
2604
- * Scroll Padding End
2605
- * @see https://tailwindcss.com/docs/scroll-padding
2606
- */
2607
- "scroll-pe": [{ "scroll-pe": getSpacingWithArbitrary() }],
2608
- /**
2609
- * Scroll Padding Top
2610
- * @see https://tailwindcss.com/docs/scroll-padding
2611
- */
2612
- "scroll-pt": [{ "scroll-pt": getSpacingWithArbitrary() }],
2613
- /**
2614
- * Scroll Padding Right
2615
- * @see https://tailwindcss.com/docs/scroll-padding
2616
- */
2617
- "scroll-pr": [{ "scroll-pr": getSpacingWithArbitrary() }],
2618
- /**
2619
- * Scroll Padding Bottom
2620
- * @see https://tailwindcss.com/docs/scroll-padding
2621
- */
2622
- "scroll-pb": [{ "scroll-pb": getSpacingWithArbitrary() }],
2623
- /**
2624
- * Scroll Padding Left
2625
- * @see https://tailwindcss.com/docs/scroll-padding
2626
- */
2627
- "scroll-pl": [{ "scroll-pl": getSpacingWithArbitrary() }],
2628
- /**
2629
- * Scroll Snap Align
2630
- * @see https://tailwindcss.com/docs/scroll-snap-align
2631
- */
2632
- "snap-align": [{ snap: [
2633
- "start",
2634
- "end",
2635
- "center",
2636
- "align-none"
2637
- ] }],
2638
- /**
2639
- * Scroll Snap Stop
2640
- * @see https://tailwindcss.com/docs/scroll-snap-stop
2641
- */
2642
- "snap-stop": [{ snap: ["normal", "always"] }],
2643
- /**
2644
- * Scroll Snap Type
2645
- * @see https://tailwindcss.com/docs/scroll-snap-type
2646
- */
2647
- "snap-type": [{ snap: [
2648
- "none",
2649
- "x",
2650
- "y",
2651
- "both"
2652
- ] }],
2653
- /**
2654
- * Scroll Snap Type Strictness
2655
- * @see https://tailwindcss.com/docs/scroll-snap-type
2656
- */
2657
- "snap-strictness": [{ snap: ["mandatory", "proximity"] }],
2658
- /**
2659
- * Touch Action
2660
- * @see https://tailwindcss.com/docs/touch-action
2661
- */
2662
- touch: [{ touch: [
2663
- "auto",
2664
- "none",
2665
- "manipulation"
2666
- ] }],
2667
- /**
2668
- * Touch Action X
2669
- * @see https://tailwindcss.com/docs/touch-action
2670
- */
2671
- "touch-x": [{ "touch-pan": [
2672
- "x",
2673
- "left",
2674
- "right"
2675
- ] }],
2676
- /**
2677
- * Touch Action Y
2678
- * @see https://tailwindcss.com/docs/touch-action
2679
- */
2680
- "touch-y": [{ "touch-pan": [
2681
- "y",
2682
- "up",
2683
- "down"
2684
- ] }],
2685
- /**
2686
- * Touch Action Pinch Zoom
2687
- * @see https://tailwindcss.com/docs/touch-action
2688
- */
2689
- "touch-pz": ["touch-pinch-zoom"],
2690
- /**
2691
- * User Select
2692
- * @see https://tailwindcss.com/docs/user-select
2693
- */
2694
- select: [{ select: [
2695
- "none",
2696
- "text",
2697
- "all",
2698
- "auto"
2699
- ] }],
2700
- /**
2701
- * Will Change
2702
- * @see https://tailwindcss.com/docs/will-change
2703
- */
2704
- "will-change": [{ "will-change": [
2705
- "auto",
2706
- "scroll",
2707
- "contents",
2708
- "transform",
2709
- isArbitraryValue
2710
- ] }],
2711
- /**
2712
- * Fill
2713
- * @see https://tailwindcss.com/docs/fill
2714
- */
2715
- fill: [{ fill: [colors, "none"] }],
2716
- /**
2717
- * Stroke Width
2718
- * @see https://tailwindcss.com/docs/stroke-width
2719
- */
2720
- "stroke-w": [{ stroke: [
2721
- isLength,
2722
- isArbitraryLength,
2723
- isArbitraryNumber
2724
- ] }],
2725
- /**
2726
- * Stroke
2727
- * @see https://tailwindcss.com/docs/stroke
2728
- */
2729
- stroke: [{ stroke: [colors, "none"] }],
2730
- /**
2731
- * Screen Readers
2732
- * @see https://tailwindcss.com/docs/screen-readers
2733
- */
2734
- sr: ["sr-only", "not-sr-only"],
2735
- /**
2736
- * Forced Color Adjust
2737
- * @see https://tailwindcss.com/docs/forced-color-adjust
2738
- */
2739
- "forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
2740
- },
2741
- conflictingClassGroups: {
2742
- overflow: ["overflow-x", "overflow-y"],
2743
- overscroll: ["overscroll-x", "overscroll-y"],
2744
- inset: [
2745
- "inset-x",
2746
- "inset-y",
2747
- "start",
2748
- "end",
2749
- "top",
2750
- "right",
2751
- "bottom",
2752
- "left"
2753
- ],
2754
- "inset-x": ["right", "left"],
2755
- "inset-y": ["top", "bottom"],
2756
- flex: [
2757
- "basis",
2758
- "grow",
2759
- "shrink"
2760
- ],
2761
- gap: ["gap-x", "gap-y"],
2762
- p: [
2763
- "px",
2764
- "py",
2765
- "ps",
2766
- "pe",
2767
- "pt",
2768
- "pr",
2769
- "pb",
2770
- "pl"
2771
- ],
2772
- px: ["pr", "pl"],
2773
- py: ["pt", "pb"],
2774
- m: [
2775
- "mx",
2776
- "my",
2777
- "ms",
2778
- "me",
2779
- "mt",
2780
- "mr",
2781
- "mb",
2782
- "ml"
2783
- ],
2784
- mx: ["mr", "ml"],
2785
- my: ["mt", "mb"],
2786
- size: ["w", "h"],
2787
- "font-size": ["leading"],
2788
- "fvn-normal": [
2789
- "fvn-ordinal",
2790
- "fvn-slashed-zero",
2791
- "fvn-figure",
2792
- "fvn-spacing",
2793
- "fvn-fraction"
2794
- ],
2795
- "fvn-ordinal": ["fvn-normal"],
2796
- "fvn-slashed-zero": ["fvn-normal"],
2797
- "fvn-figure": ["fvn-normal"],
2798
- "fvn-spacing": ["fvn-normal"],
2799
- "fvn-fraction": ["fvn-normal"],
2800
- "line-clamp": ["display", "overflow"],
2801
- rounded: [
2802
- "rounded-s",
2803
- "rounded-e",
2804
- "rounded-t",
2805
- "rounded-r",
2806
- "rounded-b",
2807
- "rounded-l",
2808
- "rounded-ss",
2809
- "rounded-se",
2810
- "rounded-ee",
2811
- "rounded-es",
2812
- "rounded-tl",
2813
- "rounded-tr",
2814
- "rounded-br",
2815
- "rounded-bl"
2816
- ],
2817
- "rounded-s": ["rounded-ss", "rounded-es"],
2818
- "rounded-e": ["rounded-se", "rounded-ee"],
2819
- "rounded-t": ["rounded-tl", "rounded-tr"],
2820
- "rounded-r": ["rounded-tr", "rounded-br"],
2821
- "rounded-b": ["rounded-br", "rounded-bl"],
2822
- "rounded-l": ["rounded-tl", "rounded-bl"],
2823
- "border-spacing": ["border-spacing-x", "border-spacing-y"],
2824
- "border-w": [
2825
- "border-w-s",
2826
- "border-w-e",
2827
- "border-w-t",
2828
- "border-w-r",
2829
- "border-w-b",
2830
- "border-w-l"
2831
- ],
2832
- "border-w-x": ["border-w-r", "border-w-l"],
2833
- "border-w-y": ["border-w-t", "border-w-b"],
2834
- "border-color": [
2835
- "border-color-s",
2836
- "border-color-e",
2837
- "border-color-t",
2838
- "border-color-r",
2839
- "border-color-b",
2840
- "border-color-l"
2841
- ],
2842
- "border-color-x": ["border-color-r", "border-color-l"],
2843
- "border-color-y": ["border-color-t", "border-color-b"],
2844
- "scroll-m": [
2845
- "scroll-mx",
2846
- "scroll-my",
2847
- "scroll-ms",
2848
- "scroll-me",
2849
- "scroll-mt",
2850
- "scroll-mr",
2851
- "scroll-mb",
2852
- "scroll-ml"
2853
- ],
2854
- "scroll-mx": ["scroll-mr", "scroll-ml"],
2855
- "scroll-my": ["scroll-mt", "scroll-mb"],
2856
- "scroll-p": [
2857
- "scroll-px",
2858
- "scroll-py",
2859
- "scroll-ps",
2860
- "scroll-pe",
2861
- "scroll-pt",
2862
- "scroll-pr",
2863
- "scroll-pb",
2864
- "scroll-pl"
2865
- ],
2866
- "scroll-px": ["scroll-pr", "scroll-pl"],
2867
- "scroll-py": ["scroll-pt", "scroll-pb"],
2868
- touch: [
2869
- "touch-x",
2870
- "touch-y",
2871
- "touch-pz"
2872
- ],
2873
- "touch-x": ["touch"],
2874
- "touch-y": ["touch"],
2875
- "touch-pz": ["touch"]
2876
- },
2877
- conflictingClassGroupModifiers: { "font-size": ["leading"] }
2878
- };
2879
- };
2880
- var twMerge = /*#__PURE__*/ createTailwindMerge(getDefaultConfig);
2881
- //#endregion
2882
- //#region ../ui/src/lib/utils.ts
2883
- /**
2884
- * Internal utilities for UI components.
2885
- *
2886
- * This module is for INTERNAL use only and should NOT be exposed to external consumers.
2887
- * External utilities should be placed in `utils/` instead.
2888
- *
2889
- * @internal
2890
- */
2891
- /**
2892
- * Merges Tailwind CSS class names with conflict resolution.
2893
- * Combines clsx for conditional classes and tailwind-merge for deduplication.
2894
- *
2895
- * @example
2896
- * cn('px-2 py-1', 'px-4') // => 'py-1 px-4'
2897
- * cn('text-red-500', isActive && 'text-blue-500')
2898
- */
2899
- function cn(...inputs) {
2900
- return twMerge(clsx(inputs));
2901
- }
2902
- //#endregion
2903
- //#region ../ui/src/components/primitives/button.tsx
2904
- var buttonVariants = cva(cn("inline-flex items-center justify-center gap-2 whitespace-nowrap", "rounded-md font-normal transition-all", "disabled:pointer-events-none disabled:opacity-40", "shrink-0 outline-none aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_.lucide:not(.lucide-custom)]:text-current [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "data-[busy=true]:cursor-progress data-[busy=true]:opacity-40", "shadow-xs"), {
2905
- variants: {
2906
- variant: {
2907
- default: "bg-neutral-900 text-white hover:bg-neutral-800 focus-visible:bg-neutral-800 dark:bg-neutral-100 dark:text-neutral-900 dark:hover:bg-neutral-200 dark:focus-visible:bg-neutral-200",
2908
- destructive: "bg-destructive text-white hover:bg-destructive-hover focus-visible:bg-destructive-hover",
2909
- outline: "border border-border bg-transparent text-foreground shadow-none hover:bg-accent focus-visible:border-primary focus-visible:bg-accent",
2910
- secondary: "rounded-lg bg-secondary text-secondary-foreground shadow-none hover:bg-secondary-hover focus-visible:bg-secondary-hover",
2911
- /** Dialog primary action style: same color hierarchy as default, with a flatter v2 shell. */
2912
- emphasis: "rounded-lg bg-neutral-900 text-white shadow-none hover:bg-neutral-800 focus-visible:bg-neutral-800 dark:bg-neutral-100 dark:text-neutral-900 dark:hover:bg-neutral-200 dark:focus-visible:bg-neutral-200",
2913
- ghost: "text-neutral-900 shadow-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground dark:text-neutral-100",
2914
- link: "text-neutral-900 underline-offset-4 hover:text-neutral-700 hover:underline focus-visible:text-neutral-700 focus-visible:underline dark:text-neutral-100 dark:hover:text-neutral-300 dark:focus-visible:text-neutral-300"
2915
- },
2916
- size: {
2917
- default: "min-h-7.5 gap-1.5 px-2.5 text-[13px]",
2918
- sm: "min-h-7 gap-1.5 px-2.5 text-xs",
2919
- lg: "min-h-9 px-4 text-sm",
2920
- icon: "size-9",
2921
- "icon-sm": "size-7",
2922
- "icon-lg": "size-10",
2923
- /** Navbar / toolbar icon button: 30px box, 18px icon (8px radius from base). */
2924
- "icon-navbar": "size-[30px] [&_svg]:!size-[18px]"
2925
- }
2926
- },
2927
- defaultVariants: {
2928
- variant: "default",
2929
- size: "default"
2930
- }
2931
- });
2932
- function Button({ className, variant, size, asChild = false, loading = false, loadingIcon, loadingIconClassName, disabled, children, ...props }) {
2933
- const Comp = asChild ? Slot : "button";
2934
- const getSpinnerSize = () => {
2935
- if (size === "icon-sm") return 13;
2936
- if (size === "sm") return 14;
2937
- if (size === "icon-navbar") return 18;
2938
- if (size === "lg" || size === "icon-lg") return 18;
2939
- return 16;
2940
- };
2941
- const defaultLoadingIcon = /* @__PURE__ */ jsx(Loader, {
2942
- className: cn("animate-spin", loadingIconClassName),
2943
- size: getSpinnerSize()
2944
- });
2945
- const spinnerElement = loadingIcon ?? defaultLoadingIcon;
2946
- return /* @__PURE__ */ jsx(Comp, {
2947
- "data-slot": "button",
2948
- "data-variant": variant ?? "default",
2949
- className: cn(buttonVariants({
2950
- variant,
2951
- size,
2952
- className
2953
- })),
2954
- disabled: disabled || loading,
2955
- "aria-busy": loading || void 0,
2956
- "data-busy": loading || void 0,
2957
- ...props,
2958
- children: asChild ? children : /* @__PURE__ */ jsxs(Fragment, { children: [loading && spinnerElement, children] })
2959
- });
2960
- }
2961
- //#endregion
2962
- //#region ../ui/src/components/composites/empty-state/index.tsx
2963
- var EMPTY_ILLUSTRATION_RATIO = 41 / 64;
2964
- /**
2965
- * Unified empty illustrations — soft line drawings with a ground shadow. All
2966
- * colors derive from `currentColor` opacity layers so they adapt to themes.
2967
- * `inbox` is the generic "nothing here"; `book` reads as knowledge/learning.
2968
- */
2969
- function EmptyIllustration({ variant = "inbox", width, className }) {
2970
- return /* @__PURE__ */ jsx("svg", {
2971
- width,
2972
- height: Math.round(width * EMPTY_ILLUSTRATION_RATIO),
2973
- viewBox: "0 0 64 41",
2974
- className,
2975
- "aria-hidden": "true",
2976
- children: variant === "book" ? /* @__PURE__ */ jsxs("g", {
2977
- transform: "translate(0 1)",
2978
- fill: "none",
2979
- fillRule: "evenodd",
2980
- children: [
2981
- /* @__PURE__ */ jsx("ellipse", {
2982
- fill: "currentColor",
2983
- fillOpacity: .08,
2984
- cx: "32",
2985
- cy: "33",
2986
- rx: "28",
2987
- ry: "6.5"
2988
- }),
2989
- /* @__PURE__ */ jsxs("g", {
2990
- stroke: "currentColor",
2991
- strokeOpacity: .4,
2992
- strokeLinejoin: "round",
2993
- children: [
2994
- /* @__PURE__ */ jsx("path", {
2995
- fill: "currentColor",
2996
- fillOpacity: .05,
2997
- d: "M32 10.5 11 6.5v18.2L32 30.5Z"
2998
- }),
2999
- /* @__PURE__ */ jsx("path", {
3000
- fill: "currentColor",
3001
- fillOpacity: .05,
3002
- d: "M32 10.5 53 6.5v18.2L32 30.5Z"
3003
- }),
3004
- /* @__PURE__ */ jsx("path", { d: "M32 10.5v20" })
3005
- ]
3006
- }),
3007
- /* @__PURE__ */ jsx("path", {
3008
- fill: "currentColor",
3009
- fillOpacity: .35,
3010
- d: "m55.5 0 1.3 2.8 2.8 1.3-2.8 1.3-1.3 2.8-1.3-2.8-2.8-1.3 2.8-1.3Z"
3011
- })
3012
- ]
3013
- }) : /* @__PURE__ */ jsxs("g", {
3014
- transform: "translate(0 1)",
3015
- fill: "none",
3016
- fillRule: "evenodd",
3017
- children: [/* @__PURE__ */ jsx("ellipse", {
3018
- fill: "currentColor",
3019
- fillOpacity: .08,
3020
- cx: "32",
3021
- cy: "33",
3022
- rx: "32",
3023
- ry: "7"
3024
- }), /* @__PURE__ */ jsxs("g", {
3025
- fillRule: "nonzero",
3026
- stroke: "currentColor",
3027
- strokeOpacity: .4,
3028
- children: [/* @__PURE__ */ jsx("path", { d: "M55 12.76 44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z" }), /* @__PURE__ */ jsx("path", {
3029
- fill: "currentColor",
3030
- fillOpacity: .05,
3031
- d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
3032
- })]
3033
- })]
3034
- })
3035
- });
3036
- }
3037
- function EmptyState({ illustration = "inbox", icon: IconOverride, title, description, actionLabel, onAction, secondaryLabel, onSecondary, compact = false, className }) {
3038
- const Icon = IconOverride;
3039
- const buttonSize = compact ? "sm" : "default";
3040
- return /* @__PURE__ */ jsxs("div", {
3041
- className: cn("flex flex-col items-center justify-center text-center", compact ? "px-4 py-8" : "flex-1 px-6 py-12", className),
3042
- children: [
3043
- Icon ? /* @__PURE__ */ jsx(Icon, {
3044
- size: compact ? 28 : 40,
3045
- strokeWidth: 1.5,
3046
- className: cn("text-muted-foreground", compact ? "mb-3" : "mb-4")
3047
- }) : /* @__PURE__ */ jsx(EmptyIllustration, {
3048
- variant: illustration,
3049
- width: compact ? 48 : 64,
3050
- className: cn("text-muted-foreground", compact ? "mb-3" : "mb-4")
3051
- }),
3052
- title && /* @__PURE__ */ jsx("h3", {
3053
- className: cn("font-normal text-muted-foreground", compact ? "text-xs" : "text-sm", description ? "mb-1.5" : actionLabel || secondaryLabel ? compact ? "mb-3" : "mb-5" : ""),
3054
- children: title
3055
- }),
3056
- description && /* @__PURE__ */ jsx("p", {
3057
- className: cn("text-muted-foreground", compact ? "mb-3 max-w-xs text-xs" : "mb-5 max-w-md text-xs leading-relaxed"),
3058
- children: description
3059
- }),
3060
- (actionLabel || secondaryLabel) && /* @__PURE__ */ jsxs("div", {
3061
- className: "flex items-center gap-2",
3062
- children: [actionLabel && onAction && /* @__PURE__ */ jsx(Button, {
3063
- variant: "outline",
3064
- size: buttonSize,
3065
- onClick: onAction,
3066
- children: actionLabel
3067
- }), secondaryLabel && onSecondary && /* @__PURE__ */ jsx(Button, {
3068
- variant: "ghost",
3069
- size: buttonSize,
3070
- onClick: onSecondary,
3071
- children: secondaryLabel
3072
- })]
3073
- })
3074
- ]
3075
- });
3076
- }
3077
6
  typeof window !== "undefined" && window.document && window.document.createElement;
3078
7
  function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
3079
8
  return function handleEvent(event) {
@@ -3169,7 +98,7 @@ var Primitive = [
3169
98
  "svg",
3170
99
  "ul"
3171
100
  ].reduce((primitive, node) => {
3172
- const Slot = /* @__PURE__ */ createSlot(`Primitive.${node}`);
101
+ const Slot = createSlot(`Primitive.${node}`);
3173
102
  const Node = React$1.forwardRef((props, forwardedRef) => {
3174
103
  const { asChild, ...primitiveProps } = props;
3175
104
  const Comp = asChild ? Slot : node;
@@ -5213,10 +2142,11 @@ var PopperAnchor = React$1.forwardRef((props, forwardedRef) => {
5213
2142
  const context = usePopperContext(ANCHOR_NAME, __scopePopper);
5214
2143
  const ref = React$1.useRef(null);
5215
2144
  const onAnchorChange = context.onAnchorChange;
5216
- const composedRefs = useComposedRefs(forwardedRef, React$1.useCallback((node) => {
2145
+ const callbackRef = React$1.useCallback((node) => {
5217
2146
  ref.current = node;
5218
2147
  if (node) onAnchorChange(node);
5219
- }, [onAnchorChange]));
2148
+ }, [onAnchorChange]);
2149
+ const composedRefs = useComposedRefs(forwardedRef, callbackRef);
5220
2150
  const anchorRef = React$1.useRef(null);
5221
2151
  React$1.useEffect(() => {
5222
2152
  if (!virtualRef) return;
@@ -5683,222 +2613,6 @@ function useDialogPortalContainer() {
5683
2613
  return React$1.use(DialogPortalContainerContext);
5684
2614
  }
5685
2615
  //#endregion
5686
- //#region ../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/function/debounce.mjs
5687
- /**
5688
- * Creates a debounced function that delays invoking the provided function until after `debounceMs` milliseconds
5689
- * have elapsed since the last time the debounced function was invoked. The debounced function also has a `cancel`
5690
- * method to cancel any pending execution.
5691
- *
5692
- * @template F - The type of function.
5693
- * @param func - The function to debounce.
5694
- * @param debounceMs - The number of milliseconds to delay.
5695
- * @param options - The options object
5696
- * @param options.signal - An optional AbortSignal to cancel the debounced function.
5697
- * @param options.edges - An optional array specifying whether the function should be invoked on the leading edge, trailing edge, or both.
5698
- * @returns A new debounced function with a `cancel` method.
5699
- *
5700
- * @example
5701
- * const debouncedFunction = debounce(() => {
5702
- * console.log('Function executed');
5703
- * }, 1000);
5704
- *
5705
- * // Will log 'Function executed' after 1 second if not called again in that time
5706
- * debouncedFunction();
5707
- *
5708
- * // Will not log anything as the previous call is canceled
5709
- * debouncedFunction.cancel();
5710
- *
5711
- * // With AbortSignal
5712
- * const controller = new AbortController();
5713
- * const signal = controller.signal;
5714
- * const debouncedWithSignal = debounce(() => {
5715
- * console.log('Function executed');
5716
- * }, 1000, { signal });
5717
- *
5718
- * debouncedWithSignal();
5719
- *
5720
- * // Will cancel the debounced function call
5721
- * controller.abort();
5722
- */
5723
- function debounce$1(func, debounceMs, { signal, edges } = {}) {
5724
- let pendingThis = void 0;
5725
- let pendingArgs = null;
5726
- const leading = edges != null && edges.includes("leading");
5727
- const trailing = edges == null || edges.includes("trailing");
5728
- const invoke = () => {
5729
- if (pendingArgs !== null) {
5730
- func.apply(pendingThis, pendingArgs);
5731
- pendingThis = void 0;
5732
- pendingArgs = null;
5733
- }
5734
- };
5735
- const onTimerEnd = () => {
5736
- if (trailing) invoke();
5737
- cancel();
5738
- };
5739
- let timeoutId = null;
5740
- const schedule = () => {
5741
- if (timeoutId != null) clearTimeout(timeoutId);
5742
- timeoutId = setTimeout(() => {
5743
- timeoutId = null;
5744
- onTimerEnd();
5745
- }, debounceMs);
5746
- };
5747
- const cancelTimer = () => {
5748
- if (timeoutId !== null) {
5749
- clearTimeout(timeoutId);
5750
- timeoutId = null;
5751
- }
5752
- };
5753
- const cancel = () => {
5754
- cancelTimer();
5755
- pendingThis = void 0;
5756
- pendingArgs = null;
5757
- };
5758
- const flush = () => {
5759
- invoke();
5760
- };
5761
- const debounced = function(...args) {
5762
- if (signal?.aborted) return;
5763
- pendingThis = this;
5764
- pendingArgs = args;
5765
- const isFirstCall = timeoutId == null;
5766
- schedule();
5767
- if (leading && isFirstCall) invoke();
5768
- };
5769
- debounced.schedule = schedule;
5770
- debounced.cancel = cancel;
5771
- debounced.flush = flush;
5772
- signal?.addEventListener("abort", cancel, { once: true });
5773
- return debounced;
5774
- }
5775
- //#endregion
5776
- //#region ../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/compat/function/debounce.mjs
5777
- function debounce(func, debounceMs = 0, options = {}) {
5778
- if (typeof options !== "object") options = {};
5779
- const { leading = false, trailing = true, maxWait } = options;
5780
- const edges = Array(2);
5781
- if (leading) edges[0] = "leading";
5782
- if (trailing) edges[1] = "trailing";
5783
- let result = void 0;
5784
- let pendingAt = null;
5785
- const _debounced = debounce$1(function(...args) {
5786
- result = func.apply(this, args);
5787
- pendingAt = null;
5788
- }, debounceMs, { edges });
5789
- const debounced = function(...args) {
5790
- if (maxWait != null) {
5791
- if (pendingAt === null) pendingAt = Date.now();
5792
- if (Date.now() - pendingAt >= maxWait) {
5793
- result = func.apply(this, args);
5794
- pendingAt = Date.now();
5795
- _debounced.cancel();
5796
- _debounced.schedule();
5797
- return result;
5798
- }
5799
- }
5800
- _debounced.apply(this, args);
5801
- return result;
5802
- };
5803
- const flush = () => {
5804
- _debounced.flush();
5805
- return result;
5806
- };
5807
- debounced.cancel = _debounced.cancel;
5808
- debounced.flush = flush;
5809
- return debounced;
5810
- }
5811
- //#endregion
5812
- //#region ../../node_modules/.pnpm/es-toolkit@1.49.0/node_modules/es-toolkit/dist/compat/function/throttle.mjs
5813
- /**
5814
- * Creates a throttled function that only invokes the provided function at most once
5815
- * per every `throttleMs` milliseconds. Subsequent calls to the throttled function
5816
- * within the wait time will not trigger the execution of the original function.
5817
- *
5818
- * @template F - The type of function.
5819
- * @param func - The function to throttle.
5820
- * @param throttleMs - The number of milliseconds to throttle executions to.
5821
- * @param options - The options object
5822
- * @param options.signal - An optional AbortSignal to cancel the throttled function.
5823
- * @param options.leading - If `true`, the function will be invoked on the leading edge of the timeout.
5824
- * @param options.trailing - If `true`, the function will be invoked on the trailing edge of the timeout.
5825
- * @returns A new throttled function that accepts the same parameters as the original function.
5826
- *
5827
- * @example
5828
- * const throttledFunction = throttle(() => {
5829
- * console.log('Function executed');
5830
- * }, 1000);
5831
- *
5832
- * // Will log 'Function executed' immediately
5833
- * throttledFunction();
5834
- *
5835
- * // Will not log anything as it is within the throttle time
5836
- * throttledFunction();
5837
- *
5838
- * // After 1 second
5839
- * setTimeout(() => {
5840
- * throttledFunction(); // Will log 'Function executed'
5841
- * }, 1000);
5842
- */
5843
- function throttle(func, throttleMs = 0, options = {}) {
5844
- const { leading = true, trailing = true } = options;
5845
- return debounce(func, throttleMs, {
5846
- leading,
5847
- maxWait: throttleMs,
5848
- trailing
5849
- });
5850
- }
5851
- //#endregion
5852
- //#region ../ui/src/components/composites/scrollbar/index.tsx
5853
- var Scrollbar = ({ ref, autoHideScrollbar = true, children, className, onScroll: externalOnScroll, style, showOnHover = false, ...htmlProps }) => {
5854
- const [isScrolling, setIsScrolling] = React$1.useState(false);
5855
- const timeoutRef = React$1.useRef(null);
5856
- const clearScrollingTimeout = React$1.useCallback(() => {
5857
- if (timeoutRef.current) {
5858
- clearTimeout(timeoutRef.current);
5859
- timeoutRef.current = null;
5860
- }
5861
- }, []);
5862
- const handleScroll = React$1.useCallback(() => {
5863
- if (!autoHideScrollbar) return;
5864
- setIsScrolling(true);
5865
- clearScrollingTimeout();
5866
- timeoutRef.current = setTimeout(() => {
5867
- setIsScrolling(false);
5868
- timeoutRef.current = null;
5869
- }, 1500);
5870
- }, [autoHideScrollbar, clearScrollingTimeout]);
5871
- const throttledInternalScrollHandler = React$1.useMemo(() => throttle(handleScroll, 100, {
5872
- leading: true,
5873
- trailing: true
5874
- }), [handleScroll]);
5875
- const combinedOnScroll = React$1.useCallback(() => {
5876
- throttledInternalScrollHandler();
5877
- externalOnScroll?.();
5878
- }, [externalOnScroll, throttledInternalScrollHandler]);
5879
- React$1.useEffect(() => {
5880
- return () => {
5881
- clearScrollingTimeout();
5882
- throttledInternalScrollHandler.cancel();
5883
- };
5884
- }, [clearScrollingTimeout, throttledInternalScrollHandler]);
5885
- const isScrollbarVisible = !autoHideScrollbar || isScrolling;
5886
- const useHoverVisibility = showOnHover && autoHideScrollbar;
5887
- return /* @__PURE__ */ jsx("div", {
5888
- ...htmlProps,
5889
- ref,
5890
- className: cn("[scrollbar-gutter:stable] overflow-y-auto", useHoverVisibility && "[scrollbar-color:transparent_transparent] hover:[scrollbar-color:var(--scrollbar-thumb-hover)_transparent] data-[scrolling=true]:[scrollbar-color:var(--scrollbar-thumb)_transparent]", !useHoverVisibility && "[&::-webkit-scrollbar-thumb]:transition-[background] [&::-webkit-scrollbar-thumb]:duration-[2000ms] [&::-webkit-scrollbar-thumb:hover]:bg-[var(--scrollbar-thumb-hover)]", !useHoverVisibility && (isScrollbarVisible ? "[&::-webkit-scrollbar-thumb]:bg-[var(--scrollbar-thumb)]" : "[&::-webkit-scrollbar-thumb]:bg-transparent"), className),
5891
- "data-scrolling": isScrolling ? "true" : "false",
5892
- onScroll: combinedOnScroll,
5893
- style: {
5894
- ...style,
5895
- ...!useHoverVisibility && { scrollbarColor: isScrollbarVisible ? "var(--scrollbar-thumb) transparent" : "transparent transparent" }
5896
- },
5897
- children
5898
- });
5899
- };
5900
- Scrollbar.displayName = "Scrollbar";
5901
- //#endregion
5902
2616
  //#region ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.7_@types+react-dom@19.2.3_@types+react@19.2.7__@typ_9ef071bfc3489950acbee1603d5552b2/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
5903
2617
  var VISUALLY_HIDDEN_STYLES = Object.freeze({
5904
2618
  position: "absolute",
@@ -6057,7 +2771,8 @@ var TooltipTrigger$1 = React$1.forwardRef((props, forwardedRef) => {
6057
2771
  const context = useTooltipContext(TRIGGER_NAME, __scopeTooltip);
6058
2772
  const providerContext = useTooltipProviderContext(TRIGGER_NAME, __scopeTooltip);
6059
2773
  const popperScope = usePopperScope(__scopeTooltip);
6060
- const composedRefs = useComposedRefs(forwardedRef, React$1.useRef(null), context.onTriggerChange);
2774
+ const ref = React$1.useRef(null);
2775
+ const composedRefs = useComposedRefs(forwardedRef, ref, context.onTriggerChange);
6061
2776
  const isPointerDownRef = React$1.useRef(false);
6062
2777
  const hasPointerMoveOpenedRef = React$1.useRef(false);
6063
2778
  const handlePointerUp = React$1.useCallback(() => isPointerDownRef.current = false, []);
@@ -6211,7 +2926,7 @@ var TooltipContentHoverable = React$1.forwardRef((props, forwardedRef) => {
6211
2926
  });
6212
2927
  });
6213
2928
  var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });
6214
- var Slottable = /* @__PURE__ */ createSlottable("TooltipContent");
2929
+ var Slottable = createSlottable("TooltipContent");
6215
2930
  var TooltipContentImpl = React$1.forwardRef((props, forwardedRef) => {
6216
2931
  const { __scopeTooltip, children, "aria-label": ariaLabel, onEscapeKeyDown, onPointerDownOutside, ...contentProps } = props;
6217
2932
  const context = useTooltipContext(CONTENT_NAME, __scopeTooltip);
@@ -6696,108 +3411,6 @@ var Tooltip = ({ children, content, title, placement, delay = 0, sideOffset = 8,
6696
3411
  });
6697
3412
  };
6698
3413
  //#endregion
6699
- //#region src/FilePreviewToolbar.tsx
6700
- var FilePreviewToolbarPortalContext = createContext(void 0);
6701
- function FilePreviewToolbarPortalProvider({ children }) {
6702
- const [target, setTarget] = useState(null);
6703
- const value = useMemo(() => ({
6704
- setTarget,
6705
- target
6706
- }), [target]);
6707
- return /* @__PURE__ */ jsx(FilePreviewToolbarPortalContext, {
6708
- value,
6709
- children
6710
- });
6711
- }
6712
- function FilePreviewToolbarPortalHost() {
6713
- const context = use(FilePreviewToolbarPortalContext);
6714
- return /* @__PURE__ */ jsx("div", {
6715
- ref: context?.setTarget,
6716
- "data-testid": "file-preview-toolbar-host",
6717
- className: "ml-3 flex max-w-[70%] min-w-0 items-center justify-end overflow-x-auto"
6718
- });
6719
- }
6720
- function FilePreviewToolbar({ "aria-label": ariaLabel, children }) {
6721
- const context = use(FilePreviewToolbarPortalContext);
6722
- if (context && !context.target) return null;
6723
- const toolbar = context ? /* @__PURE__ */ jsx("div", {
6724
- role: "toolbar",
6725
- "aria-label": ariaLabel,
6726
- className: "flex min-w-max shrink-0 items-center justify-end gap-1",
6727
- children
6728
- }) : /* @__PURE__ */ jsx("div", {
6729
- role: "toolbar",
6730
- "aria-label": ariaLabel,
6731
- className: "relative flex h-11 min-h-11 shrink-0 items-center overflow-x-auto px-3 after:pointer-events-none after:absolute after:right-3 after:bottom-0 after:left-3 after:border-b after:border-border after:content-['']",
6732
- children: /* @__PURE__ */ jsx("div", {
6733
- className: "mx-auto flex min-w-max shrink-0 items-center justify-center gap-1",
6734
- children
6735
- })
6736
- });
6737
- return context?.target ? createPortal(toolbar, context.target) : toolbar;
6738
- }
6739
- //#endregion
6740
- //#region src/previewContext.ts
6741
- var PreviewHostContext = createContext({});
6742
- function usePreviewHost() {
6743
- return use(PreviewHostContext);
6744
- }
6745
- function usePreviewLogger(context) {
6746
- const { onDiagnostic } = usePreviewHost();
6747
- return useMemo(() => ({
6748
- error: (message, detail, code) => onDiagnostic?.({
6749
- code,
6750
- level: "error",
6751
- context,
6752
- message,
6753
- detail
6754
- }),
6755
- warn: (message, detail) => onDiagnostic?.({
6756
- level: "warn",
6757
- context,
6758
- message,
6759
- detail
6760
- })
6761
- }), [context, onDiagnostic]);
6762
- }
6763
- //#endregion
6764
- //#region src/FilePreviewLayout.tsx
6765
- function FilePreviewFrame({ children }) {
6766
- return /* @__PURE__ */ jsx("div", {
6767
- "data-ui": "file-preview.view",
6768
- className: "flex h-full min-h-0 w-full flex-col overflow-hidden bg-transparent text-foreground",
6769
- children
6770
- });
6771
- }
6772
- function FilePreviewContent({ children, composerInset = true, scrollsInternally = false }) {
6773
- const { options } = usePreviewHost();
6774
- const reserveInset = composerInset && !(scrollsInternally && options?.bottomInset === "content");
6775
- return /* @__PURE__ */ jsx(Scrollbar, {
6776
- "data-testid": "file-preview-content",
6777
- className: cn("min-h-0 flex-1 [scrollbar-gutter:auto]", reserveInset && "pb-[var(--file-preview-bottom-inset,0px)]"),
6778
- children
6779
- });
6780
- }
6781
- function FilePreviewShell({ children, header }) {
6782
- if (header === void 0) return children;
6783
- return /* @__PURE__ */ jsx(FilePreviewToolbarPortalProvider, { children: /* @__PURE__ */ jsxs(FilePreviewFrame, { children: [/* @__PURE__ */ jsxs("div", {
6784
- "data-testid": "file-preview-header",
6785
- className: "relative flex h-11 min-h-11 shrink-0 items-center px-3 after:pointer-events-none after:absolute after:right-3 after:bottom-0 after:left-3 after:border-b after:border-border after:content-['']",
6786
- children: [/* @__PURE__ */ jsx("div", {
6787
- className: "flex min-w-0 flex-1 items-center gap-2",
6788
- children: header
6789
- }), /* @__PURE__ */ jsx(FilePreviewToolbarPortalHost, {})]
6790
- }), /* @__PURE__ */ jsx("div", {
6791
- className: "min-h-0 flex-1 overflow-hidden",
6792
- children
6793
- })] }) });
6794
- }
6795
- var FilePreviewLayout = {
6796
- Frame: FilePreviewFrame,
6797
- Content: FilePreviewContent,
6798
- Shell: FilePreviewShell
6799
- };
6800
- //#endregion
6801
3414
  //#region src/FilePreviewToolbarButton.tsx
6802
3415
  function FilePreviewToolbarButton({ children, disabled, label, onClick, pressed }) {
6803
3416
  return /* @__PURE__ */ jsx(Tooltip, {
@@ -6817,240 +3430,4 @@ function FilePreviewToolbarButton({ children, disabled, label, onClick, pressed
6817
3430
  });
6818
3431
  }
6819
3432
  //#endregion
6820
- //#region ../../node_modules/.pnpm/react-i18next@14.1.3_i18next@23.16.8_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/react-i18next/dist/es/utils.js
6821
- function warn() {
6822
- if (console && console.warn) {
6823
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
6824
- if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;
6825
- console.warn(...args);
6826
- }
6827
- }
6828
- var alreadyWarned = {};
6829
- function warnOnce() {
6830
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) args[_key2] = arguments[_key2];
6831
- if (isString(args[0]) && alreadyWarned[args[0]]) return;
6832
- if (isString(args[0])) alreadyWarned[args[0]] = /* @__PURE__ */ new Date();
6833
- warn(...args);
6834
- }
6835
- var loadedClb = (i18n, cb) => () => {
6836
- if (i18n.isInitialized) cb();
6837
- else {
6838
- const initialized = () => {
6839
- setTimeout(() => {
6840
- i18n.off("initialized", initialized);
6841
- }, 0);
6842
- cb();
6843
- };
6844
- i18n.on("initialized", initialized);
6845
- }
6846
- };
6847
- var loadNamespaces = (i18n, ns, cb) => {
6848
- i18n.loadNamespaces(ns, loadedClb(i18n, cb));
6849
- };
6850
- var loadLanguages = (i18n, lng, ns, cb) => {
6851
- if (isString(ns)) ns = [ns];
6852
- ns.forEach((n) => {
6853
- if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);
6854
- });
6855
- i18n.loadLanguages(lng, loadedClb(i18n, cb));
6856
- };
6857
- var oldI18nextHasLoadedNamespace = function(ns, i18n) {
6858
- let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
6859
- const lng = i18n.languages[0];
6860
- const fallbackLng = i18n.options ? i18n.options.fallbackLng : false;
6861
- const lastLng = i18n.languages[i18n.languages.length - 1];
6862
- if (lng.toLowerCase() === "cimode") return true;
6863
- const loadNotPending = (l, n) => {
6864
- const loadState = i18n.services.backendConnector.state[`${l}|${n}`];
6865
- return loadState === -1 || loadState === 2;
6866
- };
6867
- if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18n.services.backendConnector.backend && i18n.isLanguageChangingTo && !loadNotPending(i18n.isLanguageChangingTo, ns)) return false;
6868
- if (i18n.hasResourceBundle(lng, ns)) return true;
6869
- if (!i18n.services.backendConnector.backend || i18n.options.resources && !i18n.options.partialBundledLanguages) return true;
6870
- if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;
6871
- return false;
6872
- };
6873
- var hasLoadedNamespace = function(ns, i18n) {
6874
- let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
6875
- if (!i18n.languages || !i18n.languages.length) {
6876
- warnOnce("i18n.languages were undefined or empty", i18n.languages);
6877
- return true;
6878
- }
6879
- if (!(i18n.options.ignoreJSONStructure !== void 0)) return oldI18nextHasLoadedNamespace(ns, i18n, options);
6880
- return i18n.hasLoadedNamespace(ns, {
6881
- lng: options.lng,
6882
- precheck: (i18nInstance, loadNotPending) => {
6883
- if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18nInstance.services.backendConnector.backend && i18nInstance.isLanguageChangingTo && !loadNotPending(i18nInstance.isLanguageChangingTo, ns)) return false;
6884
- }
6885
- });
6886
- };
6887
- var isString = (obj) => typeof obj === "string";
6888
- var isObject = (obj) => typeof obj === "object" && obj !== null;
6889
- //#endregion
6890
- //#region ../../node_modules/.pnpm/react-i18next@14.1.3_i18next@23.16.8_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/react-i18next/dist/es/unescape.js
6891
- var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
6892
- var htmlEntities = {
6893
- "&amp;": "&",
6894
- "&#38;": "&",
6895
- "&lt;": "<",
6896
- "&#60;": "<",
6897
- "&gt;": ">",
6898
- "&#62;": ">",
6899
- "&apos;": "'",
6900
- "&#39;": "'",
6901
- "&quot;": "\"",
6902
- "&#34;": "\"",
6903
- "&nbsp;": " ",
6904
- "&#160;": " ",
6905
- "&copy;": "©",
6906
- "&#169;": "©",
6907
- "&reg;": "®",
6908
- "&#174;": "®",
6909
- "&hellip;": "…",
6910
- "&#8230;": "…",
6911
- "&#x2F;": "/",
6912
- "&#47;": "/"
6913
- };
6914
- var unescapeHtmlEntity = (m) => htmlEntities[m];
6915
- var unescape = (text) => text.replace(matchHtmlEntity, unescapeHtmlEntity);
6916
- //#endregion
6917
- //#region ../../node_modules/.pnpm/react-i18next@14.1.3_i18next@23.16.8_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/react-i18next/dist/es/defaults.js
6918
- var defaultOptions = {
6919
- bindI18n: "languageChanged",
6920
- bindI18nStore: "",
6921
- transEmptyNodeValue: "",
6922
- transSupportBasicHtmlNodes: true,
6923
- transWrapTextNodes: "",
6924
- transKeepBasicHtmlNodesFor: [
6925
- "br",
6926
- "strong",
6927
- "i",
6928
- "p"
6929
- ],
6930
- useSuspense: true,
6931
- unescape
6932
- };
6933
- var getDefaults = () => defaultOptions;
6934
- //#endregion
6935
- //#region ../../node_modules/.pnpm/react-i18next@14.1.3_i18next@23.16.8_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/react-i18next/dist/es/i18nInstance.js
6936
- var i18nInstance;
6937
- var getI18n = () => i18nInstance;
6938
- //#endregion
6939
- //#region ../../node_modules/.pnpm/react-i18next@14.1.3_i18next@23.16.8_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/react-i18next/dist/es/context.js
6940
- var I18nContext = createContext();
6941
- var ReportNamespaces = class {
6942
- constructor() {
6943
- this.usedNamespaces = {};
6944
- }
6945
- addUsedNamespaces(namespaces) {
6946
- namespaces.forEach((ns) => {
6947
- if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;
6948
- });
6949
- }
6950
- getUsedNamespaces = () => Object.keys(this.usedNamespaces);
6951
- };
6952
- //#endregion
6953
- //#region ../../node_modules/.pnpm/react-i18next@14.1.3_i18next@23.16.8_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/react-i18next/dist/es/useTranslation.js
6954
- var usePrevious = (value, ignore) => {
6955
- const ref = useRef();
6956
- useEffect(() => {
6957
- ref.current = ignore ? ref.current : value;
6958
- }, [value, ignore]);
6959
- return ref.current;
6960
- };
6961
- var alwaysNewT = (i18n, language, namespace, keyPrefix) => i18n.getFixedT(language, namespace, keyPrefix);
6962
- var useMemoizedT = (i18n, language, namespace, keyPrefix) => useCallback(alwaysNewT(i18n, language, namespace, keyPrefix), [
6963
- i18n,
6964
- language,
6965
- namespace,
6966
- keyPrefix
6967
- ]);
6968
- var useTranslation = function(ns) {
6969
- let props = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6970
- const { i18n: i18nFromProps } = props;
6971
- const { i18n: i18nFromContext, defaultNS: defaultNSFromContext } = useContext(I18nContext) || {};
6972
- const i18n = i18nFromProps || i18nFromContext || getI18n();
6973
- if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
6974
- if (!i18n) {
6975
- warnOnce("You will need to pass in an i18next instance by using initReactI18next");
6976
- const notReadyT = (k, optsOrDefaultValue) => {
6977
- if (isString(optsOrDefaultValue)) return optsOrDefaultValue;
6978
- if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;
6979
- return Array.isArray(k) ? k[k.length - 1] : k;
6980
- };
6981
- const retNotReady = [
6982
- notReadyT,
6983
- {},
6984
- false
6985
- ];
6986
- retNotReady.t = notReadyT;
6987
- retNotReady.i18n = {};
6988
- retNotReady.ready = false;
6989
- return retNotReady;
6990
- }
6991
- if (i18n.options.react && i18n.options.react.wait !== void 0) warnOnce("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
6992
- const i18nOptions = {
6993
- ...getDefaults(),
6994
- ...i18n.options.react,
6995
- ...props
6996
- };
6997
- const { useSuspense, keyPrefix } = i18nOptions;
6998
- let namespaces = ns || defaultNSFromContext || i18n.options && i18n.options.defaultNS;
6999
- namespaces = isString(namespaces) ? [namespaces] : namespaces || ["translation"];
7000
- if (i18n.reportNamespaces.addUsedNamespaces) i18n.reportNamespaces.addUsedNamespaces(namespaces);
7001
- const ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every((n) => hasLoadedNamespace(n, i18n, i18nOptions));
7002
- const memoGetT = useMemoizedT(i18n, props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
7003
- const getT = () => memoGetT;
7004
- const getNewT = () => alwaysNewT(i18n, props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
7005
- const [t, setT] = useState(getT);
7006
- let joinedNS = namespaces.join();
7007
- if (props.lng) joinedNS = `${props.lng}${joinedNS}`;
7008
- const previousJoinedNS = usePrevious(joinedNS);
7009
- const isMounted = useRef(true);
7010
- useEffect(() => {
7011
- const { bindI18n, bindI18nStore } = i18nOptions;
7012
- isMounted.current = true;
7013
- if (!ready && !useSuspense) {
7014
- if (props.lng) loadLanguages(i18n, props.lng, namespaces, () => {
7015
- if (isMounted.current) setT(getNewT);
7016
- });
7017
- else loadNamespaces(i18n, namespaces, () => {
7018
- if (isMounted.current) setT(getNewT);
7019
- });
7020
- }
7021
- if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) setT(getNewT);
7022
- const boundReset = () => {
7023
- if (isMounted.current) setT(getNewT);
7024
- };
7025
- if (bindI18n && i18n) i18n.on(bindI18n, boundReset);
7026
- if (bindI18nStore && i18n) i18n.store.on(bindI18nStore, boundReset);
7027
- return () => {
7028
- isMounted.current = false;
7029
- if (bindI18n && i18n) bindI18n.split(" ").forEach((e) => i18n.off(e, boundReset));
7030
- if (bindI18nStore && i18n) bindI18nStore.split(" ").forEach((e) => i18n.store.off(e, boundReset));
7031
- };
7032
- }, [i18n, joinedNS]);
7033
- useEffect(() => {
7034
- if (isMounted.current && ready) setT(getT);
7035
- }, [
7036
- i18n,
7037
- keyPrefix,
7038
- ready
7039
- ]);
7040
- const ret = [
7041
- t,
7042
- i18n,
7043
- ready
7044
- ];
7045
- ret.t = t;
7046
- ret.i18n = i18n;
7047
- ret.ready = ready;
7048
- if (ready) return ret;
7049
- if (!ready && !useSuspense) return ret;
7050
- throw new Promise((resolve) => {
7051
- if (props.lng) loadLanguages(i18n, props.lng, namespaces, () => resolve());
7052
- else loadNamespaces(i18n, namespaces, () => resolve());
7053
- });
7054
- };
7055
- //#endregion
7056
- export { dispatchDiscreteCustomEvent as A, createSlot as B, createPopperScope as C, useDismissableLayerSurface as D, DismissableLayer as E, cn as F, LoaderCircle as I, FileWarning as L, composeEventHandlers as M, EmptyState as N, useCallbackRef as O, Button as P, createLucideIcon as R, Root2 as S, useLayoutEffect2 as T, useComposedRefs as V, Presence as _, PreviewHostContext as a, Arrow as b, FilePreviewToolbar as c, Scrollbar as d, DialogPortalContainerProvider as f, useControllableState as g, usePortalContainer as h, FilePreviewLayout as i, createContextScope as j, Primitive as k, FilePreviewToolbarPortalHost as l, useDialogPortalContainer as m, I18nContext as n, usePreviewHost as o, PortalContainerProvider as p, FilePreviewToolbarButton as r, usePreviewLogger as s, useTranslation as t, FilePreviewToolbarPortalProvider as u, Portal$1 as v, useId$1 as w, Content as x, Anchor as y, cva as z };
3433
+ export { composeEventHandlers as S, useDismissableLayerSurface as _, usePortalContainer as a, dispatchDiscreteCustomEvent as b, Portal$1 as c, Content as d, Root2 as f, DismissableLayer as g, useLayoutEffect2 as h, useDialogPortalContainer as i, Anchor as l, useId$1 as m, DialogPortalContainerProvider as n, useControllableState as o, createPopperScope as p, PortalContainerProvider as r, Presence as s, FilePreviewToolbarButton as t, Arrow as u, useCallbackRef as v, createContextScope as x, Primitive as y };