{
  "component": {
    "id": "project-grid",
    "name": "Project grid",
    "tier": "pro",
    "exampleId": "project-grid",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/project-grid-demo.tsx",
    "exportName": "ProjectGridDemo",
    "sha256": "45ec5fc63d48b547604b89b4bf6c75c2bb5c652848174f20b97b552d875cc869",
    "helperImports": [],
    "directComponentImports": [
      "project-grid"
    ],
    "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/project-grid",
    "registryUrl": "https://tidalui.com/r/pro/project-grid.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/project-grid",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/project-grid",
      "registryUrl": "https://tidalui.com/r/pro/project-grid.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/project-grid.tsx",
    "exports": [
      "TidalProject",
      "TidalProjectAction",
      "TidalProjectGrid",
      "TidalProjectOwner"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/project-grid.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "project-grid"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/project-grid.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/project-grid.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/project-grid-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "\"use client\";\n\nimport \"./components/ui/tidal.css\";\n\nimport { useId, useLayoutEffect, useMemo, useRef, useState } from \"react\";\n\nimport { TidalProjectGrid, type TidalProject, type TidalProjectAction, type TidalProjectOwner } from \"./components/ui/project-grid\";\n\nimport \"./components/ui/project-grid.css\";\n\nfunction tidalExampleAvatarDataUri(seed: unknown) {\n  const text = String(seed).replace(/[^a-z0-9]/gi, \"\").slice(-2) || \"UI\";\n  const palette = [\"#333333\", \"#555555\", \"#777777\", \"#999999\", \"#bbbbbb\"];\n  const color = palette[Array.from(text).reduce((sum, character) => sum + character.charCodeAt(0), 0) % palette.length];\n  const svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\"><rect width=\"96\" height=\"96\" rx=\"48\" fill=\"${color}\"/><circle cx=\"48\" cy=\"38\" r=\"17\" fill=\"white\" fill-opacity=\".92\"/><path d=\"M18 92c3-22 15-34 30-34s27 12 30 34\" fill=\"white\" fill-opacity=\".92\"/></svg>`;\n  return `data:image/svg+xml,${encodeURIComponent(svg)}`;\n}\n\nfunction tidalExampleImageDataUri(label: string) {\n  const safeLabel = label.replace(/[<>&]/g, \"\").slice(0, 28) || \"Sample image\";\n  const svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1200 675\"><defs><linearGradient id=\"g\" x1=\"0\" x2=\"1\" y1=\"0\" y2=\"1\"><stop stop-color=\"#171717\"/><stop offset=\"1\" stop-color=\"#555555\"/></linearGradient></defs><rect width=\"1200\" height=\"675\" fill=\"url(#g)\"/><circle cx=\"950\" cy=\"100\" r=\"260\" fill=\"white\" fill-opacity=\".08\"/><text x=\"80\" y=\"570\" fill=\"white\" font-family=\"system-ui,sans-serif\" font-size=\"64\" font-weight=\"700\">${safeLabel}</text></svg>`;\n  return `data:image/svg+xml,${encodeURIComponent(svg)}`;\n}\n\nconst tidalExampleStyles = \".tidal-scope .project-grid-demo,\\n.tidal-scope .project-grid-demo * {\\n  box-sizing: border-box;\\n}\\n\\n.tidal-scope .project-grid-demo {\\n  display: grid;\\n  width: 100%;\\n  max-width: 1160px;\\n  min-width: 0;\\n  gap: 14px;\\n  padding: 20px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 22px;\\n  background: var(--t-subtle);\\n  color: var(--t-ink);\\n  container: project-grid-demo / inline-size;\\n}\\n\\n.tidal-scope .project-grid-demo-detail {\\n  min-width: 0;\\n  padding: 21px 22px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 18px;\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n  scroll-margin-block: 18px;\\n}\\n\\n.tidal-scope .project-grid-demo-detail:focus-visible {\\n  outline: 2px solid var(--t-accent);\\n  outline-offset: 3px;\\n}\\n\\n.tidal-scope .project-grid-demo-detail > span {\\n  color: color-mix(in srgb, var(--t-surface) 65%, var(--t-ink));\\n  font-size: 11px;\\n  font-weight: 680;\\n  letter-spacing: 0.1em;\\n  line-height: 1.4;\\n  text-transform: uppercase;\\n}\\n\\n.tidal-scope .project-grid-demo-detail h3 {\\n  margin: 8px 0 0;\\n  font-size: 22px;\\n  font-weight: 560;\\n  letter-spacing: -0.04em;\\n  line-height: 1.15;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .project-grid-demo-detail p {\\n  max-width: 68ch;\\n  margin: 8px 0 0;\\n  color: color-mix(in srgb, var(--t-surface) 72%, var(--t-ink));\\n  font-size: 11px;\\n  line-height: 1.6;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .project-grid-demo-detail dl {\\n  display: grid;\\n  grid-template-columns: repeat(3, minmax(0, 1fr));\\n  gap: 1px;\\n  margin: 17px 0 0;\\n  overflow: hidden;\\n  border: 1px solid color-mix(in srgb, var(--t-surface) 24%, var(--t-ink));\\n  border-radius: 10px;\\n  background: color-mix(in srgb, var(--t-surface) 24%, var(--t-ink));\\n}\\n\\n.tidal-scope .project-grid-demo-detail dl > div {\\n  min-width: 0;\\n  padding: 11px 12px;\\n  background: var(--t-ink);\\n}\\n\\n.tidal-scope .project-grid-demo-detail dt {\\n  color: color-mix(in srgb, var(--t-surface) 58%, var(--t-ink));\\n  font-size: 11px;\\n  font-weight: 660;\\n  line-height: 1.35;\\n}\\n\\n.tidal-scope .project-grid-demo-detail dd {\\n  margin: 4px 0 0;\\n  font-size: 11px;\\n  line-height: 1.45;\\n  overflow-wrap: anywhere;\\n}\\n\\n@container project-grid-demo (max-width: 430px) {\\n  .tidal-scope .project-grid-demo {\\n    gap: 9px;\\n    padding: 8px;\\n  }\\n\\n  .tidal-scope .project-grid-demo-detail {\\n    padding: 18px 16px;\\n  }\\n\\n  .tidal-scope .project-grid-demo-detail dl {\\n    grid-template-columns: minmax(0, 1fr);\\n  }\\n}\";\n\ninterface ProjectSeed {\n  id: string;\n  name: string;\n  accessibleName: string;\n  description: string;\n  status: { id: string; label: string };\n  progress: { value: number; label: string };\n  owners: readonly TidalProjectOwner[];\n  meta: string;\n  reviewed?: boolean;\n}\n\nconst INITIAL_PROJECTS: readonly ProjectSeed[] = [\n  {\n    id: \"atlas\",\n    name: \"Atlas onboarding\",\n    accessibleName: \"Atlas onboarding\",\n    description:\n      \"A focused setup path for a fictional product workspace and its first brief.\",\n    status: { id: \"active\", label: \"Active\" },\n    progress: { value: 72, label: \"Setup progress\" },\n    owners: [\n      {\n        id: \"ava\",\n        name: \"Ava Chen\",\n        avatarSrc: tidalExampleAvatarDataUri(\"01\"),\n      },\n      {\n        id: \"eli\",\n        name: \"Eli Park\",\n        avatarSrc: tidalExampleAvatarDataUri(\"04\"),\n      },\n    ],\n    meta: \"Updated today\",\n  },\n  {\n    id: \"northstar\",\n    name: \"Northstar research\",\n    accessibleName: \"Northstar research\",\n    description:\n      \"A local sample directory for interview notes, themes, and open questions.\",\n    status: { id: \"planned\", label: \"Planned\" },\n    progress: { value: 34, label: \"Research progress\" },\n    owners: [\n      {\n        id: \"mila\",\n        name: \"Mila Stone\",\n        avatarSrc: tidalExampleAvatarDataUri(\"03\"),\n      },\n      {\n        id: \"noah\",\n        name: \"Noah Reed\",\n        avatarSrc: tidalExampleAvatarDataUri(\"02\"),\n      },\n      {\n        id: \"imani\",\n        name: \"Imani Cole\",\n        avatarSrc: tidalExampleAvatarDataUri(\"07\"),\n      },\n      {\n        id: \"omar\",\n        name: \"Omar Hale\",\n        avatarSrc: tidalExampleAvatarDataUri(\"08\"),\n      },\n    ],\n    meta: \"Updated Monday\",\n  },\n  {\n    id: \"relay\",\n    name: \"Relay launch kit\",\n    accessibleName: \"Relay launch kit\",\n    description:\n      \"A fictional release package with review notes and prepared handoff copy.\",\n    status: { id: \"complete\", label: \"Complete\" },\n    progress: { value: 100, label: \"Launch progress\" },\n    owners: [\n      {\n        id: \"priya\",\n        name: \"Priya Shah\",\n        avatarSrc: tidalExampleAvatarDataUri(\"05\"),\n      },\n    ],\n    meta: \"Updated last week\",\n  },\n  {\n    id: \"signal\",\n    name: \"Signal reporting\",\n    accessibleName: \"Signal reporting\",\n    description:\n      \"A compact reporting surface for local sample metrics and review prompts.\",\n    status: { id: \"active\", label: \"Active\" },\n    progress: { value: 58, label: \"Build progress\" },\n    owners: [\n      {\n        id: \"mateo\",\n        name: \"Mateo Ruiz\",\n        avatarSrc: tidalExampleAvatarDataUri(\"06\"),\n      },\n      {\n        id: \"ava\",\n        name: \"Ava Chen\",\n        avatarSrc: tidalExampleAvatarDataUri(\"01\"),\n      },\n    ],\n    meta: \"Updated Friday\",\n  },\n];\n\nconst STATUS_OPTIONS = [\n  { value: \"all\", label: \"All statuses\" },\n  { value: \"active\", label: \"Active\" },\n  { value: \"planned\", label: \"Planned\" },\n  { value: \"complete\", label: \"Complete\" },\n] as const;\n\nexport function ProjectGridDemo() {\n  const generatedId = useId().replace(/:/g, \"\");\n  const detailId = `project-grid-${generatedId}-detail`;\n  const [projects, setProjects] =\n    useState<readonly ProjectSeed[]>(INITIAL_PROJECTS);\n  const [search, setSearch] = useState(\"\");\n  const [status, setStatus] = useState(\"all\");\n  const [selectedId, setSelectedId] = useState(\"atlas\");\n  const [message, setMessage] = useState(\n    \"This directory uses fictional local sample data.\",\n  );\n  const destinationNodes = useRef(new Map<string, HTMLAnchorElement>());\n  const pendingProjectFocus = useRef<string | null>(null);\n\n  useLayoutEffect(() => {\n    const projectId = pendingProjectFocus.current;\n    if (!projectId) return;\n    const destination = destinationNodes.current.get(projectId);\n    if (!destination) return;\n    pendingProjectFocus.current = null;\n    destination.focus({ preventScroll: true });\n  }, [projects]);\n\n  const projectModels = useMemo<readonly TidalProject[]>(\n    () =>\n      projects.map((project) => ({\n        ...project,\n        destination: {\n          href: `#${detailId}`,\n          label: `Open ${project.accessibleName} detail`,\n          linkRef: (node) => {\n            if (node) destinationNodes.current.set(project.id, node);\n            else destinationNodes.current.delete(project.id);\n          },\n          linkProps: {\n            onClick: () => {\n              setSelectedId(project.id);\n              setMessage(`${project.name} detail opened on this page.`);\n            },\n          },\n        },\n        actions: [\n          {\n            kind: \"button\" as const,\n            id: \"review-locally\",\n            label: project.reviewed ? \"Reviewed locally\" : \"Review locally\",\n            disabled: project.reviewed,\n            onAction: () => {\n              pendingProjectFocus.current = project.id;\n              setProjects((current) =>\n                current.map((item) =>\n                  item.id === project.id ? { ...item, reviewed: true } : item,\n                ),\n              );\n              setMessage(\n                `${project.name} was marked reviewed in local preview state.`,\n              );\n            },\n          },\n        ],\n        meta: project.reviewed ? \"Reviewed locally\" : project.meta,\n      })),\n    [detailId, projects],\n  );\n\n  const visibleProjects = useMemo(() => {\n    const query = search.trim().toLocaleLowerCase();\n    return projectModels.filter((project) => {\n      const matchesStatus = status === \"all\" || project.status.id === status;\n      const matchesSearch =\n        !query ||\n        `${project.accessibleName} ${String(project.description ?? \"\")}`\n          .toLocaleLowerCase()\n          .includes(query);\n      return matchesStatus && matchesSearch;\n    });\n  }, [projectModels, search, status]);\n\n  const sampleAdded = projects.some((project) => project.id === \"harbor\");\n  const addSampleAction = useMemo<TidalProjectAction>(\n    () => ({\n      kind: \"button\",\n      id: \"add-sample-project\",\n      label: sampleAdded ? \"Sample project added\" : \"Add sample project\",\n      disabled: sampleAdded,\n      onAction: () => {\n        const sample: ProjectSeed = {\n          id: \"harbor\",\n          name: \"Harbor release notes\",\n          accessibleName: \"Harbor release notes\",\n          description:\n            \"A newly added fictional record for checking local directory updates.\",\n          status: { id: \"planned\", label: \"Planned\" },\n          progress: { value: 12, label: \"Release progress\" },\n          owners: [\n            {\n              id: \"samir\",\n              name: \"Samir Patel\",\n              avatarSrc: tidalExampleAvatarDataUri(\"10\"),\n            },\n          ],\n          meta: \"Added just now\",\n        };\n        pendingProjectFocus.current = sample.id;\n        setProjects((current) =>\n          current.some((project) => project.id === sample.id)\n            ? current\n            : [...current, sample],\n        );\n        setSearch(\"\");\n        setStatus(\"all\");\n        setSelectedId(sample.id);\n        setMessage(\n          \"Harbor release notes was added visibly to local preview state. No record was saved.\",\n        );\n      },\n    }),\n    [sampleAdded],\n  );\n\n  const selectedProject = projects.find((project) => project.id === selectedId);\n\n  return (\n    <section className=\"project-grid-demo\" aria-label=\"Project grid preview\">\n      <TidalProjectGrid\n        title=\"Projects\"\n        eyebrow={null}\n        description=\"Search sample projects or open their details.\"\n        projects={visibleProjects}\n        search={{\n          value: search,\n          onValueChange: setSearch,\n          placeholder: \"Search name or summary\",\n        }}\n        statusFilter={{\n          value: status,\n          options: STATUS_OPTIONS,\n          onValueChange: setStatus,\n        }}\n        headerAction={addSampleAction}\n        footer={\n          <span>\n            <span role=\"status\" aria-live=\"polite\">\n              {message}\n            </span>{\" \"}\n            No project, collaboration, request, or account data is stored or\n            connected.\n          </span>\n        }\n      />\n\n      <article id={detailId} className=\"project-grid-demo-detail\" tabIndex={-1}>\n        <span>In-page project detail</span>\n        <h3>{selectedProject?.name ?? \"Choose a visible project\"}</h3>\n        <p>\n          {selectedProject?.description ??\n            \"Use a project name in the grid to open its local sample detail.\"}\n        </p>\n        {selectedProject ? (\n          <dl>\n            <div>\n              <dt>Status</dt>\n              <dd>{selectedProject.status.label}</dd>\n            </div>\n            <div>\n              <dt>Progress</dt>\n              <dd>{selectedProject.progress.value}%</dd>\n            </div>\n            <div>\n              <dt>Owners</dt>\n              <dd>\n                {selectedProject.owners.map((owner) => owner.name).join(\", \")}\n              </dd>\n            </div>\n          </dl>\n        ) : null}\n      </article>\n    </section>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <ProjectGridDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/project-grid.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [],
  "events": [],
  "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": "No error announcement path is present in this demo; the consumer owns validation messaging.",
    "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": []
}
