@stitches/core
Advanced tools
Comparing version 1.0.0-canary.6 to 1.0.0-canary.7
{ | ||
"name": "@stitches/core", | ||
"version": "1.0.0-canary.6", | ||
"version": "1.0.0-canary.7", | ||
"description": "The modern CSS-in-JS library", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -87,3 +87,8 @@ import type * as CSSUtil from './css-util' | ||
[Scale in keyof Theme]: { | ||
[Token in keyof Theme[Scale]]: ThemeUtil.Token<Extract<Token, string | number>, string, Extract<Scale, string>, Prefix> | ||
[Token in keyof Theme[Scale]]: ThemeUtil.Token< | ||
Extract<Token, string | number>, | ||
string, | ||
Extract<Scale, string>, | ||
Extract<Prefix, string | void> | ||
> | ||
} | ||
@@ -150,4 +155,4 @@ } | ||
? unknown | ||
: Composers[K][Prelude] extends {} | ||
? CSS[Prelude] | ||
: Composers[K][Prelude] extends Record<string, unknown> | ||
? CSS | ||
: boolean | number | string | ||
@@ -162,4 +167,5 @@ } | ||
StyledComponent.StyledComponentType<Composers>, | ||
StyledComponent.StyledComponentProps<Composers> & { css?: CSS }, | ||
Media | ||
StyledComponent.StyledComponentProps<Composers>, | ||
Media, | ||
CSS | ||
> | ||
@@ -172,8 +178,8 @@ }, | ||
[Token in keyof Values[Scale]]: ThemeUtil.Token< | ||
Token, | ||
Extract<Token, number | string>, | ||
Values[Scale][Token], | ||
Scale, | ||
Prefix | ||
Extract<Scale, string | void>, | ||
Extract<Prefix, string | void> | ||
> | ||
} | ||
} |
@@ -1,2 +0,1 @@ | ||
import type * as CSSUtil from './css-util' | ||
import type * as Default from './default' | ||
@@ -10,3 +9,4 @@ import type * as Util from './util' | ||
Media = Default.Media, | ||
TransformedProps = TransformProps<Omit<Props, 'css'>, Media> & { css?: Props['css'] } | ||
CSS = {}, | ||
TransformedProps = TransformProps<Props, Media> | ||
> { | ||
@@ -17,2 +17,5 @@ ( | ||
& { | ||
css?: CSS | ||
} | ||
& { | ||
[name in number | string]: any | ||
@@ -23,3 +26,3 @@ } | ||
selector: string | ||
props: object | ||
props: {} | ||
} | ||
@@ -31,3 +34,3 @@ | ||
[$$StyledComponentType]: Type | ||
[$$StyledComponentProps]: Omit<Props, 'css'> | ||
[$$StyledComponentProps]: Props | ||
[$$StyledComponentMedia]: Media | ||
@@ -37,12 +40,13 @@ } | ||
export type TransformProps<Props, Media> = { | ||
[K in keyof Props]: | ||
K extends 'css' | ||
? Props['css'] extends CSSUtil.CSS | ||
? Props['css'] | ||
: CSSUtil.CSS | ||
: | ||
| Props[K] | ||
| { | ||
[K in keyof Props]: ( | ||
| Props[K] | ||
| ( | ||
& { | ||
[KMedia in Util.Prefixed<'@', 'initial' | keyof Media>]?: Props[K] | ||
} | ||
& { | ||
[KMedia in string]: Props[K] | ||
} | ||
) | ||
) | ||
} | ||
@@ -49,0 +53,0 @@ |
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
511075
10266