app-studio 0.5.11 → 0.5.14

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.
@@ -563,14 +563,13 @@ const includeKeys = /*#__PURE__*/new Set(['src', 'alt', 'style', 'as']);
563
563
 
564
564
  // styleHelpers.ts
565
565
  // Function to convert style object to CSS string
566
- const styleObjectToCss = styleObj => {
567
- return Object.entries(styleObj).map(_ref => {
566
+ const styleObjectToCss = styles => {
567
+ return Object.entries(styles).map(_ref => {
568
568
  let [key, value] = _ref;
569
- return `${toKebabCase(key)}: ${value};`;
569
+ const cssProperty = key.replace(/([A-Z])/g, '-$1').toLowerCase();
570
+ return `${cssProperty}: ${value};`;
570
571
  }).join(' ');
571
572
  };
572
- // Function to convert camelCase to kebab-case
573
- const toKebabCase = str => str.replace(/([A-Z])/g, match => '-' + match.toLowerCase());
574
573
  // // Function to check if a property is a style prop
575
574
  // export const isStyleProp = (prop: string): boolean => {
576
575
  // // Implement your logic to determine if a prop is a style prop
@@ -949,6 +948,20 @@ function generatePropertyShorthand(styledProps) {
949
948
  }
950
949
  const propertyShorthand = /*#__PURE__*/generatePropertyShorthand(StyleProps);
951
950
  const utilityClassManager = /*#__PURE__*/new UtilityClassManager(propertyShorthand);
951
+ function parseDuration(duration) {
952
+ const match = duration.match(/^([\d.]+)(ms|s)$/);
953
+ if (!match) return 0;
954
+ const value = parseFloat(match[1]);
955
+ const unit = match[2];
956
+ return unit === 's' ? value * 1000 : value;
957
+ }
958
+ // Fonction pour formater une durée en millisecondes en chaîne avec unité
959
+ function formatDuration(ms) {
960
+ if (ms >= 1000 && ms % 1000 === 0) {
961
+ return `${ms / 1000}s`;
962
+ }
963
+ return `${ms}ms`;
964
+ }
952
965
  const extractUtilityClasses = (props, getColor, mediaQueries, devices) => {
953
966
  const classes = [];
954
967
  // Styles calculés basés sur les props
@@ -1013,6 +1026,7 @@ const extractUtilityClasses = (props, getColor, mediaQueries, devices) => {
1013
1026
  const animationDirections = [];
1014
1027
  const animationFillModes = [];
1015
1028
  const animationPlayStates = [];
1029
+ let cumulativeTime = 0; // Temps cumulé en millisecondes
1016
1030
  animations.forEach(animation => {
1017
1031
  const {
1018
1032
  keyframesName,
@@ -1022,9 +1036,19 @@ const extractUtilityClasses = (props, getColor, mediaQueries, devices) => {
1022
1036
  utilityClassManager.injectRule(keyframes);
1023
1037
  }
1024
1038
  animationNames.push(keyframesName);
1025
- animationDurations.push(animation.duration || '0s');
1039
+ // Parse duration and delay
1040
+ const durationStr = animation.duration || '0s';
1041
+ const durationMs = parseDuration(durationStr);
1042
+ const delayStr = animation.delay || '0s';
1043
+ const delayMs = parseDuration(delayStr);
1044
+ // Calculer le délai total pour cette animation
1045
+ const totalDelayMs = cumulativeTime + delayMs;
1046
+ // Mettre à jour le temps cumulé
1047
+ cumulativeTime = totalDelayMs + durationMs;
1048
+ // Ajouter les valeurs formatées aux tableaux
1049
+ animationDurations.push(formatDuration(durationMs));
1026
1050
  animationTimingFunctions.push(animation.timingFunction || 'ease');
1027
- animationDelays.push(animation.delay || '0s');
1051
+ animationDelays.push(formatDuration(totalDelayMs));
1028
1052
  animationIterationCounts.push(animation.iterationCount !== undefined ? `${animation.iterationCount}` : '1');
1029
1053
  animationDirections.push(animation.direction || 'normal');
1030
1054
  animationFillModes.push(animation.fillMode || 'none');
@@ -1213,31 +1237,21 @@ const Element = /*#__PURE__*/React__default.memo( /*#__PURE__*/React.forwardRef(
1213
1237
  return /*#__PURE__*/React__default.createElement(Component, Object.assign({}, newProps), children);
1214
1238
  }));
1215
1239
 
1216
- const View = /*#__PURE__*/React__default.memo( /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(Element, Object.assign({}, props, {
1217
- ref: ref
1218
- }))));
1219
- const Div = /*#__PURE__*/React__default.memo( /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(View, Object.assign({}, props, {
1220
- ref: ref
1221
- }))));
1222
- const SafeArea = /*#__PURE__*/React__default.memo( /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(View, Object.assign({}, props, {
1223
- ref: ref
1224
- }))));
1225
- const Scroll = /*#__PURE__*/React__default.memo( /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(View, Object.assign({
1240
+ const View = /*#__PURE__*/React__default.memo(props => /*#__PURE__*/React__default.createElement(Element, Object.assign({}, props)));
1241
+ const Div = /*#__PURE__*/React__default.memo(props => /*#__PURE__*/React__default.createElement(View, Object.assign({}, props)));
1242
+ const SafeArea = /*#__PURE__*/React__default.memo(props => /*#__PURE__*/React__default.createElement(View, Object.assign({}, props)));
1243
+ const Scroll = /*#__PURE__*/React__default.memo(props => /*#__PURE__*/React__default.createElement(View, Object.assign({
1226
1244
  overflow: "auto"
1227
- }, props, {
1228
- ref: ref
1229
- }))));
1230
- const Span = /*#__PURE__*/React__default.memo( /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(Element, Object.assign({}, props, {
1231
- ref: ref,
1245
+ }, props)));
1246
+ const Span = /*#__PURE__*/React__default.memo(props => /*#__PURE__*/React__default.createElement(Element, Object.assign({
1232
1247
  as: "span"
1233
- }))));
1248
+ }, props)));
1234
1249
 
1235
- const Image = /*#__PURE__*/React__default.memo( /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(Element, Object.assign({}, props, {
1236
- as: "img",
1237
- ref: ref
1238
- }))));
1250
+ const Image = /*#__PURE__*/React__default.memo(props => /*#__PURE__*/React__default.createElement(Element, Object.assign({
1251
+ as: "img"
1252
+ }, props)));
1239
1253
 
1240
- const Text = /*#__PURE__*/React__default.memo( /*#__PURE__*/React__default.forwardRef((props, ref) => {
1254
+ const Text = /*#__PURE__*/React__default.memo(props => {
1241
1255
  const {
1242
1256
  toUpperCase,
1243
1257
  children,
@@ -1246,32 +1260,29 @@ const Text = /*#__PURE__*/React__default.memo( /*#__PURE__*/React__default.forwa
1246
1260
  // Convertir le texte en majuscules si toUpperCase est activé
1247
1261
  const content = toUpperCase && typeof children === 'string' ? children.toUpperCase() : children;
1248
1262
  return /*#__PURE__*/React__default.createElement(Element, Object.assign({
1249
- as: "span",
1250
- ref: ref
1263
+ as: "span"
1251
1264
  }, rest), content);
1252
- }));
1265
+ });
1253
1266
 
1254
1267
  // Composant Form
1255
- const Form = /*#__PURE__*/React__default.memo( /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(Element, Object.assign({}, props, {
1256
- ref: ref,
1268
+ const Form = /*#__PURE__*/React__default.memo(props => /*#__PURE__*/React__default.createElement(Element, Object.assign({
1257
1269
  as: "form"
1258
- }))));
1270
+ }, props)));
1259
1271
  // Composant Input
1260
- const Input = /*#__PURE__*/React__default.memo( /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(Element, Object.assign({}, props, {
1261
- ref: ref,
1272
+ const Input = /*#__PURE__*/React__default.memo(props => /*#__PURE__*/React__default.createElement(Element, Object.assign({
1262
1273
  as: "input"
1263
- }))));
1274
+ }, props)));
1264
1275
  // Composant Button
1265
- const Button = /*#__PURE__*/React__default.memo( /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(Element, Object.assign({}, props, {
1266
- ref: ref,
1276
+ const Button = /*#__PURE__*/React__default.memo(props => /*#__PURE__*/React__default.createElement(Element, Object.assign({
1267
1277
  as: "button"
1268
- }))));
1278
+ }, props)));
1269
1279
 
1270
1280
  // animations.ts
1271
1281
  const fadeIn = _ref => {
1272
1282
  let {
1273
1283
  duration = '1s',
1274
- timingFunction = 'ease'
1284
+ timingFunction = 'ease',
1285
+ ...props
1275
1286
  } = _ref;
1276
1287
  return {
1277
1288
  from: {
@@ -1281,13 +1292,15 @@ const fadeIn = _ref => {
1281
1292
  opacity: 1
1282
1293
  },
1283
1294
  duration,
1284
- timingFunction
1295
+ timingFunction,
1296
+ ...props
1285
1297
  };
1286
1298
  };
1287
1299
  const fadeOut = _ref2 => {
1288
1300
  let {
1289
1301
  duration = '1s',
1290
- timingFunction = 'ease'
1302
+ timingFunction = 'ease',
1303
+ ...props
1291
1304
  } = _ref2;
1292
1305
  return {
1293
1306
  from: {
@@ -1297,13 +1310,15 @@ const fadeOut = _ref2 => {
1297
1310
  opacity: 0
1298
1311
  },
1299
1312
  duration,
1300
- timingFunction
1313
+ timingFunction,
1314
+ ...props
1301
1315
  };
1302
1316
  };
1303
1317
  const slideInLeft = _ref3 => {
1304
1318
  let {
1305
1319
  duration = '0.5s',
1306
- timingFunction = 'ease-out'
1320
+ timingFunction = 'ease-out',
1321
+ ...props
1307
1322
  } = _ref3;
1308
1323
  return {
1309
1324
  from: {
@@ -1313,13 +1328,15 @@ const slideInLeft = _ref3 => {
1313
1328
  transform: 'translateX(0)'
1314
1329
  },
1315
1330
  duration,
1316
- timingFunction
1331
+ timingFunction,
1332
+ ...props
1317
1333
  };
1318
1334
  };
1319
1335
  const slideInRight = _ref4 => {
1320
1336
  let {
1321
1337
  duration = '0.5s',
1322
- timingFunction = 'ease-out'
1338
+ timingFunction = 'ease-out',
1339
+ ...props
1323
1340
  } = _ref4;
1324
1341
  return {
1325
1342
  from: {
@@ -1329,13 +1346,15 @@ const slideInRight = _ref4 => {
1329
1346
  transform: 'translateX(0)'
1330
1347
  },
1331
1348
  duration,
1332
- timingFunction
1349
+ timingFunction,
1350
+ ...props
1333
1351
  };
1334
1352
  };
1335
1353
  const slideInDown = _ref5 => {
1336
1354
  let {
1337
1355
  duration = '0.5s',
1338
- timingFunction = 'ease-out'
1356
+ timingFunction = 'ease-out',
1357
+ ...props
1339
1358
  } = _ref5;
1340
1359
  return {
1341
1360
  from: {
@@ -1345,13 +1364,15 @@ const slideInDown = _ref5 => {
1345
1364
  transform: 'translateY(0)'
1346
1365
  },
1347
1366
  duration,
1348
- timingFunction
1367
+ timingFunction,
1368
+ ...props
1349
1369
  };
1350
1370
  };
1351
1371
  const slideInUp = _ref6 => {
1352
1372
  let {
1353
1373
  duration = '0.5s',
1354
- timingFunction = 'ease-out'
1374
+ timingFunction = 'ease-out',
1375
+ ...props
1355
1376
  } = _ref6;
1356
1377
  return {
1357
1378
  from: {
@@ -1361,14 +1382,16 @@ const slideInUp = _ref6 => {
1361
1382
  transform: 'translateY(0)'
1362
1383
  },
1363
1384
  duration,
1364
- timingFunction
1385
+ timingFunction,
1386
+ ...props
1365
1387
  };
1366
1388
  };
1367
1389
  const bounce = _ref7 => {
1368
1390
  let {
1369
1391
  duration = '2s',
1370
1392
  timingFunction = 'ease',
1371
- iterationCount = 'infinite'
1393
+ iterationCount = 'infinite',
1394
+ ...props
1372
1395
  } = _ref7;
1373
1396
  return {
1374
1397
  from: {
@@ -1391,14 +1414,16 @@ const bounce = _ref7 => {
1391
1414
  },
1392
1415
  duration,
1393
1416
  timingFunction,
1394
- iterationCount
1417
+ iterationCount,
1418
+ ...props
1395
1419
  };
1396
1420
  };
1397
1421
  const rotate = _ref8 => {
1398
1422
  let {
1399
1423
  duration = '1s',
1400
1424
  timingFunction = 'linear',
1401
- iterationCount = 'infinite'
1425
+ iterationCount = 'infinite',
1426
+ ...props
1402
1427
  } = _ref8;
1403
1428
  return {
1404
1429
  from: {
@@ -1409,14 +1434,16 @@ const rotate = _ref8 => {
1409
1434
  },
1410
1435
  duration,
1411
1436
  timingFunction,
1412
- iterationCount
1437
+ iterationCount,
1438
+ ...props
1413
1439
  };
1414
1440
  };
1415
1441
  const pulse = _ref9 => {
1416
1442
  let {
1417
1443
  duration = '1s',
1418
1444
  timingFunction = 'ease-in-out',
1419
- iterationCount = 'infinite'
1445
+ iterationCount = 'infinite',
1446
+ ...props
1420
1447
  } = _ref9;
1421
1448
  return {
1422
1449
  from: {
@@ -1430,13 +1457,15 @@ const pulse = _ref9 => {
1430
1457
  },
1431
1458
  duration,
1432
1459
  timingFunction,
1433
- iterationCount
1460
+ iterationCount,
1461
+ ...props
1434
1462
  };
1435
1463
  };
1436
1464
  const zoomIn = _ref10 => {
1437
1465
  let {
1438
1466
  duration = '0.5s',
1439
- timingFunction = 'ease-out'
1467
+ timingFunction = 'ease-out',
1468
+ ...props
1440
1469
  } = _ref10;
1441
1470
  return {
1442
1471
  from: {
@@ -1446,13 +1475,15 @@ const zoomIn = _ref10 => {
1446
1475
  transform: 'scale(1)'
1447
1476
  },
1448
1477
  duration,
1449
- timingFunction
1478
+ timingFunction,
1479
+ ...props
1450
1480
  };
1451
1481
  };
1452
1482
  const zoomOut = _ref11 => {
1453
1483
  let {
1454
1484
  duration = '0.5s',
1455
- timingFunction = 'ease-out'
1485
+ timingFunction = 'ease-out',
1486
+ ...props
1456
1487
  } = _ref11;
1457
1488
  return {
1458
1489
  from: {
@@ -1462,13 +1493,15 @@ const zoomOut = _ref11 => {
1462
1493
  transform: 'scale(0)'
1463
1494
  },
1464
1495
  duration,
1465
- timingFunction
1496
+ timingFunction,
1497
+ ...props
1466
1498
  };
1467
1499
  };
1468
1500
  const flash = _ref12 => {
1469
1501
  let {
1470
1502
  duration = '1s',
1471
- iterationCount = 'infinite'
1503
+ iterationCount = 'infinite',
1504
+ ...props
1472
1505
  } = _ref12;
1473
1506
  return {
1474
1507
  from: {
@@ -1481,13 +1514,15 @@ const flash = _ref12 => {
1481
1514
  opacity: 1
1482
1515
  },
1483
1516
  duration,
1484
- iterationCount
1517
+ iterationCount,
1518
+ ...props
1485
1519
  };
1486
1520
  };
1487
1521
  const shake = _ref13 => {
1488
1522
  let {
1489
1523
  duration = '0.5s',
1490
- iterationCount = 'infinite'
1524
+ iterationCount = 'infinite',
1525
+ ...props
1491
1526
  } = _ref13;
1492
1527
  return {
1493
1528
  from: {
@@ -1524,13 +1559,15 @@ const shake = _ref13 => {
1524
1559
  transform: 'translateX(0)'
1525
1560
  },
1526
1561
  duration,
1527
- iterationCount
1562
+ iterationCount,
1563
+ ...props
1528
1564
  };
1529
1565
  };
1530
1566
  const swing = _ref14 => {
1531
1567
  let {
1532
1568
  duration = '1s',
1533
- iterationCount = 'infinite'
1569
+ iterationCount = 'infinite',
1570
+ ...props
1534
1571
  } = _ref14;
1535
1572
  return {
1536
1573
  from: {
@@ -1552,13 +1589,15 @@ const swing = _ref14 => {
1552
1589
  transform: 'rotate(0deg)'
1553
1590
  },
1554
1591
  duration,
1555
- iterationCount
1592
+ iterationCount,
1593
+ ...props
1556
1594
  };
1557
1595
  };
1558
1596
  const rubberBand = _ref15 => {
1559
1597
  let {
1560
1598
  duration = '1s',
1561
- timingFunction = 'ease-in-out'
1599
+ timingFunction = 'ease-in-out',
1600
+ ...props
1562
1601
  } = _ref15;
1563
1602
  return {
1564
1603
  from: {
@@ -1583,12 +1622,14 @@ const rubberBand = _ref15 => {
1583
1622
  transform: 'scale3d(1, 1, 1)'
1584
1623
  },
1585
1624
  duration,
1586
- timingFunction
1625
+ timingFunction,
1626
+ ...props
1587
1627
  };
1588
1628
  };
1589
1629
  const wobble = _ref16 => {
1590
1630
  let {
1591
- duration = '1s'
1631
+ duration = '1s',
1632
+ ...props
1592
1633
  } = _ref16;
1593
1634
  return {
1594
1635
  from: {
@@ -1612,12 +1653,14 @@ const wobble = _ref16 => {
1612
1653
  to: {
1613
1654
  transform: 'translateX(0%)'
1614
1655
  },
1615
- duration
1656
+ duration,
1657
+ ...props
1616
1658
  };
1617
1659
  };
1618
1660
  const flip = _ref17 => {
1619
1661
  let {
1620
- duration = '1s'
1662
+ duration = '1s',
1663
+ ...props
1621
1664
  } = _ref17;
1622
1665
  return {
1623
1666
  from: {
@@ -1629,13 +1672,15 @@ const flip = _ref17 => {
1629
1672
  to: {
1630
1673
  transform: 'perspective(400px) rotateY(-360deg)'
1631
1674
  },
1632
- duration
1675
+ duration,
1676
+ ...props
1633
1677
  };
1634
1678
  };
1635
1679
  const heartBeat = _ref18 => {
1636
1680
  let {
1637
1681
  duration = '1.3s',
1638
- iterationCount = 'infinite'
1682
+ iterationCount = 'infinite',
1683
+ ...props
1639
1684
  } = _ref18;
1640
1685
  return {
1641
1686
  from: {
@@ -1657,12 +1702,14 @@ const heartBeat = _ref18 => {
1657
1702
  transform: 'scale(1)'
1658
1703
  },
1659
1704
  duration,
1660
- iterationCount
1705
+ iterationCount,
1706
+ ...props
1661
1707
  };
1662
1708
  };
1663
1709
  const rollIn = _ref19 => {
1664
1710
  let {
1665
- duration = '1s'
1711
+ duration = '1s',
1712
+ ...props
1666
1713
  } = _ref19;
1667
1714
  return {
1668
1715
  from: {
@@ -1673,12 +1720,14 @@ const rollIn = _ref19 => {
1673
1720
  opacity: 1,
1674
1721
  transform: 'translateX(0px) rotate(0deg)'
1675
1722
  },
1676
- duration
1723
+ duration,
1724
+ ...props
1677
1725
  };
1678
1726
  };
1679
1727
  const rollOut = _ref20 => {
1680
1728
  let {
1681
- duration = '1s'
1729
+ duration = '1s',
1730
+ ...props
1682
1731
  } = _ref20;
1683
1732
  return {
1684
1733
  from: {
@@ -1689,13 +1738,15 @@ const rollOut = _ref20 => {
1689
1738
  opacity: 0,
1690
1739
  transform: 'translateX(100%) rotate(120deg)'
1691
1740
  },
1692
- duration
1741
+ duration,
1742
+ ...props
1693
1743
  };
1694
1744
  };
1695
1745
  const lightSpeedIn = _ref21 => {
1696
1746
  let {
1697
1747
  duration = '1s',
1698
- timingFunction = 'ease-out'
1748
+ timingFunction = 'ease-out',
1749
+ ...props
1699
1750
  } = _ref21;
1700
1751
  return {
1701
1752
  from: {
@@ -1714,13 +1765,15 @@ const lightSpeedIn = _ref21 => {
1714
1765
  opacity: 1
1715
1766
  },
1716
1767
  duration,
1717
- timingFunction
1768
+ timingFunction,
1769
+ ...props
1718
1770
  };
1719
1771
  };
1720
1772
  const lightSpeedOut = _ref22 => {
1721
1773
  let {
1722
1774
  duration = '1s',
1723
- timingFunction = 'ease-in'
1775
+ timingFunction = 'ease-in',
1776
+ ...props
1724
1777
  } = _ref22;
1725
1778
  return {
1726
1779
  from: {
@@ -1735,13 +1788,15 @@ const lightSpeedOut = _ref22 => {
1735
1788
  transform: 'translateX(-100%) skewX(30deg)'
1736
1789
  },
1737
1790
  duration,
1738
- timingFunction
1791
+ timingFunction,
1792
+ ...props
1739
1793
  };
1740
1794
  };
1741
1795
  const hinge = _ref23 => {
1742
1796
  let {
1743
1797
  duration = '2s',
1744
- timingFunction = 'ease-in-out'
1798
+ timingFunction = 'ease-in-out',
1799
+ ...props
1745
1800
  } = _ref23;
1746
1801
  return {
1747
1802
  from: {
@@ -1770,13 +1825,15 @@ const hinge = _ref23 => {
1770
1825
  opacity: 0
1771
1826
  },
1772
1827
  duration,
1773
- timingFunction
1828
+ timingFunction,
1829
+ ...props
1774
1830
  };
1775
1831
  };
1776
1832
  const jackInTheBox = _ref24 => {
1777
1833
  let {
1778
1834
  duration = '1s',
1779
- timingFunction = 'ease'
1835
+ timingFunction = 'ease',
1836
+ ...props
1780
1837
  } = _ref24;
1781
1838
  return {
1782
1839
  from: {
@@ -1795,13 +1852,15 @@ const jackInTheBox = _ref24 => {
1795
1852
  transform: 'scale(1) rotate(0deg)'
1796
1853
  },
1797
1854
  duration,
1798
- timingFunction
1855
+ timingFunction,
1856
+ ...props
1799
1857
  };
1800
1858
  };
1801
1859
  const flipInX = _ref25 => {
1802
1860
  let {
1803
1861
  duration = '1s',
1804
- timingFunction = 'ease-in'
1862
+ timingFunction = 'ease-in',
1863
+ ...props
1805
1864
  } = _ref25;
1806
1865
  return {
1807
1866
  from: {
@@ -1816,13 +1875,15 @@ const flipInX = _ref25 => {
1816
1875
  transform: 'perspective(400px) rotateX(0deg)'
1817
1876
  },
1818
1877
  duration,
1819
- timingFunction
1878
+ timingFunction,
1879
+ ...props
1820
1880
  };
1821
1881
  };
1822
1882
  const flipInY = _ref26 => {
1823
1883
  let {
1824
1884
  duration = '1s',
1825
- timingFunction = 'ease-in'
1885
+ timingFunction = 'ease-in',
1886
+ ...props
1826
1887
  } = _ref26;
1827
1888
  return {
1828
1889
  from: {
@@ -1837,13 +1898,15 @@ const flipInY = _ref26 => {
1837
1898
  transform: 'perspective(400px) rotateY(0deg)'
1838
1899
  },
1839
1900
  duration,
1840
- timingFunction
1901
+ timingFunction,
1902
+ ...props
1841
1903
  };
1842
1904
  };
1843
1905
  const headShake = _ref27 => {
1844
1906
  let {
1845
1907
  duration = '1s',
1846
- iterationCount = 'infinite'
1908
+ iterationCount = 'infinite',
1909
+ ...props
1847
1910
  } = _ref27;
1848
1911
  return {
1849
1912
  from: {
@@ -1865,13 +1928,15 @@ const headShake = _ref27 => {
1865
1928
  transform: 'translateX(0)'
1866
1929
  },
1867
1930
  duration,
1868
- iterationCount
1931
+ iterationCount,
1932
+ ...props
1869
1933
  };
1870
1934
  };
1871
1935
  const tada = _ref28 => {
1872
1936
  let {
1873
1937
  duration = '1s',
1874
- iterationCount = 'infinite'
1938
+ iterationCount = 'infinite',
1939
+ ...props
1875
1940
  } = _ref28;
1876
1941
  return {
1877
1942
  from: {
@@ -1892,13 +1957,15 @@ const tada = _ref28 => {
1892
1957
  opacity: 1
1893
1958
  },
1894
1959
  duration,
1895
- iterationCount
1960
+ iterationCount,
1961
+ ...props
1896
1962
  };
1897
1963
  };
1898
1964
  const jello = _ref29 => {
1899
1965
  let {
1900
1966
  duration = '1s',
1901
- iterationCount = 'infinite'
1967
+ iterationCount = 'infinite',
1968
+ ...props
1902
1969
  } = _ref29;
1903
1970
  return {
1904
1971
  from: {
@@ -1932,13 +1999,15 @@ const jello = _ref29 => {
1932
1999
  transform: 'none'
1933
2000
  },
1934
2001
  duration,
1935
- iterationCount
2002
+ iterationCount,
2003
+ ...props
1936
2004
  };
1937
2005
  };
1938
2006
  const fadeInDown = _ref30 => {
1939
2007
  let {
1940
2008
  duration = '1s',
1941
- timingFunction = 'ease-out'
2009
+ timingFunction = 'ease-out',
2010
+ ...props
1942
2011
  } = _ref30;
1943
2012
  return {
1944
2013
  from: {
@@ -1950,13 +2019,15 @@ const fadeInDown = _ref30 => {
1950
2019
  transform: 'translateY(0)'
1951
2020
  },
1952
2021
  duration,
1953
- timingFunction
2022
+ timingFunction,
2023
+ ...props
1954
2024
  };
1955
2025
  };
1956
2026
  const fadeInUp = _ref31 => {
1957
2027
  let {
1958
2028
  duration = '1s',
1959
- timingFunction = 'ease-out'
2029
+ timingFunction = 'ease-out',
2030
+ ...props
1960
2031
  } = _ref31;
1961
2032
  return {
1962
2033
  from: {
@@ -1968,13 +2039,15 @@ const fadeInUp = _ref31 => {
1968
2039
  transform: 'translateY(0)'
1969
2040
  },
1970
2041
  duration,
1971
- timingFunction
2042
+ timingFunction,
2043
+ ...props
1972
2044
  };
1973
2045
  };
1974
2046
  const bounceIn = _ref32 => {
1975
2047
  let {
1976
2048
  duration = '0.75s',
1977
- timingFunction = 'ease-in'
2049
+ timingFunction = 'ease-in',
2050
+ ...props
1978
2051
  } = _ref32;
1979
2052
  return {
1980
2053
  from: {
@@ -1992,13 +2065,15 @@ const bounceIn = _ref32 => {
1992
2065
  transform: 'scale(1)'
1993
2066
  },
1994
2067
  duration,
1995
- timingFunction
2068
+ timingFunction,
2069
+ ...props
1996
2070
  };
1997
2071
  };
1998
2072
  const bounceOut = _ref33 => {
1999
2073
  let {
2000
2074
  duration = '0.75s',
2001
- timingFunction = 'ease-out'
2075
+ timingFunction = 'ease-out',
2076
+ ...props
2002
2077
  } = _ref33;
2003
2078
  return {
2004
2079
  from: {
@@ -2016,13 +2091,15 @@ const bounceOut = _ref33 => {
2016
2091
  transform: 'scale(0.3)'
2017
2092
  },
2018
2093
  duration,
2019
- timingFunction
2094
+ timingFunction,
2095
+ ...props
2020
2096
  };
2021
2097
  };
2022
2098
  const slideOutLeft = _ref34 => {
2023
2099
  let {
2024
2100
  duration = '0.5s',
2025
- timingFunction = 'ease-in'
2101
+ timingFunction = 'ease-in',
2102
+ ...props
2026
2103
  } = _ref34;
2027
2104
  return {
2028
2105
  from: {
@@ -2032,13 +2109,15 @@ const slideOutLeft = _ref34 => {
2032
2109
  transform: 'translateX(-100%)'
2033
2110
  },
2034
2111
  duration,
2035
- timingFunction
2112
+ timingFunction,
2113
+ ...props
2036
2114
  };
2037
2115
  };
2038
2116
  const slideOutRight = _ref35 => {
2039
2117
  let {
2040
2118
  duration = '0.5s',
2041
- timingFunction = 'ease-in'
2119
+ timingFunction = 'ease-in',
2120
+ ...props
2042
2121
  } = _ref35;
2043
2122
  return {
2044
2123
  from: {
@@ -2048,13 +2127,15 @@ const slideOutRight = _ref35 => {
2048
2127
  transform: 'translateX(100%)'
2049
2128
  },
2050
2129
  duration,
2051
- timingFunction
2130
+ timingFunction,
2131
+ ...props
2052
2132
  };
2053
2133
  };
2054
2134
  const zoomInDown = _ref36 => {
2055
2135
  let {
2056
2136
  duration = '1s',
2057
- timingFunction = 'ease-out'
2137
+ timingFunction = 'ease-out',
2138
+ ...props
2058
2139
  } = _ref36;
2059
2140
  return {
2060
2141
  from: {
@@ -2069,13 +2150,15 @@ const zoomInDown = _ref36 => {
2069
2150
  transform: 'scale(1) translateY(0)'
2070
2151
  },
2071
2152
  duration,
2072
- timingFunction
2153
+ timingFunction,
2154
+ ...props
2073
2155
  };
2074
2156
  };
2075
2157
  const zoomOutUp = _ref37 => {
2076
2158
  let {
2077
2159
  duration = '1s',
2078
- timingFunction = 'ease-in'
2160
+ timingFunction = 'ease-in',
2161
+ ...props
2079
2162
  } = _ref37;
2080
2163
  return {
2081
2164
  from: {
@@ -2091,13 +2174,15 @@ const zoomOutUp = _ref37 => {
2091
2174
  transform: 'scale(0.1) translateY(-1000px)'
2092
2175
  },
2093
2176
  duration,
2094
- timingFunction
2177
+ timingFunction,
2178
+ ...props
2095
2179
  };
2096
2180
  };
2097
2181
  const backInDown = _ref38 => {
2098
2182
  let {
2099
2183
  duration = '1s',
2100
- timingFunction = 'ease-in'
2184
+ timingFunction = 'ease-in',
2185
+ ...props
2101
2186
  } = _ref38;
2102
2187
  return {
2103
2188
  from: {
@@ -2109,13 +2194,15 @@ const backInDown = _ref38 => {
2109
2194
  transform: 'translateY(0) scaleY(1) scaleX(1)'
2110
2195
  },
2111
2196
  duration,
2112
- timingFunction
2197
+ timingFunction,
2198
+ ...props
2113
2199
  };
2114
2200
  };
2115
2201
  const backOutUp = _ref39 => {
2116
2202
  let {
2117
2203
  duration = '1s',
2118
- timingFunction = 'ease-in'
2204
+ timingFunction = 'ease-in',
2205
+ ...props
2119
2206
  } = _ref39;
2120
2207
  return {
2121
2208
  from: {
@@ -2131,14 +2218,16 @@ const backOutUp = _ref39 => {
2131
2218
  transform: 'translateY(-2000px)'
2132
2219
  },
2133
2220
  duration,
2134
- timingFunction
2221
+ timingFunction,
2222
+ ...props
2135
2223
  };
2136
2224
  };
2137
2225
  const shimmer = _ref40 => {
2138
2226
  let {
2139
2227
  duration = '2s',
2140
2228
  timingFunction = 'linear',
2141
- iterationCount = 'infinite'
2229
+ iterationCount = 'infinite',
2230
+ ...props
2142
2231
  } = _ref40;
2143
2232
  return {
2144
2233
  from: {
@@ -2152,7 +2241,8 @@ const shimmer = _ref40 => {
2152
2241
  },
2153
2242
  duration,
2154
2243
  timingFunction,
2155
- iterationCount
2244
+ iterationCount,
2245
+ ...props
2156
2246
  };
2157
2247
  };
2158
2248
  const progress = _ref41 => {
@@ -2162,7 +2252,8 @@ const progress = _ref41 => {
2162
2252
  direction = 'forwards',
2163
2253
  prop = 'width',
2164
2254
  from = '0%',
2165
- to = '100%'
2255
+ to = '100%',
2256
+ ...props
2166
2257
  } = _ref41;
2167
2258
  return {
2168
2259
  from: {
@@ -2173,7 +2264,8 @@ const progress = _ref41 => {
2173
2264
  },
2174
2265
  duration,
2175
2266
  timingFunction,
2176
- direction
2267
+ direction,
2268
+ ...props
2177
2269
  };
2178
2270
  };
2179
2271
  const typewriter = _ref42 => {
@@ -2181,7 +2273,8 @@ const typewriter = _ref42 => {
2181
2273
  duration = '10s',
2182
2274
  steps = 10,
2183
2275
  iterationCount = 1,
2184
- width = 0
2276
+ width = 0,
2277
+ ...props
2185
2278
  } = _ref42;
2186
2279
  return {
2187
2280
  from: {
@@ -2192,7 +2285,8 @@ const typewriter = _ref42 => {
2192
2285
  },
2193
2286
  timingFunction: `steps(${steps})`,
2194
2287
  duration,
2195
- iterationCount
2288
+ iterationCount,
2289
+ ...props
2196
2290
  };
2197
2291
  };
2198
2292
  const blinkCursor = _ref43 => {
@@ -2200,7 +2294,8 @@ const blinkCursor = _ref43 => {
2200
2294
  duration = '0.75s',
2201
2295
  timingFunction = 'step-end',
2202
2296
  iterationCount = 'infinite',
2203
- color = 'black'
2297
+ color = 'black',
2298
+ ...props
2204
2299
  } = _ref43;
2205
2300
  return {
2206
2301
  from: {
@@ -2220,7 +2315,8 @@ const blinkCursor = _ref43 => {
2220
2315
  },
2221
2316
  duration,
2222
2317
  timingFunction,
2223
- iterationCount
2318
+ iterationCount,
2319
+ ...props
2224
2320
  };
2225
2321
  };
2226
2322
 
@@ -2296,120 +2392,6 @@ const Skeleton = /*#__PURE__*/React__default.memo(_ref => {
2296
2392
  }));
2297
2393
  });
2298
2394
 
2299
- const Typewriter = _ref => {
2300
- let {
2301
- text,
2302
- duration = '10s',
2303
- cursorDuration = '0.75s',
2304
- cursorTimingFunction = 'step-end',
2305
- color = 'black',
2306
- cursor = true,
2307
- fontSize = 18,
2308
- width = 100,
2309
- ...props
2310
- } = _ref;
2311
- const [visibleLines, setVisibleLines] = React.useState([]);
2312
- const [isComplete, setIsComplete] = React.useState(false);
2313
- // Calculate milliseconds once
2314
- const durationMs = React.useMemo(() => parseFloat(duration.replace('s', '')) * 1000, [duration]);
2315
- // Split text into lines with width calculation
2316
- const lines = React.useMemo(() => {
2317
- const canvas = document.createElement('canvas');
2318
- const context = canvas.getContext('2d');
2319
- if (!context) return [];
2320
- context.font = `${fontSize}px sans-serif`;
2321
- const words = text.split(' ');
2322
- const result = [];
2323
- let currentLine = '';
2324
- for (const word of words) {
2325
- const testLine = currentLine ? `${currentLine} ${word}` : word;
2326
- const metrics = context.measureText(testLine);
2327
- if (metrics.width > width && currentLine) {
2328
- const currentMetrics = context.measureText(currentLine);
2329
- result.push({
2330
- text: currentLine,
2331
- width: currentMetrics.width
2332
- });
2333
- currentLine = word;
2334
- } else {
2335
- currentLine = testLine;
2336
- }
2337
- }
2338
- if (currentLine) {
2339
- const finalMetrics = context.measureText(currentLine);
2340
- result.push({
2341
- text: currentLine,
2342
- width: finalMetrics.width
2343
- });
2344
- }
2345
- return result;
2346
- }, [text, width, fontSize]);
2347
- // Handle animation timing
2348
- React.useEffect(() => {
2349
- if (!lines.length) return;
2350
- setVisibleLines([]);
2351
- setIsComplete(false);
2352
- const timeoutIds = [];
2353
- const perLineDuration = durationMs / lines.length;
2354
- lines.forEach((line, index) => {
2355
- const timeoutId = setTimeout(() => {
2356
- setVisibleLines(prev => {
2357
- const newLines = [...prev, line];
2358
- // Set complete when all lines are visible
2359
- if (newLines.length === lines.length) {
2360
- // Add small delay to ensure the last line's animation is complete
2361
- setTimeout(() => setIsComplete(true), parseFloat(getLineAnimation(line).duration));
2362
- }
2363
- return newLines;
2364
- });
2365
- }, perLineDuration * index);
2366
- timeoutIds.push(timeoutId);
2367
- });
2368
- return () => {
2369
- timeoutIds.forEach(clearTimeout);
2370
- setIsComplete(false);
2371
- };
2372
- }, [lines, durationMs]);
2373
- // Calculate animation parameters
2374
- const getLineAnimation = React.useCallback(line => {
2375
- const perCharDuration = durationMs / text.length;
2376
- const lineDuration = `${line.text.length * perCharDuration}ms`;
2377
- return {
2378
- duration: lineDuration,
2379
- width: line.width
2380
- };
2381
- }, [durationMs, text.length]);
2382
- if (!lines.length) return null;
2383
- return /*#__PURE__*/React__default.createElement(View, {
2384
- width: width
2385
- }, visibleLines.map((line, index) => {
2386
- const animation = getLineAnimation(line);
2387
- const isLastLine = index === visibleLines.length - 1;
2388
- return /*#__PURE__*/React__default.createElement(View, {
2389
- key: `line-${index}`,
2390
- display: "flex",
2391
- alignItems: "center"
2392
- }, /*#__PURE__*/React__default.createElement(Text, Object.assign({
2393
- display: "inline-block",
2394
- overflow: "hidden",
2395
- whiteSpace: "nowrap",
2396
- animate: typewriter({
2397
- duration: animation.duration,
2398
- steps: line.text.length,
2399
- width: animation.width
2400
- })
2401
- }, props), line.text), cursor && isLastLine && !isComplete && /*#__PURE__*/React__default.createElement(Text, {
2402
- paddingLeft: 4,
2403
- display: "inline-block",
2404
- animate: blinkCursor({
2405
- duration: cursorDuration,
2406
- timingFunction: cursorTimingFunction,
2407
- color
2408
- })
2409
- }, "|"));
2410
- }));
2411
- };
2412
-
2413
2395
  const Typography = {
2414
2396
  letterSpacings: {
2415
2397
  tighter: -0.08,
@@ -2556,7 +2538,6 @@ exports.Span = Span;
2556
2538
  exports.Text = Text;
2557
2539
  exports.ThemeContext = ThemeContext;
2558
2540
  exports.ThemeProvider = ThemeProvider;
2559
- exports.Typewriter = Typewriter;
2560
2541
  exports.Typography = Typography;
2561
2542
  exports.View = View;
2562
2543
  exports.createQuery = createQuery;