@glitz/type
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -15,4 +15,4 @@ import * as CSS from 'csstype'; | ||
ExtendedProperties { | ||
'@keyframes'?: UntransformedPropertiesList; | ||
'@font-face'?: FontFace; | ||
'@keyframes'?: FeaturedPropertiesList; | ||
'@font-face'?: FeaturedFontFace; | ||
} | ||
@@ -22,3 +22,3 @@ | ||
// Keyframes | ||
animationName?: UntransformedPropertiesList | UntransformedProperties['animationName']; | ||
animationName?: FeaturedPropertiesList | UntransformedProperties['animationName']; | ||
@@ -55,3 +55,3 @@ // Font face | ||
iterationCount?: UntransformedProperties['animationIterationCount']; | ||
name?: UntransformedPropertiesList | UntransformedProperties['animationName']; | ||
name?: FeaturedPropertiesList | UntransformedProperties['animationName']; | ||
playState?: UntransformedProperties['animationPlayState']; | ||
@@ -144,10 +144,22 @@ timingFunction?: UntransformedProperties['animationTimingFunction']; | ||
interface GridProperty { | ||
autoColumns?: UntransformedProperties['gridAutoColumns']; | ||
autoFlow?: UntransformedProperties['gridAutoFlow']; | ||
autoRows?: UntransformedProperties['gridAutoRows']; | ||
column?: UntransformedProperties['gridColumn']; | ||
columnGap?: UntransformedProperties['gridColumnGap']; | ||
row?: UntransformedProperties['gridRow']; | ||
rowGap?: UntransformedProperties['gridRowGap']; | ||
template?: UntransformedProperties['gridTemplate']; | ||
auto?: { | ||
columns?: UntransformedProperties['gridAutoColumns']; | ||
flow?: UntransformedProperties['gridAutoFlow']; | ||
rows?: UntransformedProperties['gridAutoRows']; | ||
}; | ||
column?: { | ||
end?: UntransformedProperties['gridColumnEnd']; | ||
gap?: UntransformedProperties['gridColumnGap']; | ||
start?: UntransformedProperties['gridColumnStart']; | ||
}; | ||
row?: { | ||
end?: UntransformedProperties['gridRowEnd']; | ||
gap?: UntransformedProperties['gridRowGap']; | ||
start?: UntransformedProperties['gridRowStart']; | ||
}; | ||
template?: { | ||
areas?: UntransformedProperties['gridTemplateAreas']; | ||
columns?: UntransformedProperties['gridTemplateColumns']; | ||
rows?: UntransformedProperties['gridTemplateRows']; | ||
}; | ||
} | ||
@@ -226,14 +238,26 @@ | ||
export interface UntransformedPropertiesList { | ||
[identifier: string]: UntransformedProperties; | ||
export interface FeaturedPropertiesList { | ||
[identifier: string]: Style; | ||
} | ||
export interface FontFace extends Omit<CSS.FontFaceFallback, 'fontFamily'> {} | ||
export interface FeaturedFontFace extends FontFace { | ||
font?: { | ||
display?: FontFace['fontDisplay']; | ||
featureSettings?: FontFace['fontFeatureSettings']; | ||
variationSettings?: FontFace['fontVariationSettings']; | ||
stretch?: FontFace['fontStretch']; | ||
style?: FontFace['fontStyle']; | ||
weight?: FontFace['fontWeight']; | ||
variant?: FontFace['fontVariant']; | ||
}; | ||
} | ||
export type FontFamilyProperty = | ||
| FontFace | ||
| FeaturedFontFace | ||
| CSS.StandardLonghandProperties['fontFamily'] | ||
| Array<FontFace | CSS.StandardLonghandProperties['fontFamily']>; | ||
| Array<FeaturedFontFace | CSS.StandardLonghandProperties['fontFamily']>; | ||
export type FontFace = Omit<CSS.FontFaceFallback, 'fontFamily'>; | ||
type Diff<T extends string, U extends string> = ({ [P in T]: P } & { [P in U]: never } & { [x: string]: never })[T]; | ||
type Omit<T, K extends keyof T> = Pick<T, Diff<keyof T, K>>; |
{ | ||
"name": "@glitz/type", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"main": "", | ||
@@ -12,3 +12,3 @@ "types": "./index.d.ts", | ||
"dependencies": { | ||
"csstype": "^1.8.1" | ||
"csstype": "^2.0.0" | ||
}, | ||
@@ -15,0 +15,0 @@ "files": [ |
9921
225
+ Addedcsstype@2.6.21(transitive)
- Removedcsstype@1.8.2(transitive)
Updatedcsstype@^2.0.0