{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "error-report",
  "type": "registry:lib",
  "title": "reportError",
  "description": "@interlace/ui — `reportError(error, where)`, one function every caught failure goes through, with a pluggable reporter, a device-only crash log and global handlers. Sends nothing unless you set a reporter.",
  "author": "ofri-peretz <https://github.com/ofri-peretz>",
  "categories": [
    "feedback",
    "util"
  ],
  "dependencies": [],
  "registryDependencies": [
    "https://ds.interlace.tools/r/error-report-core.json",
    "https://ds.interlace.tools/r/error-report-model.json"
  ],
  "files": [
    {
      "path": "registry/interlace-ui/lib/error-report.ts",
      "target": "lib/error-report.ts",
      "type": "registry:lib",
      "content": "export * from '@/lib/error-report-core';\nexport * from '@/lib/error-report-model';\n\n/**\n * @interlace/ui: `reportError`, the one function every caught failure goes through.\n *\n *   import { reportError } from '@interlace/ui/error-report';\n *\n *   try { await save(draft); } catch (error) { reportError(error, 'checkout: save'); }\n *\n * It builds a typed report, keeps the last few in memory, and hands each to a reporter. The\n * default reporter is a development console line and nothing else: no report leaves the device\n * unless the app calls `setReporter` with a function of its own. Nothing here calls `fetch`.\n *\n *   setReporter((report) => crashService.capture(report));   // the whole vendor seam\n *   void installErrorLog(store);                              // keep the last reports on the device\n *   installGlobalHandlers();                                  // browser: error + unhandledrejection\n *\n * This file is every name in one import, and so it is the heaviest way in. It stays so that\n * `import { ... } from '@interlace/ui/error-report'` keeps working. For a first page load import\n * the small half instead, from `error-report-core` (`reportError`, `installGlobalHandlers`,\n * `setReporter`), and the rest only where it is used, from `error-report-model` (`installErrorLog`,\n * `restoreRecent`, `subscribeErrors`, `formatReports`, the fallback copy). `createErrorLog()` makes\n * another log for a test or for an app that wants two. See `ErrorFallback` for the screen.\n */\n\n// @interlace/error-report v1.0.1 — Interlace design system.\n// Docs, props and live preview: https://ds.interlace.tools/c/error-report\n// What changed since: https://ds.interlace.tools/c/error-report#history\n// Generated banner — keep it, the upgrade diff reads this version.\n"
    }
  ],
  "meta": {
    "tier": "util",
    "client": false,
    "minViewport": null,
    "loading": false,
    "version": "1.0.1",
    "since": "2.3.0"
  },
  "docs": "## @interlace/error-report\n\nInstalled to `lib/error-report.ts`.\n\n```tsx\nimport { /* … */ } from '@/lib/error-report';\n```\n\nProps, a11y contract, live preview and source: https://ds.interlace.tools/c/error-report"
}
