@xaui/native 0.0.26 → 0.0.28

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 (107) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +105 -228
  3. package/dist/alert/index.cjs +92 -166
  4. package/dist/alert/index.js +2 -1
  5. package/dist/app-bar/index.cjs +24 -98
  6. package/dist/app-bar/index.js +2 -1
  7. package/dist/autocomplete/index.cjs +192 -281
  8. package/dist/autocomplete/index.js +36 -48
  9. package/dist/avatar/index.cjs +59 -133
  10. package/dist/avatar/index.js +2 -1
  11. package/dist/badge/index.cjs +26 -99
  12. package/dist/badge/index.js +2 -1
  13. package/dist/bottom-sheet/index.cjs +5 -456
  14. package/dist/bottom-sheet/index.js +4 -363
  15. package/dist/bottom-tab-bar/index.cjs +93 -167
  16. package/dist/bottom-tab-bar/index.js +2 -2
  17. package/dist/button/index.cjs +73 -525
  18. package/dist/button/index.js +3 -2
  19. package/dist/card/index.cjs +76 -169
  20. package/dist/card/index.js +2 -2
  21. package/dist/carousel/index.cjs +68 -145
  22. package/dist/carousel/index.js +1 -1
  23. package/dist/chart/index.cjs +132 -173
  24. package/dist/checkbox/index.cjs +70 -143
  25. package/dist/checkbox/index.js +2 -1
  26. package/dist/chip/index.cjs +89 -164
  27. package/dist/chip/index.js +2 -1
  28. package/dist/chunk-BD72HIPR.cjs +75 -0
  29. package/dist/chunk-DHSTKO3K.cjs +19 -0
  30. package/dist/{chunk-CZFDZPAS.js → chunk-DXXNBF5P.js} +5 -0
  31. package/dist/{chunk-UI5L26KD.js → chunk-F7WH4DMG.js} +1 -1
  32. package/dist/chunk-GBHQCAKW.js +19 -0
  33. package/dist/chunk-HC2SSHNU.js +368 -0
  34. package/dist/chunk-HSPTLUFA.cjs +7 -0
  35. package/dist/chunk-JEGEPGVU.js +287 -0
  36. package/dist/chunk-KTLGDLCB.cjs +287 -0
  37. package/dist/{chunk-GHCVNQET.js → chunk-LTKYHG5V.js} +5 -12
  38. package/dist/{chunk-ULJSCNPE.js → chunk-LUBWRVI2.js} +1 -1
  39. package/dist/chunk-OQ2BLOOG.cjs +138 -0
  40. package/dist/chunk-QMYWIWSX.cjs +384 -0
  41. package/dist/chunk-XFPPR2VB.cjs +368 -0
  42. package/dist/core/index.cjs +22 -168
  43. package/dist/core/index.d.cts +1 -1
  44. package/dist/core/index.d.ts +1 -1
  45. package/dist/core/index.js +5 -3
  46. package/dist/datepicker/index.cjs +239 -320
  47. package/dist/datepicker/index.js +2 -1
  48. package/dist/divider/index.cjs +5 -145
  49. package/dist/divider/index.js +3 -2
  50. package/dist/drawer/index.cjs +39 -112
  51. package/dist/drawer/index.js +2 -1
  52. package/dist/expansion-panel/index.cjs +91 -230
  53. package/dist/expansion-panel/index.js +3 -2
  54. package/dist/fab/index.cjs +6 -722
  55. package/dist/fab/index.js +4 -3
  56. package/dist/fab-menu/index.cjs +81 -814
  57. package/dist/fab-menu/index.js +4 -3
  58. package/dist/feature-discovery/index.cjs +72 -139
  59. package/dist/feature-discovery/index.js +2 -2
  60. package/dist/index.cjs +1 -18
  61. package/dist/indicator/index.cjs +5 -445
  62. package/dist/indicator/index.js +3 -2
  63. package/dist/input/index.cjs +214 -282
  64. package/dist/input/index.js +2 -2
  65. package/dist/list/index.cjs +71 -146
  66. package/dist/list/index.js +2 -1
  67. package/dist/menu/index.cjs +59 -127
  68. package/dist/menu/index.js +2 -2
  69. package/dist/menubox/index.cjs +60 -132
  70. package/dist/menubox/index.js +2 -1
  71. package/dist/pager/index.cjs +42 -80
  72. package/dist/progress/index.cjs +43 -114
  73. package/dist/progress/index.js +2 -1
  74. package/dist/radio/index.cjs +82 -154
  75. package/dist/radio/index.js +2 -1
  76. package/dist/segment-button/index.cjs +60 -147
  77. package/dist/segment-button/index.js +2 -2
  78. package/dist/select/index.cjs +149 -224
  79. package/dist/select/index.js +10 -22
  80. package/dist/skeleton/index.cjs +23 -94
  81. package/dist/skeleton/index.js +2 -2
  82. package/dist/slider/index.cjs +77 -156
  83. package/dist/slider/index.js +2 -1
  84. package/dist/snackbar/index.cjs +420 -0
  85. package/dist/snackbar/index.d.cts +175 -0
  86. package/dist/snackbar/index.d.ts +175 -0
  87. package/dist/snackbar/index.js +420 -0
  88. package/dist/stepper/index.cjs +121 -195
  89. package/dist/stepper/index.js +2 -1
  90. package/dist/switch/index.cjs +48 -121
  91. package/dist/switch/index.js +2 -1
  92. package/dist/tabs/index.cjs +67 -151
  93. package/dist/tabs/index.js +2 -1
  94. package/dist/timepicker/index.cjs +135 -593
  95. package/dist/timepicker/index.js +24 -383
  96. package/dist/toolbar/index.cjs +59 -128
  97. package/dist/toolbar/index.js +2 -1
  98. package/dist/typography/index.cjs +37 -92
  99. package/dist/typography/index.d.cts +1 -1
  100. package/dist/typography/index.d.ts +1 -1
  101. package/dist/typography/index.js +20 -1
  102. package/dist/view/index.cjs +178 -223
  103. package/package.json +7 -1
  104. package/dist/chunk-3XSXTM3G.js +0 -661
  105. package/dist/chunk-4KSZLONZ.js +0 -79
  106. package/dist/chunk-I4V5Y5GD.js +0 -76
  107. package/dist/chunk-URBEEDFX.js +0 -79
@@ -1,58 +1,6 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/components/view/index.ts
31
- var view_exports = {};
32
- __export(view_exports, {
33
- AspectRatio: () => AspectRatio,
34
- BlurView: () => BlurView,
35
- Column: () => Column,
36
- ConditionalView: () => ConditionalView,
37
- Grid: () => Grid,
38
- GridBuilder: () => GridBuilder,
39
- GridItem: () => GridItem,
40
- Margin: () => Margin,
41
- MasonryGrid: () => MasonryGrid,
42
- MasonryGridBuilder: () => MasonryGridBuilder,
43
- MasonryGridItem: () => MasonryGridItem,
44
- Padding: () => Padding,
45
- PositionedView: () => PositionedView,
46
- RoundedView: () => RoundedView,
47
- Row: () => Row,
48
- SizedBox: () => SizedBox,
49
- Spacer: () => Spacer
50
- });
51
- module.exports = __toCommonJS(view_exports);
52
-
53
- // src/components/view/column/column.tsx
54
- var import_react = __toESM(require("react"), 1);
55
- var import_react_native = require("react-native");
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/components/view/column/column.tsx
2
+ var _react = require('react'); var _react2 = _interopRequireDefault(_react);
3
+ var _reactnative = require('react-native');
56
4
 
57
5
  // src/components/view/layout-utils.ts
58
6
  var MAIN_AXIS_JUSTIFY_MAP = {
@@ -71,10 +19,10 @@ var CROSS_AXIS_ALIGN_MAP = {
71
19
  baseline: "baseline"
72
20
  };
73
21
  var resolveMainAxisAlignment = (alignment) => {
74
- return MAIN_AXIS_JUSTIFY_MAP[alignment ?? "start"];
22
+ return MAIN_AXIS_JUSTIFY_MAP[_nullishCoalesce(alignment, () => ( "start"))];
75
23
  };
76
24
  var resolveCrossAxisAlignment = (alignment) => {
77
- return CROSS_AXIS_ALIGN_MAP[alignment ?? "center"];
25
+ return CROSS_AXIS_ALIGN_MAP[_nullishCoalesce(alignment, () => ( "center"))];
78
26
  };
79
27
 
80
28
  // src/components/view/column/column.tsx
@@ -89,8 +37,8 @@ var Column = ({
89
37
  }) => {
90
38
  const gapStyle = spacing === void 0 ? void 0 : { gap: spacing };
91
39
  const fullWidthStyle = fullWidth ? { flexShrink: 1, flexBasis: "auto", width: "100%" } : void 0;
92
- return /* @__PURE__ */ import_react.default.createElement(
93
- import_react_native.View,
40
+ return /* @__PURE__ */ _react2.default.createElement(
41
+ _reactnative.View,
94
42
  {
95
43
  style: [
96
44
  {
@@ -108,8 +56,8 @@ var Column = ({
108
56
  };
109
57
 
110
58
  // src/components/view/row/row.tsx
111
- var import_react2 = __toESM(require("react"), 1);
112
- var import_react_native2 = require("react-native");
59
+
60
+
113
61
  var Row = ({
114
62
  children,
115
63
  mainAxisAlignment,
@@ -121,8 +69,8 @@ var Row = ({
121
69
  }) => {
122
70
  const gapStyle = spacing === void 0 ? void 0 : { gap: spacing };
123
71
  const fullWidthStyle = fullWidth ? { flexShrink: 1, flexBasis: "auto", width: "100%" } : void 0;
124
- return /* @__PURE__ */ import_react2.default.createElement(
125
- import_react_native2.View,
72
+ return /* @__PURE__ */ _react2.default.createElement(
73
+ _reactnative.View,
126
74
  {
127
75
  style: [
128
76
  {
@@ -140,11 +88,11 @@ var Row = ({
140
88
  };
141
89
 
142
90
  // src/components/view/spacer/spacer.tsx
143
- var import_react3 = __toESM(require("react"), 1);
144
- var import_react_native3 = require("react-native");
91
+
92
+
145
93
  var Spacer = ({ flex = 1, style }) => {
146
- return /* @__PURE__ */ import_react3.default.createElement(
147
- import_react_native3.View,
94
+ return /* @__PURE__ */ _react2.default.createElement(
95
+ _reactnative.View,
148
96
  {
149
97
  style: [
150
98
  {
@@ -160,8 +108,8 @@ var Spacer = ({ flex = 1, style }) => {
160
108
  Spacer.displayName = "Spacer";
161
109
 
162
110
  // src/components/view/padding/padding.tsx
163
- var import_react4 = __toESM(require("react"), 1);
164
- var import_react_native4 = require("react-native");
111
+
112
+
165
113
  var Padding = ({
166
114
  children,
167
115
  all,
@@ -175,8 +123,8 @@ var Padding = ({
175
123
  style
176
124
  }) => {
177
125
  const fullWidthStyle = fullWidth ? { flexShrink: 1, flexBasis: "auto", width: "100%" } : void 0;
178
- return /* @__PURE__ */ import_react4.default.createElement(
179
- import_react_native4.View,
126
+ return /* @__PURE__ */ _react2.default.createElement(
127
+ _reactnative.View,
180
128
  {
181
129
  style: [
182
130
  {
@@ -198,8 +146,8 @@ var Padding = ({
198
146
  Padding.displayName = "Padding";
199
147
 
200
148
  // src/components/view/margin/margin.tsx
201
- var import_react5 = __toESM(require("react"), 1);
202
- var import_react_native5 = require("react-native");
149
+
150
+
203
151
  var Margin = ({
204
152
  children,
205
153
  all,
@@ -213,8 +161,8 @@ var Margin = ({
213
161
  style
214
162
  }) => {
215
163
  const fullWidthStyle = fullWidth ? { flexShrink: 1, flexBasis: "auto", width: "100%" } : void 0;
216
- return /* @__PURE__ */ import_react5.default.createElement(
217
- import_react_native5.View,
164
+ return /* @__PURE__ */ _react2.default.createElement(
165
+ _reactnative.View,
218
166
  {
219
167
  style: [
220
168
  {
@@ -236,16 +184,16 @@ var Margin = ({
236
184
  Margin.displayName = "Margin";
237
185
 
238
186
  // src/components/view/sized-box/sized-box.tsx
239
- var import_react6 = __toESM(require("react"), 1);
240
- var import_react_native6 = require("react-native");
187
+
188
+
241
189
  var SizedBox = ({
242
190
  children,
243
191
  width,
244
192
  height,
245
193
  style
246
194
  }) => {
247
- return /* @__PURE__ */ import_react6.default.createElement(
248
- import_react_native6.View,
195
+ return /* @__PURE__ */ _react2.default.createElement(
196
+ _reactnative.View,
249
197
  {
250
198
  style: [
251
199
  {
@@ -261,8 +209,8 @@ var SizedBox = ({
261
209
  SizedBox.displayName = "SizedBox";
262
210
 
263
211
  // src/components/view/positioned-view/positioned-view.tsx
264
- var import_react7 = __toESM(require("react"), 1);
265
- var import_react_native7 = require("react-native");
212
+
213
+
266
214
  var PositionedView = ({
267
215
  children,
268
216
  top,
@@ -272,8 +220,8 @@ var PositionedView = ({
272
220
  zIndex,
273
221
  style
274
222
  }) => {
275
- return /* @__PURE__ */ import_react7.default.createElement(
276
- import_react_native7.View,
223
+ return /* @__PURE__ */ _react2.default.createElement(
224
+ _reactnative.View,
277
225
  {
278
226
  style: [
279
227
  {
@@ -293,14 +241,14 @@ var PositionedView = ({
293
241
  PositionedView.displayName = "PositionedView";
294
242
 
295
243
  // src/components/view/blur-view/blur-view.tsx
296
- var import_react8 = __toESM(require("react"), 1);
297
- var import_react_native8 = require("react-native");
298
- var styles = import_react_native8.StyleSheet.create({
244
+
245
+
246
+ var styles = _reactnative.StyleSheet.create({
299
247
  container: {
300
248
  position: "relative"
301
249
  },
302
250
  overlay: {
303
- ...import_react_native8.StyleSheet.absoluteFillObject
251
+ ..._reactnative.StyleSheet.absoluteFillObject
304
252
  }
305
253
  });
306
254
  var BlurView = ({
@@ -311,19 +259,19 @@ var BlurView = ({
311
259
  style
312
260
  }) => {
313
261
  const overlayOpacity = Math.min(1, Math.max(0, intensity));
314
- const overlayAnim = (0, import_react8.useRef)(
315
- new import_react_native8.Animated.Value(unlockable ? 0 : overlayOpacity)
262
+ const overlayAnim = _react.useRef.call(void 0,
263
+ new _reactnative.Animated.Value(unlockable ? 0 : overlayOpacity)
316
264
  ).current;
317
- const scaleAnim = (0, import_react8.useRef)(new import_react_native8.Animated.Value(unlockable ? 1 : 0.98)).current;
318
- (0, import_react8.useEffect)(() => {
265
+ const scaleAnim = _react.useRef.call(void 0, new _reactnative.Animated.Value(unlockable ? 1 : 0.98)).current;
266
+ _react.useEffect.call(void 0, () => {
319
267
  if (unlockable) {
320
- import_react_native8.Animated.parallel([
321
- import_react_native8.Animated.timing(overlayAnim, {
268
+ _reactnative.Animated.parallel([
269
+ _reactnative.Animated.timing(overlayAnim, {
322
270
  toValue: 0,
323
271
  duration: 220,
324
272
  useNativeDriver: true
325
273
  }),
326
- import_react_native8.Animated.timing(scaleAnim, {
274
+ _reactnative.Animated.timing(scaleAnim, {
327
275
  toValue: 1,
328
276
  duration: 220,
329
277
  useNativeDriver: true
@@ -334,23 +282,23 @@ var BlurView = ({
334
282
  overlayAnim.setValue(overlayOpacity);
335
283
  scaleAnim.setValue(0.98);
336
284
  }, [overlayAnim, overlayOpacity, scaleAnim, unlockable]);
337
- return /* @__PURE__ */ import_react8.default.createElement(import_react_native8.View, { style: [styles.container, style] }, /* @__PURE__ */ import_react8.default.createElement(import_react_native8.Animated.View, { style: { transform: [{ scale: scaleAnim }] } }, children), /* @__PURE__ */ import_react8.default.createElement(
338
- import_react_native8.Animated.View,
285
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.container, style] }, /* @__PURE__ */ _react2.default.createElement(_reactnative.Animated.View, { style: { transform: [{ scale: scaleAnim }] } }, children), /* @__PURE__ */ _react2.default.createElement(
286
+ _reactnative.Animated.View,
339
287
  {
340
288
  pointerEvents: unlockable ? "none" : "auto",
341
289
  style: [styles.overlay, { opacity: overlayAnim }]
342
290
  },
343
- /* @__PURE__ */ import_react8.default.createElement(import_react_native8.View, { style: [styles.overlay, { backgroundColor: overlayColor }] })
291
+ /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.overlay, { backgroundColor: overlayColor }] })
344
292
  ));
345
293
  };
346
294
  BlurView.displayName = "BlurView";
347
295
 
348
296
  // src/components/view/rounded-view/rounded-view.tsx
349
- var import_react10 = __toESM(require("react"), 1);
350
- var import_react_native9 = require("react-native");
297
+
298
+
351
299
 
352
300
  // src/components/view/rounded-view/rounded-view.hook.ts
353
- var import_react9 = require("react");
301
+
354
302
  var useRoundedViewStyle = (props) => {
355
303
  const {
356
304
  all = 0,
@@ -363,12 +311,12 @@ var useRoundedViewStyle = (props) => {
363
311
  bottomLeft,
364
312
  bottomRight
365
313
  } = props;
366
- return (0, import_react9.useMemo)(() => {
314
+ return _react.useMemo.call(void 0, () => {
367
315
  return {
368
- borderTopLeftRadius: topLeft ?? top ?? left ?? all,
369
- borderTopRightRadius: topRight ?? top ?? right ?? all,
370
- borderBottomLeftRadius: bottomLeft ?? bottom ?? left ?? all,
371
- borderBottomRightRadius: bottomRight ?? bottom ?? right ?? all
316
+ borderTopLeftRadius: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(topLeft, () => ( top)), () => ( left)), () => ( all)),
317
+ borderTopRightRadius: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(topRight, () => ( top)), () => ( right)), () => ( all)),
318
+ borderBottomLeftRadius: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(bottomLeft, () => ( bottom)), () => ( left)), () => ( all)),
319
+ borderBottomRightRadius: _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(bottomRight, () => ( bottom)), () => ( right)), () => ( all))
372
320
  };
373
321
  }, [all, top, bottom, left, right, topLeft, topRight, bottomLeft, bottomRight]);
374
322
  };
@@ -400,8 +348,8 @@ var RoundedView = ({
400
348
  bottomLeft,
401
349
  bottomRight
402
350
  });
403
- return /* @__PURE__ */ import_react10.default.createElement(
404
- import_react_native9.View,
351
+ return /* @__PURE__ */ _react2.default.createElement(
352
+ _reactnative.View,
405
353
  {
406
354
  style: [
407
355
  borderRadiusStyle,
@@ -413,32 +361,34 @@ var RoundedView = ({
413
361
  children
414
362
  );
415
363
  };
416
- var styles2 = import_react_native9.StyleSheet.create({
364
+ var styles2 = _reactnative.StyleSheet.create({
417
365
  fullWidth: {
418
366
  width: "100%"
419
367
  }
420
368
  });
421
369
 
422
370
  // src/components/view/aspect-ratio/aspect-ratio.tsx
423
- var import_react11 = __toESM(require("react"), 1);
424
- var import_react_native10 = require("react-native");
371
+
372
+
425
373
  var AspectRatio = ({
426
374
  children,
427
375
  ratio,
428
376
  style
429
377
  }) => {
430
- return /* @__PURE__ */ import_react11.default.createElement(import_react_native10.View, { style: [{ aspectRatio: ratio }, style] }, children);
378
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [{ aspectRatio: ratio }, style] }, children);
431
379
  };
432
380
 
433
381
  // src/components/view/grid/grid.tsx
434
- var import_react13 = __toESM(require("react"), 1);
435
- var import_react_native12 = require("react-native");
382
+
383
+
384
+
385
+
436
386
 
437
387
  // src/components/view/grid/grid-item.tsx
438
- var import_react12 = __toESM(require("react"), 1);
439
- var import_react_native11 = require("react-native");
388
+
389
+
440
390
  var GridItem = ({ children, style }) => {
441
- return /* @__PURE__ */ import_react12.default.createElement(import_react_native11.View, { style }, children);
391
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style }, children);
442
392
  };
443
393
  GridItem.displayName = "GridItem";
444
394
 
@@ -452,7 +402,7 @@ var getSafeSpan = (span, columns) => {
452
402
  return Math.min(Math.floor(span), columns);
453
403
  };
454
404
  var isGridItemElement = (child) => {
455
- if (!import_react13.default.isValidElement(child)) return false;
405
+ if (!_react2.default.isValidElement(child)) return false;
456
406
  if (child.type === GridItem) return true;
457
407
  const displayName = child.type.displayName;
458
408
  return displayName === "GridItem";
@@ -466,20 +416,20 @@ var Grid = ({
466
416
  style,
467
417
  itemStyle
468
418
  }) => {
469
- const [containerWidth, setContainerWidth] = (0, import_react13.useState)();
419
+ const [containerWidth, setContainerWidth] = _react.useState.call(void 0, );
470
420
  const safeColumns = getSafeColumns(columns);
471
- const resolvedRowSpacing = rowSpacing ?? spacing ?? 0;
472
- const resolvedColumnSpacing = columnSpacing ?? spacing ?? 0;
421
+ const resolvedRowSpacing = _nullishCoalesce(_nullishCoalesce(rowSpacing, () => ( spacing)), () => ( 0));
422
+ const resolvedColumnSpacing = _nullishCoalesce(_nullishCoalesce(columnSpacing, () => ( spacing)), () => ( 0));
473
423
  const itemWidth = `${100 / safeColumns}%`;
474
- const items = import_react13.default.Children.toArray(children);
424
+ const items = _react2.default.Children.toArray(children);
475
425
  const totalColumnGap = resolvedColumnSpacing * (safeColumns - 1);
476
- const baseItemWidth = (0, import_react13.useMemo)(() => {
426
+ const baseItemWidth = _react.useMemo.call(void 0, () => {
477
427
  if (!containerWidth) return void 0;
478
428
  return (containerWidth - totalColumnGap) / safeColumns;
479
429
  }, [containerWidth, safeColumns, totalColumnGap]);
480
430
  let currentColumn = 0;
481
- return /* @__PURE__ */ import_react13.default.createElement(
482
- import_react_native12.View,
431
+ return /* @__PURE__ */ _react2.default.createElement(
432
+ _reactnative.View,
483
433
  {
484
434
  style: [
485
435
  {
@@ -496,7 +446,7 @@ var Grid = ({
496
446
  }
497
447
  },
498
448
  items.map((child, index) => {
499
- const key = import_react13.default.isValidElement(child) && child.key ? child.key : `grid-${index}`;
449
+ const key = _react2.default.isValidElement(child) && child.key ? child.key : `grid-${index}`;
500
450
  const span = isGridItemElement(child) ? getSafeSpan(child.props.span, safeColumns) : 1;
501
451
  const spanWidth = baseItemWidth === void 0 ? `${100 / safeColumns * span}%` : baseItemWidth * span + resolvedColumnSpacing * (span - 1);
502
452
  if (currentColumn + span > safeColumns) {
@@ -516,7 +466,7 @@ var Grid = ({
516
466
  itemStyle,
517
467
  child.props.style
518
468
  ];
519
- const element2 = import_react13.default.cloneElement(child, {
469
+ const element2 = _react2.default.cloneElement(child, {
520
470
  key,
521
471
  style: mergedStyle
522
472
  });
@@ -524,8 +474,8 @@ var Grid = ({
524
474
  return element2;
525
475
  }
526
476
  const defaultItemWidth = baseItemWidth === void 0 ? itemWidth : baseItemWidth;
527
- const element = /* @__PURE__ */ import_react13.default.createElement(
528
- import_react_native12.View,
477
+ const element = /* @__PURE__ */ _react2.default.createElement(
478
+ _reactnative.View,
529
479
  {
530
480
  key,
531
481
  style: [
@@ -548,8 +498,12 @@ var Grid = ({
548
498
  };
549
499
 
550
500
  // src/components/view/grid/grid-builder.tsx
551
- var import_react14 = __toESM(require("react"), 1);
552
- var import_react_native13 = require("react-native");
501
+
502
+
503
+
504
+
505
+
506
+
553
507
  var getSafeColumns2 = (columns) => {
554
508
  if (!columns || columns <= 0) return 1;
555
509
  return Math.floor(columns);
@@ -579,13 +533,13 @@ var GridBuilder = ({
579
533
  footer
580
534
  }) => {
581
535
  const safeColumns = getSafeColumns2(columns);
582
- const resolvedRowSpacing = rowSpacing ?? spacing ?? 0;
583
- const resolvedColumnSpacing = columnSpacing ?? spacing ?? 0;
584
- const resolvedData = (0, import_react14.useMemo)(
536
+ const resolvedRowSpacing = _nullishCoalesce(_nullishCoalesce(rowSpacing, () => ( spacing)), () => ( 0));
537
+ const resolvedColumnSpacing = _nullishCoalesce(_nullishCoalesce(columnSpacing, () => ( spacing)), () => ( 0));
538
+ const resolvedData = _react.useMemo.call(void 0,
585
539
  () => resolveGridData(data, itemCount),
586
540
  [data, itemCount]
587
541
  );
588
- const paddedData = (0, import_react14.useMemo)(() => {
542
+ const paddedData = _react.useMemo.call(void 0, () => {
589
543
  const remainder = resolvedData.length % safeColumns;
590
544
  const placeholders = remainder === 0 ? 0 : safeColumns - remainder;
591
545
  if (placeholders === 0)
@@ -606,12 +560,12 @@ var GridBuilder = ({
606
560
  }))
607
561
  ];
608
562
  }, [resolvedData, safeColumns]);
609
- const resolvedKeyExtractor = (0, import_react14.useMemo)(() => {
563
+ const resolvedKeyExtractor = _react.useMemo.call(void 0, () => {
610
564
  if (keyExtractor)
611
- return (item, index) => item.type === "data" ? keyExtractor(item.item, item.index) : item.key ?? `placeholder-${index}`;
612
- return (item, index) => item.type === "data" ? `grid-${item.index}` : item.key ?? `placeholder-${index}`;
565
+ return (item, index) => item.type === "data" ? keyExtractor(item.item, item.index) : _nullishCoalesce(item.key, () => ( `placeholder-${index}`));
566
+ return (item, index) => item.type === "data" ? `grid-${item.index}` : _nullishCoalesce(item.key, () => ( `placeholder-${index}`));
613
567
  }, [keyExtractor]);
614
- const resolvedRenderer = (0, import_react14.useMemo)(() => {
568
+ const resolvedRenderer = _react.useMemo.call(void 0, () => {
615
569
  if (renderItem) return renderItem;
616
570
  if (itemBuilder)
617
571
  return ({ item, index }) => itemBuilder({ item, index });
@@ -635,7 +589,7 @@ var GridBuilder = ({
635
589
  },
636
590
  itemStyle
637
591
  ];
638
- return /* @__PURE__ */ import_react14.default.createElement(import_react_native13.View, { style: placeholderStyle, pointerEvents: "none" });
592
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: placeholderStyle, pointerEvents: "none" });
639
593
  }
640
594
  const element = resolvedRenderer({ item: item.item, index: item.index });
641
595
  if (element === null) return null;
@@ -651,9 +605,9 @@ var GridBuilder = ({
651
605
  },
652
606
  itemStyle
653
607
  ];
654
- return /* @__PURE__ */ import_react14.default.createElement(import_react_native13.View, { style: wrapperStyle }, element);
608
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: wrapperStyle }, element);
655
609
  };
656
- const flattenedStyle = import_react_native13.StyleSheet.flatten(style) ?? {};
610
+ const flattenedStyle = _nullishCoalesce(_reactnative.StyleSheet.flatten(style), () => ( {}));
657
611
  const {
658
612
  alignItems,
659
613
  justifyContent,
@@ -672,8 +626,8 @@ var GridBuilder = ({
672
626
  ...columnGap !== void 0 ? { columnGap } : {}
673
627
  };
674
628
  const hasLayoutStyle = Object.keys(layoutStyle).length > 0;
675
- return /* @__PURE__ */ import_react14.default.createElement(
676
- import_react_native13.FlatList,
629
+ return /* @__PURE__ */ _react2.default.createElement(
630
+ _reactnative.FlatList,
677
631
  {
678
632
  data: paddedData,
679
633
  renderItem: renderGridItem,
@@ -692,8 +646,8 @@ var GridBuilder = ({
692
646
  GridBuilder.displayName = "GridBuilder";
693
647
 
694
648
  // src/components/view/conditional/conditional-view.tsx
695
- var import_react15 = __toESM(require("react"), 1);
696
- var import_react_native15 = require("react-native");
649
+
650
+
697
651
 
698
652
  // src/components/view/conditional/conditional-view.utils.ts
699
653
  var FINAL_VALUES = {
@@ -722,7 +676,7 @@ var getExitValues = (animation) => {
722
676
  };
723
677
 
724
678
  // src/components/view/conditional/conditional-view.animation.ts
725
- var import_react_native14 = require("react-native");
679
+
726
680
  var runConditionalViewAnimation = ({
727
681
  opacity,
728
682
  scale,
@@ -731,27 +685,27 @@ var runConditionalViewAnimation = ({
731
685
  toValues,
732
686
  onComplete
733
687
  }) => {
734
- const easing = import_react_native14.Easing.out(import_react_native14.Easing.cubic);
735
- const animation = import_react_native14.Animated.parallel([
736
- import_react_native14.Animated.timing(opacity, {
688
+ const easing = _reactnative.Easing.out(_reactnative.Easing.cubic);
689
+ const animation = _reactnative.Animated.parallel([
690
+ _reactnative.Animated.timing(opacity, {
737
691
  toValue: toValues.opacity,
738
692
  duration: 800,
739
693
  easing,
740
694
  useNativeDriver: true
741
695
  }),
742
- import_react_native14.Animated.timing(scale, {
696
+ _reactnative.Animated.timing(scale, {
743
697
  toValue: toValues.scale,
744
698
  duration: 800,
745
699
  easing,
746
700
  useNativeDriver: true
747
701
  }),
748
- import_react_native14.Animated.timing(translateX, {
702
+ _reactnative.Animated.timing(translateX, {
749
703
  toValue: toValues.translateX,
750
704
  duration: 800,
751
705
  easing,
752
706
  useNativeDriver: true
753
707
  }),
754
- import_react_native14.Animated.timing(translateY, {
708
+ _reactnative.Animated.timing(translateY, {
755
709
  toValue: toValues.translateY,
756
710
  duration: 800,
757
711
  easing,
@@ -760,7 +714,7 @@ var runConditionalViewAnimation = ({
760
714
  ]);
761
715
  animation.start(({ finished }) => {
762
716
  if (finished) {
763
- onComplete?.();
717
+ _optionalChain([onComplete, 'optionalCall', _2 => _2()]);
764
718
  }
765
719
  });
766
720
  return animation;
@@ -773,34 +727,34 @@ var ConditionalView = ({
773
727
  animation = "fade",
774
728
  disableAnimation = false
775
729
  }) => {
776
- const [shouldRender, setShouldRender] = (0, import_react15.useState)(isVisible);
777
- const animationRef = (0, import_react15.useRef)(null);
778
- const initialValues = (0, import_react15.useMemo)(() => getInitialValues(animation), [animation]);
779
- const exitValues = (0, import_react15.useMemo)(() => getExitValues(animation), [animation]);
780
- const opacity = (0, import_react15.useRef)(
781
- new import_react_native15.Animated.Value(
730
+ const [shouldRender, setShouldRender] = _react.useState.call(void 0, isVisible);
731
+ const animationRef = _react.useRef.call(void 0, null);
732
+ const initialValues = _react.useMemo.call(void 0, () => getInitialValues(animation), [animation]);
733
+ const exitValues = _react.useMemo.call(void 0, () => getExitValues(animation), [animation]);
734
+ const opacity = _react.useRef.call(void 0,
735
+ new _reactnative.Animated.Value(
782
736
  disableAnimation ? FINAL_VALUES.opacity : initialValues.opacity
783
737
  )
784
738
  ).current;
785
- const scale = (0, import_react15.useRef)(
786
- new import_react_native15.Animated.Value(disableAnimation ? FINAL_VALUES.scale : initialValues.scale)
739
+ const scale = _react.useRef.call(void 0,
740
+ new _reactnative.Animated.Value(disableAnimation ? FINAL_VALUES.scale : initialValues.scale)
787
741
  ).current;
788
- const translateX = (0, import_react15.useRef)(
789
- new import_react_native15.Animated.Value(
742
+ const translateX = _react.useRef.call(void 0,
743
+ new _reactnative.Animated.Value(
790
744
  disableAnimation ? FINAL_VALUES.translateX : initialValues.translateX
791
745
  )
792
746
  ).current;
793
- const translateY = (0, import_react15.useRef)(
794
- new import_react_native15.Animated.Value(
747
+ const translateY = _react.useRef.call(void 0,
748
+ new _reactnative.Animated.Value(
795
749
  disableAnimation ? FINAL_VALUES.translateY : initialValues.translateY
796
750
  )
797
751
  ).current;
798
- (0, import_react15.useEffect)(() => {
752
+ _react.useEffect.call(void 0, () => {
799
753
  if (isVisible) {
800
754
  setShouldRender(true);
801
755
  }
802
756
  }, [isVisible]);
803
- (0, import_react15.useEffect)(() => {
757
+ _react.useEffect.call(void 0, () => {
804
758
  if (!shouldRender) return;
805
759
  const startValues = isVisible ? disableAnimation ? FINAL_VALUES : initialValues : FINAL_VALUES;
806
760
  const targetValues = isVisible ? FINAL_VALUES : exitValues;
@@ -814,7 +768,7 @@ var ConditionalView = ({
814
768
  }
815
769
  return;
816
770
  }
817
- animationRef.current?.stop();
771
+ _optionalChain([animationRef, 'access', _3 => _3.current, 'optionalAccess', _4 => _4.stop, 'call', _5 => _5()]);
818
772
  animationRef.current = runConditionalViewAnimation({
819
773
  opacity,
820
774
  scale,
@@ -834,7 +788,7 @@ var ConditionalView = ({
834
788
  translateX,
835
789
  translateY
836
790
  ]);
837
- const animatedStyle = (0, import_react15.useMemo)(
791
+ const animatedStyle = _react.useMemo.call(void 0,
838
792
  () => ({
839
793
  opacity,
840
794
  transform: [{ translateX }, { translateY }, { scale }]
@@ -844,18 +798,18 @@ var ConditionalView = ({
844
798
  if (!shouldRender) {
845
799
  return null;
846
800
  }
847
- return /* @__PURE__ */ import_react15.default.createElement(import_react_native15.Animated.View, { style: animatedStyle }, children);
801
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.Animated.View, { style: animatedStyle }, children);
848
802
  };
849
803
 
850
804
  // src/components/view/masonry-grid/masonry-grid.tsx
851
- var import_react16 = __toESM(require("react"), 1);
852
- var import_react_native16 = require("react-native");
805
+
806
+
853
807
  var getSafeColumns3 = (columns) => {
854
808
  if (!columns || columns <= 0) return 1;
855
809
  return Math.floor(columns);
856
810
  };
857
811
  var getItemKey = (child, index) => {
858
- return import_react16.default.isValidElement(child) && child.key ? String(child.key) : `masonry-${index}`;
812
+ return _react2.default.isValidElement(child) && child.key ? String(child.key) : `masonry-${index}`;
859
813
  };
860
814
  var MasonryGrid = ({
861
815
  children,
@@ -866,37 +820,37 @@ var MasonryGrid = ({
866
820
  style,
867
821
  columnStyle
868
822
  }) => {
869
- const [containerWidth, setContainerWidth] = (0, import_react16.useState)();
870
- const heightMapRef = (0, import_react16.useRef)({});
871
- const [layoutVersion, setLayoutVersion] = (0, import_react16.useState)(0);
823
+ const [containerWidth, setContainerWidth] = _react.useState.call(void 0, );
824
+ const heightMapRef = _react.useRef.call(void 0, {});
825
+ const [layoutVersion, setLayoutVersion] = _react.useState.call(void 0, 0);
872
826
  const safeColumns = getSafeColumns3(columns);
873
- const resolvedRowSpacing = rowSpacing ?? spacing ?? 0;
874
- const resolvedColumnSpacing = columnSpacing ?? spacing ?? 0;
827
+ const resolvedRowSpacing = _nullishCoalesce(_nullishCoalesce(rowSpacing, () => ( spacing)), () => ( 0));
828
+ const resolvedColumnSpacing = _nullishCoalesce(_nullishCoalesce(columnSpacing, () => ( spacing)), () => ( 0));
875
829
  const totalColumnGap = resolvedColumnSpacing * (safeColumns - 1);
876
- const columnWidth = (0, import_react16.useMemo)(() => {
830
+ const columnWidth = _react.useMemo.call(void 0, () => {
877
831
  if (!containerWidth) return void 0;
878
832
  return (containerWidth - totalColumnGap) / safeColumns;
879
833
  }, [containerWidth, safeColumns, totalColumnGap]);
880
- const items = (0, import_react16.useMemo)(
881
- () => import_react16.default.Children.toArray(children).map((child, index) => ({
834
+ const items = _react.useMemo.call(void 0,
835
+ () => _react2.default.Children.toArray(children).map((child, index) => ({
882
836
  key: getItemKey(child, index),
883
837
  element: child
884
838
  })),
885
839
  [children]
886
840
  );
887
- const columnsItems = (0, import_react16.useMemo)(() => {
841
+ const columnsItems = _react.useMemo.call(void 0, () => {
888
842
  const buckets = Array.from({ length: safeColumns }, () => []);
889
843
  const heights = new Array(safeColumns).fill(0);
890
844
  items.forEach((item) => {
891
845
  const height = heightMapRef.current[item.key];
892
846
  const targetIndex = heights.indexOf(Math.min(...heights));
893
847
  buckets[targetIndex].push(item);
894
- heights[targetIndex] += (height ?? 0) + resolvedRowSpacing;
848
+ heights[targetIndex] += (_nullishCoalesce(height, () => ( 0))) + resolvedRowSpacing;
895
849
  });
896
850
  return buckets;
897
851
  }, [items, layoutVersion, resolvedRowSpacing, safeColumns]);
898
- return /* @__PURE__ */ import_react16.default.createElement(
899
- import_react_native16.View,
852
+ return /* @__PURE__ */ _react2.default.createElement(
853
+ _reactnative.View,
900
854
  {
901
855
  style: [
902
856
  {
@@ -919,10 +873,10 @@ var MasonryGrid = ({
919
873
  },
920
874
  columnStyle
921
875
  ];
922
- return /* @__PURE__ */ import_react16.default.createElement(import_react_native16.View, { key: `masonry-col-${columnIndex}`, style: columnStyles }, column.map((item, index) => {
876
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { key: `masonry-col-${columnIndex}`, style: columnStyles }, column.map((item, index) => {
923
877
  const isLastRow = index === column.length - 1;
924
- return /* @__PURE__ */ import_react16.default.createElement(
925
- import_react_native16.View,
878
+ return /* @__PURE__ */ _react2.default.createElement(
879
+ _reactnative.View,
926
880
  {
927
881
  key: item.key,
928
882
  style: { marginBottom: isLastRow ? 0 : resolvedRowSpacing },
@@ -941,19 +895,21 @@ var MasonryGrid = ({
941
895
  };
942
896
 
943
897
  // src/components/view/masonry-grid/masonry-grid-item.tsx
944
- var import_react17 = __toESM(require("react"), 1);
945
- var import_react_native17 = require("react-native");
898
+
899
+
946
900
  var MasonryGridItem = ({
947
901
  children,
948
902
  style
949
903
  }) => {
950
- return /* @__PURE__ */ import_react17.default.createElement(import_react_native17.View, { style }, children);
904
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style }, children);
951
905
  };
952
906
  MasonryGridItem.displayName = "MasonryGridItem";
953
907
 
954
908
  // src/components/view/masonry-grid/masonry-grid-builder.tsx
955
- var import_react18 = __toESM(require("react"), 1);
956
- var import_react_native18 = require("react-native");
909
+
910
+
911
+
912
+
957
913
  var resolveMasonryData = (data, itemCount) => {
958
914
  if (data) return data;
959
915
  if (!itemCount || itemCount <= 0) return [];
@@ -982,27 +938,27 @@ var MasonryGridBuilder = ({
982
938
  bounces,
983
939
  onScroll
984
940
  }) => {
985
- const resolvedData = (0, import_react18.useMemo)(
941
+ const resolvedData = _react.useMemo.call(void 0,
986
942
  () => resolveMasonryData(data, itemCount),
987
943
  [data, itemCount]
988
944
  );
989
- const resolvedKeyExtractor = (0, import_react18.useMemo)(() => {
945
+ const resolvedKeyExtractor = _react.useMemo.call(void 0, () => {
990
946
  if (keyExtractor) return keyExtractor;
991
947
  return (_, index) => `masonry-${index}`;
992
948
  }, [keyExtractor]);
993
- const resolvedRenderer = (0, import_react18.useMemo)(() => {
949
+ const resolvedRenderer = _react.useMemo.call(void 0, () => {
994
950
  if (renderItem) return renderItem;
995
951
  if (itemBuilder)
996
952
  return ({ item, index }) => itemBuilder({ item, index });
997
953
  return void 0;
998
954
  }, [renderItem, itemBuilder]);
999
- const lastEndReachedHeight = (0, import_react18.useRef)(0);
955
+ const lastEndReachedHeight = _react.useRef.call(void 0, 0);
1000
956
  if (!resolvedRenderer) return null;
1001
957
  const handleScroll = (event) => {
1002
- onScroll?.(event);
958
+ _optionalChain([onScroll, 'optionalCall', _6 => _6(event)]);
1003
959
  if (!onEndReached) return;
1004
960
  const { layoutMeasurement, contentOffset, contentSize } = event.nativeEvent;
1005
- if (!layoutMeasurement?.height) return;
961
+ if (!_optionalChain([layoutMeasurement, 'optionalAccess', _7 => _7.height])) return;
1006
962
  const distanceFromEnd = contentSize.height - (layoutMeasurement.height + contentOffset.y);
1007
963
  const threshold = onEndReachedThreshold * layoutMeasurement.height;
1008
964
  if (distanceFromEnd <= threshold && contentSize.height !== lastEndReachedHeight.current) {
@@ -1010,8 +966,8 @@ var MasonryGridBuilder = ({
1010
966
  onEndReached();
1011
967
  }
1012
968
  };
1013
- return /* @__PURE__ */ import_react18.default.createElement(
1014
- import_react_native18.ScrollView,
969
+ return /* @__PURE__ */ _react2.default.createElement(
970
+ _reactnative.ScrollView,
1015
971
  {
1016
972
  scrollEventThrottle: 16,
1017
973
  scrollEnabled,
@@ -1022,7 +978,7 @@ var MasonryGridBuilder = ({
1022
978
  onScroll: handleScroll
1023
979
  },
1024
980
  header,
1025
- /* @__PURE__ */ import_react18.default.createElement(
981
+ /* @__PURE__ */ _react2.default.createElement(
1026
982
  MasonryGrid,
1027
983
  {
1028
984
  columns,
@@ -1032,29 +988,28 @@ var MasonryGridBuilder = ({
1032
988
  style: [{ width: "100%" }, style],
1033
989
  columnStyle
1034
990
  },
1035
- resolvedData.map((item, index) => /* @__PURE__ */ import_react18.default.createElement(MasonryGridItem, { key: resolvedKeyExtractor(item, index) }, resolvedRenderer({ item, index })))
991
+ resolvedData.map((item, index) => /* @__PURE__ */ _react2.default.createElement(MasonryGridItem, { key: resolvedKeyExtractor(item, index) }, resolvedRenderer({ item, index })))
1036
992
  ),
1037
993
  footer
1038
994
  );
1039
995
  };
1040
996
  MasonryGridBuilder.displayName = "MasonryGridBuilder";
1041
- // Annotate the CommonJS export names for ESM import in node:
1042
- 0 && (module.exports = {
1043
- AspectRatio,
1044
- BlurView,
1045
- Column,
1046
- ConditionalView,
1047
- Grid,
1048
- GridBuilder,
1049
- GridItem,
1050
- Margin,
1051
- MasonryGrid,
1052
- MasonryGridBuilder,
1053
- MasonryGridItem,
1054
- Padding,
1055
- PositionedView,
1056
- RoundedView,
1057
- Row,
1058
- SizedBox,
1059
- Spacer
1060
- });
997
+
998
+
999
+
1000
+
1001
+
1002
+
1003
+
1004
+
1005
+
1006
+
1007
+
1008
+
1009
+
1010
+
1011
+
1012
+
1013
+
1014
+
1015
+ exports.AspectRatio = AspectRatio; exports.BlurView = BlurView; 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.SizedBox = SizedBox; exports.Spacer = Spacer;