@stitches/react
Advanced tools
Comparing version 1.0.0-canary.3 to 1.0.0-canary.4
{ | ||
"name": "@stitches/react", | ||
"version": "1.0.0-canary.3", | ||
"version": "1.0.0-canary.4", | ||
"description": "The modern CSS-in-JS library", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -32,4 +32,3 @@ import type * as CSS from './css' | ||
| CSS.Globals | ||
| Util.Index | ||
| ThemeUtil.TokenInterface | ||
| ThemeUtil.ScaleValue | ||
) | ||
@@ -53,2 +52,3 @@ } | ||
| CSS.Globals | ||
| ThemeUtil.ScaleValue | ||
) | ||
@@ -58,2 +58,3 @@ : $$ScaleValue extends keyof P[0] | ||
| TokenByScaleName<P[0][$$ScaleValue], Theme> | ||
| ThemeUtil.ScaleValue | ||
) | ||
@@ -68,2 +69,3 @@ : never | ||
| CSS.Globals | ||
| ThemeUtil.ScaleValue | ||
) | ||
@@ -73,2 +75,3 @@ : $$ScaleValue extends keyof P | ||
| TokenByScaleName<P[$$ScaleValue], Theme> | ||
| ThemeUtil.ScaleValue | ||
) | ||
@@ -115,3 +118,3 @@ : never | ||
& { | ||
[K in Util.Prefixed<'@', keyof Media>]?: KnownCSS<Media, Theme, ThemeMap, Utils> | ||
[K in Util.Prefixed<'@', keyof Media>]?: CSS<Media, Theme, ThemeMap, Utils> | ||
} | ||
@@ -124,3 +127,3 @@ // known property styles | ||
| CSS.Globals | ||
| ThemeUtil.TokenInterface | ||
| ThemeUtil.ScaleValue | ||
) | ||
@@ -143,2 +146,3 @@ } | ||
| CSS.Globals | ||
| ThemeUtil.ScaleValue | ||
) | ||
@@ -148,2 +152,3 @@ : $$ScaleValue extends keyof P[0] | ||
| TokenByScaleName<P[0][$$ScaleValue], Theme> | ||
| ThemeUtil.ScaleValue | ||
) | ||
@@ -157,2 +162,3 @@ : never | ||
| CSS.Globals | ||
| ThemeUtil.ScaleValue | ||
) | ||
@@ -162,2 +168,3 @@ : $$ScaleValue extends keyof P | ||
| TokenByScaleName<P[$$ScaleValue], Theme> | ||
| ThemeUtil.ScaleValue | ||
) | ||
@@ -164,0 +171,0 @@ : never |
@@ -136,3 +136,3 @@ import type * as CSSUtil from './css-util' | ||
} | ||
& KnownCSS | ||
& CSS | ||
) | ||
@@ -179,3 +179,2 @@ : never | ||
? ( | ||
& KnownCSS | ||
& { | ||
@@ -217,3 +216,3 @@ /** The **variants** property sets variants. | ||
: Composers[K][Prelude] extends {} | ||
? CSS | ||
? CSS[Prelude] | ||
: boolean | number | string | ||
@@ -220,0 +219,0 @@ } |
@@ -10,3 +10,4 @@ import type * as CSSUtil from './css-util' | ||
Props = {}, | ||
Media = Default.Media | ||
Media = Default.Media, | ||
TransformedProps = TransformProps<Props, Media> | ||
> extends React.ForwardRefExoticComponent< | ||
@@ -17,3 +18,3 @@ Util.Assign< | ||
: never, | ||
Props & { as?: Type } | ||
TransformedProps & { as?: Type } | ||
> | ||
@@ -25,8 +26,11 @@ > { | ||
: As extends React.ComponentType<infer P> | ||
? Util.Assign<P, Props & { as: As }> | ||
? Util.Assign<P, TransformedProps & { as: As }> | ||
: As extends keyof JSX.IntrinsicElements | ||
? Util.Assign<JSX.IntrinsicElements[As], Props & { as: As }> | ||
? Util.Assign<JSX.IntrinsicElements[As], TransformedProps & { as: As }> | ||
: never | ||
): React.ReactElement | null | ||
className: string | ||
selector: string | ||
[$$StyledComponentType]: Type | ||
@@ -41,7 +45,8 @@ [$$StyledComponentProps]: Omit<Props, 'css'> | ||
Props = {}, | ||
Media = Default.Media | ||
Media = Default.Media, | ||
TransformedProps = TransformProps<Props, Media> | ||
> { | ||
( | ||
props?: | ||
& Props | ||
& TransformedProps | ||
& { | ||
@@ -67,10 +72,13 @@ [name in number | string]: any | ||
K extends 'css' | ||
? Props['css'] extends CSSUtil.CSS | ||
? Props['css'] | ||
: CSSUtil.CSS | ||
? unknown | ||
: | ||
| Props[K] | ||
| { | ||
[KMedia in Util.Prefixed<'@', 'initial' | keyof Media>]?: Props[K] | ||
} | ||
| ( | ||
& { | ||
[KMedia in Util.Prefixed<'@', 'initial' | keyof Media>]?: Props[K] | ||
} | ||
& { | ||
[KMedia in string]: Props[K] | ||
} | ||
) | ||
} | ||
@@ -77,0 +85,0 @@ |
@@ -1,2 +0,2 @@ | ||
export interface TokenInterface {} | ||
export interface ScaleValue {} | ||
@@ -15,3 +15,3 @@ export interface Token< | ||
PrefixType extends string | void = void, | ||
> extends TokenInterface { | ||
> extends ScaleValue { | ||
new (name: NameType, value: ValueType, scale?: ScaleType, prefix?: PrefixType): this | ||
@@ -18,0 +18,0 @@ |
Sorry, the diff of this file is too big to display
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
544906
33
10854