mirror of
https://github.com/hanzoai/site.git
synced 2026-11-20 21:14:28 +00:00
* Type the cloud pages under strict Props, state, refs and handlers for components/pages/cloud (Frame through Network), plus a CSSProperties augmentation so style objects may carry custom properties. Frame's useLive takes the element type where a caller reads or writes the ref. Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk * Type the page subfolders under strict Props, state, refs and handlers for the entrance hooks and data modules in cloudfam through mcp. Data shapes that more than one file reads live in <module>.types.ts beside them. Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk * Type the top-level pages under strict Props, state, refs and handlers for the pages Contact through McpPage, the htmltree reader and the legal, history and grants data modules. Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk * Type local easings as bezier tuples, and lib/motion's Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk
20 lines
1.3 KiB
TypeScript
20 lines
1.3 KiB
TypeScript
// Motion tokens, defined once (BRIEF-v3 ยง8). The same values are CSS variables in app/system.css.
|
|
// HOW TO USE: import { EASE_OUT_EXPO, DUR, SPRING } from '../lib/motion' (or '../../lib/motion'), e.g.
|
|
// transition={{ duration: DUR.enter, ease: EASE_OUT_EXPO }} or transition={SPRING.sheet}
|
|
// Ad hoc easings are banned; reach for these. Reduced motion is handled site-wide (MotionConfig reducedMotion="user").
|
|
export type Bezier = [number, number, number, number]; // a cubic-bezier ease, as motion takes it
|
|
export const EASE_OUT_EXPO: Bezier = [0.16, 1, 0.3, 1]; // headline reveals, hero moves
|
|
export const EASE_CALM: Bezier = [0.33, 1, 0.68, 1]; // enter, the ask bar
|
|
export const EASE_SOFT: Bezier = [0.22, 1, 0.36, 1]; // fades
|
|
export const EASE_IN: Bezier = [0.7, 0, 0.84, 0]; // exits
|
|
|
|
export const DUR = { press: 0.1, hover: 0.2, exit: 0.25, fade: 0.4, enter: 0.6, morph: 0.6, reveal: 1.1 };
|
|
export const SPRING = {
|
|
sheet: { type: 'spring', stiffness: 300, damping: 34 },
|
|
toggle: { type: 'spring', stiffness: 300, damping: 34 },
|
|
morph: { type: 'spring', stiffness: 260, damping: 32 },
|
|
pill: { type: 'spring', stiffness: 500, damping: 35 },
|
|
cursor: { type: 'spring', stiffness: 500, damping: 40, mass: 0.4 },
|
|
};
|
|
export const STAGGER = 0.08; // max 4 items
|