{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "app-shells-03",
  "title": "Settings mode",
  "description": "The sidebar switches to a settings rail with a way back to the app, beside a settings page of rows that save as you change them.",
  "dependencies": [
    "motion"
  ],
  "registryDependencies": [
    "https://ui.ndekocode.dev/r/alert-dialog.json",
    "https://ui.ndekocode.dev/r/avatar.json",
    "https://ui.ndekocode.dev/r/badge.json",
    "https://ui.ndekocode.dev/r/breadcrumb.json",
    "https://ui.ndekocode.dev/r/button.json",
    "https://ui.ndekocode.dev/r/chip.json",
    "https://ui.ndekocode.dev/r/command.json",
    "https://ui.ndekocode.dev/r/company-mark.json",
    "https://ui.ndekocode.dev/r/dropdown-menu.json",
    "https://ui.ndekocode.dev/r/icons.json",
    "https://ui.ndekocode.dev/r/input.json",
    "https://ui.ndekocode.dev/r/kbd.json",
    "https://ui.ndekocode.dev/r/mesh-tile.json",
    "https://ui.ndekocode.dev/r/motion-number.json",
    "https://ui.ndekocode.dev/r/radio-group.json",
    "https://ui.ndekocode.dev/r/recipes.json",
    "https://ui.ndekocode.dev/r/select.json",
    "https://ui.ndekocode.dev/r/sheet.json",
    "https://ui.ndekocode.dev/r/switch.json",
    "https://ui.ndekocode.dev/r/tabs.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/blocks/app-shells/app-shells-03/index.tsx",
      "content": "'use client';\n\nimport { useCallback, useEffect, useState } from 'react';\n\nimport { Sheet, SheetContent, SheetTitle } from '@/registry/ndeko/ui/sheet';\n\nimport { AppSidebar, type PageCounts, type SidebarMode } from './app-sidebar';\nimport {\n  CURRENT_USER_ID,\n  EMPTY_PAGES,\n  INITIAL_ROLES,\n  LABELS,\n  NAV_GROUPS,\n  NOTIFICATIONS,\n  PEOPLE,\n  PRODUCT_TEAM,\n  PROJECTS,\n  SETTINGS_GROUPS,\n  STATUSES,\n  TASKS,\n  WORKSPACES,\n  personOf,\n  type AppPageId,\n  type NavGroup,\n  type NavItem,\n  type Notification,\n  type PageId,\n  type Project,\n  type SettingsPageId,\n  type Task,\n} from './data';\nimport {\n  EmptyPageView,\n  InboxPage,\n  MembersPage,\n  ProjectsPage,\n  TaskListPage,\n} from './page-views';\nimport type { CreateKind } from './quick-create-menu';\nimport { CommandPalette } from './search-palette';\nimport { SettingsView, type SettingsState } from './settings-pages';\nimport { TopBar } from './top-bar';\n\nconst NAV_ITEMS = [...NAV_GROUPS, ...SETTINGS_GROUPS].flatMap(\n  (group) => group.items\n);\n\nconst FIRST_TASK_NUMBER = 100;\n\nconst SETTINGS_ANCESTOR = 'Settings';\n\nconst INITIAL_USER = personOf(CURRENT_USER_ID);\n\nconst INITIAL_SETTINGS: SettingsState = {\n  fullName: INITIAL_USER.name,\n  email: 'amara@lattice.example',\n  title: INITIAL_USER.role,\n  timeZone: 'Africa/Lagos',\n  weekStart: 'monday',\n  remindToTrack: true,\n  stopWhenIdle: false,\n  showSeconds: false,\n  mailAssignments: true,\n  mailMentions: true,\n  mailWeeklySummary: false,\n  appComments: true,\n  appStatusChanges: false,\n  teamName: PRODUCT_TEAM.name,\n  teamKey: 'LAT',\n  visibility: 'private',\n  roles: INITIAL_ROLES,\n  statuses: STATUSES,\n  labels: LABELS,\n};\n\nfunction isSettingsPage(pageId: PageId): pageId is SettingsPageId {\n  return pageId.startsWith('settings-');\n}\n\nfunction navItemOf(pageId: PageId): NavItem {\n  const item = NAV_ITEMS.find((candidate) => candidate.id === pageId);\n  if (item) {\n    return item;\n  }\n  return NAV_ITEMS[0];\n}\n\nfunction ancestorOf(pageId: PageId, workspaceName: string, teamName: string) {\n  if (isSettingsPage(pageId)) {\n    return SETTINGS_ANCESTOR;\n  }\n  const group = NAV_GROUPS.find((candidate) =>\n    candidate.items.some((item) => item.id === pageId)\n  );\n  if (group?.team) {\n    return teamName;\n  }\n  if (group?.label) {\n    return workspaceName;\n  }\n  return undefined;\n}\n\nfunction withTeamName(groups: NavGroup[], teamName: string): NavGroup[] {\n  return groups.map((group) => {\n    if (!group.team) {\n      return group;\n    }\n    const team = { ...group.team, name: teamName };\n    return { ...group, team };\n  });\n}\n\nfunction workspaceOf(workspaceId: string) {\n  const workspace = WORKSPACES.find(\n    (candidate) => candidate.id === workspaceId\n  );\n  if (workspace) {\n    return workspace;\n  }\n  return WORKSPACES[0];\n}\n\nfunction numberOf(task: Task) {\n  const digits = task.number.replace(/\\D/g, '');\n  return Number(digits);\n}\n\nfunction draftTaskAfter(tasks: Task[]): Task {\n  const numbers = tasks.map(numberOf);\n  const nextNumber = Math.max(FIRST_TASK_NUMBER, ...numbers) + 1;\n  return {\n    id: `task-${nextNumber}`,\n    number: `LAT-${nextNumber}`,\n    title: 'Untitled task',\n    projectId: 'onboarding',\n    assigneeId: CURRENT_USER_ID,\n    due: 'No date',\n    isDone: false,\n  };\n}\n\nfunction draftProjectAfter(projects: Project[]): Project {\n  const draftNumber = projects.length + 1;\n  return {\n    id: `project-${draftNumber}`,\n    name: 'Untitled project',\n    color: 'var(--muted-foreground)',\n    leadId: CURRENT_USER_ID,\n  };\n}\n\nfunction isTypingTarget(target: EventTarget | null) {\n  if (!(target instanceof HTMLElement)) {\n    return false;\n  }\n  const isField = target.matches('input, textarea, select');\n  return isField || target.isContentEditable;\n}\n\nfunction isPaletteShortcut(event: KeyboardEvent) {\n  const isKKey = event.key.toLowerCase() === 'k';\n  const hasModifier = event.metaKey || event.ctrlKey;\n  return isKKey && hasModifier;\n}\n\nfunction isCreateShortcut(event: KeyboardEvent) {\n  const isCKey = event.key.toLowerCase() === 'c';\n  const hasModifier = event.metaKey || event.ctrlKey || event.altKey;\n  const isTyping = isTypingTarget(event.target);\n  return isCKey && !hasModifier && !isTyping;\n}\n\nfunction emptyPageOf(pageId: PageId) {\n  if (isSettingsPage(pageId)) {\n    return undefined;\n  }\n  return EMPTY_PAGES[pageId];\n}\n\nfunction modeOf(pageId: PageId): SidebarMode {\n  if (isSettingsPage(pageId)) {\n    return 'settings';\n  }\n  return 'app';\n}\n\nexport default function AppShells03() {\n  const [activePageId, setActivePageId] = useState<PageId>('settings-profile');\n  const [lastAppPageId, setLastAppPageId] = useState<AppPageId>('my-tasks');\n  const [workspaceId, setWorkspaceId] = useState(WORKSPACES[0].id);\n  const [isNavigationOpen, setIsNavigationOpen] = useState(false);\n  const [isPaletteOpen, setIsPaletteOpen] = useState(false);\n  const [tasks, setTasks] = useState<Task[]>(TASKS);\n  const [projects, setProjects] = useState<Project[]>(PROJECTS);\n  const [notifications, setNotifications] =\n    useState<Notification[]>(NOTIFICATIONS);\n  const [settings, setSettings] = useState<SettingsState>(INITIAL_SETTINGS);\n\n  const mode = modeOf(activePageId);\n  const workspace = workspaceOf(workspaceId);\n  const appGroups = withTeamName(NAV_GROUPS, settings.teamName);\n  const settingsGroups = withTeamName(SETTINGS_GROUPS, settings.teamName);\n  let sidebarGroups = appGroups;\n  if (mode === 'settings') {\n    sidebarGroups = settingsGroups;\n  }\n  const activePage = navItemOf(activePageId);\n  const ancestor = ancestorOf(activePageId, workspace.name, settings.teamName);\n  const currentUser = {\n    ...INITIAL_USER,\n    name: settings.fullName,\n    role: settings.title,\n  };\n  const myTasks = tasks.filter((task) => task.assigneeId === CURRENT_USER_ID);\n  const myOpenTasks = myTasks.filter((task) => !task.isDone);\n  const teamOpenTasks = tasks.filter((task) => !task.isDone);\n  const unreadNotifications = notifications.filter((note) => note.isUnread);\n  const counts: PageCounts = {\n    inbox: unreadNotifications.length,\n    'my-tasks': myOpenTasks.length,\n    'team-tasks': teamOpenTasks.length,\n  };\n\n  const createTask = useCallback(() => {\n    setTasks((previous) => {\n      const draft = draftTaskAfter(previous);\n      return [draft, ...previous];\n    });\n    setActivePageId('my-tasks');\n    setLastAppPageId('my-tasks');\n  }, []);\n\n  useEffect(() => {\n    function handleKeyDown(event: KeyboardEvent) {\n      if (isPaletteShortcut(event)) {\n        event.preventDefault();\n        setIsPaletteOpen((isOpen) => !isOpen);\n        return;\n      }\n      if (isCreateShortcut(event)) {\n        event.preventDefault();\n        createTask();\n      }\n    }\n\n    document.addEventListener('keydown', handleKeyDown);\n    return () => document.removeEventListener('keydown', handleKeyDown);\n  }, [createTask]);\n\n  function navigate(pageId: PageId) {\n    setActivePageId(pageId);\n    setIsNavigationOpen(false);\n    if (!isSettingsPage(pageId)) {\n      setLastAppPageId(pageId);\n    }\n  }\n\n  function backToApp() {\n    navigate(lastAppPageId);\n  }\n\n  function create(kind: CreateKind) {\n    setIsNavigationOpen(false);\n    if (kind === 'task') {\n      createTask();\n      return;\n    }\n    if (kind === 'project') {\n      setProjects((previous) => {\n        const draft = draftProjectAfter(previous);\n        return [...previous, draft];\n      });\n      navigate('projects');\n      return;\n    }\n    navigate('settings-team-members');\n  }\n\n  function createProject() {\n    create('project');\n  }\n\n  function openSearch() {\n    setIsNavigationOpen(false);\n    setIsPaletteOpen(true);\n  }\n\n  function openNavigation() {\n    setIsNavigationOpen(true);\n  }\n\n  function changeSettings(patch: Partial<SettingsState>) {\n    setSettings((previous) => ({ ...previous, ...patch }));\n  }\n\n  function toggleTask(taskId: string) {\n    setTasks((previous) =>\n      previous.map((task) => {\n        if (task.id !== taskId) {\n          return task;\n        }\n        return { ...task, isDone: !task.isDone };\n      })\n    );\n  }\n\n  function readNotification(notificationId: string) {\n    setNotifications((previous) =>\n      previous.map((note) => {\n        if (note.id !== notificationId) {\n          return note;\n        }\n        return { ...note, isUnread: false };\n      })\n    );\n  }\n\n  function readAllNotifications() {\n    setNotifications((previous) =>\n      previous.map((note) => ({ ...note, isUnread: false }))\n    );\n  }\n\n  const sidebarProps = {\n    mode,\n    workspaces: WORKSPACES,\n    workspace,\n    onWorkspaceChange: setWorkspaceId,\n    groups: sidebarGroups,\n    activePageId,\n    counts,\n    person: currentUser,\n    onNavigate: navigate,\n    onBackToApp: backToApp,\n    onOpenSettings: navigate,\n    onOpenSearch: openSearch,\n    onCreate: create,\n  };\n  const emptyPage = emptyPageOf(activePageId);\n\n  return (\n    <div className='bg-sidebar text-foreground flex h-dvh min-h-0 w-full md:p-2'>\n      <aside\n        aria-label='Sidebar'\n        className='hidden w-60 shrink-0 pr-2 md:block'\n      >\n        <AppSidebar {...sidebarProps} />\n      </aside>\n      <Sheet open={isNavigationOpen} onOpenChange={setIsNavigationOpen}>\n        <SheetContent\n          side='left'\n          showCloseButton={false}\n          className='bg-sidebar w-72 gap-0 p-2'\n        >\n          <SheetTitle className='sr-only'>Navigation</SheetTitle>\n          <AppSidebar {...sidebarProps} />\n        </SheetContent>\n      </Sheet>\n      <main className='bg-background md:hairline-ring md:ring-border flex min-w-0 flex-1 flex-col overflow-clip md:rounded-xl md:shadow-[0_1px_2px_rgb(0_0_0/0.04)]'>\n        <TopBar\n          page={activePage}\n          ancestor={ancestor}\n          people={PEOPLE}\n          onOpenNavigation={openNavigation}\n        />\n        {isSettingsPage(activePageId) && (\n          <SettingsView\n            pageId={activePageId}\n            settings={settings}\n            onChange={changeSettings}\n          />\n        )}\n        {activePageId === 'inbox' && (\n          <InboxPage\n            notifications={notifications}\n            onRead={readNotification}\n            onReadAll={readAllNotifications}\n          />\n        )}\n        {activePageId === 'my-tasks' && (\n          <TaskListPage\n            key='my-tasks'\n            title='My tasks'\n            tasks={myTasks}\n            showAssignee={false}\n            onToggleTask={toggleTask}\n            onCreateTask={createTask}\n          />\n        )}\n        {activePageId === 'team-tasks' && (\n          <TaskListPage\n            key='team-tasks'\n            title={`${settings.teamName} tasks`}\n            tasks={tasks}\n            showAssignee\n            onToggleTask={toggleTask}\n            onCreateTask={createTask}\n          />\n        )}\n        {activePageId === 'projects' && (\n          <ProjectsPage\n            projects={projects}\n            tasks={tasks}\n            onCreateProject={createProject}\n          />\n        )}\n        {activePageId === 'members' && <MembersPage people={PEOPLE} />}\n        {emptyPage && (\n          <EmptyPageView\n            title={activePage.label}\n            meta={`${settings.teamName} team`}\n            icon={activePage.icon}\n            page={emptyPage}\n          />\n        )}\n      </main>\n      <CommandPalette\n        open={isPaletteOpen}\n        onOpenChange={setIsPaletteOpen}\n        groups={appGroups}\n        onNavigate={navigate}\n        onCreateTask={createTask}\n      />\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/app-shells-03/index.tsx"
    },
    {
      "path": "registry/ndeko/blocks/app-shells/app-shells-03/app-sidebar.tsx",
      "content": "'use client';\n\nimport {\n  AnimatePresence,\n  motion,\n  type Transition,\n  type Variants,\n} from 'motion/react';\nimport { useId } from 'react';\n\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport { ArrowLeftIcon } from '@/registry/ndeko/lib/icons';\n\nimport { AccountMenu } from './account-menu';\nimport type {\n  NavGroup,\n  NavItem,\n  PageId,\n  Person,\n  SettingsPageId,\n  Workspace,\n} from './data';\nimport { QuickCreateMenu, type CreateKind } from './quick-create-menu';\nimport { SearchTrigger } from './search-palette';\nimport { EntityTile, NAV_ROW, NavRow } from './sidebar-parts';\nimport { WorkspaceSwitcher } from './workspace-switcher';\n\nexport type PageCounts = Partial<Record<PageId, number>>;\n\nexport type SidebarMode = 'app' | 'settings';\n\nconst MODE_SHIFT_PX = 12;\n\nconst MODE_TRANSITION: Transition = {\n  duration: 0.22,\n  ease: [0.23, 1, 0.32, 1],\n};\n\nconst MODE_VARIANTS: Variants = {\n  enter: (direction: number) => {\n    const offset = direction * MODE_SHIFT_PX;\n    return { opacity: 0, x: offset };\n  },\n  visible: { opacity: 1, x: 0 },\n  exit: (direction: number) => {\n    const offset = direction * MODE_SHIFT_PX;\n    return { opacity: 0, x: -offset };\n  },\n};\n\nconst FADE_VARIANTS: Variants = {\n  enter: { opacity: 0 },\n  visible: { opacity: 1 },\n  exit: { opacity: 0 },\n};\n\nfunction modeVariantsOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE_VARIANTS;\n  }\n  return MODE_VARIANTS;\n}\n\nfunction navLabelOf(mode: SidebarMode) {\n  if (mode === 'settings') {\n    return 'Settings';\n  }\n  return 'Main';\n}\n\nfunction directionOf(mode: SidebarMode) {\n  if (mode === 'settings') {\n    return 1;\n  }\n  return -1;\n}\n\ntype AppSidebarProps = {\n  mode: SidebarMode;\n  workspaces: Workspace[];\n  workspace: Workspace;\n  onWorkspaceChange: (workspaceId: string) => void;\n  groups: NavGroup[];\n  activePageId: PageId;\n  counts: PageCounts;\n  person: Person;\n  onNavigate: (pageId: PageId) => void;\n  onBackToApp: () => void;\n  onOpenSettings: (pageId: SettingsPageId) => void;\n  onOpenSearch: () => void;\n  onCreate: (kind: CreateKind) => void;\n};\n\nfunction GroupLabel({ group }: { group: NavGroup }) {\n  if (group.team) {\n    return (\n      <p className='text-muted-foreground flex h-6 items-center gap-2 px-2 text-xs font-medium'>\n        <EntityTile entity={group.team} size='xs' />\n        <span className='truncate'>{group.team.name}</span>\n      </p>\n    );\n  }\n  if (group.label) {\n    return (\n      <p className='text-muted-foreground flex h-6 items-center px-2 text-xs font-medium'>\n        {group.label}\n      </p>\n    );\n  }\n  return null;\n}\n\nexport function AppSidebar({\n  mode,\n  workspaces,\n  workspace,\n  onWorkspaceChange,\n  groups,\n  activePageId,\n  counts,\n  person,\n  onNavigate,\n  onBackToApp,\n  onOpenSettings,\n  onOpenSearch,\n  onCreate,\n}: AppSidebarProps) {\n  const indicatorId = useId();\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const modeVariants = modeVariantsOf(shouldReduceMotion);\n  const direction = directionOf(mode);\n  const isSettingsMode = mode === 'settings';\n  const modeIndicatorId = `${indicatorId}-${mode}`;\n\n  function selectItem(item: NavItem) {\n    onNavigate(item.id);\n  }\n\n  function openWorkspaceSettings() {\n    onOpenSettings('settings-team-general');\n  }\n\n  return (\n    <div className='flex h-full min-h-0 flex-col gap-3'>\n      <div className='flex flex-col gap-2'>\n        <WorkspaceSwitcher\n          workspaces={workspaces}\n          current={workspace}\n          onSelect={onWorkspaceChange}\n          onOpenSettings={openWorkspaceSettings}\n        />\n        <div className='flex items-center gap-2'>\n          <SearchTrigger onOpen={onOpenSearch} />\n          <QuickCreateMenu onCreate={onCreate} />\n        </div>\n      </div>\n      <div className='-mx-2 flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto px-2'>\n        <AnimatePresence mode='popLayout' initial={false} custom={direction}>\n          <motion.nav\n            key={mode}\n            custom={direction}\n            variants={modeVariants}\n            initial='enter'\n            animate='visible'\n            exit='exit'\n            transition={MODE_TRANSITION}\n            aria-label={navLabelOf(mode)}\n            className='flex flex-col gap-4'\n          >\n            {isSettingsMode && (\n              <button type='button' onClick={onBackToApp} className={NAV_ROW}>\n                <ArrowLeftIcon />\n                <span className='relative min-w-0 flex-1 truncate'>\n                  Back to app\n                </span>\n              </button>\n            )}\n            {groups.map((group) => (\n              <div key={group.id} className='flex flex-col gap-0.5'>\n                <GroupLabel group={group} />\n                <ul className='flex flex-col gap-px'>\n                  {group.items.map((item) => (\n                    <NavRow\n                      key={item.id}\n                      item={item}\n                      isActive={item.id === activePageId}\n                      indicatorId={modeIndicatorId}\n                      count={counts[item.id]}\n                      onSelect={selectItem}\n                    />\n                  ))}\n                </ul>\n              </div>\n            ))}\n          </motion.nav>\n        </AnimatePresence>\n      </div>\n      <AccountMenu person={person} onOpenSettings={onOpenSettings} />\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/app-shells-03/app-sidebar.tsx"
    },
    {
      "path": "registry/ndeko/blocks/app-shells/app-shells-03/sidebar-parts.tsx",
      "content": "'use client';\n\nimport { motion, type Transition } from 'motion/react';\n\nimport { MotionNumber } from '@/components/core/motion-number';\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\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 { Entity, NavItem, Person } from './data';\n\nexport const NAV_ROW = [\n  'relative flex h-7 w-full min-w-0 items-center gap-2 rounded-md px-2 text-left text-[13px] font-medium text-foreground outline-none',\n  'transition-colors duration-150 hover:bg-foreground/5 focus-visible:ring-[3px] focus-visible:ring-ring/25',\n  \"[&_svg]:pointer-events-none [&_svg]:relative [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\n].join(' ');\n\nconst INDICATOR_TRAVEL: Transition = {\n  duration: 0.25,\n  ease: [0.77, 0, 0.175, 1],\n};\n\nconst INSTANT: Transition = { duration: 0 };\n\nfunction travelOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return INSTANT;\n  }\n  return INDICATOR_TRAVEL;\n}\n\n/** The one highlight of the active row. It travels from the old row to the new one. */\nexport function ActiveRowIndicator({ layoutId }: { layoutId: string }) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n\n  return (\n    <motion.span\n      aria-hidden='true'\n      layoutId={layoutId}\n      transition={travelOf(shouldReduceMotion)}\n      className='bg-foreground/[0.07] absolute inset-0 rounded-md'\n    />\n  );\n}\n\nconst TILE_SIZE = {\n  xs: 'size-4 rounded-[4px]',\n  sm: 'size-5 rounded-[5px]',\n  md: 'size-6 rounded-md',\n} as const;\n\n/** The picture of a team: a gradient drawn from its name, in its colour. */\nexport function EntityTile({\n  entity,\n  size = 'md',\n  className,\n}: {\n  entity: Entity;\n  size?: keyof typeof TILE_SIZE;\n  className?: string;\n}) {\n  return (\n    <MeshTile\n      seed={entity.name}\n      color={entity.color}\n      className={cn(TILE_SIZE[size], className)}\n    />\n  );\n}\n\nexport function PersonAvatar({\n  person,\n  className,\n}: {\n  person: Person;\n  className?: string;\n}) {\n  return <Avatar className={className} seed={person.name} />;\n}\n\nexport function ariaCurrentOf(isActive: boolean) {\n  if (isActive) {\n    return 'page' as const;\n  }\n  return undefined;\n}\n\ntype NavRowProps = {\n  item: NavItem;\n  isActive: boolean;\n  indicatorId: string;\n  count?: number;\n  onSelect: (item: NavItem) => void;\n};\n\nexport function NavRow({\n  item,\n  isActive,\n  indicatorId,\n  count = 0,\n  onSelect,\n}: NavRowProps) {\n  const hasCount = count > 0;\n  const ItemIcon = item.icon;\n  const ariaCurrent = ariaCurrentOf(isActive);\n\n  function selectItem() {\n    onSelect(item);\n  }\n\n  return (\n    <li>\n      <button\n        type='button'\n        aria-current={ariaCurrent}\n        onClick={selectItem}\n        className={NAV_ROW}\n      >\n        {isActive && <ActiveRowIndicator layoutId={indicatorId} />}\n        <ItemIcon />\n        <span className='relative min-w-0 flex-1 truncate'>{item.label}</span>\n        {hasCount && (\n          <MotionNumber\n            value={count}\n            className='text-muted-foreground text-xs font-normal'\n          />\n        )}\n      </button>\n    </li>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/app-shells-03/sidebar-parts.tsx"
    },
    {
      "path": "registry/ndeko/blocks/app-shells/app-shells-03/workspace-switcher.tsx",
      "content": "'use client';\n\nimport {\n  ChevronsUpDownIcon,\n  PlusIcon,\n  SettingsIcon,\n} from '@/registry/ndeko/lib/icons';\nimport { CompanyMark } from '@/registry/ndeko/ui/company-mark';\nimport {\n  DropdownMenu,\n  DropdownMenuContent,\n  DropdownMenuItem,\n  DropdownMenuLabel,\n  DropdownMenuRadioGroup,\n  DropdownMenuRadioItem,\n  DropdownMenuSeparator,\n  DropdownMenuTrigger,\n} from '@/registry/ndeko/ui/dropdown-menu';\nimport { Kbd } from '@/registry/ndeko/ui/kbd';\n\nimport type { Workspace } from './data';\n\nconst TRIGGER = [\n  'flex h-9 min-w-0 flex-1 items-center gap-2 rounded-md px-1.5 text-left outline-none',\n  'transition-colors duration-150 hover:bg-foreground/5 data-popup-open:bg-foreground/5 focus-visible:ring-[3px] focus-visible:ring-ring/25',\n].join(' ');\n\nfunction memberCountLabelOf(count: number) {\n  if (count === 1) {\n    return '1 member';\n  }\n  return `${count} members`;\n}\n\ntype WorkspaceSwitcherProps = {\n  workspaces: Workspace[];\n  current: Workspace;\n  onSelect: (workspaceId: string) => void;\n  onOpenSettings: () => void;\n};\n\nexport function WorkspaceSwitcher({\n  workspaces,\n  current,\n  onSelect,\n  onOpenSettings,\n}: WorkspaceSwitcherProps) {\n  function selectWorkspace(value: unknown) {\n    if (typeof value === 'string') {\n      onSelect(value);\n    }\n  }\n\n  return (\n    <DropdownMenu>\n      <DropdownMenuTrigger\n        render={\n          <button\n            type='button'\n            aria-label={`Workspace: ${current.name}`}\n            className={TRIGGER}\n          />\n        }\n      >\n        <CompanyMark seed={current.name} className='size-6 rounded-md' />\n        <span className='min-w-0 flex-1 truncate text-[13px] font-semibold'>\n          {current.name}\n        </span>\n        <ChevronsUpDownIcon className='text-muted-foreground size-3.5 shrink-0' />\n      </DropdownMenuTrigger>\n      <DropdownMenuContent className='w-64'>\n        <DropdownMenuLabel>Workspaces</DropdownMenuLabel>\n        <DropdownMenuRadioGroup\n          value={current.id}\n          onValueChange={selectWorkspace}\n        >\n          {workspaces.map((workspace) => (\n            <DropdownMenuRadioItem\n              key={workspace.id}\n              value={workspace.id}\n              closeOnClick\n              className='h-9'\n            >\n              <CompanyMark seed={workspace.name} />\n              <span className='min-w-0 flex-1 truncate'>{workspace.name}</span>\n              <Kbd aria-hidden='true'>{workspace.memberCount}</Kbd>\n              <span className='sr-only'>\n                {memberCountLabelOf(workspace.memberCount)}\n              </span>\n            </DropdownMenuRadioItem>\n          ))}\n        </DropdownMenuRadioGroup>\n        <DropdownMenuSeparator />\n        <DropdownMenuItem onClick={onOpenSettings}>\n          <SettingsIcon />\n          Settings\n        </DropdownMenuItem>\n        <DropdownMenuItem>\n          <PlusIcon />\n          Add workspace\n        </DropdownMenuItem>\n      </DropdownMenuContent>\n    </DropdownMenu>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/app-shells-03/workspace-switcher.tsx"
    },
    {
      "path": "registry/ndeko/blocks/app-shells/app-shells-03/search-palette.tsx",
      "content": "'use client';\n\nimport { CircleCheckIcon, SearchIcon } from '@/registry/ndeko/lib/icons';\nimport { CONTROL_RECIPE } from '@/registry/ndeko/lib/recipes';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport {\n  CommandDialog,\n  CommandEmpty,\n  CommandGroup,\n  CommandInput,\n  CommandItem,\n  CommandList,\n  CommandShortcut,\n} from '@/registry/ndeko/ui/command';\nimport { Kbd } from '@/registry/ndeko/ui/kbd';\n\nimport type { NavGroup, PageId } from './data';\n\nfunction headingOf(group: NavGroup) {\n  if (group.team) {\n    return group.team.name;\n  }\n  if (group.label) {\n    return group.label;\n  }\n  return 'Personal';\n}\n\nexport function SearchTrigger({ onOpen }: { onOpen: () => void }) {\n  return (\n    <button\n      type='button'\n      onClick={onOpen}\n      className={cn(\n        CONTROL_RECIPE,\n        'text-muted-foreground flex h-8 min-w-0 flex-1 cursor-pointer items-center gap-2 px-2.5 text-left'\n      )}\n    >\n      <SearchIcon className='size-4 shrink-0' />\n      <span className='min-w-0 flex-1 truncate'>Search</span>\n      <Kbd>⌘K</Kbd>\n    </button>\n  );\n}\n\ntype CommandPaletteProps = {\n  open: boolean;\n  onOpenChange: (open: boolean) => void;\n  groups: NavGroup[];\n  onNavigate: (pageId: PageId) => void;\n  onCreateTask: () => void;\n};\n\nexport function CommandPalette({\n  open,\n  onOpenChange,\n  groups,\n  onNavigate,\n  onCreateTask,\n}: CommandPaletteProps) {\n  function closePalette() {\n    onOpenChange(false);\n  }\n\n  function createTask() {\n    closePalette();\n    onCreateTask();\n  }\n\n  return (\n    <CommandDialog\n      open={open}\n      onOpenChange={onOpenChange}\n      title='Search'\n      description='Go to a page or run an action'\n    >\n      <CommandInput placeholder='Go to a page or run an action' />\n      <CommandList>\n        <CommandEmpty>Nothing matches. Try the name of a page.</CommandEmpty>\n        <CommandGroup heading='Actions'>\n          <CommandItem onSelect={createTask}>\n            <CircleCheckIcon />\n            New task\n            <CommandShortcut>C</CommandShortcut>\n          </CommandItem>\n        </CommandGroup>\n        {groups.map((group) => (\n          <CommandGroup key={group.id} heading={headingOf(group)}>\n            {group.items.map((item) => {\n              const ItemIcon = item.icon;\n\n              function goToPage() {\n                closePalette();\n                onNavigate(item.id);\n              }\n\n              return (\n                <CommandItem\n                  key={item.id}\n                  value={`${group.id} ${item.label}`}\n                  onSelect={goToPage}\n                >\n                  <ItemIcon />\n                  {item.label}\n                </CommandItem>\n              );\n            })}\n          </CommandGroup>\n        ))}\n      </CommandList>\n    </CommandDialog>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/app-shells-03/search-palette.tsx"
    },
    {
      "path": "registry/ndeko/blocks/app-shells/app-shells-03/quick-create-menu.tsx",
      "content": "'use client';\n\nimport {\n  CircleCheckIcon,\n  FolderPlusIcon,\n  PlusIcon,\n  UserRoundPlusIcon,\n} from '@/registry/ndeko/lib/icons';\nimport { Button } from '@/registry/ndeko/ui/button';\nimport {\n  DropdownMenu,\n  DropdownMenuContent,\n  DropdownMenuItem,\n  DropdownMenuTrigger,\n} from '@/registry/ndeko/ui/dropdown-menu';\nimport { Kbd } from '@/registry/ndeko/ui/kbd';\n\nexport type CreateKind = 'task' | 'project' | 'invite';\n\ntype QuickCreateMenuProps = {\n  onCreate: (kind: CreateKind) => void;\n  side?: 'bottom' | 'right';\n};\n\nexport function QuickCreateMenu({\n  onCreate,\n  side = 'bottom',\n}: QuickCreateMenuProps) {\n  function createTask() {\n    onCreate('task');\n  }\n\n  function createProject() {\n    onCreate('project');\n  }\n\n  function invitePeople() {\n    onCreate('invite');\n  }\n\n  return (\n    <DropdownMenu>\n      <DropdownMenuTrigger\n        render={<Button variant='outline' size='icon' aria-label='Create' />}\n      >\n        <PlusIcon />\n      </DropdownMenuTrigger>\n      <DropdownMenuContent side={side} align='end' className='w-52'>\n        <DropdownMenuItem onClick={createTask}>\n          <CircleCheckIcon />\n          New task\n          <Kbd className='ml-auto'>C</Kbd>\n        </DropdownMenuItem>\n        <DropdownMenuItem onClick={createProject}>\n          <FolderPlusIcon />\n          New project\n        </DropdownMenuItem>\n        <DropdownMenuItem onClick={invitePeople}>\n          <UserRoundPlusIcon />\n          Invite people\n        </DropdownMenuItem>\n      </DropdownMenuContent>\n    </DropdownMenu>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/app-shells-03/quick-create-menu.tsx"
    },
    {
      "path": "registry/ndeko/blocks/app-shells/app-shells-03/account-menu.tsx",
      "content": "'use client';\n\nimport {\n  ChevronsUpDownIcon,\n  CommandIcon,\n  LifeBuoyIcon,\n  LogOutIcon,\n  SettingsIcon,\n  UserIcon,\n} from '@/registry/ndeko/lib/icons';\nimport {\n  DropdownMenu,\n  DropdownMenuContent,\n  DropdownMenuItem,\n  DropdownMenuSeparator,\n  DropdownMenuTrigger,\n} from '@/registry/ndeko/ui/dropdown-menu';\nimport { Kbd } from '@/registry/ndeko/ui/kbd';\n\nimport type { Person, SettingsPageId } from './data';\nimport { PersonAvatar } from './sidebar-parts';\n\nconst TRIGGER = [\n  'flex h-9 w-full min-w-0 items-center gap-2 rounded-md px-1.5 text-left outline-none',\n  'transition-colors duration-150 hover:bg-foreground/5 data-popup-open:bg-foreground/5 focus-visible:ring-[3px] focus-visible:ring-ring/25',\n].join(' ');\n\ntype AccountMenuProps = {\n  person: Person;\n  onOpenSettings: (pageId: SettingsPageId) => void;\n};\n\nexport function AccountMenuItems({ person, onOpenSettings }: AccountMenuProps) {\n  function openProfile() {\n    onOpenSettings('settings-profile');\n  }\n\n  function openPreferences() {\n    onOpenSettings('settings-preferences');\n  }\n\n  return (\n    <>\n      <div className='flex items-center gap-2.5 px-2 py-2'>\n        <PersonAvatar person={person} />\n        <div className='min-w-0'>\n          <p className='truncate text-[13px] font-medium'>{person.name}</p>\n          <p className='text-muted-foreground truncate text-xs'>\n            {person.role}\n          </p>\n        </div>\n      </div>\n      <DropdownMenuSeparator />\n      <DropdownMenuItem onClick={openProfile}>\n        <UserIcon />\n        Profile\n      </DropdownMenuItem>\n      <DropdownMenuItem onClick={openPreferences}>\n        <SettingsIcon />\n        Preferences\n      </DropdownMenuItem>\n      <DropdownMenuItem>\n        <CommandIcon />\n        Keyboard shortcuts\n        <Kbd className='ml-auto'>?</Kbd>\n      </DropdownMenuItem>\n      <DropdownMenuItem>\n        <LifeBuoyIcon />\n        Help and docs\n      </DropdownMenuItem>\n      <DropdownMenuSeparator />\n      <DropdownMenuItem variant='destructive'>\n        <LogOutIcon />\n        Log out\n      </DropdownMenuItem>\n    </>\n  );\n}\n\nexport function AccountMenu({ person, onOpenSettings }: AccountMenuProps) {\n  return (\n    <DropdownMenu>\n      <DropdownMenuTrigger\n        render={\n          <button\n            type='button'\n            aria-label={`Account: ${person.name}`}\n            className={TRIGGER}\n          />\n        }\n      >\n        <PersonAvatar person={person} className='size-6 text-[10px]' />\n        <span className='min-w-0 flex-1 truncate text-[13px] font-medium'>\n          {person.name}\n        </span>\n        <ChevronsUpDownIcon className='text-muted-foreground size-3.5 shrink-0' />\n      </DropdownMenuTrigger>\n      <DropdownMenuContent side='top' align='start' className='w-60'>\n        <AccountMenuItems person={person} onOpenSettings={onOpenSettings} />\n      </DropdownMenuContent>\n    </DropdownMenu>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/app-shells-03/account-menu.tsx"
    },
    {
      "path": "registry/ndeko/blocks/app-shells/app-shells-03/top-bar.tsx",
      "content": "'use client';\n\nimport { MenuIcon } from '@/registry/ndeko/lib/icons';\nimport {\n  Breadcrumb,\n  BreadcrumbItem,\n  BreadcrumbList,\n  BreadcrumbPage,\n  BreadcrumbSeparator,\n} from '@/registry/ndeko/ui/breadcrumb';\nimport { Button } from '@/registry/ndeko/ui/button';\n\nimport type { NavItem, Person } from './data';\nimport { PersonAvatar } from './sidebar-parts';\n\nconst STACK_LIMIT = 4;\n\nfunction AvatarStack({ people }: { people: Person[] }) {\n  const shown = people.slice(0, STACK_LIMIT);\n  const hiddenCount = people.length - shown.length;\n  const hasHidden = hiddenCount > 0;\n\n  return (\n    <div\n      role='group'\n      aria-label='Team members'\n      className='hidden items-center sm:flex'\n    >\n      {shown.map((person) => (\n        <PersonAvatar\n          key={person.id}\n          person={person}\n          className='ring-background -ml-1.5 size-6 text-[10px] ring-2 first:ml-0'\n        />\n      ))}\n      {hasHidden && (\n        <span className='bg-muted text-muted-foreground ring-background -ml-1.5 inline-flex size-6 items-center justify-center rounded-full text-[10px] font-medium tabular-nums ring-2'>\n          +{hiddenCount}\n        </span>\n      )}\n    </div>\n  );\n}\n\ntype TopBarProps = {\n  page: NavItem;\n  ancestor?: string;\n  people: Person[];\n  onOpenNavigation: () => void;\n};\n\nexport function TopBar({\n  page,\n  ancestor,\n  people,\n  onOpenNavigation,\n}: TopBarProps) {\n  const PageIcon = page.icon;\n  const hasAncestor = Boolean(ancestor);\n\n  return (\n    <header className='hairline-b border-border flex h-11 shrink-0 items-center gap-2 px-3 md:px-4'>\n      <Button\n        variant='ghost'\n        size='icon-sm'\n        aria-label='Open navigation'\n        onClick={onOpenNavigation}\n        className='text-muted-foreground md:hidden'\n      >\n        <MenuIcon />\n      </Button>\n      <Breadcrumb className='min-w-0'>\n        <BreadcrumbList className='flex-nowrap'>\n          <li aria-hidden='true' className='flex'>\n            <PageIcon className='text-muted-foreground size-4 shrink-0' />\n          </li>\n          {hasAncestor && (\n            <>\n              <BreadcrumbItem className='hidden sm:inline-flex'>\n                {ancestor}\n              </BreadcrumbItem>\n              <BreadcrumbSeparator className='hidden sm:block' />\n            </>\n          )}\n          <BreadcrumbItem className='min-w-0'>\n            <BreadcrumbPage className='truncate'>{page.label}</BreadcrumbPage>\n          </BreadcrumbItem>\n        </BreadcrumbList>\n      </Breadcrumb>\n      <div className='ml-auto flex items-center gap-2'>\n        <AvatarStack people={people} />\n      </div>\n    </header>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/app-shells-03/top-bar.tsx"
    },
    {
      "path": "registry/ndeko/blocks/app-shells/app-shells-03/settings-kit.tsx",
      "content": "'use client';\n\nimport {\n  AnimatePresence,\n  motion,\n  type Transition,\n  type Variants,\n} from 'motion/react';\nimport { useEffect, useId, useState } from 'react';\n\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport { CheckIcon } from '@/registry/ndeko/lib/icons';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport {\n  AlertDialog,\n  AlertDialogAction,\n  AlertDialogCancel,\n  AlertDialogContent,\n  AlertDialogDescription,\n  AlertDialogFooter,\n  AlertDialogHeader,\n  AlertDialogTitle,\n} from '@/registry/ndeko/ui/alert-dialog';\nimport { Button } from '@/registry/ndeko/ui/button';\nimport { Input } from '@/registry/ndeko/ui/input';\nimport { RadioGroup, RadioGroupItem } from '@/registry/ndeko/ui/radio-group';\nimport {\n  Select,\n  SelectContent,\n  SelectItem,\n  SelectTrigger,\n  SelectValue,\n} from '@/registry/ndeko/ui/select';\nimport { Switch } from '@/registry/ndeko/ui/switch';\n\nexport const SETTINGS_SURFACE =\n  'bg-card hairline-ring ring-border hairline-divide-y divide-border overflow-hidden rounded-xl shadow-[0_1px_2px_rgb(0_0_0/0.04)]';\n\nconst SAVED_NOTICE_MS = 1600;\n\nconst SWAP_TRANSITION: Transition = { duration: 0.15, ease: [0.2, 0, 0, 1] };\n\nconst SWAP_VARIANTS: 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 VIEW_VARIANTS: Variants = {\n  enter: { opacity: 0, y: 4 },\n  visible: { opacity: 1, y: 0 },\n  exit: { opacity: 0, y: -4 },\n};\n\nconst FADE_VARIANTS: Variants = {\n  enter: { opacity: 0 },\n  visible: { opacity: 1 },\n  exit: { opacity: 0 },\n};\n\nfunction swapVariantsOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE_VARIANTS;\n  }\n  return SWAP_VARIANTS;\n}\n\nfunction viewVariantsOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE_VARIANTS;\n  }\n  return VIEW_VARIANTS;\n}\n\nexport function SettingsPage({\n  title,\n  line,\n  children,\n}: {\n  title: string;\n  line: string;\n  children: React.ReactNode;\n}) {\n  return (\n    <div className='min-h-0 flex-1 overflow-y-auto'>\n      <div className='mx-auto flex w-full max-w-[42rem] flex-col gap-8 px-4 py-8 md:py-10'>\n        <div className='flex flex-col gap-1'>\n          <h1 className='text-2xl font-semibold text-balance'>{title}</h1>\n          <p className='text-muted-foreground text-[13px]'>{line}</p>\n        </div>\n        {children}\n      </div>\n    </div>\n  );\n}\n\nexport function SettingsSection({\n  title,\n  line,\n  children,\n}: {\n  title: string;\n  line?: string;\n  children: React.ReactNode;\n}) {\n  const headingId = useId();\n\n  return (\n    <section aria-labelledby={headingId} className='flex flex-col gap-3'>\n      <div className='flex flex-col gap-0.5'>\n        <h2 id={headingId} className='text-sm font-medium'>\n          {title}\n        </h2>\n        {line && <p className='text-muted-foreground text-xs'>{line}</p>}\n      </div>\n      <div className={SETTINGS_SURFACE}>{children}</div>\n    </section>\n  );\n}\n\ntype SettingsRowProps = {\n  label: string;\n  line: string;\n  labelId?: string;\n  lineId?: string;\n  children: React.ReactNode;\n};\n\nexport function SettingsRow({\n  label,\n  line,\n  labelId,\n  lineId,\n  children,\n}: SettingsRowProps) {\n  return (\n    <div className='flex min-h-14 flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center sm:justify-between sm:gap-6'>\n      <div className='flex min-w-0 flex-col gap-0.5'>\n        <p id={labelId} className='text-[13px] font-medium'>\n          {label}\n        </p>\n        <p id={lineId} className='text-muted-foreground text-xs'>\n          {line}\n        </p>\n      </div>\n      <div className='flex shrink-0 items-center gap-2'>{children}</div>\n    </div>\n  );\n}\n\nfunction EditLabel({ isSaved }: { isSaved: boolean }) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const variants = swapVariantsOf(shouldReduceMotion);\n  const labelKey = String(isSaved);\n\n  return (\n    <AnimatePresence mode='popLayout' initial={false}>\n      <motion.span\n        key={labelKey}\n        variants={variants}\n        initial='enter'\n        animate='visible'\n        exit='exit'\n        transition={SWAP_TRANSITION}\n        className='flex items-center gap-1.5'\n      >\n        {isSaved && <CheckIcon className='text-success-foreground size-3.5' />}\n        {isSaved && 'Saved'}\n        {!isSaved && 'Edit'}\n      </motion.span>\n    </AnimatePresence>\n  );\n}\n\nexport function describedByOf(hasError: boolean, errorId: string) {\n  if (hasError) {\n    return errorId;\n  }\n  return undefined;\n}\n\ntype InlineTextRowProps = {\n  label: string;\n  line: string;\n  value: string;\n  inputType?: 'text' | 'email';\n  validate: (draft: string) => string | null;\n  onSave: (nextValue: string) => void;\n};\n\nexport function InlineTextRow({\n  label,\n  line,\n  value,\n  inputType = 'text',\n  validate,\n  onSave,\n}: InlineTextRowProps) {\n  const [isEditing, setIsEditing] = useState(false);\n  const [draft, setDraft] = useState(value);\n  const [error, setError] = useState<string | null>(null);\n  const [isSaved, setIsSaved] = useState(false);\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const viewVariants = viewVariantsOf(shouldReduceMotion);\n  const errorId = useId();\n  const hasError = Boolean(error);\n  const showsError = isEditing && hasError;\n  const describedBy = describedByOf(hasError, errorId);\n  const viewKey = String(isEditing);\n\n  useEffect(() => {\n    if (!isSaved) {\n      return;\n    }\n    const timer = window.setTimeout(() => setIsSaved(false), SAVED_NOTICE_MS);\n    return () => window.clearTimeout(timer);\n  }, [isSaved]);\n\n  function startEditing() {\n    setDraft(value);\n    setError(null);\n    setIsSaved(false);\n    setIsEditing(true);\n  }\n\n  function cancelEditing() {\n    setError(null);\n    setIsEditing(false);\n  }\n\n  function changeDraft(event: React.ChangeEvent<HTMLInputElement>) {\n    setDraft(event.target.value);\n    setError(null);\n  }\n\n  function handleKeyDown(event: React.KeyboardEvent<HTMLInputElement>) {\n    if (event.key === 'Escape') {\n      event.preventDefault();\n      cancelEditing();\n    }\n  }\n\n  function save(event: React.FormEvent<HTMLFormElement>) {\n    event.preventDefault();\n    const trimmed = draft.trim();\n    const problem = validate(trimmed);\n    if (problem) {\n      setError(problem);\n      return;\n    }\n    onSave(trimmed);\n    setIsEditing(false);\n    setIsSaved(true);\n  }\n\n  return (\n    <div className='flex min-h-14 flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center sm:justify-between sm:gap-6'>\n      <div className='flex min-w-0 shrink-0 flex-col gap-0.5'>\n        <p className='text-[13px] font-medium'>{label}</p>\n        <p className='text-muted-foreground text-xs'>{line}</p>\n      </div>\n      <AnimatePresence mode='popLayout' initial={false}>\n        <motion.div\n          key={viewKey}\n          variants={viewVariants}\n          initial='enter'\n          animate='visible'\n          exit='exit'\n          transition={SWAP_TRANSITION}\n          className='flex min-w-0 flex-col gap-1.5 sm:items-end'\n        >\n          {isEditing && (\n            <form onSubmit={save} className='flex items-center gap-2'>\n              <Input\n                autoFocus\n                type={inputType}\n                size='sm'\n                value={draft}\n                aria-label={label}\n                aria-invalid={hasError}\n                aria-describedby={describedBy}\n                onChange={changeDraft}\n                onKeyDown={handleKeyDown}\n                className='w-full sm:w-56'\n              />\n              <Button\n                type='button'\n                variant='ghost'\n                size='sm'\n                onClick={cancelEditing}\n              >\n                Cancel\n              </Button>\n              <Button type='submit' size='sm'>\n                Save\n              </Button>\n            </form>\n          )}\n          {showsError && (\n            <p id={errorId} className='text-destructive-ink text-xs'>\n              {error}\n            </p>\n          )}\n          {!isEditing && (\n            <div className='flex min-w-0 items-center gap-2'>\n              <span className='min-w-0 truncate text-[13px]'>{value}</span>\n              <Button\n                variant='ghost'\n                size='sm'\n                aria-label={`Edit ${label.toLowerCase()}`}\n                onClick={startEditing}\n                className='text-muted-foreground'\n              >\n                <EditLabel isSaved={isSaved} />\n              </Button>\n            </div>\n          )}\n        </motion.div>\n      </AnimatePresence>\n    </div>\n  );\n}\n\ntype SwitchRowProps = {\n  label: string;\n  line: string;\n  checked: boolean;\n  onCheckedChange: (checked: boolean) => void;\n};\n\nexport function SwitchRow({\n  label,\n  line,\n  checked,\n  onCheckedChange,\n}: SwitchRowProps) {\n  const labelId = useId();\n  const lineId = useId();\n\n  return (\n    <SettingsRow label={label} line={line} labelId={labelId} lineId={lineId}>\n      <Switch\n        checked={checked}\n        onCheckedChange={onCheckedChange}\n        aria-labelledby={labelId}\n        aria-describedby={lineId}\n      />\n    </SettingsRow>\n  );\n}\n\ntype SelectOption = { value: string; label: string };\n\ntype SelectRowProps = {\n  label: string;\n  line: string;\n  value: string;\n  options: SelectOption[];\n  onValueChange: (value: string) => void;\n};\n\nexport function SelectRow({\n  label,\n  line,\n  value,\n  options,\n  onValueChange,\n}: SelectRowProps) {\n  const labelId = useId();\n\n  function changeValue(nextValue: unknown) {\n    if (typeof nextValue === 'string') {\n      onValueChange(nextValue);\n    }\n  }\n\n  return (\n    <SettingsRow label={label} line={line} labelId={labelId}>\n      <Select items={options} value={value} onValueChange={changeValue}>\n        <SelectTrigger aria-labelledby={labelId} className='w-full sm:w-48'>\n          <SelectValue />\n        </SelectTrigger>\n        <SelectContent>\n          {options.map((option) => (\n            <SelectItem key={option.value} value={option.value}>\n              {option.label}\n            </SelectItem>\n          ))}\n        </SelectContent>\n      </Select>\n    </SettingsRow>\n  );\n}\n\ntype ChoiceOption = { value: string; label: string; line: string };\n\ntype ChoiceCardsProps = {\n  label: string;\n  value: string;\n  options: ChoiceOption[];\n  onValueChange: (value: string) => void;\n};\n\nexport function ChoiceCards({\n  label,\n  value,\n  options,\n  onValueChange,\n}: ChoiceCardsProps) {\n  function changeValue(nextValue: unknown) {\n    if (typeof nextValue === 'string') {\n      onValueChange(nextValue);\n    }\n  }\n\n  return (\n    <RadioGroup\n      aria-label={label}\n      value={value}\n      onValueChange={changeValue}\n      className={cn(SETTINGS_SURFACE, 'gap-0')}\n    >\n      {options.map((option) => {\n        const isPicked = option.value === value;\n\n        return (\n          <label\n            key={option.value}\n            className={cn(\n              'flex cursor-pointer items-start gap-3 px-4 py-3 transition-colors duration-150',\n              isPicked && 'bg-primary/[0.06]'\n            )}\n          >\n            <RadioGroupItem value={option.value} className='mt-0.5' />\n            <span className='flex min-w-0 flex-col gap-0.5'>\n              <span className='text-[13px] font-medium'>{option.label}</span>\n              <span className='text-muted-foreground text-xs'>\n                {option.line}\n              </span>\n            </span>\n          </label>\n        );\n      })}\n    </RadioGroup>\n  );\n}\n\ntype DangerRowProps = {\n  label: string;\n  line: string;\n  dialogTitle: string;\n  actionLabel: string;\n  objectName: string;\n  consequences: string[];\n  scheduledLine: string;\n};\n\nexport function DangerRow({\n  label,\n  line,\n  dialogTitle,\n  actionLabel,\n  objectName,\n  consequences,\n  scheduledLine,\n}: DangerRowProps) {\n  const [isOpen, setIsOpen] = useState(false);\n  const [typedName, setTypedName] = useState('');\n  const [isScheduled, setIsScheduled] = useState(false);\n  const confirmFieldId = useId();\n  const isNameTyped = typedName.trim() === objectName;\n\n  function openConfirmation() {\n    setTypedName('');\n    setIsOpen(true);\n  }\n\n  function changeTypedName(event: React.ChangeEvent<HTMLInputElement>) {\n    setTypedName(event.target.value);\n  }\n\n  function confirmDeletion() {\n    setIsScheduled(true);\n  }\n\n  function cancelDeletion() {\n    setIsScheduled(false);\n  }\n\n  if (isScheduled) {\n    return (\n      <SettingsRow label={label} line={scheduledLine}>\n        <Button variant='outline' onClick={cancelDeletion}>\n          Cancel deletion\n        </Button>\n      </SettingsRow>\n    );\n  }\n\n  return (\n    <SettingsRow label={label} line={line}>\n      <Button\n        variant='outline'\n        onClick={openConfirmation}\n        className='text-destructive-ink'\n      >\n        {actionLabel}\n      </Button>\n      <AlertDialog open={isOpen} onOpenChange={setIsOpen}>\n        <AlertDialogContent>\n          <AlertDialogHeader>\n            <AlertDialogTitle>{dialogTitle}</AlertDialogTitle>\n            <AlertDialogDescription>\n              This cannot be undone once the grace period ends\n            </AlertDialogDescription>\n          </AlertDialogHeader>\n          <ul className='bg-foreground/[0.03] hairline-divide-y divide-border flex flex-col rounded-lg'>\n            {consequences.map((consequence) => (\n              <li key={consequence} className='px-3 py-2 text-[13px]'>\n                {consequence}\n              </li>\n            ))}\n          </ul>\n          <div className='flex flex-col gap-1.5'>\n            <label\n              htmlFor={confirmFieldId}\n              className='text-muted-foreground text-xs'\n            >\n              Type{' '}\n              <span className='text-foreground font-medium'>{objectName}</span>{' '}\n              to confirm\n            </label>\n            <Input\n              id={confirmFieldId}\n              value={typedName}\n              autoComplete='off'\n              onChange={changeTypedName}\n            />\n          </div>\n          <AlertDialogFooter>\n            <AlertDialogCancel>Keep it</AlertDialogCancel>\n            <AlertDialogAction\n              variant='destructive'\n              disabled={!isNameTyped}\n              onClick={confirmDeletion}\n            >\n              {actionLabel}\n            </AlertDialogAction>\n          </AlertDialogFooter>\n        </AlertDialogContent>\n      </AlertDialog>\n    </SettingsRow>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/app-shells-03/settings-kit.tsx"
    },
    {
      "path": "registry/ndeko/blocks/app-shells/app-shells-03/settings-pages.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 { CircleIcon, PlusIcon } from '@/registry/ndeko/lib/icons';\nimport { Badge } from '@/registry/ndeko/ui/badge';\nimport { Button } from '@/registry/ndeko/ui/button';\nimport { Chip } from '@/registry/ndeko/ui/chip';\nimport { Input } from '@/registry/ndeko/ui/input';\nimport {\n  Select,\n  SelectContent,\n  SelectItem,\n  SelectTrigger,\n  SelectValue,\n} from '@/registry/ndeko/ui/select';\n\nimport {\n  CURRENT_USER_ID,\n  PEOPLE,\n  ROLE_OPTIONS,\n  TIME_ZONES,\n  VISIBILITY_OPTIONS,\n  WEEK_STARTS,\n  type MemberRole,\n  type PropertyValue,\n  type SettingsPageId,\n  type Visibility,\n} from './data';\nimport {\n  ChoiceCards,\n  DangerRow,\n  InlineTextRow,\n  SETTINGS_SURFACE,\n  SelectRow,\n  SettingsPage,\n  SettingsSection,\n  SwitchRow,\n  describedByOf,\n} from './settings-kit';\nimport { PersonAvatar } from './sidebar-parts';\n\nexport type SettingsState = {\n  fullName: string;\n  email: string;\n  title: string;\n  timeZone: string;\n  weekStart: string;\n  remindToTrack: boolean;\n  stopWhenIdle: boolean;\n  showSeconds: boolean;\n  mailAssignments: boolean;\n  mailMentions: boolean;\n  mailWeeklySummary: boolean;\n  appComments: boolean;\n  appStatusChanges: boolean;\n  teamName: string;\n  teamKey: string;\n  visibility: Visibility;\n  roles: Record<string, MemberRole>;\n  statuses: PropertyValue[];\n  labels: PropertyValue[];\n};\n\ntype SettingsPatch = Partial<SettingsState>;\n\ntype PageProps = {\n  settings: SettingsState;\n  onChange: (patch: SettingsPatch) => void;\n};\n\nconst NEW_VALUE_COLORS = [\n  'var(--primary)',\n  'var(--info)',\n  'var(--success)',\n  'var(--warning)',\n  'var(--destructive)',\n];\n\nconst PRESENCE_IN: Transition = { duration: 0.2, ease: [0.23, 1, 0.32, 1] };\n\nconst PRESENCE_OUT: Transition = { duration: 0.14, ease: [0.23, 1, 0.32, 1] };\n\nconst ROW_PRESENCE: Variants = {\n  hidden: { height: 0, opacity: 0, transition: PRESENCE_OUT },\n  shown: { height: 'auto', opacity: 1, transition: PRESENCE_IN },\n};\n\nconst ROW_FADE: Variants = {\n  hidden: { opacity: 0, transition: PRESENCE_OUT },\n  shown: { opacity: 1, transition: PRESENCE_IN },\n};\n\nconst EMAIL_PATTERN = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n\nconst TEAM_KEY_PATTERN = /^[A-Z]{2,5}$/;\n\nfunction rowVariantsOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return ROW_FADE;\n  }\n  return ROW_PRESENCE;\n}\n\nfunction taskCountLabel(count: number) {\n  if (count === 1) {\n    return '1 task';\n  }\n  return `${count} tasks`;\n}\n\nfunction validateName(draft: string) {\n  if (draft.length === 0) {\n    return 'Enter a name';\n  }\n  return null;\n}\n\nfunction validateEmail(draft: string) {\n  const isEmail = EMAIL_PATTERN.test(draft);\n  if (!isEmail) {\n    return 'Enter an address like name@company.com';\n  }\n  return null;\n}\n\nfunction validateTeamKey(draft: string) {\n  const isKey = TEAM_KEY_PATTERN.test(draft);\n  if (!isKey) {\n    return 'Use 2 to 5 capital letters, such as LAT';\n  }\n  return null;\n}\n\nfunction isVisibility(value: string): value is Visibility {\n  const isPublic = value === 'public';\n  const isPrivate = value === 'private';\n  return isPublic || isPrivate;\n}\n\nfunction isMemberRole(value: unknown): value is MemberRole {\n  return ROLE_OPTIONS.some((option) => option.value === value);\n}\n\nfunction ProfilePage({ settings, onChange }: PageProps) {\n  return (\n    <SettingsPage\n      title='Profile'\n      line='How your teammates see you across Lattice Studio'\n    >\n      <SettingsSection title='Identity'>\n        <InlineTextRow\n          label='Full name'\n          line='Shown on tasks, comments and timesheets'\n          value={settings.fullName}\n          validate={validateName}\n          onSave={(fullName) => onChange({ fullName })}\n        />\n        <InlineTextRow\n          label='Title'\n          line='A few words under your name in member lists'\n          value={settings.title}\n          validate={validateName}\n          onSave={(title) => onChange({ title })}\n        />\n        <InlineTextRow\n          label='E-mail'\n          line='Where invitations and summaries are sent'\n          value={settings.email}\n          inputType='email'\n          validate={validateEmail}\n          onSave={(email) => onChange({ email })}\n        />\n      </SettingsSection>\n      <SettingsSection title='Region'>\n        <SelectRow\n          label='Time zone'\n          line='Days and timesheets start at midnight here'\n          value={settings.timeZone}\n          options={TIME_ZONES}\n          onValueChange={(timeZone) => onChange({ timeZone })}\n        />\n      </SettingsSection>\n      <SettingsSection title='Danger zone'>\n        <DangerRow\n          label='Delete account'\n          line='Removes your profile, your time entries and your access to every workspace'\n          dialogTitle={`Delete the account of ${settings.fullName}?`}\n          actionLabel='Delete account'\n          objectName={settings.fullName}\n          consequences={[\n            'You leave Lattice Studio and its 1 team',\n            'Your 5 assigned tasks become unassigned',\n            'Time you logged stays in the team reports, without your name',\n          ]}\n          scheduledLine='Deletion scheduled: your account closes in 14 days unless you cancel'\n        />\n      </SettingsSection>\n    </SettingsPage>\n  );\n}\n\nfunction PreferencesPage({ settings, onChange }: PageProps) {\n  return (\n    <SettingsPage\n      title='Preferences'\n      line='Choices that only change the app for you'\n    >\n      <SettingsSection title='Calendar'>\n        <SelectRow\n          label='Start of the week'\n          line='Used by timesheets, cycles and date pickers'\n          value={settings.weekStart}\n          options={WEEK_STARTS}\n          onValueChange={(weekStart) => onChange({ weekStart })}\n        />\n      </SettingsSection>\n      <SettingsSection title='Time tracking'>\n        <SwitchRow\n          label='Remind me to track time'\n          line='A notice when you open a task in progress without a timer'\n          checked={settings.remindToTrack}\n          onCheckedChange={(remindToTrack) => onChange({ remindToTrack })}\n        />\n        <SwitchRow\n          label='Pause the timer when I am idle'\n          line='After 10 minutes without keyboard or pointer activity'\n          checked={settings.stopWhenIdle}\n          onCheckedChange={(stopWhenIdle) => onChange({ stopWhenIdle })}\n        />\n        <SwitchRow\n          label='Show seconds'\n          line='In the timer of the top bar and on task cards'\n          checked={settings.showSeconds}\n          onCheckedChange={(showSeconds) => onChange({ showSeconds })}\n        />\n      </SettingsSection>\n    </SettingsPage>\n  );\n}\n\nfunction NotificationsPage({ settings, onChange }: PageProps) {\n  return (\n    <SettingsPage\n      title='Notifications'\n      line='What reaches your inbox and your e-mail'\n    >\n      <SettingsSection title='E-mail' line={`Sent to ${settings.email}.`}>\n        <SwitchRow\n          label='Assignments'\n          line='When someone assigns you a task'\n          checked={settings.mailAssignments}\n          onCheckedChange={(mailAssignments) => onChange({ mailAssignments })}\n        />\n        <SwitchRow\n          label='Mentions'\n          line='When someone writes your name in a comment'\n          checked={settings.mailMentions}\n          onCheckedChange={(mailMentions) => onChange({ mailMentions })}\n        />\n        <SwitchRow\n          label='Weekly summary'\n          line='Your hours and finished tasks, every Monday morning'\n          checked={settings.mailWeeklySummary}\n          onCheckedChange={(mailWeeklySummary) =>\n            onChange({ mailWeeklySummary })\n          }\n        />\n      </SettingsSection>\n      <SettingsSection title='Inbox'>\n        <SwitchRow\n          label='Comments on my tasks'\n          line='Every new comment on a task you own'\n          checked={settings.appComments}\n          onCheckedChange={(appComments) => onChange({ appComments })}\n        />\n        <SwitchRow\n          label='Status changes'\n          line='When a task you follow moves to another status'\n          checked={settings.appStatusChanges}\n          onCheckedChange={(appStatusChanges) => onChange({ appStatusChanges })}\n        />\n      </SettingsSection>\n    </SettingsPage>\n  );\n}\n\nfunction TeamGeneralPage({ settings, onChange }: PageProps) {\n  function changeVisibility(value: string) {\n    if (isVisibility(value)) {\n      onChange({ visibility: value });\n    }\n  }\n\n  return (\n    <SettingsPage\n      title='General'\n      line={`The name, the key and the visibility of the ${settings.teamName} team`}\n    >\n      <SettingsSection title='Team'>\n        <InlineTextRow\n          label='Name'\n          line='Shown in the sidebar and in every switcher'\n          value={settings.teamName}\n          validate={validateName}\n          onSave={(teamName) => onChange({ teamName })}\n        />\n        <InlineTextRow\n          label='Key'\n          line='The prefix of task numbers, such as LAT-142'\n          value={settings.teamKey}\n          validate={validateTeamKey}\n          onSave={(teamKey) => onChange({ teamKey })}\n        />\n      </SettingsSection>\n      <section className='flex flex-col gap-3'>\n        <div className='flex flex-col gap-0.5'>\n          <h2 className='text-sm font-medium'>Visibility</h2>\n          <p className='text-muted-foreground text-xs'>\n            Changes what people outside the team can see\n          </p>\n        </div>\n        <ChoiceCards\n          label='Visibility'\n          value={settings.visibility}\n          options={VISIBILITY_OPTIONS}\n          onValueChange={changeVisibility}\n        />\n      </section>\n      <SettingsSection title='Danger zone'>\n        <DangerRow\n          label='Delete team'\n          line='Removes the team, its board and its cycles for every member'\n          dialogTitle={`Delete the ${settings.teamName} team?`}\n          actionLabel='Delete team'\n          objectName={settings.teamName}\n          consequences={[\n            'The 6 members lose access to the team’s tasks',\n            'The 9 tasks of the team move to the workspace archive',\n            'Time already logged stays in the workspace reports',\n          ]}\n          scheduledLine='Deletion scheduled: the team closes in 14 days unless you cancel'\n        />\n      </SettingsSection>\n    </SettingsPage>\n  );\n}\n\nfunction roleLineOf(isCurrentUser: boolean, title: string) {\n  if (isCurrentUser) {\n    return 'You cannot change your own role';\n  }\n  return title;\n}\n\nfunction TeamMembersPage({ settings, onChange }: PageProps) {\n  function changeRole(personId: string, role: unknown) {\n    if (!isMemberRole(role)) {\n      return;\n    }\n    const roles = { ...settings.roles, [personId]: role };\n    onChange({ roles });\n  }\n\n  return (\n    <SettingsPage\n      title='Members'\n      line='Managers change the team’s settings and viewers read without editing'\n    >\n      <SettingsSection title={`${PEOPLE.length} members`}>\n        {PEOPLE.map((person) => {\n          const isCurrentUser = person.id === CURRENT_USER_ID;\n          const roleLine = roleLineOf(isCurrentUser, person.role);\n\n          function selectRole(role: unknown) {\n            changeRole(person.id, role);\n          }\n\n          return (\n            <div\n              key={person.id}\n              className='flex min-h-14 items-center gap-3 px-4 py-2.5'\n            >\n              <PersonAvatar person={person} className='size-8' />\n              <div className='flex min-w-0 flex-1 flex-col gap-0.5'>\n                <p className='flex items-center gap-2 text-[13px] font-medium'>\n                  <span className='truncate'>{person.name}</span>\n                  {isCurrentUser && (\n                    <Badge\n                      variant='secondary'\n                      className='text-muted-foreground'\n                    >\n                      You\n                    </Badge>\n                  )}\n                </p>\n                <p className='text-muted-foreground truncate text-xs'>\n                  {roleLine}\n                </p>\n              </div>\n              <Select\n                items={ROLE_OPTIONS}\n                value={settings.roles[person.id]}\n                onValueChange={selectRole}\n                disabled={isCurrentUser}\n              >\n                <SelectTrigger\n                  size='sm'\n                  aria-label={`Role of ${person.name}`}\n                  className='w-28'\n                >\n                  <SelectValue />\n                </SelectTrigger>\n                <SelectContent>\n                  {ROLE_OPTIONS.map((option) => (\n                    <SelectItem key={option.value} value={option.value}>\n                      {option.label}\n                    </SelectItem>\n                  ))}\n                </SelectContent>\n              </Select>\n            </div>\n          );\n        })}\n      </SettingsSection>\n    </SettingsPage>\n  );\n}\n\nfunction ValueTile({\n  value,\n  kind,\n}: {\n  value: PropertyValue;\n  kind: 'status' | 'label';\n}) {\n  const tileStyle = { '--chip': value.color } as React.CSSProperties;\n  if (kind === 'status') {\n    return (\n      <span\n        style={tileStyle}\n        className='chip-3d flex size-6 shrink-0 items-center justify-center rounded-md'\n      >\n        <CircleIcon className='size-3.5' strokeWidth={2.25} />\n      </span>\n    );\n  }\n  return <Chip color={value.color}>{value.name}</Chip>;\n}\n\ntype PropertyListProps = {\n  kind: 'status' | 'label';\n  values: PropertyValue[];\n  onAdd: (name: string) => void;\n};\n\nfunction PropertyList({ kind, values, onAdd }: PropertyListProps) {\n  const [isAdding, setIsAdding] = useState(false);\n  const [draft, setDraft] = useState('');\n  const [error, setError] = useState<string | null>(null);\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const rowVariants = rowVariantsOf(shouldReduceMotion);\n  const errorId = useId();\n  const hasError = Boolean(error);\n  const describedBy = describedByOf(hasError, errorId);\n\n  function startAdding() {\n    setDraft('');\n    setError(null);\n    setIsAdding(true);\n  }\n\n  function stopAdding() {\n    setIsAdding(false);\n    setError(null);\n  }\n\n  function changeDraft(event: React.ChangeEvent<HTMLInputElement>) {\n    setDraft(event.target.value);\n    setError(null);\n  }\n\n  function handleKeyDown(event: React.KeyboardEvent<HTMLInputElement>) {\n    if (event.key === 'Escape') {\n      event.preventDefault();\n      stopAdding();\n    }\n  }\n\n  function addValue(event: React.FormEvent<HTMLFormElement>) {\n    event.preventDefault();\n    const name = draft.trim();\n    if (name.length === 0) {\n      setError(`Enter the name of the ${kind}.`);\n      return;\n    }\n    const lowerName = name.toLowerCase();\n    const isTaken = values.some(\n      (value) => value.name.toLowerCase() === lowerName\n    );\n    if (isTaken) {\n      setError(`A ${kind} named ${name} already exists`);\n      return;\n    }\n    onAdd(name);\n    setDraft('');\n  }\n\n  return (\n    <div className='flex flex-col gap-2'>\n      <ul className={SETTINGS_SURFACE}>\n        <AnimatePresence initial={false}>\n          {values.map((value) => (\n            <motion.li\n              key={value.id}\n              variants={rowVariants}\n              initial='hidden'\n              animate='shown'\n              exit='hidden'\n              className='overflow-hidden'\n            >\n              <div className='flex h-12 items-center gap-3 px-4'>\n                <ValueTile value={value} kind={kind} />\n                {kind === 'status' && (\n                  <span className='min-w-0 flex-1 truncate text-[13px] font-medium'>\n                    {value.name}\n                  </span>\n                )}\n                {kind === 'label' && <span className='flex-1' />}\n                <span className='text-muted-foreground text-xs tabular-nums'>\n                  {taskCountLabel(value.taskCount)}\n                </span>\n              </div>\n            </motion.li>\n          ))}\n        </AnimatePresence>\n      </ul>\n      {isAdding && (\n        <form onSubmit={addValue} className='flex flex-col gap-1.5'>\n          <div className='flex items-center gap-2'>\n            <Input\n              autoFocus\n              value={draft}\n              placeholder={`Name of the ${kind}`}\n              aria-label={`Name of the new ${kind}`}\n              aria-invalid={hasError}\n              aria-describedby={describedBy}\n              onChange={changeDraft}\n              onKeyDown={handleKeyDown}\n            />\n            <Button type='button' variant='ghost' onClick={stopAdding}>\n              Done\n            </Button>\n            <Button type='submit'>Add</Button>\n          </div>\n          {hasError && (\n            <p id={errorId} className='text-destructive-ink text-xs'>\n              {error}\n            </p>\n          )}\n        </form>\n      )}\n      {!isAdding && (\n        <button\n          type='button'\n          onClick={startAdding}\n          className='hairline-border text-muted-foreground hover:text-foreground focus-visible:ring-ring/25 border-foreground/20 hover:border-foreground/35 flex h-11 cursor-pointer items-center gap-2 rounded-xl border-dashed px-4 text-[13px] transition-colors duration-150 outline-none focus-visible:ring-[3px]'\n        >\n          <PlusIcon className='size-4' />\n          {`Add ${kind}`}\n        </button>\n      )}\n    </div>\n  );\n}\n\nfunction newValueOf(name: string, values: PropertyValue[]): PropertyValue {\n  const colorIndex = values.length % NEW_VALUE_COLORS.length;\n  return {\n    id: `${name.toLowerCase().replace(/\\s+/g, '-')}-${values.length}`,\n    name,\n    color: NEW_VALUE_COLORS[colorIndex],\n    taskCount: 0,\n  };\n}\n\nfunction StatusesPage({ settings, onChange }: PageProps) {\n  function addStatus(name: string) {\n    const added = newValueOf(name, settings.statuses);\n    onChange({ statuses: [...settings.statuses, added] });\n  }\n\n  return (\n    <SettingsPage\n      title='Statuses'\n      line='The steps a task goes through, in the order of the board'\n    >\n      <PropertyList\n        kind='status'\n        values={settings.statuses}\n        onAdd={addStatus}\n      />\n    </SettingsPage>\n  );\n}\n\nfunction LabelsPage({ settings, onChange }: PageProps) {\n  function addLabel(name: string) {\n    const added = newValueOf(name, settings.labels);\n    onChange({ labels: [...settings.labels, added] });\n  }\n\n  return (\n    <SettingsPage\n      title='Labels'\n      line='Tags that group tasks across projects and statuses'\n    >\n      <PropertyList kind='label' values={settings.labels} onAdd={addLabel} />\n    </SettingsPage>\n  );\n}\n\nconst PAGES: Record<SettingsPageId, (props: PageProps) => React.ReactNode> = {\n  'settings-profile': ProfilePage,\n  'settings-preferences': PreferencesPage,\n  'settings-notifications': NotificationsPage,\n  'settings-team-general': TeamGeneralPage,\n  'settings-team-members': TeamMembersPage,\n  'settings-statuses': StatusesPage,\n  'settings-labels': LabelsPage,\n};\n\nexport function SettingsView({\n  pageId,\n  settings,\n  onChange,\n}: PageProps & { pageId: SettingsPageId }) {\n  const Page = PAGES[pageId];\n  return <Page settings={settings} onChange={onChange} />;\n}\n",
      "type": "registry:component",
      "target": "components/blocks/app-shells-03/settings-pages.tsx"
    },
    {
      "path": "registry/ndeko/blocks/app-shells/app-shells-03/page-views.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  CircleCheckIcon,\n  CircleIcon,\n  FolderIcon,\n  InboxIcon,\n  PlusIcon,\n  type Icon,\n} from '@/registry/ndeko/lib/icons';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport { Badge } from '@/registry/ndeko/ui/badge';\nimport { Button } from '@/registry/ndeko/ui/button';\nimport { Tabs, TabsList, TabsTab } from '@/registry/ndeko/ui/tabs';\n\nimport {\n  CURRENT_USER_ID,\n  personOf,\n  projectOf,\n  type EmptyPage,\n  type Notification,\n  type Person,\n  type Project,\n  type Task,\n} from './data';\nimport { PersonAvatar } from './sidebar-parts';\n\nconst LIST_SURFACE =\n  'bg-card hairline-ring ring-border overflow-hidden rounded-xl shadow-[0_1px_2px_rgb(0_0_0/0.04)]';\n\nconst PRESENCE_IN: Transition = { duration: 0.2, ease: [0.23, 1, 0.32, 1] };\n\nconst PRESENCE_OUT: Transition = { duration: 0.14, ease: [0.23, 1, 0.32, 1] };\n\nconst ROW_PRESENCE: Variants = {\n  hidden: { height: 0, opacity: 0, transition: PRESENCE_OUT },\n  shown: { height: 'auto', opacity: 1, transition: PRESENCE_IN },\n};\n\nconst ROW_FADE: Variants = {\n  hidden: { opacity: 0, transition: PRESENCE_OUT },\n  shown: { opacity: 1, transition: PRESENCE_IN },\n};\n\nfunction rowVariantsOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return ROW_FADE;\n  }\n  return ROW_PRESENCE;\n}\n\nfunction countLabel(count: number, singular: string, plural: string) {\n  if (count === 1) {\n    return `1 ${singular}`;\n  }\n  return `${count} ${plural}`;\n}\n\nfunction PresenceRow({\n  children,\n  className,\n}: {\n  children: React.ReactNode;\n  className?: string;\n}) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const variants = rowVariantsOf(shouldReduceMotion);\n\n  return (\n    <motion.li\n      variants={variants}\n      initial='hidden'\n      animate='shown'\n      exit='hidden'\n      className={cn('overflow-hidden', className)}\n    >\n      {children}\n    </motion.li>\n  );\n}\n\nfunction PageToolbar({\n  title,\n  meta,\n  children,\n}: {\n  title: string;\n  meta: string;\n  children?: React.ReactNode;\n}) {\n  return (\n    <div className='flex shrink-0 flex-wrap items-center gap-x-3 gap-y-2 px-4 py-3 md:px-6'>\n      <div className='flex min-w-0 items-baseline gap-2'>\n        <h1 className='truncate text-lg font-semibold text-balance'>{title}</h1>\n        <span className='text-muted-foreground shrink-0 text-xs tabular-nums'>\n          {meta}\n        </span>\n      </div>\n      <div className='ml-auto flex items-center gap-2'>{children}</div>\n    </div>\n  );\n}\n\nfunction PageBody({ children }: { children: React.ReactNode }) {\n  return (\n    <div className='min-h-0 flex-1 overflow-y-auto p-4 md:p-6'>\n      <div className='mx-auto w-full max-w-4xl'>{children}</div>\n    </div>\n  );\n}\n\nfunction EmptyState({\n  icon: StateIcon,\n  title,\n  line,\n  children,\n}: {\n  icon: Icon;\n  title: string;\n  line: string;\n  children?: React.ReactNode;\n}) {\n  return (\n    <div className='flex flex-col items-center gap-3 px-4 py-16 text-center'>\n      <span className='keycap-3d text-muted-foreground flex size-10 items-center justify-center rounded-lg'>\n        <StateIcon className='size-5' />\n      </span>\n      <div className='flex flex-col gap-1'>\n        <p className='text-sm font-medium text-balance'>{title}</p>\n        <p className='text-muted-foreground max-w-xs text-[13px] text-balance'>\n          {line}\n        </p>\n      </div>\n      {children}\n    </div>\n  );\n}\n\ntype Scope = 'active' | 'done';\n\nfunction isScope(value: unknown): value is Scope {\n  const isActive = value === 'active';\n  const isDone = value === 'done';\n  return isActive || isDone;\n}\n\nfunction isInScope(task: Task, scope: Scope) {\n  if (scope === 'done') {\n    return task.isDone;\n  }\n  return !task.isDone;\n}\n\nfunction toggleLabelOf(task: Task) {\n  if (task.isDone) {\n    return `Reopen ${task.number}`;\n  }\n  return `Mark ${task.number} as done`;\n}\n\nfunction StatusGlyph({ isDone }: { isDone: boolean }) {\n  if (isDone) {\n    return <CircleCheckIcon className='text-success-foreground size-4' />;\n  }\n  return <CircleIcon className='text-muted-foreground size-4' />;\n}\n\nfunction TaskRow({\n  task,\n  showAssignee,\n  onToggle,\n}: {\n  task: Task;\n  showAssignee: boolean;\n  onToggle: (taskId: string) => void;\n}) {\n  const project = projectOf(task.projectId);\n  const assignee = personOf(task.assigneeId);\n\n  function toggleTask() {\n    onToggle(task.id);\n  }\n\n  return (\n    <div className='flex h-10 items-center gap-3 px-3'>\n      <button\n        type='button'\n        aria-label={toggleLabelOf(task)}\n        onClick={toggleTask}\n        className='hover:bg-foreground/5 focus-visible:ring-ring/25 -m-1 flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-md outline-none focus-visible:ring-[3px]'\n      >\n        <StatusGlyph isDone={task.isDone} />\n      </button>\n      <span className='text-muted-foreground w-14 shrink-0 text-xs tabular-nums'>\n        {task.number}\n      </span>\n      <span\n        className={cn(\n          'min-w-0 flex-1 truncate text-[13px]',\n          task.isDone && 'text-muted-foreground'\n        )}\n      >\n        {task.title}\n      </span>\n      <Badge\n        variant='secondary'\n        className='text-muted-foreground hidden sm:inline-flex'\n      >\n        {project.name}\n      </Badge>\n      <span className='text-muted-foreground hidden w-20 shrink-0 text-right text-xs md:block'>\n        {task.due}\n      </span>\n      {showAssignee && (\n        <PersonAvatar person={assignee} className='size-6 text-[10px]' />\n      )}\n    </div>\n  );\n}\n\ntype TaskListPageProps = {\n  title: string;\n  tasks: Task[];\n  showAssignee: boolean;\n  onToggleTask: (taskId: string) => void;\n  onCreateTask: () => void;\n};\n\nexport function TaskListPage({\n  title,\n  tasks,\n  showAssignee,\n  onToggleTask,\n  onCreateTask,\n}: TaskListPageProps) {\n  const [scope, setScope] = useState<Scope>('active');\n  const activeTasks = tasks.filter((task) => !task.isDone);\n  const doneTasks = tasks.filter((task) => task.isDone);\n  const visibleTasks = tasks.filter((task) => isInScope(task, scope));\n  const isEmpty = visibleTasks.length === 0;\n  const isActiveScope = scope === 'active';\n  const showsActiveEmpty = isEmpty && isActiveScope;\n  const showsDoneEmpty = isEmpty && !isActiveScope;\n  const meta = countLabel(activeTasks.length, 'open task', 'open tasks');\n\n  function changeScope(value: unknown) {\n    if (isScope(value)) {\n      setScope(value);\n    }\n  }\n\n  function showDone() {\n    setScope('done');\n  }\n\n  function showActive() {\n    setScope('active');\n  }\n\n  return (\n    <>\n      <PageToolbar title={title} meta={meta}>\n        <Tabs value={scope} onValueChange={changeScope}>\n          <TabsList variant='segmented' aria-label='Tasks to show'>\n            <TabsTab value='active'>\n              Active\n              <span className='text-muted-foreground text-xs tabular-nums'>\n                {activeTasks.length}\n              </span>\n            </TabsTab>\n            <TabsTab value='done'>\n              Done\n              <span className='text-muted-foreground text-xs tabular-nums'>\n                {doneTasks.length}\n              </span>\n            </TabsTab>\n          </TabsList>\n        </Tabs>\n        <Button onClick={onCreateTask}>\n          <PlusIcon />\n          New task\n        </Button>\n      </PageToolbar>\n      <PageBody>\n        {showsActiveEmpty && (\n          <EmptyState\n            icon={CircleCheckIcon}\n            title='Nothing left to do'\n            line='Every task on this list is done'\n          >\n            <Button variant='outline' onClick={showDone}>\n              Show done tasks\n            </Button>\n          </EmptyState>\n        )}\n        {showsDoneEmpty && (\n          <EmptyState\n            icon={CircleIcon}\n            title='No finished task yet'\n            line='Tasks you mark as done move here'\n          >\n            <Button variant='outline' onClick={showActive}>\n              Show active tasks\n            </Button>\n          </EmptyState>\n        )}\n        {!isEmpty && (\n          <ul className={LIST_SURFACE}>\n            <AnimatePresence initial={false}>\n              {visibleTasks.map((task) => (\n                <PresenceRow key={task.id}>\n                  <TaskRow\n                    task={task}\n                    showAssignee={showAssignee}\n                    onToggle={onToggleTask}\n                  />\n                </PresenceRow>\n              ))}\n            </AnimatePresence>\n          </ul>\n        )}\n      </PageBody>\n    </>\n  );\n}\n\ntype InboxScope = 'unread' | 'all';\n\nfunction isInboxScope(value: unknown): value is InboxScope {\n  const isUnread = value === 'unread';\n  const isAll = value === 'all';\n  return isUnread || isAll;\n}\n\nfunction NotificationRow({\n  notification,\n  onRead,\n}: {\n  notification: Notification;\n  onRead: (notificationId: string) => void;\n}) {\n  const actor = personOf(notification.actorId);\n\n  function readNotification() {\n    onRead(notification.id);\n  }\n\n  return (\n    <button\n      type='button'\n      onClick={readNotification}\n      className='hover:bg-foreground/[0.025] focus-visible:ring-ring/25 flex w-full cursor-pointer items-center gap-3 px-3 py-2.5 text-left outline-none focus-visible:ring-[3px] focus-visible:ring-inset'\n    >\n      <span className='flex w-1.5 shrink-0 justify-center'>\n        {notification.isUnread && (\n          <span className='bg-primary size-1.5 rounded-full'>\n            <span className='sr-only'>Unread</span>\n          </span>\n        )}\n      </span>\n      <PersonAvatar person={actor} className='size-7 text-[10px]' />\n      <span className='min-w-0 flex-1'>\n        <span className='block truncate text-[13px]'>\n          <span className='font-medium'>{actor.name}</span>{' '}\n          {notification.action}\n        </span>\n        <span className='text-muted-foreground block truncate text-xs'>\n          {notification.subject}\n        </span>\n      </span>\n      <span className='text-muted-foreground shrink-0 text-xs'>\n        {notification.time}\n      </span>\n    </button>\n  );\n}\n\ntype InboxPageProps = {\n  notifications: Notification[];\n  onRead: (notificationId: string) => void;\n  onReadAll: () => void;\n};\n\nexport function InboxPage({\n  notifications,\n  onRead,\n  onReadAll,\n}: InboxPageProps) {\n  const [scope, setScope] = useState<InboxScope>('unread');\n  const unreadNotifications = notifications.filter((note) => note.isUnread);\n  const unreadCount = unreadNotifications.length;\n  const hasUnread = unreadCount > 0;\n  const isUnreadScope = scope === 'unread';\n  let visibleNotifications = notifications;\n  if (isUnreadScope) {\n    visibleNotifications = unreadNotifications;\n  }\n  const isEmpty = visibleNotifications.length === 0;\n  const meta = countLabel(unreadCount, 'unread', 'unread');\n\n  function changeScope(value: unknown) {\n    if (isInboxScope(value)) {\n      setScope(value);\n    }\n  }\n\n  function showAll() {\n    setScope('all');\n  }\n\n  return (\n    <>\n      <PageToolbar title='Inbox' meta={meta}>\n        <Tabs value={scope} onValueChange={changeScope}>\n          <TabsList variant='segmented' aria-label='Notifications to show'>\n            <TabsTab value='unread'>Unread</TabsTab>\n            <TabsTab value='all'>All</TabsTab>\n          </TabsList>\n        </Tabs>\n        <Button variant='outline' disabled={!hasUnread} onClick={onReadAll}>\n          Mark all as read\n        </Button>\n      </PageToolbar>\n      <PageBody>\n        {isEmpty && (\n          <EmptyState\n            icon={InboxIcon}\n            title='You are all caught up'\n            line='Earlier notifications stay under All'\n          >\n            <Button variant='outline' onClick={showAll}>\n              Show all notifications\n            </Button>\n          </EmptyState>\n        )}\n        {!isEmpty && (\n          <ul className={LIST_SURFACE}>\n            <AnimatePresence initial={false}>\n              {visibleNotifications.map((notification) => (\n                <PresenceRow key={notification.id}>\n                  <NotificationRow\n                    notification={notification}\n                    onRead={onRead}\n                  />\n                </PresenceRow>\n              ))}\n            </AnimatePresence>\n          </ul>\n        )}\n      </PageBody>\n    </>\n  );\n}\n\ntype ProjectsPageProps = {\n  projects: Project[];\n  tasks: Task[];\n  onCreateProject: () => void;\n};\n\nexport function ProjectsPage({\n  projects,\n  tasks,\n  onCreateProject,\n}: ProjectsPageProps) {\n  const meta = countLabel(projects.length, 'project', 'projects');\n\n  function openCountOf(projectId: string) {\n    const openTasks = tasks.filter((task) => {\n      const isOfProject = task.projectId === projectId;\n      return isOfProject && !task.isDone;\n    });\n    return openTasks.length;\n  }\n\n  return (\n    <>\n      <PageToolbar title='Projects' meta={meta}>\n        <Button onClick={onCreateProject}>\n          <PlusIcon />\n          New project\n        </Button>\n      </PageToolbar>\n      <PageBody>\n        <ul className={LIST_SURFACE}>\n          <AnimatePresence initial={false}>\n            {projects.map((project) => {\n              const lead = personOf(project.leadId);\n              const openCount = openCountOf(project.id);\n              return (\n                <PresenceRow key={project.id}>\n                  <div className='flex h-12 items-center gap-3 px-3'>\n                    <span className='keycap-3d text-muted-foreground flex size-7 shrink-0 items-center justify-center rounded-md'>\n                      <FolderIcon className='size-4' />\n                    </span>\n                    <span className='min-w-0 flex-1 truncate text-[13px] font-medium'>\n                      {project.name}\n                    </span>\n                    <span className='text-muted-foreground shrink-0 text-xs tabular-nums'>\n                      {countLabel(openCount, 'open task', 'open tasks')}\n                    </span>\n                    <span className='hidden w-36 shrink-0 items-center gap-2 sm:flex'>\n                      <PersonAvatar\n                        person={lead}\n                        className='size-6 text-[10px]'\n                      />\n                      <span className='text-muted-foreground truncate text-xs'>\n                        {lead.name}\n                      </span>\n                    </span>\n                  </div>\n                </PresenceRow>\n              );\n            })}\n          </AnimatePresence>\n        </ul>\n      </PageBody>\n    </>\n  );\n}\n\nexport function MembersPage({ people }: { people: Person[] }) {\n  const meta = countLabel(people.length, 'member', 'members');\n\n  return (\n    <>\n      <PageToolbar title='Members' meta={meta} />\n      <PageBody>\n        <ul className={LIST_SURFACE}>\n          {people.map((person) => {\n            const isCurrentUser = person.id === CURRENT_USER_ID;\n\n            return (\n              <li key={person.id} className='flex h-12 items-center gap-3 px-3'>\n                <PersonAvatar person={person} className='size-7 text-[10px]' />\n                <span className='flex min-w-0 flex-1 items-center gap-2'>\n                  <span className='truncate text-[13px] font-medium'>\n                    {person.name}\n                  </span>\n                  {isCurrentUser && (\n                    <Badge\n                      variant='secondary'\n                      className='text-muted-foreground'\n                    >\n                      You\n                    </Badge>\n                  )}\n                </span>\n                <span className='text-muted-foreground truncate text-xs'>\n                  {person.role}\n                </span>\n              </li>\n            );\n          })}\n        </ul>\n      </PageBody>\n    </>\n  );\n}\n\nexport function EmptyPageView({\n  title,\n  meta,\n  icon,\n  page,\n}: {\n  title: string;\n  meta: string;\n  icon: Icon;\n  page: EmptyPage;\n}) {\n  return (\n    <>\n      <PageToolbar title={title} meta={meta} />\n      <PageBody>\n        <EmptyState icon={icon} title={page.title} line={page.line} />\n      </PageBody>\n    </>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/app-shells-03/page-views.tsx"
    },
    {
      "path": "registry/ndeko/blocks/app-shells/app-shells-03/data.ts",
      "content": "import {\n  BellIcon,\n  CircleCheckIcon,\n  CircleDashedIcon,\n  ClockIcon,\n  FolderIcon,\n  HashIcon,\n  InboxIcon,\n  LayersIcon,\n  RefreshCwIcon,\n  MonitorIcon,\n  SettingsIcon,\n  UserIcon,\n  UsersIcon,\n  type Icon,\n} from '@/registry/ndeko/lib/icons';\n\nexport type AppPageId =\n  | 'inbox'\n  | 'my-tasks'\n  | 'projects'\n  | 'members'\n  | 'team-tasks'\n  | 'team-cycles'\n  | 'team-timesheets';\n\nexport type SettingsPageId =\n  | 'settings-profile'\n  | 'settings-preferences'\n  | 'settings-notifications'\n  | 'settings-team-general'\n  | 'settings-team-members'\n  | 'settings-statuses'\n  | 'settings-labels';\n\nexport type PageId = AppPageId | SettingsPageId;\n\nexport type Entity = {\n  id: string;\n  name: string;\n  color: string;\n};\n\nexport type Workspace = {\n  id: string;\n  name: string;\n  memberCount: number;\n};\n\nexport type NavItem = {\n  id: PageId;\n  label: string;\n  icon: Icon;\n};\n\nexport type NavGroup = {\n  id: string;\n  label?: string;\n  team?: Entity;\n  items: NavItem[];\n};\n\nexport type Person = {\n  id: string;\n  name: string;\n  role: string;\n};\n\nexport type Project = {\n  id: string;\n  name: string;\n  color: string;\n  leadId: string;\n};\n\nexport type Task = {\n  id: string;\n  number: string;\n  title: string;\n  projectId: string;\n  assigneeId: string;\n  due: string;\n  isDone: boolean;\n};\n\nexport type Notification = {\n  id: string;\n  actorId: string;\n  action: string;\n  subject: string;\n  time: string;\n  isUnread: boolean;\n};\n\nexport type EmptyPage = {\n  title: string;\n  line: string;\n};\n\nexport const WORKSPACES: Workspace[] = [\n  {\n    id: 'lattice',\n    name: 'Lattice Studio',\n    memberCount: 6,\n  },\n  {\n    id: 'quarry',\n    name: 'Quarry Works',\n    memberCount: 21,\n  },\n  {\n    id: 'moonridge',\n    name: 'Moonridge',\n    memberCount: 1,\n  },\n];\n\nexport const PRODUCT_TEAM: Entity = {\n  id: 'product',\n  name: 'Product',\n  color: 'var(--info)',\n};\n\nexport const CURRENT_USER_ID = 'amara';\n\nexport const PEOPLE: Person[] = [\n  {\n    id: 'amara',\n    name: 'Amara Okafor',\n    role: 'Product designer',\n  },\n  {\n    id: 'lucas',\n    name: 'Lucas Moreau',\n    role: 'Engineering lead',\n  },\n  {\n    id: 'priya',\n    name: 'Priya Raman',\n    role: 'Frontend engineer',\n  },\n  {\n    id: 'mateo',\n    name: 'Mateo Silva',\n    role: 'Backend engineer',\n  },\n  {\n    id: 'hana',\n    name: 'Hana Kobayashi',\n    role: 'Product manager',\n  },\n  {\n    id: 'jonas',\n    name: 'Jonas Weber',\n    role: 'QA engineer',\n  },\n];\n\nexport const PROJECTS: Project[] = [\n  {\n    id: 'onboarding',\n    name: 'Onboarding',\n    color: 'var(--primary)',\n    leadId: 'hana',\n  },\n  { id: 'reports', name: 'Reports', color: 'var(--info)', leadId: 'lucas' },\n  { id: 'billing', name: 'Billing', color: 'var(--warning)', leadId: 'mateo' },\n  {\n    id: 'design-system',\n    name: 'Design system',\n    color: 'var(--success)',\n    leadId: 'amara',\n  },\n];\n\nexport const NAV_GROUPS: NavGroup[] = [\n  {\n    id: 'personal',\n    items: [\n      { id: 'inbox', label: 'Inbox', icon: InboxIcon },\n      { id: 'my-tasks', label: 'My tasks', icon: CircleCheckIcon },\n    ],\n  },\n  {\n    id: 'workspace',\n    label: 'Workspace',\n    items: [\n      { id: 'projects', label: 'Projects', icon: FolderIcon },\n      { id: 'members', label: 'Members', icon: UsersIcon },\n    ],\n  },\n  {\n    id: 'team',\n    team: PRODUCT_TEAM,\n    items: [\n      { id: 'team-tasks', label: 'Tasks', icon: LayersIcon },\n      { id: 'team-cycles', label: 'Cycles', icon: RefreshCwIcon },\n      { id: 'team-timesheets', label: 'Timesheets', icon: ClockIcon },\n    ],\n  },\n];\n\nexport const TASKS: Task[] = [\n  {\n    id: 'task-142',\n    number: 'LAT-142',\n    title: 'Redraw the onboarding checklist for small screens',\n    projectId: 'onboarding',\n    assigneeId: 'amara',\n    due: 'Today',\n    isDone: false,\n  },\n  {\n    id: 'task-141',\n    number: 'LAT-141',\n    title: 'Paginate the invoices endpoint',\n    projectId: 'billing',\n    assigneeId: 'mateo',\n    due: 'Today',\n    isDone: false,\n  },\n  {\n    id: 'task-138',\n    number: 'LAT-138',\n    title: 'Review the empty states of the reports page',\n    projectId: 'reports',\n    assigneeId: 'amara',\n    due: 'Tomorrow',\n    isDone: false,\n  },\n  {\n    id: 'task-136',\n    number: 'LAT-136',\n    title: 'Chart the hours of the week as day bars',\n    projectId: 'reports',\n    assigneeId: 'priya',\n    due: 'Thursday',\n    isDone: false,\n  },\n  {\n    id: 'task-131',\n    number: 'LAT-131',\n    title: 'Pick the icon set for the billing settings',\n    projectId: 'billing',\n    assigneeId: 'amara',\n    due: 'Friday',\n    isDone: false,\n  },\n  {\n    id: 'task-129',\n    number: 'LAT-129',\n    title: 'Test the invitation flow on a slow network',\n    projectId: 'onboarding',\n    assigneeId: 'jonas',\n    due: 'Friday',\n    isDone: false,\n  },\n  {\n    id: 'task-127',\n    number: 'LAT-127',\n    title: 'Write the copy for the invitation e-mail',\n    projectId: 'onboarding',\n    assigneeId: 'amara',\n    due: 'Next week',\n    isDone: false,\n  },\n  {\n    id: 'task-119',\n    number: 'LAT-119',\n    title: 'Audit the contrast of the status chips',\n    projectId: 'design-system',\n    assigneeId: 'amara',\n    due: 'Monday',\n    isDone: true,\n  },\n  {\n    id: 'task-117',\n    number: 'LAT-117',\n    title: 'Plan the reports beta with two customers',\n    projectId: 'reports',\n    assigneeId: 'hana',\n    due: 'Monday',\n    isDone: true,\n  },\n];\n\nexport const NOTIFICATIONS: Notification[] = [\n  {\n    id: 'note-1',\n    actorId: 'lucas',\n    action: 'assigned you',\n    subject: 'LAT-142 Redraw the onboarding checklist',\n    time: '12 min',\n    isUnread: true,\n  },\n  {\n    id: 'note-2',\n    actorId: 'priya',\n    action: 'commented on',\n    subject: 'LAT-138 Review the empty states',\n    time: '1 h',\n    isUnread: true,\n  },\n  {\n    id: 'note-3',\n    actorId: 'jonas',\n    action: 'moved to In review',\n    subject: 'LAT-131 Pick the icon set',\n    time: '3 h',\n    isUnread: true,\n  },\n  {\n    id: 'note-4',\n    actorId: 'mateo',\n    action: 'mentioned you in',\n    subject: 'LAT-141 Paginate the invoices endpoint',\n    time: 'Yesterday',\n    isUnread: false,\n  },\n];\n\nexport const EMPTY_PAGES: Partial<Record<AppPageId, EmptyPage>> = {\n  'team-cycles': {\n    title: 'No cycle running',\n    line: 'A cycle is a time box of one or two weeks for the team’s tasks',\n  },\n  'team-timesheets': {\n    title: 'No time logged this week',\n    line: 'Hours the team logs on tasks appear here, day by day',\n  },\n};\n\nexport function personOf(personId: string) {\n  const person = PEOPLE.find((candidate) => candidate.id === personId);\n  if (person) {\n    return person;\n  }\n  return PEOPLE[0];\n}\n\nexport function projectOf(projectId: string) {\n  const project = PROJECTS.find((candidate) => candidate.id === projectId);\n  if (project) {\n    return project;\n  }\n  return PROJECTS[0];\n}\n\nexport type MemberRole = 'manager' | 'member' | 'viewer';\n\nexport type PropertyValue = {\n  id: string;\n  name: string;\n  color: string;\n  taskCount: number;\n};\n\nexport type Visibility = 'public' | 'private';\n\nexport const SETTINGS_GROUPS: NavGroup[] = [\n  {\n    id: 'account',\n    label: 'Account',\n    items: [\n      { id: 'settings-profile', label: 'Profile', icon: UserIcon },\n      { id: 'settings-preferences', label: 'Preferences', icon: MonitorIcon },\n      { id: 'settings-notifications', label: 'Notifications', icon: BellIcon },\n    ],\n  },\n  {\n    id: 'team-settings',\n    team: PRODUCT_TEAM,\n    items: [\n      { id: 'settings-team-general', label: 'General', icon: SettingsIcon },\n      { id: 'settings-team-members', label: 'Members', icon: UsersIcon },\n    ],\n  },\n  {\n    id: 'task-properties',\n    label: 'Task properties',\n    items: [\n      { id: 'settings-statuses', label: 'Statuses', icon: CircleDashedIcon },\n      { id: 'settings-labels', label: 'Labels', icon: HashIcon },\n    ],\n  },\n];\n\nexport const ROLE_OPTIONS: { value: MemberRole; label: string }[] = [\n  { value: 'manager', label: 'Manager' },\n  { value: 'member', label: 'Member' },\n  { value: 'viewer', label: 'Viewer' },\n];\n\nexport const INITIAL_ROLES: Record<string, MemberRole> = {\n  amara: 'manager',\n  lucas: 'manager',\n  priya: 'member',\n  mateo: 'member',\n  hana: 'member',\n  jonas: 'viewer',\n};\n\nexport const TIME_ZONES = [\n  { value: 'Africa/Kinshasa', label: 'Kinshasa (GMT+1)' },\n  { value: 'Africa/Lagos', label: 'Lagos (GMT+1)' },\n  { value: 'Europe/Paris', label: 'Paris (GMT+1)' },\n  { value: 'Europe/London', label: 'London (GMT+0)' },\n  { value: 'America/New_York', label: 'New York (GMT-5)' },\n  { value: 'Asia/Tokyo', label: 'Tokyo (GMT+9)' },\n];\n\nexport const WEEK_STARTS = [\n  { value: 'monday', label: 'Monday' },\n  { value: 'sunday', label: 'Sunday' },\n];\n\nexport const STATUSES: PropertyValue[] = [\n  {\n    id: 'backlog',\n    name: 'Backlog',\n    color: 'var(--muted-foreground)',\n    taskCount: 1,\n  },\n  { id: 'todo', name: 'Todo', color: 'var(--info)', taskCount: 2 },\n  {\n    id: 'in-progress',\n    name: 'In progress',\n    color: 'var(--warning)',\n    taskCount: 3,\n  },\n  { id: 'in-review', name: 'In review', color: 'var(--primary)', taskCount: 1 },\n  { id: 'done', name: 'Done', color: 'var(--success)', taskCount: 2 },\n];\n\nexport const LABELS: PropertyValue[] = [\n  { id: 'design', name: 'Design', color: 'var(--primary)', taskCount: 4 },\n  { id: 'web', name: 'Web', color: 'var(--info)', taskCount: 5 },\n  { id: 'mobile', name: 'Mobile', color: 'var(--success)', taskCount: 1 },\n  { id: 'api', name: 'API', color: 'var(--warning)', taskCount: 2 },\n  {\n    id: 'research',\n    name: 'Research',\n    color: 'var(--muted-foreground)',\n    taskCount: 1,\n  },\n];\n\nexport const VISIBILITY_OPTIONS: {\n  value: Visibility;\n  label: string;\n  line: string;\n}[] = [\n  {\n    value: 'public',\n    label: 'Public',\n    line: 'Everyone in Lattice Studio can find the team and join it',\n  },\n  {\n    value: 'private',\n    label: 'Private',\n    line: 'Only the 6 members and the people they invite see the team and its tasks',\n  },\n];\n",
      "type": "registry:component",
      "target": "components/blocks/app-shells-03/data.ts"
    }
  ],
  "categories": [
    "blocks",
    "app-shells"
  ],
  "type": "registry:block"
}