Foundation & API
Motion Helpersv1.0.0 • Strict TypeScript

Animation Engine

Pure utility functions for compiling Framer Motion variant trees, computing easing curves, resolving offsets, and optimizing GPU layers.

ES Module Import
import { buildVariants, buildTransition, getWillChangeHint, resolveEasing } from '@/components/glidecn';

Engine Functions

Lightweight, stateless helper functions used internally by <Page> and custom transition authors.

Engine Constants

Default baseline configuration and predefined cubic-bezier easing curves.

core/constants.ts
export const DEFAULT_TRANSITION_CONFIG = {  duration: 0.4,  delay: 0,  ease: 'easeInOut',  direction: 'left',  stagger: 0,  custom: {},};export const EASING_MAP = {  linear: [0, 0, 1, 1],  easeIn: [0.4, 0, 1, 1],  easeOut: [0, 0, 0.2, 1],  easeInOut: [0.4, 0, 0.2, 1],  spring: [0.22, 1, 0.36, 1],};