{
  "component": {
    "id": "activity-timeline",
    "name": "Activity timeline",
    "tier": "pro",
    "exampleId": "activity-timeline",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/activity-timeline-demo.tsx",
    "exportName": "ActivityTimelineDemo",
    "sha256": "9736648e1b22ad2bcec29d1c5ddbf7da52587a8035e8c9c6c4f3691afe6621c7",
    "helperImports": [],
    "directComponentImports": [
      "activity-timeline"
    ],
    "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/activity-timeline",
    "registryUrl": "https://tidalui.com/r/pro/activity-timeline.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/activity-timeline",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/activity-timeline",
      "registryUrl": "https://tidalui.com/r/pro/activity-timeline.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/activity-timeline.tsx",
    "exports": [
      "TidalActivityEvent",
      "TidalActivityGroup",
      "TidalActivityTimeline"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/activity-timeline.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "lucide-react"
    ],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "activity-timeline"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/activity-timeline.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/activity-timeline.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/activity-timeline-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "\"use client\";\n\nimport \"./components/ui/tidal.css\";\n\nimport { useMemo, useState } from \"react\";\n\nimport { CalendarClock, Check, Download, FileText, MessageSquareText } from \"lucide-react\";\n\nimport { TidalActivityTimeline, type TidalActivityEvent, type TidalActivityGroup } from \"./components/ui/activity-timeline\";\n\nimport \"./components/ui/activity-timeline.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 .activity-timeline-demo {\\n  display: grid;\\n  grid-template-columns: minmax(0, 1fr);\\n  width: 100%;\\n  max-width: 1120px;\\n  min-width: 0;\\n  overflow: hidden;\\n  border: 1px solid var(--t-border);\\n  border-radius: var(--t-radius-card);\\n  background: var(--t-subtle);\\n  color: var(--t-ink);\\n  box-shadow: 0 28px 58px -46px #00000075;\\n  container-type: inline-size;\\n}\\n\\n.tidal-scope .activity-timeline-demo,\\n.tidal-scope .activity-timeline-demo * {\\n  box-sizing: border-box;\\n}\\n\\n.tidal-scope .activity-demo-stage {\\n  min-width: 0;\\n  padding: 27px;\\n  background:\\n    linear-gradient(var(--t-border) 1px, transparent 1px),\\n    linear-gradient(90deg, var(--t-border) 1px, transparent 1px),\\n    color-mix(in srgb, var(--t-surface) 76%, var(--t-subtle));\\n  background-size: 24px 24px;\\n}\\n\\n.tidal-scope .activity-demo-filters {\\n  display: grid;\\n  grid-template-columns: repeat(4, minmax(0, 1fr));\\n  gap: 6px;\\n  margin-bottom: 23px;\\n}\\n\\n.tidal-scope .activity-demo-filters button {\\n  min-width: 44px;\\n  min-height: 44px;\\n  padding: 8px 10px;\\n  border: 1px solid var(--t-border);\\n  border-radius: var(--t-radius-control);\\n  background: var(--t-surface);\\n  color: var(--t-muted);\\n  font: inherit;\\n  font-size: 11px;\\n  font-weight: 600;\\n  cursor: pointer;\\n  transition:\\n    background 160ms,\\n    color 160ms,\\n    border-color 160ms,\\n    transform 140ms var(--t-ease-out);\\n}\\n\\n.tidal-scope .activity-demo-filters button[aria-pressed=\\\"true\\\"] {\\n  border-color: var(--t-ink);\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n}\\n\\n.tidal-scope .activity-demo-filters button:hover {\\n  border-color: var(--t-ink);\\n}\\n\\n.tidal-scope .activity-demo-filters button:active {\\n  transform: scale(0.98);\\n}\\n\\n.tidal-scope .activity-demo-filters button:focus-visible {\\n  outline: 2px solid var(--t-accent);\\n  outline-offset: 3px;\\n}\\n\\n.tidal-scope .activity-demo-stage > .tidal-activity {\\n  max-width: none;\\n}\\n\\n.tidal-scope .activity-demo-status {\\n  min-height: 17px;\\n  margin: 17px 0 0;\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.6;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .activity-demo-checklist > strong {\\n  color: var(--t-ink);\\n  font-size: 11px;\\n}\\n\\n.tidal-scope .activity-demo-checklist ul,\\n.tidal-scope .activity-demo-notes {\\n  display: grid;\\n  gap: 5px;\\n  margin: 8px 0 0;\\n  padding-inline-start: 17px;\\n}\\n\\n.tidal-scope .activity-demo-file {\\n  display: flex;\\n  min-width: 0;\\n  align-items: center;\\n  justify-content: space-between;\\n  gap: 12px;\\n}\\n\\n.tidal-scope .activity-demo-file > span,\\n.tidal-scope .activity-demo-file > a {\\n  display: flex;\\n  min-width: 0;\\n  align-items: center;\\n  gap: 8px;\\n}\\n\\n.tidal-scope .activity-demo-file strong,\\n.tidal-scope .activity-demo-file small {\\n  display: block;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .activity-demo-file strong {\\n  color: var(--t-ink);\\n  font-size: 11px;\\n}\\n\\n.tidal-scope .activity-demo-file small {\\n  margin-top: 2px;\\n  color: var(--t-muted);\\n  font-size: 11px;\\n}\\n\\n.tidal-scope .activity-demo-file > a {\\n  min-width: 44px;\\n  min-height: 44px;\\n  flex: none;\\n  justify-content: center;\\n  padding: 8px 10px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 8px;\\n  color: var(--t-ink);\\n  font-size: 11px;\\n  font-weight: 650;\\n  text-decoration: none;\\n}\\n\\n.tidal-scope .activity-demo-file > a:focus-visible {\\n  outline: 2px solid var(--t-accent);\\n  outline-offset: 3px;\\n}\\n\\n.tidal-scope .activity-demo-change {\\n  display: grid;\\n  grid-template-columns: repeat(2, minmax(0, 1fr));\\n  gap: 8px;\\n  margin: 0;\\n}\\n\\n.tidal-scope .activity-demo-change > div {\\n  padding: 9px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 8px;\\n  background: var(--t-surface);\\n}\\n\\n.tidal-scope .activity-demo-change dt {\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  text-transform: uppercase;\\n}\\n\\n.tidal-scope .activity-demo-change dd {\\n  margin: 4px 0 0;\\n  color: var(--t-ink);\\n  font-size: 11px;\\n  font-weight: 650;\\n}\\n\\n@container (max-width: 760px) {\\n  .tidal-scope .activity-timeline-demo {\\n    grid-template-columns: minmax(0, 1fr);\\n  }\\n}\\n\\n@container (max-width: 500px) {\\n\\n  .tidal-scope .activity-demo-stage {\\n    padding: 14px;\\n    background-size: 18px 18px;\\n  }\\n\\n  .tidal-scope .activity-demo-filters {\\n    grid-template-columns: repeat(2, minmax(0, 1fr));\\n  }\\n\\n  .tidal-scope .activity-demo-file {\\n    align-items: stretch;\\n    flex-direction: column;\\n  }\\n\\n  .tidal-scope .activity-demo-file > a {\\n    width: 100%;\\n  }\\n}\\n\\n@media (prefers-reduced-motion: reduce) {\\n  .tidal-scope .activity-demo-filters button {\\n    transition: none;\\n    transform: none;\\n  }\\n}\";\n\ntype ActivityKind = \"decision\" | \"file\" | \"note\";\n\ninterface SampleEvent extends TidalActivityEvent {\n  kind: ActivityKind;\n  plainTitle: string;\n}\n\ninterface SampleGroup extends Omit<TidalActivityGroup, \"events\"> {\n  events: readonly SampleEvent[];\n}\n\nconst FILTERS: readonly { id: \"all\" | ActivityKind; label: string }[] = [\n  { id: \"all\", label: \"All updates\" },\n  { id: \"decision\", label: \"Decisions\" },\n  { id: \"file\", label: \"Files\" },\n  { id: \"note\", label: \"Notes\" },\n];\n\nconst SAMPLE_GROUPS: readonly SampleGroup[] = [\n  {\n    id: \"today\",\n    label: \"Today\",\n    events: [\n      {\n        id: \"launch-checklist\",\n        kind: \"decision\",\n        plainTitle: \"Approved the launch checklist\",\n        dateTime: \"2026-10-14T10:42:00-05:00\",\n        timeLabel: \"10:42 AM\",\n        title: \"Approved the launch checklist\",\n        description:\n          \"All eight sample tasks are marked ready for the local release plan.\",\n        marker: <Check />,\n        meta: \"Decision\",\n        actor: {\n          name: \"Mila Santos\",\n          detail: \"Sample project lead\",\n          portrait: (\n            <img src={tidalExampleAvatarDataUri(\"03\")} alt=\"\" loading=\"lazy\" />\n          ),\n        },\n        details: (\n          <div className=\"activity-demo-checklist\">\n            <strong>Approved items</strong>\n            <ul>\n              <li>Final copy reviewed</li>\n              <li>Keyboard paths checked</li>\n              <li>Sample files confirmed</li>\n            </ul>\n          </div>\n        ),\n      },\n      {\n        id: \"project-brief\",\n        kind: \"file\",\n        plainTitle: \"Uploaded project brief v3\",\n        dateTime: \"2026-10-14T09:18:00-05:00\",\n        timeLabel: \"9:18 AM\",\n        title: \"Uploaded project brief v3\",\n        description:\n          \"Replaced the fictional project outline with the reviewed sample copy.\",\n        marker: <FileText />,\n        meta: \"Text file\",\n        actor: {\n          name: \"Noah Price\",\n          detail: \"Sample editor\",\n          portrait: (\n            <img src={tidalExampleAvatarDataUri(\"02\")} alt=\"\" loading=\"lazy\" />\n          ),\n        },\n        details: (\n          <div className=\"activity-demo-file\">\n            <span>\n              <FileText size={15} aria-hidden=\"true\" />\n              <span>\n                <strong>sample-project-brief.txt</strong>\n                <small>Local fictional document</small>\n              </span>\n            </span>\n            <a href=\"/sample-project-brief.txt\" download>\n              <Download size={14} aria-hidden=\"true\" />\n              Download sample\n            </a>\n          </div>\n        ),\n      },\n    ],\n  },\n  {\n    id: \"yesterday\",\n    label: \"Yesterday\",\n    events: [\n      {\n        id: \"kickoff-date\",\n        kind: \"decision\",\n        plainTitle: \"Moved the sample kickoff to October 19\",\n        dateTime: \"2026-10-13T15:26:00-05:00\",\n        timeLabel: \"3:26 PM\",\n        title: \"Moved the sample kickoff to October 19\",\n        description:\n          \"The connected preview now reflects the revised fictional schedule.\",\n        marker: <CalendarClock />,\n        meta: \"Schedule\",\n        actor: {\n          name: \"Ava Singh\",\n          detail: \"Sample coordinator\",\n          portrait: (\n            <img src={tidalExampleAvatarDataUri(\"01\")} alt=\"\" loading=\"lazy\" />\n          ),\n        },\n        details: (\n          <dl className=\"activity-demo-change\">\n            <div>\n              <dt>Previous</dt>\n              <dd>October 17</dd>\n            </div>\n            <div>\n              <dt>Updated</dt>\n              <dd>October 19</dd>\n            </div>\n          </dl>\n        ),\n      },\n      {\n        id: \"review-notes\",\n        kind: \"note\",\n        plainTitle: \"Added three review notes\",\n        dateTime: \"2026-10-13T11:05:00-05:00\",\n        timeLabel: \"11:05 AM\",\n        title: \"Added three review notes\",\n        description:\n          \"The notes identify copy, spacing, and keyboard checks in this local sample.\",\n        marker: <MessageSquareText />,\n        meta: \"3 notes\",\n        actor: {\n          name: \"Mila Santos\",\n          detail: \"Sample project lead\",\n          portrait: (\n            <img src={tidalExampleAvatarDataUri(\"03\")} alt=\"\" loading=\"lazy\" />\n          ),\n        },\n        details: (\n          <ol className=\"activity-demo-notes\">\n            <li>Clarify the empty-state copy.</li>\n            <li>Keep all controls at least 44 pixels.</li>\n            <li>Confirm the reduced-motion final state.</li>\n          </ol>\n        ),\n      },\n    ],\n  },\n];\n\nfunction findSampleEvent(id: string) {\n  return SAMPLE_GROUPS.flatMap((group) => group.events).find(\n    (event) => event.id === id,\n  );\n}\n\nexport function ActivityTimelineDemo() {\n  const [filter, setFilter] = useState<(typeof FILTERS)[number][\"id\"]>(\"all\");\n  const [expandedIds, setExpandedIds] = useState<ReadonlySet<string>>(\n    () => new Set([\"launch-checklist\"]),\n  );\n  const [status, setStatus] = useState(\n    \"Showing all four fictional project updates.\",\n  );\n\n  const visibleGroups = useMemo(\n    () =>\n      SAMPLE_GROUPS.map((group) => ({\n        ...group,\n        events:\n          filter === \"all\"\n            ? group.events\n            : group.events.filter((event) => event.kind === filter),\n      })),\n    [filter],\n  );\n  function chooseFilter(nextFilter: (typeof FILTERS)[number][\"id\"]) {\n    setFilter(nextFilter);\n    const label = FILTERS.find((item) => item.id === nextFilter)?.label;\n    const nextCount = SAMPLE_GROUPS.reduce(\n      (count, group) =>\n        count +\n        group.events.filter(\n          (event) => nextFilter === \"all\" || event.kind === nextFilter,\n        ).length,\n      0,\n    );\n    setStatus(\n      `${label} selected. ${nextCount} fictional update${nextCount === 1 ? \"\" : \"s\"} shown.`,\n    );\n  }\n\n  function toggleEvent(eventId: string, expanded: boolean) {\n    setExpandedIds((current) => {\n      const next = new Set(current);\n      if (expanded) next.add(eventId);\n      else next.delete(eventId);\n      return next;\n    });\n    const event = findSampleEvent(eventId);\n    setStatus(\n      `${expanded ? \"Opened\" : \"Closed\"} details for ${event?.plainTitle ?? \"the update\"}.`,\n    );\n  }\n\n  return (\n    <section\n      className=\"activity-timeline-demo\"\n      aria-label=\"Activity timeline preview\"\n    >\n      <div className=\"activity-demo-stage\">\n        <div\n          className=\"activity-demo-filters\"\n          role=\"group\"\n          aria-label=\"Filter project activity\"\n        >\n          {FILTERS.map((item) => (\n            <button\n              key={item.id}\n              type=\"button\"\n              aria-pressed={filter === item.id}\n              onClick={() => chooseFilter(item.id)}\n            >\n              {item.label}\n            </button>\n          ))}\n        </div>\n\n        <TidalActivityTimeline\n          eyebrow=\"Recent updates\"\n          title=\"Project activity\"\n          description=\"Decisions, files, and review notes from a fictional workspace. Nothing is synced or sent.\"\n          groups={visibleGroups}\n          expandedIds={expandedIds}\n          onExpandedChange={toggleEvent}\n        />\n\n        <p className=\"activity-demo-status\" aria-live=\"polite\">\n          {status}\n        </p>\n      </div>\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      <ActivityTimelineDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/activity-timeline.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [],
  "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": "onExpandedChange",
      "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": "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": []
}
