@stitches/core
Advanced tools
Comparing version 1.2.2 to 1.2.3
{ | ||
"name": "@stitches/core", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "The modern CSS-in-JS library", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -12,3 +12,2 @@ import type Stitches from './stitches' | ||
/** Returns a Style interface from a configuration, leveraging the given media and style map. */ | ||
export type CSS< | ||
@@ -37,12 +36,12 @@ Config extends { | ||
/** Returns a type that expects a value to be a kind of CSS property value. */ | ||
export type PropertyValue<K extends keyof CSSUtil.CSSProperties, C = null> = ( | ||
C extends null | ||
? { readonly [CSSUtil.$$PropertyValue]: K } | ||
: C extends { [K: string]: any } | ||
export type PropertyValue<Property extends keyof CSSUtil.CSSProperties, Config = null> = ( | ||
Config extends null | ||
? { readonly [K in CSSUtil.$$PropertyValue]: Property } | ||
: Config extends { [K: string]: any } | ||
? CSSUtil.CSS< | ||
C['media'], | ||
C['theme'], | ||
C['themeMap'], | ||
C['utils'] | ||
>[K] | ||
Config['media'], | ||
Config['theme'], | ||
Config['themeMap'], | ||
Config['utils'] | ||
>[Property] | ||
: never | ||
@@ -52,8 +51,8 @@ ) | ||
/** Returns a type that expects a value to be a kind of theme scale value. */ | ||
export type ScaleValue<K, C = null> = ( | ||
C extends null | ||
? { readonly [CSSUtil.$$ScaleValue]: K } | ||
: C extends { [K: string]: any } | ||
? K extends keyof C['theme'] | ||
? `$${string & keyof C['theme'][K]}` | ||
export type ScaleValue<Scale, Config = null> = ( | ||
Config extends null | ||
? { readonly [K in CSSUtil.$$ScaleValue]: Scale } | ||
: Config extends { [K: string]: any } | ||
? Scale extends keyof Config['theme'] | ||
? `$${string & keyof Config['theme'][Scale]}` | ||
: never | ||
@@ -60,0 +59,0 @@ : never |
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
510937