{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "core-motion",
  "type": "registry:lib",
  "title": "core/motion",
  "description": "Framework-free behaviour shared by the ui-* components (motion); no DOM, no lit. Copied from @purpurabog/ui 2.3.0; the package is the maintained source, this copy is yours to change. Icons from the Carbon Design System (Apache-2.0, © IBM Corp.; see THIRD-PARTY-NOTICES.md in the package).",
  "dependencies": [],
  "registryDependencies": [],
  "files": [
    {
      "path": "src/core/motion.ts",
      "type": "registry:lib",
      "target": "components/ui/core/motion.ts",
      "content": "/**\n * A CSS `<time>` in milliseconds: `240ms` → 240, `.24s` → 240 (what CSS minifiers write for 240ms), anything\n * else (empty, `none`) → 0. The motion tokens (`--ui-duration-*`) are read this way, so a minified stylesheet\n * keeps its animations as long as the source's.\n */\nexport function cssDuration(value: string): number {\n    const time = value.trim().toLowerCase();\n    let unit = 0;\n    if (time.endsWith('ms')) unit = 1;\n    else if (time.endsWith('s')) unit = 1000;\n    if (unit === 0) return 0;\n    const amount = Number(time.slice(0, unit === 1 ? -2 : -1)) * unit;\n    return Number.isFinite(amount) ? Math.max(amount, 0) : 0;\n}\n"
    }
  ]
}
