@oneplatformdev/utils 0.1.1-5 → 0.1.1-8

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
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 Oleh Maksimenko
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 CHANGED
@@ -1,7 +1,7 @@
1
- # utils
1
+ # @oneplatformdev/utils
2
2
 
3
3
  This library was generated with [Nx](https://nx.dev).
4
4
 
5
- ## Building
5
+ ## Running unit tests
6
6
 
7
- Run `nx build utils` to build the library.
7
+ Run `nx test @oneplatformdev/utils` to execute the unit tests via [Vitest](https://vitest.dev/).
package/dist/cn/cn.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type ClassValue } from "clsx";
1
+ import { ClassValue } from 'clsx';
2
2
  export declare function cn(...inputs: ClassValue[]): string;
3
3
  export default cn;
4
4
  //# sourceMappingURL=cn.d.ts.map
package/dist/cn/cn.js CHANGED
@@ -1,6 +1,9 @@
1
- import { clsx } from "clsx";
2
- import { twMerge } from "tailwind-merge";
3
- export function cn(...inputs) {
4
- return twMerge(clsx(inputs));
1
+ import { clsx as t } from "clsx";
2
+ import { twMerge as o } from "tailwind-merge";
3
+ function m(...r) {
4
+ return o(t(r));
5
5
  }
6
- export default cn;
6
+ export {
7
+ m as cn,
8
+ m as default
9
+ };
package/dist/cn/index.js CHANGED
@@ -1 +1,5 @@
1
- export { default, cn } from './cn';
1
+ import { cn as e, cn as f } from "./cn.js";
2
+ export {
3
+ e as cn,
4
+ f as default
5
+ };
@@ -1,4 +1,4 @@
1
- import type { Ref } from "react";
1
+ import { Ref } from 'react';
2
2
  export declare function composeRefs<T>(...refs: Array<Ref<T> | undefined | null>): (node: T | null) => void;
3
3
  export default composeRefs;
4
4
  //# sourceMappingURL=composeRefs.d.ts.map
@@ -1,13 +1,10 @@
1
- export function composeRefs(...refs) {
2
- return (node) => {
3
- for (const ref of refs) {
4
- if (!ref)
5
- continue;
6
- if (typeof ref === "function")
7
- ref(node);
8
- else
9
- ref.current = node;
10
- }
11
- };
1
+ function t(...o) {
2
+ return (f) => {
3
+ for (const e of o)
4
+ e && (typeof e == "function" ? e(f) : e.current = f);
5
+ };
12
6
  }
13
- export default composeRefs;
7
+ export {
8
+ t as composeRefs,
9
+ t as default
10
+ };
@@ -1 +1,5 @@
1
- export { default, composeRefs } from './composeRefs';
1
+ import { composeRefs as s, composeRefs as f } from "./composeRefs.js";
2
+ export {
3
+ s as composeRefs,
4
+ f as default
5
+ };
package/dist/index.js CHANGED
@@ -1,2 +1,6 @@
1
- export * from './cn';
2
- export * from './composeRefs';
1
+ import { cn as r } from "./cn/cn.js";
2
+ import { composeRefs as m } from "./composeRefs/composeRefs.js";
3
+ export {
4
+ r as cn,
5
+ m as composeRefs
6
+ };
@@ -1 +1 @@
1
- export {};
1
+
@@ -1 +1 @@
1
- export {};
1
+
package/package.json CHANGED
@@ -1,6 +1,24 @@
1
1
  {
2
2
  "name": "@oneplatformdev/utils",
3
- "version": "0.1.1-5",
3
+ "version": "0.1.1-8",
4
+ "description": "Utility functions for React components.",
5
+ "author": "One Platform Development Team",
6
+ "keywords": [
7
+ "clsx",
8
+ "cn",
9
+ "oneplatform",
10
+ "utils"
11
+ ],
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/oneplatformdev/core.git",
15
+ "directory": "packages/utils"
16
+ },
17
+ "bugs": {
18
+ "url": "https://github.com/oneplatformdev/core/issues"
19
+ },
20
+ "homepage": "private package",
21
+ "license": "MIT",
4
22
  "type": "module",
5
23
  "main": "./dist/index.js",
6
24
  "module": "./dist/index.js",
@@ -14,7 +32,6 @@
14
32
  "default": "./dist/index.js"
15
33
  },
16
34
  "./*": {
17
- "@oneplatformdev/source": "./src/*.ts",
18
35
  "types": "./dist/*.d.ts",
19
36
  "import": "./dist/*.js",
20
37
  "default": "./dist/*.js"
@@ -26,8 +43,7 @@
26
43
  ],
27
44
  "dependencies": {
28
45
  "clsx": "^2.1.0",
29
- "tailwind-merge": "^2.5.0",
30
- "tslib": "^2.3.0"
46
+ "tailwind-merge": "^2.5.0"
31
47
  },
32
48
  "peerDependencies": {
33
49
  "react": ">=18"