@@ -13,9 +13,10 @@ type UnknownKey<Style> = Exclude<KeyOfEach<Style>, StyleKey>;
1313type PropertyOfEach < Style , Key extends PropertyKey > = { [ Property in Key ] : Style extends unknown ? Property extends keyof Style ? Style [ Property ] : never : never ; } [ Key ] ;
1414type OptionValue < Variants > = { [ Name in keyof Variants ] : Variants [ Name ] [ keyof Variants [ Name ] ] ; } [ keyof Variants ] ;
1515type SlotStyles < Slot extends string > = Readonly < Partial < Record < Slot , NativeStyle | undefined > > > ;
16- type NoUnknownSlotStyles < Styles , Slot extends string > = string extends keyof Styles ? unknown : { readonly [ Name in keyof Styles ] : Name extends Slot ? NoUnknownProperties < NonNullable < Styles [ Name ] > > : never ; } ;
17- type NoUnknownVariantStyles < Variants , Slot extends string > = { readonly [ Name in keyof Variants ] : { readonly [ Option in keyof Variants [ Name ] ] : NoUnknownSlotStyles < Variants [ Name ] [ Option ] , Slot > ; } ; } ;
18- type NoUnknownCompoundStyles < Styles , Slot extends string > = Readonly < Partial < Record < Exclude < KeyOfEach < Styles > , Slot > , never > > > & { readonly [ Name in Slot ] ?: NoUnknownProperties < DeclaredStyle$1 < Styles , Name > > ; } ;
16+ type NoUnknownSlotStyles < Styles , Slot extends string , Inherited extends string = never > = string extends keyof Styles ? unknown : { readonly [ Name in keyof Styles ] : Name extends Slot ? NoUnknownProperties < NonNullable < Styles [ Name ] > > : Name extends Inherited ? NoUnknownProperties < NonNullable < Styles [ Name ] > > : never ; } ;
17+ type NoUnknownVariantStyles < Variants , Slot extends string , Inherited extends string = never > = { readonly [ Name in keyof Variants ] : { readonly [ Option in keyof Variants [ Name ] ] : NoUnknownSlotStyles < Variants [ Name ] [ Option ] , Slot , Inherited > ; } ; } ;
18+ type InheritedSlot < Composed extends readonly ComposableKindSlotRecipe$1 < NativeStyle > [ ] > = NonNullable < Composed [ number ] [ "~composition" ] > [ "slots" ] [ number ] ;
19+ type NoUnknownCompoundStyles < Styles , Slot extends string , Inherited extends string = never > = Readonly < Partial < Record < Exclude < Exclude < KeyOfEach < Styles > , Slot > , Inherited > , never > > > & { readonly [ Name in Slot | Inherited ] ?: NoUnknownProperties < DeclaredStyle$1 < Styles , Name > > ; } ;
1920type DeclaredStyle$1 < Styles , Slot > = Styles extends unknown ? Slot extends keyof Styles ? Exclude < Styles [ Slot ] , undefined > : never : never ;
2021type DeclaredSlotStyles < Variants , Base , Compounds , Composed > = Base | OptionValue < Variants > | CompoundStyles < Compounds > | ComposedStyle < Composed > ;
2122type CompoundStyles < Compounds > = Compounds extends readonly ( infer Compound ) [ ] ? Compound extends {
@@ -36,9 +37,9 @@ interface SlotStyleCompoundVariant<Variants, Styles = SlotStyles<string>> {
3637interface SlotStyleRecipeConfig < Slot extends string , Variants , Base , Compounds , DefaultedName extends keyof ComposedVariants$1 < Composed , Variants > , Composed extends readonly ComposableKindSlotRecipe$1 < NativeStyle > [ ] = readonly [ ] > {
3738 readonly composes ?: Composed | undefined ;
3839 readonly slots : readonly Slot [ ] ;
39- readonly base ?: ( Base & SlotStyles < string > & NoUnknownSlotStyles < Base , NoInfer < ComposedSlot$1 < Composed , Slot > > > ) | undefined ;
40- readonly variants : Variants & SlotStyleRecipeVariants & NoUnknownVariantStyles < Variants , NoInfer < ComposedSlot$1 < Composed , Slot > > > ;
41- readonly compoundVariants ?: ( Compounds & readonly SlotStyleCompoundVariant < NoInfer < ComposedVariants$1 < Composed , Variants > > , NoUnknownCompoundStyles < CompoundStyles < Compounds > , NoInfer < ComposedSlot$1 < Composed , Slot > > > > [ ] ) | undefined ;
40+ readonly base ?: ( Base & SlotStyles < string > & NoUnknownSlotStyles < Base , NoInfer < Slot > , InheritedSlot < Composed > > ) | undefined ;
41+ readonly variants : Variants & SlotStyleRecipeVariants & NoUnknownVariantStyles < Variants , NoInfer < Slot > , InheritedSlot < Composed > > ;
42+ readonly compoundVariants ?: ( Compounds & readonly SlotStyleCompoundVariant < NoInfer < ComposedVariants$1 < Composed , Variants > > , NoUnknownCompoundStyles < CompoundStyles < Compounds > , NoInfer < Slot > , InheritedSlot < Composed > > > [ ] ) | undefined ;
4243 readonly defaultVariants ?: DefaultVariants < ComposedVariants$1 < Composed , Variants > , DefaultedName > | undefined ;
4344 readonly cache ?: boolean | undefined ;
4445}
0 commit comments