@oneplatformdev/utils 0.1.1-7 → 0.1.1-71
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/CHANGELOG.md +167 -0
- package/LICENSE +21 -0
- package/README.md +3 -3
- package/{dist/cn → cn}/cn.d.ts +1 -1
- package/cn/cn.js +9 -0
- package/cn/index.js +5 -0
- package/{dist/composeRefs → composeRefs}/composeRefs.d.ts +1 -1
- package/composeRefs/composeRefs.js +10 -0
- package/composeRefs/index.js +5 -0
- package/{dist/index.d.ts → index.d.ts} +1 -0
- package/{dist/index.d.ts.map → index.d.ts.map} +1 -1
- package/index.js +8 -0
- package/isValidReactElement/index.d.ts +2 -0
- package/isValidReactElement/index.d.ts.map +1 -0
- package/isValidReactElement/index.js +5 -0
- package/isValidReactElement/isValidReactElement.d.ts +18 -0
- package/isValidReactElement/isValidReactElement.d.ts.map +1 -0
- package/isValidReactElement/isValidReactElement.js +8 -0
- package/package.json +41 -21
- package/types/PartialOne.js +1 -0
- package/types/index.js +1 -0
- package/dist/cn/cn.js +0 -6
- package/dist/cn/index.js +0 -1
- package/dist/composeRefs/composeRefs.js +0 -13
- package/dist/composeRefs/index.js +0 -1
- package/dist/index.js +0 -2
- package/dist/types/PartialOne.js +0 -1
- package/dist/types/index.js +0 -1
- /package/{dist/cn → cn}/cn.d.ts.map +0 -0
- /package/{dist/cn → cn}/index.d.ts +0 -0
- /package/{dist/cn → cn}/index.d.ts.map +0 -0
- /package/{dist/composeRefs → composeRefs}/composeRefs.d.ts.map +0 -0
- /package/{dist/composeRefs → composeRefs}/index.d.ts +0 -0
- /package/{dist/composeRefs → composeRefs}/index.d.ts.map +0 -0
- /package/{dist/types → types}/PartialOne.d.ts +0 -0
- /package/{dist/types → types}/PartialOne.d.ts.map +0 -0
- /package/{dist/types → types}/index.d.ts +0 -0
- /package/{dist/types → types}/index.d.ts.map +0 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
## 0.1.1-71 (2025-09-16)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 0.1.1-70 (2025-09-16)
|
|
6
|
+
|
|
7
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
8
|
+
|
|
9
|
+
## 0.1.1-69 (2025-09-16)
|
|
10
|
+
|
|
11
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
12
|
+
|
|
13
|
+
## 0.1.1-68 (2025-09-16)
|
|
14
|
+
|
|
15
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
16
|
+
|
|
17
|
+
## 0.1.1-67 (2025-09-16)
|
|
18
|
+
|
|
19
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
20
|
+
|
|
21
|
+
## 0.1.1-66 (2025-09-16)
|
|
22
|
+
|
|
23
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
24
|
+
|
|
25
|
+
## 0.1.1-65 (2025-09-16)
|
|
26
|
+
|
|
27
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
28
|
+
|
|
29
|
+
## 0.1.1-64 (2025-09-15)
|
|
30
|
+
|
|
31
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
32
|
+
|
|
33
|
+
## 0.1.1-63 (2025-09-15)
|
|
34
|
+
|
|
35
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
36
|
+
|
|
37
|
+
## 0.1.1-62 (2025-09-15)
|
|
38
|
+
|
|
39
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
40
|
+
|
|
41
|
+
## 0.1.1-61 (2025-09-15)
|
|
42
|
+
|
|
43
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
44
|
+
|
|
45
|
+
## 0.1.1-60 (2025-09-15)
|
|
46
|
+
|
|
47
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
48
|
+
|
|
49
|
+
## 0.1.1-59 (2025-09-15)
|
|
50
|
+
|
|
51
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
52
|
+
|
|
53
|
+
## 0.1.1-58 (2025-09-15)
|
|
54
|
+
|
|
55
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
56
|
+
|
|
57
|
+
## 0.1.1-57 (2025-09-15)
|
|
58
|
+
|
|
59
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
60
|
+
|
|
61
|
+
## 0.1.1-56 (2025-09-15)
|
|
62
|
+
|
|
63
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
64
|
+
|
|
65
|
+
## 0.1.1-55 (2025-09-15)
|
|
66
|
+
|
|
67
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
68
|
+
|
|
69
|
+
## 0.1.1-54 (2025-09-15)
|
|
70
|
+
|
|
71
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
72
|
+
|
|
73
|
+
## 0.1.1-53 (2025-09-15)
|
|
74
|
+
|
|
75
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
76
|
+
|
|
77
|
+
## 0.1.1-52 (2025-09-15)
|
|
78
|
+
|
|
79
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
80
|
+
|
|
81
|
+
## 0.1.1-51 (2025-09-15)
|
|
82
|
+
|
|
83
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
84
|
+
|
|
85
|
+
## 0.1.1-50 (2025-09-15)
|
|
86
|
+
|
|
87
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
88
|
+
|
|
89
|
+
## 0.1.1-49 (2025-09-15)
|
|
90
|
+
|
|
91
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
92
|
+
|
|
93
|
+
## 0.1.1-48 (2025-09-15)
|
|
94
|
+
|
|
95
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
96
|
+
|
|
97
|
+
## 0.1.1-47 (2025-09-15)
|
|
98
|
+
|
|
99
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
100
|
+
|
|
101
|
+
## 0.1.1-46 (2025-09-15)
|
|
102
|
+
|
|
103
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
104
|
+
|
|
105
|
+
## 0.1.1-45 (2025-09-15)
|
|
106
|
+
|
|
107
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
108
|
+
|
|
109
|
+
## 0.1.1-44 (2025-09-15)
|
|
110
|
+
|
|
111
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
112
|
+
|
|
113
|
+
## 0.1.1-43 (2025-09-15)
|
|
114
|
+
|
|
115
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
116
|
+
|
|
117
|
+
## 0.1.1-41 (2025-09-15)
|
|
118
|
+
|
|
119
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
120
|
+
|
|
121
|
+
## 0.1.1-40 (2025-09-15)
|
|
122
|
+
|
|
123
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
124
|
+
|
|
125
|
+
## 0.1.1-39 (2025-09-15)
|
|
126
|
+
|
|
127
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
128
|
+
|
|
129
|
+
## 0.1.1-38 (2025-09-15)
|
|
130
|
+
|
|
131
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
132
|
+
|
|
133
|
+
## 0.1.1-37 (2025-09-15)
|
|
134
|
+
|
|
135
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
136
|
+
|
|
137
|
+
## 0.1.1-36 (2025-09-15)
|
|
138
|
+
|
|
139
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
140
|
+
|
|
141
|
+
## 0.1.1-35 (2025-09-11)
|
|
142
|
+
|
|
143
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
144
|
+
|
|
145
|
+
## 0.1.1-34 (2025-09-11)
|
|
146
|
+
|
|
147
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
148
|
+
|
|
149
|
+
## 0.1.1-32 (2025-09-11)
|
|
150
|
+
|
|
151
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
152
|
+
|
|
153
|
+
## 0.1.1-28 (2025-09-11)
|
|
154
|
+
|
|
155
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
156
|
+
|
|
157
|
+
## 0.1.1-27 (2025-09-11)
|
|
158
|
+
|
|
159
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
160
|
+
|
|
161
|
+
## 0.1.1-26 (2025-09-11)
|
|
162
|
+
|
|
163
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
|
164
|
+
|
|
165
|
+
## 0.1.1-25 (2025-09-11)
|
|
166
|
+
|
|
167
|
+
This was a version bump only for @oneplatformdev/utils to align it with other projects, there were no code changes.
|
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
|
-
##
|
|
5
|
+
## Running unit tests
|
|
6
6
|
|
|
7
|
-
Run `nx
|
|
7
|
+
Run `nx test @oneplatformdev/utils` to execute the unit tests via [Vitest](https://vitest.dev/).
|
package/{dist/cn → cn}/cn.d.ts
RENAMED
package/cn/cn.js
ADDED
package/cn/index.js
ADDED
|
@@ -1 +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"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAC;AACrB,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,mBAAmB,SAAS,CAAC"}
|
package/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { cn as r } from "./cn/cn.js";
|
|
2
|
+
import { composeRefs as t } from "./composeRefs/composeRefs.js";
|
|
3
|
+
import { isValidReactElement as p } from "./isValidReactElement/isValidReactElement.js";
|
|
4
|
+
export {
|
|
5
|
+
r as cn,
|
|
6
|
+
t as composeRefs,
|
|
7
|
+
p as isValidReactElement
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/isValidReactElement/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,IAAI,OAAO,EAAE,mBAAmB,EAAC,MAAM,uBAAuB,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { JSXElementConstructor, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Is Valid React Element.
|
|
4
|
+
*
|
|
5
|
+
* Where {@link ReactNode} represents everything that can be rendered, `ReactElement`
|
|
6
|
+
* only represents JSX.
|
|
7
|
+
* @returns boolean - value is valid react element or not
|
|
8
|
+
* @template Type The type of the component or tag
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* const isValid = isValidReactElement(targetElement);
|
|
13
|
+
* const isValidDiv = isValidReactElement(targetElement, 'div');
|
|
14
|
+
* const isValidButton = isValidReactElement(targetElement, Button);
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare const isValidReactElement: <Type extends string | JSXElementConstructor<any> = string | JSXElementConstructor<any>>(element: ReactNode, type?: Type) => boolean;
|
|
18
|
+
//# sourceMappingURL=isValidReactElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isValidReactElement.d.ts","sourceRoot":"","sources":["../../src/isValidReactElement/isValidReactElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,qBAAqB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,GAAI,IAAI,SAAS,MAAM,GAAG,qBAAqB,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,qBAAqB,CAAC,GAAG,CAAC,EACxH,SAAS,SAAS,EAClB,OAAO,IAAI,KACV,OAIF,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,37 +1,57 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneplatformdev/utils",
|
|
3
|
-
"version": "0.1.1-
|
|
3
|
+
"version": "0.1.1-71",
|
|
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
|
+
"private": false,
|
|
22
|
+
"license": "MIT",
|
|
4
23
|
"type": "module",
|
|
5
|
-
"main": "./
|
|
6
|
-
"module": "./
|
|
7
|
-
"types": "./
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
".": {
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
12
|
-
"import": "./dist/index.js",
|
|
13
|
-
"default": "./dist/index.js"
|
|
14
|
-
},
|
|
15
|
-
"./*": {
|
|
16
|
-
"types": "./dist/*.d.ts",
|
|
17
|
-
"import": "./dist/*.js",
|
|
18
|
-
"default": "./dist/*.js"
|
|
19
|
-
}
|
|
24
|
+
"main": "./index.js",
|
|
25
|
+
"module": "./index.js",
|
|
26
|
+
"types": "./index.d.ts",
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"directory": "dist"
|
|
20
29
|
},
|
|
21
30
|
"files": [
|
|
31
|
+
"**/*",
|
|
22
32
|
"dist",
|
|
23
33
|
"!**/*.tsbuildinfo"
|
|
24
34
|
],
|
|
25
35
|
"dependencies": {
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
36
|
+
"class-variance-authority": "^0.7.1",
|
|
37
|
+
"clsx": "^2.1.1",
|
|
38
|
+
"tailwind-merge": "^3.3.1"
|
|
29
39
|
},
|
|
30
40
|
"peerDependencies": {
|
|
31
|
-
"react": "
|
|
41
|
+
"react": "^19.0.0",
|
|
42
|
+
"react-dom": "^19.0.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"react": "19.1.1",
|
|
46
|
+
"react-dom": "19.1.1",
|
|
47
|
+
"@types/react": "19.x",
|
|
48
|
+
"@types/react-dom": "19.x"
|
|
32
49
|
},
|
|
33
50
|
"peerDependenciesMeta": {
|
|
34
|
-
"react": {
|
|
51
|
+
"@types/react": {
|
|
52
|
+
"optional": true
|
|
53
|
+
},
|
|
54
|
+
"@types/react-dom": {
|
|
35
55
|
"optional": true
|
|
36
56
|
}
|
|
37
57
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/types/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/dist/cn/cn.js
DELETED
package/dist/cn/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default, cn } from './cn';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default, composeRefs } from './composeRefs';
|
package/dist/index.js
DELETED
package/dist/types/PartialOne.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/types/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|