{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "aside-05",
  "title": "Project details",
  "description": "A read-only project with its properties, progress by status in one bar and members that unfold in place",
  "dependencies": [
    "motion"
  ],
  "registryDependencies": [
    "https://ui.ndekocode.dev/r/animated-size.json",
    "https://ui.ndekocode.dev/r/avatar.json",
    "https://ui.ndekocode.dev/r/badge.json",
    "https://ui.ndekocode.dev/r/button.json",
    "https://ui.ndekocode.dev/r/icons.json",
    "https://ui.ndekocode.dev/r/mesh-tile.json",
    "https://ui.ndekocode.dev/r/sheet.json",
    "https://ui.ndekocode.dev/r/theme.json",
    "https://ui.ndekocode.dev/r/use-prefers-reduced-motion.json",
    "https://ui.ndekocode.dev/r/utils.json"
  ],
  "files": [
    {
      "path": "registry/ndeko/components/aside/aside-05.tsx",
      "content": "'use client';\n\nimport { AnimatePresence, motion } from 'motion/react';\nimport { useState } from 'react';\n\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport {\n  ArrowRightIcon,\n  ArrowUpRightIcon,\n  CalendarIcon,\n  ChevronDownIcon,\n  CircleCheckIcon,\n  ClockIcon,\n  HashIcon,\n  PencilIcon,\n  UserIcon,\n  UsersIcon,\n  type Icon,\n} from '@/registry/ndeko/lib/icons';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport { AnimatedSize } from '@/registry/ndeko/ui/animated-size';\nimport { Badge } from '@/registry/ndeko/ui/badge';\nimport { Button } from '@/registry/ndeko/ui/button';\nimport { MeshTile } from '@/registry/ndeko/ui/mesh-tile';\n\nimport {\n  AsideCloseButton,\n  AsidePreview,\n  AsideTitle,\n} from './_parts/aside-frame';\nimport { rowVariantsOf } from './_parts/motion';\nimport { PEOPLE, type Person } from './_parts/people';\nimport { PersonAvatar } from './_parts/person-avatar';\nimport { Swap } from './_parts/swap';\nimport {\n  MetaGlyph,\n  STATUS_META,\n  STATUS_ORDER,\n  type StatusId,\n} from './_parts/task-meta';\n\ntype ProjectMember = { person: Person; role: 'Manager' | 'Member' };\n\nconst SHOWN_MEMBERS = 4;\n\nconst TASK_COUNTS: Record<StatusId, number> = {\n  backlog: 6,\n  todo: 8,\n  'in-progress': 5,\n  'in-review': 2,\n  done: 29,\n};\n\nconst MEMBERS: ProjectMember[] = [\n  { person: PEOPLE[1], role: 'Manager' },\n  { person: PEOPLE[0], role: 'Manager' },\n  { person: PEOPLE[2], role: 'Member' },\n  { person: PEOPLE[3], role: 'Member' },\n  { person: PEOPLE[4], role: 'Member' },\n  { person: PEOPLE[5], role: 'Member' },\n  { person: PEOPLE[6], role: 'Member' },\n];\n\nconst FACTS = [\n  { label: 'Created', value: 'Oct 2 by Lucas Moreau' },\n  { label: 'Last change', value: 'Today at 11:40' },\n  { label: 'Visibility', value: 'Members of the project' },\n  { label: 'Time logged', value: '214 h of 320 h' },\n];\n\nconst DISPLAY_ORDER: StatusId[] = [...STATUS_ORDER].reverse();\n\nfunction taskTotal() {\n  let total = 0;\n  for (const status of STATUS_ORDER) {\n    total += TASK_COUNTS[status];\n  }\n  return total;\n}\n\nfunction foldLabelOf(isExpanded: boolean, hiddenCount: number) {\n  if (isExpanded) {\n    return 'Show less';\n  }\n  return `Show ${hiddenCount} more`;\n}\n\nfunction PropertyRow({\n  icon: RowIcon,\n  label,\n  children,\n}: {\n  icon: Icon;\n  label: string;\n  children: React.ReactNode;\n}) {\n  return (\n    <div className='grid min-h-8 grid-cols-[6rem_1fr] items-center gap-2 text-[13px]'>\n      <span className='text-muted-foreground flex items-center gap-2'>\n        <RowIcon className='size-3.5 shrink-0' />\n        {label}\n      </span>\n      <div className='flex min-w-0 flex-wrap items-center gap-1'>\n        {children}\n      </div>\n    </div>\n  );\n}\n\nfunction StatusBreakdown() {\n  const total = taskTotal();\n  const exactShare = (TASK_COUNTS.done * 100) / total;\n  const doneShare = Math.round(exactShare);\n\n  return (\n    <section aria-label='Progress' className='flex flex-col gap-3'>\n      <div className='flex items-baseline gap-2'>\n        <h3 className='text-sm font-medium'>Progress</h3>\n        <span className='ml-auto text-sm font-medium tabular-nums'>\n          {`${doneShare}% done`}\n        </span>\n        <span className='text-muted-foreground text-xs tabular-nums'>\n          {`${TASK_COUNTS.done} of ${total} tasks`}\n        </span>\n      </div>\n      <div aria-hidden='true' className='flex h-2.5 w-full gap-0.5'>\n        {DISPLAY_ORDER.map((status) => {\n          const segmentStyle = {\n            flexGrow: TASK_COUNTS[status],\n            backgroundColor: STATUS_META[status].color,\n          };\n\n          return (\n            <span\n              key={status}\n              style={segmentStyle}\n              className='block h-full basis-0 rounded-[3px]'\n            />\n          );\n        })}\n      </div>\n      <ul className='grid grid-cols-2 gap-x-4 gap-y-1.5'>\n        {DISPLAY_ORDER.map((status) => {\n          const meta = STATUS_META[status];\n\n          return (\n            <li key={status} className='flex items-center gap-2 text-xs'>\n              <MetaGlyph meta={meta} />\n              <span className='min-w-0 flex-1 truncate'>{meta.label}</span>\n              <span className='text-muted-foreground tabular-nums'>\n                {TASK_COUNTS[status]}\n              </span>\n            </li>\n          );\n        })}\n      </ul>\n    </section>\n  );\n}\n\nfunction MemberRow({ member }: { member: ProjectMember }) {\n  return (\n    <div className='flex h-10 items-center gap-2.5'>\n      <PersonAvatar\n        person={member.person}\n        size='sm'\n        presence={member.person.presence}\n      />\n      <span className='min-w-0 flex-1 truncate text-[13px]'>\n        {member.person.name}\n      </span>\n      <span className='text-muted-foreground text-xs'>{member.role}</span>\n    </div>\n  );\n}\n\nfunction ProjectMembers() {\n  const [isExpanded, setIsExpanded] = useState(false);\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const rowVariants = rowVariantsOf(shouldReduceMotion);\n  const firstMembers = MEMBERS.slice(0, SHOWN_MEMBERS);\n  const otherMembers = MEMBERS.slice(SHOWN_MEMBERS);\n  const hiddenCount = otherMembers.length;\n  const canExpand = hiddenCount > 0;\n  const foldLabel = foldLabelOf(isExpanded, hiddenCount);\n\n  function toggle() {\n    setIsExpanded((previous) => !previous);\n  }\n\n  return (\n    <section aria-label='Members' className='flex flex-col gap-1'>\n      <h3 className='flex items-baseline gap-2 text-sm font-medium'>\n        Members\n        <span className='text-muted-foreground text-xs font-normal tabular-nums'>\n          {MEMBERS.length}\n        </span>\n      </h3>\n      <ul className='flex flex-col'>\n        {firstMembers.map((member) => (\n          <li key={member.person.id}>\n            <MemberRow member={member} />\n          </li>\n        ))}\n        <AnimatePresence initial={false}>\n          {isExpanded &&\n            otherMembers.map((member) => (\n              <motion.li\n                key={member.person.id}\n                variants={rowVariants}\n                initial='hidden'\n                animate='shown'\n                exit='hidden'\n              >\n                <MemberRow member={member} />\n              </motion.li>\n            ))}\n        </AnimatePresence>\n      </ul>\n      {canExpand && (\n        <Button\n          variant='ghost'\n          size='sm'\n          aria-expanded={isExpanded}\n          onClick={toggle}\n          className='text-muted-foreground -ml-2.5 self-start'\n        >\n          <ChevronDownIcon\n            className={cn(\n              'transition-transform duration-200 ease-(--ease-out-strong)',\n              isExpanded && 'rotate-180'\n            )}\n          />\n          <AnimatedSize axis='width' as='span'>\n            <Swap swapKey={foldLabel} kind='label'>\n              {foldLabel}\n            </Swap>\n          </AnimatedSize>\n        </Button>\n      )}\n    </section>\n  );\n}\n\nfunction ProjectDetails() {\n  const statusStyle = { '--chip': 'var(--success)' } as React.CSSProperties;\n\n  return (\n    <div className='flex flex-col gap-6 p-5'>\n      <div className='flex flex-col gap-4'>\n        <div className='flex items-start gap-3'>\n          <MeshTile\n            seed='Atlas redesign'\n            color='var(--primary)'\n            className='size-10 rounded-lg'\n          />\n          <div className='flex min-w-0 flex-1 flex-col gap-1'>\n            <AsideTitle>Atlas redesign</AsideTitle>\n            <p className='text-muted-foreground flex items-center gap-1.5 text-xs'>\n              <span className='tabular-nums'>ATL</span>\n              <span aria-hidden='true'>·</span>\n              <span\n                style={statusStyle}\n                className='chip-3d inline-flex h-5 items-center gap-1 rounded-md px-1.5 font-medium'\n              >\n                <CircleCheckIcon className='size-3' strokeWidth={2.25} />\n                On track\n              </span>\n            </p>\n          </div>\n          <AsideCloseButton\n            label='Close project details'\n            className='-mt-1 -mr-2'\n          />\n        </div>\n        <div className='flex gap-2'>\n          <Button render={<a href='#' />} nativeButton={false} size='sm'>\n            Open project\n            <ArrowUpRightIcon />\n          </Button>\n          <Button\n            variant='outline'\n            size='sm'\n            render={<a href='#' />}\n            nativeButton={false}\n          >\n            <PencilIcon />\n            Edit\n          </Button>\n        </div>\n      </div>\n      <div className='flex flex-col gap-0.5'>\n        <PropertyRow icon={UserIcon} label='Lead'>\n          <PersonAvatar person={PEOPLE[1]} size='xs' />\n          {PEOPLE[1].name}\n        </PropertyRow>\n        <PropertyRow icon={CalendarIcon} label='Dates'>\n          <span className='tabular-nums'>Oct 6</span>\n          <ArrowRightIcon className='text-muted-foreground size-3' />\n          <span className='tabular-nums'>Dec 12</span>\n          <span className='text-muted-foreground ml-1 text-xs'>67 days</span>\n        </PropertyRow>\n        <PropertyRow icon={UsersIcon} label='Teams'>\n          <Badge variant='secondary' className='text-muted-foreground'>\n            Product\n          </Badge>\n          <Badge variant='secondary' className='text-muted-foreground'>\n            Platform\n          </Badge>\n        </PropertyRow>\n        <PropertyRow icon={ClockIcon} label='Budget'>\n          <span className='tabular-nums'>320 h</span>\n          <span className='text-muted-foreground text-xs tabular-nums'>\n            106 h left\n          </span>\n        </PropertyRow>\n        <PropertyRow icon={HashIcon} label='Labels'>\n          <Badge variant='secondary' className='text-muted-foreground'>\n            Design system\n          </Badge>\n          <Badge variant='secondary' className='text-muted-foreground'>\n            Q4\n          </Badge>\n        </PropertyRow>\n      </div>\n      <p className='bg-foreground/[0.03] rounded-xl px-3.5 py-3 text-[13px] leading-5'>\n        Move every screen of the web app to the new components, starting with\n        the timesheet and the task board.\n      </p>\n      <StatusBreakdown />\n      <ProjectMembers />\n      <dl className='flex flex-col gap-2.5'>\n        {FACTS.map((fact) => (\n          <div key={fact.label} className='flex items-baseline gap-3 text-xs'>\n            <dt className='text-muted-foreground w-24 shrink-0'>\n              {fact.label}\n            </dt>\n            <dd className='tabular-nums'>{fact.value}</dd>\n          </div>\n        ))}\n      </dl>\n    </div>\n  );\n}\n\nexport default function Aside05() {\n  return (\n    <AsidePreview triggerLabel='Open project details'>\n      <ProjectDetails />\n    </AsidePreview>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/aside/aside-05.tsx"
    },
    {
      "path": "registry/ndeko/components/aside/_parts/aside-frame.tsx",
      "content": "'use client';\n\nimport { createContext, useContext } from 'react';\n\nimport { PanelsTopLeftIcon, XIcon } from '@/registry/ndeko/lib/icons';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport { Button } from '@/registry/ndeko/ui/button';\nimport {\n  Sheet,\n  SheetClose,\n  SheetContent,\n  SheetDescription,\n  SheetTitle,\n  SheetTrigger,\n} from '@/registry/ndeko/ui/sheet';\n\n/** Where an aside's content is drawn: open in the page as a preview, or inside the real sheet. */\nexport type AsideHost = 'preview' | 'sheet';\n\nconst AsideHostContext = createContext<AsideHost>('preview');\n\nexport function useAsideHost() {\n  return useContext(AsideHostContext);\n}\n\nexport type AsideSide = 'left' | 'right';\n\nconst TITLE = 'text-lg leading-tight font-semibold';\n\nconst DESCRIPTION = 'text-muted-foreground text-[13px]';\n\n/** The background of the surface the aside sits on, for parts that must cover what scrolls under them. */\nexport const ASIDE_SURFACE = 'bg-[var(--aside-surface)]';\n\ntype AsideTextProps = { className?: string; children: React.ReactNode };\n\nexport function AsideTitle({ className, children }: AsideTextProps) {\n  const host = useAsideHost();\n  if (host === 'sheet') {\n    return <SheetTitle className={className}>{children}</SheetTitle>;\n  }\n  return <h2 className={cn(TITLE, className)}>{children}</h2>;\n}\n\nexport function AsideDescription({ className, children }: AsideTextProps) {\n  const host = useAsideHost();\n  if (host === 'sheet') {\n    return (\n      <SheetDescription className={className}>{children}</SheetDescription>\n    );\n  }\n  return <p className={cn(DESCRIPTION, className)}>{children}</p>;\n}\n\n/** The close button of the sheet's header. The preview has nothing to close, so it draws nothing. */\nexport function AsideCloseButton({\n  label = 'Close panel',\n  className,\n}: {\n  label?: string;\n  className?: string;\n}) {\n  const host = useAsideHost();\n  if (host === 'preview') {\n    return null;\n  }\n  return (\n    <SheetClose\n      render={\n        <Button\n          variant='ghost'\n          size='icon-sm'\n          aria-label={label}\n          className={cn('text-muted-foreground', className)}\n        />\n      }\n    >\n      <XIcon />\n    </SheetClose>\n  );\n}\n\ntype AsidePreviewProps = {\n  /** The content, drawn twice: open in the page, and inside the sheet the trigger opens. */\n  children: React.ReactNode;\n  triggerLabel: string;\n  side?: AsideSide;\n  className?: string;\n};\n\n/** Shows an aside open and whole on the page, with a small trigger that slides the same content in as a real sheet. */\nexport function AsidePreview({\n  children,\n  triggerLabel,\n  side = 'right',\n  className,\n}: AsidePreviewProps) {\n  return (\n    <div className='flex w-full flex-col items-center gap-4'>\n      <AsideHostContext.Provider value='preview'>\n        <div\n          className={cn(\n            'surface-raised flex w-full max-w-sm flex-col overflow-hidden rounded-2xl text-left [--aside-surface:var(--popover)]',\n            className\n          )}\n        >\n          {children}\n        </div>\n      </AsideHostContext.Provider>\n      <Sheet>\n        <SheetTrigger render={<Button variant='outline' size='sm' />}>\n          <PanelsTopLeftIcon />\n          {triggerLabel}\n        </SheetTrigger>\n        <SheetContent\n          side={side}\n          showCloseButton={false}\n          className={cn('gap-0 p-0 [--aside-surface:var(--card)]', className)}\n        >\n          <AsideHostContext.Provider value='sheet'>\n            {children}\n          </AsideHostContext.Provider>\n        </SheetContent>\n      </Sheet>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/aside/_parts/aside-frame.tsx"
    },
    {
      "path": "registry/ndeko/components/aside/_parts/motion.ts",
      "content": "import type { Transition, Variants } from 'motion/react';\n\nexport const SWAP_TRANSITION: Transition = {\n  duration: 0.15,\n  ease: [0.2, 0, 0, 1],\n};\n\nconst TRAVEL_SPRING: Transition = { type: 'spring', bounce: 0, duration: 0.3 };\n\nconst INSTANT: Transition = { duration: 0 };\n\nconst ENTER: Transition = { duration: 0.2, ease: [0.23, 1, 0.32, 1] };\n\nconst LEAVE: Transition = { duration: 0.14, ease: [0.23, 1, 0.32, 1] };\n\nconst ICON_SWAP: Variants = {\n  enter: { opacity: 0, scale: 0.6, filter: 'blur(2px)' },\n  visible: { opacity: 1, scale: 1, filter: 'blur(0px)' },\n  exit: { opacity: 0, scale: 0.6, filter: 'blur(2px)' },\n};\n\nconst LABEL_SWAP: Variants = {\n  enter: { opacity: 0, filter: 'blur(2px)' },\n  visible: { opacity: 1, filter: 'blur(0px)' },\n  exit: { opacity: 0, filter: 'blur(2px)' },\n};\n\nconst FADE: Variants = {\n  enter: { opacity: 0 },\n  visible: { opacity: 1 },\n  exit: { opacity: 0 },\n};\n\nconst HEIGHT_PRESENCE: Variants = {\n  hidden: { height: 0, opacity: 0, overflow: 'hidden', transition: LEAVE },\n  shown: {\n    height: 'auto',\n    opacity: 1,\n    transition: ENTER,\n    transitionEnd: { overflow: 'visible' },\n  },\n};\n\nconst FADE_PRESENCE: Variants = {\n  hidden: { opacity: 0, transition: LEAVE },\n  shown: { opacity: 1, transition: ENTER },\n};\n\nconst CHIP_PRESENCE: Variants = {\n  hidden: { opacity: 0, scale: 0.9, transition: LEAVE },\n  shown: { opacity: 1, scale: 1, transition: ENTER },\n};\n\nexport type SwapKind = 'icon' | 'label';\n\nexport function swapVariantsOf(\n  shouldReduceMotion: boolean | null,\n  kind: SwapKind = 'icon'\n) {\n  if (shouldReduceMotion) {\n    return FADE;\n  }\n  if (kind === 'label') {\n    return LABEL_SWAP;\n  }\n  return ICON_SWAP;\n}\n\n/** A row that joins or leaves a list: its height opens or collapses, so what follows slides instead of jumping. */\nexport function rowVariantsOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE_PRESENCE;\n  }\n  return HEIGHT_PRESENCE;\n}\n\nexport function chipVariantsOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE_PRESENCE;\n  }\n  return CHIP_PRESENCE;\n}\n\nexport function travelOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return INSTANT;\n  }\n  return TRAVEL_SPRING;\n}\n",
      "type": "registry:component",
      "target": "components/aside/_parts/motion.ts"
    },
    {
      "path": "registry/ndeko/components/aside/_parts/people.ts",
      "content": "export type Presence = 'tracking' | 'online' | 'away' | 'offline';\n\nexport type Person = {\n  id: string;\n  name: string;\n  email: string;\n  title: string;\n  presence: Presence;\n};\n\nexport const PEOPLE: Person[] = [\n  {\n    id: 'amara',\n    name: 'Amara Okafor',\n    email: 'amara@lattice.example',\n    title: 'Product designer',\n    presence: 'tracking',\n  },\n  {\n    id: 'lucas',\n    name: 'Lucas Moreau',\n    email: 'lucas@lattice.example',\n    title: 'Engineering lead',\n    presence: 'online',\n  },\n  {\n    id: 'priya',\n    name: 'Priya Raman',\n    email: 'priya@lattice.example',\n    title: 'Frontend engineer',\n    presence: 'online',\n  },\n  {\n    id: 'mateo',\n    name: 'Mateo Silva',\n    email: 'mateo@lattice.example',\n    title: 'Backend engineer',\n    presence: 'away',\n  },\n  {\n    id: 'hana',\n    name: 'Hana Kobayashi',\n    email: 'hana@lattice.example',\n    title: 'Product manager',\n    presence: 'tracking',\n  },\n  {\n    id: 'jonas',\n    name: 'Jonas Weber',\n    email: 'jonas@lattice.example',\n    title: 'QA engineer',\n    presence: 'offline',\n  },\n  {\n    id: 'zola',\n    name: 'Zola Mbeki',\n    email: 'zola@lattice.example',\n    title: 'Content designer',\n    presence: 'online',\n  },\n];\n\nfunction isKnownPerson(person: Person | undefined): person is Person {\n  return person !== undefined;\n}\n\nexport function peopleByIds(ids: string[]) {\n  const found = ids.map((id) => PEOPLE.find((person) => person.id === id));\n  return found.filter(isKnownPerson);\n}\n\nexport function firstNameOf(person: Person) {\n  const [firstName] = person.name.split(' ');\n  return firstName;\n}\n",
      "type": "registry:component",
      "target": "components/aside/_parts/people.ts"
    },
    {
      "path": "registry/ndeko/components/aside/_parts/person-avatar.tsx",
      "content": "import {\n  CheckIcon,\n  ClockIcon,\n  MinusIcon,\n  MoonIcon,\n  type Icon,\n} from '@/registry/ndeko/lib/icons';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport { Avatar } from '@/registry/ndeko/ui/avatar';\n\nimport type { Person, Presence } from './people';\n\ntype PresenceMeta = { label: string; color: string; icon: Icon };\n\nexport const PRESENCE_META: Record<Presence, PresenceMeta> = {\n  tracking: {\n    label: 'Tracking time',\n    color: 'var(--primary)',\n    icon: ClockIcon,\n  },\n  online: { label: 'Online', color: 'var(--success)', icon: CheckIcon },\n  away: { label: 'Away', color: 'var(--warning)', icon: MoonIcon },\n  offline: {\n    label: 'Offline',\n    color: 'var(--muted-foreground)',\n    icon: MinusIcon,\n  },\n};\n\ntype AvatarSize = 'xs' | 'sm' | 'md' | 'lg';\n\nconst AVATAR_SIZE: Record<AvatarSize, string> = {\n  xs: 'size-5',\n  sm: 'size-6',\n  md: 'size-8',\n  lg: 'size-12',\n};\n\nconst BADGE_SIZE: Record<AvatarSize, string> = {\n  xs: 'size-2.5 [&_svg]:size-1.5',\n  sm: 'size-3 [&_svg]:size-2',\n  md: 'size-3.5 [&_svg]:size-2',\n  lg: 'size-4.5 [&_svg]:size-3',\n};\n\ntype PersonAvatarProps = {\n  person: Pick<Person, 'name'>;\n  size?: AvatarSize;\n  /** Drawn as a small glyph on the avatar, never as a plain dot; its label is read by screen readers. */\n  presence?: Presence;\n  className?: string;\n};\n\nexport function PersonAvatar({\n  person,\n  size = 'md',\n  presence,\n  className,\n}: PersonAvatarProps) {\n  return (\n    <span className={cn('relative inline-flex shrink-0', className)}>\n      <Avatar className={AVATAR_SIZE[size]} seed={person.name} />\n      {presence && <PresenceGlyph presence={presence} size={size} />}\n    </span>\n  );\n}\n\nfunction PresenceGlyph({\n  presence,\n  size,\n}: {\n  presence: Presence;\n  size: AvatarSize;\n}) {\n  const meta = PRESENCE_META[presence];\n  const Glyph = meta.icon;\n  const badgeStyle = { '--chip': meta.color } as React.CSSProperties;\n\n  return (\n    <>\n      <span className='absolute -right-0.5 -bottom-0.5 flex rounded-full bg-[var(--aside-surface,var(--popover))] p-px'>\n        <span\n          style={badgeStyle}\n          className={cn(\n            'chip-3d flex items-center justify-center rounded-full',\n            BADGE_SIZE[size]\n          )}\n        >\n          <Glyph strokeWidth={2.75} />\n        </span>\n      </span>\n      <span className='sr-only'>{meta.label}</span>\n    </>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/aside/_parts/person-avatar.tsx"
    },
    {
      "path": "registry/ndeko/components/aside/_parts/swap.tsx",
      "content": "'use client';\n\nimport { AnimatePresence, motion } from 'motion/react';\n\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport { cn } from '@/registry/ndeko/lib/utils';\n\nimport { SWAP_TRANSITION, swapVariantsOf, type SwapKind } from './motion';\n\ntype SwapProps = {\n  /** Changes when the content becomes another one: the old leaves while the new arrives in its place. */\n  swapKey: string;\n  kind?: SwapKind;\n  className?: string;\n  children: React.ReactNode;\n};\n\nexport function Swap({\n  swapKey,\n  kind = 'icon',\n  className,\n  children,\n}: SwapProps) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const variants = swapVariantsOf(shouldReduceMotion, kind);\n\n  return (\n    <span className={cn('relative inline-flex items-center', className)}>\n      <AnimatePresence mode='popLayout' initial={false}>\n        <motion.span\n          key={swapKey}\n          className='inline-flex items-center gap-[inherit] whitespace-nowrap'\n          variants={variants}\n          initial='enter'\n          animate='visible'\n          exit='exit'\n          transition={SWAP_TRANSITION}\n        >\n          {children}\n        </motion.span>\n      </AnimatePresence>\n    </span>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/aside/_parts/swap.tsx"
    },
    {
      "path": "registry/ndeko/components/aside/_parts/task-meta.tsx",
      "content": "import {\n  BookmarkIcon,\n  CheckIcon,\n  ChevronDownIcon,\n  ChevronUpIcon,\n  CircleAlertIcon,\n  CircleCheckIcon,\n  CircleDashedIcon,\n  CircleIcon,\n  EclipseIcon,\n  EyeIcon,\n  MinusIcon,\n  TriangleAlertIcon,\n  ZapIcon,\n  type Icon,\n} from '@/registry/ndeko/lib/icons';\nimport { cn } from '@/registry/ndeko/lib/utils';\n\nexport type Meta = { label: string; color: string; icon: Icon };\n\nexport type StatusId =\n  'backlog' | 'todo' | 'in-progress' | 'in-review' | 'done';\n\nexport type PriorityId = 'urgent' | 'high' | 'medium' | 'low';\n\nexport type IssueType = 'task' | 'bug' | 'story' | 'epic';\n\nexport const STATUS_ORDER: StatusId[] = [\n  'backlog',\n  'todo',\n  'in-progress',\n  'in-review',\n  'done',\n];\n\nexport const STATUS_META: Record<StatusId, Meta> = {\n  backlog: {\n    label: 'Backlog',\n    color: 'var(--muted-foreground)',\n    icon: CircleDashedIcon,\n  },\n  todo: { label: 'Todo', color: 'var(--info)', icon: CircleIcon },\n  'in-progress': {\n    label: 'In progress',\n    color: 'var(--warning)',\n    icon: EclipseIcon,\n  },\n  'in-review': { label: 'In review', color: 'var(--primary)', icon: EyeIcon },\n  done: { label: 'Done', color: 'var(--success)', icon: CircleCheckIcon },\n};\n\nexport const PRIORITY_ORDER: PriorityId[] = ['urgent', 'high', 'medium', 'low'];\n\nexport const PRIORITY_META: Record<PriorityId, Meta> = {\n  urgent: {\n    label: 'Urgent',\n    color: 'var(--destructive)',\n    icon: TriangleAlertIcon,\n  },\n  high: { label: 'High', color: 'var(--warning)', icon: ChevronUpIcon },\n  medium: { label: 'Medium', color: 'var(--info)', icon: MinusIcon },\n  low: {\n    label: 'Low',\n    color: 'var(--muted-foreground)',\n    icon: ChevronDownIcon,\n  },\n};\n\nexport const ISSUE_TYPE_META: Record<IssueType, Meta> = {\n  task: { label: 'Task', color: 'var(--info)', icon: CheckIcon },\n  bug: { label: 'Bug', color: 'var(--destructive)', icon: CircleAlertIcon },\n  story: { label: 'Story', color: 'var(--success)', icon: BookmarkIcon },\n  epic: { label: 'Epic', color: 'var(--primary)', icon: ZapIcon },\n};\n\nexport function isStatusId(value: unknown): value is StatusId {\n  return STATUS_ORDER.some((status) => status === value);\n}\n\nexport function IssueTypeGem({\n  type,\n  className,\n}: {\n  type: IssueType;\n  className?: string;\n}) {\n  const meta = ISSUE_TYPE_META[type];\n  const TypeGlyph = meta.icon;\n  const gemStyle = { '--gem': meta.color } as React.CSSProperties;\n\n  return (\n    <span\n      style={gemStyle}\n      className={cn(\n        'gem-plate inline-flex size-4 shrink-0 items-center justify-center rounded-[4px]',\n        className\n      )}\n    >\n      <TypeGlyph className='size-2.5' strokeWidth={2.75} />\n      <span className='sr-only'>{meta.label}</span>\n    </span>\n  );\n}\n\nexport function MetaGlyph({\n  meta,\n  className,\n}: {\n  meta: Meta;\n  className?: string;\n}) {\n  const Glyph = meta.icon;\n  const glyphStyle = { color: meta.color } as React.CSSProperties;\n\n  return (\n    <Glyph\n      style={glyphStyle}\n      strokeWidth={2.25}\n      className={cn('size-3.5 shrink-0', className)}\n    />\n  );\n}\n",
      "type": "registry:component",
      "target": "components/aside/_parts/task-meta.tsx"
    }
  ],
  "categories": [
    "components",
    "aside"
  ],
  "type": "registry:component"
}