{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "block-inbox",
  "type": "registry:block",
  "title": "Inbox",
  "description": "Mail with customers on a raised page: a searchable list of conversations beside the open one, its earlier messages folded to a line, with archive, star and a reply in place.",
  "dependencies": [
    "@remixicon/react@^4.9.0"
  ],
  "registryDependencies": [
    "https://wideset.co/r/app-shell.json",
    "https://wideset.co/r/avatar.json",
    "https://wideset.co/r/block-styles.json",
    "https://wideset.co/r/breadcrumbs.json",
    "https://wideset.co/r/button.json",
    "https://wideset.co/r/divider.json",
    "https://wideset.co/r/dropdown-menu.json",
    "https://wideset.co/r/file-item.json",
    "https://wideset.co/r/icon-button.json",
    "https://wideset.co/r/illustration.json",
    "https://wideset.co/r/link-button.json",
    "https://wideset.co/r/list-item.json",
    "https://wideset.co/r/segmented-control.json",
    "https://wideset.co/r/sidebar.json",
    "https://wideset.co/r/tag.json",
    "https://wideset.co/r/text-input.json",
    "https://wideset.co/r/toast.json",
    "https://wideset.co/r/tooltip.json",
    "https://wideset.co/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/inbox/attachment.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/inbox/attachment.tsx",
      "content": "'use client';\n\n// TODO(custom): a file sent with a message, with its download; FileItem is an upload row (a grey fill or no frame, a remove button, no slot for another action).\nimport { RiDownloadLine } from '@remixicon/react';\nimport { FileItem } from '@/components/ui/wideset/file-upload/FileItem';\nimport { IconButton } from '@/components/ui/wideset/button/IconButton';\n\nimport type { Attachment as AttachmentData } from './data';\n\n/**\n * A file under a message: Wideset's file row for what it is and how big, its type in the\n * thumbnail's colour, in a bordered frame like every box on the white page, with the one thing to\n * do with it beside it.\n */\nexport function Attachment({ file }: { file: AttachmentData }) {\n  return (\n    <div className=\"border-ws-static-base rounded-ws-container-sm gap-ws-5 py-ws-5 pr-ws-5 pl-ws-7 flex w-[20rem] max-w-full items-center border\">\n      <FileItem variant=\"uncontained\" className=\"min-w-0 flex-1\">\n        <FileItem.Thumbnail name={file.name} />\n        <FileItem.Title>{file.name}</FileItem.Title>\n        <FileItem.Description>{file.size}</FileItem.Description>\n      </FileItem>\n      <IconButton\n        icon={RiDownloadLine}\n        variant=\"secondary\"\n        preset=\"ghost\"\n        size=\"sm\"\n        aria-label={`Download ${file.name}`}\n      />\n    </div>\n  );\n}\n"
    },
    {
      "path": "src/blocks/inbox/brand-mark.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/inbox/brand-mark.tsx",
      "content": "'use client';\n\nimport { cn } from '@/lib/wideset/utils';\n\nconst TILE =\n  'M0 16C0 8.45753 0 4.68629 2.34315 2.34315C4.68629 0 8.45753 0 16 0C23.5425 0 27.3137 0 29.6569 2.34315C32 4.68629 32 8.45753 32 16C32 23.5425 32 27.3137 29.6569 29.6569C27.3137 32 23.5425 32 16 32C8.45753 32 4.68629 32 2.34315 29.6569C0 27.3137 0 23.5425 0 16Z';\n\n/**\n * Orbit's mark: a planet and its ring on the inverse tile, so it inverts in dark mode. It takes\n * the size of its place (32px in a sidebar, 36px in a larger switcher). Decorative beside the\n * product's name; give it a `label` when it stands alone.\n */\nexport function BrandMark({ className, label }: { className?: string; label?: string }) {\n  return (\n    <svg\n      viewBox=\"0 0 32 32\"\n      role={label ? 'img' : undefined}\n      aria-label={label}\n      aria-hidden={label ? undefined : true}\n      className={cn('size-ws-14 shrink-0', className)}\n    >\n      <path d={TILE} className=\"fill-(--ws-static-fill-inverse-background)\" />\n      <ellipse\n        cx=\"16\"\n        cy=\"16\"\n        rx=\"10.5\"\n        ry=\"4\"\n        transform=\"rotate(-28 16 16)\"\n        strokeWidth=\"1.75\"\n        className=\"fill-none stroke-(--ws-static-text-inverse-strong)\"\n      />\n      <circle cx=\"16\" cy=\"16\" r=\"4.75\" className=\"fill-(--ws-static-text-inverse-strong)\" />\n    </svg>\n  );\n}\n"
    },
    {
      "path": "src/blocks/inbox/conversation-list.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/inbox/conversation-list.tsx",
      "content": "'use client';\n\nimport { RiSearchLine } from '@remixicon/react';\nimport { SegmentedControl } from '@/components/ui/wideset/segmented-control/SegmentedControl';\nimport { TextInput } from '@/components/ui/wideset/text-input/TextInput';\nimport type { Ref } from 'react';\n\nimport { ConversationRow } from './conversation-row';\nimport { type Conversation, EMPTY, type Filter } from './data';\nimport { EmptyState } from './empty-state';\n\nconst FILTERS: { value: Filter; label: string }[] = [\n  { value: 'all', label: 'All' },\n  { value: 'unread', label: 'Unread' },\n  { value: 'starred', label: 'Starred' },\n];\n\ntype ConversationListProps = {\n  /** The conversations the search and the filter leave, newest first. */\n  conversations: Conversation[];\n  query: string;\n  onQueryChange: (query: string) => void;\n  filter: Filter;\n  onFilterChange: (filter: Filter) => void;\n  selectedId: string | null;\n  onSelect: (id: string) => void;\n  /** The scrolling list, so the screen can tell when the arrow keys belong to it. */\n  listRef: Ref<HTMLDivElement>;\n  /** Where the rows register themselves, so focus can move with the selection. */\n  rowRef: (id: string) => (row: HTMLButtonElement | null) => void;\n};\n\n/**\n * The inbox column: a search, a filter with no counts, and the conversations under them. The\n * column keeps its width and scrolls on its own, so the open conversation never moves.\n */\nexport function ConversationList({\n  conversations,\n  query,\n  onQueryChange,\n  filter,\n  onFilterChange,\n  selectedId,\n  onSelect,\n  listRef,\n  rowRef,\n}: ConversationListProps) {\n  return (\n    <section\n      aria-label=\"Conversations\"\n      className=\"border-ws-static-subtle flex w-[24rem] shrink-0 flex-col border-r\"\n    >\n      <div className=\"gap-ws-5 px-ws-11 pt-ws-9 pb-ws-5 flex shrink-0 flex-col\">\n        <TextInput size=\"sm\" value={query} onChange={(event) => onQueryChange(event.target.value)}>\n          <TextInput.Prefix inner>\n            <TextInput.Icon icon={RiSearchLine} />\n          </TextInput.Prefix>\n          <TextInput.Input type=\"search\" placeholder=\"Search mail\" aria-label=\"Search mail\" />\n          <TextInput.Suffix inner>\n            <TextInput.ClearButton onClear={() => onQueryChange('')} />\n          </TextInput.Suffix>\n        </TextInput>\n        <SegmentedControl\n          size=\"sm\"\n          variant=\"fullWidth\"\n          value={filter}\n          onValueChange={(value) => onFilterChange(value as Filter)}\n          aria-label=\"Show\"\n        >\n          {FILTERS.map(({ value, label }) => (\n            <SegmentedControl.Item key={value} value={value}>\n              {label}\n            </SegmentedControl.Item>\n          ))}\n        </SegmentedControl>\n      </div>\n\n      <div ref={listRef} className=\"px-ws-5 pb-ws-5 ws-scrollbar min-h-0 flex-1 overflow-y-auto\">\n        {conversations.length === 0 ? (\n          <div className=\"px-ws-7 pt-ws-16\">\n            <EmptyState\n              title={query ? 'No conversations found' : EMPTY[filter].title}\n              description={\n                query ? `Nothing in your mail matches “${query}”.` : EMPTY[filter].description\n              }\n            />\n          </div>\n        ) : (\n          <ul className=\"flex flex-col\">\n            {conversations.map((conversation) => (\n              <li key={conversation.id}>\n                <ConversationRow\n                  ref={rowRef(conversation.id)}\n                  conversation={conversation}\n                  selected={conversation.id === selectedId}\n                  onSelect={() => onSelect(conversation.id)}\n                />\n              </li>\n            ))}\n          </ul>\n        )}\n      </div>\n    </section>\n  );\n}\n"
    },
    {
      "path": "src/blocks/inbox/conversation-row.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/inbox/conversation-row.tsx",
      "content": "'use client';\n\n// TODO(custom): mail row (avatar, sender and company, subject, one line of the message, time, star, unread dot, attached files); ListItem is a one-line menu row with a brand-tinted checked state.\nimport { RiAttachment2, RiStarFill } from '@remixicon/react';\nimport { cn } from '@/lib/wideset/utils';\nimport { Tag } from '@/components/ui/wideset/tag/Tag';\nimport { forwardRef } from 'react';\n\nimport { account, type Conversation } from './data';\nimport { formatDateTime, formatListTime } from './format';\nimport { PersonAvatar } from './person-avatar';\n\ntype ConversationRowProps = {\n  conversation: Conversation;\n  selected: boolean;\n  onSelect: () => void;\n};\n\n/**\n * One conversation in the list: one target across the whole row. The sender's avatar leads, so\n * the list scans by person; their company follows the name, quieter. The preview runs the whole\n * message on, past the greeting, and a file sent in the conversation shows as a tag under it. An\n * unread one carries weight and a dot, never a count; the open one takes the neutral selected\n * fill of the sidebar's active item.\n */\nexport const ConversationRow = forwardRef<HTMLButtonElement, ConversationRowProps>(\n  ({ conversation, selected, onSelect }, ref) => {\n    const { contact, customer, subject, messages, unread, starred } = conversation;\n    const last = messages[messages.length - 1];\n    const files = messages.flatMap((message) => message.attachments ?? []);\n    return (\n      <button\n        ref={ref}\n        type=\"button\"\n        aria-current={selected || undefined}\n        onClick={onSelect}\n        className={cn(\n          'gap-ws-7 px-ws-7 py-ws-6 rounded-ws-control-lg flex w-full text-left',\n          'hover:bg-ws-static-alpha-subtle aria-[current=true]:bg-ws-dynamic-tertiary-alpha-strong-default',\n          'focus-visible:wds-focus-visible outline-ws-dynamic-primary-strong-default focus-visible:-outline-offset-2',\n        )}\n      >\n        <PersonAvatar\n          name={contact.name}\n          initials={contact.initials}\n          color={contact.color}\n          aria-hidden\n        />\n        <span className=\"gap-ws-2 flex min-w-0 flex-1 flex-col\">\n          <span className=\"gap-ws-5 flex items-center\">\n            <span className=\"gap-ws-3 flex min-w-0 flex-1 items-baseline\">\n              <span\n                className={cn(\n                  'shrink-0',\n                  unread\n                    ? 'typography-body-strong-md text-ws-static-strong'\n                    : 'typography-body-md text-ws-static-base',\n                )}\n              >\n                {contact.name}\n              </span>\n              <span className=\"typography-caption-md text-ws-static-subtle truncate\">\n                {customer}\n              </span>\n            </span>\n            {starred && (\n              <RiStarFill\n                role=\"img\"\n                aria-label=\"Starred\"\n                className=\"size-ws-7 text-ws-static-subtle shrink-0\"\n              />\n            )}\n            <time\n              dateTime={last.at}\n              title={formatDateTime(last.at)}\n              className=\"typography-caption-md text-ws-static-subtle shrink-0 tabular-nums\"\n            >\n              {formatListTime(last.at)}\n            </time>\n          </span>\n          <span className=\"gap-ws-5 flex items-center\">\n            <span\n              className={cn(\n                'min-w-0 flex-1 truncate',\n                unread\n                  ? 'typography-body-strong-md text-ws-static-strong'\n                  : 'typography-body-md text-ws-static-base',\n              )}\n            >\n              {subject}\n            </span>\n            {unread && (\n              <span className=\"bg-ws-dynamic-primary-default rounded-ws-control-full size-ws-4 shrink-0\">\n                <span className=\"sr-only\">Unread</span>\n              </span>\n            )}\n          </span>\n          <span className=\"typography-body-md text-ws-static-subtle truncate\">\n            {last.from === account && 'You: '}\n            {last.body.join(' ')}\n          </span>\n          {files.length > 0 && (\n            <span className=\"gap-ws-3 pt-ws-3 flex flex-wrap\">\n              {files.map((file) => (\n                <Tag key={file.name} size=\"sm\" color=\"secondary\">\n                  <Tag.Icon icon={RiAttachment2} />\n                  {file.name}\n                </Tag>\n              ))}\n            </span>\n          )}\n        </span>\n      </button>\n    );\n  },\n);\nConversationRow.displayName = 'ConversationRow';\n"
    },
    {
      "path": "src/blocks/inbox/conversation-toolbar.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/inbox/conversation-toolbar.tsx",
      "content": "'use client';\n\nimport {\n  type RemixiconComponentType,\n  RiArchiveLine,\n  RiMailOpenLine,\n  RiMailUnreadLine,\n  RiMoreLine,\n  RiNotificationOffLine,\n  RiPrinterLine,\n  RiShareForwardLine,\n  RiSpam2Line,\n  RiStarFill,\n  RiStarLine,\n} from '@remixicon/react';\nimport { DropdownMenu } from '@/components/ui/wideset/dropdown/DropdownMenu';\nimport { IconButton } from '@/components/ui/wideset/button/IconButton';\nimport { ListItem } from '@/components/ui/wideset/list-item/ListItem';\nimport { Tooltip } from '@/components/ui/wideset/tooltip/Tooltip';\nimport type { ReactNode } from 'react';\n\nconst ghost = { variant: 'secondary', preset: 'ghost', size: 'sm' } as const;\n\n/** Names a toolbar button on hover and focus; the button keeps its own `aria-label`. */\nfunction Hint({ label, children }: { label: string; children: ReactNode }) {\n  return (\n    <Tooltip size=\"sm\">\n      <Tooltip.Trigger asChild>{children}</Tooltip.Trigger>\n      <Tooltip.Content className=\"ws-block-utility\" side=\"bottom\">\n        <Tooltip.Label>{label}</Tooltip.Label>\n      </Tooltip.Content>\n    </Tooltip>\n  );\n}\n\nfunction MenuItem({ icon: Icon, label }: { icon: RemixiconComponentType; label: string }) {\n  return (\n    <>\n      <ListItem.Prefix>\n        <Icon className=\"size-ws-9\" />\n      </ListItem.Prefix>\n      <ListItem.Content>\n        <ListItem.Label>{label}</ListItem.Label>\n      </ListItem.Content>\n    </>\n  );\n}\n\ntype ConversationToolbarProps = {\n  starred: boolean;\n  unread: boolean;\n  onArchive: () => void;\n  onToggleStar: () => void;\n  onToggleRead: () => void;\n};\n\n/**\n * What to do with the open conversation: quiet icon buttons, each named by its label and a\n * tooltip, and a menu for the rest. None is filled: the page's one primary is Send.\n */\nexport function ConversationToolbar({\n  starred,\n  unread,\n  onArchive,\n  onToggleStar,\n  onToggleRead,\n}: ConversationToolbarProps) {\n  const star = starred ? 'Remove star' : 'Star';\n  const read = unread ? 'Mark as read' : 'Mark as unread';\n  return (\n    <div role=\"toolbar\" aria-label=\"Conversation\" className=\"gap-ws-3 flex shrink-0 items-center\">\n      <Hint label=\"Archive\">\n        <IconButton {...ghost} icon={RiArchiveLine} aria-label=\"Archive\" onClick={onArchive} />\n      </Hint>\n      <Hint label={star}>\n        <IconButton\n          {...ghost}\n          icon={starred ? RiStarFill : RiStarLine}\n          aria-label={star}\n          aria-pressed={starred}\n          onClick={onToggleStar}\n        />\n      </Hint>\n      <Hint label={read}>\n        <IconButton\n          {...ghost}\n          icon={unread ? RiMailOpenLine : RiMailUnreadLine}\n          aria-label={read}\n          onClick={onToggleRead}\n        />\n      </Hint>\n      <DropdownMenu>\n        <Hint label=\"More actions\">\n          <DropdownMenu.Trigger asChild>\n            <IconButton {...ghost} icon={RiMoreLine} aria-label=\"More actions\" />\n          </DropdownMenu.Trigger>\n        </Hint>\n        <DropdownMenu.Content align=\"end\" className=\"ws-block-utility w-[14rem]\">\n          <DropdownMenu.Item>\n            <MenuItem icon={RiShareForwardLine} label=\"Forward\" />\n          </DropdownMenu.Item>\n          <DropdownMenu.Item>\n            <MenuItem icon={RiPrinterLine} label=\"Print\" />\n          </DropdownMenu.Item>\n          <DropdownMenu.Item>\n            <MenuItem icon={RiNotificationOffLine} label=\"Mute conversation\" />\n          </DropdownMenu.Item>\n          <DropdownMenu.Separator />\n          <DropdownMenu.Item variant=\"danger\">\n            <MenuItem icon={RiSpam2Line} label=\"Report spam\" />\n          </DropdownMenu.Item>\n        </DropdownMenu.Content>\n      </DropdownMenu>\n    </div>\n  );\n}\n"
    },
    {
      "path": "src/blocks/inbox/conversation.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/inbox/conversation.tsx",
      "content": "'use client';\n\nimport { RiContactsBook3Line, RiHandCoinLine } from '@remixicon/react';\nimport { LinkButton } from '@/components/ui/wideset/button/LinkButton';\nimport { useId, useState } from 'react';\n\nimport { ConversationToolbar } from './conversation-toolbar';\nimport { account, type Conversation as ConversationData } from './data';\nimport { Message } from './message';\nimport { ReplyComposer } from './reply-composer';\n\ntype ConversationProps = {\n  conversation: ConversationData;\n  onArchive: () => void;\n  onToggleStar: () => void;\n  onToggleRead: () => void;\n  onReply: (text: string) => void;\n};\n\n/**\n * The open conversation: its subject, the customer and the deal it is filed under, and what to do\n * with it; the messages in order, the earlier ones folded to a line and the last one open; the\n * reply under them. Only the messages scroll: the subject and the reply stay where they are.\n */\nexport function Conversation({\n  conversation,\n  onArchive,\n  onToggleStar,\n  onToggleRead,\n  onReply,\n}: ConversationProps) {\n  const titleId = useId();\n  const { subject, customer, deal, contact, messages, starred, unread } = conversation;\n  const lastId = messages[messages.length - 1].id;\n  // The last message starts open and the earlier ones folded; a click on a head overrides that.\n  const [choices, setChoices] = useState<Record<string, boolean>>({});\n  const isOpen = (id: string) => choices[id] ?? id === lastId;\n\n  return (\n    <section aria-labelledby={titleId} className=\"flex min-w-0 flex-1 flex-col\">\n      {/* 96px, as the search and the filter beside it: the line meets the top of the list. */}\n      <header className=\"h-ws-24 border-ws-static-subtle shrink-0 border-b\">\n        <div className=\"gap-ws-2 px-ws-12 pt-ws-9 mx-auto flex w-full max-w-[48rem] flex-col\">\n          <div className=\"gap-ws-9 flex items-center justify-between\">\n            <h1 id={titleId} className=\"typography-subtitle-xs text-ws-static-strong truncate\">\n              {subject}\n            </h1>\n            <ConversationToolbar\n              starred={starred}\n              unread={unread}\n              onArchive={onArchive}\n              onToggleStar={onToggleStar}\n              onToggleRead={onToggleRead}\n            />\n          </div>\n          {/* Pulled left by the links' own padding, so their text starts under the subject. */}\n          <div className=\"-ml-ws-6 flex min-w-0 items-center\">\n            <LinkButton variant=\"secondary\" href=\"#customers\" className=\"gap-ws-3\">\n              <RiContactsBook3Line aria-hidden className=\"size-ws-9\" />\n              {customer}\n            </LinkButton>\n            <LinkButton variant=\"secondary\" href=\"#deals\" className=\"gap-ws-3\">\n              <RiHandCoinLine aria-hidden className=\"size-ws-9\" />\n              {deal}\n            </LinkButton>\n          </div>\n        </div>\n      </header>\n\n      <div className=\"ws-scrollbar min-h-0 flex-1 overflow-y-auto\">\n        <ol\n          aria-label=\"Messages\"\n          className=\"px-ws-12 pb-ws-9 mx-auto flex w-full max-w-[48rem] flex-col\"\n        >\n          {messages.map((message) => (\n            <li key={message.id} className=\"border-ws-static-subtle border-b last:border-b-0\">\n              <Message\n                message={message}\n                to={message.from === account ? contact.name : account.name}\n                open={isOpen(message.id)}\n                onToggle={() => setChoices({ ...choices, [message.id]: !isOpen(message.id) })}\n              />\n            </li>\n          ))}\n        </ol>\n      </div>\n\n      <div className=\"px-ws-12 pb-ws-11 mx-auto w-full max-w-[48rem] shrink-0\">\n        <ReplyComposer to={contact} onSend={onReply} />\n      </div>\n    </section>\n  );\n}\n"
    },
    {
      "path": "src/blocks/inbox/data.ts",
      "type": "registry:file",
      "target": "blocks/wideset/inbox/data.ts",
      "content": "import {\n  type RemixiconComponentType,\n  RiBankCardLine,\n  RiContactsBook3Line,\n  RiHandCoinLine,\n  RiHome5Line,\n  RiInbox2Fill,\n  RiInbox2Line,\n  RiKey2Line,\n  RiLineChartLine,\n  RiPieChart2Line,\n  RiPlugLine,\n  RiQuestionLine,\n  RiSettings3Line,\n  RiTeamLine,\n} from '@remixicon/react';\n\n/*\n  Maya's mail with customers on Tuesday morning, 10 November 2026. Orbit files every conversation\n  under the customer and the deal it is about. The open one is the quote Halcyon Freight is\n  waiting for: the same quote that is on Maya's task list for 10:00 and that the team is talking\n  about in the halcyon-renewal channel.\n*/\n\n/** The product is Orbit; the workspace is Lumen Studio. */\nexport const product = { name: 'Orbit' };\nexport const workspace = { name: 'Lumen Studio', initials: 'LS' };\n\nexport type Person = {\n  name: string;\n  email: string;\n  initials: string;\n  /** The avatar's colour, pinned where two people in one thread would otherwise share a hue. */\n  color?: 'orange' | 'teal';\n};\n\nexport const account: Person = {\n  name: 'Maya Okafor',\n  email: 'maya@lumenstudio.co',\n  initials: 'MO',\n  color: 'orange',\n};\n\n/** The sample is frozen at this moment (local time). */\nexport const NOW = '2026-11-10T09:12';\n\nexport type NavLink = {\n  id: string;\n  label: string;\n  icon: RemixiconComponentType;\n  /** The icon while the page is open (a line icon swaps for its fill). */\n  activeIcon?: RemixiconComponentType;\n};\n\nexport const mainLinks: NavLink[] = [\n  { id: 'home', label: 'Home', icon: RiHome5Line },\n  { id: 'inbox', label: 'Inbox', icon: RiInbox2Line, activeIcon: RiInbox2Fill },\n  { id: 'customers', label: 'Customers', icon: RiContactsBook3Line },\n  { id: 'deals', label: 'Deals', icon: RiHandCoinLine },\n  { id: 'revenue', label: 'Revenue', icon: RiLineChartLine },\n  { id: 'reports', label: 'Reports', icon: RiPieChart2Line },\n];\n\nexport const settingsLinks: NavLink[] = [\n  { id: 'general', label: 'General', icon: RiSettings3Line },\n  { id: 'members', label: 'Members', icon: RiTeamLine },\n  { id: 'billing', label: 'Billing', icon: RiBankCardLine },\n  { id: 'integrations', label: 'Integrations', icon: RiPlugLine },\n  { id: 'api-keys', label: 'API keys', icon: RiKey2Line },\n];\n\nexport const helpLink: NavLink = { id: 'help', label: 'Help and support', icon: RiQuestionLine };\n\n/** A file sent with a message. */\nexport type Attachment = { name: string; size: string };\n\nexport type Message = {\n  id: string;\n  from: Person;\n  /** Local date and time. */\n  at: string;\n  /** The text, one paragraph per entry. */\n  body: string[];\n  attachments?: Attachment[];\n};\n\nexport type Conversation = {\n  id: string;\n  subject: string;\n  /** The person at the customer the conversation is with. */\n  contact: Person;\n  customer: string;\n  /** The deal in Orbit the conversation is filed under. */\n  deal: string;\n  /** Oldest first. */\n  messages: Message[];\n  unread: boolean;\n  starred: boolean;\n};\n\nconst person = (name: string, email: string): Person => ({\n  name,\n  email,\n  initials: name\n    .split(' ')\n    .map((part) => part[0])\n    .join(''),\n});\n\nconst ingrid: Person = {\n  ...person('Ingrid Solberg', 'ingrid.solberg@halcyonfreight.com'),\n  color: 'teal',\n};\nconst samuel = person('Samuel Adeyemi', 'samuel@northwindhealth.org');\nconst mirela = person('Mirela Costin', 'mirela@kestrelanalytics.io');\nconst colm = person('Colm Brennan', 'colm.brennan@juniperlegal.com');\nconst beatrice = person('Beatrice Finch', 'beatrice@marlowfinch.co');\nconst oskar = person('Oskar Lindqvist', 'oskar@atlasrobotics.com');\nconst farah = person('Farah Haddad', 'farah.haddad@cobaltsecurity.io');\nconst andre = person('Andre Baptiste', 'andre@tidewaterenergy.com');\nconst tariq = person('Tariq Mansour', 'tariq@kestrelanalytics.io');\nconst hugo = person('Hugo Marlow', 'hugo@marlowfinch.co');\nconst lena = person('Lena Voss', 'lena.voss@tidewaterenergy.com');\n\n/** A conversation that holds one message so far. */\nconst single = (\n  id: string,\n  contact: Person,\n  customer: string,\n  deal: string,\n  subject: string,\n  at: string,\n  body: string[],\n  flags: { unread?: boolean; starred?: boolean; attachments?: Attachment[] } = {},\n): Conversation => ({\n  id,\n  subject,\n  contact,\n  customer,\n  deal,\n  messages: [{ id: `${id}-1`, from: contact, at, body, attachments: flags.attachments }],\n  unread: flags.unread ?? false,\n  starred: flags.starred ?? false,\n});\n\n/** The inbox, newest first. */\nexport const conversations: Conversation[] = [\n  {\n    id: 'halcyon-quote',\n    subject: 'Revised quote for the 2027 renewal',\n    contact: ingrid,\n    customer: 'Halcyon Freight',\n    deal: 'Renewal 2027',\n    unread: false,\n    starred: true,\n    messages: [\n      {\n        id: 'halcyon-quote-1',\n        from: ingrid,\n        at: '2026-11-05T14:14',\n        body: [\n          'Hi Maya, thank you for the call on Tuesday.',\n          'Before the renewal goes to our finance committee we need two things from you: the price per seat if we commit to two years, and whether the 12 extra dispatcher seats can start in January instead of at signing.',\n        ],\n      },\n      {\n        id: 'halcyon-quote-2',\n        from: account,\n        at: '2026-11-06T09:02',\n        body: [\n          'Hi Ingrid, both are possible. I am checking the two-year price with our deal desk and will send you a revised quote by Tuesday.',\n        ],\n      },\n      {\n        id: 'halcyon-quote-3',\n        from: ingrid,\n        at: '2026-11-09T16:40',\n        body: [\n          'Thanks, Maya. One more question from our CFO: can the onboarding fee for the new seats be waived? The team that will use them is already trained.',\n        ],\n      },\n      {\n        id: 'halcyon-quote-4',\n        from: ingrid,\n        at: '2026-11-10T08:47',\n        body: [\n          'Good morning Maya,',\n          'The finance committee meets on Thursday at 10:00. If the revised quote is with me by noon tomorrow, I can still put it on the agenda. After that the renewal moves to the December meeting, and our current term ends before then.',\n          'To recap what we need in the quote: the two-year term with its price per seat, the 12 added seats starting on January 1, and the onboarding fee for those seats waived. Our current order form is attached, so the new one can follow it.',\n          'I am at my desk all morning if a short call is easier than writing it up.',\n          'Best regards,',\n          'Ingrid',\n        ],\n        attachments: [{ name: 'halcyon-order-form-2025.pdf', size: '184 KB' }],\n      },\n    ],\n  },\n  single(\n    'northwind-pricing',\n    samuel,\n    'Northwind Health',\n    'Expansion to four clinics',\n    'Pricing review this afternoon',\n    '2026-11-10T08:12',\n    [\n      'Confirming 1:30 PM. I am bringing our procurement lead, so please include the volume tiers above 100 seats.',\n    ],\n    { unread: true },\n  ),\n  single(\n    'kestrel-demo',\n    mirela,\n    'Kestrel Analytics',\n    'New business',\n    'Who is joining on Thursday',\n    '2026-11-10T07:35',\n    [\n      'Five of us will join the demo: two engineers, our security lead, the head of analytics and me. Could you send the invite to everyone on this thread?',\n    ],\n    { unread: true },\n  ),\n  single(\n    'juniper-redlines',\n    colm,\n    'Juniper Legal',\n    'Master agreement',\n    'Redlines on sections 7 and 11',\n    '2026-11-09T17:20',\n    [\n      'Our comments are in the attached draft. The liability cap in section 11 is the only point still open on our side.',\n    ],\n    { starred: true, attachments: [{ name: 'juniper-msa-redlines.docx', size: '96 KB' }] },\n  ),\n  single(\n    'marlow-discount',\n    beatrice,\n    'Marlow & Finch',\n    'Renewal 2027',\n    'Renewal discount',\n    '2026-11-09T15:05',\n    [\n      'Thank you for approving the 10 percent. We will sign the order form this week, as soon as Hugo is back in the office.',\n    ],\n  ),\n  single(\n    'atlas-agenda',\n    oskar,\n    'Atlas Robotics',\n    'Discovery',\n    'Agenda for the discovery call',\n    '2026-11-09T11:48',\n    [\n      'As promised, here is what we would like to cover: our current tooling, the three workflows we want to replace first, and how the rollout would work across two sites.',\n    ],\n    { unread: true },\n  ),\n  single(\n    'cobalt-questionnaire',\n    farah,\n    'Cobalt Security',\n    'Security review',\n    'Vendor security questionnaire',\n    '2026-11-06T16:31',\n    [\n      'Could you complete the attached questionnaire before our review board meets on November 18? Sections 3 and 4 matter most to us.',\n    ],\n    { attachments: [{ name: 'cobalt-vendor-questionnaire.xlsx', size: '312 KB' }] },\n  ),\n  single(\n    'tidewater-invoice',\n    andre,\n    'Tidewater Energy',\n    'Growth plan',\n    'October invoice',\n    '2026-11-06T10:22',\n    [\n      'We have not received the invoice for October yet. Could you resend it to our accounts payable address?',\n    ],\n  ),\n  single(\n    'kestrel-sso',\n    tariq,\n    'Kestrel Analytics',\n    'New business',\n    'Single sign-on during the trial',\n    '2026-11-05T13:10',\n    [\n      'Is single sign-on available during the trial, or only once we are on a paid plan? Our security team will ask on Thursday.',\n    ],\n  ),\n  single(\n    'marlow-lisbon',\n    hugo,\n    'Marlow & Finch',\n    'Renewal 2027',\n    'Seats for the Lisbon office',\n    '2026-11-04T09:40',\n    [\n      'We are opening in Lisbon in February and will need eight more seats. Can they go on the same order form as the renewal?',\n    ],\n  ),\n  single(\n    'tidewater-walkthrough',\n    lena,\n    'Tidewater Energy',\n    'Growth plan',\n    'Thank you for the walkthrough',\n    '2026-11-03T15:56',\n    [\n      'The forecast view was exactly what our regional leads asked for. I have shared the recording with them.',\n    ],\n  ),\n];\n\nexport type Filter = 'all' | 'unread' | 'starred';\n\n/** What the list says when the filter leaves nothing. */\nexport const EMPTY: Record<Filter, { title: string; description: string }> = {\n  all: {\n    title: 'Your inbox is empty',\n    description: 'New mail from your customers shows up here.',\n  },\n  unread: {\n    title: 'No unread conversations',\n    description: 'You have read everything in your inbox.',\n  },\n  starred: {\n    title: 'No starred conversations',\n    description: 'Star a conversation to find it here.',\n  },\n};\n"
    },
    {
      "path": "src/blocks/inbox/empty-state.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/inbox/empty-state.tsx",
      "content": "'use client';\n\n// TODO(custom): empty state (drawing, title, line, actions); Wideset has no EmptyState.\nimport { Illustration } from '@/components/ui/wideset/illustration/Illustration';\nimport { type IllustrationName } from '@/components/ui/wideset/illustration/Illustration.types';\nimport type { ReactNode } from 'react';\n\n/*\n  The prototype for a Wideset EmptyState: one design for every region with nothing to show, copied\n  byte for byte into each block that needs one. A first run (nothing here yet) takes a drawing and\n  the ways in; a state the user caused (no search results) takes no drawing and the one way back.\n*/\n\ntype EmptyStateProps = {\n  /** A drawing, only for a first run: nothing has been added yet. */\n  illustration?: IllustrationName;\n  /** What is missing, in a few words: \"No customers yet\". */\n  title: ReactNode;\n  /** One sentence: what will appear here, or why nothing does. */\n  description: ReactNode;\n  /** One or two `size=\"sm\"` buttons: the ways in, or the way back. */\n  children?: ReactNode;\n};\n\n/** What a region shows with nothing in it: centred in the region, the text read first. */\nexport function EmptyState({ illustration, title, description, children }: EmptyStateProps) {\n  return (\n    <div className=\"gap-ws-12 flex flex-col items-center text-center\">\n      {illustration && <Illustration illustration={illustration} size=\"sm\" />}\n      {/* Announced when it replaces the rows, as after a search. */}\n      <div role=\"status\" className=\"gap-ws-3 flex max-w-[26rem] flex-col\">\n        <h2 className=\"typography-label-strong-md text-ws-static-strong\">{title}</h2>\n        <p className=\"typography-body-md text-ws-static-base\">{description}</p>\n      </div>\n      {children && <div className=\"gap-ws-5 flex flex-wrap justify-center\">{children}</div>}\n    </div>\n  );\n}\n"
    },
    {
      "path": "src/blocks/inbox/format.ts",
      "type": "registry:file",
      "target": "blocks/wideset/inbox/format.ts",
      "content": "import { NOW } from './data';\n\n// One locale for the whole screen; swap it for the user's.\nconst LOCALE = 'en-US';\nconst DAY = 24 * 60 * 60_000;\n\nconst time = new Intl.DateTimeFormat(LOCALE, { hour: 'numeric', minute: '2-digit' });\nconst day = new Intl.DateTimeFormat(LOCALE, { month: 'short', day: 'numeric' });\nconst dateTime = new Intl.DateTimeFormat(LOCALE, { dateStyle: 'medium', timeStyle: 'short' });\n\nconst startOfDay = (value: Date) =>\n  new Date(value.getFullYear(), value.getMonth(), value.getDate()).getTime();\n/** Whole calendar days between `iso` and now: 0 today, 1 yesterday. */\nconst daysAgo = (iso: string) =>\n  Math.round((startOfDay(new Date(NOW)) - startOfDay(new Date(iso))) / DAY);\n\n/** When a conversation last moved, as short as a list row needs: \"8:47 AM\", \"Yesterday\", \"Nov 6\". */\nexport function formatListTime(iso: string) {\n  const days = daysAgo(iso);\n  if (days === 0) return time.format(new Date(iso));\n  return days === 1 ? 'Yesterday' : day.format(new Date(iso));\n}\n\n/** When a message was sent: the time today, the day and the time before that. */\nexport function formatMessageTime(iso: string) {\n  const at = new Date(iso);\n  return daysAgo(iso) === 0 ? time.format(at) : `${day.format(at)}, ${time.format(at)}`;\n}\n\n/** The exact moment, for the `title` beside a short time. */\nexport const formatDateTime = (iso: string) => dateTime.format(new Date(iso));\n"
    },
    {
      "path": "src/blocks/inbox/index.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/inbox/index.tsx",
      "content": "'use client';\n\nimport '@/styles/wideset-blocks.css';\n\nimport { RiSideBarLine } from '@remixicon/react';\nimport { AppShell } from '@/components/ui/wideset/app-shell/AppShell';\nimport { Breadcrumbs } from '@/components/ui/wideset/breadcrumbs/Breadcrumbs';\nimport { IconButton } from '@/components/ui/wideset/button/IconButton';\nimport { Toast } from '@/components/ui/wideset/toast/Toast';\nimport { ToastProvider, useToast } from '@/components/ui/wideset/toast/Toast.context';\nimport { useEffect, useId, useRef, useState } from 'react';\n\nimport { Conversation } from './conversation';\nimport { ConversationList } from './conversation-list';\nimport {\n  account,\n  type Conversation as ConversationData,\n  conversations as initialConversations,\n  type Filter,\n  NOW,\n} from './data';\nimport { InboxSidebar } from './sidebar';\n\nconst PASSES: Record<Filter, (conversation: ConversationData) => boolean> = {\n  all: () => true,\n  unread: (conversation) => conversation.unread,\n  starred: (conversation) => conversation.starred,\n};\n\n/** Whether the search is in the sender, the customer, the subject or the text. */\nconst matches = (conversation: ConversationData, query: string) => {\n  const { contact, customer, subject, messages } = conversation;\n  const text = [contact.name, customer, subject, ...messages.flatMap((message) => message.body)];\n  return text.join(' ').toLowerCase().includes(query.trim().toLowerCase());\n};\n\n/** When a conversation last moved: its latest message. The inbox reads newest first by it. */\nconst latest = (conversation: ConversationData) => conversation.messages.at(-1)?.at ?? '';\nconst newestFirst = (a: ConversationData, b: ConversationData) =>\n  latest(b).localeCompare(latest(a));\n\ntype PageProps = { sidebarId: string; collapsed: boolean; onToggleSidebar: () => void };\n\n/** The page inside the card: the bar, then the list beside the open conversation. */\nfunction Page({ sidebarId, collapsed, onToggleSidebar }: PageProps) {\n  const { showToast, dismissToast } = useToast();\n  const [items, setItems] = useState(initialConversations);\n  const [selectedId, setSelectedId] = useState<string | null>(initialConversations[0].id);\n  const [filter, setFilter] = useState<Filter>('all');\n  const [query, setQuery] = useState('');\n  const list = useRef<HTMLDivElement>(null);\n  const rows = useRef(new Map<string, HTMLButtonElement>());\n\n  // The open conversation stays listed whatever the filter: reading an unread one does not take it\n  // out from under the reader, and a filter never opens (and so reads) something on its own.\n  const shown = [...items]\n    .sort(newestFirst)\n    .filter((item) => matches(item, query) && (PASSES[filter](item) || item.id === selectedId));\n  const selected = items.find((item) => item.id === selectedId) ?? null;\n\n  const update = (id: string, change: Partial<ConversationData>) =>\n    setItems((current) => current.map((item) => (item.id === id ? { ...item, ...change } : item)));\n\n  /** Opening a conversation reads it. */\n  const select = (id: string | null) => {\n    setSelectedId(id);\n    if (id) update(id, { unread: false });\n  };\n\n  // The arrow keys move through the list while focus is on the page or in the list; the fields,\n  // the thread and the menus keep their own keys.\n  const move = useRef<(step: number) => void>(() => {});\n  move.current = (step) => {\n    const index = shown.findIndex((item) => item.id === selectedId);\n    const next = shown[Math.min(Math.max(index + step, 0), shown.length - 1)];\n    if (!next || next.id === selectedId) return;\n    select(next.id);\n    rows.current.get(next.id)?.focus();\n  };\n  useEffect(() => {\n    const onKeyDown = (event: KeyboardEvent) => {\n      if (event.key !== 'ArrowDown' && event.key !== 'ArrowUp') return;\n      const target = event.target as Node;\n      if (target !== document.body && !list.current?.contains(target)) return;\n      event.preventDefault();\n      move.current(event.key === 'ArrowDown' ? 1 : -1);\n    };\n    window.addEventListener('keydown', onKeyDown);\n    return () => window.removeEventListener('keydown', onKeyDown);\n  }, []);\n\n  /** Archiving takes the conversation out of the inbox and opens the next; Undo puts it back. */\n  const archive = (conversation: ConversationData) => {\n    const before = { selectedId };\n    const index = shown.findIndex((item) => item.id === conversation.id);\n    const rest = shown.filter((item) => item.id !== conversation.id);\n    setItems(items.filter((item) => item.id !== conversation.id));\n    select(rest[Math.min(index, rest.length - 1)]?.id ?? null);\n    const id = showToast({\n      content: 'Conversation archived',\n      action: (\n        <Toast.Action\n          preset=\"ghost\"\n          onClick={() => {\n            // Only this conversation comes back; replies, stars and reads since stay. The list's\n            // newest-first order puts it where it belongs.\n            setItems((current) =>\n              current.some((item) => item.id === conversation.id)\n                ? current\n                : [...current, conversation],\n            );\n            setSelectedId(before.selectedId);\n            dismissToast(id);\n          }}\n        >\n          Undo\n        </Toast.Action>\n      ),\n    });\n  };\n\n  const reply = (conversation: ConversationData, text: string) => {\n    const message = {\n      id: `${conversation.id}-${conversation.messages.length + 1}`,\n      from: account,\n      at: NOW,\n      body: text.split(/\\n+/),\n    };\n    update(conversation.id, { messages: [...conversation.messages, message] });\n  };\n\n  return (\n    <main className=\"bg-ws-static-foreground rounded-ws-container-lg shadow-ws-low my-ws-7 mr-ws-7 ml-ws-5 flex min-w-0 flex-1 flex-col overflow-hidden\">\n      <div className=\"h-ws-18 border-ws-static-base flex shrink-0 items-center border-b\">\n        {/* The bar belongs to the surround: it runs edge to edge. The sidebar's toggle is pulled\n            left so its glyph, not its box, sits 20px from the edge; the crumbs follow it. */}\n        <div className=\"gap-ws-5 px-ws-11 flex w-full items-center\">\n          <IconButton\n            icon={RiSideBarLine}\n            variant=\"secondary\"\n            preset=\"ghost\"\n            size=\"sm\"\n            iconClassName=\"text-ws-static-subtle size-ws-9\"\n            aria-label={collapsed ? 'Expand sidebar' : 'Collapse sidebar'}\n            aria-expanded={!collapsed}\n            aria-controls={sidebarId}\n            onClick={onToggleSidebar}\n            className=\"-ml-ws-5\"\n          />\n          <Breadcrumbs separator=\"arrow\">\n            <Breadcrumbs.Item>Inbox</Breadcrumbs.Item>\n          </Breadcrumbs>\n        </div>\n      </div>\n\n      {/* The two columns fill the card under the bar; each scrolls on its own. */}\n      <div className=\"flex min-h-0 flex-1\">\n        <ConversationList\n          conversations={shown}\n          query={query}\n          onQueryChange={setQuery}\n          filter={filter}\n          onFilterChange={setFilter}\n          selectedId={selectedId}\n          onSelect={select}\n          listRef={list}\n          rowRef={(id) => (row) => {\n            if (row) rows.current.set(id, row);\n            else rows.current.delete(id);\n          }}\n        />\n        {/* With nothing open the list says why; the rest of the page stays empty. */}\n        {selected && (\n          <Conversation\n            key={selected.id}\n            conversation={selected}\n            onArchive={() => archive(selected)}\n            onToggleStar={() => update(selected.id, { starred: !selected.starred })}\n            onToggleRead={() => update(selected.id, { unread: !selected.unread })}\n            onReply={(text) => reply(selected, text)}\n          />\n        )}\n      </div>\n    </main>\n  );\n}\n\n/**\n * Inbox (Inset direction): mail with customers on the raised page beside the workspace sidebar.\n * The list and the open conversation are two columns under the bar, split by a line; reading,\n * archiving and replying all happen without leaving the page.\n */\nexport default function Inbox() {\n  const sidebarId = useId();\n  const [collapsed, setCollapsed] = useState(false);\n\n  return (\n    <ToastProvider position=\"bottom-center\">\n      <AppShell className=\"ws-block-utility\" direction=\"inset\">\n        <InboxSidebar id={sidebarId} collapsed={collapsed} onCollapsedChange={setCollapsed} />\n        <Page\n          sidebarId={sidebarId}\n          collapsed={collapsed}\n          onToggleSidebar={() => setCollapsed(!collapsed)}\n        />\n      </AppShell>\n    </ToastProvider>\n  );\n}\n"
    },
    {
      "path": "src/blocks/inbox/message.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/inbox/message.tsx",
      "content": "'use client';\n\n// TODO(custom): e-mail message that folds to one line (sender, first line, time); Accordion draws a titled section with a chevron, not a message.\nimport { useId } from 'react';\n\nimport { Attachment } from './attachment';\nimport type { Message as MessageData } from './data';\nimport { formatDateTime, formatMessageTime } from './format';\nimport { PersonAvatar } from './person-avatar';\n\ntype MessageProps = {\n  message: MessageData;\n  /** Who it was written to, by name. */\n  to: string;\n  open: boolean;\n  onToggle: () => void;\n};\n\n/**\n * One message of the conversation. Folded, it is a single line: who wrote and how it starts.\n * Open, the sender's name leads with their address beside it, and the text and any files hang\n * under it, so the avatars form one column down the thread.\n * Its head is the one target that folds and unfolds it.\n */\nexport function Message({ message, to, open, onToggle }: MessageProps) {\n  const bodyId = useId();\n  const { from, at, body, attachments } = message;\n  return (\n    <article className=\"py-ws-3\">\n      <button\n        type=\"button\"\n        aria-expanded={open}\n        aria-controls={open ? bodyId : undefined}\n        onClick={onToggle}\n        className=\"gap-ws-7 px-ws-5 py-ws-5 -mx-ws-5 rounded-ws-control-lg hover:bg-ws-static-alpha-subtle focus-visible:wds-focus-visible outline-ws-dynamic-primary-strong-default flex w-[calc(100%+1rem)] items-center text-left focus-visible:-outline-offset-2\"\n      >\n        <PersonAvatar name={from.name} initials={from.initials} color={from.color} aria-hidden />\n        {open ? (\n          <span className=\"flex min-w-0 flex-1 flex-col\">\n            <span className=\"gap-ws-3 flex min-w-0 items-baseline\">\n              <span className=\"typography-label-strong-sm text-ws-static-strong shrink-0\">\n                {from.name}\n              </span>\n              <span className=\"typography-caption-md text-ws-static-subtle truncate\">\n                {from.email}\n              </span>\n            </span>\n            <span className=\"typography-caption-md text-ws-static-subtle truncate\">to {to}</span>\n          </span>\n        ) : (\n          <span className=\"gap-ws-5 flex min-w-0 flex-1 items-baseline\">\n            <span className=\"typography-label-strong-sm text-ws-static-strong shrink-0\">\n              {from.name}\n            </span>\n            <span className=\"typography-body-md text-ws-static-subtle truncate\">{body[0]}</span>\n          </span>\n        )}\n        <time\n          dateTime={at}\n          title={formatDateTime(at)}\n          className=\"typography-caption-md text-ws-static-subtle shrink-0 tabular-nums\"\n        >\n          {formatMessageTime(at)}\n        </time>\n      </button>\n      {open && (\n        <div\n          id={bodyId}\n          className=\"gap-ws-7 pt-ws-3 pb-ws-7 pl-ws-17 typography-body-md text-ws-static-base flex max-w-[44rem] flex-col\"\n        >\n          {body.map((paragraph, index) => (\n            <p key={index}>{paragraph}</p>\n          ))}\n          {attachments && (\n            <ul aria-label=\"Attachments\" className=\"gap-ws-5 pt-ws-3 flex flex-wrap\">\n              {attachments.map((file) => (\n                <li key={file.name}>\n                  <Attachment file={file} />\n                </li>\n              ))}\n            </ul>\n          )}\n        </div>\n      )}\n    </article>\n  );\n}\n"
    },
    {
      "path": "src/blocks/inbox/people.assets.ts",
      "type": "registry:file",
      "target": "blocks/wideset/inbox/people.assets.ts",
      "content": "// Portraits of the sample people as small JPEG data URLs (a block ships only .ts and .tsx).\n// Exported from the Wideset Core Figma file by people.cjs: do not edit by hand.\n\n/** A person’s photo by name. People who are not here show their initials. */\nexport const PHOTOS: Record<string, string | undefined> = {\n  'Maya Okafor':\n    'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABA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XvYhtJwvjKU44qRdFdTW/Td1ukW5yUx/wBQS0W3XDhG5G7gnwzv/FNk6whCisNYyeOKSRNFzb7cWIMKMt+U+oJQ2kck/wBB6+FO0KoGAoiRZ6dTvuo/aajiSmJrCH4zzbzCxlLjagpKvsRSkVI9NdPGNOaVtdmwlS4rQSpYGMq5Kj7qJNHSNGPhO+O4Ck+Ch3Vsmi2Ia27QW9Tar4T/ABI0mjBxR0q3SoKsPtFIH+ocik4NBII5zbp1UqrxIcj0jzpzT72oJvZoO1hvBdX5DyHqatJmzxrSlLcZlKGsDuHP80RoW3CFp+Orbhb+XVHzz3fjFP7mFpQT5lJrQpUwq56zz/WNRe5rtTB8KnAHzELaQ5jP80oTltQUPeiktlh1SPDvFGnuowmPIjqrppadUuLlMuKgXFf7nWk5Ss+akeP3GDVbS+id8TJQf8FKbTxuS4U59iKvTOPPNe7RYP7iKRr6fQrHiYYPpH7fU7igOFWyPWUOr4fZ90dQqZNjQmU+DSS4r27h75qxNJ9NrBoZClwGC7NcG1cp47nFDyz4D0GKmaipYwSTRak/UPSrULGjQOUG/nK3GoV7gYdtvIbRKIyFHcoZJNKEMJSg4AAr2PqA8AK6+5sVHb/5F01E4ln2pp9gpWgHcOePCqlvlt/Spqmx/lq5TVzSXgqYIoOCEb1HyA/9NVxrVjfHafA+rG/2JoVZAVmto141vcKM+FtjP//Z',\n};\n"
    },
    {
      "path": "src/blocks/inbox/person-avatar.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/inbox/person-avatar.tsx",
      "content": "'use client';\n\nimport { Avatar } from '@/components/ui/wideset/avatar/Avatar';\nimport { type AvatarProps } from '@/components/ui/wideset/avatar/Avatar.types';\n\nimport { PHOTOS } from './people.assets';\n\ntype PersonAvatarProps = Pick<\n  AvatarProps,\n  'size' | 'shape' | 'status' | 'color' | 'className' | 'style' | 'title' | 'aria-hidden'\n> & {\n  name: string;\n  initials: string;\n  /** The photo's text: empty beside the person's name, their name where the avatar stands alone. */\n  alt?: string;\n};\n\n/**\n * A person's avatar: their photo when `people.assets.ts` has one, with the initials as its\n * fallback, otherwise the initials on their colour. Every place that draws a person uses it, so\n * someone has the same face across the screen and photos mix with initials as in a real product.\n */\nexport function PersonAvatar({ name, initials, color, alt = '', ...props }: PersonAvatarProps) {\n  const photo = PHOTOS[name];\n  return photo ? (\n    <Avatar src={photo} alt={alt} initials={initials} {...props} />\n  ) : (\n    <Avatar initials={initials} color={color} {...props} />\n  );\n}\n"
    },
    {
      "path": "src/blocks/inbox/reply-composer.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/inbox/reply-composer.tsx",
      "content": "'use client';\n\n// TODO(custom): reply composer (recipient, text and actions in one field frame); Textarea has no ghost preset and no slot for actions inside its frame.\nimport { RiAttachment2 } from '@remixicon/react';\nimport { Button } from '@/components/ui/wideset/button/Button';\nimport { IconButton } from '@/components/ui/wideset/button/IconButton';\nimport { Tooltip } from '@/components/ui/wideset/tooltip/Tooltip';\nimport { type FormEvent, useRef, useState } from 'react';\n\nimport type { Person } from './data';\n\n/**\n * The reply, always under the thread: who it goes to, the text, and Send, the page's one filled\n * button. One frame drawn as a Wideset field, so the composer reads as one thing; it grows with\n * the text up to a few lines, then scrolls. Enter starts a new line; Ctrl or ⌘ + Enter sends.\n */\nexport function ReplyComposer({ to, onSend }: { to: Person; onSend: (text: string) => void }) {\n  const [draft, setDraft] = useState('');\n  const field = useRef<HTMLTextAreaElement>(null);\n\n  const send = (event: FormEvent) => {\n    event.preventDefault();\n    const text = draft.trim();\n    // Nothing to send yet: put the cursor where the reply goes.\n    if (!text) return field.current?.focus();\n    onSend(text);\n    setDraft('');\n  };\n\n  return (\n    <form\n      onSubmit={send}\n      aria-label={`Reply to ${to.name}`}\n      className=\"bg-ws-static-highlight-base border-ws-dynamic-secondary-default rounded-ws-container-sm hover:not-has-[textarea:focus]:border-ws-dynamic-secondary-hover has-[textarea:focus]:border-ws-dynamic-primary-strong-default has-[textarea:focus]:shadow-ws-forms-active flex flex-col border\"\n    >\n      <p className=\"gap-ws-5 px-ws-9 pt-ws-7 typography-body-md flex items-baseline\">\n        <span className=\"text-ws-static-subtle\">To</span>\n        <span className=\"text-ws-static-strong\">{to.name}</span>\n        <span className=\"text-ws-static-subtle truncate\">{to.email}</span>\n      </p>\n      <textarea\n        ref={field}\n        aria-label=\"Reply\"\n        placeholder=\"Write a reply\"\n        value={draft}\n        onChange={(event) => setDraft(event.target.value)}\n        onKeyDown={(event) => {\n          if (event.key === 'Enter' && (event.metaKey || event.ctrlKey)) send(event);\n        }}\n        className=\"typography-body-md text-ws-static-strong placeholder:text-ws-static-subtle px-ws-9 py-ws-5 min-h-ws-22 max-h-ws-28 block field-sizing-content w-full resize-none bg-transparent outline-hidden\"\n      />\n      <div className=\"gap-ws-5 px-ws-5 pb-ws-5 flex items-center justify-between\">\n        <Tooltip size=\"sm\">\n          <Tooltip.Trigger asChild>\n            <IconButton\n              icon={RiAttachment2}\n              variant=\"secondary\"\n              preset=\"ghost\"\n              size=\"sm\"\n              aria-label=\"Attach a file\"\n            />\n          </Tooltip.Trigger>\n          <Tooltip.Content className=\"ws-block-utility\" side=\"top\">\n            <Tooltip.Label>Attach a file</Tooltip.Label>\n          </Tooltip.Content>\n        </Tooltip>\n        <Button type=\"submit\" size=\"sm\">\n          Send\n        </Button>\n      </div>\n    </form>\n  );\n}\n"
    },
    {
      "path": "src/blocks/inbox/sidebar.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/inbox/sidebar.tsx",
      "content": "'use client';\n\n// TODO(custom): workspace switcher and account menu are composed by hand.\nimport {\n  RiAddLine,\n  RiArrowDownSLine,\n  RiLogoutBoxRLine,\n  RiSearchLine,\n  RiSettingsLine,\n} from '@remixicon/react';\nimport { Divider } from '@/components/ui/wideset/divider/Divider';\nimport { DropdownMenu } from '@/components/ui/wideset/dropdown/DropdownMenu';\nimport { IconButton } from '@/components/ui/wideset/button/IconButton';\nimport { ListItem } from '@/components/ui/wideset/list-item/ListItem';\nimport { Sidebar } from '@/components/ui/wideset/sidebar/Sidebar';\nimport { type SidebarProps } from '@/components/ui/wideset/sidebar/Sidebar.types';\nimport { TextInput } from '@/components/ui/wideset/text-input/TextInput';\nimport { useState } from 'react';\n\nimport { BrandMark } from './brand-mark';\nimport {\n  account,\n  helpLink,\n  mainLinks,\n  type NavLink,\n  product,\n  settingsLinks,\n  workspace,\n} from './data';\nimport { PersonAvatar } from './person-avatar';\n\n/**\n * The workspace sidebar: switcher, search, the app's pages, settings and the signed-in account.\n * Its toggle sits in the page bar, so the screen holds `collapsed` and passes it down; collapsed,\n * it keeps the mark, the page icons and the avatar.\n */\nexport function InboxSidebar(props: Pick<SidebarProps, 'id' | 'collapsed' | 'onCollapsedChange'>) {\n  const [active, setActive] = useState('inbox');\n\n  const link = ({ id, label, icon, activeIcon }: NavLink) => (\n    <Sidebar.Item\n      key={id}\n      href={`#${id}`}\n      icon={active === id ? (activeIcon ?? icon) : icon}\n      label={label}\n      active={active === id}\n      onClick={() => setActive(id)}\n    />\n  );\n\n  const nav = (\n    <nav aria-label=\"Workspace\" className=\"gap-ws-9 flex flex-col\">\n      <div className=\"flex flex-col\">{mainLinks.map(link)}</div>\n      <Divider weight=\"thin\" />\n      <div role=\"group\" aria-labelledby=\"sidebar-settings\" className=\"gap-ws-2 flex flex-col\">\n        <Sidebar.SectionHeader id=\"sidebar-settings\">Settings</Sidebar.SectionHeader>\n        {settingsLinks.map(link)}\n      </div>\n    </nav>\n  );\n\n  return (\n    <Sidebar {...props}>\n      <Sidebar.Header>\n        <Sidebar.Expanded>\n          <div className=\"gap-ws-9 flex flex-col\">\n            <div className=\"gap-ws-7 pt-ws-3 pb-ws-7 flex items-center\">\n              <BrandMark className=\"size-ws-15\" />\n              <div className=\"flex min-w-0 flex-1 flex-col\">\n                <span className=\"typography-label-strong-sm text-ws-static-strong truncate\">\n                  {workspace.name}\n                </span>\n                <span className=\"typography-caption-md text-ws-static-subtle truncate\">\n                  {product.name}\n                </span>\n              </div>\n              <DropdownMenu>\n                <DropdownMenu.Trigger asChild>\n                  <IconButton\n                    icon={RiArrowDownSLine}\n                    variant=\"secondary\"\n                    preset=\"ghost\"\n                    size=\"xs\"\n                    aria-label=\"Switch workspace\"\n                    className=\"mr-ws-3\"\n                  />\n                </DropdownMenu.Trigger>\n                <DropdownMenu.Content className=\"ws-block-utility\" align=\"end\">\n                  <DropdownMenu.Item data-state=\"checked\">\n                    <ListItem.Content>\n                      <ListItem.Label>{workspace.name}</ListItem.Label>\n                    </ListItem.Content>\n                  </DropdownMenu.Item>\n                  <DropdownMenu.Separator />\n                  <DropdownMenu.Item>\n                    <ListItem.Prefix>\n                      <RiAddLine className=\"size-ws-9\" />\n                    </ListItem.Prefix>\n                    <ListItem.Content>\n                      <ListItem.Label>New workspace</ListItem.Label>\n                    </ListItem.Content>\n                  </DropdownMenu.Item>\n                </DropdownMenu.Content>\n              </DropdownMenu>\n            </div>\n            <TextInput size=\"sm\">\n              <TextInput.Prefix inner>\n                <TextInput.Icon icon={RiSearchLine} />\n              </TextInput.Prefix>\n              <TextInput.Input type=\"search\" placeholder=\"Search\" aria-label=\"Search\" />\n            </TextInput>\n          </div>\n        </Sidebar.Expanded>\n        <Sidebar.Collapsed>\n          <div className=\"pt-ws-3 pb-ws-7 flex justify-center\">\n            <BrandMark className=\"size-ws-15\" />\n          </div>\n        </Sidebar.Collapsed>\n      </Sidebar.Header>\n\n      {/* A section draws only the slot for the state it is in, so the pages go in both. */}\n      <Sidebar.Section scrollable>{nav}</Sidebar.Section>\n\n      <Sidebar.Footer>\n        <div className=\"gap-ws-9 flex flex-col\">\n          <div className=\"flex flex-col\">{link(helpLink)}</div>\n          {/* On the grey ground the line keeps the nav's inset: run edge to edge, it would stop\n              short of the page and read as broken. */}\n          <div className=\"border-ws-static-base pt-ws-5 border-t\">\n            <Sidebar.Expanded>\n              <DropdownMenu>\n                <DropdownMenu.Trigger asChild>\n                  <button\n                    type=\"button\"\n                    className=\"gap-ws-5 px-ws-5 py-ws-3 rounded-ws-control-lg hover:bg-ws-dynamic-tertiary-alpha-strong-default focus-visible:wds-focus-visible outline-ws-dynamic-primary-strong-default flex w-full items-center text-left\"\n                  >\n                    <PersonAvatar name={account.name} initials={account.initials} color=\"orange\" />\n                    <span className=\"flex min-w-0 flex-1 flex-col\">\n                      <span className=\"typography-label-strong-sm text-ws-static-base truncate\">\n                        {account.name}\n                      </span>\n                      <span className=\"typography-caption-md text-ws-static-subtle truncate\">\n                        {account.email}\n                      </span>\n                    </span>\n                    <RiArrowDownSLine\n                      aria-hidden=\"true\"\n                      className=\"size-ws-9 text-ws-static-strong\"\n                    />\n                  </button>\n                </DropdownMenu.Trigger>\n                <DropdownMenu.Content side=\"top\" align=\"start\" className=\"ws-block-utility w-[14rem]\">\n                  <DropdownMenu.Item>\n                    <ListItem.Prefix>\n                      <RiSettingsLine className=\"size-ws-9\" />\n                    </ListItem.Prefix>\n                    <ListItem.Content>\n                      <ListItem.Label>Account settings</ListItem.Label>\n                    </ListItem.Content>\n                  </DropdownMenu.Item>\n                  <DropdownMenu.Separator />\n                  <DropdownMenu.Item variant=\"danger\">\n                    <ListItem.Prefix>\n                      <RiLogoutBoxRLine className=\"size-ws-9\" />\n                    </ListItem.Prefix>\n                    <ListItem.Content>\n                      <ListItem.Label>Log out</ListItem.Label>\n                    </ListItem.Content>\n                  </DropdownMenu.Item>\n                </DropdownMenu.Content>\n              </DropdownMenu>\n            </Sidebar.Expanded>\n            <Sidebar.Collapsed>\n              <div className=\"flex justify-center\">\n                <PersonAvatar\n                  name={account.name}\n                  initials={account.initials}\n                  color=\"orange\"\n                  alt={account.name}\n                  title={account.name}\n                />\n              </div>\n            </Sidebar.Collapsed>\n          </div>\n        </div>\n      </Sidebar.Footer>\n    </Sidebar>\n  );\n}\n"
    }
  ],
  "meta": {
    "version": "1.1.0",
    "commit": "a734f9f0"
  }
}
