{
  "component": {
    "id": "empty-state",
    "name": "Empty state",
    "tier": "pro",
    "exampleId": "empty-state",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/empty-state-demo.tsx",
    "exportName": "EmptyStateDemo",
    "sha256": "96906cd8afc94a97f39f8b8d7287f8b2856f73ee8c34f7916c4d7a92ea91929b",
    "helperImports": [],
    "directComponentImports": [
      "empty-state",
      "segmented-control"
    ],
    "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/empty-state",
    "registryUrl": "https://tidalui.com/r/pro/empty-state.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/empty-state",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/empty-state",
      "registryUrl": "https://tidalui.com/r/pro/empty-state.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    },
    {
      "order": 2,
      "kind": "demo-only-additional",
      "dependency": "https://tidalui.com/r/segmented-control.json",
      "purpose": "complete-example-demo-dependency",
      "command": "npx shadcn@latest add https://tidalui.com/r/segmented-control.json",
      "registryUrl": "https://tidalui.com/r/segmented-control.json",
      "access": "free",
      "sourceDelivery": "public-registry",
      "requiresAuthorization": false
    }
  ],
  "imports": {
    "componentPath": "components/ui/empty-state.tsx",
    "exports": [
      "TidalEmptyState",
      "TidalEmptyStateAction",
      "TidalEmptyStateVariant",
      "TidalSegmentedControl"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/empty-state.css",
      "components/ui/segmented-control.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "lucide-react"
    ],
    "registry": [],
    "additionalRegistry": [
      "https://tidalui.com/r/segmented-control.json"
    ],
    "installClosure": [
      "empty-state",
      "segmented-control"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/empty-state.css",
      "components/ui/segmented-control.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/empty-state.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/empty-state-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { useEffect, useRef, useState } from \"react\";\n\nimport { Folder, FolderPlus, ArrowRight, SearchX, RotateCcw, LoaderCircle, Check } from \"lucide-react\";\n\nimport { TidalEmptyState, TidalEmptyStateAction, type TidalEmptyStateVariant } from \"./components/ui/empty-state\";\n\nimport { TidalSegmentedControl } from \"./components/ui/segmented-control\";\n\nimport \"./components/ui/empty-state.css\";\n\nimport \"./components/ui/segmented-control.css\";\n\n\n\nconst tidalExampleStyles = \"@import \\\"./components/segmented-control.css\\\";\\n\\n.tidal-scope .empty-state-specimen{width:100%;max-width:660px;padding:24px;border:1px solid var(--t-border);border-radius:var(--t-radius-card);background:var(--t-subtle);color:var(--t-ink);box-shadow:0 22px 40px -30px #00000030}.tidal-scope .empty-demo-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px;font-size:12px}.tidal-scope .empty-demo-toolbar>span:first-child{display:flex;align-items:center;gap:8px}.tidal-scope .empty-demo-toolbar strong{font-weight:600}.tidal-scope .empty-demo-toolbar>span:last-child{color:var(--t-muted);font-size:11px;font-variant-numeric:tabular-nums}\\n.tidal-scope .empty-state-specimen .tidal-empty-state{min-height:330px}.tidal-scope .empty-demo-controls{display:flex;align-items:center;gap:10px;margin-top:18px}.tidal-scope .empty-demo-controls .tidal-segments{flex:1;min-width:0}.tidal-scope .empty-demo-controls>button{display:grid;place-items:center;flex:none;width:44px;height:44px;border:1px solid var(--t-border);border-radius:var(--t-radius-control);background:var(--t-surface);color:var(--t-ink);cursor:pointer;transition:background 140ms,transform 140ms var(--t-ease-out)}.tidal-scope .empty-demo-controls>button:hover{background:var(--t-wash)}.tidal-scope .empty-demo-controls>button:active{transform:scale(.98)}\\n.tidal-scope .empty-demo-created{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:330px;padding:32px 24px;border:1px solid var(--t-border);border-radius:var(--t-radius-card);background:var(--t-surface)}.tidal-scope .empty-demo-created-icon{position:relative;display:grid;place-items:center;width:64px;height:64px;border:1px solid var(--t-border);border-radius:17px;background:var(--t-subtle);margin-bottom:20px}.tidal-scope .empty-demo-created-icon>svg:last-child{position:absolute;right:-5px;bottom:-5px;box-sizing:content-box;padding:5px;border:3px solid var(--t-surface);border-radius:9px;background:var(--t-ink);color:var(--t-surface)}.tidal-scope .empty-demo-created>h3{font-size:22px;letter-spacing:-.6px;font-weight:500;line-height:1.3;margin:0;overflow-wrap:anywhere}.tidal-scope .empty-demo-created>p{font-size:12px;color:var(--t-muted);line-height:1.6;margin:10px 0 22px;overflow-wrap:anywhere}.tidal-scope .empty-demo-note{margin:15px 0 0;color:var(--t-muted);font-size:11px;line-height:1.6}.tidal-scope .empty-demo-created>h3:focus{outline:2px solid var(--t-accent);outline-offset:5px;border-radius:3px}\\n@keyframes tidal-empty-demo-enter{from{opacity:0;transform:translateY(6px) scale(.98)}to{opacity:1;transform:none}}@keyframes tidal-empty-demo-spin{to{transform:rotate(360deg)}}\\n.tidal-scope .empty-demo-controls .tidal-segments>button{min-width:44px;min-height:44px;padding-inline:6px;font-size:11px;white-space:nowrap}\\n@media(prefers-reduced-motion:no-preference){.tidal-scope .empty-demo-created{animation:tidal-empty-demo-enter 400ms var(--t-ease-out) both}.tidal-scope .empty-demo-toolbar>span:last-child{animation:tidal-empty-demo-enter 260ms var(--t-ease-out)}.tidal-scope .empty-demo-spinner{animation:tidal-empty-demo-spin 900ms linear infinite}}\\n@media(max-width:480px){.tidal-scope .empty-state-specimen{padding:18px}.tidal-scope .empty-state-specimen .tidal-empty-state{padding:26px 18px}.tidal-scope .empty-demo-created{padding:26px 18px}.tidal-scope .empty-demo-controls{gap:8px}}\\n@media(prefers-reduced-motion:reduce){.tidal-scope .empty-demo-controls>button:active{transform:none}}\";\n\nconst states = {\n  empty: { title:\"No projects yet\",description:\"Create a sample project to keep related work together.\",action:\"Create sample project\",Icon:FolderPlus },\n  search: { title:\"No matching projects\",description:\"No sample projects match “Budget”. Clear the search to start again.\",action:\"Clear sample search\",Icon:SearchX },\n  error: { title:\"Projects couldn’t be loaded\",description:\"A simulated error. Try again to return to the empty collection.\",action:\"Try sample again\",Icon:RotateCcw },\n};\n\nexport function EmptyStateDemo(){\n  const [mode,setMode]=useState<TidalEmptyStateVariant>(\"empty\"),[created,setCreated]=useState(false),[busy,setBusy]=useState(false);\n  const timer=useRef<ReturnType<typeof setTimeout>|undefined>(undefined),action=useRef<HTMLButtonElement>(null),heading=useRef<HTMLHeadingElement>(null),focusNext=useRef<\"action\"|\"heading\"|null>(null);\n  useEffect(()=>()=>clearTimeout(timer.current),[]);\n  useEffect(()=>{if(focusNext.current===\"heading\")heading.current?.focus({preventScroll:true});if(focusNext.current===\"action\")action.current?.focus({preventScroll:true});focusNext.current=null;},[created]);\n  function change(value:string){clearTimeout(timer.current);setBusy(false);setCreated(false);setMode(value as TidalEmptyStateVariant);}\n  function reset(){clearTimeout(timer.current);setBusy(false);setMode(\"empty\");if(created)focusNext.current=\"action\";setCreated(false);}\n  function activate(){if(busy)return;if(mode===\"search\"){setMode(\"empty\");return;}if(mode===\"error\"){setBusy(true);timer.current=setTimeout(()=>{setBusy(false);setMode(\"empty\");},650);return;}focusNext.current=\"heading\";setCreated(true);}\n  const data=states[mode];\n  return <div className=\"empty-state-specimen\" data-mode={mode} data-created={created}>\n    <div className=\"empty-demo-toolbar\"><span><Folder size={16} aria-hidden=\"true\" /><strong>Projects</strong></span><span key={String(created)}>{created?\"1 project\":\"0 projects\"}</span></div>\n    {created?<div className=\"empty-demo-created\"><span className=\"empty-demo-created-icon\" aria-hidden=\"true\"><Folder size={25}/><Check size={13}/></span><h3 ref={heading} tabIndex={-1}>Untitled project</h3><p role=\"status\">Sample project created in this preview.</p><TidalEmptyStateAction variant=\"secondary\" onClick={reset}>Remove sample project<RotateCcw size={15} aria-hidden=\"true\" /></TidalEmptyStateAction></div>:<TidalEmptyState title={data.title} description={busy?\"Retrying this local sample. No request is sent.\":data.description} variant={mode} announce actions={<TidalEmptyStateAction ref={action} aria-disabled={busy} aria-busy={busy} onClick={activate}>{busy?<LoaderCircle className=\"empty-demo-spinner\" size={15} aria-hidden=\"true\" />:<data.Icon size={15} aria-hidden=\"true\"/>}{busy?\"Retrying sample\":data.action}{!busy&&mode===\"empty\"?<ArrowRight size={14} aria-hidden=\"true\"/>:null}</TidalEmptyStateAction>}/>}\n    <div className=\"empty-demo-controls\"><TidalSegmentedControl label=\"Preview state\" value={mode} onValueChange={change} options={[{value:\"empty\",label:\"Empty\"},{value:\"search\",label:\"Search\"},{value:\"error\",label:\"Error\"}]}/><button type=\"button\" onClick={reset} aria-label=\"Reset empty state preview\"><RotateCcw size={15} aria-hidden=\"true\"/></button></div>\n    <p className=\"empty-demo-note\">Sample collection. Projects and searches 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      <EmptyStateDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/empty-state.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "mode",
      "type": "inferred-from-existing-demo",
      "initial": "\"empty\"",
      "setter": "setMode",
      "proposalCanBeRejected": false
    },
    {
      "prop": "variant",
      "type": "inferred-from-existing-demo",
      "initial": "\"empty\"",
      "setter": "setMode",
      "proposalCanBeRejected": false
    },
    {
      "prop": "value",
      "type": "inferred-from-existing-demo",
      "initial": "\"empty\"",
      "setter": "setMode",
      "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": "onValueChange",
      "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": 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": "Existing demo label or ARIA prop",
    "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": []
}
