Files

33 lines
591 B
JavaScript

//#region app/utils/motion.ts
var EASE = [
.22,
1,
.36,
1
];
/** Convert latin digits to Persian digits */
var faNum = (v) => String(v).replace(/\d/g, (d) => "۰۱۲۳۴۵۶۷۸۹"[Number(d)]);
/** While-in-view fade-up props for motion elements (spread with v-bind) */
var fade = (delay = 0, y = 36) => ({
initial: {
opacity: 0,
y
},
whileInView: {
opacity: 1,
y: 0
},
inViewOptions: {
once: true,
margin: "-60px"
},
transition: {
duration: .8,
delay,
ease: EASE
}
});
export { EASE as E, fade as a, faNum as f };
//# sourceMappingURL=motion-BvlOLZ1k.mjs.map