@foundrykit/utils 1.0.11 → 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.11",
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
  },
@@ -24,6 +28,7 @@
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,92 +0,0 @@
1
- # @foundrykit/utils
2
-
3
- ## 1.0.11
4
-
5
- ### Patch Changes
6
-
7
- - Updated dependencies [[`8c8ac3a`](https://github.com/umi-labs/foundry/commit/8c8ac3a8a75c08ff675bdfd22b99ea443a7a8f2c)]:
8
- - @foundrykit/types@3.2.0
9
-
10
- ## 1.0.10
11
-
12
- ### Patch Changes
13
-
14
- - Updated dependencies [[`38e546f`](https://github.com/umi-labs/foundry/commit/38e546fd881bf007e7038d15442d62529a10df99)]:
15
- - @foundrykit/types@3.1.0
16
-
17
- ## 1.0.9
18
-
19
- ### Patch Changes
20
-
21
- - Updated dependencies [[`0347ff7`](https://github.com/umi-labs/foundry/commit/0347ff740dee8188e0d13f7053d8962225caa105)]:
22
- - @foundrykit/types@3.0.1
23
-
24
- ## 1.0.8
25
-
26
- ### Patch Changes
27
-
28
- - Updated dependencies [[`f8b9faa`](https://github.com/umi-labs/foundry/commit/f8b9faa49e747e6a25b05f2be11c9b18319706d0), [`66409bd`](https://github.com/umi-labs/foundry/commit/66409bd67c511a8fc0096b479d46e95c8ef2e0b6)]:
29
- - @foundrykit/types@3.0.0
30
-
31
- ## 1.0.7
32
-
33
- ### Patch Changes
34
-
35
- - [#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.
36
-
37
- - Updated dependencies [[`b6fc94d`](https://github.com/umi-labs/foundry/commit/b6fc94d3b0f172aa309388f61bd5306af6405fdf)]:
38
- - @foundrykit/types@2.0.7
39
-
40
- ## 1.0.6
41
-
42
- ### Patch Changes
43
-
44
- - Just a quick demo for Anvar
45
-
46
- ## 1.0.5
47
-
48
- ### Patch Changes
49
-
50
- - Updating components and primitives as well as improving the registry demo
51
-
52
- ## 1.0.4
53
-
54
- ### Patch Changes
55
-
56
- - Update to add command, import transformations and configs for many files
57
-
58
- ## 1.0.3
59
-
60
- ### Patch Changes
61
-
62
- - Update to config version management and config paths
63
-
64
- ## 1.0.2
65
-
66
- ### Patch Changes
67
-
68
- - refactoring for build errors
69
-
70
- ## 1.0.1
71
-
72
- ### Patch Changes
73
-
74
- - Updating registry data
75
-
76
- ## 1.0.0
77
-
78
- ### Major Changes
79
-
80
- - Version alignment push
81
-
82
- ## 0.1.2
83
-
84
- ### Patch Changes
85
-
86
- - Updating versions to ensure they are inline
87
-
88
- ## 0.1.1
89
-
90
- ### Patch Changes
91
-
92
- - 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
- });