svd-kit 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Eduardo Carvalho
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,99 @@
1
+ # svd-kit
2
+ Styling decomposition system supporting base styles, variants, modifiers, and compound variants.
3
+
4
+
5
+ ## What is SVD?
6
+ SVD (Styling Variance Decomposition) is a utility built to easily define and consume complex styling configurations.
7
+ It addresses the limitations of standard variance systems by introducing flexible multi-slot mapping, base styles, boolean modifiers, and compound variants.
8
+
9
+ This utility comes in extremely handy when:
10
+
11
+ - Building scalable design systems with flexible slot mapping and granular component control.
12
+ - Developing highly customizable UI components requiring deep structural decomposition.
13
+ - Eliminating type boilerplate while retaining deep TypeScript autocomplete and safety.
14
+
15
+
16
+ ## Key Features
17
+
18
+ **svd-kit** was highly inspired by [SVDM](https://github.com/lilingxi01/svdm) (Styling Variance Decomposition Module).
19
+
20
+ While SVDM introduced multi-slot object decomposition, **svd-kit** was built to solve real-world architectural scenarios that SVDM can't handle, such as:
21
+
22
+ - **Merged or Split Usage:** Use the full `styles` block or extract isolated slots (e.g., `styles.variants.size`).
23
+ - **`className` Merging**: External `className` props can be automatically appended to the end of the chain.
24
+ - **Boolean Modifiers**: Accepts both simple strings and full `{ true: "...", false: "..." }` boolean objects.
25
+ - **Compounded Variants**: Create styles that apply when multiple variant or modifier conditions are met.
26
+ - **`.resolved` Property:** Exposes final values after merging inputs with defaults, perfect for `data-*` attributes.
27
+
28
+
29
+ ## Installation
30
+ It is very easy to install `svd-kit`. You can install it with any package manager.
31
+
32
+ ```bash
33
+ pnpm install svd-kit
34
+ ```
35
+
36
+
37
+ ## How to Use SVD
38
+ Here you can find a very simple example of how to define styling configurations and use them in your components.
39
+ More examples can be found in the [documentation](https://github.com/eduardoepc/svd-kit/tree/main/docs).
40
+
41
+ ### Definition and Structure
42
+ Every field (`base`, `variants`, `modifiers`, `compound`, `defaults`) is optional, use only what you need.
43
+
44
+ ```typescript
45
+ import { svd } from "svd-kit"
46
+
47
+ const buttonStyles = svd({
48
+ base: { layout: "flex gap-1", content: "text-sm" },
49
+ variants: {
50
+ variant: {
51
+ primary: { container: "bg-primary", content: "text-on-primary" },
52
+ secondary: { container: "bg-secondary", content: "text-on-secondary" },
53
+ },
54
+ size: { md: "h-8 px-2", sm: "h-7 px-1" },
55
+ },
56
+ modifiers: {
57
+ pill: { true: "rounded-full", false: "rounded-md" },
58
+ disabled: "opacity-50",
59
+ },
60
+ compound: [
61
+ { size: "sm", pill: true, className: "px-3" },
62
+ ],
63
+ defaults: {
64
+ variants: { variant: "primary", size: "md" },
65
+ modifiers: { pill: true },
66
+ }
67
+ });
68
+ ```
69
+
70
+ ### Applying on Components
71
+ Either pass the entire instance to merge everything or destructure the individual slots for granular layout control.
72
+
73
+ ```typescript
74
+ import { type SVDProps, splitProps } from "svd-kit"
75
+ import { cn } from "@/lib/utils"
76
+
77
+ type ButtonProps = ButtonPrimitive.Props & SVDProps<typeof buttonStyles>;
78
+
79
+ export function Button(props: ButtonProps) {
80
+ const [stylingProps, buttonProps] = splitProps(props, buttonStyles);
81
+ const styles = buttonStyles(stylingProps);
82
+
83
+ return (
84
+ <ButtonPrimitive
85
+ data-variant={styles.resolved.variants.variant}
86
+
87
+ {...buttonProps}
88
+
89
+ className={cn(styles)}
90
+ />
91
+ )
92
+ }
93
+ ```
94
+
95
+
96
+ ## Built Out of Necessity
97
+ **svd-kit** was born out of necessity to solve the messy, unpredictable styling challenges that design systems face.
98
+
99
+ Its greatest strength is flexibility. Whether you're building a massive UI library or just quick conditional flags for a simple button, **svd-kit** works without getting in your way.
package/dist/index.cjs ADDED
@@ -0,0 +1,133 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/utils.ts
3
+ function splitProps(props, styleFn) {
4
+ const filter = new Set([...styleFn({}).keys, "className"]);
5
+ const matched = {}, rest = {};
6
+ for (const key in props) (filter.has(key) ? matched : rest)[key] = props[key];
7
+ return [matched, rest];
8
+ }
9
+ //#endregion
10
+ //#region src/index.ts
11
+ function processBase(base) {
12
+ const parts = [];
13
+ const keys = {};
14
+ if (base) if (typeof base === "string") parts.push(base);
15
+ else for (const key in base) {
16
+ keys[key] = base[key];
17
+ if (base[key]) parts.push(base[key]);
18
+ }
19
+ return Object.assign(parts, keys);
20
+ }
21
+ function processVariants(variants, resolved) {
22
+ const parts = [];
23
+ const keys = {};
24
+ for (const vKey in variants) {
25
+ const activeOption = resolved[vKey];
26
+ const variantGroup = variants[vKey]?.[activeOption] ?? "";
27
+ if (typeof variantGroup === "string") {
28
+ keys[vKey] = variantGroup;
29
+ if (variantGroup) parts.push(variantGroup);
30
+ } else if (variantGroup && typeof variantGroup === "object") {
31
+ const variantSlotsParts = [];
32
+ const variantSlotsKeys = {};
33
+ for (const slotKey in variantGroup) {
34
+ if (variantGroup[slotKey]) {
35
+ parts.push(variantGroup[slotKey]);
36
+ variantSlotsParts.push(variantGroup[slotKey]);
37
+ }
38
+ variantSlotsKeys[slotKey] = variantGroup[slotKey];
39
+ }
40
+ keys[vKey] = Object.assign(variantSlotsParts, variantSlotsKeys);
41
+ }
42
+ }
43
+ return Object.assign(parts, keys);
44
+ }
45
+ function processModifiers(modifiers, resolved) {
46
+ const parts = [];
47
+ const keys = {};
48
+ for (const mKey in modifiers) {
49
+ const modifierConfig = modifiers[mKey];
50
+ const isTrue = resolved[mKey];
51
+ let activeClass = "";
52
+ if (typeof modifierConfig === "string") activeClass = isTrue ? modifierConfig : "";
53
+ else if (modifierConfig && typeof modifierConfig === "object") activeClass = (isTrue ? modifierConfig.true : modifierConfig.false) ?? "";
54
+ keys[mKey] = activeClass;
55
+ if (activeClass) parts.push(activeClass);
56
+ }
57
+ return Object.assign(parts, keys);
58
+ }
59
+ function processCompounds(compounds, resolvedState) {
60
+ const parts = [];
61
+ if (!compounds) return parts;
62
+ for (const compoundConfig of compounds) {
63
+ let matchesAll = true;
64
+ const currentCompound = compoundConfig;
65
+ for (const key in currentCompound) {
66
+ if (key === "className") continue;
67
+ const expectedValue = currentCompound[key];
68
+ const actualValue = resolvedState[key];
69
+ if (Array.isArray(expectedValue)) {
70
+ if (!expectedValue.includes(actualValue)) {
71
+ matchesAll = false;
72
+ break;
73
+ }
74
+ } else if (expectedValue !== actualValue) {
75
+ matchesAll = false;
76
+ break;
77
+ }
78
+ }
79
+ if (matchesAll && compoundConfig.className) if (typeof compoundConfig.className === "string") parts.push(compoundConfig.className);
80
+ else {
81
+ const slotsRecord = compoundConfig.className;
82
+ for (const slotKey in slotsRecord) {
83
+ const slotClass = slotsRecord[slotKey];
84
+ if (slotClass) parts.push(slotClass);
85
+ }
86
+ }
87
+ }
88
+ return parts;
89
+ }
90
+ function svd(config) {
91
+ const stylesGenerator = (props) => {
92
+ const resolvedVariants = {};
93
+ for (const key in config.variants) {
94
+ const firstAvailableKey = Object.keys(config.variants[key] || {})[0];
95
+ resolvedVariants[key] = props[key] ?? config.defaults?.variants?.[key] ?? firstAvailableKey;
96
+ }
97
+ const resolvedModifiers = {};
98
+ for (const key in config.modifiers || {}) resolvedModifiers[key] = props[key] ?? config.defaults?.modifiers?.[key] ?? false;
99
+ const baseResult = processBase(config.base);
100
+ const variantsResult = processVariants(config.variants || {}, resolvedVariants);
101
+ const modifiersResult = processModifiers(config.modifiers || {}, resolvedModifiers);
102
+ const mergedState = {
103
+ ...resolvedVariants,
104
+ ...resolvedModifiers
105
+ };
106
+ const compoundResult = processCompounds(config.compound, mergedState);
107
+ const totalParts = [
108
+ ...baseResult,
109
+ ...variantsResult,
110
+ ...modifiersResult,
111
+ ...compoundResult
112
+ ];
113
+ if (props.className) totalParts.push(props.className);
114
+ const variantKeys = Object.keys(config.variants ?? {});
115
+ const modifierKeys = Object.keys(config.modifiers ?? {});
116
+ return Object.assign(totalParts, {
117
+ keys: [...variantKeys, ...modifierKeys],
118
+ base: baseResult,
119
+ variants: variantsResult,
120
+ modifiers: modifiersResult,
121
+ compound: compoundResult,
122
+ resolved: {
123
+ variants: resolvedVariants,
124
+ modifiers: resolvedModifiers
125
+ }
126
+ });
127
+ };
128
+ stylesGenerator.config = config;
129
+ return stylesGenerator;
130
+ }
131
+ //#endregion
132
+ exports.splitProps = splitProps;
133
+ exports.svd = svd;
@@ -0,0 +1,52 @@
1
+ //#region src/types.d.ts
2
+ type Slots = Record<string, string>;
3
+ type ModifierValue = string | {
4
+ true?: string;
5
+ false?: string;
6
+ };
7
+ type SVDProps<T extends (...args: never[]) => unknown> = Parameters<T>[0];
8
+ type KeyProviderFn = (...args: never[]) => {
9
+ keys: string[];
10
+ };
11
+ type KnownKeys<T> = { [K in keyof T]: string extends K ? never : number extends K ? never : K }[keyof T];
12
+ type ComputeSVDProps<TVariants, TModifiers> = { [K in KnownKeys<TVariants>]?: keyof TVariants[K] } & { [K in KnownKeys<TModifiers>]?: boolean } & {
13
+ className?: string;
14
+ };
15
+ type MaybeArray<T> = T | readonly T[];
16
+ type CompoundConditions<TVariants, TModifiers> = { [K in keyof TVariants]?: MaybeArray<keyof TVariants[K]> } & { [K in keyof TModifiers]?: MaybeArray<boolean> };
17
+ type SVDCompound<TVariants, TModifiers, TBase> = CompoundConditions<TVariants, TModifiers> & {
18
+ className: TBase extends Slots ? string | Partial<Record<keyof TBase, string>> : string;
19
+ };
20
+ interface SVDConfig<TBase extends string | Slots, TVariants extends Record<string, Record<string, string | Slots>>, TModifiers extends Record<string, ModifierValue>> {
21
+ base?: TBase;
22
+ variants?: TVariants;
23
+ modifiers?: TModifiers;
24
+ compound?: readonly SVDCompound<TVariants, TModifiers, TBase>[];
25
+ defaults?: {
26
+ variants?: { [K in keyof TVariants]?: keyof TVariants[K] };
27
+ modifiers?: { [K in keyof TModifiers]?: boolean };
28
+ };
29
+ }
30
+ type SVDGeneratorResult<TBase extends string | Slots, TVariants, TModifiers> = {
31
+ keys: string[];
32
+ base: TBase extends string ? string & string[] : TBase & string[];
33
+ variants: { [K in keyof TVariants]: TVariants[K][keyof TVariants[K]] } & string[];
34
+ modifiers: { [K in keyof TModifiers]: string } & string[];
35
+ compound: string[];
36
+ resolved: {
37
+ variants: { [K in keyof TVariants]: string };
38
+ modifiers: { [K in keyof TModifiers]: boolean };
39
+ };
40
+ } & string[];
41
+ //#endregion
42
+ //#region src/utils.d.ts
43
+ declare function splitProps<TProps extends object>(props: TProps, styleFn: KeyProviderFn): [Parameters<typeof styleFn>[0] & {
44
+ className?: string;
45
+ }, Omit<TProps, keyof Parameters<typeof styleFn>[0] | "className">];
46
+ //#endregion
47
+ //#region src/index.d.ts
48
+ declare function svd<TBase extends string | Slots, TVariants extends Record<string, Record<string, string | Slots>> = Record<string, never>, TModifiers extends Record<string, ModifierValue> = Record<string, never>>(config: SVDConfig<TBase, TVariants, TModifiers>): ((props: ComputeSVDProps<TVariants, TModifiers>) => SVDGeneratorResult<TBase, TVariants, TModifiers>) & {
49
+ config: SVDConfig<TBase, TVariants, TModifiers>;
50
+ };
51
+ //#endregion
52
+ export { type SVDProps, splitProps, svd };
@@ -0,0 +1,52 @@
1
+ //#region src/types.d.ts
2
+ type Slots = Record<string, string>;
3
+ type ModifierValue = string | {
4
+ true?: string;
5
+ false?: string;
6
+ };
7
+ type SVDProps<T extends (...args: never[]) => unknown> = Parameters<T>[0];
8
+ type KeyProviderFn = (...args: never[]) => {
9
+ keys: string[];
10
+ };
11
+ type KnownKeys<T> = { [K in keyof T]: string extends K ? never : number extends K ? never : K }[keyof T];
12
+ type ComputeSVDProps<TVariants, TModifiers> = { [K in KnownKeys<TVariants>]?: keyof TVariants[K] } & { [K in KnownKeys<TModifiers>]?: boolean } & {
13
+ className?: string;
14
+ };
15
+ type MaybeArray<T> = T | readonly T[];
16
+ type CompoundConditions<TVariants, TModifiers> = { [K in keyof TVariants]?: MaybeArray<keyof TVariants[K]> } & { [K in keyof TModifiers]?: MaybeArray<boolean> };
17
+ type SVDCompound<TVariants, TModifiers, TBase> = CompoundConditions<TVariants, TModifiers> & {
18
+ className: TBase extends Slots ? string | Partial<Record<keyof TBase, string>> : string;
19
+ };
20
+ interface SVDConfig<TBase extends string | Slots, TVariants extends Record<string, Record<string, string | Slots>>, TModifiers extends Record<string, ModifierValue>> {
21
+ base?: TBase;
22
+ variants?: TVariants;
23
+ modifiers?: TModifiers;
24
+ compound?: readonly SVDCompound<TVariants, TModifiers, TBase>[];
25
+ defaults?: {
26
+ variants?: { [K in keyof TVariants]?: keyof TVariants[K] };
27
+ modifiers?: { [K in keyof TModifiers]?: boolean };
28
+ };
29
+ }
30
+ type SVDGeneratorResult<TBase extends string | Slots, TVariants, TModifiers> = {
31
+ keys: string[];
32
+ base: TBase extends string ? string & string[] : TBase & string[];
33
+ variants: { [K in keyof TVariants]: TVariants[K][keyof TVariants[K]] } & string[];
34
+ modifiers: { [K in keyof TModifiers]: string } & string[];
35
+ compound: string[];
36
+ resolved: {
37
+ variants: { [K in keyof TVariants]: string };
38
+ modifiers: { [K in keyof TModifiers]: boolean };
39
+ };
40
+ } & string[];
41
+ //#endregion
42
+ //#region src/utils.d.ts
43
+ declare function splitProps<TProps extends object>(props: TProps, styleFn: KeyProviderFn): [Parameters<typeof styleFn>[0] & {
44
+ className?: string;
45
+ }, Omit<TProps, keyof Parameters<typeof styleFn>[0] | "className">];
46
+ //#endregion
47
+ //#region src/index.d.ts
48
+ declare function svd<TBase extends string | Slots, TVariants extends Record<string, Record<string, string | Slots>> = Record<string, never>, TModifiers extends Record<string, ModifierValue> = Record<string, never>>(config: SVDConfig<TBase, TVariants, TModifiers>): ((props: ComputeSVDProps<TVariants, TModifiers>) => SVDGeneratorResult<TBase, TVariants, TModifiers>) & {
49
+ config: SVDConfig<TBase, TVariants, TModifiers>;
50
+ };
51
+ //#endregion
52
+ export { type SVDProps, splitProps, svd };
package/dist/index.mjs ADDED
@@ -0,0 +1,131 @@
1
+ //#region src/utils.ts
2
+ function splitProps(props, styleFn) {
3
+ const filter = new Set([...styleFn({}).keys, "className"]);
4
+ const matched = {}, rest = {};
5
+ for (const key in props) (filter.has(key) ? matched : rest)[key] = props[key];
6
+ return [matched, rest];
7
+ }
8
+ //#endregion
9
+ //#region src/index.ts
10
+ function processBase(base) {
11
+ const parts = [];
12
+ const keys = {};
13
+ if (base) if (typeof base === "string") parts.push(base);
14
+ else for (const key in base) {
15
+ keys[key] = base[key];
16
+ if (base[key]) parts.push(base[key]);
17
+ }
18
+ return Object.assign(parts, keys);
19
+ }
20
+ function processVariants(variants, resolved) {
21
+ const parts = [];
22
+ const keys = {};
23
+ for (const vKey in variants) {
24
+ const activeOption = resolved[vKey];
25
+ const variantGroup = variants[vKey]?.[activeOption] ?? "";
26
+ if (typeof variantGroup === "string") {
27
+ keys[vKey] = variantGroup;
28
+ if (variantGroup) parts.push(variantGroup);
29
+ } else if (variantGroup && typeof variantGroup === "object") {
30
+ const variantSlotsParts = [];
31
+ const variantSlotsKeys = {};
32
+ for (const slotKey in variantGroup) {
33
+ if (variantGroup[slotKey]) {
34
+ parts.push(variantGroup[slotKey]);
35
+ variantSlotsParts.push(variantGroup[slotKey]);
36
+ }
37
+ variantSlotsKeys[slotKey] = variantGroup[slotKey];
38
+ }
39
+ keys[vKey] = Object.assign(variantSlotsParts, variantSlotsKeys);
40
+ }
41
+ }
42
+ return Object.assign(parts, keys);
43
+ }
44
+ function processModifiers(modifiers, resolved) {
45
+ const parts = [];
46
+ const keys = {};
47
+ for (const mKey in modifiers) {
48
+ const modifierConfig = modifiers[mKey];
49
+ const isTrue = resolved[mKey];
50
+ let activeClass = "";
51
+ if (typeof modifierConfig === "string") activeClass = isTrue ? modifierConfig : "";
52
+ else if (modifierConfig && typeof modifierConfig === "object") activeClass = (isTrue ? modifierConfig.true : modifierConfig.false) ?? "";
53
+ keys[mKey] = activeClass;
54
+ if (activeClass) parts.push(activeClass);
55
+ }
56
+ return Object.assign(parts, keys);
57
+ }
58
+ function processCompounds(compounds, resolvedState) {
59
+ const parts = [];
60
+ if (!compounds) return parts;
61
+ for (const compoundConfig of compounds) {
62
+ let matchesAll = true;
63
+ const currentCompound = compoundConfig;
64
+ for (const key in currentCompound) {
65
+ if (key === "className") continue;
66
+ const expectedValue = currentCompound[key];
67
+ const actualValue = resolvedState[key];
68
+ if (Array.isArray(expectedValue)) {
69
+ if (!expectedValue.includes(actualValue)) {
70
+ matchesAll = false;
71
+ break;
72
+ }
73
+ } else if (expectedValue !== actualValue) {
74
+ matchesAll = false;
75
+ break;
76
+ }
77
+ }
78
+ if (matchesAll && compoundConfig.className) if (typeof compoundConfig.className === "string") parts.push(compoundConfig.className);
79
+ else {
80
+ const slotsRecord = compoundConfig.className;
81
+ for (const slotKey in slotsRecord) {
82
+ const slotClass = slotsRecord[slotKey];
83
+ if (slotClass) parts.push(slotClass);
84
+ }
85
+ }
86
+ }
87
+ return parts;
88
+ }
89
+ function svd(config) {
90
+ const stylesGenerator = (props) => {
91
+ const resolvedVariants = {};
92
+ for (const key in config.variants) {
93
+ const firstAvailableKey = Object.keys(config.variants[key] || {})[0];
94
+ resolvedVariants[key] = props[key] ?? config.defaults?.variants?.[key] ?? firstAvailableKey;
95
+ }
96
+ const resolvedModifiers = {};
97
+ for (const key in config.modifiers || {}) resolvedModifiers[key] = props[key] ?? config.defaults?.modifiers?.[key] ?? false;
98
+ const baseResult = processBase(config.base);
99
+ const variantsResult = processVariants(config.variants || {}, resolvedVariants);
100
+ const modifiersResult = processModifiers(config.modifiers || {}, resolvedModifiers);
101
+ const mergedState = {
102
+ ...resolvedVariants,
103
+ ...resolvedModifiers
104
+ };
105
+ const compoundResult = processCompounds(config.compound, mergedState);
106
+ const totalParts = [
107
+ ...baseResult,
108
+ ...variantsResult,
109
+ ...modifiersResult,
110
+ ...compoundResult
111
+ ];
112
+ if (props.className) totalParts.push(props.className);
113
+ const variantKeys = Object.keys(config.variants ?? {});
114
+ const modifierKeys = Object.keys(config.modifiers ?? {});
115
+ return Object.assign(totalParts, {
116
+ keys: [...variantKeys, ...modifierKeys],
117
+ base: baseResult,
118
+ variants: variantsResult,
119
+ modifiers: modifiersResult,
120
+ compound: compoundResult,
121
+ resolved: {
122
+ variants: resolvedVariants,
123
+ modifiers: resolvedModifiers
124
+ }
125
+ });
126
+ };
127
+ stylesGenerator.config = config;
128
+ return stylesGenerator;
129
+ }
130
+ //#endregion
131
+ export { splitProps, svd };
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "svd-kit",
3
+ "version": "1.1.0",
4
+ "description": "Styling variance decomposition kit supporting base styles, variants, modifiers, and compound variants.",
5
+ "keywords": [
6
+ "svd",
7
+ "cva",
8
+ "styling",
9
+ "variants",
10
+ "modifiers",
11
+ "design-system",
12
+ "typescript"
13
+ ],
14
+ "type": "module",
15
+ "main": "./dist/index.js",
16
+ "module": "./dist/index.mjs",
17
+ "types": "./dist/index.d.ts",
18
+ "exports": {
19
+ ".": {
20
+ "types": {
21
+ "import": "./dist/index.d.mts",
22
+ "require": "./dist/index.d.cts"
23
+ },
24
+ "import": "./dist/index.mjs",
25
+ "require": "./dist/index.cjs"
26
+ }
27
+ },
28
+ "files": [
29
+ "dist"
30
+ ],
31
+ "scripts": {
32
+ "build": "tsdown",
33
+ "prepublishOnly": "pnpm build",
34
+ "test": "vitest run"
35
+ },
36
+ "author": "Eduardo Carvalho",
37
+ "license": "MIT",
38
+ "packageManager": "pnpm@10.33.0",
39
+ "devDependencies": {
40
+ "@types/node": "^25.9.1",
41
+ "clsx": "^2.1.1",
42
+ "tailwind-merge": "^3.6.0",
43
+ "tsdown": "^0.22.1",
44
+ "typescript": "^6.0.3",
45
+ "vitest": "^4.1.7"
46
+ }
47
+ }