@xaui/native 0.0.27 → 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 +6 -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,51 +1,11 @@
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/chart/index.ts
31
- var chart_exports = {};
32
- __export(chart_exports, {
33
- DonutChartCard: () => DonutChartCard,
34
- HeatmapChartCard: () => HeatmapChartCard,
35
- LineChartCard: () => LineChartCard,
36
- PieChartCard: () => PieChartCard,
37
- VerticalBarChartCard: () => VerticalBarChartCard
38
- });
39
- module.exports = __toCommonJS(chart_exports);
40
-
41
- // src/components/chart/donut-chart-card.tsx
42
- var import_react = __toESM(require("react"), 1);
43
- var import_react_native2 = require("react-native");
44
- var import_react_native_svg = __toESM(require("react-native-svg"), 1);
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } 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/chart/donut-chart-card.tsx
2
+ var _react = require('react'); var _react2 = _interopRequireDefault(_react);
3
+ var _reactnative = require('react-native');
4
+ var _reactnativesvg = require('react-native-svg'); var SvgElements = _interopRequireWildcard(_reactnativesvg); var SvgElements2 = _interopRequireWildcard(_reactnativesvg);
45
5
 
46
6
  // src/components/chart/chart.style.ts
47
- var import_react_native = require("react-native");
48
- var styles = import_react_native.StyleSheet.create({
7
+
8
+ var styles = _reactnative.StyleSheet.create({
49
9
  card: {
50
10
  borderRadius: 22,
51
11
  paddingHorizontal: 20,
@@ -348,39 +308,39 @@ var DonutChartCard = ({
348
308
  strokeWidth,
349
309
  style
350
310
  }) => {
351
- const normalizedData = import_react.default.useMemo(
311
+ const normalizedData = _react2.default.useMemo(
352
312
  () => data.filter((item) => item.value > 0),
353
313
  [data]
354
314
  );
355
- const totalValue = import_react.default.useMemo(
315
+ const totalValue = _react2.default.useMemo(
356
316
  () => normalizedData.reduce((sum, item) => sum + item.value, 0),
357
317
  [normalizedData]
358
318
  );
359
- const effectiveStrokeWidth = import_react.default.useMemo(() => {
319
+ const effectiveStrokeWidth = _react2.default.useMemo(() => {
360
320
  const autoStroke = Math.max(8, Math.min(24, Math.round(size * 0.082)));
361
321
  if (strokeWidth === void 0) {
362
322
  return autoStroke;
363
323
  }
364
324
  return Math.max(6, Math.min(strokeWidth, Math.round(size * 0.22)));
365
325
  }, [size, strokeWidth]);
366
- const radius = import_react.default.useMemo(
326
+ const radius = _react2.default.useMemo(
367
327
  () => (size - effectiveStrokeWidth) / 2,
368
328
  [effectiveStrokeWidth, size]
369
329
  );
370
- const circumference = import_react.default.useMemo(() => 2 * Math.PI * radius, [radius]);
371
- const internalGapDegrees = import_react.default.useMemo(
330
+ const circumference = _react2.default.useMemo(() => 2 * Math.PI * radius, [radius]);
331
+ const internalGapDegrees = _react2.default.useMemo(
372
332
  () => Math.max(6.5, Math.min(12.5, 8.1 * (250 / size))),
373
333
  [size]
374
334
  );
375
- const centerTitleFontSize = import_react.default.useMemo(
335
+ const centerTitleFontSize = _react2.default.useMemo(
376
336
  () => Math.max(12, Math.round(size * 0.058)),
377
337
  [size]
378
338
  );
379
- const centerTotalFontSize = import_react.default.useMemo(
339
+ const centerTotalFontSize = _react2.default.useMemo(
380
340
  () => Math.max(24, Math.round(size * 0.128)),
381
341
  [size]
382
342
  );
383
- const segments = import_react.default.useMemo(() => {
343
+ const segments = _react2.default.useMemo(() => {
384
344
  if (!normalizedData.length || totalValue <= 0) {
385
345
  return [];
386
346
  }
@@ -408,8 +368,8 @@ var DonutChartCard = ({
408
368
  normalizedData,
409
369
  totalValue
410
370
  ]);
411
- const chart = /* @__PURE__ */ import_react.default.createElement(import_react_native2.View, { style: [styles.chartWrapper, { width: size, height: size }] }, /* @__PURE__ */ import_react.default.createElement(import_react_native_svg.default, { width: size, height: size }, /* @__PURE__ */ import_react.default.createElement(
412
- import_react_native_svg.Circle,
371
+ const chart = /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.chartWrapper, { width: size, height: size }] }, /* @__PURE__ */ _react2.default.createElement(SvgElements.default, { width: size, height: size }, /* @__PURE__ */ _react2.default.createElement(
372
+ _reactnativesvg.Circle,
413
373
  {
414
374
  cx: size / 2,
415
375
  cy: size / 2,
@@ -418,15 +378,15 @@ var DonutChartCard = ({
418
378
  strokeWidth: effectiveStrokeWidth,
419
379
  fill: "none"
420
380
  }
421
- ), /* @__PURE__ */ import_react.default.createElement(
422
- import_react_native_svg.default,
381
+ ), /* @__PURE__ */ _react2.default.createElement(
382
+ SvgElements.default,
423
383
  {
424
384
  width: size,
425
385
  height: size,
426
386
  style: { transform: [{ rotate: "-90deg" }] }
427
387
  },
428
- segments.map((segment) => /* @__PURE__ */ import_react.default.createElement(
429
- import_react_native_svg.Circle,
388
+ segments.map((segment) => /* @__PURE__ */ _react2.default.createElement(
389
+ _reactnativesvg.Circle,
430
390
  {
431
391
  key: segment.key,
432
392
  cx: size / 2,
@@ -440,8 +400,8 @@ var DonutChartCard = ({
440
400
  fill: "none"
441
401
  }
442
402
  ))
443
- )), (title !== void 0 || total !== void 0) && /* @__PURE__ */ import_react.default.createElement(import_react_native2.View, { style: styles.centerContent, pointerEvents: "none" }, title !== void 0 && /* @__PURE__ */ import_react.default.createElement(
444
- import_react_native2.Text,
403
+ )), (title !== void 0 || total !== void 0) && /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.centerContent, pointerEvents: "none" }, title !== void 0 && /* @__PURE__ */ _react2.default.createElement(
404
+ _reactnative.Text,
445
405
  {
446
406
  style: [
447
407
  styles.centerTitle,
@@ -449,8 +409,8 @@ var DonutChartCard = ({
449
409
  ]
450
410
  },
451
411
  title
452
- ), total !== void 0 && /* @__PURE__ */ import_react.default.createElement(
453
- import_react_native2.Text,
412
+ ), total !== void 0 && /* @__PURE__ */ _react2.default.createElement(
413
+ _reactnative.Text,
454
414
  {
455
415
  style: [
456
416
  styles.centerTotal,
@@ -463,25 +423,25 @@ var DonutChartCard = ({
463
423
  },
464
424
  total
465
425
  )));
466
- const legend = showLegend ? /* @__PURE__ */ import_react.default.createElement(
467
- import_react_native2.View,
426
+ const legend = showLegend ? /* @__PURE__ */ _react2.default.createElement(
427
+ _reactnative.View,
468
428
  {
469
429
  style: [
470
430
  styles.legend,
471
431
  isLegendHorizontal(legendPosition) && styles.legendCompact
472
432
  ]
473
433
  },
474
- data.map((item, index) => /* @__PURE__ */ import_react.default.createElement(import_react_native2.View, { style: styles.legendItem, key: `${item.label}-${index}-legend` }, /* @__PURE__ */ import_react.default.createElement(import_react_native2.View, { style: styles.legendLeft }, /* @__PURE__ */ import_react.default.createElement(import_react_native2.View, { style: [styles.legendDot, { backgroundColor: item.color }] }), /* @__PURE__ */ import_react.default.createElement(
475
- import_react_native2.Text,
434
+ data.map((item, index) => /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.legendItem, key: `${item.label}-${index}-legend` }, /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.legendLeft }, /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.legendDot, { backgroundColor: item.color }] }), /* @__PURE__ */ _react2.default.createElement(
435
+ _reactnative.Text,
476
436
  {
477
- style: [styles.legendTitle, { color: item.labelColor ?? textColor }]
437
+ style: [styles.legendTitle, { color: _nullishCoalesce(item.labelColor, () => ( textColor)) }]
478
438
  },
479
439
  item.label
480
- )), /* @__PURE__ */ import_react.default.createElement(import_react_native2.Text, { style: [styles.legendValue, { color: textColor }] }, item.value)))
440
+ )), /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.legendValue, { color: textColor }] }, item.value)))
481
441
  ) : null;
482
- const content = isLegendHorizontal(legendPosition) ? /* @__PURE__ */ import_react.default.createElement(import_react_native2.View, { style: styles.contentHorizontal }, legendPosition === "left" && legend, chart, legendPosition === "right" && legend) : /* @__PURE__ */ import_react.default.createElement(import_react_native2.View, { style: styles.contentVertical }, legendPosition === "top" && legend, chart, legendPosition === "bottom" && legend);
483
- return /* @__PURE__ */ import_react.default.createElement(
484
- import_react_native2.View,
442
+ const content = isLegendHorizontal(legendPosition) ? /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.contentHorizontal }, legendPosition === "left" && legend, chart, legendPosition === "right" && legend) : /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.contentVertical }, legendPosition === "top" && legend, chart, legendPosition === "bottom" && legend);
443
+ return /* @__PURE__ */ _react2.default.createElement(
444
+ _reactnative.View,
485
445
  {
486
446
  style: [
487
447
  styles.barCard,
@@ -495,8 +455,8 @@ var DonutChartCard = ({
495
455
  };
496
456
 
497
457
  // src/components/chart/vertical-bar-chart-card.tsx
498
- var import_react2 = __toESM(require("react"), 1);
499
- var import_react_native3 = require("react-native");
458
+
459
+
500
460
  var VerticalBarChartCard = ({
501
461
  data,
502
462
  title,
@@ -511,23 +471,23 @@ var VerticalBarChartCard = ({
511
471
  justifyBars = true,
512
472
  style
513
473
  }) => {
514
- const normalizedData = import_react2.default.useMemo(
474
+ const normalizedData = _react2.default.useMemo(
515
475
  () => data.filter((item) => item.value >= 0),
516
476
  [data]
517
477
  );
518
- const minValue = import_react2.default.useMemo(() => {
478
+ const minValue = _react2.default.useMemo(() => {
519
479
  if (!normalizedData.length) {
520
480
  return 0;
521
481
  }
522
482
  return Math.min(...normalizedData.map((item) => item.value));
523
483
  }, [normalizedData]);
524
- const maxValue = import_react2.default.useMemo(() => {
484
+ const maxValue = _react2.default.useMemo(() => {
525
485
  if (!normalizedData.length) {
526
486
  return 1;
527
487
  }
528
488
  return Math.max(...normalizedData.map((item) => item.value), 1);
529
489
  }, [normalizedData]);
530
- const meanValue = import_react2.default.useMemo(() => {
490
+ const meanValue = _react2.default.useMemo(() => {
531
491
  if (!normalizedData.length) {
532
492
  return 0;
533
493
  }
@@ -543,8 +503,8 @@ var VerticalBarChartCard = ({
543
503
  const dynamicBarWidth = Math.max(8, Math.min(30, slotWidth * 0.52));
544
504
  const cornerRadius = Math.min(dynamicBarWidth / 2, 10);
545
505
  const graphHeight = chartHeight - 8;
546
- return /* @__PURE__ */ import_react2.default.createElement(
547
- import_react_native3.View,
506
+ return /* @__PURE__ */ _react2.default.createElement(
507
+ _reactnative.View,
548
508
  {
549
509
  style: [
550
510
  styles.barCard,
@@ -553,9 +513,9 @@ var VerticalBarChartCard = ({
553
513
  style
554
514
  ]
555
515
  },
556
- title !== void 0 && /* @__PURE__ */ import_react2.default.createElement(import_react_native3.Text, { style: [styles.barTitle, { color: textColor }] }, title),
557
- /* @__PURE__ */ import_react2.default.createElement(import_react_native3.View, { style: styles.barChartRow }, showAxes && /* @__PURE__ */ import_react2.default.createElement(import_react_native3.View, { style: [styles.yAxis, { height: chartHeight }] }, /* @__PURE__ */ import_react2.default.createElement(import_react_native3.Text, { style: [styles.yAxisLabel, { color: textColor }] }, formatAxisValue(maxValue)), /* @__PURE__ */ import_react2.default.createElement(import_react_native3.Text, { style: [styles.yAxisLabel, { color: textColor }] }, formatAxisValue(meanValue)), /* @__PURE__ */ import_react2.default.createElement(import_react_native3.Text, { style: [styles.yAxisLabel, { color: textColor }] }, formatAxisValue(minValue))), /* @__PURE__ */ import_react2.default.createElement(import_react_native3.View, { style: styles.chartAndLabels }, /* @__PURE__ */ import_react2.default.createElement(
558
- import_react_native3.View,
516
+ title !== void 0 && /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.barTitle, { color: textColor }] }, title),
517
+ /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.barChartRow }, showAxes && /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.yAxis, { height: chartHeight }] }, /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.yAxisLabel, { color: textColor }] }, formatAxisValue(maxValue)), /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.yAxisLabel, { color: textColor }] }, formatAxisValue(meanValue)), /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.yAxisLabel, { color: textColor }] }, formatAxisValue(minValue))), /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.chartAndLabels }, /* @__PURE__ */ _react2.default.createElement(
518
+ _reactnative.View,
559
519
  {
560
520
  style: {
561
521
  width: chartWidth,
@@ -564,8 +524,8 @@ var VerticalBarChartCard = ({
564
524
  justifyContent: "flex-end"
565
525
  }
566
526
  },
567
- showAxes && /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement(
568
- import_react_native3.View,
527
+ showAxes && /* @__PURE__ */ _react2.default.createElement(_react2.default.Fragment, null, /* @__PURE__ */ _react2.default.createElement(
528
+ _reactnative.View,
569
529
  {
570
530
  style: {
571
531
  position: "absolute",
@@ -576,8 +536,8 @@ var VerticalBarChartCard = ({
576
536
  backgroundColor: "rgba(255,255,255,0.15)"
577
537
  }
578
538
  }
579
- ), /* @__PURE__ */ import_react2.default.createElement(
580
- import_react_native3.View,
539
+ ), /* @__PURE__ */ _react2.default.createElement(
540
+ _reactnative.View,
581
541
  {
582
542
  style: {
583
543
  position: "absolute",
@@ -588,8 +548,8 @@ var VerticalBarChartCard = ({
588
548
  backgroundColor: "rgba(255,255,255,0.12)"
589
549
  }
590
550
  }
591
- ), /* @__PURE__ */ import_react2.default.createElement(
592
- import_react_native3.View,
551
+ ), /* @__PURE__ */ _react2.default.createElement(
552
+ _reactnative.View,
593
553
  {
594
554
  style: {
595
555
  position: "absolute",
@@ -601,8 +561,8 @@ var VerticalBarChartCard = ({
601
561
  }
602
562
  }
603
563
  )),
604
- /* @__PURE__ */ import_react2.default.createElement(
605
- import_react_native3.View,
564
+ /* @__PURE__ */ _react2.default.createElement(
565
+ _reactnative.View,
606
566
  {
607
567
  style: {
608
568
  flexDirection: "row",
@@ -615,8 +575,8 @@ var VerticalBarChartCard = ({
615
575
  normalizedData.map((item, index) => {
616
576
  const valueRatio = Math.max(0, Math.min(1, item.value / maxValue));
617
577
  const barHeight = Math.max(2, Math.round(valueRatio * graphHeight));
618
- return /* @__PURE__ */ import_react2.default.createElement(
619
- import_react_native3.View,
578
+ return /* @__PURE__ */ _react2.default.createElement(
579
+ _reactnative.View,
620
580
  {
621
581
  key: `${item.label}-${index}-bar`,
622
582
  style: {
@@ -626,38 +586,38 @@ var VerticalBarChartCard = ({
626
586
  justifyContent: "flex-end"
627
587
  }
628
588
  },
629
- /* @__PURE__ */ import_react2.default.createElement(
630
- import_react_native3.View,
589
+ /* @__PURE__ */ _react2.default.createElement(
590
+ _reactnative.View,
631
591
  {
632
592
  style: {
633
593
  width: dynamicBarWidth,
634
594
  height: barHeight,
635
595
  borderRadius: cornerRadius,
636
- backgroundColor: item.color ?? "#57C9ED"
596
+ backgroundColor: _nullishCoalesce(item.color, () => ( "#57C9ED"))
637
597
  }
638
598
  }
639
599
  )
640
600
  );
641
601
  })
642
602
  )
643
- ), /* @__PURE__ */ import_react2.default.createElement(import_react_native3.View, { style: [styles.xAxisRow, { width: chartWidth }] }, normalizedData.map((item, index) => /* @__PURE__ */ import_react2.default.createElement(import_react_native3.View, { key: `${item.label}-${index}-x`, style: { width: slotWidth } }, /* @__PURE__ */ import_react2.default.createElement(import_react_native3.Text, { style: [styles.xAxisLabel, { color: textColor }] }, abbreviateXAxisLabels ? abbreviateLabel(item.label, xAxisAbbreviationLength) : item.label)))))),
644
- showFullLegendBelow && /* @__PURE__ */ import_react2.default.createElement(import_react_native3.View, { style: [styles.legend, { marginTop: 18 }] }, normalizedData.map((item, index) => /* @__PURE__ */ import_react2.default.createElement(import_react_native3.View, { key: `${item.label}-${index}-legend`, style: styles.legendItem }, /* @__PURE__ */ import_react2.default.createElement(import_react_native3.View, { style: styles.legendLeft }, /* @__PURE__ */ import_react2.default.createElement(
645
- import_react_native3.View,
603
+ ), /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.xAxisRow, { width: chartWidth }] }, normalizedData.map((item, index) => /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { key: `${item.label}-${index}-x`, style: { width: slotWidth } }, /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.xAxisLabel, { color: textColor }] }, abbreviateXAxisLabels ? abbreviateLabel(item.label, xAxisAbbreviationLength) : item.label)))))),
604
+ showFullLegendBelow && /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.legend, { marginTop: 18 }] }, normalizedData.map((item, index) => /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { key: `${item.label}-${index}-legend`, style: styles.legendItem }, /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.legendLeft }, /* @__PURE__ */ _react2.default.createElement(
605
+ _reactnative.View,
646
606
  {
647
607
  style: [
648
608
  styles.legendDot,
649
- { backgroundColor: item.color ?? "#57C9ED" }
609
+ { backgroundColor: _nullishCoalesce(item.color, () => ( "#57C9ED")) }
650
610
  ]
651
611
  }
652
- ), /* @__PURE__ */ import_react2.default.createElement(import_react_native3.Text, { style: [styles.legendTitle, { color: textColor }] }, item.label)), /* @__PURE__ */ import_react2.default.createElement(import_react_native3.Text, { style: [styles.legendValue, { color: textColor }] }, item.value))))
612
+ ), /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.legendTitle, { color: textColor }] }, item.label)), /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.legendValue, { color: textColor }] }, item.value))))
653
613
  );
654
614
  };
655
615
 
656
616
  // src/components/chart/pie-chart-card.tsx
657
- var import_react3 = __toESM(require("react"), 1);
658
- var import_react_native4 = require("react-native");
659
- var import_react_native_svg2 = __toESM(require("react-native-svg"), 1);
660
- var SvgElements = __toESM(require("react-native-svg"), 1);
617
+
618
+
619
+
620
+
661
621
  var polarToCartesian = (centerX, centerY, radius, angleInDegrees) => {
662
622
  const angleInRadians = (angleInDegrees - 90) * Math.PI / 180;
663
623
  return {
@@ -688,11 +648,11 @@ var PieChartCard = ({
688
648
  size = 220,
689
649
  style
690
650
  }) => {
691
- const normalizedData = import_react3.default.useMemo(
651
+ const normalizedData = _react2.default.useMemo(
692
652
  () => data.filter((item) => item.value > 0),
693
653
  [data]
694
654
  );
695
- const totalValue = import_react3.default.useMemo(
655
+ const totalValue = _react2.default.useMemo(
696
656
  () => normalizedData.reduce((sum, item) => sum + item.value, 0),
697
657
  [normalizedData]
698
658
  );
@@ -700,7 +660,7 @@ var PieChartCard = ({
700
660
  const center = chartSize / 2;
701
661
  const radius = chartSize * 0.44;
702
662
  const gapDegrees = 1;
703
- const sectors = import_react3.default.useMemo(() => {
663
+ const sectors = _react2.default.useMemo(() => {
704
664
  if (!normalizedData.length || totalValue <= 0) {
705
665
  return [];
706
666
  }
@@ -719,8 +679,8 @@ var PieChartCard = ({
719
679
  });
720
680
  }, [center, gapDegrees, normalizedData, radius, totalValue]);
721
681
  const PathElement = SvgElements.Path;
722
- const chart = /* @__PURE__ */ import_react3.default.createElement(import_react_native4.View, { style: [styles.chartWrapper, { width: chartSize, height: chartSize }] }, /* @__PURE__ */ import_react3.default.createElement(import_react_native_svg2.default, { width: chartSize, height: chartSize }, PathElement ? sectors.map((sector) => /* @__PURE__ */ import_react3.default.createElement(PathElement, { key: sector.key, d: sector.path, fill: sector.color })) : sectors.map((sector, index) => /* @__PURE__ */ import_react3.default.createElement(
723
- import_react_native_svg2.Circle,
682
+ const chart = /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.chartWrapper, { width: chartSize, height: chartSize }] }, /* @__PURE__ */ _react2.default.createElement(SvgElements.default, { width: chartSize, height: chartSize }, PathElement ? sectors.map((sector) => /* @__PURE__ */ _react2.default.createElement(PathElement, { key: sector.key, d: sector.path, fill: sector.color })) : sectors.map((sector, index) => /* @__PURE__ */ _react2.default.createElement(
683
+ _reactnativesvg.Circle,
724
684
  {
725
685
  key: `${sector.key}-fallback`,
726
686
  cx: chartSize / 2,
@@ -729,25 +689,25 @@ var PieChartCard = ({
729
689
  fill: sector.color
730
690
  }
731
691
  ))));
732
- const legend = showLegend ? /* @__PURE__ */ import_react3.default.createElement(
733
- import_react_native4.View,
692
+ const legend = showLegend ? /* @__PURE__ */ _react2.default.createElement(
693
+ _reactnative.View,
734
694
  {
735
695
  style: [
736
696
  styles.legend,
737
697
  isLegendHorizontal(legendPosition) && styles.legendCompact
738
698
  ]
739
699
  },
740
- data.map((item, index) => /* @__PURE__ */ import_react3.default.createElement(import_react_native4.View, { style: styles.legendItem, key: `${item.label}-${index}-legend` }, /* @__PURE__ */ import_react3.default.createElement(import_react_native4.View, { style: styles.legendLeft }, /* @__PURE__ */ import_react3.default.createElement(import_react_native4.View, { style: [styles.legendDot, { backgroundColor: item.color }] }), /* @__PURE__ */ import_react3.default.createElement(
741
- import_react_native4.Text,
700
+ data.map((item, index) => /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.legendItem, key: `${item.label}-${index}-legend` }, /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.legendLeft }, /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.legendDot, { backgroundColor: item.color }] }), /* @__PURE__ */ _react2.default.createElement(
701
+ _reactnative.Text,
742
702
  {
743
- style: [styles.legendTitle, { color: item.labelColor ?? textColor }]
703
+ style: [styles.legendTitle, { color: _nullishCoalesce(item.labelColor, () => ( textColor)) }]
744
704
  },
745
705
  item.label
746
- )), /* @__PURE__ */ import_react3.default.createElement(import_react_native4.Text, { style: [styles.legendValue, { color: textColor }] }, item.value)))
706
+ )), /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.legendValue, { color: textColor }] }, item.value)))
747
707
  ) : null;
748
- const content = isLegendHorizontal(legendPosition) ? /* @__PURE__ */ import_react3.default.createElement(import_react_native4.View, { style: styles.pieContentHorizontal }, legendPosition === "left" && legend, chart, legendPosition === "right" && legend) : /* @__PURE__ */ import_react3.default.createElement(import_react_native4.View, { style: styles.pieContentVertical }, legendPosition === "top" && legend, chart, legendPosition === "bottom" && legend);
749
- return /* @__PURE__ */ import_react3.default.createElement(
750
- import_react_native4.View,
708
+ const content = isLegendHorizontal(legendPosition) ? /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.pieContentHorizontal }, legendPosition === "left" && legend, chart, legendPosition === "right" && legend) : /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.pieContentVertical }, legendPosition === "top" && legend, chart, legendPosition === "bottom" && legend);
709
+ return /* @__PURE__ */ _react2.default.createElement(
710
+ _reactnative.View,
751
711
  {
752
712
  style: [
753
713
  styles.card,
@@ -756,16 +716,16 @@ var PieChartCard = ({
756
716
  style
757
717
  ]
758
718
  },
759
- (title !== void 0 || total !== void 0) && /* @__PURE__ */ import_react3.default.createElement(import_react_native4.View, { style: styles.pieHeader }, /* @__PURE__ */ import_react3.default.createElement(import_react_native4.Text, { style: [styles.pieHeaderTitle, { color: textColor }] }, title ?? ""), /* @__PURE__ */ import_react3.default.createElement(import_react_native4.Text, { style: [styles.pieHeaderTotal, { color: textColor }] }, total ?? "")),
719
+ (title !== void 0 || total !== void 0) && /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.pieHeader }, /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.pieHeaderTitle, { color: textColor }] }, _nullishCoalesce(title, () => ( ""))), /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.pieHeaderTotal, { color: textColor }] }, _nullishCoalesce(total, () => ( "")))),
760
720
  content
761
721
  );
762
722
  };
763
723
 
764
724
  // src/components/chart/line-chart-card.tsx
765
- var import_react4 = __toESM(require("react"), 1);
766
- var import_react_native5 = require("react-native");
767
- var import_react_native_svg3 = __toESM(require("react-native-svg"), 1);
768
- var SvgElements2 = __toESM(require("react-native-svg"), 1);
725
+
726
+
727
+
728
+
769
729
  var buildSmoothPath = (points) => {
770
730
  if (points.length < 2) {
771
731
  return "";
@@ -805,23 +765,23 @@ var LineChartCard = ({
805
765
  xAxisAbbreviationLength = 3,
806
766
  style
807
767
  }) => {
808
- const normalizedData = import_react4.default.useMemo(
768
+ const normalizedData = _react2.default.useMemo(
809
769
  () => data.filter((item) => Number.isFinite(item.value)),
810
770
  [data]
811
771
  );
812
- const minValue = import_react4.default.useMemo(() => {
772
+ const minValue = _react2.default.useMemo(() => {
813
773
  if (!normalizedData.length) {
814
774
  return 0;
815
775
  }
816
776
  return Math.min(...normalizedData.map((item) => item.value));
817
777
  }, [normalizedData]);
818
- const maxValue = import_react4.default.useMemo(() => {
778
+ const maxValue = _react2.default.useMemo(() => {
819
779
  if (!normalizedData.length) {
820
780
  return 1;
821
781
  }
822
782
  return Math.max(...normalizedData.map((item) => item.value), 1);
823
783
  }, [normalizedData]);
824
- const meanValue = import_react4.default.useMemo(() => {
784
+ const meanValue = _react2.default.useMemo(() => {
825
785
  if (!normalizedData.length) {
826
786
  return 0;
827
787
  }
@@ -833,7 +793,7 @@ var LineChartCard = ({
833
793
  const rightPadding = paddingX + 8;
834
794
  const graphHeight = chartHeight - 10;
835
795
  const dataRange = Math.max(1, maxValue - minValue);
836
- const points = import_react4.default.useMemo(() => {
796
+ const points = _react2.default.useMemo(() => {
837
797
  if (!normalizedData.length) {
838
798
  return [];
839
799
  }
@@ -856,8 +816,8 @@ var LineChartCard = ({
856
816
  const linePath = lineMode === "smooth" ? buildSmoothPath(points) : buildDirectPath(points);
857
817
  const areaPath = points.length ? `${linePath} L ${points[points.length - 1].x} ${graphHeight} L ${points[0].x} ${graphHeight} Z` : "";
858
818
  const PathElement = SvgElements2.Path;
859
- return /* @__PURE__ */ import_react4.default.createElement(
860
- import_react_native5.View,
819
+ return /* @__PURE__ */ _react2.default.createElement(
820
+ _reactnative.View,
861
821
  {
862
822
  style: [
863
823
  styles.barCard,
@@ -866,25 +826,25 @@ var LineChartCard = ({
866
826
  style
867
827
  ]
868
828
  },
869
- title !== void 0 && /* @__PURE__ */ import_react4.default.createElement(import_react_native5.Text, { style: [styles.barTitle, { color: textColor }] }, title),
870
- /* @__PURE__ */ import_react4.default.createElement(import_react_native5.View, { style: styles.barChartRow }, showAxes && /* @__PURE__ */ import_react4.default.createElement(import_react_native5.View, { style: styles.yAxis }, /* @__PURE__ */ import_react4.default.createElement(import_react_native5.Text, { style: [styles.yAxisLabel, { color: textColor }] }, formatAxisValue(maxValue)), /* @__PURE__ */ import_react4.default.createElement(import_react_native5.Text, { style: [styles.yAxisLabel, { color: textColor }] }, formatAxisValue(meanValue)), /* @__PURE__ */ import_react4.default.createElement(import_react_native5.Text, { style: [styles.yAxisLabel, { color: textColor }] }, formatAxisValue(minValue))), /* @__PURE__ */ import_react4.default.createElement(import_react_native5.View, { style: styles.chartAndLabels }, /* @__PURE__ */ import_react4.default.createElement(
871
- import_react_native5.View,
829
+ title !== void 0 && /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.barTitle, { color: textColor }] }, title),
830
+ /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.barChartRow }, showAxes && /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.yAxis }, /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.yAxisLabel, { color: textColor }] }, formatAxisValue(maxValue)), /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.yAxisLabel, { color: textColor }] }, formatAxisValue(meanValue)), /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.yAxisLabel, { color: textColor }] }, formatAxisValue(minValue))), /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.chartAndLabels }, /* @__PURE__ */ _react2.default.createElement(
831
+ _reactnative.View,
872
832
  {
873
833
  style: [
874
834
  styles.lineChartArea,
875
835
  { width: chartWidth, height: chartHeight }
876
836
  ]
877
837
  },
878
- showAxes && /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement(import_react_native5.View, { style: [styles.lineChartGrid, { top: 0 }] }), /* @__PURE__ */ import_react4.default.createElement(
879
- import_react_native5.View,
838
+ showAxes && /* @__PURE__ */ _react2.default.createElement(_react2.default.Fragment, null, /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.lineChartGrid, { top: 0 }] }), /* @__PURE__ */ _react2.default.createElement(
839
+ _reactnative.View,
880
840
  {
881
841
  style: [
882
842
  styles.lineChartGrid,
883
843
  { top: Math.round(chartHeight / 2) }
884
844
  ]
885
845
  }
886
- ), /* @__PURE__ */ import_react4.default.createElement(import_react_native5.View, { style: [styles.lineChartGrid, { top: chartHeight - 1 }] })),
887
- /* @__PURE__ */ import_react4.default.createElement(import_react_native_svg3.default, { width: chartWidth, height: chartHeight }, !!areaPath && (PathElement ? /* @__PURE__ */ import_react4.default.createElement(PathElement, { d: areaPath, fill: areaColor }) : null), !!linePath && (PathElement ? /* @__PURE__ */ import_react4.default.createElement(
846
+ ), /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.lineChartGrid, { top: chartHeight - 1 }] })),
847
+ /* @__PURE__ */ _react2.default.createElement(SvgElements.default, { width: chartWidth, height: chartHeight }, !!areaPath && (PathElement ? /* @__PURE__ */ _react2.default.createElement(PathElement, { d: areaPath, fill: areaColor }) : null), !!linePath && (PathElement ? /* @__PURE__ */ _react2.default.createElement(
888
848
  PathElement,
889
849
  {
890
850
  d: linePath,
@@ -894,8 +854,8 @@ var LineChartCard = ({
894
854
  strokeLinecap: "round",
895
855
  strokeLinejoin: "round"
896
856
  }
897
- ) : null), showPoints && points.map((point, index) => /* @__PURE__ */ import_react4.default.createElement(
898
- import_react_native_svg3.Circle,
857
+ ) : null), showPoints && points.map((point, index) => /* @__PURE__ */ _react2.default.createElement(
858
+ _reactnativesvg.Circle,
899
859
  {
900
860
  key: `line-point-${index}`,
901
861
  cx: point.x,
@@ -904,20 +864,20 @@ var LineChartCard = ({
904
864
  fill: lineColor
905
865
  }
906
866
  )))
907
- ), /* @__PURE__ */ import_react4.default.createElement(import_react_native5.View, { style: [styles.xAxisRow, { width: chartWidth }] }, normalizedData.map((item, index) => /* @__PURE__ */ import_react4.default.createElement(
908
- import_react_native5.View,
867
+ ), /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.xAxisRow, { width: chartWidth }] }, normalizedData.map((item, index) => /* @__PURE__ */ _react2.default.createElement(
868
+ _reactnative.View,
909
869
  {
910
870
  key: `${item.label}-${index}-line-x`,
911
871
  style: { width: chartWidth / Math.max(normalizedData.length, 1) }
912
872
  },
913
- /* @__PURE__ */ import_react4.default.createElement(import_react_native5.Text, { style: [styles.xAxisLabel, { color: textColor }] }, abbreviateXAxisLabels ? abbreviateLabel(item.label, xAxisAbbreviationLength) : item.label)
873
+ /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.xAxisLabel, { color: textColor }] }, abbreviateXAxisLabels ? abbreviateLabel(item.label, xAxisAbbreviationLength) : item.label)
914
874
  )))))
915
875
  );
916
876
  };
917
877
 
918
878
  // src/components/chart/heatmap-chart-card.tsx
919
- var import_react5 = __toESM(require("react"), 1);
920
- var import_react_native6 = require("react-native");
879
+
880
+
921
881
  var getHeatmapColor = (value, min, max, startColor, endColor) => {
922
882
  if (max === min) {
923
883
  return startColor;
@@ -954,7 +914,7 @@ var HeatmapChartCard = ({
954
914
  cellGap = 4,
955
915
  style
956
916
  }) => {
957
- const { minValue, maxValue } = import_react5.default.useMemo(() => {
917
+ const { minValue, maxValue } = _react2.default.useMemo(() => {
958
918
  let min = Number.POSITIVE_INFINITY;
959
919
  let max = Number.NEGATIVE_INFINITY;
960
920
  for (const row of data) {
@@ -970,11 +930,11 @@ var HeatmapChartCard = ({
970
930
  return { minValue: min, maxValue: max };
971
931
  }, [data]);
972
932
  const rows = data.length;
973
- const cols = data[0]?.length ?? 0;
933
+ const cols = _nullishCoalesce(_optionalChain([data, 'access', _2 => _2[0], 'optionalAccess', _3 => _3.length]), () => ( 0));
974
934
  const labelWidth = 50;
975
935
  const labelHeight = 30;
976
- return /* @__PURE__ */ import_react5.default.createElement(
977
- import_react_native6.View,
936
+ return /* @__PURE__ */ _react2.default.createElement(
937
+ _reactnative.View,
978
938
  {
979
939
  style: [
980
940
  styles.card,
@@ -983,9 +943,9 @@ var HeatmapChartCard = ({
983
943
  style
984
944
  ]
985
945
  },
986
- title && /* @__PURE__ */ import_react5.default.createElement(import_react_native6.View, { style: styles.chartHeader }, /* @__PURE__ */ import_react5.default.createElement(import_react_native6.Text, { style: [styles.chartTitle, { color: textColor }] }, title)),
987
- /* @__PURE__ */ import_react5.default.createElement(import_react_native6.View, { style: styles.heatmapContainer }, /* @__PURE__ */ import_react5.default.createElement(import_react_native6.View, { style: styles.heatmapGrid }, /* @__PURE__ */ import_react5.default.createElement(import_react_native6.View, { style: { width: labelWidth, height: labelHeight } }), xLabels?.map((label, index) => /* @__PURE__ */ import_react5.default.createElement(
988
- import_react_native6.View,
946
+ title && /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.chartHeader }, /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.chartTitle, { color: textColor }] }, title)),
947
+ /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.heatmapContainer }, /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.heatmapGrid }, /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: { width: labelWidth, height: labelHeight } }), _optionalChain([xLabels, 'optionalAccess', _4 => _4.map, 'call', _5 => _5((label, index) => /* @__PURE__ */ _react2.default.createElement(
948
+ _reactnative.View,
989
949
  {
990
950
  key: `x-label-${index}`,
991
951
  style: [
@@ -997,16 +957,16 @@ var HeatmapChartCard = ({
997
957
  }
998
958
  ]
999
959
  },
1000
- /* @__PURE__ */ import_react5.default.createElement(
1001
- import_react_native6.Text,
960
+ /* @__PURE__ */ _react2.default.createElement(
961
+ _reactnative.Text,
1002
962
  {
1003
963
  style: [styles.heatmapLabelText, { color: textColor }],
1004
964
  numberOfLines: 1
1005
965
  },
1006
966
  abbreviateLabel(label, 3)
1007
967
  )
1008
- ))), data.map((row, rowIndex) => /* @__PURE__ */ import_react5.default.createElement(import_react_native6.View, { key: `row-${rowIndex}`, style: styles.heatmapRow }, yLabels?.[rowIndex] && /* @__PURE__ */ import_react5.default.createElement(import_react_native6.View, { style: [styles.heatmapYLabel, { width: labelWidth }] }, /* @__PURE__ */ import_react5.default.createElement(
1009
- import_react_native6.Text,
968
+ ))])), data.map((row, rowIndex) => /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { key: `row-${rowIndex}`, style: styles.heatmapRow }, _optionalChain([yLabels, 'optionalAccess', _6 => _6[rowIndex]]) && /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.heatmapYLabel, { width: labelWidth }] }, /* @__PURE__ */ _react2.default.createElement(
969
+ _reactnative.Text,
1010
970
  {
1011
971
  style: [styles.heatmapLabelText, { color: textColor }],
1012
972
  numberOfLines: 1
@@ -1020,8 +980,8 @@ var HeatmapChartCard = ({
1020
980
  startColor,
1021
981
  endColor
1022
982
  );
1023
- return /* @__PURE__ */ import_react5.default.createElement(
1024
- import_react_native6.View,
983
+ return /* @__PURE__ */ _react2.default.createElement(
984
+ _reactnative.View,
1025
985
  {
1026
986
  key: `cell-${rowIndex}-${colIndex}`,
1027
987
  style: [
@@ -1035,10 +995,10 @@ var HeatmapChartCard = ({
1035
995
  }
1036
996
  ]
1037
997
  },
1038
- showValues && /* @__PURE__ */ import_react5.default.createElement(import_react_native6.Text, { style: styles.heatmapCellText }, value)
998
+ showValues && /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: styles.heatmapCellText }, value)
1039
999
  );
1040
1000
  })))),
1041
- showLegend && /* @__PURE__ */ import_react5.default.createElement(import_react_native6.View, { style: styles.heatmapLegend }, /* @__PURE__ */ import_react5.default.createElement(import_react_native6.View, { style: styles.heatmapLegendGradient }, Array.from({ length: 5 }).map((_, index) => {
1001
+ showLegend && /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.heatmapLegend }, /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.heatmapLegendGradient }, Array.from({ length: 5 }).map((_, index) => {
1042
1002
  const ratio = index / 4;
1043
1003
  const value = minValue + (maxValue - minValue) * ratio;
1044
1004
  const color = getHeatmapColor(
@@ -1048,20 +1008,19 @@ var HeatmapChartCard = ({
1048
1008
  startColor,
1049
1009
  endColor
1050
1010
  );
1051
- return /* @__PURE__ */ import_react5.default.createElement(import_react_native6.View, { key: `legend-${index}`, style: styles.heatmapLegendItem }, /* @__PURE__ */ import_react5.default.createElement(
1052
- import_react_native6.View,
1011
+ return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { key: `legend-${index}`, style: styles.heatmapLegendItem }, /* @__PURE__ */ _react2.default.createElement(
1012
+ _reactnative.View,
1053
1013
  {
1054
1014
  style: [styles.heatmapLegendBox, { backgroundColor: color }]
1055
1015
  }
1056
- ), /* @__PURE__ */ import_react5.default.createElement(import_react_native6.Text, { style: [styles.heatmapLegendValue, { color: textColor }] }, value.toFixed(1)));
1016
+ ), /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.heatmapLegendValue, { color: textColor }] }, value.toFixed(1)));
1057
1017
  })))
1058
1018
  );
1059
1019
  };
1060
- // Annotate the CommonJS export names for ESM import in node:
1061
- 0 && (module.exports = {
1062
- DonutChartCard,
1063
- HeatmapChartCard,
1064
- LineChartCard,
1065
- PieChartCard,
1066
- VerticalBarChartCard
1067
- });
1020
+
1021
+
1022
+
1023
+
1024
+
1025
+
1026
+ exports.DonutChartCard = DonutChartCard; exports.HeatmapChartCard = HeatmapChartCard; exports.LineChartCard = LineChartCard; exports.PieChartCard = PieChartCard; exports.VerticalBarChartCard = VerticalBarChartCard;