@yamada-ui/utils 1.3.0 → 1.3.1-dev-20240701030856
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/dist/color.d.mts +2 -2
- package/dist/color.d.ts +2 -2
- package/dist/function.d.mts +2 -2
- package/dist/function.d.ts +2 -2
- package/dist/index.types.d.mts +1 -1
- package/dist/index.types.d.ts +1 -1
- package/dist/index.types.js.map +1 -1
- package/package.json +1 -1
package/dist/color.d.mts
CHANGED
|
@@ -3,8 +3,8 @@ import { Dict } from './index.types.mjs';
|
|
|
3
3
|
type ColorMode = "light" | "dark";
|
|
4
4
|
type ColorFormat = "hex" | "hexa" | "rgba" | "rgb" | "hsl" | "hsla";
|
|
5
5
|
declare const tones: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
6
|
-
declare const isGray: (colorScheme: string) =>
|
|
7
|
-
declare const isAccessible: (colorScheme: string) =>
|
|
6
|
+
declare const isGray: (colorScheme: string) => colorScheme is "gray" | "neutral";
|
|
7
|
+
declare const isAccessible: (colorScheme: string) => colorScheme is "yellow" | "cyan" | "lime";
|
|
8
8
|
declare const getColor: (color: string, fallback?: string) => (theme?: Dict, colorMode?: ColorMode) => string;
|
|
9
9
|
declare const lightenColor: (color: string, amount: number) => (theme?: Dict, colorMode?: ColorMode) => string;
|
|
10
10
|
declare const darkenColor: (color: string, amount: number) => (theme?: Dict, colorMode?: ColorMode) => string;
|
package/dist/color.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { Dict } from './index.types.js';
|
|
|
3
3
|
type ColorMode = "light" | "dark";
|
|
4
4
|
type ColorFormat = "hex" | "hexa" | "rgba" | "rgb" | "hsl" | "hsla";
|
|
5
5
|
declare const tones: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
6
|
-
declare const isGray: (colorScheme: string) =>
|
|
7
|
-
declare const isAccessible: (colorScheme: string) =>
|
|
6
|
+
declare const isGray: (colorScheme: string) => colorScheme is "gray" | "neutral";
|
|
7
|
+
declare const isAccessible: (colorScheme: string) => colorScheme is "yellow" | "cyan" | "lime";
|
|
8
8
|
declare const getColor: (color: string, fallback?: string) => (theme?: Dict, colorMode?: ColorMode) => string;
|
|
9
9
|
declare const lightenColor: (color: string, amount: number) => (theme?: Dict, colorMode?: ColorMode) => string;
|
|
10
10
|
declare const darkenColor: (color: string, amount: number) => (theme?: Dict, colorMode?: ColorMode) => string;
|
package/dist/function.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const noop: () => void;
|
|
2
|
-
declare const runIfFunc: <T, U extends any
|
|
3
|
-
declare const handlerAll: <T extends (event: any, ...args: any[]) => void>(...funcs: (T | undefined)[]) => (event: T extends (event: infer R, ...args: any[]) => any ? R : never, ...args: T extends (event: any, ...args: infer
|
|
2
|
+
declare const runIfFunc: <T, U extends Array<any>>(valOrFunc: T | ((...funcArgs: U) => T), ...args: U) => T;
|
|
3
|
+
declare const handlerAll: <T extends (event: any, ...args: any[]) => void>(...funcs: (T | undefined)[]) => (event: T extends (event: infer R, ...args: any[]) => any ? R : never, ...args: T extends (event: any, ...args: infer R) => any ? R : never) => void;
|
|
4
4
|
declare const funcAll: <T extends (...args: any[]) => any>(...funcs: (T | undefined)[]) => (...args: T extends (...args: infer R) => any ? R : never) => void;
|
|
5
5
|
|
|
6
6
|
export { funcAll, handlerAll, noop, runIfFunc };
|
package/dist/function.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const noop: () => void;
|
|
2
|
-
declare const runIfFunc: <T, U extends any
|
|
3
|
-
declare const handlerAll: <T extends (event: any, ...args: any[]) => void>(...funcs: (T | undefined)[]) => (event: T extends (event: infer R, ...args: any[]) => any ? R : never, ...args: T extends (event: any, ...args: infer
|
|
2
|
+
declare const runIfFunc: <T, U extends Array<any>>(valOrFunc: T | ((...funcArgs: U) => T), ...args: U) => T;
|
|
3
|
+
declare const handlerAll: <T extends (event: any, ...args: any[]) => void>(...funcs: (T | undefined)[]) => (event: T extends (event: infer R, ...args: any[]) => any ? R : never, ...args: T extends (event: any, ...args: infer R) => any ? R : never) => void;
|
|
4
4
|
declare const funcAll: <T extends (...args: any[]) => any>(...funcs: (T | undefined)[]) => (...args: T extends (...args: infer R) => any ? R : never) => void;
|
|
5
5
|
|
|
6
6
|
export { funcAll, handlerAll, noop, runIfFunc };
|
package/dist/index.types.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ type Path<T> = {
|
|
|
5
5
|
}[keyof T];
|
|
6
6
|
type Dict<T = any> = Record<string, T>;
|
|
7
7
|
type ObjectLiteral = {};
|
|
8
|
-
type StringLiteral = string &
|
|
8
|
+
type StringLiteral = string & {};
|
|
9
9
|
type Union<T> = T | StringLiteral;
|
|
10
10
|
type Length = string | 0 | number;
|
|
11
11
|
type Merge<Y, M> = M extends undefined ? Y : Omit<Y, keyof M> & M;
|
package/dist/index.types.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ type Path<T> = {
|
|
|
5
5
|
}[keyof T];
|
|
6
6
|
type Dict<T = any> = Record<string, T>;
|
|
7
7
|
type ObjectLiteral = {};
|
|
8
|
-
type StringLiteral = string &
|
|
8
|
+
type StringLiteral = string & {};
|
|
9
9
|
type Union<T> = T | StringLiteral;
|
|
10
10
|
type Length = string | 0 | number;
|
|
11
11
|
type Merge<Y, M> = M extends undefined ? Y : Omit<Y, keyof M> & M;
|
package/dist/index.types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.types.ts"],"sourcesContent":["export type Primitive =\n | null\n | undefined\n | string\n | number\n | boolean\n | symbol\n | bigint\n\ntype PathImpl<K extends string | number | symbol, V> = K extends string | number\n ? V extends Primitive\n ? `${K}`\n : `${K}.${Path<V>}`\n : ``\n\nexport type Path<T> = {\n [K in keyof T]-?: PathImpl<K, T[K]>\n}[keyof T]\n\nexport type Dict<T = any> = Record<string, T>\n\nexport type ObjectLiteral = {}\n\nexport type StringLiteral = string &
|
|
1
|
+
{"version":3,"sources":["../src/index.types.ts"],"sourcesContent":["export type Primitive =\n | null\n | undefined\n | string\n | number\n | boolean\n | symbol\n | bigint\n\ntype PathImpl<K extends string | number | symbol, V> = K extends string | number\n ? V extends Primitive\n ? `${K}`\n : `${K}.${Path<V>}`\n : ``\n\nexport type Path<T> = {\n [K in keyof T]-?: PathImpl<K, T[K]>\n}[keyof T]\n\nexport type Dict<T = any> = Record<string, T>\n\nexport type ObjectLiteral = {}\n\nexport type StringLiteral = string & {}\n\nexport type Union<T> = T | StringLiteral\n\nexport type Length = string | 0 | number\n\nexport type Merge<Y, M> = M extends undefined ? Y : Omit<Y, keyof M> & M\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|