{
  "component": {
    "id": "usage-limits",
    "name": "Usage limits",
    "tier": "pro",
    "exampleId": "usage-limits",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/usage-limits-demo.tsx",
    "exportName": "UsageLimitsDemo",
    "sha256": "fad7e718533a3cacd8f3562ef3dbdef26ef7aef360bbd2f583e69b1ee4dc9721",
    "helperImports": [],
    "directComponentImports": [
      "tidal-button",
      "usage-limits"
    ],
    "sampleBoundary": "Existing local demo fixture with fictional data and callbacks. No live service, customer data, access key, or Pro source is included."
  },
  "install": {
    "command": "npx shadcn@latest add @tidal-pro/usage-limits",
    "registryUrl": "https://tidalui.com/r/pro/usage-limits.json",
    "namespace": "@tidal-pro",
    "access": "pro",
    "sourceDelivery": "server-gated",
    "requiresAuthorization": true,
    "tokenSource": "local-env",
    "tokenEnvName": "TIDALUI_TOKEN",
    "cli": {
      "package": "shadcn",
      "requested": "latest"
    }
  },
  "installPlan": [
    {
      "order": 1,
      "kind": "primary",
      "dependency": "@tidal-pro/usage-limits",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/usage-limits",
      "registryUrl": "https://tidalui.com/r/pro/usage-limits.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    },
    {
      "order": 2,
      "kind": "demo-only-additional",
      "dependency": "https://tidalui.com/r/tidal-button.json",
      "purpose": "complete-example-demo-dependency",
      "command": "npx shadcn@latest add https://tidalui.com/r/tidal-button.json",
      "registryUrl": "https://tidalui.com/r/tidal-button.json",
      "access": "free",
      "sourceDelivery": "public-registry",
      "requiresAuthorization": false
    }
  ],
  "imports": {
    "componentPath": "components/ui/usage-limits.tsx",
    "exports": [
      "TidalButton",
      "TidalUsageLimits",
      "TidalUsageMetric"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/usage-limits.css",
      "components/ui/meter.css",
      "components/ui/status-badge.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [
      "@tidal-pro/meter",
      "https://tidalui.com/r/status-badge.json"
    ],
    "additionalRegistry": [
      "https://tidalui.com/r/tidal-button.json"
    ],
    "installClosure": [
      "meter",
      "status-badge",
      "tidal-button",
      "usage-limits"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/usage-limits.css",
      "components/ui/meter.css",
      "components/ui/status-badge.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/usage-limits.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/usage-limits-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { useState } from \"react\";\n\nimport { TidalUsageLimits, type TidalUsageMetric } from \"./components/ui/usage-limits\";\n\nimport { TidalButton } from \"./components/ui/tidal-button\";\n\nimport \"./components/ui/usage-limits.css\";\n\nimport \"./components/ui/meter.css\";\n\nimport \"./components/ui/status-badge.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .usage-limits-demo {\\n  width: 100%;\\n  max-width: 640px;\\n  min-width: 0;\\n}\\n.tidal-scope .usage-limits-demo-controls {\\n  display: flex;\\n  flex-wrap: wrap;\\n  align-items: center;\\n  gap: 12px;\\n  margin-top: 16px;\\n}\\n.tidal-scope .usage-limits-demo-controls > span {\\n  font-size: 11px;\\n  line-height: 1.5;\\n  color: var(--t-muted);\\n}\";\n\nexport function UsageLimitsDemo() {\n  const [busy, setBusy] = useState(false);\n  const metrics: TidalUsageMetric[] = [\n    {\n      id: \"api\",\n      label: \"API requests\",\n      kind: \"metered\",\n      value: busy ? 48000 : 24580,\n      limit: 50000,\n      valueText: busy ? \"48,000\" : \"24,580\",\n      limitText: \"50,000\",\n      reset: { label: \"Sample reset · November 1\", dateTime: \"2026-11-01\" },\n    },\n    {\n      id: \"storage\",\n      label: \"File storage\",\n      kind: \"metered\",\n      value: 8.4,\n      limit: 10,\n      valueText: \"8.4 GB\",\n      limitText: \"10 GB\",\n    },\n    {\n      id: \"projects\",\n      label: \"Projects\",\n      kind: \"unlimited\",\n      valueText: \"12 active\",\n    },\n  ];\n  return (\n    <div className=\"usage-limits-demo\">\n      <TidalUsageLimits\n        title=\"Usage this month\"\n        description=\"Sample workspace allowances and consumption.\"\n        metrics={metrics}\n      />\n      <div className=\"usage-limits-demo-controls\">\n        <TidalButton\n          variant=\"secondary\"\n          aria-pressed={busy}\n          onClick={() => setBusy(!busy)}\n        >\n          {busy ? \"Reset sample\" : \"Show higher usage\"}\n        </TidalButton>\n        <span>Sample data. No billing changes.</span>\n      </div>\n    </div>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <UsageLimitsDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/usage-limits.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "pressed",
      "type": "inferred-from-existing-demo",
      "initial": "false",
      "setter": "setBusy",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onClick",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": true,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    }
  ],
  "nativeForm": {
    "participates": true,
    "names": [],
    "expectedFormData": {},
    "submitBehavior": "The existing demo's native form callback receives the submit event.",
    "resetBehavior": "Native reset behavior remains available where the demo renders a resettable control.",
    "disabledBehavior": "Disabled controls remain excluded from successful native form submission.",
    "readOnlyBehavior": "Read-only controls retain their value and remain inspectable by the consumer."
  },
  "accessibility": {
    "labelSource": "Consumer-provided label remains required where the component API requires one.",
    "semantics": "Preserve the component's native element and the semantics demonstrated by the source fixture.",
    "keyboard": [
      "Tab and Shift+Tab",
      "Enter or Space for native activation",
      "Arrow keys where the component exposes a composite control"
    ],
    "focusReturn": "Preserve browser focus order and visible focus.",
    "errorAnnouncement": "The existing error or alert path remains consumer-owned and should be announced by the rendered semantics.",
    "reducedMotion": "Verify prefers-reduced-motion with the existing component transition path.",
    "forcedColors": "Verify visible borders, text, and focus in forced-colors mode."
  },
  "responsive": {
    "widths": [
      320,
      390,
      768,
      1260
    ],
    "shortViewport": "Check the example at a 300px viewport height with keyboard or portal content visible.",
    "overflow": "The page should not gain horizontal overflow; component-local scrolling must remain intentional.",
    "touchTargetMinPx": 44,
    "coarseInputFontPx": 16
  },
  "errors": [
    {
      "fixture": "Exercise the existing demo's error, empty, loading, or invalid fixture.",
      "visibleResult": "The consumer-visible result must remain explicit and must not be replaced by a silent console error.",
      "focusResult": "Focus must remain on the triggering control or move to the announced error according to the native pattern.",
      "ownership": "Consumer-owned sample state only; no network request or customer data is used."
    }
  ],
  "verification": {
    "commands": [
      "npx tsc --noEmit",
      "npx vite build"
    ],
    "lockfile": "Use the consumer project's committed lockfile.",
    "browser": [
      "Chromium 1260x800",
      "Chromium 390x844",
      "Keyboard and reduced-motion pass"
    ]
  },
  "validation": {
    "consumerFixture": {
      "tsc": "pass",
      "viteBuild": "pass",
      "resourceModel": "Generated usage plus only the component files and CSS delivered by the primary item and listed registry dependencies."
    },
    "registryArtifact": "server-gated"
  },
  "exceptions": []
}
