@@ -80,12 +80,50 @@ const Clip = Type.Object({
8080 vertical : Type . Optional ( Type . Boolean ( ) ) ,
8181} ) ;
8282
83+ const AttachPoint = Type . Union ( [
84+ Type . Literal ( "left-top" ) ,
85+ Type . Literal ( "left-center" ) ,
86+ Type . Literal ( "left-bottom" ) ,
87+ Type . Literal ( "center-top" ) ,
88+ Type . Literal ( "center-center" ) ,
89+ Type . Literal ( "center-bottom" ) ,
90+ Type . Literal ( "right-top" ) ,
91+ Type . Literal ( "right-center" ) ,
92+ Type . Literal ( "right-bottom" ) ,
93+ ] ) ;
94+
95+ const AttachTo = Type . Union ( [
96+ Type . Literal ( "none" ) ,
97+ Type . Literal ( "parent" ) ,
98+ Type . Literal ( "element" ) ,
99+ Type . Literal ( "root" ) ,
100+ ] ) ;
101+
102+ const PointerCaptureMode = Type . Union ( [
103+ Type . Literal ( "capture" ) ,
104+ Type . Literal ( "passthrough" ) ,
105+ ] ) ;
106+
107+ const ClipTo = Type . Union ( [
108+ Type . Literal ( "none" ) ,
109+ Type . Literal ( "attached-parent" ) ,
110+ ] ) ;
111+
83112const Floating = Type . Object ( {
84113 x : Type . Optional ( Type . Number ( ) ) ,
85114 y : Type . Optional ( Type . Number ( ) ) ,
115+ expand : Type . Optional ( Type . Object ( {
116+ width : Type . Optional ( Type . Number ( ) ) ,
117+ height : Type . Optional ( Type . Number ( ) ) ,
118+ } ) ) ,
86119 parent : Type . Optional ( Type . Integer ( { minimum : 0 } ) ) ,
87- attachTo : Type . Optional ( u8 ) ,
88- attachPoints : Type . Optional ( u8 ) ,
120+ attachTo : Type . Optional ( AttachTo ) ,
121+ attachPoints : Type . Optional ( Type . Object ( {
122+ element : Type . Optional ( AttachPoint ) ,
123+ parent : Type . Optional ( AttachPoint ) ,
124+ } ) ) ,
125+ pointerCaptureMode : Type . Optional ( PointerCaptureMode ) ,
126+ clipTo : Type . Optional ( ClipTo ) ,
89127 zIndex : Type . Optional ( u16 ) ,
90128} ) ;
91129
0 commit comments