@chakra-ui/theme-utils
Advanced tools
Comparing version 0.0.0-dev-20230327175739 to 0.0.0-dev-20230329123951
import { Theme, ChakraTheme } from '@chakra-ui/theme'; | ||
declare type CloneKey<Target, Key> = Key extends keyof Target ? Target[Key] : unknown; | ||
declare type DeepPartial<T> = { | ||
type CloneKey<Target, Key> = Key extends keyof Target ? Target[Key] : unknown; | ||
type DeepPartial<T> = { | ||
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P]; | ||
@@ -12,9 +12,9 @@ }; | ||
*/ | ||
declare type DeepThemeExtension<BaseTheme, ThemeType> = { | ||
type DeepThemeExtension<BaseTheme, ThemeType> = { | ||
[Key in keyof BaseTheme]?: BaseTheme[Key] extends (...args: any[]) => any ? DeepThemeExtension<DeepPartial<ReturnType<BaseTheme[Key]>>, CloneKey<ThemeType, Key>> : BaseTheme[Key] extends Array<any> ? CloneKey<ThemeType, Key> : BaseTheme[Key] extends object ? DeepThemeExtension<DeepPartial<BaseTheme[Key]>, CloneKey<ThemeType, Key>> : CloneKey<ThemeType, Key>; | ||
}; | ||
declare type ThemeOverride<BaseTheme = Theme> = DeepPartial<ChakraTheme> & DeepThemeExtension<BaseTheme, ChakraTheme> & Record<string, any>; | ||
declare type ThemeExtension<Override extends ThemeOverride = ThemeOverride> = (themeOverride: Override) => Override; | ||
declare type AnyFunction<T = any> = (...args: T[]) => any; | ||
declare type BaseThemeWithExtensions<BaseTheme extends ChakraTheme, Extensions extends readonly [...any]> = BaseTheme & (Extensions extends [infer L, ...infer R] ? L extends AnyFunction ? ReturnType<L> & BaseThemeWithExtensions<BaseTheme, R> : L & BaseThemeWithExtensions<BaseTheme, R> : Extensions); | ||
type ThemeExtension<Override extends ThemeOverride = ThemeOverride> = (themeOverride: Override) => Override; | ||
type AnyFunction<T = any> = (...args: T[]) => any; | ||
type BaseThemeWithExtensions<BaseTheme extends ChakraTheme, Extensions extends readonly [...any]> = BaseTheme & (Extensions extends [infer L, ...infer R] ? L extends AnyFunction ? ReturnType<L> & BaseThemeWithExtensions<BaseTheme, R> : L & BaseThemeWithExtensions<BaseTheme, R> : Extensions); | ||
declare const extendTheme: (...extensions: (Record<string, any> | ((theme: Record<string, any>) => Record<string, any>))[]) => Record<string, any>; | ||
@@ -21,0 +21,0 @@ declare const extendBaseTheme: (...extensions: (Record<string, any> | ((theme: Record<string, any>) => Record<string, any>))[]) => Record<string, any>; |
{ | ||
"name": "@chakra-ui/theme-utils", | ||
"version": "0.0.0-dev-20230327175739", | ||
"version": "0.0.0-dev-20230329123951", | ||
"description": "", | ||
@@ -35,4 +35,4 @@ "keywords": [ | ||
"lodash.mergewith": "4.6.2", | ||
"@chakra-ui/styled-system": "2.7.0", | ||
"@chakra-ui/theme": "0.0.0-dev-20230327175739", | ||
"@chakra-ui/styled-system": "0.0.0-dev-20230329123951", | ||
"@chakra-ui/theme": "0.0.0-dev-20230329123951", | ||
"@chakra-ui/shared-utils": "2.0.5" | ||
@@ -39,0 +39,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45828
+ Added@chakra-ui/styled-system@0.0.0-dev-202303291239512.12.1(transitive)
+ Added@chakra-ui/theme@0.0.0-dev-20230329123951(transitive)
+ Added@chakra-ui/utils@2.2.3(transitive)
+ Added@types/lodash@4.17.13(transitive)
+ Added@types/lodash.mergewith@4.6.9(transitive)
+ Addedreact@19.0.0(transitive)
- Removed@chakra-ui/styled-system@2.7.0(transitive)
- Removed@chakra-ui/theme@0.0.0-dev-20230327175739(transitive)