{
  "component": {
    "id": "activity-feed",
    "name": "Activity feed",
    "tier": "pro",
    "exampleId": "activity-feed",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/activity-feed-demo.tsx",
    "exportName": "ActivityFeedDemo",
    "sha256": "43ed3e1afd4625599668a1b2451f4d239f6cf3f2ee2134cf561e87855324393a",
    "helperImports": [],
    "directComponentImports": [
      "activity-feed"
    ],
    "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-feed",
    "registryUrl": "https://tidalui.com/r/pro/activity-feed.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-feed",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/activity-feed",
      "registryUrl": "https://tidalui.com/r/pro/activity-feed.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/activity-feed.tsx",
    "exports": [
      "TidalActivityFeed",
      "TidalActivityFeedGroup",
      "TidalActivityFeedItem"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/activity-feed.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "activity-feed"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/activity-feed.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/activity-feed.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/activity-feed-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "\"use client\";\n\nimport \"./components/ui/tidal.css\";\n\nimport { useCallback, useId, useLayoutEffect, useMemo, useRef, useState } from \"react\";\n\nimport { TidalActivityFeed, type TidalActivityFeedGroup, type TidalActivityFeedItem } from \"./components/ui/activity-feed\";\n\nimport \"./components/ui/activity-feed.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-feed-demo,\\n.tidal-scope .activity-feed-demo * {\\n  box-sizing: border-box;\\n}\\n\\n.tidal-scope .activity-feed-demo {\\n  width: 100%;\\n  min-width: 0;\\n  border: 1px solid var(--t-border);\\n  border-radius: 22px;\\n  background: var(--t-subtle);\\n  color: var(--t-ink);\\n  container: activity-feed-demo / inline-size;\\n}\\n\\n.tidal-scope .activity-feed-demo-layout {\\n  display: grid;\\n  min-width: 0;\\n  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.42fr);\\n  gap: 14px;\\n  padding: 20px;\\n}\\n\\n.tidal-scope .activity-feed-demo-detail {\\n  position: sticky;\\n  top: 14px;\\n  min-width: 0;\\n  min-height: 360px;\\n  align-self: start;\\n  padding: 24px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 18px;\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n  outline: none;\\n}\\n\\n.tidal-scope .activity-feed-demo-detail:focus-visible {\\n  outline: 2px solid var(--t-accent);\\n  outline-offset: 3px;\\n}\\n\\n.tidal-scope .activity-feed-demo-detail > span {\\n  color: color-mix(in srgb, var(--t-surface) 62%, var(--t-ink));\\n  font-size: 11px;\\n  font-weight: 700;\\n  letter-spacing: 0.1em;\\n  line-height: 1.35;\\n  text-transform: uppercase;\\n}\\n\\n.tidal-scope .activity-feed-demo-detail-topline {\\n  display: flex;\\n  min-width: 0;\\n  align-items: center;\\n  justify-content: space-between;\\n  gap: 10px;\\n  margin-top: 22px;\\n  padding-bottom: 12px;\\n  border-bottom: 1px solid\\n    color-mix(in srgb, var(--t-surface) 24%, var(--t-ink));\\n  color: color-mix(in srgb, var(--t-surface) 68%, var(--t-ink));\\n  font-size: 11px;\\n  line-height: 1.35;\\n}\\n\\n.tidal-scope .activity-feed-demo-detail-topline strong,\\n.tidal-scope .activity-feed-demo-detail-topline time {\\n  min-width: 0;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .activity-feed-demo-detail h3 {\\n  margin: 25px 0 0;\\n  font-size: clamp(25px, 5cqi, 38px);\\n  font-weight: 530;\\n  letter-spacing: -0.052em;\\n  line-height: 1.03;\\n  text-wrap: balance;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .activity-feed-demo-detail p {\\n  margin: 15px 0 0;\\n  color: color-mix(in srgb, var(--t-surface) 72%, var(--t-ink));\\n  font-size: 11px;\\n  line-height: 1.65;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .activity-feed-demo-detail dl {\\n  display: grid;\\n  gap: 1px;\\n  margin: 23px 0 0;\\n  overflow: hidden;\\n  border: 1px solid color-mix(in srgb, var(--t-surface) 22%, var(--t-ink));\\n  border-radius: 10px;\\n  background: color-mix(in srgb, var(--t-surface) 22%, var(--t-ink));\\n}\\n\\n.tidal-scope .activity-feed-demo-detail dl > div {\\n  min-width: 0;\\n  padding: 10px 11px;\\n  background: var(--t-ink);\\n}\\n\\n.tidal-scope .activity-feed-demo-detail dt {\\n  color: color-mix(in srgb, var(--t-surface) 58%, var(--t-ink));\\n  font-size: 11px;\\n  line-height: 1.35;\\n}\\n\\n.tidal-scope .activity-feed-demo-detail dd {\\n  margin: 4px 0 0;\\n  font-size: 11px;\\n  line-height: 1.4;\\n  overflow-wrap: anywhere;\\n}\\n\\n@container activity-feed-demo (max-width: 760px) {\\n  .tidal-scope .activity-feed-demo-layout {\\n    grid-template-columns: minmax(0, 1fr);\\n    padding: 10px;\\n  }\\n\\n  .tidal-scope .activity-feed-demo-detail {\\n    position: static;\\n    min-height: 0;\\n  }\\n}\\n\\n@container activity-feed-demo (max-width: 390px) {\\n  .tidal-scope .activity-feed-demo-layout {\\n    gap: 9px;\\n    padding: 7px;\\n  }\\n\\n  .tidal-scope .activity-feed-demo-detail {\\n    padding: 20px 16px;\\n  }\\n}\";\n\ntype FilterId = \"all\" | \"unread\" | \"comment\" | \"change\";\n\ntype SampleItem = Omit<TidalActivityFeedItem, \"destination\" | \"actions\"> & {\n  groupId: \"today\" | \"earlier\";\n  kind: Exclude<FilterId, \"all\" | \"unread\">;\n  detail: string;\n};\n\nconst INITIAL_ITEMS: readonly SampleItem[] = [\n  {\n    id: \"brief-comment\",\n    groupId: \"today\",\n    kind: \"comment\",\n    title: \"Ava left a note on the sample brief\",\n    dateTime: \"2026-10-14T09:24:00-05:00\",\n    timeLabel: \"9:24 AM\",\n    description:\n      \"The local note asks whether the launch checklist should appear beside the brief.\",\n    category: \"Comment\",\n    context: \"Project brief\",\n    unread: true,\n    actor: {\n      name: \"Ava Stone\",\n      detail: \"Fictional teammate\",\n      avatarSrc: tidalExampleAvatarDataUri(\"01\"),\n    },\n    detail:\n      \"Ava’s fictional note suggests placing the checklist beside the project brief so both sample files can be reviewed together.\",\n  },\n  {\n    id: \"milestone-change\",\n    groupId: \"today\",\n    kind: \"change\",\n    title: \"Noah moved the review milestone\",\n    dateTime: \"2026-10-14T08:10:00-05:00\",\n    timeLabel: \"8:10 AM\",\n    description:\n      \"The fictional due label changed from Wednesday to Friday in local sample data.\",\n    category: \"Change\",\n    context: \"Launch plan\",\n    unread: true,\n    actor: {\n      name: \"Noah Park\",\n      detail: \"Fictional teammate\",\n      avatarSrc: tidalExampleAvatarDataUri(\"02\"),\n    },\n    detail:\n      \"The sample milestone now reads Friday. No calendar event, task, or remote record was changed.\",\n  },\n  {\n    id: \"checklist-comment\",\n    groupId: \"today\",\n    kind: \"comment\",\n    title: \"Mila answered the checklist question\",\n    dateTime: \"2026-10-14T07:42:00-05:00\",\n    timeLabel: \"7:42 AM\",\n    description:\n      \"The answer references the fictional launch checklist included with this preview.\",\n    category: \"Comment\",\n    context: \"Checklist\",\n    unread: false,\n    actor: {\n      name: \"Mila Santos\",\n      detail: \"Fictional teammate\",\n      avatarSrc: tidalExampleAvatarDataUri(\"03\"),\n    },\n    detail:\n      \"Mila’s sample answer confirms that every checklist item remains visible in the local document example.\",\n  },\n  {\n    id: \"status-change\",\n    groupId: \"earlier\",\n    kind: \"change\",\n    title: \"Eli changed the sample status to review\",\n    dateTime: \"2026-10-13T16:18:00-05:00\",\n    timeLabel: \"Yesterday\",\n    description:\n      \"The status word updates only this fictional feed and its local detail panel.\",\n    category: \"Change\",\n    context: \"Workspace sample\",\n    unread: false,\n    actor: {\n      name: \"Eli Brooks\",\n      detail: \"Fictional teammate\",\n      avatarSrc: tidalExampleAvatarDataUri(\"04\"),\n    },\n    detail:\n      \"The fictional workspace status is Review. This preview has no connected workspace, account, or backend.\",\n  },\n];\n\nexport function ActivityFeedDemo() {\n  const generatedId = useId().replace(/:/g, \"\");\n  const detailId = `activity-feed-${generatedId}-detail`;\n  const [filter, setFilter] = useState<FilterId>(\"all\");\n  const [items, setItems] = useState(INITIAL_ITEMS);\n  const [selectedId, setSelectedId] = useState(INITIAL_ITEMS[0].id);\n  const [message, setMessage] = useState(\n    \"Choose an activity title or filter. All changes stay in local preview state.\",\n  );\n  const filterNodes = useRef(new Map<FilterId, HTMLButtonElement>());\n  const pendingFilterFocus = useRef<FilterId | null>(null);\n  const allFilterRef = useCallback((node: HTMLButtonElement | null) => {\n    if (node) filterNodes.current.set(\"all\", node);\n    else filterNodes.current.delete(\"all\");\n  }, []);\n  const unreadFilterRef = useCallback((node: HTMLButtonElement | null) => {\n    if (node) filterNodes.current.set(\"unread\", node);\n    else filterNodes.current.delete(\"unread\");\n  }, []);\n  const commentFilterRef = useCallback((node: HTMLButtonElement | null) => {\n    if (node) filterNodes.current.set(\"comment\", node);\n    else filterNodes.current.delete(\"comment\");\n  }, []);\n  const changeFilterRef = useCallback((node: HTMLButtonElement | null) => {\n    if (node) filterNodes.current.set(\"change\", node);\n    else filterNodes.current.delete(\"change\");\n  }, []);\n\n  useLayoutEffect(() => {\n    const target = pendingFilterFocus.current;\n    if (!target) return;\n    pendingFilterFocus.current = null;\n    filterNodes.current.get(target)?.focus({ preventScroll: true });\n  }, [items]);\n\n  const visible = useMemo(\n    () =>\n      items.filter((item) => {\n        if (filter === \"all\") return true;\n        if (filter === \"unread\") return item.unread;\n        return item.kind === filter;\n      }),\n    [filter, items],\n  );\n\n  const groups = useMemo<readonly TidalActivityFeedGroup[]>(() => {\n    const renderItem = (item: SampleItem): TidalActivityFeedItem => ({\n      ...item,\n      destination: {\n        href: `#${detailId}`,\n        label: `Open local detail for ${String(item.title)}`,\n        linkProps: {\n          onClick: () => {\n            setSelectedId(item.id);\n            setMessage(\n              `${String(item.title)} opened in the local detail panel.`,\n            );\n          },\n        },\n      },\n      actions: [\n        {\n          kind: \"button\",\n          id: \"toggle-read\",\n          label: item.unread ? \"Mark read\" : \"Mark unread\",\n          buttonProps: { \"aria-pressed\": !item.unread },\n          onAction: () => {\n            if (filter === \"unread\" && item.unread) {\n              pendingFilterFocus.current = \"unread\";\n            }\n            setItems((current) =>\n              current.map((candidate) =>\n                candidate.id === item.id\n                  ? { ...candidate, unread: !candidate.unread }\n                  : candidate,\n              ),\n            );\n            setMessage(\n              `${String(item.title)} marked ${item.unread ? \"read\" : \"unread\"} in local preview state.`,\n            );\n          },\n        },\n      ],\n    });\n    return [\n      {\n        id: \"today\",\n        label: \"Today\",\n        items: visible\n          .filter((item) => item.groupId === \"today\")\n          .map(renderItem),\n      },\n      {\n        id: \"earlier\",\n        label: \"Earlier\",\n        items: visible\n          .filter((item) => item.groupId === \"earlier\")\n          .map(renderItem),\n      },\n    ];\n  }, [detailId, filter, visible]);\n\n  const selected = items.find((item) => item.id === selectedId) ?? items[0];\n  const countFor = (id: FilterId) =>\n    items.filter((item) => {\n      if (id === \"all\") return true;\n      if (id === \"unread\") return item.unread;\n      return item.kind === id;\n    }).length;\n\n  return (\n    <section className=\"activity-feed-demo\" aria-label=\"Activity feed preview\">\n      <div className=\"activity-feed-demo-layout\">\n        <TidalActivityFeed\n          title=\"Workspace activity\"\n          eyebrow={null}\n          description=\"Filter sample activity or open an update.\"\n          groups={groups}\n          filter={{\n            value: filter,\n            label: \"Filter fictional activity\",\n            options: [\n              {\n                id: \"all\",\n                label: \"All\",\n                count: countFor(\"all\"),\n                buttonRef: allFilterRef,\n              },\n              {\n                id: \"unread\",\n                label: \"Unread\",\n                count: countFor(\"unread\"),\n                buttonRef: unreadFilterRef,\n              },\n              {\n                id: \"comment\",\n                label: \"Comments\",\n                count: countFor(\"comment\"),\n                buttonRef: commentFilterRef,\n              },\n              {\n                id: \"change\",\n                label: \"Changes\",\n                count: countFor(\"change\"),\n                buttonRef: changeFilterRef,\n              },\n            ],\n            onValueChange: (value) => {\n              setFilter(value as FilterId);\n              setMessage(`Showing ${value} activity in local preview state.`);\n            },\n          }}\n          footer={\n            <span role=\"status\" aria-live=\"polite\">\n              {message} No notification, request, task, or remote record is\n              sent.\n            </span>\n          }\n        />\n\n        <article\n          id={detailId}\n          className=\"activity-feed-demo-detail\"\n          tabIndex={-1}\n        >\n          <span>Local activity detail</span>\n          <div className=\"activity-feed-demo-detail-topline\">\n            <strong>{selected.category}</strong>\n            <time dateTime={selected.dateTime}>{selected.timeLabel}</time>\n          </div>\n          <h3>{selected.title}</h3>\n          <p>{selected.detail}</p>\n          <dl>\n            <div>\n              <dt>Fictional actor</dt>\n              <dd>{selected.actor?.name ?? \"System sample\"}</dd>\n            </div>\n            <div>\n              <dt>Context</dt>\n              <dd>{selected.context}</dd>\n            </div>\n            <div>\n              <dt>Read state</dt>\n              <dd>{selected.unread ? \"Unread\" : \"Read\"}</dd>\n            </div>\n          </dl>\n        </article>\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      <ActivityFeedDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/activity-feed.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": []
}
