@oneplatformdev/utils 0.0.2-beta.7 → 0.1.1-1

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/README.md CHANGED
@@ -1,11 +1,7 @@
1
- # @oneplatformdev/utils
1
+ # utils
2
2
 
3
3
  This library was generated with [Nx](https://nx.dev).
4
4
 
5
- ```bush
6
- npm instsall @oneplatformdev/utils clsx tailwind-merge
7
- ```
5
+ ## Building
8
6
 
9
- ## Running unit tests
10
-
11
- Run `nx test utils` to execute the unit tests via [Vitest](https://vitest.dev/).
7
+ Run `nx build utils` to build the library.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneplatformdev/utils",
3
- "version": "0.0.2-beta.7",
3
+ "version": "0.1.1-1",
4
4
  "description": "Utility functions for React components.",
5
5
  "author": "One Platform Development Team",
6
6
  "keywords": [
@@ -11,44 +11,36 @@
11
11
  ],
12
12
  "repository": {
13
13
  "type": "git",
14
- "url": "git+https://github.com/oneplatformdev/core.git",
14
+ "url": "git+https://github.com/oneplatformdev/core-web.git",
15
15
  "directory": "packages/utils"
16
16
  },
17
17
  "bugs": {
18
- "url": "https://github.com/oneplatformdev/core/issues"
18
+ "url": "https://github.com/oneplatformdev/core-web/issues"
19
19
  },
20
- "homepage": "private package",
21
- "main": "./index.mjs",
22
- "types": "./index.d.ts",
20
+ "license": "MIT",
23
21
  "type": "module",
22
+ "main": "./dist/index.js",
23
+ "module": "./dist/index.js",
24
+ "types": "./dist/index.d.ts",
24
25
  "exports": {
26
+ "./package.json": "./package.json",
25
27
  ".": {
26
- "types": "./index.d.ts",
27
- "import": "./index.mjs",
28
- "default": "./index.mjs"
28
+ "@oneplatformdev/workspace": "./src/index.ts",
29
+ "types": "./dist/index.d.ts",
30
+ "import": "./dist/index.js",
31
+ "default": "./dist/index.js"
29
32
  },
30
- "./cn": {
31
- "types": "./cn/index.d.ts",
32
- "import": "./cn/index.mjs",
33
- "default": "./cn/index.mjs"
33
+ "./*": {
34
+ "types": "./dist/*.d.ts",
35
+ "import": "./dist/*.js",
36
+ "default": "./dist/*.js"
34
37
  }
35
38
  },
36
- "license": "MIT",
37
- "private": false,
38
- "publishConfig": {
39
- "directory": "build",
40
- "registry": "https://registry.npmjs.org/"
41
- },
42
- "sideEffects": false,
43
- "engines": {
44
- "node": ">=20"
45
- },
46
- "scripts": {
47
- "release": "pnpm publish",
48
- "build": "vite build"
49
- },
50
- "peerDependencies": {
51
- "clsx": "^2.1.1",
52
- "tailwind-merge": "^2.6.0"
39
+ "files": [
40
+ "dist",
41
+ "!**/*.tsbuildinfo"
42
+ ],
43
+ "dependencies": {
44
+ "tslib": "^2.3.0"
53
45
  }
54
- }
46
+ }
package/cn/cn.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import { ClassValue } from 'clsx';
2
-
3
- export declare function cn(...inputs: ClassValue[]): string;
4
- export default cn;
package/cn/cn.mjs DELETED
@@ -1,9 +0,0 @@
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
- }
6
- export {
7
- m as cn,
8
- m as default
9
- };
package/cn/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export { default, cn } from './cn';
package/cn/index.mjs DELETED
@@ -1,5 +0,0 @@
1
- import { cn as e, cn as f } from "./cn.mjs";
2
- export {
3
- e as cn,
4
- f as default
5
- };
package/cn/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "sideEffects": false,
3
- "main": "./index.mjs",
4
- "module": "./index.mjs",
5
- "default": "./index.mjs",
6
- "types": "./index.d.ts"
7
- }
package/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './cn';
2
- export * from './isValidReactElement';
package/index.mjs DELETED
@@ -1,6 +0,0 @@
1
- import { cn as r } from "./cn/cn.mjs";
2
- import { isValidReactElement as m } from "./isValidReactElement/isValidReactElement.mjs";
3
- export {
4
- r as cn,
5
- m as isValidReactElement
6
- };
@@ -1 +0,0 @@
1
- export { isValidReactElement as default, isValidReactElement } from './isValidReactElement';
@@ -1,5 +0,0 @@
1
- import { isValidReactElement as t, isValidReactElement as l } from "./isValidReactElement.mjs";
2
- export {
3
- t as default,
4
- l as isValidReactElement
5
- };
@@ -1,18 +0,0 @@
1
- import { JSXElementConstructor, ReactNode } from 'react';
2
-
3
- /**
4
- * Is Valid React Element.
5
- *
6
- * Where {@link ReactNode} represents everything that can be rendered, `ReactElement`
7
- * only represents JSX.
8
- * @returns boolean - value is valid react element or not
9
- * @template Type The type of the component or tag
10
- *
11
- * @example
12
- * ```tsx
13
- * const isValid = isValidReactElement(targetElement);
14
- * const isValidDiv = isValidReactElement(targetElement, 'div');
15
- * const isValidButton = isValidReactElement(targetElement, Button);
16
- * ```
17
- */
18
- export declare const isValidReactElement: <Type extends string | JSXElementConstructor<any> = string | JSXElementConstructor<any>>(element: ReactNode, type?: Type) => boolean;