@stitches/core
Advanced tools
Comparing version 1.0.0-canary.7 to 1.0.0-canary.8
{ | ||
"name": "@stitches/core", | ||
"version": "1.0.0-canary.7", | ||
"version": "1.0.0-canary.8", | ||
"description": "The modern CSS-in-JS library", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -109,82 +109,2 @@ import type * as CSS from './css' | ||
/** Returns a Style interface, leveraging the given media and style map. */ | ||
export type KnownCSS< | ||
Media = Default.Media, | ||
Theme = {}, | ||
ThemeMap = Default.ThemeMap, | ||
Utils = {} | ||
> = ( | ||
// nested at-rule css styles | ||
& { | ||
[K in Util.Prefixed<'@', keyof Media>]?: CSS<Media, Theme, ThemeMap, Utils> | ||
} | ||
// known property styles | ||
& { | ||
[K in keyof CSSProperties]?: ( | ||
| ValueByPropertyName<K> | ||
| TokenByPropertyName<K, Theme, ThemeMap> | ||
| CSS.Globals | ||
| ThemeUtil.ScaleValue | ||
) | ||
} | ||
// known utility styles | ||
& { | ||
[K in keyof Utils]?: ( | ||
K extends keyof CSSProperties | ||
? unknown | ||
: ( | ||
| ( | ||
Utils[K] extends (arg: infer P) => any | ||
? P extends any[] | ||
? ( | ||
$$PropertyValue extends keyof P[0] | ||
? ( | ||
| ValueByPropertyName<P[0][$$PropertyValue]> | ||
| TokenByPropertyName<P[0][$$PropertyValue], Theme, ThemeMap> | ||
| CSS.Globals | ||
| ThemeUtil.ScaleValue | ||
) | ||
: $$ScaleValue extends keyof P[0] | ||
? ( | ||
| TokenByScaleName<P[0][$$ScaleValue], Theme> | ||
| ThemeUtil.ScaleValue | ||
) | ||
: never | ||
)[] | ||
: $$PropertyValue extends keyof P | ||
? ( | ||
| ValueByPropertyName<P[$$PropertyValue]> | ||
| TokenByPropertyName<P[$$PropertyValue], Theme, ThemeMap> | ||
| CSS.Globals | ||
| ThemeUtil.ScaleValue | ||
) | ||
: $$ScaleValue extends keyof P | ||
? ( | ||
| TokenByScaleName<P[$$ScaleValue], Theme> | ||
| ThemeUtil.ScaleValue | ||
) | ||
: never | ||
: never | ||
) | ||
) | ||
) | ||
} | ||
// known theme styles | ||
& { | ||
[K in keyof ThemeMap]?: ( | ||
K extends keyof CSSProperties | ||
? unknown | ||
: K extends keyof CSSProperties | ||
? unknown | ||
: K extends keyof Utils | ||
? unknown | ||
: ( | ||
| CSS.Globals | ||
| Util.Index | ||
) | ||
) | ||
} | ||
) | ||
/** Unique symbol used to reference a property value. */ | ||
@@ -191,0 +111,0 @@ export declare const $$PropertyValue: unique symbol |
@@ -14,4 +14,3 @@ import type * as CSSUtil from './css-util' | ||
Utils = {}, | ||
CSS extends { [prelude: string]: unknown } = CSSUtil.CSS<Media, Theme, ThemeMap, Utils>, | ||
KnownCSS extends { [prelude: string]: unknown } = CSSUtil.KnownCSS<Media, Theme, ThemeMap, Utils> | ||
CSS extends { [prelude: string]: unknown } = CSSUtil.CSS<Media, Theme, ThemeMap, Utils> | ||
> { | ||
@@ -153,3 +152,3 @@ config: { | ||
[Prelude in keyof Composers[K]]: | ||
Prelude extends keyof KnownCSS | 'compoundVariants' | 'defaultVariants' | 'variants' | ||
Prelude extends keyof CSS | 'compoundVariants' | 'defaultVariants' | 'variants' | ||
? unknown | ||
@@ -156,0 +155,0 @@ : Composers[K][Prelude] extends Record<string, unknown> |
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
509190
10187