Files
NapCatQQ/.pnpm-store/v3/files/cc/99c25000826ae02cc331f156838992f845630846608358c3a51561ab1d638be58a357133916167d31be9ca65301bbbff952f447cf2b0de292ccaacd2a52623
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

155 lines
2.7 KiB
Plaintext

"use client";
// src/transition-utils.ts
var TRANSITION_EASINGS = {
ease: [0.36, 0.66, 0.4, 1],
easeIn: [0.4, 0, 1, 1],
easeOut: [0, 0, 0.2, 1],
easeInOut: [0.4, 0, 0.2, 1],
spring: [0.155, 1.105, 0.295, 1.12],
springOut: [0.57, -0.15, 0.62, 0.07],
softSpring: [0.16, 1.11, 0.3, 1.02]
};
var TRANSITION_DEFAULTS = {
enter: {
duration: 0.2,
ease: TRANSITION_EASINGS.easeOut
},
exit: {
duration: 0.1,
ease: TRANSITION_EASINGS.easeIn
}
};
var TRANSITION_VARIANTS = {
scaleSpring: {
enter: {
transform: "scale(1)",
opacity: 1,
transition: {
type: "spring",
bounce: 0,
duration: 0.2
}
},
exit: {
transform: "scale(0.85)",
opacity: 0,
transition: {
type: "easeOut",
duration: 0.15
}
}
},
scaleSpringOpacity: {
initial: {
opacity: 0,
transform: "scale(0.8)"
},
enter: {
opacity: 1,
transform: "scale(1)",
transition: {
type: "spring",
bounce: 0,
duration: 0.3
}
},
exit: {
opacity: 0,
transform: "scale(0.96)",
transition: {
type: "easeOut",
bounce: 0,
duration: 0.15
}
}
},
scale: {
enter: { scale: 1 },
exit: { scale: 0.95 }
},
scaleFadeIn: {
enter: {
transform: "scale(1)",
opacity: 1,
transition: {
duration: 0.25,
ease: TRANSITION_EASINGS.easeIn
}
},
exit: {
transform: "scale(0.95)",
opacity: 0,
transition: {
duration: 0.2,
ease: TRANSITION_EASINGS.easeOut
}
}
},
scaleInOut: {
enter: {
transform: "scale(1)",
opacity: 1,
transition: {
duration: 0.4,
ease: TRANSITION_EASINGS.ease
}
},
exit: {
transform: "scale(1.03)",
opacity: 0,
transition: {
duration: 0.3,
ease: TRANSITION_EASINGS.ease
}
}
},
fade: {
enter: {
opacity: 1,
transition: {
duration: 0.4,
ease: TRANSITION_EASINGS.ease
}
},
exit: {
opacity: 0,
transition: {
duration: 0.3,
ease: TRANSITION_EASINGS.ease
}
}
},
collapse: {
enter: {
opacity: 1,
height: "auto",
transition: {
height: {
type: "spring",
bounce: 0,
duration: 0.3
},
opacity: {
easings: "ease",
duration: 0.4
}
}
},
exit: {
opacity: 0,
height: 0,
transition: {
easings: "ease",
duration: 0.3
}
}
}
};
export {
TRANSITION_EASINGS,
TRANSITION_DEFAULTS,
TRANSITION_VARIANTS
};