@oneplatformdev/utils 0.1.1-1 → 0.1.1-2

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.
@@ -0,0 +1,4 @@
1
+ import { type ClassValue } from "clsx";
2
+ export declare function cn(...inputs: ClassValue[]): string;
3
+ export default cn;
4
+ //# sourceMappingURL=cn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/cn/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AACD,eAAe,EAAE,CAAA"}
package/dist/cn/cn.js ADDED
@@ -0,0 +1,6 @@
1
+ import { clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+ export function cn(...inputs) {
4
+ return twMerge(clsx(inputs));
5
+ }
6
+ export default cn;
@@ -0,0 +1,2 @@
1
+ export { default, cn } from './cn';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cn/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC"}
@@ -0,0 +1 @@
1
+ export { default, cn } from './cn';
@@ -0,0 +1,4 @@
1
+ import type { Ref } from "react";
2
+ export declare function composeRefs<T>(...refs: Array<Ref<T> | undefined | null>): (node: T | null) => void;
3
+ export default composeRefs;
4
+ //# sourceMappingURL=composeRefs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composeRefs.d.ts","sourceRoot":"","sources":["../../src/composeRefs/composeRefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAe,MAAM,OAAO,CAAC;AAE9C,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC,IAC9D,MAAM,CAAC,GAAG,IAAI,UAOvB;AACD,eAAe,WAAW,CAAC"}
@@ -0,0 +1,13 @@
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
+ };
12
+ }
13
+ export default composeRefs;
@@ -0,0 +1,2 @@
1
+ export { default, composeRefs } from './composeRefs';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composeRefs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1 @@
1
+ export { default, composeRefs } from './composeRefs';
@@ -0,0 +1,4 @@
1
+ export * from './cn';
2
+ export * from './composeRefs';
3
+ export type * from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAC;AACrB,cAAc,eAAe,CAAC;AAC9B,mBAAmB,SAAS,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './cn';
2
+ export * from './composeRefs';
@@ -0,0 +1,2 @@
1
+ export type PartialOne<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
2
+ //# sourceMappingURL=PartialOne.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PartialOne.d.ts","sourceRoot":"","sources":["../../src/types/PartialOne.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export type * from './PartialOne';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,cAAc,CAAA"}
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,23 +1,6 @@
1
1
  {
2
2
  "name": "@oneplatformdev/utils",
3
- "version": "0.1.1-1",
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-web.git",
15
- "directory": "packages/utils"
16
- },
17
- "bugs": {
18
- "url": "https://github.com/oneplatformdev/core-web/issues"
19
- },
20
- "license": "MIT",
3
+ "version": "0.1.1-2",
21
4
  "type": "module",
22
5
  "main": "./dist/index.js",
23
6
  "module": "./dist/index.js",
@@ -25,12 +8,13 @@
25
8
  "exports": {
26
9
  "./package.json": "./package.json",
27
10
  ".": {
28
- "@oneplatformdev/workspace": "./src/index.ts",
11
+ "@oneplatformdev/source": "./src/index.ts",
29
12
  "types": "./dist/index.d.ts",
30
13
  "import": "./dist/index.js",
31
14
  "default": "./dist/index.js"
32
15
  },
33
16
  "./*": {
17
+ "@oneplatformdev/source": "./src/*.ts",
34
18
  "types": "./dist/*.d.ts",
35
19
  "import": "./dist/*.js",
36
20
  "default": "./dist/*.js"
@@ -41,6 +25,16 @@
41
25
  "!**/*.tsbuildinfo"
42
26
  ],
43
27
  "dependencies": {
28
+ "clsx": "^2.1.0",
29
+ "tailwind-merge": "^2.5.0",
44
30
  "tslib": "^2.3.0"
31
+ },
32
+ "peerDependencies": {
33
+ "react": ">=18"
34
+ },
35
+ "peerDependenciesMeta": {
36
+ "react": {
37
+ "optional": true
38
+ }
45
39
  }
46
40
  }