Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@chakra-ui/theme-utils

Package Overview
Dependencies
Maintainers
3
Versions
194
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/theme-utils - npm Package Compare versions

Comparing version 0.0.0-dev-20221222051548 to 0.0.0-dev-20221223180742

dist/chunk-AQYX3YP4.mjs

51

dist/index.d.ts

@@ -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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc