{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "springs",
  "title": "Springs",
  "description": "Three-tier spring/tween motion tokens — fast, moderate, slow.",
  "dependencies": [
    "motion"
  ],
  "files": [
    {
      "path": "src/lib/springs.ts",
      "content": "import type { Easing, Transition } from \"motion/react\";\n\n/**\n * Motion tokens. Four tiers, each an enter spring paired with a faster,\n * bounce-free exit tween. Never hand-write a duration/transition inline —\n * import the tier that matches how big the thing moving is, and how often\n * it fires.\n */\n\n/** Strong ease-out, matching this repo's `docs/design-system.md` guidance that built-in\n *  easing keywords are too weak for deliberate UI motion. Used on every\n *  tier's exit tween. Motion's array form of `cubic-bezier(0.23, 1, 0.32, 1)`.\n *  Exported so a component with its own bespoke, non-tier tween (e.g. a\n *  checkmark `pathLength` draw) can reuse the same curve instead of a bare\n *  easing keyword. */\nexport const easeOutStrong: Easing = [0.23, 1, 0.32, 1];\n\ninterface SpringTier {\n  /** Enter transition — spring, responds naturally to interruption. */\n  enter: Transition;\n  /** Exit transition — plain tween, one notch quicker, no bounce. */\n  exit: Transition;\n}\n\nexport const spring = {\n  /** Continuous, pointer-tracked motion only: proximity-hover pills, live\n   *  highlight rects that follow the cursor, drag indicators. Anything\n   *  triggered by a discrete click/open — even something small — belongs on\n   *  `quick` or above. Kept at its current speed; this tier is not part of\n   *  the retune, it already needs to feel instant. */\n  fast: {\n    enter: { type: \"spring\", duration: 0.08, bounce: 0 },\n    exit: { duration: 0.06, ease: easeOutStrong },\n  },\n  /** One-shot feedback that isn't continuously tracked: tooltips, preview\n   *  cards, icon crossfades, small entrance staggers. Enough spring to read\n   *  as motion rather than a cut, still fast enough to keep up with the\n   *  interaction that triggered it. */\n  quick: {\n    enter: { type: \"spring\", duration: 0.14, bounce: 0.1 },\n    exit: { duration: 0.1, ease: easeOutStrong },\n  },\n  /**\n   * Short travel / small expansion (dropdown & tab indicators, switch\n   * thumb, accordions) and panels that must land exactly (mobile drawer,\n   * selection merge/split).\n   */\n  moderate: {\n    enter: { type: \"spring\", duration: 0.2, bounce: 0.12 },\n    exit: { duration: 0.15, ease: easeOutStrong },\n  },\n  /** Large surfaces: dialogs, side panels, stepped flows. */\n  slow: {\n    enter: { type: \"spring\", duration: 0.32, bounce: 0.18 },\n    exit: { duration: 0.22, ease: easeOutStrong },\n  },\n} satisfies Record<\"fast\" | \"quick\" | \"moderate\" | \"slow\", SpringTier>;\n",
      "type": "registry:lib"
    }
  ],
  "type": "registry:lib"
}