All files / apps/host/src/components/AnimatedPendingRequestList constants.ts

100% Statements 21/21
100% Branches 0/0
100% Functions 1/1
100% Lines 20/20

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51    10x 10x 10x 10x 10x   10x 10x   10x   10x                 10x           10x   10x 10x 10x   10x   10x 10x   26x                 10x 10x  
import { Theme } from '@repo/ui/themes/types';
 
export const SWIPE_X_THRESHOLD = 100;
export const SWIPE_Y_THRESHOLD = 100;
export const VELOCITY_THRESHOLD = 1000;
export const MIN_THRESHOLD = 20;
export const HORIZONTAL_LIMIT = 150;
 
export const MAX_ROTATION = 8;
export const EXIT_X_MULTIPLIER = 1.2;
 
export const SNAP_BACK_SPRING = { damping: 18, stiffness: 180, mass: 0.6 } as const;
// ~750ms settle. Very slow and buttery smooth.
export const EXIT_SPRING = {
  damping: 20,
  stiffness: 40,
  mass: 1.4,
  overshootClamping: true,
  restSpeedThreshold: 2,
  restDisplacementThreshold: 0.2,
} as const;
 
export const STEP_UP_SPRING = {
  damping: 20,
  stiffness: 40,
  mass: 1.4,
} as const;
 
export const PULSE_SPRING = { damping: 12, stiffness: 220 } as const;
 
export const MASCOT_DRAG_FADE_START = 20;
export const MASCOT_DRAG_FADE_FULL = 100;
export const MASCOT_ENTER_DELAY = 120;
// ζ ≈ 0.56 → ~12% overshoot; ω₀ ≈ 17.9 rad/s (~400ms settle, ~25% slower than before)
export const MASCOT_ENTER_SPRING = { damping: 10, stiffness: 160, mass: 0.5 } as const;
 
export const CARD_TYPE_REQUEST = 'request' as const;
export const CARD_TYPE_NEW_REQUEST = 'new-request' as const;
 
export const getShadowStyle = (theme: Theme) => ({
  shadowOffset: { width: 0, height: 20 },
  shadowColor: theme.colors.shadow.black,
  shadowOpacity: 0.5,
  shadowRadius: 20,
  elevation: 100,
});
 
// Book-page stack — fixed peek per layer; thickness varies naturally through layer count
export const BOOK_PAGE_PEEK_Y = 16; // peek per layer (px) — constant on every card
export const BOOK_PAGE_SCALE_STEP = 0.028; // scale reduction per layer — kept tiny to avoid visible "size jump" during step-up