@xaui/native 0.2.4 → 0.2.6

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.
Files changed (95) hide show
  1. package/dist/alert/index.d.cts +1 -1
  2. package/dist/alert/index.d.ts +1 -1
  3. package/dist/app-bar/index.d.cts +1 -1
  4. package/dist/app-bar/index.d.ts +1 -1
  5. package/dist/autocomplete/index.d.cts +1 -1
  6. package/dist/autocomplete/index.d.ts +1 -1
  7. package/dist/avatar/index.d.cts +1 -1
  8. package/dist/avatar/index.d.ts +1 -1
  9. package/dist/badge/index.d.cts +1 -1
  10. package/dist/badge/index.d.ts +1 -1
  11. package/dist/bottom-sheet/index.d.cts +1 -1
  12. package/dist/bottom-sheet/index.d.ts +1 -1
  13. package/dist/bottom-tab-bar/index.d.cts +1 -1
  14. package/dist/bottom-tab-bar/index.d.ts +1 -1
  15. package/dist/button/index.d.cts +1 -1
  16. package/dist/button/index.d.ts +1 -1
  17. package/dist/card/index.d.cts +1 -1
  18. package/dist/card/index.d.ts +1 -1
  19. package/dist/carousel/index.d.cts +1 -1
  20. package/dist/carousel/index.d.ts +1 -1
  21. package/dist/checkbox/index.d.cts +1 -1
  22. package/dist/checkbox/index.d.ts +1 -1
  23. package/dist/chip/index.d.cts +1 -1
  24. package/dist/chip/index.d.ts +1 -1
  25. package/dist/color-picker/index.d.cts +2 -2
  26. package/dist/color-picker/index.d.ts +2 -2
  27. package/dist/datepicker/index.d.cts +1 -1
  28. package/dist/datepicker/index.d.ts +1 -1
  29. package/dist/dialog/index.d.cts +1 -1
  30. package/dist/dialog/index.d.ts +1 -1
  31. package/dist/divider/index.d.cts +1 -1
  32. package/dist/divider/index.d.ts +1 -1
  33. package/dist/drawer/index.d.cts +1 -1
  34. package/dist/drawer/index.d.ts +1 -1
  35. package/dist/fab/index.d.cts +3 -3
  36. package/dist/fab/index.d.ts +3 -3
  37. package/dist/fab-menu/index.d.cts +2 -2
  38. package/dist/fab-menu/index.d.ts +2 -2
  39. package/dist/{fab.type-CgIYqQlT.d.ts → fab.type-CkUHmXU_.d.ts} +1 -1
  40. package/dist/{fab.type-l2vjG8-p.d.cts → fab.type-DN0vtAh6.d.cts} +1 -1
  41. package/dist/feature-discovery/index.d.cts +1 -1
  42. package/dist/feature-discovery/index.d.ts +1 -1
  43. package/dist/indicator/index.d.cts +1 -1
  44. package/dist/indicator/index.d.ts +1 -1
  45. package/dist/input/index.d.cts +10 -9
  46. package/dist/input/index.d.ts +10 -9
  47. package/dist/input-trigger/index.d.cts +3 -3
  48. package/dist/input-trigger/index.d.ts +3 -3
  49. package/dist/{input-trigger.type-DlSqg2eG.d.ts → input-trigger.type-Ba4bM3Qp.d.cts} +1 -1
  50. package/dist/{input-trigger.type-By_1ZjKd.d.cts → input-trigger.type-Ba4bM3Qp.d.ts} +1 -1
  51. package/dist/list/index.d.cts +1 -1
  52. package/dist/list/index.d.ts +1 -1
  53. package/dist/menubox/index.d.cts +1 -1
  54. package/dist/menubox/index.d.ts +1 -1
  55. package/dist/picker/index.d.cts +2 -2
  56. package/dist/picker/index.d.ts +2 -2
  57. package/dist/progress/index.d.cts +1 -1
  58. package/dist/progress/index.d.ts +1 -1
  59. package/dist/radio/index.d.cts +1 -1
  60. package/dist/radio/index.d.ts +1 -1
  61. package/dist/refresh-control/index.d.cts +1 -1
  62. package/dist/refresh-control/index.d.ts +1 -1
  63. package/dist/segment-button/index.d.cts +1 -1
  64. package/dist/segment-button/index.d.ts +1 -1
  65. package/dist/select/index.d.cts +1 -1
  66. package/dist/select/index.d.ts +1 -1
  67. package/dist/skeleton/index.d.cts +1 -1
  68. package/dist/skeleton/index.d.ts +1 -1
  69. package/dist/slider/index.d.cts +1 -1
  70. package/dist/slider/index.d.ts +1 -1
  71. package/dist/snackbar/index.d.cts +1 -1
  72. package/dist/snackbar/index.d.ts +1 -1
  73. package/dist/snippet/index.d.cts +1 -1
  74. package/dist/snippet/index.d.ts +1 -1
  75. package/dist/stepper/index.d.cts +1 -1
  76. package/dist/stepper/index.d.ts +1 -1
  77. package/dist/switch/index.d.cts +1 -1
  78. package/dist/switch/index.d.ts +1 -1
  79. package/dist/tabs/index.d.cts +1 -1
  80. package/dist/tabs/index.d.ts +1 -1
  81. package/dist/timepicker/index.d.cts +1 -1
  82. package/dist/timepicker/index.d.ts +1 -1
  83. package/dist/toolbar/index.d.cts +1 -1
  84. package/dist/toolbar/index.d.ts +1 -1
  85. package/dist/typography/index.d.cts +1 -1
  86. package/dist/typography/index.d.ts +1 -1
  87. package/dist/view/index.cjs +302 -134
  88. package/dist/view/index.d.cts +176 -102
  89. package/dist/view/index.d.ts +176 -102
  90. package/dist/view/index.js +371 -203
  91. package/package.json +4 -5
  92. package/dist/index-BOw6tbkc.d.cts +0 -5
  93. package/dist/index-BOw6tbkc.d.ts +0 -5
  94. package/dist/index-DyU3sW3_.d.cts +0 -4
  95. package/dist/index-DyU3sW3_.d.ts +0 -4
@@ -4,10 +4,211 @@
4
4
 
5
5
  var _chunk7UFBLUMVcjs = require('../chunk-7UFBLUMV.cjs');
6
6
 
7
- // src/components/view/column/column.tsx
7
+ // src/components/view/container/container.tsx
8
8
  var _react = require('react'); var _react2 = _interopRequireDefault(_react);
9
9
  var _reactnative = require('react-native');
10
10
 
11
+ // src/components/view/container/container.utils.ts
12
+ var resolveEdgeInsets = (value, prefix) => {
13
+ if (typeof value === "number") {
14
+ return prefix === "padding" ? { padding: value } : { margin: value };
15
+ }
16
+ const style = {};
17
+ if (prefix === "padding") {
18
+ if (value.horizontal !== void 0) style.paddingHorizontal = value.horizontal;
19
+ if (value.vertical !== void 0) style.paddingVertical = value.vertical;
20
+ if (value.top !== void 0) style.paddingTop = value.top;
21
+ if (value.bottom !== void 0) style.paddingBottom = value.bottom;
22
+ if (value.left !== void 0) style.paddingLeft = value.left;
23
+ if (value.right !== void 0) style.paddingRight = value.right;
24
+ } else {
25
+ if (value.horizontal !== void 0) style.marginHorizontal = value.horizontal;
26
+ if (value.vertical !== void 0) style.marginVertical = value.vertical;
27
+ if (value.top !== void 0) style.marginTop = value.top;
28
+ if (value.bottom !== void 0) style.marginBottom = value.bottom;
29
+ if (value.left !== void 0) style.marginLeft = value.left;
30
+ if (value.right !== void 0) style.marginRight = value.right;
31
+ }
32
+ return style;
33
+ };
34
+ var ALIGNMENT_MAP = {
35
+ topLeft: { justifyContent: "flex-start", alignItems: "flex-start" },
36
+ topCenter: { justifyContent: "flex-start", alignItems: "center" },
37
+ topRight: { justifyContent: "flex-start", alignItems: "flex-end" },
38
+ centerLeft: { justifyContent: "center", alignItems: "flex-start" },
39
+ center: { justifyContent: "center", alignItems: "center" },
40
+ centerRight: { justifyContent: "center", alignItems: "flex-end" },
41
+ bottomLeft: { justifyContent: "flex-end", alignItems: "flex-start" },
42
+ bottomCenter: { justifyContent: "flex-end", alignItems: "center" },
43
+ bottomRight: { justifyContent: "flex-end", alignItems: "flex-end" }
44
+ };
45
+ var toFlexPosition = (v) => {
46
+ if (v <= 0) return "flex-start";
47
+ if (v >= 1) return "flex-end";
48
+ return "center";
49
+ };
50
+ var resolveAlignment = (value) => {
51
+ if (typeof value === "object") {
52
+ return {
53
+ justifyContent: toFlexPosition(value.y),
54
+ alignItems: toFlexPosition(value.x)
55
+ };
56
+ }
57
+ return _nullishCoalesce(ALIGNMENT_MAP[value], () => ( {
58
+ justifyContent: "flex-start",
59
+ alignItems: "flex-start"
60
+ }));
61
+ };
62
+ var resolveBorderRadius = (value) => {
63
+ if (typeof value === "number") {
64
+ return { borderRadius: value };
65
+ }
66
+ const style = {};
67
+ if (value.topLeft !== void 0) style.borderTopLeftRadius = value.topLeft;
68
+ if (value.topRight !== void 0) style.borderTopRightRadius = value.topRight;
69
+ if (value.bottomLeft !== void 0) style.borderBottomLeftRadius = value.bottomLeft;
70
+ if (value.bottomRight !== void 0)
71
+ style.borderBottomRightRadius = value.bottomRight;
72
+ return style;
73
+ };
74
+ var resolveBorderSide = (side, position) => {
75
+ const style = {};
76
+ if (position === "") {
77
+ if (side.width !== void 0) style.borderWidth = side.width;
78
+ if (side.color !== void 0) style.borderColor = side.color;
79
+ if (side.style !== void 0) style.borderStyle = side.style;
80
+ return style;
81
+ }
82
+ if (position === "Top") {
83
+ if (side.width !== void 0) style.borderTopWidth = side.width;
84
+ if (side.color !== void 0) style.borderTopColor = side.color;
85
+ } else if (position === "Bottom") {
86
+ if (side.width !== void 0) style.borderBottomWidth = side.width;
87
+ if (side.color !== void 0) style.borderBottomColor = side.color;
88
+ } else if (position === "Left") {
89
+ if (side.width !== void 0) style.borderLeftWidth = side.width;
90
+ if (side.color !== void 0) style.borderLeftColor = side.color;
91
+ } else {
92
+ if (side.width !== void 0) style.borderRightWidth = side.width;
93
+ if (side.color !== void 0) style.borderRightColor = side.color;
94
+ }
95
+ return style;
96
+ };
97
+ var resolveBorder = (value) => {
98
+ const dir = value;
99
+ if (dir.top !== void 0 || dir.bottom !== void 0 || dir.left !== void 0 || dir.right !== void 0) {
100
+ return {
101
+ ...dir.top ? resolveBorderSide(dir.top, "Top") : {},
102
+ ...dir.bottom ? resolveBorderSide(dir.bottom, "Bottom") : {},
103
+ ...dir.left ? resolveBorderSide(dir.left, "Left") : {},
104
+ ...dir.right ? resolveBorderSide(dir.right, "Right") : {}
105
+ };
106
+ }
107
+ return resolveBorderSide(value, "");
108
+ };
109
+ var resolveShadow = (value) => ({
110
+ shadowColor: _nullishCoalesce(value.color, () => ( "#000000")),
111
+ shadowOffset: {
112
+ width: _nullishCoalesce(_optionalChain([value, 'access', _2 => _2.offset, 'optionalAccess', _3 => _3.x]), () => ( 0)),
113
+ height: _nullishCoalesce(_optionalChain([value, 'access', _4 => _4.offset, 'optionalAccess', _5 => _5.y]), () => ( 4))
114
+ },
115
+ shadowOpacity: _nullishCoalesce(value.opacity, () => ( 0.1)),
116
+ shadowRadius: _nullishCoalesce(value.blur, () => ( 4)),
117
+ elevation: _nullishCoalesce(value.elevation, () => ( 2))
118
+ });
119
+ var resolveTransform = (value) => {
120
+ const transforms = [];
121
+ if (value.rotate !== void 0) transforms.push({ rotate: value.rotate });
122
+ if (value.rotateX !== void 0) transforms.push({ rotateX: value.rotateX });
123
+ if (value.rotateY !== void 0) transforms.push({ rotateY: value.rotateY });
124
+ if (value.scale !== void 0) transforms.push({ scale: value.scale });
125
+ if (value.scaleX !== void 0) transforms.push({ scaleX: value.scaleX });
126
+ if (value.scaleY !== void 0) transforms.push({ scaleY: value.scaleY });
127
+ if (value.translateX !== void 0)
128
+ transforms.push({ translateX: value.translateX });
129
+ if (value.translateY !== void 0)
130
+ transforms.push({ translateY: value.translateY });
131
+ if (value.skewX !== void 0) transforms.push({ skewX: value.skewX });
132
+ if (value.skewY !== void 0) transforms.push({ skewY: value.skewY });
133
+ return transforms;
134
+ };
135
+
136
+ // src/components/view/container/container.tsx
137
+ var buildStyle = (props) => ({
138
+ ...props.width !== void 0 && { width: props.width },
139
+ ...props.height !== void 0 && { height: props.height },
140
+ ...props.minWidth !== void 0 && { minWidth: props.minWidth },
141
+ ...props.maxWidth !== void 0 && { maxWidth: props.maxWidth },
142
+ ...props.minHeight !== void 0 && { minHeight: props.minHeight },
143
+ ...props.maxHeight !== void 0 && { maxHeight: props.maxHeight },
144
+ ...props.aspectRatio !== void 0 && { aspectRatio: props.aspectRatio },
145
+ ...props.flex !== void 0 && { flex: props.flex },
146
+ ...props.color !== void 0 && { backgroundColor: props.color },
147
+ ...props.clip && { overflow: "hidden" },
148
+ ...props.opacity !== void 0 && { opacity: props.opacity },
149
+ ...props.padding !== void 0 && resolveEdgeInsets(props.padding, "padding"),
150
+ ...props.margin !== void 0 && resolveEdgeInsets(props.margin, "margin"),
151
+ ...props.alignment !== void 0 && resolveAlignment(props.alignment),
152
+ ...props.borderRadius !== void 0 && resolveBorderRadius(props.borderRadius),
153
+ ...props.border !== void 0 && resolveBorder(props.border),
154
+ ...props.shadow !== void 0 && resolveShadow(props.shadow),
155
+ ...props.transform !== void 0 && { transform: resolveTransform(props.transform) }
156
+ });
157
+ var Container = (props) => {
158
+ const {
159
+ children,
160
+ onPress,
161
+ onLongPress,
162
+ onPressIn,
163
+ onPressOut,
164
+ disabled = false,
165
+ accessibilityLabel,
166
+ accessibilityRole,
167
+ accessibilityState,
168
+ accessible,
169
+ testID,
170
+ style
171
+ } = props;
172
+ const containerStyle = buildStyle(props);
173
+ const isInteractive = !!(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(onPress, () => ( onLongPress)), () => ( onPressIn)), () => ( onPressOut)));
174
+ if (isInteractive) {
175
+ return /* @__PURE__ */ _react2.default.createElement(
176
+ _reactnative.Pressable,
177
+ {
178
+ onPress: disabled ? void 0 : onPress,
179
+ onLongPress: disabled ? void 0 : onLongPress,
180
+ onPressIn: disabled ? void 0 : onPressIn,
181
+ onPressOut: disabled ? void 0 : onPressOut,
182
+ disabled,
183
+ accessibilityLabel,
184
+ accessibilityRole,
185
+ accessibilityState,
186
+ accessible,
187
+ testID,
188
+ style: [containerStyle, style]
189
+ },
190
+ children
191
+ );
192
+ }
193
+ return /* @__PURE__ */ _react2.default.createElement(
194
+ _reactnative.View,
195
+ {
196
+ accessibilityLabel,
197
+ accessibilityRole,
198
+ accessibilityState,
199
+ accessible,
200
+ testID,
201
+ style: [containerStyle, style]
202
+ },
203
+ children
204
+ );
205
+ };
206
+ Container.displayName = "Container";
207
+
208
+ // src/components/view/column/column.tsx
209
+
210
+
211
+
11
212
  // src/components/view/layout-utils.ts
12
213
  var MAIN_AXIS_JUSTIFY_MAP = {
13
214
  start: "flex-start",
@@ -118,81 +319,13 @@ Spacer.displayName = "Spacer";
118
319
  // src/components/view/padding/padding.tsx
119
320
 
120
321
 
121
- var Padding = ({
122
- children,
123
- all,
124
- horizontal,
125
- vertical,
126
- top,
127
- right,
128
- bottom,
129
- left,
130
- fullWidth,
131
- style,
132
- noGrowth = false
133
- }) => {
134
- const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
135
- return /* @__PURE__ */ _react2.default.createElement(
136
- _reactnative.View,
137
- {
138
- style: [
139
- {
140
- flex: noGrowth ? void 0 : 1,
141
- padding: all,
142
- paddingHorizontal: horizontal,
143
- paddingVertical: vertical,
144
- paddingTop: top,
145
- paddingRight: right,
146
- paddingBottom: bottom,
147
- paddingLeft: left
148
- },
149
- fullWidthStyle,
150
- style
151
- ]
152
- },
153
- children
154
- );
155
- };
322
+ var Padding = ({ children, padding, style }) => /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [resolveEdgeInsets(padding, "padding"), style] }, children);
156
323
  Padding.displayName = "Padding";
157
324
 
158
325
  // src/components/view/margin/margin.tsx
159
326
 
160
327
 
161
- var Margin = ({
162
- children,
163
- all,
164
- horizontal,
165
- vertical,
166
- top,
167
- right,
168
- bottom,
169
- left,
170
- fullWidth,
171
- style,
172
- noGrowth = false
173
- }) => {
174
- const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
175
- return /* @__PURE__ */ _react2.default.createElement(
176
- _reactnative.View,
177
- {
178
- style: [
179
- {
180
- flex: noGrowth ? void 0 : 1,
181
- margin: all,
182
- marginHorizontal: horizontal,
183
- marginVertical: vertical,
184
- marginTop: top,
185
- marginRight: right,
186
- marginBottom: bottom,
187
- marginLeft: left
188
- },
189
- fullWidthStyle,
190
- style
191
- ]
192
- },
193
- children
194
- );
195
- };
328
+ var Margin = ({ children, margin, style }) => /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [resolveEdgeInsets(margin, "margin"), style] }, children);
196
329
  Margin.displayName = "Margin";
197
330
 
198
331
  // src/components/view/sized-box/sized-box.tsx
@@ -202,27 +335,66 @@ var SizedBox = ({
202
335
  children,
203
336
  width,
204
337
  height,
205
- fullWidth,
206
- style
338
+ expand,
339
+ shrink,
340
+ style,
341
+ testID
207
342
  }) => {
208
- const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
209
- return /* @__PURE__ */ _react2.default.createElement(
210
- _reactnative.View,
211
- {
212
- style: [
213
- {
214
- width,
215
- height
216
- },
217
- fullWidthStyle,
218
- style
219
- ]
220
- },
221
- children
222
- );
343
+ if (shrink) {
344
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { testID, style: [{ width: 0, height: 0, overflow: "hidden" }, style] }, children);
345
+ }
346
+ if (expand) {
347
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { testID, style: [{ flex: 1, alignSelf: "stretch" }, style] }, children);
348
+ }
349
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { testID, style: [{ width, height }, style] }, children);
223
350
  };
224
351
  SizedBox.displayName = "SizedBox";
225
352
 
353
+ // src/components/view/constrained-box/constrained-box.tsx
354
+
355
+
356
+ var ConstrainedBox = ({
357
+ children,
358
+ constraints,
359
+ style,
360
+ testID
361
+ }) => /* @__PURE__ */ _react2.default.createElement(
362
+ _reactnative.View,
363
+ {
364
+ testID,
365
+ style: [
366
+ {
367
+ minWidth: constraints.minWidth,
368
+ maxWidth: constraints.maxWidth,
369
+ minHeight: constraints.minHeight,
370
+ maxHeight: constraints.maxHeight
371
+ },
372
+ style
373
+ ]
374
+ },
375
+ children
376
+ );
377
+ ConstrainedBox.displayName = "ConstrainedBox";
378
+
379
+ // src/components/view/fractionally-sized-box/fractionally-sized-box.tsx
380
+
381
+
382
+ var FractionallySizedBox = ({
383
+ children,
384
+ widthFactor,
385
+ heightFactor,
386
+ alignment,
387
+ style,
388
+ testID
389
+ }) => {
390
+ const sizedStyle = {};
391
+ if (widthFactor !== void 0) sizedStyle.width = `${widthFactor * 100}%`;
392
+ if (heightFactor !== void 0) sizedStyle.height = `${heightFactor * 100}%`;
393
+ const alignStyle = alignment ? resolveAlignment(alignment) : {};
394
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { testID, style: [sizedStyle, alignStyle, style] }, children);
395
+ };
396
+ FractionallySizedBox.displayName = "FractionallySizedBox";
397
+
226
398
  // src/components/view/positioned-view/positioned-view.tsx
227
399
 
228
400
 
@@ -385,10 +557,29 @@ var RoundedView = ({
385
557
  var AspectRatio = ({
386
558
  children,
387
559
  ratio,
388
- style
560
+ alignment,
561
+ clip,
562
+ style,
563
+ testID
389
564
  }) => {
390
- return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [{ aspectRatio: ratio }, style] }, children);
565
+ const alignStyle = alignment ? resolveAlignment(alignment) : {};
566
+ return /* @__PURE__ */ _react2.default.createElement(
567
+ _reactnative.View,
568
+ {
569
+ testID,
570
+ style: [
571
+ {
572
+ aspectRatio: ratio,
573
+ overflow: clip ? "hidden" : "visible"
574
+ },
575
+ alignStyle,
576
+ style
577
+ ]
578
+ },
579
+ children
580
+ );
391
581
  };
582
+ AspectRatio.displayName = "AspectRatio";
392
583
 
393
584
  // src/components/view/surface/surface.tsx
394
585
 
@@ -443,50 +634,23 @@ var Screen = ({
443
634
  }) => {
444
635
  const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
445
636
  const resolvedBackgroundColor = _nullishCoalesce(backgroundColor, () => ( theme.colors.background));
446
- const Container = safeArea ? _reactnativesafeareacontext.SafeAreaView : _reactnative.View;
447
- return /* @__PURE__ */ _react2.default.createElement(
448
- Container,
449
- {
450
- style: [
451
- {
452
- flex: 1,
453
- backgroundColor: resolvedBackgroundColor,
454
- padding
455
- },
456
- style
457
- ]
458
- },
459
- children
460
- );
637
+ const containerStyle = [{ flex: 1, backgroundColor: resolvedBackgroundColor, padding }, style];
638
+ if (safeArea) {
639
+ return /* @__PURE__ */ _react2.default.createElement(_reactnativesafeareacontext.SafeAreaView, { style: containerStyle }, children);
640
+ }
641
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: containerStyle }, children);
461
642
  };
462
643
  Screen.displayName = "Screen";
463
644
 
464
- // src/components/view/center/center.tsx
645
+ // src/components/view/align/align.tsx
465
646
 
466
647
 
467
- var Center = ({
468
- children,
469
- fullWidth,
470
- style,
471
- noGrowth = false
472
- }) => {
473
- const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
474
- return /* @__PURE__ */ _react2.default.createElement(
475
- _reactnative.View,
476
- {
477
- style: [
478
- {
479
- flex: noGrowth ? void 0 : 1,
480
- alignItems: "center",
481
- justifyContent: "center"
482
- },
483
- fullWidthStyle,
484
- style
485
- ]
486
- },
487
- children
488
- );
489
- };
648
+ var Align = ({ children, alignment, style }) => /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [{ flex: 1 }, resolveAlignment(alignment), style] }, children);
649
+ Align.displayName = "Align";
650
+
651
+ // src/components/view/center/center.tsx
652
+
653
+ var Center = ({ children, style }) => /* @__PURE__ */ _react2.default.createElement(Align, { alignment: "center", style }, children);
490
654
  Center.displayName = "Center";
491
655
 
492
656
  // src/components/view/grid/grid.tsx
@@ -825,7 +989,7 @@ var runConditionalViewAnimation = ({
825
989
  ]);
826
990
  animation.start(({ finished }) => {
827
991
  if (finished) {
828
- _optionalChain([onComplete, 'optionalCall', _2 => _2()]);
992
+ _optionalChain([onComplete, 'optionalCall', _6 => _6()]);
829
993
  }
830
994
  });
831
995
  return animation;
@@ -879,7 +1043,7 @@ var ConditionalView = ({
879
1043
  }
880
1044
  return;
881
1045
  }
882
- _optionalChain([animationRef, 'access', _3 => _3.current, 'optionalAccess', _4 => _4.stop, 'call', _5 => _5()]);
1046
+ _optionalChain([animationRef, 'access', _7 => _7.current, 'optionalAccess', _8 => _8.stop, 'call', _9 => _9()]);
883
1047
  animationRef.current = runConditionalViewAnimation({
884
1048
  opacity,
885
1049
  scale,
@@ -1066,10 +1230,10 @@ var MasonryGridBuilder = ({
1066
1230
  const lastEndReachedHeight = _react.useRef.call(void 0, 0);
1067
1231
  if (!resolvedRenderer) return null;
1068
1232
  const handleScroll = (event) => {
1069
- _optionalChain([onScroll, 'optionalCall', _6 => _6(event)]);
1233
+ _optionalChain([onScroll, 'optionalCall', _10 => _10(event)]);
1070
1234
  if (!onEndReached) return;
1071
1235
  const { layoutMeasurement, contentOffset, contentSize } = event.nativeEvent;
1072
- if (!_optionalChain([layoutMeasurement, 'optionalAccess', _7 => _7.height])) return;
1236
+ if (!_optionalChain([layoutMeasurement, 'optionalAccess', _11 => _11.height])) return;
1073
1237
  const distanceFromEnd = contentSize.height - (layoutMeasurement.height + contentOffset.y);
1074
1238
  const threshold = onEndReachedThreshold * layoutMeasurement.height;
1075
1239
  if (distanceFromEnd <= threshold && contentSize.height !== lastEndReachedHeight.current) {
@@ -1126,4 +1290,8 @@ MasonryGridBuilder.displayName = "MasonryGridBuilder";
1126
1290
 
1127
1291
 
1128
1292
 
1129
- exports.AspectRatio = AspectRatio; exports.BlurView = BlurView; exports.Center = Center; exports.Column = Column; exports.ConditionalView = ConditionalView; exports.Grid = Grid; exports.GridBuilder = GridBuilder; exports.GridItem = GridItem; exports.Margin = Margin; exports.MasonryGrid = MasonryGrid; exports.MasonryGridBuilder = MasonryGridBuilder; exports.MasonryGridItem = MasonryGridItem; exports.Padding = Padding; exports.PositionedView = PositionedView; exports.RoundedView = RoundedView; exports.Row = Row; exports.Screen = Screen; exports.SizedBox = SizedBox; exports.Spacer = Spacer; exports.Surface = Surface;
1293
+
1294
+
1295
+
1296
+
1297
+ exports.Align = Align; exports.AspectRatio = AspectRatio; exports.BlurView = BlurView; exports.Center = Center; exports.Column = Column; exports.ConditionalView = ConditionalView; exports.ConstrainedBox = ConstrainedBox; exports.Container = Container; exports.FractionallySizedBox = FractionallySizedBox; exports.Grid = Grid; exports.GridBuilder = GridBuilder; exports.GridItem = GridItem; exports.Margin = Margin; exports.MasonryGrid = MasonryGrid; exports.MasonryGridBuilder = MasonryGridBuilder; exports.MasonryGridItem = MasonryGridItem; exports.Padding = Padding; exports.PositionedView = PositionedView; exports.RoundedView = RoundedView; exports.Row = Row; exports.Screen = Screen; exports.SizedBox = SizedBox; exports.Spacer = Spacer; exports.Surface = Surface;