@chakra-ui/theme-utils
Advanced tools
Comparing version 0.0.0-dev-20221222051548 to 0.0.0-dev-20221223180742
@@ -1,44 +0,7 @@ | ||
import { Theme, ChakraTheme, ComponentDefaultProps } from '@chakra-ui/theme'; | ||
import { ThemingProps } from '@chakra-ui/styled-system'; | ||
declare type CloneKey<Target, Key> = Key extends keyof Target ? Target[Key] : unknown; | ||
declare type DeepPartial<T> = { | ||
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P]; | ||
}; | ||
/** | ||
* Represents a loose but specific type for the theme override. | ||
* It provides autocomplete hints for extending the theme, but leaves room | ||
* for adding properties. | ||
*/ | ||
declare 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); | ||
declare const extendTheme: (...extensions: (Record<string, any> | ((theme: Record<string, any>) => Record<string, any>))[]) => Record<string, any>; | ||
declare const extendBaseTheme: (...extensions: (Record<string, any> | ((theme: Record<string, any>) => Record<string, any>))[]) => Record<string, any>; | ||
declare function mergeThemeOverride(...overrides: any[]): any; | ||
declare function withDefaultColorScheme({ colorScheme, components, }: { | ||
colorScheme: ThemingProps["colorScheme"]; | ||
components?: string[] | Record<string, any>; | ||
}): ThemeExtension; | ||
declare function withDefaultSize({ size, components, }: { | ||
size: ThemingProps["size"]; | ||
components?: string[] | Record<string, any>; | ||
}): ThemeExtension; | ||
declare function withDefaultVariant({ variant, components, }: { | ||
variant: ThemingProps["variant"]; | ||
components?: string[] | Record<string, any>; | ||
}): ThemeExtension; | ||
declare function withDefaultProps({ defaultProps: { colorScheme, variant, size }, components, }: { | ||
defaultProps: ComponentDefaultProps; | ||
components?: string[] | Record<string, any>; | ||
}): (theme: Record<string, any>) => any; | ||
export { BaseThemeWithExtensions, DeepPartial, ThemeExtension, ThemeOverride, extendBaseTheme, extendTheme, mergeThemeOverride, withDefaultColorScheme, withDefaultProps, withDefaultSize, withDefaultVariant }; | ||
export { BaseThemeWithExtensions, DeepPartial, ThemeExtension, ThemeOverride, extendBaseTheme, extendTheme, mergeThemeOverride } from './extend-theme.js'; | ||
export { withDefaultColorScheme } from './theme-extensions/with-default-color-scheme.js'; | ||
export { withDefaultSize } from './theme-extensions/with-default-size.js'; | ||
export { withDefaultVariant } from './theme-extensions/with-default-variant.js'; | ||
export { withDefaultProps } from './theme-extensions/with-default-props.js'; | ||
import '@chakra-ui/theme'; | ||
import '@chakra-ui/styled-system'; |
{ | ||
"name": "@chakra-ui/theme-utils", | ||
"version": "0.0.0-dev-20221222051548", | ||
"version": "0.0.0-dev-20221223180742", | ||
"description": "", | ||
@@ -13,3 +13,3 @@ "keywords": [ | ||
"license": "MIT", | ||
"main": "dist/index.cjs.js", | ||
"main": "dist/index.js", | ||
"sideEffects": false, | ||
@@ -32,17 +32,26 @@ "files": [ | ||
"@types/lodash.mergewith": "4.6.6", | ||
"clean-package": "2.1.1", | ||
"@chakra-ui/shared-utils": "2.0.3" | ||
"clean-package": "2.1.1" | ||
}, | ||
"dependencies": { | ||
"lodash.mergewith": "4.6.2", | ||
"@chakra-ui/styled-system": "0.0.0-dev-20221222051548", | ||
"@chakra-ui/theme": "0.0.0-dev-20221222051548" | ||
"@chakra-ui/styled-system": "0.0.0-dev-20221223180742", | ||
"@chakra-ui/theme": "0.0.0-dev-20221223180742", | ||
"@chakra-ui/shared-utils": "0.0.0-dev-20221223180742" | ||
}, | ||
"module": "dist/index.esm.js", | ||
"clean-package": "../../../clean-package.config.json", | ||
"tsup": { | ||
"clean": true, | ||
"target": "es2019", | ||
"format": [ | ||
"cjs", | ||
"esm" | ||
] | ||
}, | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"import": "./dist/index.esm.js", | ||
"require": "./dist/index.cjs.js", | ||
"types": "./dist/index.d.ts" | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.js" | ||
}, | ||
@@ -52,8 +61,8 @@ "./package.json": "./package.json" | ||
"scripts": { | ||
"build": "tsup src/index.ts --format=esm,cjs --dts", | ||
"build": "tsup src --dts", | ||
"dev": "pnpm build -- --watch", | ||
"clean": "rimraf dist .turbo", | ||
"typecheck": "tsc --noEmit", | ||
"build:fast": "tsup src/index.ts --format=esm,cjs" | ||
"build:fast": "tsup src" | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
45895
2
30
1246
4
1
+ Added@chakra-ui/anatomy@0.0.0-dev-20221223180742(transitive)
+ Added@chakra-ui/shared-utils@0.0.0-dev-20221223180742(transitive)
+ Added@chakra-ui/styled-system@0.0.0-dev-20221223180742(transitive)
+ Added@chakra-ui/theme@0.0.0-dev-20221223180742(transitive)
+ Added@chakra-ui/theme-tools@0.0.0-dev-20221223180742(transitive)
- Removed@chakra-ui/anatomy@2.1.0(transitive)
- Removed@chakra-ui/styled-system@0.0.0-dev-202212220515482.12.1(transitive)
- Removed@chakra-ui/theme@0.0.0-dev-20221222051548(transitive)
- Removed@chakra-ui/theme-tools@2.0.14(transitive)
- Removed@chakra-ui/utils@2.2.3(transitive)
- Removed@types/lodash@4.17.13(transitive)
- Removed@types/lodash.mergewith@4.6.9(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedreact@18.3.1(transitive)