app-studio 0.4.7 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/app-studio.cjs.development.js +526 -362
- package/dist/app-studio.cjs.development.js.map +1 -1
- package/dist/app-studio.cjs.production.min.js +1 -1
- package/dist/app-studio.esm.js +527 -364
- package/dist/app-studio.esm.js.map +1 -1
- package/dist/app-studio.umd.development.js +526 -362
- package/dist/app-studio.umd.development.js.map +1 -1
- package/dist/app-studio.umd.production.min.js +1 -1
- package/dist/components/Animation.d.ts +258 -79
- package/dist/components/Typewriter.d.ts +14 -0
- package/dist/index.d.ts +1 -0
- package/dist/utils/constants.d.ts +2 -1
- package/dist/utils/cssClass.d.ts +25 -0
- package/package.json +1 -1
|
@@ -578,7 +578,7 @@ const toKebabCase = str => str.replace(/([A-Z])/g, match => '-' + match.toLowerC
|
|
|
578
578
|
// return !excludedKeys.has(prop);
|
|
579
579
|
// };
|
|
580
580
|
//const cssExtraProps: Array<keyof CSSProperties> = [
|
|
581
|
-
const cssExtraProps = ['textJustify', 'lineClamp', 'borderBottomLeftRadius', 'borderBottomRightRadius', 'borderBottomWidth', 'borderLeftWidth', 'borderRadius', 'borderRightWidth', 'borderSpacing', 'borderTopLeftRadius', 'borderTopRightRadius', 'borderTopWidth', 'borderWidth', 'bottom', 'columnGap', 'columnRuleWidth', 'columnWidth', 'fontSize', 'gap', 'height', 'left', 'letterSpacing', 'lineHeight', 'margin', 'marginBottom', 'marginLeft', 'marginRight', 'marginTop', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'outlineOffset', 'outlineWidth', 'padding', 'paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop', 'perspective', 'right', 'rowGap', 'textIndent', 'top', 'width'];
|
|
581
|
+
const cssExtraProps = ['textJustify', 'lineClamp', 'borderBottomLeftRadius', 'borderBottomRightRadius', 'borderBottomWidth', 'borderLeftWidth', 'borderRadius', 'borderRightWidth', 'borderSpacing', 'borderTopLeftRadius', 'borderTopRightRadius', 'borderTopWidth', 'borderWidth', 'bottom', 'columnGap', 'columnRuleWidth', 'columnWidth', 'fontSize', 'gap', 'height', 'left', 'letterSpacing', 'lineHeight', 'margin', 'marginBottom', 'marginLeft', 'marginRight', 'marginTop', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'outlineOffset', 'outlineWidth', 'padding', 'paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop', 'perspective', 'right', 'rowGap', 'textIndent', 'top', 'width', 'animation'];
|
|
582
582
|
// Create a set of all valid CSS properties
|
|
583
583
|
const StyleProps = [... /*#__PURE__*/Object.keys( /*#__PURE__*/document.createElement('div').style), ...cssExtraProps];
|
|
584
584
|
// Create a set of all valid CSS properties
|
|
@@ -779,7 +779,7 @@ class UtilityClassManager {
|
|
|
779
779
|
addToCache(key, className) {
|
|
780
780
|
if (this.classCache.size >= this.maxCacheSize) {
|
|
781
781
|
const firstKey = this.classCache.keys().next().value;
|
|
782
|
-
this.classCache.delete(firstKey);
|
|
782
|
+
if (firstKey) this.classCache.delete(firstKey);
|
|
783
783
|
}
|
|
784
784
|
this.classCache.set(key, className);
|
|
785
785
|
}
|
|
@@ -818,10 +818,10 @@ class UtilityClassManager {
|
|
|
818
818
|
processedValue = `${processedValue}px`;
|
|
819
819
|
}
|
|
820
820
|
}
|
|
821
|
-
let
|
|
822
|
-
let key = `${property}:${
|
|
823
|
-
if (modifier) {
|
|
824
|
-
key = `${property}:${
|
|
821
|
+
let formattedValue = processedValue.toString().split(' ').join('-');
|
|
822
|
+
let key = `${property}:${formattedValue}`;
|
|
823
|
+
if (modifier && context !== 'base') {
|
|
824
|
+
key = `${property}:${formattedValue}|${context}:${modifier}`;
|
|
825
825
|
}
|
|
826
826
|
if (this.classCache.has(key)) {
|
|
827
827
|
return [this.classCache.get(key)];
|
|
@@ -833,7 +833,7 @@ class UtilityClassManager {
|
|
|
833
833
|
}
|
|
834
834
|
// console.log({ shorthand, property, processedValue });
|
|
835
835
|
// Normaliser la valeur pour le nom de classe
|
|
836
|
-
let normalizedValue =
|
|
836
|
+
let normalizedValue = formattedValue.toString().replace(/\./g, 'p') // Replace dots with 'p'
|
|
837
837
|
.replace(/\s+/g, '-') // Replace spaces with '-'
|
|
838
838
|
.replace(/[^a-zA-Z0-9\-]/g, '') // Remove other special characters
|
|
839
839
|
.replace(/%/g, 'pct') // Replace % with 'pct'
|
|
@@ -843,7 +843,7 @@ class UtilityClassManager {
|
|
|
843
843
|
.replace(/rem/g, 'rem'); // Keep 'rem' as is
|
|
844
844
|
let baseClassName = `${shorthand}-${normalizedValue}`;
|
|
845
845
|
// Préfixer les noms de classe pour les pseudo-classes et media queries
|
|
846
|
-
let classNames = [];
|
|
846
|
+
let classNames = [baseClassName]; // Utiliser le nom de classe de base
|
|
847
847
|
if (context === 'pseudo' && modifier) {
|
|
848
848
|
// Pseudo-class : ajouter '-modifier' suffix
|
|
849
849
|
const pseudoClassName = `${baseClassName}-${modifier}`;
|
|
@@ -875,8 +875,8 @@ class UtilityClassManager {
|
|
|
875
875
|
cssRules.push(`.${escapedClassName} { ${cssProperty}: ${valueForCss}; }`);
|
|
876
876
|
break;
|
|
877
877
|
case 'pseudo':
|
|
878
|
-
// Appliquer
|
|
879
|
-
cssRules.push(`.${escapedClassName} { ${cssProperty}: ${valueForCss}; }`);
|
|
878
|
+
// Appliquer le pseudo-sélecteur au sélecteur de classe
|
|
879
|
+
cssRules.push(`.${escapedClassName}:${modifier} { ${cssProperty}: ${valueForCss}; }`);
|
|
880
880
|
break;
|
|
881
881
|
case 'media':
|
|
882
882
|
// Les media queries sont gérées séparément
|
|
@@ -1004,22 +1004,40 @@ const extractUtilityClasses = (props, getColor, mediaQueries, devices) => {
|
|
|
1004
1004
|
}
|
|
1005
1005
|
// Gestion des animations
|
|
1006
1006
|
if (props.animate) {
|
|
1007
|
-
const
|
|
1008
|
-
const
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1007
|
+
const animations = Array.isArray(props.animate) ? props.animate : [props.animate];
|
|
1008
|
+
const animationNames = [];
|
|
1009
|
+
const animationDurations = [];
|
|
1010
|
+
const animationTimingFunctions = [];
|
|
1011
|
+
const animationDelays = [];
|
|
1012
|
+
const animationIterationCounts = [];
|
|
1013
|
+
const animationDirections = [];
|
|
1014
|
+
const animationFillModes = [];
|
|
1015
|
+
const animationPlayStates = [];
|
|
1016
|
+
animations.forEach(animation => {
|
|
1017
|
+
const {
|
|
1018
|
+
keyframesName,
|
|
1019
|
+
keyframes
|
|
1020
|
+
} = generateKeyframes(animation);
|
|
1021
|
+
if (keyframes && typeof document !== 'undefined') {
|
|
1022
|
+
utilityClassManager.injectRule(keyframes);
|
|
1023
|
+
}
|
|
1024
|
+
animationNames.push(keyframesName);
|
|
1025
|
+
animationDurations.push(animation.duration || '0s');
|
|
1026
|
+
animationTimingFunctions.push(animation.timingFunction || 'ease');
|
|
1027
|
+
animationDelays.push(animation.delay || '0s');
|
|
1028
|
+
animationIterationCounts.push(animation.iterationCount !== undefined ? `${animation.iterationCount}` : '1');
|
|
1029
|
+
animationDirections.push(animation.direction || 'normal');
|
|
1030
|
+
animationFillModes.push(animation.fillMode || 'none');
|
|
1031
|
+
animationPlayStates.push(animation.playState || 'running');
|
|
1032
|
+
});
|
|
1033
|
+
computedStyles.animationName = animationNames.join(', ');
|
|
1034
|
+
computedStyles.animationDuration = animationDurations.join(', ');
|
|
1035
|
+
computedStyles.animationTimingFunction = animationTimingFunctions.join(', ');
|
|
1036
|
+
computedStyles.animationDelay = animationDelays.join(', ');
|
|
1037
|
+
computedStyles.animationIterationCount = animationIterationCounts.join(', ');
|
|
1038
|
+
computedStyles.animationDirection = animationDirections.join(', ');
|
|
1039
|
+
computedStyles.animationFillMode = animationFillModes.join(', ');
|
|
1040
|
+
computedStyles.animationPlayState = animationPlayStates.join(', ');
|
|
1023
1041
|
}
|
|
1024
1042
|
/**
|
|
1025
1043
|
* Génère des classes utilitaires pour un ensemble de styles.
|
|
@@ -1070,24 +1088,58 @@ const extractUtilityClasses = (props, getColor, mediaQueries, devices) => {
|
|
|
1070
1088
|
Object.keys(value).forEach(event => {
|
|
1071
1089
|
const eventStyles = value[event];
|
|
1072
1090
|
// Séparer les propriétés de transition et les autres propriétés
|
|
1073
|
-
|
|
1074
|
-
const
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1091
|
+
// Extraire 'animate' des styles d'événement
|
|
1092
|
+
const {
|
|
1093
|
+
animate,
|
|
1094
|
+
...otherEventStyles
|
|
1095
|
+
} = eventStyles;
|
|
1096
|
+
// Gestion des animations dans les événements
|
|
1097
|
+
if (animate) {
|
|
1098
|
+
const animations = Array.isArray(animate) ? animate : [animate];
|
|
1099
|
+
const animationNames = [];
|
|
1100
|
+
const animationDurations = [];
|
|
1101
|
+
const animationTimingFunctions = [];
|
|
1102
|
+
const animationDelays = [];
|
|
1103
|
+
const animationIterationCounts = [];
|
|
1104
|
+
const animationDirections = [];
|
|
1105
|
+
const animationFillModes = [];
|
|
1106
|
+
const animationPlayStates = [];
|
|
1107
|
+
animations.forEach(animation => {
|
|
1108
|
+
const {
|
|
1109
|
+
keyframesName,
|
|
1110
|
+
keyframes
|
|
1111
|
+
} = generateKeyframes(animation);
|
|
1112
|
+
if (keyframes && typeof document !== 'undefined') {
|
|
1113
|
+
utilityClassManager.injectRule(keyframes);
|
|
1114
|
+
}
|
|
1115
|
+
animationNames.push(keyframesName);
|
|
1116
|
+
animationDurations.push(animation.duration || '0s');
|
|
1117
|
+
animationTimingFunctions.push(animation.timingFunction || 'ease');
|
|
1118
|
+
animationDelays.push(animation.delay || '0s');
|
|
1119
|
+
animationIterationCounts.push(animation.iterationCount !== undefined ? `${animation.iterationCount}` : '1');
|
|
1120
|
+
animationDirections.push(animation.direction || 'normal');
|
|
1121
|
+
animationFillModes.push(animation.fillMode || 'none');
|
|
1122
|
+
animationPlayStates.push(animation.playState || 'running');
|
|
1123
|
+
});
|
|
1124
|
+
// Créer un objet avec les propriétés d'animation
|
|
1125
|
+
const animationStyles = {
|
|
1126
|
+
animationName: animationNames.join(', '),
|
|
1127
|
+
animationDuration: animationDurations.join(', '),
|
|
1128
|
+
animationTimingFunction: animationTimingFunctions.join(', '),
|
|
1129
|
+
animationDelay: animationDelays.join(', '),
|
|
1130
|
+
animationIterationCount: animationIterationCounts.join(', '),
|
|
1131
|
+
animationDirection: animationDirections.join(', '),
|
|
1132
|
+
animationFillMode: animationFillModes.join(', '),
|
|
1133
|
+
animationPlayState: animationPlayStates.join(', ')
|
|
1134
|
+
};
|
|
1135
|
+
// Fusionner les styles d'animation avec les autres styles de l'événement
|
|
1136
|
+
Object.assign(otherEventStyles, animationStyles);
|
|
1085
1137
|
}
|
|
1086
1138
|
// Générer les classes pour les pseudo-classes
|
|
1087
|
-
if (Object.keys(
|
|
1139
|
+
if (Object.keys(otherEventStyles).length > 0) {
|
|
1088
1140
|
const pseudo = mapEventToPseudo(event);
|
|
1089
1141
|
if (pseudo) {
|
|
1090
|
-
generateUtilityClasses(
|
|
1142
|
+
generateUtilityClasses(otherEventStyles, 'pseudo', pseudo);
|
|
1091
1143
|
}
|
|
1092
1144
|
}
|
|
1093
1145
|
});
|
|
@@ -1182,7 +1234,9 @@ const Image = /*#__PURE__*/React__default.memo(props => /*#__PURE__*/React__defa
|
|
|
1182
1234
|
})));
|
|
1183
1235
|
|
|
1184
1236
|
const Text = /*#__PURE__*/React__default.memo(props => {
|
|
1185
|
-
return /*#__PURE__*/React__default.createElement(Element, Object.assign({
|
|
1237
|
+
return /*#__PURE__*/React__default.createElement(Element, Object.assign({
|
|
1238
|
+
as: "span"
|
|
1239
|
+
}, props));
|
|
1186
1240
|
});
|
|
1187
1241
|
|
|
1188
1242
|
// Utilisation de React.memo pour une meilleure performance
|
|
@@ -1197,124 +1251,108 @@ const Button = /*#__PURE__*/React__default.memo(props => /*#__PURE__*/React__def
|
|
|
1197
1251
|
})));
|
|
1198
1252
|
|
|
1199
1253
|
// animations.ts
|
|
1200
|
-
const fadeIn =
|
|
1201
|
-
|
|
1202
|
-
duration = '1s'
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
timingFunction = 'ease';
|
|
1206
|
-
}
|
|
1254
|
+
const fadeIn = _ref => {
|
|
1255
|
+
let {
|
|
1256
|
+
duration = '1s',
|
|
1257
|
+
timingFunction = 'ease'
|
|
1258
|
+
} = _ref;
|
|
1207
1259
|
return {
|
|
1208
1260
|
from: {
|
|
1209
1261
|
opacity: 0
|
|
1210
1262
|
},
|
|
1211
|
-
|
|
1263
|
+
to: {
|
|
1212
1264
|
opacity: 1
|
|
1213
1265
|
},
|
|
1214
1266
|
duration,
|
|
1215
1267
|
timingFunction
|
|
1216
1268
|
};
|
|
1217
1269
|
};
|
|
1218
|
-
const fadeOut =
|
|
1219
|
-
|
|
1220
|
-
duration = '1s'
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
timingFunction = 'ease';
|
|
1224
|
-
}
|
|
1270
|
+
const fadeOut = _ref2 => {
|
|
1271
|
+
let {
|
|
1272
|
+
duration = '1s',
|
|
1273
|
+
timingFunction = 'ease'
|
|
1274
|
+
} = _ref2;
|
|
1225
1275
|
return {
|
|
1226
1276
|
from: {
|
|
1227
1277
|
opacity: 1
|
|
1228
1278
|
},
|
|
1229
|
-
|
|
1279
|
+
to: {
|
|
1230
1280
|
opacity: 0
|
|
1231
1281
|
},
|
|
1232
1282
|
duration,
|
|
1233
1283
|
timingFunction
|
|
1234
1284
|
};
|
|
1235
1285
|
};
|
|
1236
|
-
const slideInLeft =
|
|
1237
|
-
|
|
1238
|
-
duration = '0.5s'
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
timingFunction = 'ease-out';
|
|
1242
|
-
}
|
|
1286
|
+
const slideInLeft = _ref3 => {
|
|
1287
|
+
let {
|
|
1288
|
+
duration = '0.5s',
|
|
1289
|
+
timingFunction = 'ease-out'
|
|
1290
|
+
} = _ref3;
|
|
1243
1291
|
return {
|
|
1244
1292
|
from: {
|
|
1245
1293
|
transform: 'translateX(-100%)'
|
|
1246
1294
|
},
|
|
1247
|
-
|
|
1295
|
+
to: {
|
|
1248
1296
|
transform: 'translateX(0)'
|
|
1249
1297
|
},
|
|
1250
1298
|
duration,
|
|
1251
1299
|
timingFunction
|
|
1252
1300
|
};
|
|
1253
1301
|
};
|
|
1254
|
-
const slideInRight =
|
|
1255
|
-
|
|
1256
|
-
duration = '0.5s'
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
timingFunction = 'ease-out';
|
|
1260
|
-
}
|
|
1302
|
+
const slideInRight = _ref4 => {
|
|
1303
|
+
let {
|
|
1304
|
+
duration = '0.5s',
|
|
1305
|
+
timingFunction = 'ease-out'
|
|
1306
|
+
} = _ref4;
|
|
1261
1307
|
return {
|
|
1262
1308
|
from: {
|
|
1263
1309
|
transform: 'translateX(100%)'
|
|
1264
1310
|
},
|
|
1265
|
-
|
|
1311
|
+
to: {
|
|
1266
1312
|
transform: 'translateX(0)'
|
|
1267
1313
|
},
|
|
1268
1314
|
duration,
|
|
1269
1315
|
timingFunction
|
|
1270
1316
|
};
|
|
1271
1317
|
};
|
|
1272
|
-
const slideInDown =
|
|
1273
|
-
|
|
1274
|
-
duration = '0.5s'
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
timingFunction = 'ease-out';
|
|
1278
|
-
}
|
|
1318
|
+
const slideInDown = _ref5 => {
|
|
1319
|
+
let {
|
|
1320
|
+
duration = '0.5s',
|
|
1321
|
+
timingFunction = 'ease-out'
|
|
1322
|
+
} = _ref5;
|
|
1279
1323
|
return {
|
|
1280
1324
|
from: {
|
|
1281
1325
|
transform: 'translateY(-100%)'
|
|
1282
1326
|
},
|
|
1283
|
-
|
|
1327
|
+
to: {
|
|
1284
1328
|
transform: 'translateY(0)'
|
|
1285
1329
|
},
|
|
1286
1330
|
duration,
|
|
1287
1331
|
timingFunction
|
|
1288
1332
|
};
|
|
1289
1333
|
};
|
|
1290
|
-
const slideInUp =
|
|
1291
|
-
|
|
1292
|
-
duration = '0.5s'
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
timingFunction = 'ease-out';
|
|
1296
|
-
}
|
|
1334
|
+
const slideInUp = _ref6 => {
|
|
1335
|
+
let {
|
|
1336
|
+
duration = '0.5s',
|
|
1337
|
+
timingFunction = 'ease-out'
|
|
1338
|
+
} = _ref6;
|
|
1297
1339
|
return {
|
|
1298
1340
|
from: {
|
|
1299
1341
|
transform: 'translateY(100%)'
|
|
1300
1342
|
},
|
|
1301
|
-
|
|
1343
|
+
to: {
|
|
1302
1344
|
transform: 'translateY(0)'
|
|
1303
1345
|
},
|
|
1304
1346
|
duration,
|
|
1305
1347
|
timingFunction
|
|
1306
1348
|
};
|
|
1307
1349
|
};
|
|
1308
|
-
const bounce =
|
|
1309
|
-
|
|
1310
|
-
duration = '2s'
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
}
|
|
1315
|
-
if (iterationCount === void 0) {
|
|
1316
|
-
iterationCount = 'infinite';
|
|
1317
|
-
}
|
|
1350
|
+
const bounce = _ref7 => {
|
|
1351
|
+
let {
|
|
1352
|
+
duration = '2s',
|
|
1353
|
+
timingFunction = 'ease',
|
|
1354
|
+
iterationCount = 'infinite'
|
|
1355
|
+
} = _ref7;
|
|
1318
1356
|
return {
|
|
1319
1357
|
from: {
|
|
1320
1358
|
transform: 'translateY(0)'
|
|
@@ -1331,7 +1369,7 @@ const bounce = function (duration, timingFunction, iterationCount) {
|
|
|
1331
1369
|
'80%': {
|
|
1332
1370
|
transform: 'translateY(0)'
|
|
1333
1371
|
},
|
|
1334
|
-
|
|
1372
|
+
to: {
|
|
1335
1373
|
transform: 'translateY(0)'
|
|
1336
1374
|
},
|
|
1337
1375
|
duration,
|
|
@@ -1339,21 +1377,17 @@ const bounce = function (duration, timingFunction, iterationCount) {
|
|
|
1339
1377
|
iterationCount
|
|
1340
1378
|
};
|
|
1341
1379
|
};
|
|
1342
|
-
const rotate =
|
|
1343
|
-
|
|
1344
|
-
duration = '1s'
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
}
|
|
1349
|
-
if (iterationCount === void 0) {
|
|
1350
|
-
iterationCount = 'infinite';
|
|
1351
|
-
}
|
|
1380
|
+
const rotate = _ref8 => {
|
|
1381
|
+
let {
|
|
1382
|
+
duration = '1s',
|
|
1383
|
+
timingFunction = 'linear',
|
|
1384
|
+
iterationCount = 'infinite'
|
|
1385
|
+
} = _ref8;
|
|
1352
1386
|
return {
|
|
1353
1387
|
from: {
|
|
1354
1388
|
transform: 'rotate(0deg)'
|
|
1355
1389
|
},
|
|
1356
|
-
|
|
1390
|
+
to: {
|
|
1357
1391
|
transform: 'rotate(360deg)'
|
|
1358
1392
|
},
|
|
1359
1393
|
duration,
|
|
@@ -1361,16 +1395,12 @@ const rotate = function (duration, timingFunction, iterationCount) {
|
|
|
1361
1395
|
iterationCount
|
|
1362
1396
|
};
|
|
1363
1397
|
};
|
|
1364
|
-
const pulse =
|
|
1365
|
-
|
|
1366
|
-
duration = '1s'
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
}
|
|
1371
|
-
if (iterationCount === void 0) {
|
|
1372
|
-
iterationCount = 'infinite';
|
|
1373
|
-
}
|
|
1398
|
+
const pulse = _ref9 => {
|
|
1399
|
+
let {
|
|
1400
|
+
duration = '1s',
|
|
1401
|
+
timingFunction = 'ease-in-out',
|
|
1402
|
+
iterationCount = 'infinite'
|
|
1403
|
+
} = _ref9;
|
|
1374
1404
|
return {
|
|
1375
1405
|
from: {
|
|
1376
1406
|
transform: 'scale(1)'
|
|
@@ -1378,7 +1408,7 @@ const pulse = function (duration, timingFunction, iterationCount) {
|
|
|
1378
1408
|
'50%': {
|
|
1379
1409
|
transform: 'scale(1.05)'
|
|
1380
1410
|
},
|
|
1381
|
-
|
|
1411
|
+
to: {
|
|
1382
1412
|
transform: 'scale(1)'
|
|
1383
1413
|
},
|
|
1384
1414
|
duration,
|
|
@@ -1386,49 +1416,43 @@ const pulse = function (duration, timingFunction, iterationCount) {
|
|
|
1386
1416
|
iterationCount
|
|
1387
1417
|
};
|
|
1388
1418
|
};
|
|
1389
|
-
const zoomIn =
|
|
1390
|
-
|
|
1391
|
-
duration = '0.5s'
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
timingFunction = 'ease-out';
|
|
1395
|
-
}
|
|
1419
|
+
const zoomIn = _ref10 => {
|
|
1420
|
+
let {
|
|
1421
|
+
duration = '0.5s',
|
|
1422
|
+
timingFunction = 'ease-out'
|
|
1423
|
+
} = _ref10;
|
|
1396
1424
|
return {
|
|
1397
1425
|
from: {
|
|
1398
1426
|
transform: 'scale(0)'
|
|
1399
1427
|
},
|
|
1400
|
-
|
|
1428
|
+
to: {
|
|
1401
1429
|
transform: 'scale(1)'
|
|
1402
1430
|
},
|
|
1403
1431
|
duration,
|
|
1404
1432
|
timingFunction
|
|
1405
1433
|
};
|
|
1406
1434
|
};
|
|
1407
|
-
const zoomOut =
|
|
1408
|
-
|
|
1409
|
-
duration = '0.5s'
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
timingFunction = 'ease-out';
|
|
1413
|
-
}
|
|
1435
|
+
const zoomOut = _ref11 => {
|
|
1436
|
+
let {
|
|
1437
|
+
duration = '0.5s',
|
|
1438
|
+
timingFunction = 'ease-out'
|
|
1439
|
+
} = _ref11;
|
|
1414
1440
|
return {
|
|
1415
1441
|
from: {
|
|
1416
1442
|
transform: 'scale(1)'
|
|
1417
1443
|
},
|
|
1418
|
-
|
|
1444
|
+
to: {
|
|
1419
1445
|
transform: 'scale(0)'
|
|
1420
1446
|
},
|
|
1421
1447
|
duration,
|
|
1422
1448
|
timingFunction
|
|
1423
1449
|
};
|
|
1424
1450
|
};
|
|
1425
|
-
const flash =
|
|
1426
|
-
|
|
1427
|
-
duration = '1s'
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
iterationCount = 'infinite';
|
|
1431
|
-
}
|
|
1451
|
+
const flash = _ref12 => {
|
|
1452
|
+
let {
|
|
1453
|
+
duration = '1s',
|
|
1454
|
+
iterationCount = 'infinite'
|
|
1455
|
+
} = _ref12;
|
|
1432
1456
|
return {
|
|
1433
1457
|
from: {
|
|
1434
1458
|
opacity: 1
|
|
@@ -1436,20 +1460,18 @@ const flash = function (duration, iterationCount) {
|
|
|
1436
1460
|
'50%': {
|
|
1437
1461
|
opacity: 0
|
|
1438
1462
|
},
|
|
1439
|
-
|
|
1463
|
+
to: {
|
|
1440
1464
|
opacity: 1
|
|
1441
1465
|
},
|
|
1442
1466
|
duration,
|
|
1443
1467
|
iterationCount
|
|
1444
1468
|
};
|
|
1445
1469
|
};
|
|
1446
|
-
const shake =
|
|
1447
|
-
|
|
1448
|
-
duration = '0.5s'
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
iterationCount = 'infinite';
|
|
1452
|
-
}
|
|
1470
|
+
const shake = _ref13 => {
|
|
1471
|
+
let {
|
|
1472
|
+
duration = '0.5s',
|
|
1473
|
+
iterationCount = 'infinite'
|
|
1474
|
+
} = _ref13;
|
|
1453
1475
|
return {
|
|
1454
1476
|
from: {
|
|
1455
1477
|
transform: 'translateX(0)'
|
|
@@ -1481,20 +1503,18 @@ const shake = function (duration, iterationCount) {
|
|
|
1481
1503
|
'90%': {
|
|
1482
1504
|
transform: 'translateX(-10px)'
|
|
1483
1505
|
},
|
|
1484
|
-
|
|
1506
|
+
to: {
|
|
1485
1507
|
transform: 'translateX(0)'
|
|
1486
1508
|
},
|
|
1487
1509
|
duration,
|
|
1488
1510
|
iterationCount
|
|
1489
1511
|
};
|
|
1490
1512
|
};
|
|
1491
|
-
const swing =
|
|
1492
|
-
|
|
1493
|
-
duration = '1s'
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
iterationCount = 'infinite';
|
|
1497
|
-
}
|
|
1513
|
+
const swing = _ref14 => {
|
|
1514
|
+
let {
|
|
1515
|
+
duration = '1s',
|
|
1516
|
+
iterationCount = 'infinite'
|
|
1517
|
+
} = _ref14;
|
|
1498
1518
|
return {
|
|
1499
1519
|
from: {
|
|
1500
1520
|
transform: 'rotate(0deg)'
|
|
@@ -1511,20 +1531,18 @@ const swing = function (duration, iterationCount) {
|
|
|
1511
1531
|
'80%': {
|
|
1512
1532
|
transform: 'rotate(-5deg)'
|
|
1513
1533
|
},
|
|
1514
|
-
|
|
1534
|
+
to: {
|
|
1515
1535
|
transform: 'rotate(0deg)'
|
|
1516
1536
|
},
|
|
1517
1537
|
duration,
|
|
1518
1538
|
iterationCount
|
|
1519
1539
|
};
|
|
1520
1540
|
};
|
|
1521
|
-
const rubberBand =
|
|
1522
|
-
|
|
1523
|
-
duration = '1s'
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
timingFunction = 'ease-in-out';
|
|
1527
|
-
}
|
|
1541
|
+
const rubberBand = _ref15 => {
|
|
1542
|
+
let {
|
|
1543
|
+
duration = '1s',
|
|
1544
|
+
timingFunction = 'ease-in-out'
|
|
1545
|
+
} = _ref15;
|
|
1528
1546
|
return {
|
|
1529
1547
|
from: {
|
|
1530
1548
|
transform: 'scale3d(1, 1, 1)'
|
|
@@ -1544,17 +1562,17 @@ const rubberBand = function (duration, timingFunction) {
|
|
|
1544
1562
|
'75%': {
|
|
1545
1563
|
transform: 'scale3d(1.05, 0.95, 1)'
|
|
1546
1564
|
},
|
|
1547
|
-
|
|
1565
|
+
to: {
|
|
1548
1566
|
transform: 'scale3d(1, 1, 1)'
|
|
1549
1567
|
},
|
|
1550
1568
|
duration,
|
|
1551
1569
|
timingFunction
|
|
1552
1570
|
};
|
|
1553
1571
|
};
|
|
1554
|
-
const wobble =
|
|
1555
|
-
|
|
1556
|
-
duration = '1s'
|
|
1557
|
-
}
|
|
1572
|
+
const wobble = _ref16 => {
|
|
1573
|
+
let {
|
|
1574
|
+
duration = '1s'
|
|
1575
|
+
} = _ref16;
|
|
1558
1576
|
return {
|
|
1559
1577
|
from: {
|
|
1560
1578
|
transform: 'translateX(0%)'
|
|
@@ -1574,16 +1592,16 @@ const wobble = function (duration) {
|
|
|
1574
1592
|
'75%': {
|
|
1575
1593
|
transform: 'translateX(-5%) rotate(-1deg)'
|
|
1576
1594
|
},
|
|
1577
|
-
|
|
1595
|
+
to: {
|
|
1578
1596
|
transform: 'translateX(0%)'
|
|
1579
1597
|
},
|
|
1580
1598
|
duration
|
|
1581
1599
|
};
|
|
1582
1600
|
};
|
|
1583
|
-
const flip =
|
|
1584
|
-
|
|
1585
|
-
duration = '1s'
|
|
1586
|
-
}
|
|
1601
|
+
const flip = _ref17 => {
|
|
1602
|
+
let {
|
|
1603
|
+
duration = '1s'
|
|
1604
|
+
} = _ref17;
|
|
1587
1605
|
return {
|
|
1588
1606
|
from: {
|
|
1589
1607
|
transform: 'perspective(400px) rotateY(0deg)'
|
|
@@ -1591,19 +1609,17 @@ const flip = function (duration) {
|
|
|
1591
1609
|
'40%': {
|
|
1592
1610
|
transform: 'perspective(400px) rotateY(-180deg)'
|
|
1593
1611
|
},
|
|
1594
|
-
|
|
1612
|
+
to: {
|
|
1595
1613
|
transform: 'perspective(400px) rotateY(-360deg)'
|
|
1596
1614
|
},
|
|
1597
1615
|
duration
|
|
1598
1616
|
};
|
|
1599
1617
|
};
|
|
1600
|
-
const heartBeat =
|
|
1601
|
-
|
|
1602
|
-
duration = '1.3s'
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
iterationCount = 'infinite';
|
|
1606
|
-
}
|
|
1618
|
+
const heartBeat = _ref18 => {
|
|
1619
|
+
let {
|
|
1620
|
+
duration = '1.3s',
|
|
1621
|
+
iterationCount = 'infinite'
|
|
1622
|
+
} = _ref18;
|
|
1607
1623
|
return {
|
|
1608
1624
|
from: {
|
|
1609
1625
|
transform: 'scale(1)'
|
|
@@ -1620,52 +1636,50 @@ const heartBeat = function (duration, iterationCount) {
|
|
|
1620
1636
|
'70%': {
|
|
1621
1637
|
transform: 'scale(1)'
|
|
1622
1638
|
},
|
|
1623
|
-
|
|
1639
|
+
to: {
|
|
1624
1640
|
transform: 'scale(1)'
|
|
1625
1641
|
},
|
|
1626
1642
|
duration,
|
|
1627
1643
|
iterationCount
|
|
1628
1644
|
};
|
|
1629
1645
|
};
|
|
1630
|
-
const rollIn =
|
|
1631
|
-
|
|
1632
|
-
duration = '1s'
|
|
1633
|
-
}
|
|
1646
|
+
const rollIn = _ref19 => {
|
|
1647
|
+
let {
|
|
1648
|
+
duration = '1s'
|
|
1649
|
+
} = _ref19;
|
|
1634
1650
|
return {
|
|
1635
1651
|
from: {
|
|
1636
1652
|
opacity: 0,
|
|
1637
1653
|
transform: 'translateX(-100%) rotate(-120deg)'
|
|
1638
1654
|
},
|
|
1639
|
-
|
|
1655
|
+
to: {
|
|
1640
1656
|
opacity: 1,
|
|
1641
1657
|
transform: 'translateX(0px) rotate(0deg)'
|
|
1642
1658
|
},
|
|
1643
1659
|
duration
|
|
1644
1660
|
};
|
|
1645
1661
|
};
|
|
1646
|
-
const rollOut =
|
|
1647
|
-
|
|
1648
|
-
duration = '1s'
|
|
1649
|
-
}
|
|
1662
|
+
const rollOut = _ref20 => {
|
|
1663
|
+
let {
|
|
1664
|
+
duration = '1s'
|
|
1665
|
+
} = _ref20;
|
|
1650
1666
|
return {
|
|
1651
1667
|
from: {
|
|
1652
1668
|
opacity: 1,
|
|
1653
1669
|
transform: 'translateX(0px) rotate(0deg)'
|
|
1654
1670
|
},
|
|
1655
|
-
|
|
1671
|
+
to: {
|
|
1656
1672
|
opacity: 0,
|
|
1657
1673
|
transform: 'translateX(100%) rotate(120deg)'
|
|
1658
1674
|
},
|
|
1659
1675
|
duration
|
|
1660
1676
|
};
|
|
1661
1677
|
};
|
|
1662
|
-
const lightSpeedIn =
|
|
1663
|
-
|
|
1664
|
-
duration = '1s'
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
timingFunction = 'ease-out';
|
|
1668
|
-
}
|
|
1678
|
+
const lightSpeedIn = _ref21 => {
|
|
1679
|
+
let {
|
|
1680
|
+
duration = '1s',
|
|
1681
|
+
timingFunction = 'ease-out'
|
|
1682
|
+
} = _ref21;
|
|
1669
1683
|
return {
|
|
1670
1684
|
from: {
|
|
1671
1685
|
transform: 'translateX(100%) skewX(-30deg)',
|
|
@@ -1678,7 +1692,7 @@ const lightSpeedIn = function (duration, timingFunction) {
|
|
|
1678
1692
|
'80%': {
|
|
1679
1693
|
transform: 'skewX(-5deg)'
|
|
1680
1694
|
},
|
|
1681
|
-
|
|
1695
|
+
to: {
|
|
1682
1696
|
transform: 'translateX(0)',
|
|
1683
1697
|
opacity: 1
|
|
1684
1698
|
},
|
|
@@ -1686,13 +1700,11 @@ const lightSpeedIn = function (duration, timingFunction) {
|
|
|
1686
1700
|
timingFunction
|
|
1687
1701
|
};
|
|
1688
1702
|
};
|
|
1689
|
-
const lightSpeedOut =
|
|
1690
|
-
|
|
1691
|
-
duration = '1s'
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
timingFunction = 'ease-in';
|
|
1695
|
-
}
|
|
1703
|
+
const lightSpeedOut = _ref22 => {
|
|
1704
|
+
let {
|
|
1705
|
+
duration = '1s',
|
|
1706
|
+
timingFunction = 'ease-in'
|
|
1707
|
+
} = _ref22;
|
|
1696
1708
|
return {
|
|
1697
1709
|
from: {
|
|
1698
1710
|
opacity: 1
|
|
@@ -1701,7 +1713,7 @@ const lightSpeedOut = function (duration, timingFunction) {
|
|
|
1701
1713
|
opacity: 1,
|
|
1702
1714
|
transform: 'translateX(-20%) skewX(20deg)'
|
|
1703
1715
|
},
|
|
1704
|
-
|
|
1716
|
+
to: {
|
|
1705
1717
|
opacity: 0,
|
|
1706
1718
|
transform: 'translateX(-100%) skewX(30deg)'
|
|
1707
1719
|
},
|
|
@@ -1709,13 +1721,11 @@ const lightSpeedOut = function (duration, timingFunction) {
|
|
|
1709
1721
|
timingFunction
|
|
1710
1722
|
};
|
|
1711
1723
|
};
|
|
1712
|
-
const hinge =
|
|
1713
|
-
|
|
1714
|
-
duration = '2s'
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
timingFunction = 'ease-in-out';
|
|
1718
|
-
}
|
|
1724
|
+
const hinge = _ref23 => {
|
|
1725
|
+
let {
|
|
1726
|
+
duration = '2s',
|
|
1727
|
+
timingFunction = 'ease-in-out'
|
|
1728
|
+
} = _ref23;
|
|
1719
1729
|
return {
|
|
1720
1730
|
from: {
|
|
1721
1731
|
transform: 'rotate(0deg)',
|
|
@@ -1738,7 +1748,7 @@ const hinge = function (duration, timingFunction) {
|
|
|
1738
1748
|
transform: 'rotate(60deg)',
|
|
1739
1749
|
opacity: 1
|
|
1740
1750
|
},
|
|
1741
|
-
|
|
1751
|
+
to: {
|
|
1742
1752
|
transform: 'translateY(700px)',
|
|
1743
1753
|
opacity: 0
|
|
1744
1754
|
},
|
|
@@ -1746,13 +1756,11 @@ const hinge = function (duration, timingFunction) {
|
|
|
1746
1756
|
timingFunction
|
|
1747
1757
|
};
|
|
1748
1758
|
};
|
|
1749
|
-
const jackInTheBox =
|
|
1750
|
-
|
|
1751
|
-
duration = '1s'
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
timingFunction = 'ease';
|
|
1755
|
-
}
|
|
1759
|
+
const jackInTheBox = _ref24 => {
|
|
1760
|
+
let {
|
|
1761
|
+
duration = '1s',
|
|
1762
|
+
timingFunction = 'ease'
|
|
1763
|
+
} = _ref24;
|
|
1756
1764
|
return {
|
|
1757
1765
|
from: {
|
|
1758
1766
|
opacity: 0,
|
|
@@ -1765,7 +1773,7 @@ const jackInTheBox = function (duration, timingFunction) {
|
|
|
1765
1773
|
'70%': {
|
|
1766
1774
|
transform: 'rotate(3deg)'
|
|
1767
1775
|
},
|
|
1768
|
-
|
|
1776
|
+
to: {
|
|
1769
1777
|
opacity: 1,
|
|
1770
1778
|
transform: 'scale(1) rotate(0deg)'
|
|
1771
1779
|
},
|
|
@@ -1773,13 +1781,11 @@ const jackInTheBox = function (duration, timingFunction) {
|
|
|
1773
1781
|
timingFunction
|
|
1774
1782
|
};
|
|
1775
1783
|
};
|
|
1776
|
-
const flipInX =
|
|
1777
|
-
|
|
1778
|
-
duration = '1s'
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
timingFunction = 'ease-in';
|
|
1782
|
-
}
|
|
1784
|
+
const flipInX = _ref25 => {
|
|
1785
|
+
let {
|
|
1786
|
+
duration = '1s',
|
|
1787
|
+
timingFunction = 'ease-in'
|
|
1788
|
+
} = _ref25;
|
|
1783
1789
|
return {
|
|
1784
1790
|
from: {
|
|
1785
1791
|
transform: 'perspective(400px) rotateX(90deg)',
|
|
@@ -1789,20 +1795,18 @@ const flipInX = function (duration, timingFunction) {
|
|
|
1789
1795
|
transform: 'perspective(400px) rotateX(-10deg)',
|
|
1790
1796
|
opacity: 1
|
|
1791
1797
|
},
|
|
1792
|
-
|
|
1798
|
+
to: {
|
|
1793
1799
|
transform: 'perspective(400px) rotateX(0deg)'
|
|
1794
1800
|
},
|
|
1795
1801
|
duration,
|
|
1796
1802
|
timingFunction
|
|
1797
1803
|
};
|
|
1798
1804
|
};
|
|
1799
|
-
const flipInY =
|
|
1800
|
-
|
|
1801
|
-
duration = '1s'
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
timingFunction = 'ease-in';
|
|
1805
|
-
}
|
|
1805
|
+
const flipInY = _ref26 => {
|
|
1806
|
+
let {
|
|
1807
|
+
duration = '1s',
|
|
1808
|
+
timingFunction = 'ease-in'
|
|
1809
|
+
} = _ref26;
|
|
1806
1810
|
return {
|
|
1807
1811
|
from: {
|
|
1808
1812
|
transform: 'perspective(400px) rotateY(90deg)',
|
|
@@ -1812,20 +1816,18 @@ const flipInY = function (duration, timingFunction) {
|
|
|
1812
1816
|
transform: 'perspective(400px) rotateY(-10deg)',
|
|
1813
1817
|
opacity: 1
|
|
1814
1818
|
},
|
|
1815
|
-
|
|
1819
|
+
to: {
|
|
1816
1820
|
transform: 'perspective(400px) rotateY(0deg)'
|
|
1817
1821
|
},
|
|
1818
1822
|
duration,
|
|
1819
1823
|
timingFunction
|
|
1820
1824
|
};
|
|
1821
1825
|
};
|
|
1822
|
-
const headShake =
|
|
1823
|
-
|
|
1824
|
-
duration = '1s'
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
iterationCount = 'infinite';
|
|
1828
|
-
}
|
|
1826
|
+
const headShake = _ref27 => {
|
|
1827
|
+
let {
|
|
1828
|
+
duration = '1s',
|
|
1829
|
+
iterationCount = 'infinite'
|
|
1830
|
+
} = _ref27;
|
|
1829
1831
|
return {
|
|
1830
1832
|
from: {
|
|
1831
1833
|
transform: 'translateX(0)'
|
|
@@ -1849,13 +1851,11 @@ const headShake = function (duration, iterationCount) {
|
|
|
1849
1851
|
iterationCount
|
|
1850
1852
|
};
|
|
1851
1853
|
};
|
|
1852
|
-
const tada =
|
|
1853
|
-
|
|
1854
|
-
duration = '1s'
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
iterationCount = 'infinite';
|
|
1858
|
-
}
|
|
1854
|
+
const tada = _ref28 => {
|
|
1855
|
+
let {
|
|
1856
|
+
duration = '1s',
|
|
1857
|
+
iterationCount = 'infinite'
|
|
1858
|
+
} = _ref28;
|
|
1859
1859
|
return {
|
|
1860
1860
|
from: {
|
|
1861
1861
|
transform: 'scale3d(1, 1, 1)',
|
|
@@ -1870,7 +1870,7 @@ const tada = function (duration, iterationCount) {
|
|
|
1870
1870
|
'40%, 60%, 80%': {
|
|
1871
1871
|
transform: 'scale3d(1.1, 1.1, 1.1) rotate(-3deg)'
|
|
1872
1872
|
},
|
|
1873
|
-
|
|
1873
|
+
to: {
|
|
1874
1874
|
transform: 'scale3d(1, 1, 1)',
|
|
1875
1875
|
opacity: 1
|
|
1876
1876
|
},
|
|
@@ -1878,13 +1878,11 @@ const tada = function (duration, iterationCount) {
|
|
|
1878
1878
|
iterationCount
|
|
1879
1879
|
};
|
|
1880
1880
|
};
|
|
1881
|
-
const jello =
|
|
1882
|
-
|
|
1883
|
-
duration = '1s'
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
iterationCount = 'infinite';
|
|
1887
|
-
}
|
|
1881
|
+
const jello = _ref29 => {
|
|
1882
|
+
let {
|
|
1883
|
+
duration = '1s',
|
|
1884
|
+
iterationCount = 'infinite'
|
|
1885
|
+
} = _ref29;
|
|
1888
1886
|
return {
|
|
1889
1887
|
from: {
|
|
1890
1888
|
transform: 'none'
|
|
@@ -1913,26 +1911,24 @@ const jello = function (duration, iterationCount) {
|
|
|
1913
1911
|
'88.8%': {
|
|
1914
1912
|
transform: 'skewX(0.09765625deg) skewY(0.09765625deg)'
|
|
1915
1913
|
},
|
|
1916
|
-
|
|
1914
|
+
to: {
|
|
1917
1915
|
transform: 'none'
|
|
1918
1916
|
},
|
|
1919
1917
|
duration,
|
|
1920
1918
|
iterationCount
|
|
1921
1919
|
};
|
|
1922
1920
|
};
|
|
1923
|
-
const fadeInDown =
|
|
1924
|
-
|
|
1925
|
-
duration = '1s'
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
timingFunction = 'ease-out';
|
|
1929
|
-
}
|
|
1921
|
+
const fadeInDown = _ref30 => {
|
|
1922
|
+
let {
|
|
1923
|
+
duration = '1s',
|
|
1924
|
+
timingFunction = 'ease-out'
|
|
1925
|
+
} = _ref30;
|
|
1930
1926
|
return {
|
|
1931
1927
|
from: {
|
|
1932
1928
|
opacity: 0,
|
|
1933
1929
|
transform: 'translateY(-100%)'
|
|
1934
1930
|
},
|
|
1935
|
-
|
|
1931
|
+
to: {
|
|
1936
1932
|
opacity: 1,
|
|
1937
1933
|
transform: 'translateY(0)'
|
|
1938
1934
|
},
|
|
@@ -1940,19 +1936,17 @@ const fadeInDown = function (duration, timingFunction) {
|
|
|
1940
1936
|
timingFunction
|
|
1941
1937
|
};
|
|
1942
1938
|
};
|
|
1943
|
-
const fadeInUp =
|
|
1944
|
-
|
|
1945
|
-
duration = '1s'
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
timingFunction = 'ease-out';
|
|
1949
|
-
}
|
|
1939
|
+
const fadeInUp = _ref31 => {
|
|
1940
|
+
let {
|
|
1941
|
+
duration = '1s',
|
|
1942
|
+
timingFunction = 'ease-out'
|
|
1943
|
+
} = _ref31;
|
|
1950
1944
|
return {
|
|
1951
1945
|
from: {
|
|
1952
1946
|
opacity: 0,
|
|
1953
1947
|
transform: 'translateY(100%)'
|
|
1954
1948
|
},
|
|
1955
|
-
|
|
1949
|
+
to: {
|
|
1956
1950
|
opacity: 1,
|
|
1957
1951
|
transform: 'translateY(0)'
|
|
1958
1952
|
},
|
|
@@ -1960,13 +1954,11 @@ const fadeInUp = function (duration, timingFunction) {
|
|
|
1960
1954
|
timingFunction
|
|
1961
1955
|
};
|
|
1962
1956
|
};
|
|
1963
|
-
const bounceIn =
|
|
1964
|
-
|
|
1965
|
-
duration = '0.75s'
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
timingFunction = 'ease-in';
|
|
1969
|
-
}
|
|
1957
|
+
const bounceIn = _ref32 => {
|
|
1958
|
+
let {
|
|
1959
|
+
duration = '0.75s',
|
|
1960
|
+
timingFunction = 'ease-in'
|
|
1961
|
+
} = _ref32;
|
|
1970
1962
|
return {
|
|
1971
1963
|
from: {
|
|
1972
1964
|
opacity: 0,
|
|
@@ -1979,20 +1971,18 @@ const bounceIn = function (duration, timingFunction) {
|
|
|
1979
1971
|
'70%': {
|
|
1980
1972
|
transform: 'scale(0.9)'
|
|
1981
1973
|
},
|
|
1982
|
-
|
|
1974
|
+
to: {
|
|
1983
1975
|
transform: 'scale(1)'
|
|
1984
1976
|
},
|
|
1985
1977
|
duration,
|
|
1986
1978
|
timingFunction
|
|
1987
1979
|
};
|
|
1988
1980
|
};
|
|
1989
|
-
const bounceOut =
|
|
1990
|
-
|
|
1991
|
-
duration = '0.75s'
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
timingFunction = 'ease-out';
|
|
1995
|
-
}
|
|
1981
|
+
const bounceOut = _ref33 => {
|
|
1982
|
+
let {
|
|
1983
|
+
duration = '0.75s',
|
|
1984
|
+
timingFunction = 'ease-out'
|
|
1985
|
+
} = _ref33;
|
|
1996
1986
|
return {
|
|
1997
1987
|
from: {
|
|
1998
1988
|
transform: 'scale(1)'
|
|
@@ -2004,7 +1994,7 @@ const bounceOut = function (duration, timingFunction) {
|
|
|
2004
1994
|
opacity: 1,
|
|
2005
1995
|
transform: 'scale(1.1)'
|
|
2006
1996
|
},
|
|
2007
|
-
|
|
1997
|
+
to: {
|
|
2008
1998
|
opacity: 0,
|
|
2009
1999
|
transform: 'scale(0.3)'
|
|
2010
2000
|
},
|
|
@@ -2012,49 +2002,43 @@ const bounceOut = function (duration, timingFunction) {
|
|
|
2012
2002
|
timingFunction
|
|
2013
2003
|
};
|
|
2014
2004
|
};
|
|
2015
|
-
const slideOutLeft =
|
|
2016
|
-
|
|
2017
|
-
duration = '0.5s'
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
timingFunction = 'ease-in';
|
|
2021
|
-
}
|
|
2005
|
+
const slideOutLeft = _ref34 => {
|
|
2006
|
+
let {
|
|
2007
|
+
duration = '0.5s',
|
|
2008
|
+
timingFunction = 'ease-in'
|
|
2009
|
+
} = _ref34;
|
|
2022
2010
|
return {
|
|
2023
2011
|
from: {
|
|
2024
2012
|
transform: 'translateX(0)'
|
|
2025
2013
|
},
|
|
2026
|
-
|
|
2014
|
+
to: {
|
|
2027
2015
|
transform: 'translateX(-100%)'
|
|
2028
2016
|
},
|
|
2029
2017
|
duration,
|
|
2030
2018
|
timingFunction
|
|
2031
2019
|
};
|
|
2032
2020
|
};
|
|
2033
|
-
const slideOutRight =
|
|
2034
|
-
|
|
2035
|
-
duration = '0.5s'
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
timingFunction = 'ease-in';
|
|
2039
|
-
}
|
|
2021
|
+
const slideOutRight = _ref35 => {
|
|
2022
|
+
let {
|
|
2023
|
+
duration = '0.5s',
|
|
2024
|
+
timingFunction = 'ease-in'
|
|
2025
|
+
} = _ref35;
|
|
2040
2026
|
return {
|
|
2041
2027
|
from: {
|
|
2042
2028
|
transform: 'translateX(0)'
|
|
2043
2029
|
},
|
|
2044
|
-
|
|
2030
|
+
to: {
|
|
2045
2031
|
transform: 'translateX(100%)'
|
|
2046
2032
|
},
|
|
2047
2033
|
duration,
|
|
2048
2034
|
timingFunction
|
|
2049
2035
|
};
|
|
2050
2036
|
};
|
|
2051
|
-
const zoomInDown =
|
|
2052
|
-
|
|
2053
|
-
duration = '1s'
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
timingFunction = 'ease-out';
|
|
2057
|
-
}
|
|
2037
|
+
const zoomInDown = _ref36 => {
|
|
2038
|
+
let {
|
|
2039
|
+
duration = '1s',
|
|
2040
|
+
timingFunction = 'ease-out'
|
|
2041
|
+
} = _ref36;
|
|
2058
2042
|
return {
|
|
2059
2043
|
from: {
|
|
2060
2044
|
opacity: 0,
|
|
@@ -2064,20 +2048,18 @@ const zoomInDown = function (duration, timingFunction) {
|
|
|
2064
2048
|
opacity: 1,
|
|
2065
2049
|
transform: 'scale(0.475) translateY(60px)'
|
|
2066
2050
|
},
|
|
2067
|
-
|
|
2051
|
+
to: {
|
|
2068
2052
|
transform: 'scale(1) translateY(0)'
|
|
2069
2053
|
},
|
|
2070
2054
|
duration,
|
|
2071
2055
|
timingFunction
|
|
2072
2056
|
};
|
|
2073
2057
|
};
|
|
2074
|
-
const zoomOutUp =
|
|
2075
|
-
|
|
2076
|
-
duration = '1s'
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
timingFunction = 'ease-in';
|
|
2080
|
-
}
|
|
2058
|
+
const zoomOutUp = _ref37 => {
|
|
2059
|
+
let {
|
|
2060
|
+
duration = '1s',
|
|
2061
|
+
timingFunction = 'ease-in'
|
|
2062
|
+
} = _ref37;
|
|
2081
2063
|
return {
|
|
2082
2064
|
from: {
|
|
2083
2065
|
opacity: 1,
|
|
@@ -2087,7 +2069,7 @@ const zoomOutUp = function (duration, timingFunction) {
|
|
|
2087
2069
|
opacity: 1,
|
|
2088
2070
|
transform: 'scale(0.475) translateY(-60px)'
|
|
2089
2071
|
},
|
|
2090
|
-
|
|
2072
|
+
to: {
|
|
2091
2073
|
opacity: 0,
|
|
2092
2074
|
transform: 'scale(0.1) translateY(-1000px)'
|
|
2093
2075
|
},
|
|
@@ -2095,19 +2077,17 @@ const zoomOutUp = function (duration, timingFunction) {
|
|
|
2095
2077
|
timingFunction
|
|
2096
2078
|
};
|
|
2097
2079
|
};
|
|
2098
|
-
const backInDown =
|
|
2099
|
-
|
|
2100
|
-
duration = '1s'
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
timingFunction = 'ease-in';
|
|
2104
|
-
}
|
|
2080
|
+
const backInDown = _ref38 => {
|
|
2081
|
+
let {
|
|
2082
|
+
duration = '1s',
|
|
2083
|
+
timingFunction = 'ease-in'
|
|
2084
|
+
} = _ref38;
|
|
2105
2085
|
return {
|
|
2106
2086
|
from: {
|
|
2107
2087
|
opacity: 0.7,
|
|
2108
2088
|
transform: 'translateY(-2000px) scaleY(2.5) scaleX(0.2)'
|
|
2109
2089
|
},
|
|
2110
|
-
|
|
2090
|
+
to: {
|
|
2111
2091
|
opacity: 1,
|
|
2112
2092
|
transform: 'translateY(0) scaleY(1) scaleX(1)'
|
|
2113
2093
|
},
|
|
@@ -2115,13 +2095,11 @@ const backInDown = function (duration, timingFunction) {
|
|
|
2115
2095
|
timingFunction
|
|
2116
2096
|
};
|
|
2117
2097
|
};
|
|
2118
|
-
const backOutUp =
|
|
2119
|
-
|
|
2120
|
-
duration = '1s'
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
timingFunction = 'ease-in';
|
|
2124
|
-
}
|
|
2098
|
+
const backOutUp = _ref39 => {
|
|
2099
|
+
let {
|
|
2100
|
+
duration = '1s',
|
|
2101
|
+
timingFunction = 'ease-in'
|
|
2102
|
+
} = _ref39;
|
|
2125
2103
|
return {
|
|
2126
2104
|
from: {
|
|
2127
2105
|
opacity: 1,
|
|
@@ -2131,7 +2109,7 @@ const backOutUp = function (duration, timingFunction) {
|
|
|
2131
2109
|
opacity: 0.7,
|
|
2132
2110
|
transform: 'translateY(-20px)'
|
|
2133
2111
|
},
|
|
2134
|
-
|
|
2112
|
+
to: {
|
|
2135
2113
|
opacity: 0,
|
|
2136
2114
|
transform: 'translateY(-2000px)'
|
|
2137
2115
|
},
|
|
@@ -2139,16 +2117,12 @@ const backOutUp = function (duration, timingFunction) {
|
|
|
2139
2117
|
timingFunction
|
|
2140
2118
|
};
|
|
2141
2119
|
};
|
|
2142
|
-
const shimmer =
|
|
2143
|
-
|
|
2144
|
-
duration = '2s'
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
}
|
|
2149
|
-
if (iterationCount === void 0) {
|
|
2150
|
-
iterationCount = 'infinite';
|
|
2151
|
-
}
|
|
2120
|
+
const shimmer = _ref40 => {
|
|
2121
|
+
let {
|
|
2122
|
+
duration = '2s',
|
|
2123
|
+
timingFunction = 'linear',
|
|
2124
|
+
iterationCount = 'infinite'
|
|
2125
|
+
} = _ref40;
|
|
2152
2126
|
return {
|
|
2153
2127
|
from: {
|
|
2154
2128
|
transform: 'translateX(-100%)'
|
|
@@ -2156,7 +2130,7 @@ const shimmer = function (duration, timingFunction, iterationCount) {
|
|
|
2156
2130
|
'50%': {
|
|
2157
2131
|
transform: 'translateX(100%)'
|
|
2158
2132
|
},
|
|
2159
|
-
|
|
2133
|
+
to: {
|
|
2160
2134
|
transform: 'translateX(100%)'
|
|
2161
2135
|
},
|
|
2162
2136
|
duration,
|
|
@@ -2164,6 +2138,74 @@ const shimmer = function (duration, timingFunction, iterationCount) {
|
|
|
2164
2138
|
iterationCount
|
|
2165
2139
|
};
|
|
2166
2140
|
};
|
|
2141
|
+
const progress = _ref41 => {
|
|
2142
|
+
let {
|
|
2143
|
+
duration = '2s',
|
|
2144
|
+
timingFunction = 'linear',
|
|
2145
|
+
direction = 'forwards',
|
|
2146
|
+
prop = 'width',
|
|
2147
|
+
from = '0%',
|
|
2148
|
+
to = '100%'
|
|
2149
|
+
} = _ref41;
|
|
2150
|
+
return {
|
|
2151
|
+
from: {
|
|
2152
|
+
[prop]: from
|
|
2153
|
+
},
|
|
2154
|
+
to: {
|
|
2155
|
+
[prop]: to
|
|
2156
|
+
},
|
|
2157
|
+
duration,
|
|
2158
|
+
timingFunction,
|
|
2159
|
+
direction
|
|
2160
|
+
};
|
|
2161
|
+
};
|
|
2162
|
+
const typewriter = _ref42 => {
|
|
2163
|
+
let {
|
|
2164
|
+
duration = '10s',
|
|
2165
|
+
steps = 10,
|
|
2166
|
+
iterationCount = '1',
|
|
2167
|
+
width = 0
|
|
2168
|
+
} = _ref42;
|
|
2169
|
+
return {
|
|
2170
|
+
from: {
|
|
2171
|
+
width: '0px'
|
|
2172
|
+
},
|
|
2173
|
+
to: {
|
|
2174
|
+
width: `${width}px`
|
|
2175
|
+
},
|
|
2176
|
+
timingFunction: `steps(${steps})`,
|
|
2177
|
+
duration,
|
|
2178
|
+
iterationCount
|
|
2179
|
+
};
|
|
2180
|
+
};
|
|
2181
|
+
const blinkCursor = _ref43 => {
|
|
2182
|
+
let {
|
|
2183
|
+
duration = '0.75s',
|
|
2184
|
+
timingFunction = 'step-end',
|
|
2185
|
+
iterationCount = 'infinite',
|
|
2186
|
+
color = 'black'
|
|
2187
|
+
} = _ref43;
|
|
2188
|
+
return {
|
|
2189
|
+
from: {
|
|
2190
|
+
color: color
|
|
2191
|
+
},
|
|
2192
|
+
to: {
|
|
2193
|
+
color: color
|
|
2194
|
+
},
|
|
2195
|
+
'0%': {
|
|
2196
|
+
color: color
|
|
2197
|
+
},
|
|
2198
|
+
'50%': {
|
|
2199
|
+
color: 'transparent'
|
|
2200
|
+
},
|
|
2201
|
+
'100%': {
|
|
2202
|
+
color: color
|
|
2203
|
+
},
|
|
2204
|
+
duration,
|
|
2205
|
+
timingFunction,
|
|
2206
|
+
iterationCount
|
|
2207
|
+
};
|
|
2208
|
+
};
|
|
2167
2209
|
|
|
2168
2210
|
var Animation = {
|
|
2169
2211
|
__proto__: null,
|
|
@@ -2206,7 +2248,10 @@ var Animation = {
|
|
|
2206
2248
|
zoomOutUp: zoomOutUp,
|
|
2207
2249
|
backInDown: backInDown,
|
|
2208
2250
|
backOutUp: backOutUp,
|
|
2209
|
-
shimmer: shimmer
|
|
2251
|
+
shimmer: shimmer,
|
|
2252
|
+
progress: progress,
|
|
2253
|
+
typewriter: typewriter,
|
|
2254
|
+
blinkCursor: blinkCursor
|
|
2210
2255
|
};
|
|
2211
2256
|
|
|
2212
2257
|
const Skeleton = /*#__PURE__*/React__default.memo(_ref => {
|
|
@@ -2225,11 +2270,129 @@ const Skeleton = /*#__PURE__*/React__default.memo(_ref => {
|
|
|
2225
2270
|
inset: 0,
|
|
2226
2271
|
width: '100%',
|
|
2227
2272
|
height: '100%',
|
|
2228
|
-
animate: shimmer(
|
|
2273
|
+
animate: shimmer({
|
|
2274
|
+
duration,
|
|
2275
|
+
timingFunction,
|
|
2276
|
+
iterationCount
|
|
2277
|
+
}),
|
|
2229
2278
|
background: "linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent)"
|
|
2230
2279
|
}));
|
|
2231
2280
|
});
|
|
2232
2281
|
|
|
2282
|
+
const Typewriter = _ref => {
|
|
2283
|
+
let {
|
|
2284
|
+
text,
|
|
2285
|
+
duration = '10s',
|
|
2286
|
+
cursorDuration = '0.75s',
|
|
2287
|
+
cursorTimingFunction = 'step-end',
|
|
2288
|
+
color = 'black',
|
|
2289
|
+
cursor = true,
|
|
2290
|
+
fontSize = 18,
|
|
2291
|
+
width = 100,
|
|
2292
|
+
...props
|
|
2293
|
+
} = _ref;
|
|
2294
|
+
const [visibleLines, setVisibleLines] = React.useState([]);
|
|
2295
|
+
const [isComplete, setIsComplete] = React.useState(false);
|
|
2296
|
+
// Calculate milliseconds once
|
|
2297
|
+
const durationMs = React.useMemo(() => parseFloat(duration.replace('s', '')) * 1000, [duration]);
|
|
2298
|
+
// Split text into lines with width calculation
|
|
2299
|
+
const lines = React.useMemo(() => {
|
|
2300
|
+
const canvas = document.createElement('canvas');
|
|
2301
|
+
const context = canvas.getContext('2d');
|
|
2302
|
+
if (!context) return [];
|
|
2303
|
+
context.font = `${fontSize}px sans-serif`;
|
|
2304
|
+
const words = text.split(' ');
|
|
2305
|
+
const result = [];
|
|
2306
|
+
let currentLine = '';
|
|
2307
|
+
for (const word of words) {
|
|
2308
|
+
const testLine = currentLine ? `${currentLine} ${word}` : word;
|
|
2309
|
+
const metrics = context.measureText(testLine);
|
|
2310
|
+
if (metrics.width > width && currentLine) {
|
|
2311
|
+
const currentMetrics = context.measureText(currentLine);
|
|
2312
|
+
result.push({
|
|
2313
|
+
text: currentLine,
|
|
2314
|
+
width: currentMetrics.width
|
|
2315
|
+
});
|
|
2316
|
+
currentLine = word;
|
|
2317
|
+
} else {
|
|
2318
|
+
currentLine = testLine;
|
|
2319
|
+
}
|
|
2320
|
+
}
|
|
2321
|
+
if (currentLine) {
|
|
2322
|
+
const finalMetrics = context.measureText(currentLine);
|
|
2323
|
+
result.push({
|
|
2324
|
+
text: currentLine,
|
|
2325
|
+
width: finalMetrics.width
|
|
2326
|
+
});
|
|
2327
|
+
}
|
|
2328
|
+
return result;
|
|
2329
|
+
}, [text, width, fontSize]);
|
|
2330
|
+
// Handle animation timing
|
|
2331
|
+
React.useEffect(() => {
|
|
2332
|
+
if (!lines.length) return;
|
|
2333
|
+
setVisibleLines([]);
|
|
2334
|
+
setIsComplete(false);
|
|
2335
|
+
const timeoutIds = [];
|
|
2336
|
+
const perLineDuration = durationMs / lines.length;
|
|
2337
|
+
lines.forEach((line, index) => {
|
|
2338
|
+
const timeoutId = setTimeout(() => {
|
|
2339
|
+
setVisibleLines(prev => {
|
|
2340
|
+
const newLines = [...prev, line];
|
|
2341
|
+
// Set complete when all lines are visible
|
|
2342
|
+
if (newLines.length === lines.length) {
|
|
2343
|
+
// Add small delay to ensure the last line's animation is complete
|
|
2344
|
+
setTimeout(() => setIsComplete(true), parseFloat(getLineAnimation(line).duration));
|
|
2345
|
+
}
|
|
2346
|
+
return newLines;
|
|
2347
|
+
});
|
|
2348
|
+
}, perLineDuration * index);
|
|
2349
|
+
timeoutIds.push(timeoutId);
|
|
2350
|
+
});
|
|
2351
|
+
return () => {
|
|
2352
|
+
timeoutIds.forEach(clearTimeout);
|
|
2353
|
+
setIsComplete(false);
|
|
2354
|
+
};
|
|
2355
|
+
}, [lines, durationMs]);
|
|
2356
|
+
// Calculate animation parameters
|
|
2357
|
+
const getLineAnimation = React.useCallback(line => {
|
|
2358
|
+
const perCharDuration = durationMs / text.length;
|
|
2359
|
+
const lineDuration = `${line.text.length * perCharDuration}ms`;
|
|
2360
|
+
return {
|
|
2361
|
+
duration: lineDuration,
|
|
2362
|
+
width: line.width
|
|
2363
|
+
};
|
|
2364
|
+
}, [durationMs, text.length]);
|
|
2365
|
+
if (!lines.length) return null;
|
|
2366
|
+
return /*#__PURE__*/React__default.createElement(View, {
|
|
2367
|
+
width: width
|
|
2368
|
+
}, visibleLines.map((line, index) => {
|
|
2369
|
+
const animation = getLineAnimation(line);
|
|
2370
|
+
const isLastLine = index === visibleLines.length - 1;
|
|
2371
|
+
return /*#__PURE__*/React__default.createElement(View, {
|
|
2372
|
+
key: `line-${index}`,
|
|
2373
|
+
display: "flex",
|
|
2374
|
+
alignItems: "center"
|
|
2375
|
+
}, /*#__PURE__*/React__default.createElement(Text, Object.assign({
|
|
2376
|
+
display: "inline-block",
|
|
2377
|
+
overflow: "hidden",
|
|
2378
|
+
whiteSpace: "nowrap",
|
|
2379
|
+
animate: typewriter({
|
|
2380
|
+
duration: animation.duration,
|
|
2381
|
+
steps: line.text.length,
|
|
2382
|
+
width: animation.width
|
|
2383
|
+
})
|
|
2384
|
+
}, props), line.text), cursor && isLastLine && !isComplete && /*#__PURE__*/React__default.createElement(Text, {
|
|
2385
|
+
paddingLeft: 4,
|
|
2386
|
+
display: "inline-block",
|
|
2387
|
+
animate: blinkCursor({
|
|
2388
|
+
duration: cursorDuration,
|
|
2389
|
+
timingFunction: cursorTimingFunction,
|
|
2390
|
+
color
|
|
2391
|
+
})
|
|
2392
|
+
}, "|"));
|
|
2393
|
+
}));
|
|
2394
|
+
};
|
|
2395
|
+
|
|
2233
2396
|
const Typography = {
|
|
2234
2397
|
letterSpacings: {
|
|
2235
2398
|
tighter: -0.08,
|
|
@@ -2376,6 +2539,7 @@ exports.Span = Span;
|
|
|
2376
2539
|
exports.Text = Text;
|
|
2377
2540
|
exports.ThemeContext = ThemeContext;
|
|
2378
2541
|
exports.ThemeProvider = ThemeProvider;
|
|
2542
|
+
exports.Typewriter = Typewriter;
|
|
2379
2543
|
exports.Typography = Typography;
|
|
2380
2544
|
exports.View = View;
|
|
2381
2545
|
exports.createQuery = createQuery;
|