{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "core-timers",
  "type": "registry:lib",
  "title": "core/timers",
  "description": "Framework-free behaviour shared by the ui-* components (timers); 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/timers.ts",
      "type": "registry:lib",
      "target": "components/ui/core/timers.ts",
      "content": "/**\n * `setTimeout` / `clearTimeout`: in every runtime the core runs in (browser, server, worker) but not\n * in the plain ES lib it compiles against (tsconfig.core.json), so they are typed here.\n */\ninterface TimerHost {\n    setTimeout(handler: () => void, ms: number): unknown;\n    clearTimeout(id: unknown): void;\n}\n\nconst host = globalThis as unknown as TimerHost;\n\n/** Runs `handler` after `ms`; returns the id for `cancelLater`. */\nexport const later = (handler: () => void, ms: number): unknown => host.setTimeout(handler, ms);\n\n/** Cancels a `later` (nothing when `id` is undefined). */\nexport const cancelLater = (id: unknown) => {\n    if (id !== undefined) host.clearTimeout(id);\n};\n"
    }
  ]
}
