@fuf-stack/pixel-utils 1.4.1 → 2.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -4
- package/dist/index.d.mts +45 -706
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +128 -10
- package/dist/index.mjs.map +1 -1
- package/dist/tokens.css +574 -0
- package/package.json +8 -8
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/cn.ts","../src/isTestEnvironment.ts","../../../node_modules/.pnpm/tailwind-merge@3.7.0/node_modules/tailwind-merge/dist/types.d.ts","../src/proseTwMerge.ts","../src/slugify.ts","../../../node_modules/.pnpm/tailwind-variants@3.2.2_tailwind-merge@3.7.0_tailwindcss@4.3.3/node_modules/tailwind-variants/dist/config.d.ts","../../../node_modules/.pnpm/tailwind-variants@3.2.2_tailwind-merge@3.7.0_tailwindcss@4.3.3/node_modules/tailwind-variants/dist/types.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":["_$tailwind_merge0.ClassNameValue","SlugOptions","ClassValue","TVProps"],"sources":["../src/cn.ts","../src/isTestEnvironment.ts","../../../node_modules/.pnpm/tailwind-merge@3.7.0/node_modules/tailwind-merge/dist/types.d.ts","../src/proseTwMerge.ts","../src/slugify.ts","../../../node_modules/.pnpm/tailwind-variants@3.2.2_tailwind-merge@3.7.0_tailwindcss@4.3.3/node_modules/tailwind-variants/dist/config.d.ts","../../../node_modules/.pnpm/tailwind-variants@3.2.2_tailwind-merge@3.7.0_tailwindcss@4.3.3/node_modules/tailwind-variants/dist/types.d.ts","../src/slotClassNames.ts","../src/tv.ts","../src/styling.ts"],"ignoreList":[2,5,6],"mappings":";;;;;;;;;;;;;;;;;;qBAsBa,QAAS,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;qBCElB;;;;;;;;;;;;KCfR,iBAAiB;KACjB,0BAA0B;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/dist/index.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import classNames from "classnames";
|
|
2
|
-
import { extendTailwindMerge, validators } from "tailwind-merge";
|
|
2
|
+
import { extendTailwindMerge, mergeConfigs, validators } from "tailwind-merge";
|
|
3
3
|
import slug from "slug";
|
|
4
|
-
import {
|
|
5
|
-
import { tv as tv$1 } from "tailwind-variants";
|
|
4
|
+
import { tv as tv$1 } from "tailwind-variants/lite";
|
|
6
5
|
//#region src/proseTwMerge.ts
|
|
7
6
|
/**
|
|
8
7
|
* Typography plugin size classes are standalone tokens like `prose-sm`
|
|
@@ -92,12 +91,46 @@ const slugify = (string, options) => {
|
|
|
92
91
|
});
|
|
93
92
|
};
|
|
94
93
|
//#endregion
|
|
95
|
-
//#region src/
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
94
|
+
//#region src/semanticMergeConfig.ts
|
|
95
|
+
const sizes = [
|
|
96
|
+
"small",
|
|
97
|
+
"medium",
|
|
98
|
+
"large"
|
|
99
|
+
];
|
|
100
|
+
const semanticMergeConfig = { extend: {
|
|
101
|
+
theme: {
|
|
102
|
+
spacing: ["divider"],
|
|
103
|
+
radius: sizes
|
|
104
|
+
},
|
|
105
|
+
classGroups: {
|
|
106
|
+
shadow: [{ shadow: sizes }],
|
|
107
|
+
opacity: [{ opacity: ["disabled"] }],
|
|
108
|
+
"font-size": [{ text: ["tiny", ...sizes] }],
|
|
109
|
+
"border-w": [{ border: sizes }],
|
|
110
|
+
"bg-image": [{ "bg-stripe-gradient": [
|
|
111
|
+
"default",
|
|
112
|
+
"primary",
|
|
113
|
+
"secondary",
|
|
114
|
+
"success",
|
|
115
|
+
"warning",
|
|
116
|
+
"danger"
|
|
117
|
+
] }],
|
|
118
|
+
transition: [
|
|
119
|
+
"transition-background",
|
|
120
|
+
"transition-colors-opacity",
|
|
121
|
+
"transition-width",
|
|
122
|
+
"transition-height",
|
|
123
|
+
"transition-size",
|
|
124
|
+
"transition-left",
|
|
125
|
+
"transition-transform-opacity",
|
|
126
|
+
"transition-transform-background",
|
|
127
|
+
"transition-transform-colors",
|
|
128
|
+
"transition-transform-colors-opacity"
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
} };
|
|
132
|
+
//#endregion
|
|
133
|
+
//#region src/slotClassNames.ts
|
|
101
134
|
/**
|
|
102
135
|
* Converts tailwind-variants slots instance to actual classnames object
|
|
103
136
|
*
|
|
@@ -133,6 +166,91 @@ const variantsToClassNames = (variants, className, baseSlot) => {
|
|
|
133
166
|
}, {});
|
|
134
167
|
};
|
|
135
168
|
//#endregion
|
|
136
|
-
|
|
169
|
+
//#region src/styling.ts
|
|
170
|
+
const rawRecipes = /* @__PURE__ */ new WeakMap();
|
|
171
|
+
const copyConfig = (value) => {
|
|
172
|
+
if (Array.isArray(value)) return value.map(copyConfig);
|
|
173
|
+
if (value && typeof value === "object") return Object.fromEntries(Object.entries(value).map(([key, entry]) => {
|
|
174
|
+
return [key, copyConfig(entry)];
|
|
175
|
+
}));
|
|
176
|
+
return value;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Creates isolated class helpers. No React or process-global configuration.
|
|
180
|
+
* Recipe classes are concatenated by the lite engine, then merged once, after
|
|
181
|
+
* defaults, variants, compounds, and caller overrides have all been collected.
|
|
182
|
+
*/
|
|
183
|
+
const createStyling = (config = {}) => {
|
|
184
|
+
const instanceConfig = copyConfig(config);
|
|
185
|
+
const merge = extendTailwindMerge({ extend: { classGroups: proseTwMergeClassGroups } }, (defaults) => {
|
|
186
|
+
return mergeConfigs(defaults, semanticMergeConfig);
|
|
187
|
+
}, (defaults) => {
|
|
188
|
+
return mergeConfigs(defaults, instanceConfig);
|
|
189
|
+
});
|
|
190
|
+
const resolveWith = (recipe, props, merger) => {
|
|
191
|
+
const result = (rawRecipes.get(recipe) ?? recipe)(...props);
|
|
192
|
+
const mergeResult = (value) => {
|
|
193
|
+
return value ? merger(value) || void 0 : value;
|
|
194
|
+
};
|
|
195
|
+
if (typeof result !== "object" || result === null) return mergeResult(result);
|
|
196
|
+
return Object.fromEntries(Object.entries(result).map(([slot, fn]) => {
|
|
197
|
+
return [slot, (...slotProps) => {
|
|
198
|
+
return mergeResult(fn(...slotProps));
|
|
199
|
+
}];
|
|
200
|
+
}));
|
|
201
|
+
};
|
|
202
|
+
const tv = ((options, recipeConfig) => {
|
|
203
|
+
const raw = tv$1(options, {
|
|
204
|
+
twMerge: false,
|
|
205
|
+
twMergeConfig: {}
|
|
206
|
+
});
|
|
207
|
+
const mergeConfig = copyConfig(recipeConfig?.twMergeConfig);
|
|
208
|
+
const shouldMerge = recipeConfig?.twMerge !== false;
|
|
209
|
+
const normalizedConfig = mergeConfig && typeof mergeConfig !== "function" ? {
|
|
210
|
+
...mergeConfig,
|
|
211
|
+
extend: {
|
|
212
|
+
theme: mergeConfig.theme,
|
|
213
|
+
classGroups: mergeConfig.classGroups,
|
|
214
|
+
conflictingClassGroupModifiers: mergeConfig.conflictingClassGroupModifiers,
|
|
215
|
+
conflictingClassGroups: mergeConfig.conflictingClassGroups,
|
|
216
|
+
...mergeConfig.extend
|
|
217
|
+
}
|
|
218
|
+
} : mergeConfig;
|
|
219
|
+
const recipeMerge = normalizedConfig ? extendTailwindMerge({ extend: { classGroups: proseTwMergeClassGroups } }, (defaults) => {
|
|
220
|
+
return mergeConfigs(defaults, semanticMergeConfig);
|
|
221
|
+
}, (defaults) => {
|
|
222
|
+
return mergeConfigs(defaults, instanceConfig);
|
|
223
|
+
}, (defaults) => {
|
|
224
|
+
return typeof normalizedConfig === "function" ? normalizedConfig(defaults) : mergeConfigs(defaults, normalizedConfig);
|
|
225
|
+
}) : merge;
|
|
226
|
+
const wrapped = Object.assign((...props) => {
|
|
227
|
+
return resolveWith(raw, props, !shouldMerge ? (v) => {
|
|
228
|
+
return v;
|
|
229
|
+
} : recipeMerge);
|
|
230
|
+
}, raw);
|
|
231
|
+
rawRecipes.set(wrapped, raw);
|
|
232
|
+
return wrapped;
|
|
233
|
+
});
|
|
234
|
+
return Object.freeze({
|
|
235
|
+
cn: (...classes) => {
|
|
236
|
+
return merge(classNames(...classes));
|
|
237
|
+
},
|
|
238
|
+
tv,
|
|
239
|
+
variantsToClassNames,
|
|
240
|
+
resolve: (recipe, ...props) => {
|
|
241
|
+
return resolveWith(recipe, props, merge);
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
};
|
|
245
|
+
const defaultStyling = createStyling();
|
|
246
|
+
//#endregion
|
|
247
|
+
//#region src/tv.ts
|
|
248
|
+
/**
|
|
249
|
+
* Tailwind Variants recipe factory with isolated semantic class merging
|
|
250
|
+
* Used to create variant definitions with slots and variants
|
|
251
|
+
*/
|
|
252
|
+
const tv = defaultStyling.tv;
|
|
253
|
+
//#endregion
|
|
254
|
+
export { cn, createStyling, defaultStyling, isTestEnvironment, proseTwMerge, proseTwMergeClassGroups, slugify, tv, variantsToClassNames };
|
|
137
255
|
|
|
138
256
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["tailwindVariants"],"sources":["../src/proseTwMerge.ts","../src/cn.ts","../src/isTestEnvironment.ts","../src/slugify.ts","../src/tv.ts"],"sourcesContent":["import type { ConfigExtension } from 'tailwind-merge';\n\nimport { extendTailwindMerge, validators } from 'tailwind-merge';\n\ntype ProseClassGroupIds = 'prose-size' | 'prose-color';\n\n/**\n * Typography plugin size classes are standalone tokens like `prose-sm`\n * instead of regular utilities, so we register them as a custom merge group.\n */\nconst isProseSize = (value: string): boolean => {\n return value === 'base' || validators.isTshirtSize(value);\n};\n\n/**\n * Typography plugin color themes are also standalone `prose-*` classes.\n * Keep `prose-invert` out of this group so it can coexist with a color class.\n */\nconst isProseColor = (value: string): boolean => {\n return (\n value !== 'invert' &&\n !isProseSize(value) &&\n (validators.isAnyNonArbitrary(value) || validators.isArbitraryValue(value))\n );\n};\n\nexport const proseTwMergeClassGroups: NonNullable<\n NonNullable<\n ConfigExtension<ProseClassGroupIds, never>['extend']\n >['classGroups']\n> = {\n // Typography plugin sizes are mutually exclusive standalone classes.\n 'prose-size': [{ prose: [isProseSize] }],\n // Typography plugin color themes are also mutually exclusive standalone classes.\n 'prose-color': [{ prose: [isProseColor] }],\n};\n\n/**\n * Prose-aware `tailwind-merge` instance that deduplicates `prose-*` classes.\n * Used by `cn(...)` internally. Also exported for direct use in components\n * that need prose-aware class merging outside of `cn`.\n */\nexport const proseTwMerge = extendTailwindMerge<ProseClassGroupIds>({\n extend: {\n classGroups: proseTwMergeClassGroups,\n },\n});\n","/* eslint-disable import-x/prefer-default-export */\nimport type { ArgumentArray } from 'classnames';\n\nimport classNames from 'classnames';\n\nimport { proseTwMerge } from './proseTwMerge';\n\n/**\n * A utility function that combines `classnames` and `tailwind-merge`.\n *\n * It takes multiple class values (strings, arrays, or objects), merges them,\n * and ensures Tailwind CSS classes are handled properly by resolving conflicts.\n *\n * @param classes - A list of class names that can be strings, objects, or arrays.\n * @returns A string of combined class names with Tailwind CSS conflict resolution.\n *\n * Example usage:\n * ```\n * cn('p-4', 'text-center', { 'bg-red-500': true, 'p-2': false });\n * // Output: 'text-center bg-red-500 p-4'\n * ```\n */\nexport const cn = (...classes: ArgumentArray) => {\n // First, `classnames` merges the input class names (conditionally if needed).\n // Then, the shared prose-aware `tailwind-merge` instance resolves conflicts.\n return proseTwMerge(classNames(...classes));\n};\n","/* eslint-disable import-x/prefer-default-export */\n\n/**\n * Checks if the code is running in a test environment.\n *\n * This helper safely detects test environments by checking:\n * - Node.js: `process.env.NODE_ENV === 'test'` or `process.env.VITEST === 'true'`\n * - Browser: Always returns `false` (production code)\n *\n * The check is safe for both Node.js and browser environments by verifying\n * that `process` exists before accessing its properties.\n *\n * @returns `true` if running in a test environment, `false` otherwise\n *\n * @example\n * ```ts\n * if (isTestEnvironment()) {\n * // Skip debouncing in tests for immediate snapshots\n * return value;\n * }\n * // Normal production behavior with debouncing\n * return debouncedValue;\n * ```\n */\nexport const isTestEnvironment = (): boolean => {\n // Safe check: only access process if it exists (Node.js environment)\n // In browsers, process is undefined, so this returns false\n return (\n typeof process !== 'undefined' &&\n (process.env.NODE_ENV === 'test' || process.env.VITEST === 'true')\n );\n};\n","/* eslint-disable import-x/prefer-default-export */\n\nimport type { Options as SlugOptions } from 'slug';\n\nimport slug from 'slug';\n\ninterface SlugifyOptions extends SlugOptions {\n /** When true, dots are also replaced (default is false) */\n replaceDots?: boolean;\n}\n\nexport const slugify = (string: string, options?: SlugifyOptions) => {\n const replacement = options?.replacement ?? '_';\n const replaceDots = options?.replaceDots ?? false;\n\n return slug(string, {\n ...slug.defaults.modes.rfc3986,\n charmap: {\n ...slug.defaults.modes.rfc3986.charmap,\n // do not replace dots when replaceDots is false\n ...(!replaceDots ? { '.': '.' } : { '.': replacement }),\n // convert hyphens to underscores (when replacement is not hyphen)\n ...(replacement !== '-' ? { '-': '_' } : {}),\n },\n replacement,\n ...(options ?? {}),\n });\n};\n","import type { VariantProps } from '@heroui/theme';\nimport type { ClassProp, TV } from 'tailwind-variants';\n\nimport { tv as tailwindVariants } from 'tailwind-variants';\n\n/**\n * Represents a class value which can be either a string or an array of strings\n * Used for handling both single class names and multiple class names\n */\nexport type ClassValue = string | string[];\n\n/**\n * Props accepted by tailwind-variants slot functions\n * Combines a dynamic record of string/number values with the ClassProp from tailwind-variants\n */\ntype TVSlotProps = {\n [x: string]: string | number | undefined;\n [x: number]: string | number | undefined;\n} & ClassProp<ClassValue>;\n\n/**\n * Represents a tailwind-variants slot function\n * Takes optional TVSlotProps and returns a string of class names\n */\ntype TVFunction = (slotProps?: TVSlotProps) => string;\n\n/**\n * A record of slot names to their corresponding tailwind-variants functions\n * Used to type the variants parameter in variantsToClassNames\n */\ntype TVRecord = Record<string, TVFunction>;\n\n/**\n * Re-export of tailwind-variants tv function\n * Used to create variant definitions with slots and variants\n */\nexport const tv: TV = tailwindVariants;\n\n/**\n * Extracts variant props from a tailwind-variants component\n * Used for typing component props that use variants\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type TVProps<Component extends (...args: any) => any> =\n VariantProps<Component>;\n\n/**\n * Extracts className type from a tailwind-variants component\n * Can be either a partial record of slot names to class values, or a single class value\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type TVClassName<Component extends (...args: any) => any> =\n | Partial<Record<keyof ReturnType<Component>, ClassValue>>\n | ClassValue;\n\n/**\n * Converts tailwind-variants slots instance to actual classnames object\n *\n * @param variants - Object containing slot variant functions from tailwind-variants\n * @param className - Optional class names to merge with variant classes. Can be string, array, or record\n * @param baseSlot - Optional slot name to apply global className to\n * @returns Record mapping slot names to their final class name strings\n *\n * @example\n * ```tsx\n * const variants = tv({ slots: { base: 'bg-white', content: 'p-4' } });\n * const classes = variantsToClassNames(variants(), 'shadow-lg', 'base');\n * // Result: { base: 'bg-white shadow-lg', content: 'p-4' }\n * ```\n *\n * @example\n * ```tsx\n * const variants = tv({ slots: { base: '', content: '' } });\n * const classes = variantsToClassNames(variants(), {\n * base: 'bg-white',\n * content: ['p-4', 'text-gray-700']\n * });\n * // Result: { base: 'bg-white', content: 'p-4 text-gray-700' }\n * ```\n */\nexport const variantsToClassNames = <T extends TVRecord>(\n variants: T,\n className?: ClassValue | Record<string, ClassValue>,\n baseSlot?: keyof T,\n): Record<keyof T, string> => {\n const classNames =\n typeof className === 'object' && !Array.isArray(className) ? className : {};\n\n return Object.entries(variants).reduce(\n (acc, [slot, variantFn]) => {\n const slotKey = slot as keyof T;\n const slotClassName =\n typeof className === 'string' || Array.isArray(className)\n ? className\n : classNames[slot];\n\n // @ts-expect-error not sure here\n acc[slotKey] = variantFn({\n className:\n baseSlot && slot === baseSlot ? slotClassName : classNames[slot],\n });\n\n return acc;\n },\n {} as Record<keyof T, string>,\n );\n};\n"],"mappings":";;;;;;;;;;AAUA,MAAM,eAAe,UAA2B;CAC9C,OAAO,UAAU,UAAU,WAAW,aAAa,K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UAAU;EAChB,MAAM,gBACJ,OAAO,cAAc,YAAY,MAAM,QAAQ,SAAS,IACpD,YACA,WAAW;EAGjB,IAAI,WAAW,UAAU,EACvB,WACE,YAAY,SAAS,WAAW,gBAAgB,WAAW,MAC/D,CAAC;EAED,OAAO;CACT,GACA,CAAC,CACH;AACF"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["unmergedTV"],"sources":["../src/proseTwMerge.ts","../src/cn.ts","../src/isTestEnvironment.ts","../src/slugify.ts","../src/semanticMergeConfig.ts","../src/slotClassNames.ts","../src/styling.ts","../src/tv.ts"],"sourcesContent":["import type { ConfigExtension } from 'tailwind-merge';\n\nimport { extendTailwindMerge, validators } from 'tailwind-merge';\n\ntype ProseClassGroupIds = 'prose-size' | 'prose-color';\n\n/**\n * Typography plugin size classes are standalone tokens like `prose-sm`\n * instead of regular utilities, so we register them as a custom merge group.\n */\nconst isProseSize = (value: string): boolean => {\n return value === 'base' || validators.isTshirtSize(value);\n};\n\n/**\n * Typography plugin color themes are also standalone `prose-*` classes.\n * Keep `prose-invert` out of this group so it can coexist with a color class.\n */\nconst isProseColor = (value: string): boolean => {\n return (\n value !== 'invert' &&\n !isProseSize(value) &&\n (validators.isAnyNonArbitrary(value) || validators.isArbitraryValue(value))\n );\n};\n\nexport const proseTwMergeClassGroups: NonNullable<\n NonNullable<\n ConfigExtension<ProseClassGroupIds, never>['extend']\n >['classGroups']\n> = {\n // Typography plugin sizes are mutually exclusive standalone classes.\n 'prose-size': [{ prose: [isProseSize] }],\n // Typography plugin color themes are also mutually exclusive standalone classes.\n 'prose-color': [{ prose: [isProseColor] }],\n};\n\n/**\n * Prose-aware `tailwind-merge` instance that deduplicates `prose-*` classes.\n * Used by `cn(...)` internally. Also exported for direct use in components\n * that need prose-aware class merging outside of `cn`.\n */\nexport const proseTwMerge = extendTailwindMerge<ProseClassGroupIds>({\n extend: {\n classGroups: proseTwMergeClassGroups,\n },\n});\n","/* eslint-disable import-x/prefer-default-export */\nimport type { ArgumentArray } from 'classnames';\n\nimport classNames from 'classnames';\n\nimport { proseTwMerge } from './proseTwMerge';\n\n/**\n * A utility function that combines `classnames` and `tailwind-merge`.\n *\n * It takes multiple class values (strings, arrays, or objects), merges them,\n * and ensures Tailwind CSS classes are handled properly by resolving conflicts.\n *\n * @param classes - A list of class names that can be strings, objects, or arrays.\n * @returns A string of combined class names with Tailwind CSS conflict resolution.\n *\n * Example usage:\n * ```\n * cn('p-4', 'text-center', { 'bg-red-500': true, 'p-2': false });\n * // Output: 'text-center bg-red-500 p-4'\n * ```\n */\nexport const cn = (...classes: ArgumentArray) => {\n // First, `classnames` merges the input class names (conditionally if needed).\n // Then, the shared prose-aware `tailwind-merge` instance resolves conflicts.\n return proseTwMerge(classNames(...classes));\n};\n","/* eslint-disable import-x/prefer-default-export */\n\n/**\n * Checks if the code is running in a test environment.\n *\n * This helper safely detects test environments by checking:\n * - Node.js: `process.env.NODE_ENV === 'test'` or `process.env.VITEST === 'true'`\n * - Browser: Always returns `false` (production code)\n *\n * The check is safe for both Node.js and browser environments by verifying\n * that `process` exists before accessing its properties.\n *\n * @returns `true` if running in a test environment, `false` otherwise\n *\n * @example\n * ```ts\n * if (isTestEnvironment()) {\n * // Skip debouncing in tests for immediate snapshots\n * return value;\n * }\n * // Normal production behavior with debouncing\n * return debouncedValue;\n * ```\n */\nexport const isTestEnvironment = (): boolean => {\n // Safe check: only access process if it exists (Node.js environment)\n // In browsers, process is undefined, so this returns false\n return (\n typeof process !== 'undefined' &&\n (process.env.NODE_ENV === 'test' || process.env.VITEST === 'true')\n );\n};\n","/* eslint-disable import-x/prefer-default-export */\n\nimport type { Options as SlugOptions } from 'slug';\n\nimport slug from 'slug';\n\ninterface SlugifyOptions extends SlugOptions {\n /** When true, dots are also replaced (default is false) */\n replaceDots?: boolean;\n}\n\nexport const slugify = (string: string, options?: SlugifyOptions) => {\n const replacement = options?.replacement ?? '_';\n const replaceDots = options?.replaceDots ?? false;\n\n return slug(string, {\n ...slug.defaults.modes.rfc3986,\n charmap: {\n ...slug.defaults.modes.rfc3986.charmap,\n // do not replace dots when replaceDots is false\n ...(!replaceDots ? { '.': '.' } : { '.': replacement }),\n // convert hyphens to underscores (when replacement is not hyphen)\n ...(replacement !== '-' ? { '-': '_' } : {}),\n },\n replacement,\n ...(options ?? {}),\n });\n};\n","import type { StylingConfig } from './styling';\n\n// Owned merge rules for semantic utilities already used by the workspace.\n// These classify utilities; tokens.css generates their CSS.\nconst sizes = ['small', 'medium', 'large'];\n\nconst semanticMergeConfig: StylingConfig = {\n extend: {\n theme: { spacing: ['divider'], radius: sizes },\n classGroups: {\n shadow: [{ shadow: sizes }],\n opacity: [{ opacity: ['disabled'] }],\n 'font-size': [{ text: ['tiny', ...sizes] }],\n 'border-w': [{ border: sizes }],\n 'bg-image': [\n {\n 'bg-stripe-gradient': [\n 'default',\n 'primary',\n 'secondary',\n 'success',\n 'warning',\n 'danger',\n ],\n },\n ],\n transition: [\n 'transition-background',\n 'transition-colors-opacity',\n 'transition-width',\n 'transition-height',\n 'transition-size',\n 'transition-left',\n 'transition-transform-opacity',\n 'transition-transform-background',\n 'transition-transform-colors',\n 'transition-transform-colors-opacity',\n ],\n },\n },\n};\n\nexport default semanticMergeConfig;\n","import type { ClassProp } from 'tailwind-variants';\nimport type { ClassValue } from './tv';\n\n/**\n * Props accepted by tailwind-variants slot functions\n * Combines a dynamic record of string/number values with the ClassProp from tailwind-variants\n */\ntype TVSlotProps = {\n [x: string]: string | number | undefined;\n [x: number]: string | number | undefined;\n} & ClassProp<ClassValue>;\n\n/**\n * Represents a tailwind-variants slot function\n * Takes optional TVSlotProps and returns a string of class names\n */\ntype TVFunction = (slotProps?: TVSlotProps) => string;\n\n/**\n * A record of slot names to their corresponding tailwind-variants functions\n * Used to type the variants parameter in variantsToClassNames\n */\ntype TVRecord = Record<string, TVFunction>;\n\n/**\n * Converts tailwind-variants slots instance to actual classnames object\n *\n * @param variants - Object containing slot variant functions from tailwind-variants\n * @param className - Optional class names to merge with variant classes. Can be string, array, or record\n * @param baseSlot - Optional slot name to apply global className to\n * @returns Record mapping slot names to their final class name strings\n *\n * @example\n * ```tsx\n * const variants = tv({ slots: { base: 'bg-white', content: 'p-4' } });\n * const classes = variantsToClassNames(variants(), 'shadow-lg', 'base');\n * // Result: { base: 'bg-white shadow-lg', content: 'p-4' }\n * ```\n *\n * @example\n * ```tsx\n * const variants = tv({ slots: { base: '', content: '' } });\n * const classes = variantsToClassNames(variants(), {\n * base: 'bg-white',\n * content: ['p-4', 'text-gray-700']\n * });\n * // Result: { base: 'bg-white', content: 'p-4 text-gray-700' }\n * ```\n */\nconst variantsToClassNames = <T extends TVRecord>(\n variants: T,\n className?: ClassValue | Record<string, ClassValue | undefined>,\n baseSlot?: keyof T,\n): Record<keyof T, string> => {\n const classNames =\n typeof className === 'object' && !Array.isArray(className) ? className : {};\n\n return Object.entries(variants).reduce(\n (acc, [slot, variantFn]) => {\n const slotKey = slot as keyof T;\n const slotClassName =\n typeof className === 'string' || Array.isArray(className)\n ? className\n : classNames[slot];\n\n // @ts-expect-error not sure here\n acc[slotKey] = variantFn({\n className:\n baseSlot && slot === baseSlot ? slotClassName : classNames[slot],\n });\n\n return acc;\n },\n {} as Record<keyof T, string>,\n );\n};\n\nexport default variantsToClassNames;\n","import type { ArgumentArray } from 'classnames';\nimport type { ConfigExtension } from 'tailwind-merge';\nimport type { TV, TVConfig } from 'tailwind-variants';\n\nimport classNames from 'classnames';\nimport { extendTailwindMerge, mergeConfigs } from 'tailwind-merge';\nimport { tv as unmergedTV } from 'tailwind-variants/lite';\n\nimport { proseTwMergeClassGroups } from './proseTwMerge';\nimport semanticMergeConfig from './semanticMergeConfig';\nimport variantsToClassNames from './slotClassNames';\n\n// Preserve the full callable signature and recipe metadata (including generics).\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype Recipe = (...args: any[]) => any;\nconst rawRecipes = new WeakMap<Recipe, Recipe>();\n\nexport type StylingConfig = ConfigExtension<string, string>;\n\nexport interface Styling {\n readonly cn: (...classes: ArgumentArray) => string;\n /** Resolve a module-level pixel-utils recipe with this instance's merge rules. */\n readonly resolve: <T extends Recipe>(\n recipe: T,\n ...props: Parameters<T>\n ) => ReturnType<T>;\n readonly tv: TV;\n readonly variantsToClassNames: typeof variantsToClassNames;\n}\n\n// Configs contain validator functions, so structuredClone is unsuitable.\nconst copyConfig = <T>(value: T): T => {\n if (Array.isArray(value)) {\n return value.map(copyConfig) as T;\n }\n if (value && typeof value === 'object') {\n return Object.fromEntries(\n Object.entries(value).map(([key, entry]) => {\n return [key, copyConfig(entry)];\n }),\n ) as T;\n }\n return value;\n};\n\n/**\n * Creates isolated class helpers. No React or process-global configuration.\n * Recipe classes are concatenated by the lite engine, then merged once, after\n * defaults, variants, compounds, and caller overrides have all been collected.\n */\nexport const createStyling = (config: StylingConfig = {}): Styling => {\n const instanceConfig = copyConfig(config);\n const merge = extendTailwindMerge<string, string>(\n { extend: { classGroups: proseTwMergeClassGroups } },\n (defaults) => {\n return mergeConfigs(defaults, semanticMergeConfig);\n },\n (defaults) => {\n return mergeConfigs(defaults, instanceConfig);\n },\n );\n\n const resolveWith = (\n recipe: Recipe,\n props: unknown[],\n merger: (value: string) => string,\n ) => {\n const result = (rawRecipes.get(recipe) ?? recipe)(...props);\n const mergeResult = (value: string | undefined) => {\n return value ? merger(value) || undefined : value;\n };\n if (typeof result !== 'object' || result === null) {\n return mergeResult(result);\n }\n return Object.fromEntries(\n Object.entries(result).map(([slot, fn]) => {\n return [\n slot,\n (...slotProps: unknown[]) => {\n return mergeResult((fn as Recipe)(...slotProps));\n },\n ];\n }),\n );\n };\n\n // The generic TV signature is unchanged; only its final class resolution is\n // replaced. The lite engine retains metadata for extension without merging.\n const tv = ((options, recipeConfig?: TVConfig) => {\n const raw = unmergedTV(options, { twMerge: false, twMergeConfig: {} });\n const mergeConfig = copyConfig(recipeConfig?.twMergeConfig);\n const shouldMerge = recipeConfig?.twMerge !== false;\n // Keep the legacy top-level config fields accepted by Tailwind Variants.\n const normalizedConfig =\n mergeConfig && typeof mergeConfig !== 'function'\n ? {\n ...mergeConfig,\n extend: {\n theme: mergeConfig.theme,\n classGroups: mergeConfig.classGroups,\n conflictingClassGroupModifiers:\n mergeConfig.conflictingClassGroupModifiers,\n conflictingClassGroups: mergeConfig.conflictingClassGroups,\n ...mergeConfig.extend,\n },\n }\n : mergeConfig;\n const recipeMerge = normalizedConfig\n ? extendTailwindMerge<string, string>(\n { extend: { classGroups: proseTwMergeClassGroups } },\n (defaults) => {\n return mergeConfigs(defaults, semanticMergeConfig);\n },\n (defaults) => {\n return mergeConfigs(defaults, instanceConfig);\n },\n (defaults) => {\n return typeof normalizedConfig === 'function'\n ? normalizedConfig(defaults)\n : mergeConfigs(defaults, normalizedConfig);\n },\n )\n : merge;\n const wrapped = Object.assign((...props: unknown[]) => {\n return resolveWith(\n raw,\n props,\n !shouldMerge\n ? (v) => {\n return v;\n }\n : recipeMerge,\n );\n }, raw);\n rawRecipes.set(wrapped, raw);\n return wrapped;\n }) as TV;\n\n return Object.freeze({\n cn: (...classes: ArgumentArray) => {\n return merge(classNames(...classes));\n },\n tv,\n variantsToClassNames,\n resolve: (recipe, ...props) => {\n return resolveWith(recipe, props, merge);\n },\n });\n};\n\nexport const defaultStyling: Styling = createStyling();\n","import type { TV, VariantProps } from 'tailwind-variants';\n\nimport { defaultStyling } from './styling';\n\n/**\n * Represents a class value which can be either a string or an array of strings\n * Used for handling both single class names and multiple class names\n */\nexport type ClassValue = string | string[];\n\n/**\n * Tailwind Variants recipe factory with isolated semantic class merging\n * Used to create variant definitions with slots and variants\n */\nexport const tv: TV = defaultStyling.tv;\n\n/**\n * Extracts variant props from a tailwind-variants component\n * Used for typing component props that use variants\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type TVProps<Component extends (...args: any) => any> =\n VariantProps<Component>;\n\n/**\n * Extracts className type from a tailwind-variants component\n * Can be either a partial record of slot names to class values, or a single class value\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type TVClassName<Component extends (...args: any) => any> =\n Partial<Record<keyof ReturnType<Component>, ClassValue>> | ClassValue;\n\nexport { default as variantsToClassNames } from './slotClassNames';\n"],"mappings":";;;;;;;;;AAUA,MAAM,eAAe,UAA2B;CAC9C,OAAO,UAAU,UAAU,WAAW,aAAa,KAAK;AAC1D;;;;;AAMA,MAAM,gBAAgB,UAA2B;CAC/C,OACE,UAAU,YACV,CAAC,YAAY,KAAK,MACjB,WAAW,kBAAkB,KAAK,KAAK,WAAW,iBAAiB,KAAK;AAE7E;AAEA,MAAa,0BAIT;CAEF,cAAc,CAAC,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC;CAEvC,eAAe,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC;AAC3C;;;;;;AAOA,MAAa,eAAe,oBAAwC,EAClE,QAAQ,EACN,aAAa,wBACf,EACF,CAAC;;;;;;;;;;;;;;;;;;ACxBD,MAAa,MAAM,GAAG,YAA2B;CAG/C,OAAO,aAAa,WAAW,GAAG,OAAO,CAAC;AAC5C;;;;;;;;;;;;;;;;;;;;;;;;;ACFA,MAAa,0BAAmC;CAG9C,OACE,OAAO,YAAY,gBAClB,QAAQ,IAAI,aAAa,UAAU,QAAQ,IAAI,WAAW;AAE/D;;;ACpBA,MAAa,WAAW,QAAgB,YAA6B;CACnE,MAAM,cAAc,SAAS,eAAe;CAC5C,MAAM,cAAc,SAAS,eAAe;CAE5C,OAAO,KAAK,QAAQ;EAClB,GAAG,KAAK,SAAS,MAAM;EACvB,SAAS;GACP,GAAG,KAAK,SAAS,MAAM,QAAQ;GAE/B,GAAI,CAAC,cAAc,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,YAAY;GAErD,GAAI,gBAAgB,MAAM,EAAE,KAAK,IAAI,IAAI,CAAC;EAC5C;EACA;EACA,GAAI,WAAW,CAAC;CAClB,CAAC;AACH;;;ACvBA,MAAM,QAAQ;CAAC;CAAS;CAAU;AAAO;AAEzC,MA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