{
  "component": {
    "id": "alert",
    "name": "Alert",
    "tier": "free",
    "exampleId": "alert",
    "access": "free",
    "requiresAuthorization": false
  },
  "source": {
    "demoModule": "src/alert-demo.tsx",
    "exportName": "AlertDemo",
    "sha256": "0a4489872a748b7eb0b6629383bbf941002f3b9efb3a844ccfda8afb3af93210",
    "helperImports": [],
    "directComponentImports": [
      "alert"
    ],
    "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 https://tidalui.com/r/alert.json",
    "registryUrl": "https://tidalui.com/r/alert.json",
    "access": "free",
    "sourceDelivery": "public-registry",
    "requiresAuthorization": false,
    "tokenSource": "none",
    "cli": {
      "package": "shadcn",
      "requested": "latest"
    }
  },
  "installPlan": [
    {
      "order": 1,
      "kind": "primary",
      "dependency": "https://tidalui.com/r/alert.json",
      "purpose": "component",
      "command": "npx shadcn@latest add https://tidalui.com/r/alert.json",
      "registryUrl": "https://tidalui.com/r/alert.json",
      "access": "free",
      "sourceDelivery": "public-registry",
      "requiresAuthorization": false
    }
  ],
  "imports": {
    "componentPath": "components/ui/alert.tsx",
    "exports": [
      "TidalAlert",
      "TidalAlertAction",
      "TidalAlertTone"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/alert.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "lucide-react"
    ],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "alert"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/alert.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/alert.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/alert-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { useEffect, useRef, useState } from \"react\";\n\nimport { Check, FileText, Image, Plus, RotateCcw, X } from \"lucide-react\";\n\nimport { TidalAlert, TidalAlertAction, type TidalAlertTone } from \"./components/ui/alert\";\n\nimport \"./components/ui/alert.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .alert-specimen{width:100%;max-width:610px;padding:28px;border:1px solid var(--t-border);border-radius:var(--t-radius-card);background:var(--t-subtle);color:var(--t-ink);box-shadow:0 20px 40px -30px #00000038}.tidal-scope .alert-demo-checks{padding:0 4px 20px}\\n.tidal-scope .alert-demo-heading{display:flex;align-items:center;gap:9px;margin-bottom:14px;font-size:13px}.tidal-scope .alert-demo-heading strong{font-weight:600;letter-spacing:-.2px}.tidal-scope .alert-demo-heading>span{margin-inline-start:auto;color:var(--t-muted);font-size:11px;letter-spacing:1px}\\n.tidal-scope .alert-demo-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid var(--t-border);font-size:12px}.tidal-scope .alert-demo-row>span:last-child{display:flex;align-items:center;gap:6px;color:var(--t-muted);font-size:11px}.tidal-scope .alert-demo-state-icon{position:relative;width:15px;height:15px}.tidal-scope .alert-demo-state-icon>svg{position:absolute;inset:0;opacity:0;transform:rotate(-20deg) scale(.7);transition:opacity 180ms,transform 340ms var(--t-ease-spring)}.tidal-scope .alert-demo-state-icon>svg[data-active=true]{opacity:1;transform:none}\\n.tidal-scope .alert-demo-image-reveal{display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows 420ms var(--t-ease-out),opacity 260ms}.tidal-scope .alert-demo-image-reveal[data-open=true]{grid-template-rows:1fr;opacity:1}.tidal-scope .alert-demo-image-reveal>div{min-height:0;overflow:hidden}.tidal-scope .alert-demo-image{display:flex;align-items:center;gap:15px;padding:14px;border:1px solid var(--t-border);border-radius:11px;background:var(--t-surface);margin-top:8px}.tidal-scope .alert-demo-image>span{display:flex;align-items:center;gap:7px;font-size:11px;color:var(--t-muted)}\\n.tidal-scope .alert-demo-image-art{position:relative;overflow:hidden;flex:none;width:70px;height:44px;border-radius:6px;background:var(--t-ink);color:var(--t-surface)}.tidal-scope .alert-demo-image-art>span{position:absolute;width:65px;height:65px;border:1px solid currentColor;border-radius:50%;left:14px;top:9px;opacity:.7;transform:translateY(16px);transition:transform 500ms var(--t-ease-out)}.tidal-scope .alert-demo-image-art>span:nth-child(2){left:28px;top:-6px;transition-delay:50ms}.tidal-scope .alert-demo-image-art>span:nth-child(3){left:43px;top:-20px;transition-delay:100ms}.tidal-scope .alert-demo-image-reveal[data-open=true] .alert-demo-image-art>span{transform:none}\\n.tidal-scope .alert-demo-controls{display:flex;justify-content:space-between;gap:10px;margin-top:15px}.tidal-scope .alert-demo-controls>button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:44px;min-height:44px;padding:8px 12px;border:1px solid var(--t-border);border-radius:var(--t-radius-control);background:var(--t-surface);color:var(--t-ink);font:inherit;font-size:11px;cursor:pointer;transition:background 140ms,transform 140ms var(--t-ease-out)}.tidal-scope .alert-demo-controls>button:hover:not(:disabled){background:var(--t-wash)}.tidal-scope .alert-demo-controls>button:active:not(:disabled){transform:scale(.98)}.tidal-scope .alert-demo-controls>button:disabled{opacity:.5;cursor:not-allowed}.tidal-scope .alert-demo-note{font-size:11px;line-height:1.6;margin:17px 0 0;color:var(--t-muted)}.tidal-scope .alert-demo-dismissed{padding:24px;border:1px dashed var(--t-border);border-radius:16px;font-size:13px;color:var(--t-muted)}\\n@keyframes tidal-alert-demo-message{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}\\n@media(prefers-reduced-motion:no-preference){.tidal-scope .alert-demo-message{display:block;animation:tidal-alert-demo-message 300ms var(--t-ease-out)}}\\n@media(max-width:480px){.tidal-scope .alert-specimen{padding:18px}.tidal-scope .alert-demo-heading{flex-wrap:wrap}.tidal-scope .alert-demo-heading>span{font-size:11px}.tidal-scope .alert-specimen .tidal-alert{padding:16px;gap:10px;grid-template-columns:32px minmax(0,1fr) 44px}.tidal-scope .alert-specimen .tidal-alert-icon{width:32px;height:32px;border-radius:9px}.tidal-scope .alert-specimen .tidal-alert-icon>svg{left:5px;top:5px}.tidal-scope .alert-specimen .tidal-alert-title{padding-inline-start:42px}}\\n@media(prefers-reduced-motion:reduce){.tidal-scope .alert-demo-state-icon>svg,.tidal-scope .alert-demo-image-art>span,.tidal-scope .alert-demo-controls>button:active:not(:disabled){transform:none}}\";\n\ntype Phase = \"missing\" | \"preparing\" | \"error\" | \"ready\";\n\nconst messages: Record<Phase, { title: string; description: string; tone: TidalAlertTone }> = {\n  missing: { title: \"Social preview is missing\", description: \"Add a sample image to complete this page’s preview.\", tone: \"warning\" },\n  preparing: { title: \"Preparing sample image\", description: \"A short local simulation. No file is uploaded.\", tone: \"neutral\" },\n  error: { title: \"Sample image could not be read\", description: \"Try again with the included sample image.\", tone: \"error\" },\n  ready: { title: \"Sample preview is ready\", description: \"Both local checks are complete. Nothing is published.\", tone: \"success\" },\n};\n\nexport function AlertDemo() {\n  const [phase, setPhase] = useState<Phase>(\"missing\"),[visible, setVisible] = useState(true);\n  const timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined),restore = useRef<HTMLButtonElement>(null);\n  useEffect(() => () => clearTimeout(timer.current), []);\n  const message = messages[phase];\n  function prepare() { clearTimeout(timer.current); setPhase(\"preparing\"); timer.current = setTimeout(() => setPhase(\"ready\"), 650); }\n  function reset() { clearTimeout(timer.current); setPhase(\"missing\"); setVisible(true); }\n  return <div className=\"alert-specimen\" data-phase={phase}>\n    <div className=\"alert-demo-checks\">\n      <div className=\"alert-demo-heading\"><FileText size={17} aria-hidden=\"true\" /><strong>Northstar page</strong><span>LOCAL CHECKS</span></div>\n      <div className=\"alert-demo-row\"><span>Page metadata</span><span><Check size={15} aria-hidden=\"true\" />Ready</span></div>\n      <div className=\"alert-demo-row\"><span>Social preview</span><span className=\"alert-demo-state\"><span className=\"alert-demo-state-icon\" aria-hidden=\"true\"><Check size={15} data-active={phase === \"ready\"} /><X size={15} data-active={phase !== \"ready\"} /></span>{phase === \"ready\" ? \"Ready\" : phase === \"preparing\" ? \"Preparing\" : phase === \"error\" ? \"Error\" : \"Missing\"}</span></div>\n      <div className=\"alert-demo-image-reveal\" data-open={phase === \"ready\"} aria-hidden={phase !== \"ready\"}><div><div className=\"alert-demo-image\"><div className=\"alert-demo-image-art\" aria-hidden=\"true\"><span /><span /><span /></div><span><Image size={15} aria-hidden=\"true\" />Sample preview image</span></div></div></div>\n    </div>\n    {visible ? <TidalAlert title={message.title} tone={message.tone} announce=\"polite\" onDismiss={() => { setVisible(false); restore.current?.focus({ preventScroll: true }); }} dismissLabel=\"Dismiss sample notice\" action={<TidalAlertAction aria-disabled={phase === \"preparing\"} aria-busy={phase === \"preparing\"} onClick={() => { if (phase !== \"preparing\") phase === \"ready\" ? reset() : prepare(); }}>{phase === \"ready\" ? <RotateCcw size={15} aria-hidden=\"true\" /> : <Plus size={15} aria-hidden=\"true\" />}{phase === \"ready\" ? \"Remove sample image\" : phase === \"preparing\" ? \"Preparing sample\" : phase === \"error\" ? \"Try sample again\" : \"Add sample image\"}</TidalAlertAction>}><span key={phase} className=\"alert-demo-message\">{message.description}</span></TidalAlert> : <div className=\"alert-demo-dismissed\" role=\"status\">Sample notice dismissed.</div>}\n    <div className=\"alert-demo-controls\"><button ref={restore} type=\"button\" onClick={() => { if (!visible) setVisible(true); else { clearTimeout(timer.current); setPhase(\"error\"); } }} disabled={phase === \"preparing\" && visible}>{visible ? \"Show error\" : \"Show notice\"}</button><button type=\"button\" onClick={reset}><RotateCcw size={14} aria-hidden=\"true\" />Reset</button></div>\n    <p className=\"alert-demo-note\">Sample checks and image. All changes stay in this preview.</p>\n  </div>;\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <AlertDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/alert.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "phase",
      "type": "inferred-from-existing-demo",
      "initial": "\"missing\"",
      "setter": "setPhase",
      "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."
    },
    {
      "name": "onDismiss",
      "nativeType": "component 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": false,
    "names": [],
    "expectedFormData": {},
    "submitBehavior": "No form submit is present in the existing demo.",
    "resetBehavior": "No reset control is present in the existing demo.",
    "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": "present-local"
  },
  "exceptions": []
}
