@foundrykit/utils 1.0.10 → 1.0.12

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/package.json CHANGED
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "@foundrykit/utils",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "sideEffects": false,
9
13
  "publishConfig": {
10
14
  "access": "public"
11
15
  },
@@ -18,12 +22,13 @@
18
22
  "dependencies": {
19
23
  "clsx": "^2.1.1",
20
24
  "tailwind-merge": "^3.3.1",
21
- "@foundrykit/types": "3.1.0"
25
+ "@foundrykit/types": "3.2.0"
22
26
  },
23
27
  "devDependencies": {
24
28
  "@types/node": "^20.19.9",
25
29
  "tsup": "^8.0.0",
26
30
  "typescript": "^5.9.2",
31
+ "vitest": "^3.2.4",
27
32
  "@foundrykit/typescript-config": "1.0.6"
28
33
  },
29
34
  "repository": {
@@ -34,6 +39,7 @@
34
39
  "scripts": {
35
40
  "build": "tsup",
36
41
  "dev": "tsup --watch",
37
- "type-check": "tsc --noEmit"
42
+ "type-check": "tsc --noEmit",
43
+ "test": "vitest run"
38
44
  }
39
45
  }
package/CHANGELOG.md DELETED
@@ -1,85 +0,0 @@
1
- # @foundrykit/utils
2
-
3
- ## 1.0.10
4
-
5
- ### Patch Changes
6
-
7
- - Updated dependencies [[`38e546f`](https://github.com/umi-labs/foundry/commit/38e546fd881bf007e7038d15442d62529a10df99)]:
8
- - @foundrykit/types@3.1.0
9
-
10
- ## 1.0.9
11
-
12
- ### Patch Changes
13
-
14
- - Updated dependencies [[`0347ff7`](https://github.com/umi-labs/foundry/commit/0347ff740dee8188e0d13f7053d8962225caa105)]:
15
- - @foundrykit/types@3.0.1
16
-
17
- ## 1.0.8
18
-
19
- ### Patch Changes
20
-
21
- - Updated dependencies [[`f8b9faa`](https://github.com/umi-labs/foundry/commit/f8b9faa49e747e6a25b05f2be11c9b18319706d0), [`66409bd`](https://github.com/umi-labs/foundry/commit/66409bd67c511a8fc0096b479d46e95c8ef2e0b6)]:
22
- - @foundrykit/types@3.0.0
23
-
24
- ## 1.0.7
25
-
26
- ### Patch Changes
27
-
28
- - [#43](https://github.com/umi-labs/foundry/pull/43) [`b6fc94d`](https://github.com/umi-labs/foundry/commit/b6fc94d3b0f172aa309388f61bd5306af6405fdf) Thanks [@sneddonisaac](https://github.com/sneddonisaac)! - Package metadata now points at the `umi-labs/foundry` monorepo, and releases publish through npm trusted publishing.
29
-
30
- - Updated dependencies [[`b6fc94d`](https://github.com/umi-labs/foundry/commit/b6fc94d3b0f172aa309388f61bd5306af6405fdf)]:
31
- - @foundrykit/types@2.0.7
32
-
33
- ## 1.0.6
34
-
35
- ### Patch Changes
36
-
37
- - Just a quick demo for Anvar
38
-
39
- ## 1.0.5
40
-
41
- ### Patch Changes
42
-
43
- - Updating components and primitives as well as improving the registry demo
44
-
45
- ## 1.0.4
46
-
47
- ### Patch Changes
48
-
49
- - Update to add command, import transformations and configs for many files
50
-
51
- ## 1.0.3
52
-
53
- ### Patch Changes
54
-
55
- - Update to config version management and config paths
56
-
57
- ## 1.0.2
58
-
59
- ### Patch Changes
60
-
61
- - refactoring for build errors
62
-
63
- ## 1.0.1
64
-
65
- ### Patch Changes
66
-
67
- - Updating registry data
68
-
69
- ## 1.0.0
70
-
71
- ### Major Changes
72
-
73
- - Version alignment push
74
-
75
- ## 0.1.2
76
-
77
- ### Patch Changes
78
-
79
- - Updating versions to ensure they are inline
80
-
81
- ## 0.1.1
82
-
83
- ### Patch Changes
84
-
85
- - basic test
package/src/config.ts DELETED
@@ -1,28 +0,0 @@
1
- import type { ComponentConfig } from '@foundrykit/types';
2
-
3
- export const utilsConfig: ComponentConfig = {
4
- name: 'Utils',
5
- description: 'Utility functions for className merging and common helpers',
6
- category: 'primitives',
7
- tags: ['utility', 'helper', 'cn', 'classnames'],
8
- preview: {
9
- type: 'static',
10
- html: '<div class="flex h-12 w-full items-center justify-center rounded-md bg-gray-200"><code class="text-xs">cn(...classes)</code></div>',
11
- },
12
- variants: [],
13
- dependencies: [],
14
- packageDependencies: ['clsx', 'tailwind-merge'],
15
- files: ['lib/utils.ts'],
16
- usageExample: `// Basic usage
17
- const className = cn('base-class', 'additional-class', {
18
- 'conditional-class': true,
19
- 'another-conditional': false
20
- });
21
-
22
- // With Tailwind class merging
23
- const buttonClass = cn(
24
- 'px-2 py-1 rounded',
25
- 'px-4', // This will override px-2
26
- className
27
- );`,
28
- };
package/src/index.ts DELETED
@@ -1,13 +0,0 @@
1
- import { type ClassValue, clsx } from 'clsx';
2
- import { twMerge } from 'tailwind-merge';
3
-
4
- /**
5
- * Merges class name inputs with `clsx` and resolves conflicting Tailwind CSS
6
- * utilities with `tailwind-merge`, returning a single className string.
7
- *
8
- * @param inputs - Class values (strings, arrays, objects, conditionals).
9
- * @returns The merged, conflict-resolved className string.
10
- */
11
- export function cn(...inputs: ClassValue[]) {
12
- return twMerge(clsx(inputs));
13
- }
package/tsconfig.json DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "@foundrykit/typescript-config/base.json",
3
- "compilerOptions": {
4
- "outDir": "dist",
5
- "rootDir": "src"
6
- },
7
- "include": ["src/**/*"],
8
- "exclude": ["dist", "node_modules"]
9
- }
package/tsup.config.ts DELETED
@@ -1,11 +0,0 @@
1
- import { defineConfig } from 'tsup';
2
-
3
- export default defineConfig({
4
- entry: ['src/index.ts'],
5
- format: ['esm'],
6
- dts: true,
7
- splitting: false,
8
- sourcemap: true,
9
- clean: true,
10
- external: [],
11
- });