@oneplatformdev/utils 0.0.1 → 0.0.2-beta.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/cn/package.json +7 -0
- package/index.d.ts +3 -0
- package/index.mjs +6 -0
- package/isValidReactElement/index.d.ts +1 -0
- package/isValidReactElement/index.mjs +5 -0
- package/isValidReactElement/isValidReactElement.d.ts +18 -0
- package/isValidReactElement/isValidReactElement.mjs +1365 -0
- package/isValidReactElement/package.json +7 -0
- package/package.json +4 -3
- package/types/PartialOne.d.ts +1 -0
- package/types/PartialOne.mjs +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.mjs +1 -0
- package/types/package.json +7 -0
- package/.babelrc +0 -12
- package/build/README.md +0 -11
- package/build/index.d.ts +0 -1
- package/build/index.mjs +0 -4
- package/build/package.json +0 -53
- package/eslint.config.cjs +0 -12
- package/project.json +0 -9
- package/src/cn/cn.ts +0 -7
- package/src/cn/index.ts +0 -1
- package/src/index.ts +0 -1
- package/tsconfig.json +0 -18
- package/tsconfig.lib.json +0 -23
- package/vite.config.ts +0 -56
- /package/{build/cn → cn}/cn.d.ts +0 -0
- /package/{build/cn → cn}/cn.mjs +0 -0
- /package/{build/cn → cn}/index.d.ts +0 -0
- /package/{build/cn → cn}/index.mjs +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneplatformdev/utils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2-beta.12",
|
|
4
4
|
"description": "Utility functions for React components.",
|
|
5
5
|
"author": "One Platform Development Team",
|
|
6
6
|
"keywords": [
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"private": false,
|
|
38
38
|
"publishConfig": {
|
|
39
|
-
"directory": "build"
|
|
39
|
+
"directory": "build",
|
|
40
|
+
"registry": "https://registry.npmjs.org/"
|
|
40
41
|
},
|
|
41
42
|
"sideEffects": false,
|
|
42
43
|
"engines": {
|
|
@@ -50,4 +51,4 @@
|
|
|
50
51
|
"clsx": "^2.1.1",
|
|
51
52
|
"tailwind-merge": "^2.6.0"
|
|
52
53
|
}
|
|
53
|
-
}
|
|
54
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PartialOne<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from './PartialOne';
|
package/types/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/.babelrc
DELETED
package/build/README.md
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# @oneplatformdev/utils
|
|
2
|
-
|
|
3
|
-
This library was generated with [Nx](https://nx.dev).
|
|
4
|
-
|
|
5
|
-
```bush
|
|
6
|
-
npm instsall @oneplatformdev/utils clsx tailwind-merge
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## Running unit tests
|
|
10
|
-
|
|
11
|
-
Run `nx test utils` to execute the unit tests via [Vitest](https://vitest.dev/).
|
package/build/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './cn';
|
package/build/index.mjs
DELETED
package/build/package.json
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@oneplatformdev/utils",
|
|
3
|
-
"version": "0.0.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.git",
|
|
15
|
-
"directory": "packages/utils"
|
|
16
|
-
},
|
|
17
|
-
"bugs": {
|
|
18
|
-
"url": "https://github.com/oneplatformdev/core/issues"
|
|
19
|
-
},
|
|
20
|
-
"homepage": "private package",
|
|
21
|
-
"main": "./index.mjs",
|
|
22
|
-
"types": "./index.d.ts",
|
|
23
|
-
"type": "module",
|
|
24
|
-
"exports": {
|
|
25
|
-
".": {
|
|
26
|
-
"types": "./index.d.ts",
|
|
27
|
-
"import": "./index.mjs",
|
|
28
|
-
"default": "./index.mjs"
|
|
29
|
-
},
|
|
30
|
-
"./cn": {
|
|
31
|
-
"types": "./cn/index.d.ts",
|
|
32
|
-
"import": "./cn/index.mjs",
|
|
33
|
-
"default": "./cn/index.mjs"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"license": "MIT",
|
|
37
|
-
"private": false,
|
|
38
|
-
"publishConfig": {
|
|
39
|
-
"directory": "build"
|
|
40
|
-
},
|
|
41
|
-
"sideEffects": false,
|
|
42
|
-
"engines": {
|
|
43
|
-
"node": ">=20"
|
|
44
|
-
},
|
|
45
|
-
"scripts": {
|
|
46
|
-
"release": "pnpm publish",
|
|
47
|
-
"build": "vite build"
|
|
48
|
-
},
|
|
49
|
-
"peerDependencies": {
|
|
50
|
-
"clsx": "^2.1.1",
|
|
51
|
-
"tailwind-merge": "^2.6.0"
|
|
52
|
-
}
|
|
53
|
-
}
|
package/eslint.config.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const nx = require('@nx/eslint-plugin');
|
|
2
|
-
const baseConfig = require('../../eslint.config.cjs');
|
|
3
|
-
|
|
4
|
-
module.exports = [
|
|
5
|
-
...baseConfig,
|
|
6
|
-
...nx.configs['flat/react'],
|
|
7
|
-
{
|
|
8
|
-
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
9
|
-
// Override or add rules here
|
|
10
|
-
rules: {},
|
|
11
|
-
},
|
|
12
|
-
];
|
package/project.json
DELETED
package/src/cn/cn.ts
DELETED
package/src/cn/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default, cn } from './cn';
|
package/src/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './cn';
|
package/tsconfig.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"jsx": "react-jsx",
|
|
4
|
-
"allowJs": false,
|
|
5
|
-
"esModuleInterop": false,
|
|
6
|
-
"allowSyntheticDefaultImports": true,
|
|
7
|
-
"strict": true,
|
|
8
|
-
"types": ["vite/client"]
|
|
9
|
-
},
|
|
10
|
-
"files": [],
|
|
11
|
-
"include": [],
|
|
12
|
-
"references": [
|
|
13
|
-
{
|
|
14
|
-
"path": "./tsconfig.lib.json"
|
|
15
|
-
}
|
|
16
|
-
],
|
|
17
|
-
"extends": "../../tsconfig.base.json"
|
|
18
|
-
}
|
package/tsconfig.lib.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "../../dist/out-tsc",
|
|
5
|
-
"types": [
|
|
6
|
-
"node",
|
|
7
|
-
"@nx/react/typings/cssmodule.d.ts",
|
|
8
|
-
"@nx/react/typings/image.d.ts",
|
|
9
|
-
"vite/client"
|
|
10
|
-
]
|
|
11
|
-
},
|
|
12
|
-
"exclude": [
|
|
13
|
-
"**/*.spec.ts",
|
|
14
|
-
"**/*.test.ts",
|
|
15
|
-
"**/*.spec.tsx",
|
|
16
|
-
"**/*.test.tsx",
|
|
17
|
-
"**/*.spec.js",
|
|
18
|
-
"**/*.test.js",
|
|
19
|
-
"**/*.spec.jsx",
|
|
20
|
-
"**/*.test.jsx"
|
|
21
|
-
],
|
|
22
|
-
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
|
|
23
|
-
}
|
package/vite.config.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/// <reference types='vitest' />
|
|
2
|
-
import { defineConfig } from 'vite';
|
|
3
|
-
import react from '@vitejs/plugin-react';
|
|
4
|
-
import dts from 'vite-plugin-dts';
|
|
5
|
-
import * as path from 'path';
|
|
6
|
-
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
7
|
-
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
|
|
8
|
-
|
|
9
|
-
const entry = {
|
|
10
|
-
index: path.resolve(__dirname, 'src/index.ts'),
|
|
11
|
-
"cn/index": path.resolve(__dirname, 'src/cn/index.ts'),
|
|
12
|
-
"cn/cn": path.resolve(__dirname, 'src/cn/cn.ts'),
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export default defineConfig({
|
|
16
|
-
root: __dirname,
|
|
17
|
-
cacheDir: '../../node_modules/.vite/packages/utils',
|
|
18
|
-
plugins: [
|
|
19
|
-
react(),
|
|
20
|
-
nxViteTsPaths(),
|
|
21
|
-
nxCopyAssetsPlugin(['*.md']),
|
|
22
|
-
dts({
|
|
23
|
-
entryRoot: 'src',
|
|
24
|
-
tsconfigPath: path.join(__dirname, 'tsconfig.lib.json'),
|
|
25
|
-
}),
|
|
26
|
-
],
|
|
27
|
-
// Configuration for building your library.
|
|
28
|
-
// See: https://vitejs.dev/guide/build.html#library-mode
|
|
29
|
-
build: {
|
|
30
|
-
outDir: './build',
|
|
31
|
-
emptyOutDir: true,
|
|
32
|
-
reportCompressedSize: true,
|
|
33
|
-
commonjsOptions: {
|
|
34
|
-
transformMixedEsModules: true,
|
|
35
|
-
},
|
|
36
|
-
lib: {
|
|
37
|
-
entry,
|
|
38
|
-
name: 'utils',
|
|
39
|
-
formats: ['es'],
|
|
40
|
-
fileName: (format, entryName) => {
|
|
41
|
-
return format === 'es'
|
|
42
|
-
? `${entryName}.mjs`
|
|
43
|
-
: `${entryName}.${format}`
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
rollupOptions: {
|
|
47
|
-
external: ['clsx', 'tailwind-merge'],
|
|
48
|
-
output: {
|
|
49
|
-
exports: 'named',
|
|
50
|
-
globals: {
|
|
51
|
-
clsx: "clsx",
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
});
|
/package/{build/cn → cn}/cn.d.ts
RENAMED
|
File without changes
|
/package/{build/cn → cn}/cn.mjs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|