{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "team-04",
  "title": "Team overview",
  "description": "A team page with its figures for this week or last, the members with their current task and hours, and the activity of the person picked.",
  "dependencies": [
    "motion"
  ],
  "registryDependencies": [
    "https://ui.ndekocode.dev/r/animated-size.json",
    "https://ui.ndekocode.dev/r/avatar.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/theme.json",
    "https://ui.ndekocode.dev/r/toggle-group.json",
    "https://ui.ndekocode.dev/r/use-prefers-reduced-motion.json",
    "https://ui.ndekocode.dev/r/utils.json"
  ],
  "files": [
    {
      "path": "registry/ndeko/blocks/team/team-04/index.tsx",
      "content": "'use client';\n\nimport {\n  AnimatePresence,\n  motion,\n  type Transition,\n  type Variants,\n} from 'motion/react';\nimport { useId, useState } from 'react';\n\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport {\n  ChevronRightIcon,\n  SettingsIcon,\n  UserRoundPlusIcon,\n  XIcon,\n} from '@/registry/ndeko/lib/icons';\nimport { AnimatedSize } from '@/registry/ndeko/ui/animated-size';\nimport { Avatar } from '@/registry/ndeko/ui/avatar';\nimport { Button } from '@/registry/ndeko/ui/button';\nimport { ToggleGroup, ToggleGroupItem } from '@/registry/ndeko/ui/toggle-group';\n\nimport { ActivityFeed } from './activity-feed';\nimport {\n  ACTIVITY,\n  FIGURES,\n  MEMBERS,\n  PERIOD_LABELS,\n  TEAM,\n  WORKSPACE_NAME,\n  type Period,\n} from './data';\nimport { MemberList } from './member-list';\nimport { formatMinutes, SlidingFigure, TeamTile } from './parts';\n\nconst PERIODS: Period[] = ['this', 'last'];\n\nconst THUMB =\n  'bg-card shadow-[0_1px_2px_rgb(0_0_0/0.08)] hairline-ring ring-foreground/10 dark:bg-foreground/[0.09] dark:ring-foreground/15';\n\nconst SURFACE =\n  'bg-card hairline-ring ring-border rounded-xl shadow-[0_1px_2px_rgb(0_0_0/0.04)]';\n\nconst ARRIVE: Transition = { duration: 0.18, ease: [0.23, 1, 0.32, 1] };\nconst LEAVE: Transition = { duration: 0.12, ease: [0.23, 1, 0.32, 1] };\n\nconst BLUR_VARIANTS: Variants = {\n  enter: { opacity: 0, filter: 'blur(2px)' },\n  visible: { opacity: 1, filter: 'blur(0px)', transition: ARRIVE },\n  exit: { opacity: 0, filter: 'blur(2px)', transition: LEAVE },\n};\n\nconst FADE_VARIANTS: Variants = {\n  enter: { opacity: 0 },\n  visible: { opacity: 1, transition: ARRIVE },\n  exit: { opacity: 0, transition: LEAVE },\n};\n\nfunction blurOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE_VARIANTS;\n  }\n  return BLUR_VARIANTS;\n}\n\nfunction isPeriod(value: unknown): value is Period {\n  return PERIODS.some((period) => period === value);\n}\n\nfunction countOf(value: number) {\n  return String(value);\n}\n\nfunction trackingLabelOf(count: number) {\n  return `${count} of ${MEMBERS.length}`;\n}\n\nfunction activityTitleOf(memberName: string | null) {\n  if (memberName === null) {\n    return 'Recent activity';\n  }\n  return `Activity of ${memberName}`;\n}\n\nfunction memberNameOf(memberId: string | null) {\n  const member = MEMBERS.find((candidate) => candidate.id === memberId);\n  if (member) {\n    return member.name;\n  }\n  return null;\n}\n\ntype FigureProps = {\n  label: string;\n  value: number;\n  format: (value: number) => string;\n};\n\nfunction Figure({ label, value, format }: FigureProps) {\n  return (\n    <div className='flex min-w-0 flex-col gap-0.5'>\n      <dt className='text-muted-foreground text-xs'>{label}</dt>\n      <dd className='text-lg font-semibold'>\n        <SlidingFigure value={value} format={format} />\n      </dd>\n    </div>\n  );\n}\n\nfunction TeamHead() {\n  const faces = MEMBERS.slice(0, 4);\n  const restCount = MEMBERS.length - faces.length;\n\n  return (\n    <div className='flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between'>\n      <div className='flex min-w-0 items-start gap-3'>\n        <TeamTile name={TEAM.name} color={TEAM.color} />\n        <div className='min-w-0'>\n          <h1 className='text-lg font-semibold'>{TEAM.name}</h1>\n          <p className='text-muted-foreground text-[13px] text-balance'>\n            {TEAM.description}\n          </p>\n        </div>\n      </div>\n      <div className='flex shrink-0 items-center gap-3'>\n        <span className='flex items-center ps-1.5'>\n          {faces.map((member) => (\n            <Avatar\n              key={member.id}\n              className='ring-background -ms-1.5 size-7 ring-2'\n              seed={member.name}\n            />\n          ))}\n          <span className='bg-muted text-muted-foreground ring-background -ms-1.5 inline-flex h-7 min-w-7 items-center justify-center rounded-full px-1 text-[10px] font-medium tabular-nums ring-2'>\n            +{restCount}\n          </span>\n        </span>\n        <Button variant='outline' size='sm'>\n          <UserRoundPlusIcon />\n          Invite\n        </Button>\n        <Button\n          variant='ghost'\n          size='icon-sm'\n          aria-label='Team settings'\n          className='text-muted-foreground'\n        >\n          <SettingsIcon />\n        </Button>\n      </div>\n    </div>\n  );\n}\n\nexport default function Team04() {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const membersTitleId = useId();\n  const [period, setPeriod] = useState<Period>('this');\n  const [selectedId, setSelectedId] = useState<string | null>(null);\n  const figures = FIGURES[period];\n  const trackingCount = MEMBERS.filter(\n    (member) => member.presence === 'tracking'\n  ).length;\n  const selectedName = memberNameOf(selectedId);\n  const hasSelection = selectedName !== null;\n  const activityTitle = activityTitleOf(selectedName);\n  const activity = ACTIVITY.filter((item) => {\n    if (selectedId === null) {\n      return true;\n    }\n    return item.memberId === selectedId;\n  });\n  const pressedPeriods = [period];\n\n  function changePeriod(values: unknown[]) {\n    const [value] = values;\n    if (isPeriod(value)) {\n      setPeriod(value);\n    }\n  }\n\n  function toggleMember(memberId: string) {\n    setSelectedId((current) => {\n      if (current === memberId) {\n        return null;\n      }\n      return memberId;\n    });\n  }\n\n  function showEveryone() {\n    setSelectedId(null);\n  }\n\n  return (\n    <div className='bg-background text-foreground flex min-h-svh w-full flex-col'>\n      <header className='hairline-b border-border flex h-11 shrink-0 items-center gap-3 px-3 sm:px-5'>\n        <nav\n          aria-label='Breadcrumb'\n          className='flex min-w-0 items-center gap-1.5 text-[13px]'\n        >\n          <span className='text-muted-foreground'>{WORKSPACE_NAME}</span>\n          <ChevronRightIcon className='text-muted-foreground size-3.5' />\n          <span className='text-muted-foreground'>Teams</span>\n          <ChevronRightIcon className='text-muted-foreground size-3.5' />\n          <span className='truncate font-medium'>{TEAM.name}</span>\n        </nav>\n      </header>\n      <main className='mx-auto flex w-full max-w-6xl flex-col gap-6 px-4 py-6 md:px-6'>\n        <TeamHead />\n        <section aria-label='Figures' className='flex flex-col gap-3'>\n          <ToggleGroup\n            aria-label='Period'\n            value={pressedPeriods}\n            onValueChange={changePeriod}\n            travel\n            size='sm'\n            indicatorClassName={THUMB}\n            className='bg-foreground/[0.05] rounded-lg p-0.5'\n          >\n            {PERIODS.map((value) => (\n              <ToggleGroupItem\n                key={value}\n                value={value}\n                className='h-6 rounded-md px-2.5 text-xs'\n              >\n                {PERIOD_LABELS[value]}\n              </ToggleGroupItem>\n            ))}\n          </ToggleGroup>\n          <dl className='grid grid-cols-2 gap-x-6 gap-y-4 sm:grid-cols-4'>\n            <Figure\n              label='Open tasks'\n              value={figures.openTasks}\n              format={countOf}\n            />\n            <Figure label='Done' value={figures.doneTasks} format={countOf} />\n            <Figure\n              label='Tracked'\n              value={figures.trackedMinutes}\n              format={formatMinutes}\n            />\n            <Figure\n              label='Tracking now'\n              value={trackingCount}\n              format={trackingLabelOf}\n            />\n          </dl>\n        </section>\n        <div className='grid gap-6 lg:grid-cols-[minmax(0,1.5fr)_minmax(0,1fr)]'>\n          <section aria-labelledby={membersTitleId} className={SURFACE}>\n            <div className='flex items-baseline justify-between gap-3 px-4 pt-4 pb-2'>\n              <h2 id={membersTitleId} className='text-sm font-medium'>\n                Members\n              </h2>\n              <p className='text-muted-foreground text-xs'>\n                Pick someone to see their activity\n              </p>\n            </div>\n            <div className='px-1.5 pb-1.5'>\n              <MemberList\n                members={MEMBERS}\n                period={period}\n                selectedId={selectedId}\n                onToggle={toggleMember}\n              />\n            </div>\n          </section>\n          <section aria-label='Activity' className={SURFACE}>\n            <div className='flex min-h-12 items-center justify-between gap-3 px-4 pt-2'>\n              <h2 className='text-sm font-medium'>\n                <AnimatedSize as='span' axis='width'>\n                  <AnimatePresence mode='popLayout' initial={false}>\n                    <motion.span\n                      key={activityTitle}\n                      variants={blurOf(shouldReduceMotion)}\n                      initial='enter'\n                      animate='visible'\n                      exit='exit'\n                      className='block whitespace-nowrap'\n                    >\n                      {activityTitle}\n                    </motion.span>\n                  </AnimatePresence>\n                </AnimatedSize>\n              </h2>\n              <AnimatePresence initial={false}>\n                {hasSelection && (\n                  <motion.span\n                    key='clear'\n                    variants={blurOf(shouldReduceMotion)}\n                    initial='enter'\n                    animate='visible'\n                    exit='exit'\n                  >\n                    <Button\n                      variant='ghost'\n                      size='sm'\n                      onClick={showEveryone}\n                      className='text-muted-foreground'\n                    >\n                      <XIcon />\n                      Show everyone\n                    </Button>\n                  </motion.span>\n                )}\n              </AnimatePresence>\n            </div>\n            <div className='px-4 pt-2 pb-2'>\n              <ActivityFeed activity={activity} />\n            </div>\n          </section>\n        </div>\n      </main>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/team-04/index.tsx"
    },
    {
      "path": "registry/ndeko/blocks/team/team-04/member-list.tsx",
      "content": "'use client';\n\nimport { motion, type Transition } from 'motion/react';\nimport { useId } from 'react';\n\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\n\nimport type { Member, Period } from './data';\nimport {\n  formatMinutes,\n  IssueTypeGem,\n  PresenceAvatar,\n  ROLE_LABELS,\n  SlidingFigure,\n} from './parts';\n\nconst WEEK_TARGET_MINUTES = 2400;\n\nconst TRAVEL: Transition = { type: 'spring', bounce: 0, duration: 0.3 };\n\nconst INSTANT: Transition = { duration: 0 };\n\nfunction travelOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return INSTANT;\n  }\n  return TRAVEL;\n}\n\nfunction shareOf(minutes: number) {\n  const share = minutes / WEEK_TARGET_MINUTES;\n  return Math.min(1, share);\n}\n\nfunction MemberTaskCell({ member }: { member: Member }) {\n  const task = member.task;\n  if (!task) {\n    return (\n      <span className='text-muted-foreground text-xs'>No task in progress</span>\n    );\n  }\n  return (\n    <span className='flex min-w-0 items-center gap-1.5'>\n      <IssueTypeGem type={task.type} />\n      <span className='text-muted-foreground shrink-0 text-xs tabular-nums'>\n        {task.key}\n      </span>\n      <span className='truncate text-[13px]'>{task.title}</span>\n    </span>\n  );\n}\n\ntype MemberRowProps = {\n  member: Member;\n  period: Period;\n  isSelected: boolean;\n  indicatorId: string;\n  onToggle: (memberId: string) => void;\n};\n\nfunction MemberRow({\n  member,\n  period,\n  isSelected,\n  indicatorId,\n  onToggle,\n}: MemberRowProps) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const minutes = member.minutes[period];\n  const share = shareOf(minutes);\n  const barStyle = { transform: `scaleX(${share})` };\n\n  return (\n    <li className='relative'>\n      {isSelected && (\n        <motion.span\n          layoutId={indicatorId}\n          aria-hidden='true'\n          transition={travelOf(shouldReduceMotion)}\n          className='bg-foreground/[0.05] absolute inset-0 rounded-lg'\n        />\n      )}\n      <button\n        type='button'\n        aria-pressed={isSelected}\n        onClick={() => onToggle(member.id)}\n        className='hover:bg-foreground/[0.03] focus-visible:ring-ring/25 relative grid w-full cursor-pointer grid-cols-[minmax(0,1fr)_5.5rem] items-center gap-x-4 gap-y-1 rounded-lg px-3 py-2.5 text-left outline-none focus-visible:ring-[3px] md:grid-cols-[minmax(0,13rem)_minmax(0,1fr)_7rem]'\n      >\n        <span className='flex min-w-0 items-center gap-3'>\n          <PresenceAvatar member={member} />\n          <span className='min-w-0'>\n            <span className='block truncate text-[13px] leading-5 font-medium'>\n              {member.name}\n            </span>\n            <span className='text-muted-foreground block truncate text-xs'>\n              {ROLE_LABELS[member.role]} · {member.title}\n            </span>\n          </span>\n        </span>\n        <span className='col-span-2 row-start-2 min-w-0 ps-11 md:col-span-1 md:row-start-1 md:ps-0'>\n          <MemberTaskCell member={member} />\n        </span>\n        <span className='flex flex-col items-end gap-1.5'>\n          <SlidingFigure\n            value={minutes}\n            format={formatMinutes}\n            className='text-[13px] font-medium'\n          />\n          <span\n            aria-hidden='true'\n            className='bg-foreground/[0.06] block h-1 w-full overflow-hidden rounded-full'\n          >\n            <span\n              style={barStyle}\n              className='bg-primary block h-full origin-left rounded-full transition-transform duration-300 ease-(--ease-out-strong)'\n            />\n          </span>\n        </span>\n      </button>\n    </li>\n  );\n}\n\ntype MemberListProps = {\n  members: Member[];\n  period: Period;\n  selectedId: string | null;\n  onToggle: (memberId: string) => void;\n};\n\nexport function MemberList({\n  members,\n  period,\n  selectedId,\n  onToggle,\n}: MemberListProps) {\n  const indicatorId = useId();\n\n  return (\n    <ul aria-label='Members' className='flex flex-col'>\n      {members.map((member) => (\n        <MemberRow\n          key={member.id}\n          member={member}\n          period={period}\n          isSelected={member.id === selectedId}\n          indicatorId={indicatorId}\n          onToggle={onToggle}\n        />\n      ))}\n    </ul>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/team-04/member-list.tsx"
    },
    {
      "path": "registry/ndeko/blocks/team/team-04/activity-feed.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 { ChevronDownIcon } from '@/registry/ndeko/lib/icons';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport { Button } from '@/registry/ndeko/ui/button';\n\nimport { MEMBERS, type Activity, type ActivityKind, type Member } from './data';\nimport { IssueTypeGem, MemberAvatar, rowCollapseOf } from './parts';\n\nconst COLLAPSED_LIMIT = 4;\n\nconst VERBS: Record<ActivityKind, string> = {\n  closed: 'closed',\n  commented: 'commented on',\n  moved: 'moved',\n  created: 'created',\n};\n\nfunction memberOf(memberId: string): Member {\n  const found = MEMBERS.find((member) => member.id === memberId);\n  if (found) {\n    return found;\n  }\n  return MEMBERS[0];\n}\n\nfunction moreLabelOf(hiddenCount: number, isExpanded: boolean) {\n  if (isExpanded) {\n    return 'Show less';\n  }\n  if (hiddenCount === 1) {\n    return 'Show 1 more';\n  }\n  return `Show ${hiddenCount} more`;\n}\n\nfunction visibleActivityOf(activity: Activity[], isExpanded: boolean) {\n  if (isExpanded) {\n    return activity;\n  }\n  return activity.slice(0, COLLAPSED_LIMIT);\n}\n\nfunction isQuote(activity: Activity) {\n  const hasDetail = activity.detail !== undefined;\n  const isComment = activity.kind === 'commented';\n  return hasDetail && isComment;\n}\n\nfunction suffixOf(activity: Activity) {\n  const hasDetail = activity.detail !== undefined;\n  const isMove = activity.kind === 'moved';\n  if (hasDetail && isMove) {\n    return ` ${activity.detail}`;\n  }\n  return '';\n}\n\nfunction ActivityRow({ activity }: { activity: Activity }) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const member = memberOf(activity.memberId);\n\n  return (\n    <motion.li\n      variants={rowCollapseOf(shouldReduceMotion)}\n      initial='hidden'\n      animate='shown'\n      exit='hidden'\n      className='overflow-hidden'\n    >\n      <div className='flex items-start gap-3 pb-4'>\n        <MemberAvatar member={member} />\n        <div className='flex min-w-0 flex-1 flex-col gap-1.5'>\n          <p className='text-muted-foreground text-[13px] leading-5'>\n            <span className='text-foreground font-medium'>{member.name}</span>{' '}\n            {VERBS[activity.kind]}{' '}\n            <span className='text-foreground inline-flex items-baseline gap-1'>\n              <span className='self-center'>\n                <IssueTypeGem type={activity.task.type} />\n              </span>\n              <span className='tabular-nums'>{activity.task.key}</span>\n            </span>{' '}\n            {activity.task.title}\n            {suffixOf(activity)}\n          </p>\n          {isQuote(activity) && (\n            <p className='bg-foreground/[0.025] hairline-ring ring-border rounded-lg px-3 py-2 text-[13px] leading-5'>\n              {activity.detail}\n            </p>\n          )}\n        </div>\n        <span className='text-muted-foreground shrink-0 text-xs tabular-nums'>\n          {activity.age}\n        </span>\n      </div>\n    </motion.li>\n  );\n}\n\ntype ActivityFeedProps = {\n  activity: Activity[];\n};\n\nexport function ActivityFeed({ activity }: ActivityFeedProps) {\n  const [isExpanded, setIsExpanded] = useState(false);\n  const visible = visibleActivityOf(activity, isExpanded);\n  const hiddenCount = activity.length - visible.length;\n  const hasMore = activity.length > COLLAPSED_LIMIT;\n\n  function toggleExpanded() {\n    setIsExpanded((current) => !current);\n  }\n\n  return (\n    <div className='flex flex-col'>\n      <ul aria-label='Activity' className='flex flex-col'>\n        <AnimatePresence initial={false}>\n          {visible.map((item) => (\n            <ActivityRow key={item.id} activity={item} />\n          ))}\n        </AnimatePresence>\n      </ul>\n      {hasMore && (\n        <div>\n          <Button\n            variant='ghost'\n            size='sm'\n            aria-expanded={isExpanded}\n            onClick={toggleExpanded}\n            className='text-muted-foreground -ms-2'\n          >\n            <ChevronDownIcon\n              className={cn(\n                'transition-transform duration-200 ease-(--ease-out-strong)',\n                isExpanded && 'rotate-180'\n              )}\n            />\n            {moreLabelOf(hiddenCount, isExpanded)}\n          </Button>\n        </div>\n      )}\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/team-04/activity-feed.tsx"
    },
    {
      "path": "registry/ndeko/blocks/team/team-04/parts.tsx",
      "content": "'use client';\n\nimport {\n  AnimatePresence,\n  motion,\n  type Transition,\n  type Variants,\n} from 'motion/react';\nimport { useState } from 'react';\n\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport {\n  BookmarkIcon,\n  CheckIcon,\n  CircleAlertIcon,\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';\nimport { MeshTile } from '@/registry/ndeko/ui/mesh-tile';\n\nimport type { IssueType, Member, Presence, Role } from './data';\n\ntype Meta = { label: string; color: string; glyph: Icon };\n\nexport const PRESENCE_META: Record<Presence, Meta> = {\n  tracking: {\n    label: 'Tracking time',\n    color: 'var(--primary)',\n    glyph: ClockIcon,\n  },\n  online: { label: 'Online', color: 'var(--success)', glyph: CheckIcon },\n  away: { label: 'Away', color: 'var(--warning)', glyph: MoonIcon },\n  offline: {\n    label: 'Offline',\n    color: 'var(--muted-foreground)',\n    glyph: MinusIcon,\n  },\n};\n\nconst ISSUE_TYPES: Record<IssueType, Meta> = {\n  task: { label: 'Task', color: 'var(--info)', glyph: CheckIcon },\n  bug: { label: 'Bug', color: 'var(--destructive)', glyph: CircleAlertIcon },\n  story: { label: 'Story', color: 'var(--success)', glyph: BookmarkIcon },\n};\n\nexport const ROLE_LABELS: Record<Role, string> = {\n  manager: 'Manager',\n  member: 'Member',\n  viewer: 'Viewer',\n};\n\nexport function formatMinutes(minutes: number) {\n  const hours = Math.floor(minutes / 60);\n  const rest = minutes % 60;\n  const restText = String(rest);\n  const paddedRest = restText.padStart(2, '0');\n  return `${hours}h ${paddedRest}m`;\n}\n\nexport function TeamTile({\n  name,\n  color,\n  className,\n}: {\n  name: string;\n  color: string;\n  className?: string;\n}) {\n  return (\n    <MeshTile\n      seed={name}\n      color={color}\n      className={cn('size-10 rounded-xl', className)}\n    />\n  );\n}\n\nexport function IssueTypeGem({ type }: { type: IssueType }) {\n  const meta = ISSUE_TYPES[type];\n  const Glyph = meta.glyph;\n  const gemStyle = { '--gem': meta.color } as React.CSSProperties;\n\n  return (\n    <span\n      role='img'\n      aria-label={meta.label}\n      style={gemStyle}\n      className='gem-plate inline-flex size-4 shrink-0 items-center justify-center rounded-[5px]'\n    >\n      <Glyph strokeWidth={2.5} className='size-2.5' />\n    </span>\n  );\n}\n\nexport function MemberAvatar({\n  member,\n  className,\n}: {\n  member: Member;\n  className?: string;\n}) {\n  return (\n    <Avatar\n      className={cn('size-7 text-[10px]', className)}\n      seed={member.name}\n    />\n  );\n}\n\n/** A face with the person's presence as a small glyph on its corner, read out after the name. */\nexport function PresenceAvatar({ member }: { member: Member }) {\n  const presence = PRESENCE_META[member.presence];\n  const Glyph = presence.glyph;\n  const badgeStyle = { '--chip': presence.color } as React.CSSProperties;\n\n  return (\n    <span className='relative inline-flex shrink-0'>\n      <MemberAvatar member={member} className='size-8 text-[11px]' />\n      <span\n        aria-hidden='true'\n        className='bg-card absolute -end-0.5 -bottom-0.5 flex rounded-full p-px'\n      >\n        <span\n          style={badgeStyle}\n          className='chip-3d flex size-3.5 items-center justify-center rounded-full'\n        >\n          <Glyph className='size-2' strokeWidth={2.75} />\n        </span>\n      </span>\n      <span className='sr-only'>{presence.label}</span>\n    </span>\n  );\n}\n\nconst EASE_OUT_STRONG: [number, number, number, number] = [0.23, 1, 0.32, 1];\n\n/** The spring AnimatedSize resizes with, so rows close at the pace their list follows. */\nconst SIZE_SPRING: Transition = { type: 'spring', bounce: 0, duration: 0.32 };\n\nconst ROW_VARIANTS: Variants = {\n  shown: {\n    height: 'auto',\n    opacity: 1,\n    transition: {\n      ...SIZE_SPRING,\n      opacity: { duration: 0.2, ease: EASE_OUT_STRONG },\n    },\n  },\n  hidden: {\n    height: 0,\n    opacity: 0,\n    transition: {\n      ...SIZE_SPRING,\n      opacity: { duration: 0.12, ease: EASE_OUT_STRONG },\n    },\n  },\n};\n\nconst FADE_VARIANTS: Variants = {\n  shown: { opacity: 1, transition: { duration: 0.2, ease: EASE_OUT_STRONG } },\n  hidden: { opacity: 0, transition: { duration: 0.12, ease: EASE_OUT_STRONG } },\n};\n\nexport function rowCollapseOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE_VARIANTS;\n  }\n  return ROW_VARIANTS;\n}\n\nconst SHIFT_PX = 8;\n\nconst SLIDE_TRANSITION: Transition = { duration: 0.18, ease: [0.2, 0, 0, 1] };\n\nconst SLIDE_VARIANTS: Variants = {\n  enter: (direction: number) => {\n    const offset = direction * SHIFT_PX;\n    return { opacity: 0, y: offset };\n  },\n  visible: { opacity: 1, y: 0 },\n  exit: (direction: number) => {\n    const offset = direction * SHIFT_PX;\n    return { opacity: 0, y: -offset };\n  },\n};\n\nconst SLIDE_FADE: Variants = {\n  enter: { opacity: 0 },\n  visible: { opacity: 1 },\n  exit: { opacity: 0 },\n};\n\nfunction slideVariantsOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return SLIDE_FADE;\n  }\n  return SLIDE_VARIANTS;\n}\n\nfunction directionOf(previous: number, next: number) {\n  if (next > previous) {\n    return 1;\n  }\n  return -1;\n}\n\ntype Shown = { value: number; direction: number };\n\n/** A figure that changed under the person's choice: it slides in the direction of the change. */\nexport function SlidingFigure({\n  value,\n  format,\n  className,\n}: {\n  value: number;\n  format: (value: number) => string;\n  className?: string;\n}) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const [shown, setShown] = useState<Shown>({ value, direction: 1 });\n  const text = format(value);\n\n  if (shown.value !== value) {\n    const direction = directionOf(shown.value, value);\n    setShown({ value, direction });\n  }\n\n  return (\n    <span\n      className={cn(\n        'relative inline-flex overflow-hidden tabular-nums',\n        className\n      )}\n    >\n      <AnimatePresence\n        mode='popLayout'\n        initial={false}\n        custom={shown.direction}\n      >\n        <motion.span\n          key={text}\n          custom={shown.direction}\n          variants={slideVariantsOf(shouldReduceMotion)}\n          initial='enter'\n          animate='visible'\n          exit='exit'\n          transition={SLIDE_TRANSITION}\n          className='whitespace-nowrap'\n        >\n          {text}\n        </motion.span>\n      </AnimatePresence>\n    </span>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/team-04/parts.tsx"
    },
    {
      "path": "registry/ndeko/blocks/team/team-04/data.ts",
      "content": "export type Presence = 'tracking' | 'online' | 'away' | 'offline';\n\nexport type Role = 'manager' | 'member' | 'viewer';\n\nexport type IssueType = 'task' | 'bug' | 'story';\n\nexport type Period = 'this' | 'last';\n\nexport type MemberTask = {\n  key: string;\n  title: string;\n  type: IssueType;\n};\n\nexport type Member = {\n  id: string;\n  name: string;\n  title: string;\n  role: Role;\n  presence: Presence;\n  task: MemberTask | null;\n  minutes: Record<Period, number>;\n};\n\nexport type ActivityKind = 'closed' | 'commented' | 'moved' | 'created';\n\nexport type Activity = {\n  id: string;\n  memberId: string;\n  kind: ActivityKind;\n  task: MemberTask;\n  detail?: string;\n  age: string;\n};\n\nexport type TeamFigures = {\n  openTasks: number;\n  doneTasks: number;\n  trackedMinutes: number;\n};\n\nexport const WORKSPACE_NAME = 'Fernhall';\n\nexport const TEAM = {\n  name: 'Atlas Redesign',\n  color: 'var(--info)',\n  description:\n    'Redraws the booking flow and the onboarding for the spring release.',\n};\n\nexport const PERIOD_LABELS: Record<Period, string> = {\n  this: 'This week',\n  last: 'Last week',\n};\n\nexport const FIGURES: Record<Period, TeamFigures> = {\n  this: { openTasks: 14, doneTasks: 23, trackedMinutes: 7720 },\n  last: { openTasks: 19, doneTasks: 17, trackedMinutes: 9105 },\n};\n\nexport const MEMBERS: Member[] = [\n  {\n    id: 'amara',\n    name: 'Amara Okafor',\n    title: 'Product designer',\n    role: 'manager',\n    presence: 'tracking',\n    task: {\n      key: 'FRN-158',\n      title: 'Onboarding checklist on small screens',\n      type: 'story',\n    },\n    minutes: { this: 1835, last: 2220 },\n  },\n  {\n    id: 'leo',\n    name: 'Léo Martin',\n    title: 'Frontend engineer',\n    role: 'member',\n    presence: 'online',\n    task: {\n      key: 'FRN-152',\n      title: 'Offline drafts for field notes',\n      type: 'story',\n    },\n    minutes: { this: 2010, last: 2385 },\n  },\n  {\n    id: 'sana',\n    name: 'Sana Iqbal',\n    title: 'Backend engineer',\n    role: 'member',\n    presence: 'tracking',\n    task: {\n      key: 'FRN-148',\n      title: 'Booking calendar skips a week',\n      type: 'bug',\n    },\n    minutes: { this: 1690, last: 2140 },\n  },\n  {\n    id: 'tomas',\n    name: 'Tomás Rivera',\n    title: 'QA engineer',\n    role: 'member',\n    presence: 'away',\n    task: null,\n    minutes: { this: 1240, last: 1600 },\n  },\n  {\n    id: 'mei',\n    name: 'Mei Lin',\n    title: 'Content designer',\n    role: 'viewer',\n    presence: 'offline',\n    task: {\n      key: 'FRN-164',\n      title: 'Copy for the weekly digest',\n      type: 'task',\n    },\n    minutes: { this: 945, last: 760 },\n  },\n];\n\nexport const ACTIVITY: Activity[] = [\n  {\n    id: 'a1',\n    memberId: 'sana',\n    kind: 'moved',\n    task: {\n      key: 'FRN-148',\n      title: 'Booking calendar skips a week',\n      type: 'bug',\n    },\n    detail: 'to In progress',\n    age: '12m',\n  },\n  {\n    id: 'a2',\n    memberId: 'leo',\n    kind: 'commented',\n    task: {\n      key: 'FRN-152',\n      title: 'Offline drafts for field notes',\n      type: 'story',\n    },\n    detail: 'Drafts now sync as soon as the tab is back online',\n    age: '40m',\n  },\n  {\n    id: 'a3',\n    memberId: 'amara',\n    kind: 'created',\n    task: {\n      key: 'FRN-173',\n      title: 'Empty state for a team without plans',\n      type: 'task',\n    },\n    age: '1h',\n  },\n  {\n    id: 'a4',\n    memberId: 'tomas',\n    kind: 'closed',\n    task: {\n      key: 'FRN-127',\n      title: 'Paginate the notes list',\n      type: 'task',\n    },\n    age: '3h',\n  },\n  {\n    id: 'a5',\n    memberId: 'mei',\n    kind: 'commented',\n    task: {\n      key: 'FRN-164',\n      title: 'Copy for the weekly digest',\n      type: 'task',\n    },\n    detail: 'First draft is in the doc, the subject line still needs a pass',\n    age: 'Yesterday',\n  },\n  {\n    id: 'a6',\n    memberId: 'leo',\n    kind: 'closed',\n    task: {\n      key: 'FRN-131',\n      title: 'Retry failed photo uploads',\n      type: 'bug',\n    },\n    age: 'Yesterday',\n  },\n  {\n    id: 'a7',\n    memberId: 'amara',\n    kind: 'moved',\n    task: {\n      key: 'FRN-158',\n      title: 'Onboarding checklist on small screens',\n      type: 'story',\n    },\n    detail: 'to In review',\n    age: 'Mon',\n  },\n];\n",
      "type": "registry:component",
      "target": "components/blocks/team-04/data.ts"
    }
  ],
  "categories": [
    "blocks",
    "team"
  ],
  "type": "registry:block"
}