@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.
- package/dist/alert/index.d.cts +1 -1
- package/dist/alert/index.d.ts +1 -1
- package/dist/app-bar/index.d.cts +1 -1
- package/dist/app-bar/index.d.ts +1 -1
- package/dist/autocomplete/index.d.cts +1 -1
- package/dist/autocomplete/index.d.ts +1 -1
- package/dist/avatar/index.d.cts +1 -1
- package/dist/avatar/index.d.ts +1 -1
- package/dist/badge/index.d.cts +1 -1
- package/dist/badge/index.d.ts +1 -1
- package/dist/bottom-sheet/index.d.cts +1 -1
- package/dist/bottom-sheet/index.d.ts +1 -1
- package/dist/bottom-tab-bar/index.d.cts +1 -1
- package/dist/bottom-tab-bar/index.d.ts +1 -1
- package/dist/button/index.d.cts +1 -1
- package/dist/button/index.d.ts +1 -1
- package/dist/card/index.d.cts +1 -1
- package/dist/card/index.d.ts +1 -1
- package/dist/carousel/index.d.cts +1 -1
- package/dist/carousel/index.d.ts +1 -1
- package/dist/checkbox/index.d.cts +1 -1
- package/dist/checkbox/index.d.ts +1 -1
- package/dist/chip/index.d.cts +1 -1
- package/dist/chip/index.d.ts +1 -1
- package/dist/color-picker/index.d.cts +2 -2
- package/dist/color-picker/index.d.ts +2 -2
- package/dist/datepicker/index.d.cts +1 -1
- package/dist/datepicker/index.d.ts +1 -1
- package/dist/dialog/index.d.cts +1 -1
- package/dist/dialog/index.d.ts +1 -1
- package/dist/divider/index.d.cts +1 -1
- package/dist/divider/index.d.ts +1 -1
- package/dist/drawer/index.d.cts +1 -1
- package/dist/drawer/index.d.ts +1 -1
- package/dist/fab/index.d.cts +3 -3
- package/dist/fab/index.d.ts +3 -3
- package/dist/fab-menu/index.d.cts +2 -2
- package/dist/fab-menu/index.d.ts +2 -2
- package/dist/{fab.type-CgIYqQlT.d.ts → fab.type-CkUHmXU_.d.ts} +1 -1
- package/dist/{fab.type-l2vjG8-p.d.cts → fab.type-DN0vtAh6.d.cts} +1 -1
- package/dist/feature-discovery/index.d.cts +1 -1
- package/dist/feature-discovery/index.d.ts +1 -1
- package/dist/indicator/index.d.cts +1 -1
- package/dist/indicator/index.d.ts +1 -1
- package/dist/input/index.d.cts +10 -9
- package/dist/input/index.d.ts +10 -9
- package/dist/input-trigger/index.d.cts +3 -3
- package/dist/input-trigger/index.d.ts +3 -3
- package/dist/{input-trigger.type-DlSqg2eG.d.ts → input-trigger.type-Ba4bM3Qp.d.cts} +1 -1
- package/dist/{input-trigger.type-By_1ZjKd.d.cts → input-trigger.type-Ba4bM3Qp.d.ts} +1 -1
- package/dist/list/index.d.cts +1 -1
- package/dist/list/index.d.ts +1 -1
- package/dist/menubox/index.d.cts +1 -1
- package/dist/menubox/index.d.ts +1 -1
- package/dist/picker/index.d.cts +2 -2
- package/dist/picker/index.d.ts +2 -2
- package/dist/progress/index.d.cts +1 -1
- package/dist/progress/index.d.ts +1 -1
- package/dist/radio/index.d.cts +1 -1
- package/dist/radio/index.d.ts +1 -1
- package/dist/refresh-control/index.d.cts +1 -1
- package/dist/refresh-control/index.d.ts +1 -1
- package/dist/segment-button/index.d.cts +1 -1
- package/dist/segment-button/index.d.ts +1 -1
- package/dist/select/index.d.cts +1 -1
- package/dist/select/index.d.ts +1 -1
- package/dist/skeleton/index.d.cts +1 -1
- package/dist/skeleton/index.d.ts +1 -1
- package/dist/slider/index.d.cts +1 -1
- package/dist/slider/index.d.ts +1 -1
- package/dist/snackbar/index.d.cts +1 -1
- package/dist/snackbar/index.d.ts +1 -1
- package/dist/snippet/index.d.cts +1 -1
- package/dist/snippet/index.d.ts +1 -1
- package/dist/stepper/index.d.cts +1 -1
- package/dist/stepper/index.d.ts +1 -1
- package/dist/switch/index.d.cts +1 -1
- package/dist/switch/index.d.ts +1 -1
- package/dist/tabs/index.d.cts +1 -1
- package/dist/tabs/index.d.ts +1 -1
- package/dist/timepicker/index.d.cts +1 -1
- package/dist/timepicker/index.d.ts +1 -1
- package/dist/toolbar/index.d.cts +1 -1
- package/dist/toolbar/index.d.ts +1 -1
- package/dist/typography/index.d.cts +1 -1
- package/dist/typography/index.d.ts +1 -1
- package/dist/view/index.cjs +302 -134
- package/dist/view/index.d.cts +176 -102
- package/dist/view/index.d.ts +176 -102
- package/dist/view/index.js +371 -203
- package/package.json +4 -5
- package/dist/index-BOw6tbkc.d.cts +0 -5
- package/dist/index-BOw6tbkc.d.ts +0 -5
- package/dist/index-DyU3sW3_.d.cts +0 -4
- package/dist/index-DyU3sW3_.d.ts +0 -4
package/dist/view/index.js
CHANGED
|
@@ -4,9 +4,210 @@ import {
|
|
|
4
4
|
useXUITheme
|
|
5
5
|
} from "../chunk-RBSA4NH4.js";
|
|
6
6
|
|
|
7
|
-
// src/components/view/
|
|
7
|
+
// src/components/view/container/container.tsx
|
|
8
8
|
import React from "react";
|
|
9
|
-
import { View } from "react-native";
|
|
9
|
+
import { View, Pressable } from "react-native";
|
|
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 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: value.color ?? "#000000",
|
|
111
|
+
shadowOffset: {
|
|
112
|
+
width: value.offset?.x ?? 0,
|
|
113
|
+
height: value.offset?.y ?? 4
|
|
114
|
+
},
|
|
115
|
+
shadowOpacity: value.opacity ?? 0.1,
|
|
116
|
+
shadowRadius: value.blur ?? 4,
|
|
117
|
+
elevation: 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 = !!(onPress ?? onLongPress ?? onPressIn ?? onPressOut);
|
|
174
|
+
if (isInteractive) {
|
|
175
|
+
return /* @__PURE__ */ React.createElement(
|
|
176
|
+
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__ */ React.createElement(
|
|
194
|
+
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
|
+
import React2 from "react";
|
|
210
|
+
import { View as View2 } from "react-native";
|
|
10
211
|
|
|
11
212
|
// src/components/view/layout-utils.ts
|
|
12
213
|
var MAIN_AXIS_JUSTIFY_MAP = {
|
|
@@ -44,8 +245,8 @@ var Column = ({
|
|
|
44
245
|
}) => {
|
|
45
246
|
const gapStyle = spacing === void 0 ? void 0 : { gap: spacing };
|
|
46
247
|
const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
|
|
47
|
-
return /* @__PURE__ */
|
|
48
|
-
|
|
248
|
+
return /* @__PURE__ */ React2.createElement(
|
|
249
|
+
View2,
|
|
49
250
|
{
|
|
50
251
|
style: [
|
|
51
252
|
{
|
|
@@ -64,8 +265,8 @@ var Column = ({
|
|
|
64
265
|
};
|
|
65
266
|
|
|
66
267
|
// src/components/view/row/row.tsx
|
|
67
|
-
import
|
|
68
|
-
import { View as
|
|
268
|
+
import React3 from "react";
|
|
269
|
+
import { View as View3 } from "react-native";
|
|
69
270
|
var Row = ({
|
|
70
271
|
children,
|
|
71
272
|
mainAxisAlignment,
|
|
@@ -77,8 +278,8 @@ var Row = ({
|
|
|
77
278
|
}) => {
|
|
78
279
|
const gapStyle = spacing === void 0 ? void 0 : { gap: spacing };
|
|
79
280
|
const fullWidthStyle = fullWidth ? { flexShrink: 1, flexBasis: "auto", width: "100%" } : void 0;
|
|
80
|
-
return /* @__PURE__ */
|
|
81
|
-
|
|
281
|
+
return /* @__PURE__ */ React3.createElement(
|
|
282
|
+
View3,
|
|
82
283
|
{
|
|
83
284
|
style: [
|
|
84
285
|
{
|
|
@@ -96,11 +297,11 @@ var Row = ({
|
|
|
96
297
|
};
|
|
97
298
|
|
|
98
299
|
// src/components/view/spacer/spacer.tsx
|
|
99
|
-
import
|
|
100
|
-
import { View as
|
|
300
|
+
import React4 from "react";
|
|
301
|
+
import { View as View4 } from "react-native";
|
|
101
302
|
var Spacer = ({ flex = 1, style }) => {
|
|
102
|
-
return /* @__PURE__ */
|
|
103
|
-
|
|
303
|
+
return /* @__PURE__ */ React4.createElement(
|
|
304
|
+
View4,
|
|
104
305
|
{
|
|
105
306
|
style: [
|
|
106
307
|
{
|
|
@@ -116,116 +317,87 @@ var Spacer = ({ flex = 1, style }) => {
|
|
|
116
317
|
Spacer.displayName = "Spacer";
|
|
117
318
|
|
|
118
319
|
// src/components/view/padding/padding.tsx
|
|
119
|
-
import
|
|
120
|
-
import { View as
|
|
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__ */ React4.createElement(
|
|
136
|
-
View4,
|
|
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
|
-
};
|
|
320
|
+
import React5 from "react";
|
|
321
|
+
import { View as View5 } from "react-native";
|
|
322
|
+
var Padding = ({ children, padding, style }) => /* @__PURE__ */ React5.createElement(View5, { style: [resolveEdgeInsets(padding, "padding"), style] }, children);
|
|
156
323
|
Padding.displayName = "Padding";
|
|
157
324
|
|
|
158
325
|
// src/components/view/margin/margin.tsx
|
|
159
|
-
import
|
|
160
|
-
import { View as
|
|
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__ */ React5.createElement(
|
|
176
|
-
View5,
|
|
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
|
-
};
|
|
326
|
+
import React6 from "react";
|
|
327
|
+
import { View as View6 } from "react-native";
|
|
328
|
+
var Margin = ({ children, margin, style }) => /* @__PURE__ */ React6.createElement(View6, { style: [resolveEdgeInsets(margin, "margin"), style] }, children);
|
|
196
329
|
Margin.displayName = "Margin";
|
|
197
330
|
|
|
198
331
|
// src/components/view/sized-box/sized-box.tsx
|
|
199
|
-
import
|
|
200
|
-
import { View as
|
|
332
|
+
import React7 from "react";
|
|
333
|
+
import { View as View7 } from "react-native";
|
|
201
334
|
var SizedBox = ({
|
|
202
335
|
children,
|
|
203
336
|
width,
|
|
204
337
|
height,
|
|
205
|
-
|
|
206
|
-
|
|
338
|
+
expand,
|
|
339
|
+
shrink,
|
|
340
|
+
style,
|
|
341
|
+
testID
|
|
207
342
|
}) => {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
height
|
|
216
|
-
},
|
|
217
|
-
fullWidthStyle,
|
|
218
|
-
style
|
|
219
|
-
]
|
|
220
|
-
},
|
|
221
|
-
children
|
|
222
|
-
);
|
|
343
|
+
if (shrink) {
|
|
344
|
+
return /* @__PURE__ */ React7.createElement(View7, { testID, style: [{ width: 0, height: 0, overflow: "hidden" }, style] }, children);
|
|
345
|
+
}
|
|
346
|
+
if (expand) {
|
|
347
|
+
return /* @__PURE__ */ React7.createElement(View7, { testID, style: [{ flex: 1, alignSelf: "stretch" }, style] }, children);
|
|
348
|
+
}
|
|
349
|
+
return /* @__PURE__ */ React7.createElement(View7, { 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
|
+
import React8 from "react";
|
|
355
|
+
import { View as View8 } from "react-native";
|
|
356
|
+
var ConstrainedBox = ({
|
|
357
|
+
children,
|
|
358
|
+
constraints,
|
|
359
|
+
style,
|
|
360
|
+
testID
|
|
361
|
+
}) => /* @__PURE__ */ React8.createElement(
|
|
362
|
+
View8,
|
|
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
|
+
import React9 from "react";
|
|
381
|
+
import { View as View9 } from "react-native";
|
|
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__ */ React9.createElement(View9, { testID, style: [sizedStyle, alignStyle, style] }, children);
|
|
395
|
+
};
|
|
396
|
+
FractionallySizedBox.displayName = "FractionallySizedBox";
|
|
397
|
+
|
|
226
398
|
// src/components/view/positioned-view/positioned-view.tsx
|
|
227
|
-
import
|
|
228
|
-
import { View as
|
|
399
|
+
import React10 from "react";
|
|
400
|
+
import { View as View10 } from "react-native";
|
|
229
401
|
var PositionedView = ({
|
|
230
402
|
children,
|
|
231
403
|
top,
|
|
@@ -235,8 +407,8 @@ var PositionedView = ({
|
|
|
235
407
|
zIndex,
|
|
236
408
|
style
|
|
237
409
|
}) => {
|
|
238
|
-
return /* @__PURE__ */
|
|
239
|
-
|
|
410
|
+
return /* @__PURE__ */ React10.createElement(
|
|
411
|
+
View10,
|
|
240
412
|
{
|
|
241
413
|
style: [
|
|
242
414
|
{
|
|
@@ -256,8 +428,8 @@ var PositionedView = ({
|
|
|
256
428
|
PositionedView.displayName = "PositionedView";
|
|
257
429
|
|
|
258
430
|
// src/components/view/blur-view/blur-view.tsx
|
|
259
|
-
import
|
|
260
|
-
import { Animated, StyleSheet, View as
|
|
431
|
+
import React11, { useEffect, useRef } from "react";
|
|
432
|
+
import { Animated, StyleSheet, View as View11 } from "react-native";
|
|
261
433
|
var styles = StyleSheet.create({
|
|
262
434
|
container: {
|
|
263
435
|
position: "relative"
|
|
@@ -297,20 +469,20 @@ var BlurView = ({
|
|
|
297
469
|
overlayAnim.setValue(overlayOpacity);
|
|
298
470
|
scaleAnim.setValue(0.98);
|
|
299
471
|
}, [overlayAnim, overlayOpacity, scaleAnim, unlockable]);
|
|
300
|
-
return /* @__PURE__ */
|
|
472
|
+
return /* @__PURE__ */ React11.createElement(View11, { style: [styles.container, style] }, /* @__PURE__ */ React11.createElement(Animated.View, { style: { transform: [{ scale: scaleAnim }] } }, children), /* @__PURE__ */ React11.createElement(
|
|
301
473
|
Animated.View,
|
|
302
474
|
{
|
|
303
475
|
pointerEvents: unlockable ? "none" : "auto",
|
|
304
476
|
style: [styles.overlay, { opacity: overlayAnim }]
|
|
305
477
|
},
|
|
306
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ React11.createElement(View11, { style: [styles.overlay, { backgroundColor: overlayColor }] })
|
|
307
479
|
));
|
|
308
480
|
};
|
|
309
481
|
BlurView.displayName = "BlurView";
|
|
310
482
|
|
|
311
483
|
// src/components/view/rounded-view/rounded-view.tsx
|
|
312
|
-
import
|
|
313
|
-
import { View as
|
|
484
|
+
import React12 from "react";
|
|
485
|
+
import { View as View12 } from "react-native";
|
|
314
486
|
|
|
315
487
|
// src/components/view/rounded-view/rounded-view.hook.ts
|
|
316
488
|
import { useMemo } from "react";
|
|
@@ -364,8 +536,8 @@ var RoundedView = ({
|
|
|
364
536
|
bottomLeft,
|
|
365
537
|
bottomRight
|
|
366
538
|
});
|
|
367
|
-
return /* @__PURE__ */
|
|
368
|
-
|
|
539
|
+
return /* @__PURE__ */ React12.createElement(
|
|
540
|
+
View12,
|
|
369
541
|
{
|
|
370
542
|
style: [
|
|
371
543
|
borderRadiusStyle,
|
|
@@ -380,19 +552,38 @@ var RoundedView = ({
|
|
|
380
552
|
};
|
|
381
553
|
|
|
382
554
|
// src/components/view/aspect-ratio/aspect-ratio.tsx
|
|
383
|
-
import
|
|
384
|
-
import { View as
|
|
555
|
+
import React13 from "react";
|
|
556
|
+
import { View as View13 } from "react-native";
|
|
385
557
|
var AspectRatio = ({
|
|
386
558
|
children,
|
|
387
559
|
ratio,
|
|
388
|
-
|
|
560
|
+
alignment,
|
|
561
|
+
clip,
|
|
562
|
+
style,
|
|
563
|
+
testID
|
|
389
564
|
}) => {
|
|
390
|
-
|
|
565
|
+
const alignStyle = alignment ? resolveAlignment(alignment) : {};
|
|
566
|
+
return /* @__PURE__ */ React13.createElement(
|
|
567
|
+
View13,
|
|
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
|
-
import
|
|
395
|
-
import { View as
|
|
585
|
+
import React14 from "react";
|
|
586
|
+
import { View as View14 } from "react-native";
|
|
396
587
|
import { getSafeThemeColor } from "@xaui/core";
|
|
397
588
|
var resolveBackgroundColor = (color, theme) => {
|
|
398
589
|
if (color === "background" || color === "foreground") {
|
|
@@ -412,8 +603,8 @@ var Surface = ({
|
|
|
412
603
|
const theme = useXUITheme();
|
|
413
604
|
const radiusStyle = useBorderRadiusStyles(radius);
|
|
414
605
|
const background = resolveBackgroundColor(themeColor, theme);
|
|
415
|
-
return /* @__PURE__ */
|
|
416
|
-
|
|
606
|
+
return /* @__PURE__ */ React14.createElement(
|
|
607
|
+
View14,
|
|
417
608
|
{
|
|
418
609
|
style: [
|
|
419
610
|
radiusStyle,
|
|
@@ -431,8 +622,8 @@ var Surface = ({
|
|
|
431
622
|
Surface.displayName = "Surface";
|
|
432
623
|
|
|
433
624
|
// src/components/view/screen/screen.tsx
|
|
434
|
-
import
|
|
435
|
-
import { View as
|
|
625
|
+
import React15 from "react";
|
|
626
|
+
import { View as View15 } from "react-native";
|
|
436
627
|
import { SafeAreaView } from "react-native-safe-area-context";
|
|
437
628
|
var Screen = ({
|
|
438
629
|
children,
|
|
@@ -443,63 +634,36 @@ var Screen = ({
|
|
|
443
634
|
}) => {
|
|
444
635
|
const theme = useXUITheme();
|
|
445
636
|
const resolvedBackgroundColor = backgroundColor ?? theme.colors.background;
|
|
446
|
-
const
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
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__ */ React15.createElement(SafeAreaView, { style: containerStyle }, children);
|
|
640
|
+
}
|
|
641
|
+
return /* @__PURE__ */ React15.createElement(View15, { style: containerStyle }, children);
|
|
461
642
|
};
|
|
462
643
|
Screen.displayName = "Screen";
|
|
463
644
|
|
|
645
|
+
// src/components/view/align/align.tsx
|
|
646
|
+
import React16 from "react";
|
|
647
|
+
import { View as View16 } from "react-native";
|
|
648
|
+
var Align = ({ children, alignment, style }) => /* @__PURE__ */ React16.createElement(View16, { style: [{ flex: 1 }, resolveAlignment(alignment), style] }, children);
|
|
649
|
+
Align.displayName = "Align";
|
|
650
|
+
|
|
464
651
|
// src/components/view/center/center.tsx
|
|
465
|
-
import
|
|
466
|
-
|
|
467
|
-
var Center = ({
|
|
468
|
-
children,
|
|
469
|
-
fullWidth,
|
|
470
|
-
style,
|
|
471
|
-
noGrowth = false
|
|
472
|
-
}) => {
|
|
473
|
-
const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
|
|
474
|
-
return /* @__PURE__ */ React13.createElement(
|
|
475
|
-
View13,
|
|
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
|
-
};
|
|
652
|
+
import React17 from "react";
|
|
653
|
+
var Center = ({ children, style }) => /* @__PURE__ */ React17.createElement(Align, { alignment: "center", style }, children);
|
|
490
654
|
Center.displayName = "Center";
|
|
491
655
|
|
|
492
656
|
// src/components/view/grid/grid.tsx
|
|
493
|
-
import
|
|
657
|
+
import React19, { useMemo as useMemo2, useState } from "react";
|
|
494
658
|
import {
|
|
495
|
-
View as
|
|
659
|
+
View as View18
|
|
496
660
|
} from "react-native";
|
|
497
661
|
|
|
498
662
|
// src/components/view/grid/grid-item.tsx
|
|
499
|
-
import
|
|
500
|
-
import { View as
|
|
663
|
+
import React18 from "react";
|
|
664
|
+
import { View as View17 } from "react-native";
|
|
501
665
|
var GridItem = ({ children, style }) => {
|
|
502
|
-
return /* @__PURE__ */
|
|
666
|
+
return /* @__PURE__ */ React18.createElement(View17, { style }, children);
|
|
503
667
|
};
|
|
504
668
|
GridItem.displayName = "GridItem";
|
|
505
669
|
|
|
@@ -513,7 +677,7 @@ var getSafeSpan = (span, columns) => {
|
|
|
513
677
|
return Math.min(Math.floor(span), columns);
|
|
514
678
|
};
|
|
515
679
|
var isGridItemElement = (child) => {
|
|
516
|
-
if (!
|
|
680
|
+
if (!React19.isValidElement(child)) return false;
|
|
517
681
|
if (child.type === GridItem) return true;
|
|
518
682
|
const displayName = child.type.displayName;
|
|
519
683
|
return displayName === "GridItem";
|
|
@@ -532,15 +696,15 @@ var Grid = ({
|
|
|
532
696
|
const resolvedRowSpacing = rowSpacing ?? spacing ?? 0;
|
|
533
697
|
const resolvedColumnSpacing = columnSpacing ?? spacing ?? 0;
|
|
534
698
|
const itemWidth = `${100 / safeColumns}%`;
|
|
535
|
-
const items =
|
|
699
|
+
const items = React19.Children.toArray(children);
|
|
536
700
|
const totalColumnGap = resolvedColumnSpacing * (safeColumns - 1);
|
|
537
701
|
const baseItemWidth = useMemo2(() => {
|
|
538
702
|
if (!containerWidth) return void 0;
|
|
539
703
|
return (containerWidth - totalColumnGap) / safeColumns;
|
|
540
704
|
}, [containerWidth, safeColumns, totalColumnGap]);
|
|
541
705
|
let currentColumn = 0;
|
|
542
|
-
return /* @__PURE__ */
|
|
543
|
-
|
|
706
|
+
return /* @__PURE__ */ React19.createElement(
|
|
707
|
+
View18,
|
|
544
708
|
{
|
|
545
709
|
style: [
|
|
546
710
|
{
|
|
@@ -557,7 +721,7 @@ var Grid = ({
|
|
|
557
721
|
}
|
|
558
722
|
},
|
|
559
723
|
items.map((child, index) => {
|
|
560
|
-
const key =
|
|
724
|
+
const key = React19.isValidElement(child) && child.key ? child.key : `grid-${index}`;
|
|
561
725
|
const span = isGridItemElement(child) ? getSafeSpan(child.props.span, safeColumns) : 1;
|
|
562
726
|
const spanWidth = baseItemWidth === void 0 ? `${100 / safeColumns * span}%` : baseItemWidth * span + resolvedColumnSpacing * (span - 1);
|
|
563
727
|
if (currentColumn + span > safeColumns) {
|
|
@@ -577,7 +741,7 @@ var Grid = ({
|
|
|
577
741
|
itemStyle,
|
|
578
742
|
child.props.style
|
|
579
743
|
];
|
|
580
|
-
const element2 =
|
|
744
|
+
const element2 = React19.cloneElement(child, {
|
|
581
745
|
key,
|
|
582
746
|
style: mergedStyle
|
|
583
747
|
});
|
|
@@ -585,8 +749,8 @@ var Grid = ({
|
|
|
585
749
|
return element2;
|
|
586
750
|
}
|
|
587
751
|
const defaultItemWidth = baseItemWidth === void 0 ? itemWidth : baseItemWidth;
|
|
588
|
-
const element = /* @__PURE__ */
|
|
589
|
-
|
|
752
|
+
const element = /* @__PURE__ */ React19.createElement(
|
|
753
|
+
View18,
|
|
590
754
|
{
|
|
591
755
|
key,
|
|
592
756
|
style: [
|
|
@@ -609,11 +773,11 @@ var Grid = ({
|
|
|
609
773
|
};
|
|
610
774
|
|
|
611
775
|
// src/components/view/grid/grid-builder.tsx
|
|
612
|
-
import
|
|
776
|
+
import React20, { useMemo as useMemo3 } from "react";
|
|
613
777
|
import {
|
|
614
778
|
FlatList,
|
|
615
779
|
StyleSheet as StyleSheet2,
|
|
616
|
-
View as
|
|
780
|
+
View as View19
|
|
617
781
|
} from "react-native";
|
|
618
782
|
var getSafeColumns2 = (columns) => {
|
|
619
783
|
if (!columns || columns <= 0) return 1;
|
|
@@ -700,7 +864,7 @@ var GridBuilder = ({
|
|
|
700
864
|
},
|
|
701
865
|
itemStyle
|
|
702
866
|
];
|
|
703
|
-
return /* @__PURE__ */
|
|
867
|
+
return /* @__PURE__ */ React20.createElement(View19, { style: placeholderStyle, pointerEvents: "none" });
|
|
704
868
|
}
|
|
705
869
|
const element = resolvedRenderer({ item: item.item, index: item.index });
|
|
706
870
|
if (element === null) return null;
|
|
@@ -716,7 +880,7 @@ var GridBuilder = ({
|
|
|
716
880
|
},
|
|
717
881
|
itemStyle
|
|
718
882
|
];
|
|
719
|
-
return /* @__PURE__ */
|
|
883
|
+
return /* @__PURE__ */ React20.createElement(View19, { style: wrapperStyle }, element);
|
|
720
884
|
};
|
|
721
885
|
const flattenedStyle = StyleSheet2.flatten(style) ?? {};
|
|
722
886
|
const {
|
|
@@ -737,7 +901,7 @@ var GridBuilder = ({
|
|
|
737
901
|
...columnGap !== void 0 ? { columnGap } : {}
|
|
738
902
|
};
|
|
739
903
|
const hasLayoutStyle = Object.keys(layoutStyle).length > 0;
|
|
740
|
-
return /* @__PURE__ */
|
|
904
|
+
return /* @__PURE__ */ React20.createElement(
|
|
741
905
|
FlatList,
|
|
742
906
|
{
|
|
743
907
|
data: paddedData,
|
|
@@ -757,7 +921,7 @@ var GridBuilder = ({
|
|
|
757
921
|
GridBuilder.displayName = "GridBuilder";
|
|
758
922
|
|
|
759
923
|
// src/components/view/conditional/conditional-view.tsx
|
|
760
|
-
import
|
|
924
|
+
import React21, { useEffect as useEffect2, useMemo as useMemo4, useRef as useRef2, useState as useState2 } from "react";
|
|
761
925
|
import { Animated as Animated3 } from "react-native";
|
|
762
926
|
|
|
763
927
|
// src/components/view/conditional/conditional-view.utils.ts
|
|
@@ -909,18 +1073,18 @@ var ConditionalView = ({
|
|
|
909
1073
|
if (!shouldRender) {
|
|
910
1074
|
return null;
|
|
911
1075
|
}
|
|
912
|
-
return /* @__PURE__ */
|
|
1076
|
+
return /* @__PURE__ */ React21.createElement(Animated3.View, { style: animatedStyle }, children);
|
|
913
1077
|
};
|
|
914
1078
|
|
|
915
1079
|
// src/components/view/masonry-grid/masonry-grid.tsx
|
|
916
|
-
import
|
|
917
|
-
import { View as
|
|
1080
|
+
import React22, { useMemo as useMemo5, useRef as useRef3, useState as useState3 } from "react";
|
|
1081
|
+
import { View as View20 } from "react-native";
|
|
918
1082
|
var getSafeColumns3 = (columns) => {
|
|
919
1083
|
if (!columns || columns <= 0) return 1;
|
|
920
1084
|
return Math.floor(columns);
|
|
921
1085
|
};
|
|
922
1086
|
var getItemKey = (child, index) => {
|
|
923
|
-
return
|
|
1087
|
+
return React22.isValidElement(child) && child.key ? String(child.key) : `masonry-${index}`;
|
|
924
1088
|
};
|
|
925
1089
|
var MasonryGrid = ({
|
|
926
1090
|
children,
|
|
@@ -943,7 +1107,7 @@ var MasonryGrid = ({
|
|
|
943
1107
|
return (containerWidth - totalColumnGap) / safeColumns;
|
|
944
1108
|
}, [containerWidth, safeColumns, totalColumnGap]);
|
|
945
1109
|
const items = useMemo5(
|
|
946
|
-
() =>
|
|
1110
|
+
() => React22.Children.toArray(children).map((child, index) => ({
|
|
947
1111
|
key: getItemKey(child, index),
|
|
948
1112
|
element: child
|
|
949
1113
|
})),
|
|
@@ -960,8 +1124,8 @@ var MasonryGrid = ({
|
|
|
960
1124
|
});
|
|
961
1125
|
return buckets;
|
|
962
1126
|
}, [items, layoutVersion, resolvedRowSpacing, safeColumns]);
|
|
963
|
-
return /* @__PURE__ */
|
|
964
|
-
|
|
1127
|
+
return /* @__PURE__ */ React22.createElement(
|
|
1128
|
+
View20,
|
|
965
1129
|
{
|
|
966
1130
|
style: [
|
|
967
1131
|
{
|
|
@@ -984,10 +1148,10 @@ var MasonryGrid = ({
|
|
|
984
1148
|
},
|
|
985
1149
|
columnStyle
|
|
986
1150
|
];
|
|
987
|
-
return /* @__PURE__ */
|
|
1151
|
+
return /* @__PURE__ */ React22.createElement(View20, { key: `masonry-col-${columnIndex}`, style: columnStyles }, column.map((item, index) => {
|
|
988
1152
|
const isLastRow = index === column.length - 1;
|
|
989
|
-
return /* @__PURE__ */
|
|
990
|
-
|
|
1153
|
+
return /* @__PURE__ */ React22.createElement(
|
|
1154
|
+
View20,
|
|
991
1155
|
{
|
|
992
1156
|
key: item.key,
|
|
993
1157
|
style: { marginBottom: isLastRow ? 0 : resolvedRowSpacing },
|
|
@@ -1006,18 +1170,18 @@ var MasonryGrid = ({
|
|
|
1006
1170
|
};
|
|
1007
1171
|
|
|
1008
1172
|
// src/components/view/masonry-grid/masonry-grid-item.tsx
|
|
1009
|
-
import
|
|
1010
|
-
import { View as
|
|
1173
|
+
import React23 from "react";
|
|
1174
|
+
import { View as View21 } from "react-native";
|
|
1011
1175
|
var MasonryGridItem = ({
|
|
1012
1176
|
children,
|
|
1013
1177
|
style
|
|
1014
1178
|
}) => {
|
|
1015
|
-
return /* @__PURE__ */
|
|
1179
|
+
return /* @__PURE__ */ React23.createElement(View21, { style }, children);
|
|
1016
1180
|
};
|
|
1017
1181
|
MasonryGridItem.displayName = "MasonryGridItem";
|
|
1018
1182
|
|
|
1019
1183
|
// src/components/view/masonry-grid/masonry-grid-builder.tsx
|
|
1020
|
-
import
|
|
1184
|
+
import React24, { useMemo as useMemo6, useRef as useRef4 } from "react";
|
|
1021
1185
|
import {
|
|
1022
1186
|
ScrollView
|
|
1023
1187
|
} from "react-native";
|
|
@@ -1077,7 +1241,7 @@ var MasonryGridBuilder = ({
|
|
|
1077
1241
|
onEndReached();
|
|
1078
1242
|
}
|
|
1079
1243
|
};
|
|
1080
|
-
return /* @__PURE__ */
|
|
1244
|
+
return /* @__PURE__ */ React24.createElement(
|
|
1081
1245
|
ScrollView,
|
|
1082
1246
|
{
|
|
1083
1247
|
scrollEventThrottle: 16,
|
|
@@ -1089,7 +1253,7 @@ var MasonryGridBuilder = ({
|
|
|
1089
1253
|
onScroll: handleScroll
|
|
1090
1254
|
},
|
|
1091
1255
|
header,
|
|
1092
|
-
/* @__PURE__ */
|
|
1256
|
+
/* @__PURE__ */ React24.createElement(
|
|
1093
1257
|
MasonryGrid,
|
|
1094
1258
|
{
|
|
1095
1259
|
columns,
|
|
@@ -1099,18 +1263,22 @@ var MasonryGridBuilder = ({
|
|
|
1099
1263
|
style: [{ width: "100%" }, style],
|
|
1100
1264
|
columnStyle
|
|
1101
1265
|
},
|
|
1102
|
-
resolvedData.map((item, index) => /* @__PURE__ */
|
|
1266
|
+
resolvedData.map((item, index) => /* @__PURE__ */ React24.createElement(MasonryGridItem, { key: resolvedKeyExtractor(item, index) }, resolvedRenderer({ item, index })))
|
|
1103
1267
|
),
|
|
1104
1268
|
footer
|
|
1105
1269
|
);
|
|
1106
1270
|
};
|
|
1107
1271
|
MasonryGridBuilder.displayName = "MasonryGridBuilder";
|
|
1108
1272
|
export {
|
|
1273
|
+
Align,
|
|
1109
1274
|
AspectRatio,
|
|
1110
1275
|
BlurView,
|
|
1111
1276
|
Center,
|
|
1112
1277
|
Column,
|
|
1113
1278
|
ConditionalView,
|
|
1279
|
+
ConstrainedBox,
|
|
1280
|
+
Container,
|
|
1281
|
+
FractionallySizedBox,
|
|
1114
1282
|
Grid,
|
|
1115
1283
|
GridBuilder,
|
|
1116
1284
|
GridItem,
|