@yamada-ui/utils 2.0.2-dev-20251022085007 → 2.0.2-dev-20251022091013

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.
@@ -1,18 +1,18 @@
1
1
  //#region src/index.types.d.ts
2
2
  type Primitive = bigint | boolean | null | number | string | symbol | undefined;
3
- type PathImpl<Y extends number | string | symbol, M> = Y extends number | string ? M extends Primitive ? `${Y}` : `${Y}.${Path<M>}` : ``;
3
+ type PathImpl<Y extends number | string | symbol, M$1> = Y extends number | string ? M$1 extends Primitive ? `${Y}` : `${Y}.${Path<M$1>}` : ``;
4
4
  type Path<Y> = Y extends any[] ? `${number}` : { [M in keyof Y]-?: PathImpl<M, Y[M]> }[keyof Y];
5
- type Value<Y extends Dict, M extends string> = M extends `${infer D}.${infer H}` ? Value<Y[D], H> : Y[M];
5
+ type Value<Y extends Dict, M$1 extends string> = M$1 extends `${infer D}.${infer H}` ? Value<Y[D], H> : Y[M$1];
6
6
  interface Dict<Y = any> {
7
7
  [key: string]: Y;
8
8
  }
9
9
  type Prettify<Y> = { [M in keyof Y]: Y[M] } & {};
10
- type FunctionOrValue<Y, M> = ((props: Y) => M) | M;
10
+ type FunctionOrValue<Y, M$1> = ((props: Y) => M$1) | M$1;
11
11
  type AnyString = string & {};
12
12
  type Booleanish<Y> = Y extends "false" | "true" ? boolean : Y;
13
13
  type Length<Y extends any[]> = Y["length"];
14
- type Merge<Y, M> = M & Omit<Y, keyof M>;
15
- type DeepMerge<Y, M> = Y extends any[] | Date | Function | Primitive ? M : Y extends object ? M extends object ? { [D in keyof M | keyof Y]: D extends keyof M ? D extends keyof Y ? DeepMerge<Y[D], M[D]> : M[D] : D extends keyof Y ? Y[D] : never } : M : M;
14
+ type Merge<Y, M$1> = M$1 & Omit<Y, keyof M$1>;
15
+ type DeepMerge<Y, M$1> = Y extends any[] | Date | Function | Primitive ? M$1 : Y extends object ? M$1 extends object ? { [D in keyof M$1 | keyof Y]: D extends keyof M$1 ? D extends keyof Y ? DeepMerge<Y[D], M$1[D]> : M$1[D] : D extends keyof Y ? Y[D] : never } : M$1 : M$1;
16
16
  type DeepPartial<Y> = Y extends any[] | Date | Function | Primitive ? Y : { [P in keyof Y]?: DeepPartial<Y[P]> };
17
17
  //#endregion
18
18
  export { AnyString, Booleanish, DeepMerge, DeepPartial, Dict, FunctionOrValue, Length, Merge, Path, Prettify, Primitive, Value };
@@ -1,35 +1,35 @@
1
1
  import { Dict } from "./index.types.js";
2
2
 
3
3
  //#region src/object.d.ts
4
- declare function omitObject<Y extends Dict, M extends keyof Y>(obj: Y, keys: M[] | readonly M[]): Omit<Y, M>;
5
- declare function pickObject<Y extends Dict, M extends keyof Y>(obj: Y, keys: M[] | readonly M[]): { [D in M]: Y[D] };
6
- declare function splitObject<Y extends Dict, M extends keyof Y>(obj: Y, funcOrKeys?: M[] | readonly M[]): [{ [D in M]: Y[D] }, Omit<Y, M>];
7
- declare function splitObject<Y extends Dict, M extends Dict>(obj: Dict, funcOrKeys?: (key: string) => boolean): [Y, M];
8
- declare function filterObject<Y extends Dict, M extends Dict>(obj: Y, func: (key: keyof Y, value: Y[keyof Y], obj: Y) => boolean): M;
9
- declare function filterUndefined<Y extends Dict>(obj: Y): Y;
4
+ declare function omitObject<Y$1 extends Dict, M extends keyof Y$1>(obj: Y$1, keys: M[] | readonly M[]): Omit<Y$1, M>;
5
+ declare function pickObject<Y$1 extends Dict, M extends keyof Y$1>(obj: Y$1, keys: M[] | readonly M[]): { [D in M]: Y$1[D] };
6
+ declare function splitObject<Y$1 extends Dict, M extends keyof Y$1>(obj: Y$1, funcOrKeys?: M[] | readonly M[]): [{ [D in M]: Y$1[D] }, Omit<Y$1, M>];
7
+ declare function splitObject<Y$1 extends Dict, M extends Dict>(obj: Dict, funcOrKeys?: (key: string) => boolean): [Y$1, M];
8
+ declare function filterObject<Y$1 extends Dict, M extends Dict>(obj: Y$1, func: (key: keyof Y$1, value: Y$1[keyof Y$1], obj: Y$1) => boolean): M;
9
+ declare function filterUndefined<Y$1 extends Dict>(obj: Y$1): Y$1;
10
10
  interface MergeOptions {
11
11
  debug?: boolean;
12
12
  mergeArray?: boolean;
13
13
  shouldProcess?: (value: any) => boolean;
14
14
  }
15
- declare function merge<Y extends Dict>(target: any, source: any, options?: MergeOptions): Y;
15
+ declare function merge<Y$1 extends Dict>(target: any, source: any, options?: MergeOptions): Y$1;
16
16
  interface FlattenObjectOptions {
17
17
  maxDepth?: number;
18
18
  separator?: string;
19
19
  shouldProcess?: (value: any) => boolean;
20
20
  }
21
- declare function flattenObject<Y extends Dict>(obj: any, {
21
+ declare function flattenObject<Y$1 extends Dict>(obj: any, {
22
22
  maxDepth,
23
23
  separator,
24
24
  shouldProcess
25
- }?: FlattenObjectOptions): Y;
26
- declare function objectKeys<Y extends object>(obj: Y): (keyof Y)[];
27
- declare function replaceObject<Y = any>(objOrArray: Y, callBack: (value: any) => any): Y;
25
+ }?: FlattenObjectOptions): Y$1;
26
+ declare function objectKeys<Y$1 extends object>(obj: Y$1): (keyof Y$1)[];
27
+ declare function replaceObject<Y$1 = any>(objOrArray: Y$1, callBack: (value: any) => any): Y$1;
28
28
  declare function getObject(obj: Dict | undefined, path: number | string, fallback?: any): any;
29
29
  declare function memoizeObject(func: typeof getObject): <Y>(obj: Dict, path: number | string, fallback?: any) => Y;
30
30
  declare const getMemoizedObject: <Y>(obj: Dict, path: number | string, fallback?: any) => Y;
31
- declare function wrapWithKey<Y>(obj: Y, key?: string): Y | {
32
- [key]: Y;
31
+ declare function wrapWithKey<Y$1>(obj: Y$1, key?: string): Y$1 | {
32
+ [key]: Y$1;
33
33
  };
34
34
  //#endregion
35
35
  export { FlattenObjectOptions, MergeOptions, filterObject, filterUndefined, flattenObject, getMemoizedObject, getObject, memoizeObject, merge, objectKeys, omitObject, pickObject, replaceObject, splitObject, wrapWithKey };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yamada-ui/utils",
3
3
  "type": "module",
4
- "version": "2.0.2-dev-20251022085007",
4
+ "version": "2.0.2-dev-20251022091013",
5
5
  "description": "The utilities for Yamada UI projects",
6
6
  "keywords": [
7
7
  "utils",