@xaui/native 0.2.6 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -68,54 +68,96 @@ type ContainerProps = {
68
68
 
69
69
  declare const Container: React.FC<ContainerProps>;
70
70
 
71
- type MainAxisAlignment = 'start' | 'center' | 'end' | 'space-between' | 'space-around' | 'space-evenly';
72
- type CrossAxisAlignment = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
73
- type RowProps = {
74
- /**
75
- * The content to render inside the row.
76
- */
77
- children: ReactNode;
78
- /**
79
- * Main axis alignment for row items.
80
- * @default 'start'
81
- */
71
+ type MainAxisAlignment = 'start' | 'end' | 'center' | 'spaceBetween' | 'spaceAround' | 'spaceEvenly';
72
+ type CrossAxisAlignment = 'start' | 'end' | 'center' | 'stretch';
73
+ /** Controls how much space the flex widget occupies in its main axis. */
74
+ type MainAxisSize = 'min' | 'max';
75
+ type Direction = 'horizontal' | 'vertical';
76
+ type FlexProps = {
77
+ /** Content to render inside the flex container. */
78
+ children?: ReactNode;
79
+ /** Axis direction `'horizontal'` for row, `'vertical'` for column. */
80
+ direction: Direction;
81
+ /** How to place children along the main axis. @default 'start' */
82
82
  mainAxisAlignment?: MainAxisAlignment;
83
- /**
84
- * Cross axis alignment for row items.
85
- * @default 'center'
86
- */
83
+ /** How to place children along the cross axis. @default 'center' */
87
84
  crossAxisAlignment?: CrossAxisAlignment;
88
- /**
89
- * Spacing between children.
90
- */
91
- spacing?: number;
92
- /**
93
- * Reverse the row direction.
94
- * @default false
95
- */
96
- reverse?: boolean;
97
- /**
98
- * Force the container to take the full width.
99
- * @default false
100
- */
101
- fullWidth?: boolean;
102
- /**
103
- * Custom style for the row container.
104
- */
85
+ /** Whether the flex takes max or min space in the main axis. @default 'max' */
86
+ mainAxisSize?: MainAxisSize;
87
+ /** Wrap children onto multiple lines when they overflow. @default false */
88
+ wrap?: boolean;
89
+ /** Gap in logical pixels between children. */
90
+ gap?: number;
91
+ /** Reverse the layout direction. @default false */
92
+ reversed?: boolean;
93
+ /** Flex factor applied to the container itself. */
94
+ flex?: number;
95
+ /** Raw style override applied to the underlying View. */
105
96
  style?: StyleProp<ViewStyle>;
97
+ /** Test identifier for e2e tests. */
98
+ testID?: string;
106
99
  };
107
- type ColumnProps = RowProps & {
100
+ type RowProps = Omit<FlexProps, 'direction'>;
101
+ type ColumnProps = Omit<FlexProps, 'direction'>;
102
+ /** Controls how a `Flexible` child sizes itself within available space. */
103
+ type FlexFit = 'tight' | 'loose';
104
+ type FlexibleProps = {
105
+ /** Content to render inside the flexible container. */
106
+ children?: ReactNode;
107
+ /** Flex factor — how much space to claim relative to siblings. @default 1 */
108
+ flex?: number;
108
109
  /**
109
- * If true, the container will grow to fill available space.
110
- * @default false
110
+ * Sizing behaviour:
111
+ * - `'tight'` — force the child to fill all allotted space (like `Expanded`).
112
+ * - `'loose'` — allow the child to be at most the allotted size but no larger.
113
+ * @default 'loose'
111
114
  */
112
- noGrowth?: boolean;
115
+ fit?: FlexFit;
116
+ /** Raw style override applied to the underlying View. */
117
+ style?: StyleProp<ViewStyle>;
118
+ /** Test identifier for e2e tests. */
119
+ testID?: string;
120
+ };
121
+ type WrapProps = {
122
+ /** Content to render inside the wrap container. */
123
+ children?: ReactNode;
124
+ /** Primary axis direction. @default 'horizontal' */
125
+ direction?: Direction;
126
+ /** Alignment of children along the main axis within each run. @default 'start' */
127
+ alignment?: MainAxisAlignment;
128
+ /** Alignment of runs along the cross axis. @default 'start' */
129
+ runAlignment?: MainAxisAlignment;
130
+ /** Space between children along the main axis. @default 0 */
131
+ spacing?: number;
132
+ /** Space between runs along the cross axis. @default 0 */
133
+ runSpacing?: number;
134
+ /** Raw style override applied to the underlying View. */
135
+ style?: StyleProp<ViewStyle>;
136
+ /** Test identifier for e2e tests. */
137
+ testID?: string;
113
138
  };
114
139
 
140
+ declare const Flex: React.FC<FlexProps>;
141
+
115
142
  declare const Column: React.FC<ColumnProps>;
116
143
 
117
144
  declare const Row: React.FC<RowProps>;
118
145
 
146
+ type ExpandedProps = {
147
+ /** Content to render inside the expanded container. */
148
+ children?: ReactNode;
149
+ /** Flex factor — how much of the available space to take relative to siblings. @default 1 */
150
+ flex?: number;
151
+ /** Raw style override applied to the underlying View. */
152
+ style?: StyleProp<ViewStyle>;
153
+ /** Test identifier for e2e tests. */
154
+ testID?: string;
155
+ };
156
+
157
+ declare const Expanded: React.FC<ExpandedProps>;
158
+
159
+ declare const Flexible: React.FC<FlexibleProps>;
160
+
119
161
  type SpacerProps = {
120
162
  /**
121
163
  * Flex factor for the spacer.
@@ -130,6 +172,8 @@ type SpacerProps = {
130
172
 
131
173
  declare const Spacer: React.FC<SpacerProps>;
132
174
 
175
+ declare const Wrap: React.FC<WrapProps>;
176
+
133
177
  type PaddingProps = {
134
178
  /** Content to render inside the padding container. */
135
179
  children?: ReactNode;
@@ -786,4 +830,4 @@ declare const MasonryGridBuilder: {
786
830
  displayName: string;
787
831
  };
788
832
 
789
- export { Align, type AlignProps, AspectRatio, type AspectRatioProps, BlurView, type BlurViewProps, type BoxConstraints, Center, type CenterProps, Column, type ColumnProps, ConditionalView, type ConditionalViewAnimation, type ConditionalViewProps, ConstrainedBox, type ConstrainedBoxProps, Container, type ContainerProps, type CrossAxisAlignment, FractionallySizedBox, type FractionallySizedBoxProps, Grid, GridBuilder, type GridBuilderProps, GridItem, type GridItemProps, type GridProps, type MainAxisAlignment, Margin, type MarginProps, MasonryGrid, MasonryGridBuilder, type MasonryGridBuilderProps, MasonryGridItem, type MasonryGridItemProps, type MasonryGridProps, Padding, type PaddingProps, PositionedView, type PositionedViewProps, RoundedView, type RoundedViewProps, Row, type RowProps, Screen, type ScreenProps, SizedBox, type SizedBoxProps, Spacer, type SpacerProps, Surface, type SurfaceProps, type SurfaceThemeColor };
833
+ export { Align, type AlignProps, AspectRatio, type AspectRatioProps, BlurView, type BlurViewProps, type BoxConstraints, Center, type CenterProps, Column, type ColumnProps, ConditionalView, type ConditionalViewAnimation, type ConditionalViewProps, ConstrainedBox, type ConstrainedBoxProps, Container, type ContainerProps, type CrossAxisAlignment, type Direction, Expanded, type ExpandedProps, Flex, type FlexFit, type FlexProps, Flexible, type FlexibleProps, FractionallySizedBox, type FractionallySizedBoxProps, Grid, GridBuilder, type GridBuilderProps, GridItem, type GridItemProps, type GridProps, type MainAxisAlignment, type MainAxisSize, Margin, type MarginProps, MasonryGrid, MasonryGridBuilder, type MasonryGridBuilderProps, MasonryGridItem, type MasonryGridItemProps, type MasonryGridProps, Padding, type PaddingProps, PositionedView, type PositionedViewProps, RoundedView, type RoundedViewProps, Row, type RowProps, Screen, type ScreenProps, SizedBox, type SizedBoxProps, Spacer, type SpacerProps, Surface, type SurfaceProps, type SurfaceThemeColor, Wrap, type WrapProps };