{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"marketing-changelogs-interactive-changelog","type":"registry:block","title":"Interactive Changelog","files":[{"path":"components/blocks/marketing/changelogs/interactive-changelog.tsx","content":"import * as React from 'react';\nimport { Badge } from '@/components/ui/badge';\nimport { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';\nimport { Input } from '@/components/ui/input';\nimport { useState } from 'react';\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';\n\n// Define interfaces for our data structures\ninterface ChangelogCategory {\n  features: string[];\n  improvements: string[];\n  fixes: string[];\n  breaking: string[];\n}\n\ninterface Version {\n  version: string;\n  date: string;\n  isLatest: boolean;\n  categories: ChangelogCategory;\n}\n\ninterface Change {\n  version: string;\n  date: string;\n  isLatest: boolean;\n  category: keyof ChangelogCategory;\n  text: string;\n}\n\ninterface GroupedVersion {\n  version: string;\n  date: string;\n  isLatest: boolean;\n  categories: ChangelogCategory;\n}\n\nexport default function InteractiveChangelog() {\n  const [searchQuery, setSearchQuery] = useState('');\n\n  const versions: Version[] = [\n    {\n      version: '2.0.0',\n      date: 'April 15, 2023',\n      isLatest: true,\n      categories: {\n        features: [\n          'Completely redesigned dashboard interface',\n          'Added dark mode support across all pages',\n          'New analytics dashboard with advanced filters',\n        ],\n        improvements: [\n          'Improved performance by 40%',\n          'Enhanced mobile responsiveness',\n          'Better form validation',\n        ],\n        fixes: [\n          'Fixed multiple accessibility issues',\n          'Corrected display issues on Safari',\n          'Fixed authentication errors',\n        ],\n        breaking: [\n          'API endpoints restructured for v2',\n          'Removed deprecated features',\n          'Changed authentication flow',\n        ],\n      },\n    },\n    {\n      version: '1.2.0',\n      date: 'March 2, 2023',\n      isLatest: false,\n      categories: {\n        features: ['Added new analytics dashboard', 'Introduced user profiles'],\n        improvements: [\n          'Improved mobile responsiveness',\n          'Enhanced search functionality',\n        ],\n        fixes: [\n          'Fixed bug with user authentication',\n          'Resolved display issues on small screens',\n        ],\n        breaking: [],\n      },\n    },\n    {\n      version: '1.1.0',\n      date: 'January 15, 2023',\n      isLatest: false,\n      categories: {\n        features: [\n          'Added support for custom themes',\n          'Introduced export functionality',\n        ],\n        improvements: ['Improved form validation', 'Updated documentation'],\n        fixes: [],\n        breaking: [],\n      },\n    },\n  ];\n\n  const allChanges: Change[] = versions.flatMap((version) => {\n    const allCategoryItems = Object.entries(version.categories).flatMap(\n      ([category, items]) =>\n        items.map((item: string) => ({\n          version: version.version,\n          date: version.date,\n          isLatest: version.isLatest,\n          category: category as keyof ChangelogCategory,\n          text: item,\n        }))\n    );\n    return allCategoryItems;\n  });\n\n  const filteredChanges = searchQuery\n    ? allChanges.filter((change) =>\n        change.text.toLowerCase().includes(searchQuery.toLowerCase())\n      )\n    : allChanges;\n\n  const categoryIcons: Record<keyof ChangelogCategory, React.JSX.Element> = {\n    features: (\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        width=\"16\"\n        height=\"16\"\n        viewBox=\"0 0 24 24\"\n        fill=\"none\"\n        stroke=\"currentColor\"\n        strokeWidth=\"2\"\n        strokeLinecap=\"round\"\n        strokeLinejoin=\"round\"\n        className=\"mr-1.5 text-green-500\"\n      >\n        <path d=\"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z\"></path>\n        <path d=\"m9 12 2 2 4-4\"></path>\n      </svg>\n    ),\n    improvements: (\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        width=\"16\"\n        height=\"16\"\n        viewBox=\"0 0 24 24\"\n        fill=\"none\"\n        stroke=\"currentColor\"\n        strokeWidth=\"2\"\n        strokeLinecap=\"round\"\n        strokeLinejoin=\"round\"\n        className=\"mr-1.5 text-blue-500\"\n      >\n        <path d=\"M12 20V10\"></path>\n        <path d=\"M18 20V4\"></path>\n        <path d=\"M6 20v-4\"></path>\n      </svg>\n    ),\n    fixes: (\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        width=\"16\"\n        height=\"16\"\n        viewBox=\"0 0 24 24\"\n        fill=\"none\"\n        stroke=\"currentColor\"\n        strokeWidth=\"2\"\n        strokeLinecap=\"round\"\n        strokeLinejoin=\"round\"\n        className=\"mr-1.5 text-red-500\"\n      >\n        <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z\"></path>\n        <path d=\"M12 9v4\"></path>\n        <path d=\"M12 17h.01\"></path>\n      </svg>\n    ),\n    breaking: (\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        width=\"16\"\n        height=\"16\"\n        viewBox=\"0 0 24 24\"\n        fill=\"none\"\n        stroke=\"currentColor\"\n        strokeWidth=\"2\"\n        strokeLinecap=\"round\"\n        strokeLinejoin=\"round\"\n        className=\"mr-1.5 text-amber-500\"\n      >\n        <path d=\"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z\"></path>\n        <line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"13\"></line>\n        <line x1=\"12\" y1=\"17\" x2=\"12.01\" y2=\"17\"></line>\n      </svg>\n    ),\n  };\n\n  const categoryLabels: Record<keyof ChangelogCategory, string> = {\n    features: 'Features',\n    improvements: 'Improvements',\n    fixes: 'Bug Fixes',\n    breaking: 'Breaking Changes',\n  };\n\n  const getGroupedChanges = (): GroupedVersion[] => {\n    // Group by version\n    const byVersion: Record<string, GroupedVersion> = {};\n    filteredChanges.forEach((change) => {\n      if (!byVersion[change.version]) {\n        byVersion[change.version] = {\n          version: change.version,\n          date: change.date,\n          isLatest: change.isLatest,\n          categories: {\n            features: [],\n            improvements: [],\n            fixes: [],\n            breaking: [],\n          },\n        };\n      }\n      byVersion[change.version]!.categories[change.category].push(change.text);\n    });\n    return Object.values(byVersion);\n  };\n\n  const groupedByVersion = getGroupedChanges();\n\n  // Group by category\n  const changesByCategory: Record<keyof ChangelogCategory, Change[]> = {\n    features: filteredChanges.filter((c) => c.category === 'features'),\n    improvements: filteredChanges.filter((c) => c.category === 'improvements'),\n    fixes: filteredChanges.filter((c) => c.category === 'fixes'),\n    breaking: filteredChanges.filter((c) => c.category === 'breaking'),\n  };\n\n  return (\n    <div className=\"container mx-auto max-w-4xl px-4 py-8\">\n      <div className=\"mb-8\">\n        <h2 className=\"mb-2 text-3xl font-bold tracking-tight\">Changelog</h2>\n        <div className=\"max-w-md\">\n          <div className=\"relative\">\n            <svg\n              xmlns=\"http://www.w3.org/2000/svg\"\n              width=\"16\"\n              height=\"16\"\n              viewBox=\"0 0 24 24\"\n              fill=\"none\"\n              stroke=\"currentColor\"\n              strokeWidth=\"2\"\n              strokeLinecap=\"round\"\n              strokeLinejoin=\"round\"\n              className=\"text-muted-foreground absolute top-1/2 left-3 -translate-y-1/2\"\n            >\n              <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\n              <path d=\"m21 21-4.3-4.3\"></path>\n            </svg>\n            <Input\n              type=\"search\"\n              placeholder=\"Search changes...\"\n              className=\"mt-4 pl-10\"\n              value={searchQuery}\n              onChange={(e) => setSearchQuery(e.target.value)}\n            />\n          </div>\n        </div>\n      </div>\n\n      <Tabs defaultValue=\"by-version\" className=\"w-full\">\n        <TabsList className=\"mb-6 grid w-full grid-cols-2\">\n          <TabsTrigger value=\"by-version\">By Version</TabsTrigger>\n          <TabsTrigger value=\"by-category\">By Category</TabsTrigger>\n        </TabsList>\n\n        <TabsContent value=\"by-version\" className=\"mt-0\">\n          <div className=\"space-y-8\">\n            {searchQuery && filteredChanges.length === 0 ? (\n              <p className=\"text-muted-foreground py-12 text-center\">\n                No changes found matching &quot;{searchQuery}&quot;\n              </p>\n            ) : (\n              groupedByVersion.map((version) => (\n                <Card key={version.version} className=\"overflow-hidden pt-0\">\n                  <CardHeader className=\"bg-muted/40 grid-rows-none py-3\">\n                    <div className=\"flex items-center justify-between\">\n                      <div className=\"flex items-center gap-2\">\n                        <CardTitle>Version {version.version}</CardTitle>\n                        {version.isLatest && <Badge>Latest</Badge>}\n                      </div>\n                      <time className=\"text-muted-foreground hidden text-sm sm:block\">\n                        {version.date}\n                      </time>\n                    </div>\n                    <time className=\"text-muted-foreground mt-1 block text-sm sm:hidden\">\n                      {version.date}\n                    </time>\n                  </CardHeader>\n                  <CardContent className=\"p-0\">\n                    <div className=\"divide-y\">\n                      {Object.entries(version.categories).map(\n                        ([category, items]) => {\n                          const typedCategory =\n                            category as keyof ChangelogCategory;\n                          return items.length > 0 ? (\n                            <div key={category} className=\"p-4\">\n                              <h4 className=\"mb-3 flex items-center text-sm font-medium\">\n                                {categoryIcons[typedCategory]}\n                                {categoryLabels[typedCategory]}\n                              </h4>\n                              <ul className=\"space-y-2 pl-6 text-sm\">\n                                {items.map((item: string, i: number) => (\n                                  <li key={i} className=\"list-disc\">\n                                    {item}\n                                  </li>\n                                ))}\n                              </ul>\n                            </div>\n                          ) : null;\n                        }\n                      )}\n                    </div>\n                  </CardContent>\n                </Card>\n              ))\n            )}\n          </div>\n        </TabsContent>\n\n        <TabsContent value=\"by-category\" className=\"mt-0\">\n          <div className=\"space-y-8\">\n            {searchQuery && filteredChanges.length === 0 ? (\n              <p className=\"text-muted-foreground py-12 text-center\">\n                No changes found matching &quot;{searchQuery}&quot;\n              </p>\n            ) : (\n              Object.entries(changesByCategory).map(([category, changes]) => {\n                const typedCategory = category as keyof ChangelogCategory;\n                return changes.length > 0 ? (\n                  <Card key={category} className=\"overflow-hidden pt-0\">\n                    <CardHeader className=\"bg-muted/40 grid-rows-none py-3\">\n                      <CardTitle className=\"flex items-center text-base\">\n                        {categoryIcons[typedCategory]}\n                        {categoryLabels[typedCategory]}\n                      </CardTitle>\n                    </CardHeader>\n                    <CardContent className=\"p-0\">\n                      <div className=\"divide-y\">\n                        {changes.map((change, index) => (\n                          <div key={index} className=\"p-4\">\n                            <div className=\"mb-2 flex items-center justify-between\">\n                              <div className=\"flex items-center gap-2\">\n                                <span className=\"font-medium\">\n                                  v{change.version}\n                                </span>\n                                {change.isLatest && (\n                                  <Badge className=\"px-1.5 py-0 text-[10px]\">\n                                    Latest\n                                  </Badge>\n                                )}\n                              </div>\n                              <time className=\"text-muted-foreground text-xs\">\n                                {change.date}\n                              </time>\n                            </div>\n                            <p className=\"text-sm\">{change.text}</p>\n                          </div>\n                        ))}\n                      </div>\n                    </CardContent>\n                  </Card>\n                ) : null;\n              })\n            )}\n          </div>\n        </TabsContent>\n      </Tabs>\n    </div>\n  );\n}\n","type":"registry:component","target":"components/blocks/marketing/changelogs/interactive-changelog.tsx"},{"path":"components/ui/badge.tsx","content":"import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst badgeVariants = cva(\n  \"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-primary text-primary-foreground [a]:hover:bg-primary/80\",\n        secondary:\n          \"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80\",\n        destructive:\n          \"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20\",\n        outline:\n          \"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground\",\n        ghost:\n          \"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50\",\n        link: \"text-primary underline-offset-4 hover:underline\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n    },\n  }\n)\n\nfunction Badge({\n  className,\n  variant = \"default\",\n  asChild = false,\n  ...props\n}: React.ComponentProps<\"span\"> &\n  VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n  const Comp = asChild ? Slot.Root : \"span\"\n\n  return (\n    <Comp\n      data-slot=\"badge\"\n      data-variant={variant}\n      className={cn(badgeVariants({ variant }), className)}\n      {...props}\n    />\n  )\n}\n\nexport { Badge, badgeVariants }\n","type":"registry:ui","target":"components/ui/badge.tsx"},{"path":"components/ui/card.tsx","content":"import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Card({\n  className,\n  size = \"default\",\n  ...props\n}: React.ComponentProps<\"div\"> & { size?: \"default\" | \"sm\" }) {\n  return (\n    <div\n      data-slot=\"card\"\n      data-size={size}\n      className={cn(\n        \"group/card flex flex-col gap-6 overflow-hidden rounded-xl bg-card py-6 text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 has-[>img:first-child]:pt-0 data-[size=sm]:gap-4 data-[size=sm]:py-4 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-header\"\n      className={cn(\n        \"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-6 group-data-[size=sm]/card:px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-6 group-data-[size=sm]/card:[.border-b]:pb-4\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-title\"\n      className={cn(\n        \"font-heading text-base leading-normal font-medium group-data-[size=sm]/card:text-sm\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-description\"\n      className={cn(\"text-sm text-muted-foreground\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-action\"\n      className={cn(\n        \"col-start-2 row-span-2 row-start-1 self-start justify-self-end\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-content\"\n      className={cn(\"px-6 group-data-[size=sm]/card:px-4\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"card-footer\"\n      className={cn(\n        \"flex items-center rounded-b-xl px-6 group-data-[size=sm]/card:px-4 [.border-t]:pt-6 group-data-[size=sm]/card:[.border-t]:pt-4\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nexport {\n  Card,\n  CardHeader,\n  CardFooter,\n  CardTitle,\n  CardAction,\n  CardDescription,\n  CardContent,\n}\n","type":"registry:ui","target":"components/ui/card.tsx"},{"path":"components/ui/input.tsx","content":"import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n  return (\n    <input\n      type={type}\n      data-slot=\"input\"\n      className={cn(\n        \"h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nexport { Input }\n","type":"registry:ui","target":"components/ui/input.tsx"},{"path":"components/ui/tabs.tsx","content":"\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Tabs as TabsPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Tabs({\n  className,\n  orientation = \"horizontal\",\n  ...props\n}: React.ComponentProps<typeof TabsPrimitive.Root>) {\n  return (\n    <TabsPrimitive.Root\n      data-slot=\"tabs\"\n      data-orientation={orientation}\n      className={cn(\n        \"group/tabs flex gap-2 data-horizontal:flex-col\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nconst tabsListVariants = cva(\n  \"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-muted\",\n        line: \"gap-1 bg-transparent\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n    },\n  }\n)\n\nfunction TabsList({\n  className,\n  variant = \"default\",\n  ...props\n}: React.ComponentProps<typeof TabsPrimitive.List> &\n  VariantProps<typeof tabsListVariants>) {\n  return (\n    <TabsPrimitive.List\n      data-slot=\"tabs-list\"\n      data-variant={variant}\n      className={cn(tabsListVariants({ variant }), className)}\n      {...props}\n    />\n  )\n}\n\nfunction TabsTrigger({\n  className,\n  ...props\n}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n  return (\n    <TabsPrimitive.Trigger\n      data-slot=\"tabs-trigger\"\n      className={cn(\n        \"relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n        \"group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent\",\n        \"data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground\",\n        \"after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction TabsContent({\n  className,\n  ...props\n}: React.ComponentProps<typeof TabsPrimitive.Content>) {\n  return (\n    <TabsPrimitive.Content\n      data-slot=\"tabs-content\"\n      className={cn(\"flex-1 text-sm outline-none\", className)}\n      {...props}\n    />\n  )\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants }\n","type":"registry:ui","target":"components/ui/tabs.tsx"}],"description":"A changelog with filters and clickable entries that reveal more detail. Lets visitors explore updates by type and focus on the releases that matter.","dependencies":["class-variance-authority","radix-ui"]}