@oneplatformdev/utils 0.1.1-17 → 0.1.1-21
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/package.json +4 -5
- package/.babelrc +0 -12
- package/src/cn/cn.ts +0 -7
- package/src/cn/index.ts +0 -1
- package/src/composeRefs/composeRefs.ts +0 -12
- package/src/composeRefs/index.ts +0 -1
- package/src/index.ts +0 -3
- package/src/types/PartialOne.ts +0 -1
- package/src/types/index.ts +0 -1
- package/tsconfig.json +0 -10
- package/tsconfig.lib.json +0 -34
- package/vite.config.ts +0 -54
- /package/{dist/cn → cn}/cn.d.ts +0 -0
- /package/{dist/cn → cn}/cn.d.ts.map +0 -0
- /package/{dist/cn → cn}/cn.js +0 -0
- /package/{dist/cn → cn}/index.d.ts +0 -0
- /package/{dist/cn → cn}/index.d.ts.map +0 -0
- /package/{dist/cn → cn}/index.js +0 -0
- /package/{dist/composeRefs → composeRefs}/composeRefs.d.ts +0 -0
- /package/{dist/composeRefs → composeRefs}/composeRefs.d.ts.map +0 -0
- /package/{dist/composeRefs → composeRefs}/composeRefs.js +0 -0
- /package/{dist/composeRefs → composeRefs}/index.d.ts +0 -0
- /package/{dist/composeRefs → composeRefs}/index.d.ts.map +0 -0
- /package/{dist/composeRefs → composeRefs}/index.js +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/index.d.ts.map → index.d.ts.map} +0 -0
- /package/{dist/index.js → index.js} +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}/PartialOne.js +0 -0
- /package/{dist/types → types}/index.d.ts +0 -0
- /package/{dist/types → types}/index.d.ts.map +0 -0
- /package/{dist/types → types}/index.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneplatformdev/utils",
|
|
3
|
-
"version": "0.1.1-
|
|
3
|
+
"version": "0.1.1-21",
|
|
4
4
|
"description": "Utility functions for React components.",
|
|
5
5
|
"author": "One Platform Development Team",
|
|
6
6
|
"keywords": [
|
|
@@ -38,13 +38,12 @@
|
|
|
38
38
|
"default": "./*.js"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"directory": "dist"
|
|
43
|
+
},
|
|
41
44
|
"files": [
|
|
42
45
|
"**/*",
|
|
43
46
|
"dist",
|
|
44
|
-
"*.js",
|
|
45
|
-
"*.d.ts",
|
|
46
|
-
"*/*.js",
|
|
47
|
-
"*/*.d.ts",
|
|
48
47
|
"README.md",
|
|
49
48
|
"LICENSE",
|
|
50
49
|
"!**/*.tsbuildinfo"
|
package/.babelrc
DELETED
package/src/cn/cn.ts
DELETED
package/src/cn/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default, cn } from './cn';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Ref, RefCallback } from "react";
|
|
2
|
-
|
|
3
|
-
export function composeRefs<T>(...refs: Array<Ref<T> | undefined | null>) {
|
|
4
|
-
return (node: T | null) => {
|
|
5
|
-
for (const ref of refs) {
|
|
6
|
-
if (!ref) continue;
|
|
7
|
-
if (typeof ref === "function") (ref as RefCallback<T>)(node);
|
|
8
|
-
else (ref as { current: T | null }).current = node;
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export default composeRefs;
|
package/src/composeRefs/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default, composeRefs } from './composeRefs';
|
package/src/index.ts
DELETED
package/src/types/PartialOne.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type PartialOne<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
package/src/types/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type * from './PartialOne'
|
package/tsconfig.json
DELETED
package/tsconfig.lib.json
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"module": "esnext",
|
|
5
|
-
"outDir": "dist",
|
|
6
|
-
"types": [
|
|
7
|
-
"node",
|
|
8
|
-
"@nx/react/typings/cssmodule.d.ts",
|
|
9
|
-
"@nx/react/typings/image.d.ts",
|
|
10
|
-
"vite/client"
|
|
11
|
-
],
|
|
12
|
-
"rootDir": "src",
|
|
13
|
-
"jsx": "react-jsx",
|
|
14
|
-
"tsBuildInfoFile": "dist/tsconfig.lib.tsbuildinfo"
|
|
15
|
-
},
|
|
16
|
-
"exclude": [
|
|
17
|
-
"out-tsc",
|
|
18
|
-
"dist",
|
|
19
|
-
"**/*.spec.ts",
|
|
20
|
-
"**/*.test.ts",
|
|
21
|
-
"**/*.spec.tsx",
|
|
22
|
-
"**/*.test.tsx",
|
|
23
|
-
"**/*.spec.js",
|
|
24
|
-
"**/*.test.js",
|
|
25
|
-
"**/*.spec.jsx",
|
|
26
|
-
"**/*.test.jsx"
|
|
27
|
-
],
|
|
28
|
-
"include": [
|
|
29
|
-
"src/**/*.js",
|
|
30
|
-
"src/**/*.jsx",
|
|
31
|
-
"src/**/*.ts",
|
|
32
|
-
"src/**/*.tsx"
|
|
33
|
-
]
|
|
34
|
-
}
|
package/vite.config.ts
DELETED
|
@@ -1,54 +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 { globSync } from 'glob';
|
|
7
|
-
|
|
8
|
-
export default defineConfig(() => ({
|
|
9
|
-
root: __dirname,
|
|
10
|
-
cacheDir: '../../node_modules/.vite/packages/utils',
|
|
11
|
-
plugins: [ react(), dts({
|
|
12
|
-
entryRoot: 'src',
|
|
13
|
-
tsconfigPath: path.join(__dirname, 'tsconfig.lib.json')
|
|
14
|
-
}) ],
|
|
15
|
-
// See: https://vitejs.dev/guide/build.html#library-mode
|
|
16
|
-
build: {
|
|
17
|
-
outDir: './dist',
|
|
18
|
-
emptyOutDir: true,
|
|
19
|
-
reportCompressedSize: true,
|
|
20
|
-
commonjsOptions: {
|
|
21
|
-
transformMixedEsModules: true,
|
|
22
|
-
},
|
|
23
|
-
sourcemap: false,
|
|
24
|
-
target: 'es2022',
|
|
25
|
-
lib: {
|
|
26
|
-
name: '@oneplatformdev/utils',
|
|
27
|
-
formats: [ 'es' as const ],
|
|
28
|
-
entry: {
|
|
29
|
-
index: path.resolve(__dirname, 'src/index.ts'),
|
|
30
|
-
...Object.fromEntries(
|
|
31
|
-
globSync('src/**/*.{ts,tsx}').map((filename) => {
|
|
32
|
-
return [
|
|
33
|
-
path.relative(
|
|
34
|
-
'src',
|
|
35
|
-
filename.slice(0, filename.length - path.extname(filename).length)
|
|
36
|
-
),
|
|
37
|
-
path.resolve(__dirname, filename),
|
|
38
|
-
]
|
|
39
|
-
})
|
|
40
|
-
)
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
rollupOptions: {
|
|
44
|
-
external: [ 'react', 'react-dom', 'react/jsx-runtime', "clsx", "tailwind-merge" ],
|
|
45
|
-
output: {
|
|
46
|
-
preserveModules: true,
|
|
47
|
-
preserveModulesRoot: 'src',
|
|
48
|
-
globals: {
|
|
49
|
-
clsx: 'clsx',
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
}));
|
/package/{dist/cn → cn}/cn.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/{dist/cn → cn}/cn.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{dist/cn → cn}/index.js
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|