@pandacss/types
Advanced tools
Comparing version 0.0.0-dev-20221220033401 to 0.0.0-dev-20221220144042
@@ -6,3 +6,3 @@ import type { LayerStyles, TextStyles } from './composition' | ||
import type { RecipeConfig } from './recipe' | ||
import type { Dict, RequiredBy, StringKeyOf } from './shared' | ||
import type { Dict, Extendable, RequiredBy, StringKeyOf, UnwrapExtend } from './shared' | ||
import type { SemanticTokens, Tokens as PartialTokens } from './tokens' | ||
@@ -84,12 +84,4 @@ import type { UtilityConfig } from './utility' | ||
*/ | ||
conditions?: TConditions | ||
conditions?: Extendable<TConditions> | ||
/** | ||
* The breakpoints for your project. | ||
*/ | ||
breakpoints?: Breakpoints | ||
/** | ||
* The css animation keyframes definitions. | ||
*/ | ||
keyframes?: CssKeyframes | ||
/** | ||
* The global styles for your project. | ||
@@ -99,30 +91,43 @@ */ | ||
/** | ||
* The design tokens for your project. | ||
* The theme configuration for your project. | ||
*/ | ||
tokens?: Tokens | ||
theme?: Extendable<{ | ||
/** | ||
* The breakpoints for your project. | ||
*/ | ||
breakpoints?: Breakpoints | ||
/** | ||
* The css animation keyframes definitions. | ||
*/ | ||
keyframes?: CssKeyframes | ||
/** | ||
* The design tokens for your project. | ||
*/ | ||
tokens?: Tokens | ||
/** | ||
* The semantic design tokens for your project. | ||
*/ | ||
semanticTokens?: SemanticTokens<StringKeyOf<Conditions> | StringKeyOf<Breakpoints> | 'base' | '_'> | ||
/** | ||
* The typography styles for your project. | ||
*/ | ||
textStyles?: TextStyles | ||
/** | ||
* The layer styles for your project. | ||
*/ | ||
layerStyles?: LayerStyles | ||
/** | ||
* Multi-variant style definitions for your project. | ||
* Useful for defining component styles. | ||
*/ | ||
recipes?: Record<string, RecipeConfig> | ||
}> | ||
/** | ||
* The semantic design tokens for your project. | ||
*/ | ||
semanticTokens?: SemanticTokens<StringKeyOf<Conditions> | StringKeyOf<Breakpoints> | 'base' | '_'> | ||
/** | ||
* The typography styles for your project. | ||
*/ | ||
textStyles?: TextStyles | ||
/** | ||
* The layer styles for your project. | ||
*/ | ||
layerStyles?: LayerStyles | ||
/** | ||
* The css utility definitions. | ||
*/ | ||
utilities?: UtilityConfig | ||
utilities?: Extendable<UtilityConfig> | ||
/** | ||
* Multi-variant style definitions for your project. | ||
* Useful for defining component styles. | ||
*/ | ||
recipes?: Record<string, RecipeConfig> | ||
/** | ||
* Common styling or layout patterns for your project. | ||
*/ | ||
patterns?: Record<string, PatternConfig> | ||
patterns?: Extendable<Record<string, PatternConfig>> | ||
/** | ||
@@ -156,2 +161,2 @@ * The framework to use for generating supercharged elements. | ||
export type UserConfig = RequiredBy<Config, 'outdir' | 'cwd' | 'include'> | ||
export type UserConfig = UnwrapExtend<RequiredBy<Config, 'outdir' | 'cwd' | 'include'>> |
@@ -18,1 +18,7 @@ export type Primitive = string | number | boolean | null | undefined | ||
export type Extendable<T> = T & { extend?: T } | ||
type Nullable<T> = T | null | undefined | ||
export type UnwrapExtend<T extends Record<string, unknown>> = { | ||
[K in keyof T]: T[K] extends Nullable<Extendable<infer U>> ? U : T[K] | ||
} |
{ | ||
"name": "@pandacss/types", | ||
"version": "0.0.0-dev-20221220033401", | ||
"version": "0.0.0-dev-20221220144042", | ||
"description": "The types for css panda", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.d.ts", |
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
879921
20461