Files
dealplustech/node_modules/astro/dist/transitions/index.js
Kunthawat 77ac4d2d05 feat: Upgrade to Astro with full PDPA compliance
PDPA Features:
 Cookie consent banner
 Consent logging API
 Admin dashboard
 Privacy Policy
 Terms & Conditions

Technical:
 Astro 5.x + Tailwind v4
 Docker on port 80
 SQLite database
 15 pages built

Ready for Easypanel deployment.
2026-03-12 10:01:04 +07:00

71 lines
1.5 KiB
JavaScript

import { createAnimationScope } from "../runtime/server/transition.js";
const EASE_IN_OUT_QUART = "cubic-bezier(0.76, 0, 0.24, 1)";
function slide({
duration
} = {}) {
return {
forwards: {
old: [
{
name: "astroFadeOut",
duration: duration ?? "90ms",
easing: EASE_IN_OUT_QUART,
fillMode: "both"
},
{
name: "astroSlideToLeft",
duration: duration ?? "220ms",
easing: EASE_IN_OUT_QUART,
fillMode: "both"
}
],
new: [
{
name: "astroFadeIn",
duration: duration ?? "210ms",
easing: EASE_IN_OUT_QUART,
delay: duration ? void 0 : "30ms",
fillMode: "both"
},
{
name: "astroSlideFromRight",
duration: duration ?? "220ms",
easing: EASE_IN_OUT_QUART,
fillMode: "both"
}
]
},
backwards: {
old: [{ name: "astroFadeOut" }, { name: "astroSlideToRight" }],
new: [{ name: "astroFadeIn" }, { name: "astroSlideFromLeft" }]
}
};
}
function fade({
duration
} = {}) {
const anim = {
old: {
name: "astroFadeOut",
duration: duration ?? 180,
easing: EASE_IN_OUT_QUART,
fillMode: "both"
},
new: {
name: "astroFadeIn",
duration: duration ?? 180,
easing: EASE_IN_OUT_QUART,
fillMode: "both"
}
};
return {
forwards: anim,
backwards: anim
};
}
export {
createAnimationScope,
fade,
slide
};