{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "block-integrations",
  "type": "registry:block",
  "title": "Integrations",
  "description": "A workspace’s integrations as a settings page: search and categories, the connected apps in a table with their status, the ones to add as tiles, and connecting one in a side panel.",
  "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/icon-button.json",
    "https://wideset.co/r/illustration.json",
    "https://wideset.co/r/inline-alert.json",
    "https://wideset.co/r/list-item.json",
    "https://wideset.co/r/sidebar.json",
    "https://wideset.co/r/sidepanel.json",
    "https://wideset.co/r/status-badge.json",
    "https://wideset.co/r/switch.json",
    "https://wideset.co/r/table.json",
    "https://wideset.co/r/tabs.json",
    "https://wideset.co/r/text-input.json",
    "https://wideset.co/r/tile.json",
    "https://wideset.co/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/integrations/app-logo.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/integrations/app-logo.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 type { App } from './data';\n\n/**\n * An app's logo as a square `Avatar`: its Remix brand icon on the neutral tile, or its initials.\n * Decorative: the app's name always sits beside it.\n */\nexport function AppLogo({ app, size }: { app: App; size: AvatarProps['size'] }) {\n  return 'icon' in app.logo ? (\n    <Avatar shape=\"square\" size={size} icon={<app.logo.icon />} aria-hidden />\n  ) : (\n    <Avatar\n      shape=\"square\"\n      size={size}\n      initials={app.logo.initials}\n      color={app.logo.color}\n      aria-hidden\n    />\n  );\n}\n"
    },
    {
      "path": "src/blocks/integrations/app-panel.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/integrations/app-panel.tsx",
      "content": "'use client';\n\nimport { RiCloseLine } from '@remixicon/react';\nimport { Button } from '@/components/ui/wideset/button/Button';\nimport { IconButton } from '@/components/ui/wideset/button/IconButton';\nimport { InlineAlert } from '@/components/ui/wideset/inline-alert/InlineAlert';\nimport { Sidepanel } from '@/components/ui/wideset/sidepanel/Sidepanel';\nimport { StatusBadge } from '@/components/ui/wideset/status-badge/StatusBadge';\nimport { Switch } from '@/components/ui/wideset/switch/Switch';\nimport { Table } from '@/components/ui/wideset/table/Table';\nimport { useId } from 'react';\n\nimport { AppLogo } from './app-logo';\nimport { STATUS } from './connected-table';\nimport type { App, Connection } from './data';\nimport { formatDay } from './format';\n\ntype AppPanelProps = {\n  app: App;\n  /** Set when the app is already connected: the panel then manages it instead of connecting it. */\n  connection: Connection | undefined;\n  open: boolean;\n  onOpenChange: (open: boolean) => void;\n  onConnect: () => void;\n  onDisconnect: () => void;\n  /** Pausing and resuming the sync; resuming an expired connection reconnects it. */\n  onSyncChange: (syncing: boolean) => void;\n};\n\n/**\n * One app beside the page: what it does and exactly what Orbit may read or change in it, then\n * Connect. For a connected app the same panel pauses the sync, reconnects an expired one or\n * disconnects it.\n */\nexport function AppPanel({\n  app,\n  connection,\n  open,\n  onOpenChange,\n  onConnect,\n  onDisconnect,\n  onSyncChange,\n}: AppPanelProps) {\n  const accessId = useId();\n\n  const status = connection && STATUS[connection.status];\n  const expired = connection?.status === 'expired';\n\n  return (\n    <Sidepanel open={open} onOpenChange={onOpenChange}>\n      <Sidepanel.Panel className=\"ws-block-utility\" size=\"sm\">\n        <Sidepanel.Actions>\n          <Sidepanel.Close asChild>\n            <IconButton\n              variant=\"secondary\"\n              preset=\"border\"\n              size=\"sm\"\n              icon={RiCloseLine}\n              aria-label=\"Close\"\n            />\n          </Sidepanel.Close>\n        </Sidepanel.Actions>\n\n        <Sidepanel.Header>\n          <div className=\"gap-ws-9 pr-ws-16 flex items-center\">\n            <AppLogo app={app} size=\"lg\" />\n            <div className=\"gap-ws-3 flex min-w-0 flex-col\">\n              <div className=\"gap-ws-5 flex items-center\">\n                <Sidepanel.Title>{app.name}</Sidepanel.Title>\n                {status && <StatusBadge color={status.color}>{status.label}</StatusBadge>}\n              </div>\n              <Sidepanel.Description className=\"mt-ws-0\">\n                {connection\n                  ? `Connected by ${connection.connectedBy} on ${formatDay(connection.connectedOn)}`\n                  : app.summary}\n              </Sidepanel.Description>\n            </div>\n          </div>\n        </Sidepanel.Header>\n\n        <Sidepanel.Content className=\"gap-ws-12 flex flex-col\">\n          {expired && (\n            <InlineAlert\n              status=\"error\"\n              orientation=\"vertical\"\n              persistent\n              title={`Orbit can’t reach ${app.name}`}\n              message={`The access ${app.name} gave Orbit expired on ${formatDay(connection.lastSync)}, so ${connection.syncs.toLowerCase()} stopped syncing. Reconnect to pick up where it left off.`}\n            />\n          )}\n\n          <p className=\"typography-body-md text-ws-static-base\">{app.about}</p>\n\n          {connection && !expired && (\n            <Switch\n              size=\"sm\"\n              labelPosition=\"left\"\n              label=\"Sync with Orbit\"\n              className=\"w-full justify-between\"\n              checked={connection.status === 'active'}\n              onCheckedChange={onSyncChange}\n            />\n          )}\n\n          <section aria-labelledby={accessId} className=\"gap-ws-5 flex flex-col\">\n            <h3 id={accessId} className=\"typography-label-strong-md text-ws-static-strong\">\n              What Orbit can access\n            </h3>\n            <Table aria-labelledby={accessId} className=\"w-full table-fixed\">\n              <Table.Head>\n                <Table.Row>\n                  <Table.Header flushMargin>Data</Table.Header>\n                  <Table.Header flushMargin align=\"right\" className=\"w-[9rem]\">\n                    Access\n                  </Table.Header>\n                </Table.Row>\n              </Table.Head>\n              <Table.Body>\n                {app.scopes.map((scope) => (\n                  <Table.Row key={scope.data}>\n                    <Table.Cell flushMargin>{scope.data}</Table.Cell>\n                    <Table.Cell flushMargin align=\"right\">\n                      {scope.access}\n                    </Table.Cell>\n                  </Table.Row>\n                ))}\n              </Table.Body>\n            </Table>\n          </section>\n\n          {!connection && (\n            <p className=\"typography-body-md text-ws-static-subtle\">\n              You approve this access in {app.name}. Any admin of the workspace can disconnect it\n              later.\n            </p>\n          )}\n        </Sidepanel.Content>\n\n        <Sidepanel.Footer>\n          {connection ? (\n            <>\n              <Button size=\"sm\" variant=\"danger\" preset=\"ghost\" onClick={onDisconnect}>\n                Disconnect\n              </Button>\n              <div className=\"gap-ws-5 ml-auto flex\">\n                {expired ? (\n                  <Button size=\"sm\" onClick={() => onSyncChange(true)}>\n                    {`Reconnect ${app.name}`}\n                  </Button>\n                ) : (\n                  <Sidepanel.Close asChild>\n                    <Button size=\"sm\" variant=\"secondary\" preset=\"border\">\n                      Done\n                    </Button>\n                  </Sidepanel.Close>\n                )}\n              </div>\n            </>\n          ) : (\n            <div className=\"gap-ws-5 ml-auto flex\">\n              <Sidepanel.Close asChild>\n                <Button size=\"sm\" variant=\"secondary\" preset=\"border\">\n                  Cancel\n                </Button>\n              </Sidepanel.Close>\n              <Button size=\"sm\" onClick={onConnect}>\n                {`Connect ${app.name}`}\n              </Button>\n            </div>\n          )}\n        </Sidepanel.Footer>\n      </Sidepanel.Panel>\n    </Sidepanel>\n  );\n}\n"
    },
    {
      "path": "src/blocks/integrations/app-tile.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/integrations/app-tile.tsx",
      "content": "'use client';\n\nimport { Button } from '@/components/ui/wideset/button/Button';\nimport { Tile } from '@/components/ui/wideset/tile/Tile';\n\nimport { AppLogo } from './app-logo';\nimport type { App } from './data';\n\n/**\n * An app not connected yet: its logo, name and what connecting it does. Connect shows on the tile\n * under the pointer and on keyboard focus, so a grid of tiles is not a grid of the same word; a\n * touch screen has no hover, so there it stays.\n */\nexport function AppTile({ app, onConnect }: { app: App; onConnect: () => void }) {\n  return (\n    <Tile asChild>\n      <li>\n        <AppLogo app={app} size=\"md\" />\n        <div className=\"gap-ws-3 flex min-w-0 flex-1 flex-col\">\n          <Tile.Title className=\"truncate\">{app.name}</Tile.Title>\n          <Tile.Description className=\"truncate\">{app.summary}</Tile.Description>\n        </div>\n        <Button\n          size=\"sm\"\n          variant=\"secondary\"\n          preset=\"border\"\n          onClick={onConnect}\n          aria-label={`Connect ${app.name}`}\n          className=\"opacity-0 group-focus-within:opacity-100 group-hover:opacity-100 pointer-coarse:opacity-100\"\n        >\n          Connect\n        </Button>\n      </li>\n    </Tile>\n  );\n}\n"
    },
    {
      "path": "src/blocks/integrations/brand-mark.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/integrations/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/integrations/connected-table.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/integrations/connected-table.tsx",
      "content": "'use client';\n\nimport { Button } from '@/components/ui/wideset/button/Button';\nimport { StatusBadge } from '@/components/ui/wideset/status-badge/StatusBadge';\nimport { type StatusBadgeProps } from '@/components/ui/wideset/status-badge/StatusBadge.types';\nimport { Table } from '@/components/ui/wideset/table/Table';\nimport { useId } from 'react';\n\nimport { AppLogo } from './app-logo';\nimport type { App, Connection, ConnectionStatus } from './data';\nimport { formatSince } from './format';\n\n/**\n * A connection's colour says how it stands: active is healthy, paused waits for someone to resume\n * it, expired has stopped syncing and needs reconnecting.\n */\nexport const STATUS: Record<\n  ConnectionStatus,\n  { label: string; color: NonNullable<StatusBadgeProps['color']> }\n> = {\n  active: { label: 'Active', color: 'positive' },\n  paused: { label: 'Paused', color: 'notice' },\n  expired: { label: 'Access expired', color: 'negative' },\n};\n\ntype ConnectedTableProps = {\n  rows: { app: App; connection: Connection }[];\n  onManage: (appId: string) => void;\n};\n\n/** The apps already connected: what each syncs, how it is doing, and the way into its settings. */\nexport function ConnectedTable({ rows, onManage }: ConnectedTableProps) {\n  const titleId = useId();\n\n  return (\n    <section aria-labelledby={titleId} className=\"gap-ws-5 flex flex-col\">\n      <h2 id={titleId} className=\"typography-label-strong-md text-ws-static-strong\">\n        Connected\n      </h2>\n      {/* On the page's white the table needs no box: its own lines carry it. */}\n      <div className=\"ws-scrollbar relative overflow-x-auto\">\n        <Table aria-labelledby={titleId} className=\"w-full min-w-[52rem] table-fixed\">\n          <Table.Head>\n            <Table.Row>\n              <Table.Header flushMargin className=\"w-[26%]\">\n                App\n              </Table.Header>\n              <Table.Header className=\"w-[30%]\">Syncs</Table.Header>\n              <Table.Header className=\"w-[18%]\">Status</Table.Header>\n              <Table.Header className=\"w-[13%]\">Last sync</Table.Header>\n              <Table.Header flushMargin align=\"right\">\n                <span className=\"sr-only\">Actions</span>\n              </Table.Header>\n            </Table.Row>\n          </Table.Head>\n          <Table.Body>\n            {rows.map(({ app, connection }) => {\n              const status = STATUS[connection.status];\n              return (\n                <Table.Row key={app.id}>\n                  <Table.Cell flushMargin>\n                    <span className=\"gap-ws-5 flex min-w-0 items-center\">\n                      <AppLogo app={app} size=\"md\" />\n                      <span className=\"text-ws-static-strong truncate\">{app.name}</span>\n                    </span>\n                  </Table.Cell>\n                  <Table.Cell truncate>{connection.syncs}</Table.Cell>\n                  <Table.Cell>\n                    <StatusBadge color={status.color}>{status.label}</StatusBadge>\n                  </Table.Cell>\n                  <Table.Cell className=\"tabular-nums\">\n                    {formatSince(connection.lastSync)}\n                  </Table.Cell>\n                  <Table.Cell flushMargin align=\"right\">\n                    <Button\n                      size=\"sm\"\n                      variant=\"secondary\"\n                      preset={connection.status === 'expired' ? 'border' : 'ghost'}\n                      onClick={() => onManage(app.id)}\n                      aria-label={\n                        connection.status === 'expired'\n                          ? `Reconnect ${app.name}`\n                          : `Manage ${app.name}`\n                      }\n                    >\n                      {connection.status === 'expired' ? 'Reconnect' : 'Manage'}\n                    </Button>\n                  </Table.Cell>\n                </Table.Row>\n              );\n            })}\n          </Table.Body>\n        </Table>\n      </div>\n    </section>\n  );\n}\n"
    },
    {
      "path": "src/blocks/integrations/data.ts",
      "type": "registry:file",
      "target": "blocks/wideset/integrations/data.ts",
      "content": "import {\n  type RemixiconComponentType,\n  RiBankCardLine,\n  RiContactsBook3Line,\n  RiDropboxFill,\n  RiGoogleFill,\n  RiHandCoinLine,\n  RiHome5Line,\n  RiInbox2Line,\n  RiKey2Line,\n  RiLineChartLine,\n  RiLinkedinFill,\n  RiMicrosoftFill,\n  RiNotionFill,\n  RiPieChart2Line,\n  RiPlugFill,\n  RiPlugLine,\n  RiQuestionLine,\n  RiSettings3Line,\n  RiSlackFill,\n  RiTeamLine,\n  RiWebhookFill,\n  RiWhatsappFill,\n} from '@remixicon/react';\nimport type { AvatarColor } from '@/components/ui/wideset/avatar/Avatar.colors';\n\n/** The product is Orbit; the workspace connecting apps to it is Lumen Studio. */\nexport const PRODUCT = { name: 'Orbit' };\nexport const WORKSPACE = { name: 'Lumen Studio' };\nexport const ACCOUNT = { name: 'Maya Okafor', email: 'maya@lumenstudio.co', initials: 'MO' };\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 MAIN_LINKS: NavLink[] = [\n  { id: 'home', label: 'Home', icon: RiHome5Line },\n  { id: 'inbox', label: 'Inbox', icon: RiInbox2Line },\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\n/** Integrations is a page of the workspace's settings. */\nexport const SETTINGS_LINKS: 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, activeIcon: RiPlugFill },\n  { id: 'api-keys', label: 'API keys', icon: RiKey2Line },\n];\n\nexport const HELP_LINK: NavLink = { id: 'help', label: 'Help and support', icon: RiQuestionLine };\n\n/** The moment the screen shows; every sync time below is relative to it. */\nexport const NOW = '2026-11-10T14:30:00Z';\n\nexport type Category = 'crm' | 'communication' | 'data' | 'finance' | 'productivity';\n\nexport const CATEGORIES: { value: Category | 'all'; label: string }[] = [\n  { value: 'all', label: 'All' },\n  { value: 'crm', label: 'CRM' },\n  { value: 'communication', label: 'Communication' },\n  { value: 'data', label: 'Data' },\n  { value: 'finance', label: 'Finance' },\n  { value: 'productivity', label: 'Productivity' },\n];\n\n/** What Orbit may do with one kind of data in the app. */\nexport type Scope = { data: string; access: 'Read' | 'Write' | 'Read and write' };\n\n/**\n * The logo is the app's Remix brand icon where Remix has one, otherwise its initials in a colour\n * close to the brand's.\n */\nexport type AppLogo = { icon: RemixiconComponentType } | { initials: string; color: AvatarColor };\n\nexport type App = {\n  id: string;\n  name: string;\n  category: Category;\n  logo: AppLogo;\n  /** One line on the tile: what connecting it does. Short enough to show whole in a tile. */\n  summary: string;\n  /** The panel's paragraph: what flows where. */\n  about: string;\n  scopes: Scope[];\n};\n\nexport type ConnectionStatus = 'active' | 'paused' | 'expired';\n\n/** A connected app: what it syncs, how it is doing and who connected it. */\nexport type Connection = {\n  appId: string;\n  /** What flows between the app and Orbit, in a few words. */\n  syncs: string;\n  status: ConnectionStatus;\n  /** The last sync that went through. */\n  lastSync: string;\n  connectedBy: string;\n  connectedOn: string;\n};\n\nexport const APPS: App[] = [\n  {\n    id: 'hubspot',\n    name: 'HubSpot',\n    category: 'crm',\n    logo: { initials: 'HS', color: 'orange' },\n    summary: 'Sync contacts and companies',\n    about:\n      'Orbit reads contacts, companies and list membership from HubSpot and writes lifecycle stages back, so marketing sees which leads became customers.',\n    scopes: [\n      { data: 'Contacts and companies', access: 'Read and write' },\n      { data: 'Lists', access: 'Read' },\n      { data: 'Lifecycle stages', access: 'Write' },\n    ],\n  },\n  {\n    id: 'salesforce',\n    name: 'Salesforce',\n    category: 'crm',\n    logo: { initials: 'SF', color: 'blue' },\n    summary: 'Sync accounts and deals',\n    about:\n      'Orbit reads accounts, contacts and opportunities from Salesforce and writes deal stages back, so both stay in step. Changes sync every 15 minutes.',\n    scopes: [\n      { data: 'Accounts and contacts', access: 'Read and write' },\n      { data: 'Opportunities', access: 'Read and write' },\n      { data: 'Users and owners', access: 'Read' },\n      { data: 'Tasks and events', access: 'Write' },\n    ],\n  },\n  {\n    id: 'pipedrive',\n    name: 'Pipedrive',\n    category: 'crm',\n    logo: { initials: 'PD', color: 'green' },\n    summary: 'Import deals, stages and owners',\n    about:\n      'Orbit imports your Pipedrive deals with their stages and owners, then keeps new deals and stage changes in sync.',\n    scopes: [\n      { data: 'Deals and stages', access: 'Read' },\n      { data: 'People and organizations', access: 'Read' },\n      { data: 'Users', access: 'Read' },\n    ],\n  },\n  {\n    id: 'linkedin',\n    name: 'LinkedIn Sales Navigator',\n    category: 'crm',\n    logo: { icon: RiLinkedinFill },\n    summary: 'Save leads and see InMail history',\n    about:\n      'Leads you save in Sales Navigator appear in Orbit with their company, role and InMail history.',\n    scopes: [\n      { data: 'Saved leads and accounts', access: 'Read' },\n      { data: 'InMail history', access: 'Read' },\n    ],\n  },\n  {\n    id: 'slack',\n    name: 'Slack',\n    category: 'communication',\n    logo: { icon: RiSlackFill },\n    summary: 'Post deal alerts to channels',\n    about:\n      'Orbit posts won deals, renewals and churn alerts to the channels you choose, and lets people look up a customer with /orbit.',\n    scopes: [\n      { data: 'Public channels', access: 'Read' },\n      { data: 'Messages in chosen channels', access: 'Write' },\n      { data: 'Slash commands', access: 'Write' },\n    ],\n  },\n  {\n    id: 'google',\n    name: 'Google Workspace',\n    category: 'communication',\n    logo: { icon: RiGoogleFill },\n    summary: 'Log Gmail threads and meetings',\n    about:\n      'Orbit logs Gmail threads and Calendar meetings with your customers on their timelines. It never reads mail from people outside your customer list.',\n    scopes: [\n      { data: 'Gmail message headers', access: 'Read' },\n      { data: 'Calendar events', access: 'Read' },\n      { data: 'Contacts', access: 'Read' },\n    ],\n  },\n  {\n    id: 'teams',\n    name: 'Microsoft Teams',\n    category: 'communication',\n    logo: { icon: RiMicrosoftFill },\n    summary: 'Post deal updates to a channel',\n    about: 'Orbit posts won deals, renewals and churn alerts to the Teams channels you choose.',\n    scopes: [\n      { data: 'Teams and channels', access: 'Read' },\n      { data: 'Channel messages', access: 'Write' },\n    ],\n  },\n  {\n    id: 'whatsapp',\n    name: 'WhatsApp Business',\n    category: 'communication',\n    logo: { icon: RiWhatsappFill },\n    summary: 'Message customers from Orbit',\n    about:\n      'Send and receive WhatsApp messages from a customer’s record in Orbit; every conversation lands on their timeline.',\n    scopes: [\n      { data: 'Business profile', access: 'Read' },\n      { data: 'Messages', access: 'Read and write' },\n    ],\n  },\n  {\n    id: 'snowflake',\n    name: 'Snowflake',\n    category: 'data',\n    logo: { initials: 'SN', color: 'cyan' },\n    summary: 'Load customer tables every night',\n    about:\n      'Orbit writes customers, deals, subscriptions and invoices to a Snowflake schema every night, ready for your own models.',\n    scopes: [\n      { data: 'One schema you choose', access: 'Write' },\n      { data: 'Warehouse usage', access: 'Read' },\n    ],\n  },\n  {\n    id: 'segment',\n    name: 'Segment',\n    category: 'data',\n    logo: { initials: 'SG', color: 'teal' },\n    summary: 'Show product events on timelines',\n    about:\n      'Product events from Segment show on each customer’s timeline and can start an automation, such as a trial that stalls.',\n    scopes: [\n      { data: 'Track and identify events', access: 'Read' },\n      { data: 'Traits', access: 'Read' },\n    ],\n  },\n  {\n    id: 'webhooks',\n    name: 'Webhooks',\n    category: 'data',\n    logo: { icon: RiWebhookFill },\n    summary: 'Send Orbit events to any URL',\n    about:\n      'Orbit sends a signed request to your URL when a customer, deal or invoice changes. Built by Orbit.',\n    scopes: [{ data: 'Customer, deal and invoice events', access: 'Write' }],\n  },\n  {\n    id: 'stripe',\n    name: 'Stripe',\n    category: 'finance',\n    logo: { initials: 'ST', color: 'indigo' },\n    summary: 'Sync payments and subscriptions',\n    about:\n      'Orbit reads payments, subscriptions and invoices from Stripe to work out revenue, churn and expansion for each customer.',\n    scopes: [\n      { data: 'Customers', access: 'Read' },\n      { data: 'Subscriptions and invoices', access: 'Read' },\n      { data: 'Payments and refunds', access: 'Read' },\n    ],\n  },\n  {\n    id: 'quickbooks',\n    name: 'QuickBooks',\n    category: 'finance',\n    logo: { initials: 'QB', color: 'green' },\n    summary: 'Sync invoices and payments',\n    about:\n      'Invoices raised in Orbit are created in QuickBooks, and payments recorded there mark them paid in Orbit.',\n    scopes: [\n      { data: 'Customers', access: 'Read and write' },\n      { data: 'Invoices', access: 'Read and write' },\n      { data: 'Payments', access: 'Read' },\n    ],\n  },\n  {\n    id: 'xero',\n    name: 'Xero',\n    category: 'finance',\n    logo: { initials: 'XE', color: 'blue' },\n    summary: 'Match invoices to bank payments',\n    about:\n      'Invoices raised in Orbit are created in Xero, and payments reconciled there mark them paid in Orbit.',\n    scopes: [\n      { data: 'Contacts', access: 'Read and write' },\n      { data: 'Invoices', access: 'Read and write' },\n      { data: 'Bank transactions', access: 'Read' },\n    ],\n  },\n  {\n    id: 'notion',\n    name: 'Notion',\n    category: 'productivity',\n    logo: { icon: RiNotionFill },\n    summary: 'Turn account notes into pages',\n    about:\n      'Account plans and call notes written in Orbit can be published to a Notion page your team shares.',\n    scopes: [\n      { data: 'Pages you share with Orbit', access: 'Read and write' },\n      { data: 'Workspace members', access: 'Read' },\n    ],\n  },\n  {\n    id: 'dropbox',\n    name: 'Dropbox',\n    category: 'productivity',\n    logo: { icon: RiDropboxFill },\n    summary: 'Attach contracts to deals',\n    about:\n      'Pick a contract or proposal from Dropbox to attach it to a deal; Orbit links to the file, so it is never copied.',\n    scopes: [\n      { data: 'Files you pick', access: 'Read' },\n      { data: 'Shared links', access: 'Write' },\n    ],\n  },\n];\n\n/** What Lumen Studio has connected. */\nexport const CONNECTIONS: Connection[] = [\n  {\n    appId: 'slack',\n    syncs: 'Deal alerts to #revenue',\n    status: 'active',\n    lastSync: '2026-11-10T14:28:00Z',\n    connectedBy: 'Maya Okafor',\n    connectedOn: '2026-03-04',\n  },\n  {\n    appId: 'stripe',\n    syncs: 'Payments and subscriptions',\n    status: 'active',\n    lastSync: '2026-11-10T14:26:00Z',\n    connectedBy: 'Daniel Reyes',\n    connectedOn: '2025-11-18',\n  },\n  {\n    appId: 'google',\n    syncs: 'Gmail and Calendar activity',\n    status: 'paused',\n    lastSync: '2026-11-03T09:12:00Z',\n    connectedBy: 'Maya Okafor',\n    connectedOn: '2026-01-12',\n  },\n  {\n    appId: 'hubspot',\n    syncs: 'Contacts and companies',\n    status: 'expired',\n    lastSync: '2026-11-09T22:45:00Z',\n    connectedBy: 'Priya Shah',\n    connectedOn: '2026-06-23',\n  },\n];\n\n/** What a newly connected app syncs, until someone changes it. */\nexport const DEFAULT_SYNCS: Record<Category, string> = {\n  crm: 'Contacts and deals, both ways',\n  communication: 'Messages and meetings',\n  data: 'Customer and revenue data',\n  finance: 'Invoices and payments',\n  productivity: 'Notes and files',\n};\n"
    },
    {
      "path": "src/blocks/integrations/empty-state.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/integrations/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/integrations/format.ts",
      "type": "registry:file",
      "target": "blocks/wideset/integrations/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';\n\nconst relative = new Intl.RelativeTimeFormat(LOCALE, { numeric: 'auto', style: 'short' });\n// Calendar days (`2026-03-04`) parse as UTC midnight: format them in UTC too.\nconst day = new Intl.DateTimeFormat(LOCALE, { month: 'short', day: 'numeric', timeZone: 'UTC' });\nconst fullDay = new Intl.DateTimeFormat(LOCALE, {\n  month: 'short',\n  day: 'numeric',\n  year: 'numeric',\n  timeZone: 'UTC',\n});\n\n/** `2 min. ago`, `8 hr. ago` within a day of now, then the day: `Nov 3`. */\nexport const formatSince = (iso: string) => {\n  const minutes = Math.round((Date.parse(iso) - Date.parse(NOW)) / 60_000);\n  if (minutes > -1) return 'Just now';\n  if (minutes > -60) return relative.format(minutes, 'minute');\n  if (minutes > -24 * 60) return relative.format(Math.round(minutes / 60), 'hour');\n  return day.format(new Date(iso));\n};\n\nexport const formatDay = (iso: string) => fullDay.format(new Date(iso));\n"
    },
    {
      "path": "src/blocks/integrations/index.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/integrations/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 { Button } from '@/components/ui/wideset/button/Button';\nimport { cn } from '@/lib/wideset/utils';\nimport { IconButton } from '@/components/ui/wideset/button/IconButton';\nimport { Tabs } from '@/components/ui/wideset/tabs/Tabs';\nimport { useId, useState } from 'react';\n\nimport { AppPanel } from './app-panel';\nimport { AppTile } from './app-tile';\nimport { ConnectedTable } from './connected-table';\nimport {\n  ACCOUNT,\n  type App,\n  APPS,\n  CATEGORIES,\n  type Category,\n  type Connection,\n  CONNECTIONS,\n  DEFAULT_SYNCS,\n  NOW,\n} from './data';\nimport { EmptyState } from './empty-state';\nimport { PageHeader } from './page-header';\nimport { IntegrationsSidebar } from './sidebar';\n\ntype Filter = Category | 'all';\n\n/**\n * The visual directions (specs/patterns/directions.md), each one `<AppShell direction>`. An app\n * picks one and keeps it on every screen; this screen takes three only to show that the page\n * inside stays the same. The top bar's line: the base line on Inset's raised card, as every Inset\n * screen has it, the subtle one on the page's white.\n */\nconst BAR_LINE = {\n  flat: 'border-ws-static-subtle',\n  frame: 'border-ws-static-subtle',\n  inset: 'border-ws-static-base',\n} as const;\nexport type Direction = keyof typeof BAR_LINE;\n\nconst inView = (app: App, category: Filter, query: string) =>\n  (category === 'all' || app.category === category) &&\n  `${app.name} ${app.summary}`.toLowerCase().includes(query.trim().toLowerCase());\n\n/**\n * Integrations, a settings page beside the workspace sidebar, in the Flat direction (or Frame or\n * Inset, through `direction`). Everything sits on the page's white: the connected apps as a table,\n * the ones to add as outlined tiles. The search and the category narrow both; Connect opens a side\n * panel with what the app may access, and connecting moves it up to Connected.\n */\nexport default function Integrations({ direction = 'flat' }: { direction?: Direction }) {\n  const availableId = useId();\n  const sidebarId = useId();\n  const [collapsed, setCollapsed] = useState(false);\n  const [connections, setConnections] = useState<Connection[]>(CONNECTIONS);\n  const [query, setQuery] = useState('');\n  const [category, setCategory] = useState<Filter>('all');\n  // While the panel slides out it keeps showing what it showed (`closing`), not the change.\n  const [panel, setPanel] = useState<{ appId: string; open: boolean; closing?: Connection }>();\n\n  const connectionOf = (appId: string) => connections.find((entry) => entry.appId === appId);\n  const connected = connections\n    .map((connection) => ({ app: APPS.find((app) => app.id === connection.appId)!, connection }))\n    .filter(({ app }) => inView(app, category, query));\n  const available = APPS.filter((app) => !connectionOf(app.id) && inView(app, category, query));\n\n  const close = () =>\n    panel && setPanel({ ...panel, open: false, closing: connectionOf(panel.appId) });\n\n  const connect = (app: App) => {\n    close();\n    setConnections((all) => [\n      {\n        appId: app.id,\n        syncs: DEFAULT_SYNCS[app.category],\n        status: 'active',\n        lastSync: NOW,\n        connectedBy: ACCOUNT.name,\n        connectedOn: NOW.slice(0, 10),\n      },\n      ...all,\n    ]);\n  };\n\n  const disconnect = (app: App) => {\n    close();\n    setConnections((all) => all.filter((entry) => entry.appId !== app.id));\n  };\n\n  const setSyncing = (app: App, syncing: boolean) =>\n    setConnections((all) =>\n      all.map((entry) =>\n        entry.appId !== app.id\n          ? entry\n          : syncing\n            ? { ...entry, status: 'active', lastSync: NOW }\n            : { ...entry, status: 'paused' },\n      ),\n    );\n\n  const panelApp = panel && APPS.find((app) => app.id === panel.appId)!;\n  const noResults = connected.length === 0 && available.length === 0;\n  // From a category, widen the search first when other categories have a match.\n  const elsewhere = category !== 'all' && APPS.some((app) => inView(app, 'all', query));\n  const categoryLabel = CATEGORIES.find((entry) => entry.value === category)!.label;\n\n  return (\n    <AppShell className=\"ws-block-utility\" direction={direction}>\n      <IntegrationsSidebar id={sidebarId} collapsed={collapsed} onCollapsedChange={setCollapsed} />\n      <AppShell.Main className=\"flex flex-col\">\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={cn(BAR_LINE[direction], 'h-ws-18 flex shrink-0 items-center border-b')}>\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={() => setCollapsed(!collapsed)}\n              className=\"-ml-ws-5\"\n            />\n            <Breadcrumbs separator=\"arrow\">\n              <Breadcrumbs.Item asChild>\n                <a href=\"#settings\">Settings</a>\n              </Breadcrumbs.Item>\n              <Breadcrumbs.Item>Integrations</Breadcrumbs.Item>\n            </Breadcrumbs>\n          </div>\n        </div>\n\n        {/* The page scrolls here, under the bar (in Inset inside the card, so its corners stay put). */}\n        <div className=\"ws-scrollbar min-h-0 flex-1 overflow-y-auto\">\n          <div className=\"gap-ws-12 px-ws-14 pt-ws-14 pb-ws-16 mx-auto flex w-full max-w-[80rem] flex-col\">\n            <PageHeader query={query} onQueryChange={setQuery} />\n\n            <Tabs\n              value={category}\n              onValueChange={(value) => setCategory(value as Filter)}\n              className=\"[scrollbar-width:none] overflow-x-auto\"\n            >\n              <Tabs.List aria-label=\"Categories\" className=\"min-w-full\">\n                {CATEGORIES.map((entry) => (\n                  <Tabs.Item key={entry.value} value={entry.value}>\n                    <Tabs.Label>{entry.label}</Tabs.Label>\n                  </Tabs.Item>\n                ))}\n              </Tabs.List>\n            </Tabs>\n\n            <div className=\"gap-ws-16 flex flex-col\">\n              {connected.length > 0 && (\n                <ConnectedTable\n                  rows={connected}\n                  onManage={(appId) => setPanel({ appId, open: true })}\n                />\n              )}\n\n              {available.length > 0 && (\n                <section aria-labelledby={availableId} className=\"gap-ws-7 flex flex-col\">\n                  <h2 id={availableId} className=\"typography-label-strong-md text-ws-static-strong\">\n                    Available\n                  </h2>\n                  {/* As many columns as fit a tile: the sidebar opens and closes, so the window's\n                      width says little about the page's. */}\n                  <ul className=\"gap-ws-7 grid grid-cols-[repeat(auto-fill,minmax(20rem,1fr))]\">\n                    {available.map((app) => (\n                      <AppTile\n                        key={app.id}\n                        app={app}\n                        onConnect={() => setPanel({ appId: app.id, open: true })}\n                      />\n                    ))}\n                  </ul>\n                </section>\n              )}\n\n              {noResults && (\n                <div className=\"py-ws-20\">\n                  <EmptyState\n                    title={\n                      category === 'all'\n                        ? `No apps match “${query.trim()}”`\n                        : `No ${categoryLabel} apps match “${query.trim()}”`\n                    }\n                    description=\"Check the spelling, or tell us which app you need at integrations@orbit.so.\"\n                  >\n                    <Button\n                      size=\"sm\"\n                      variant=\"secondary\"\n                      preset=\"border\"\n                      onClick={() => (elsewhere ? setCategory('all') : setQuery(''))}\n                    >\n                      {elsewhere ? 'Search all categories' : 'Clear search'}\n                    </Button>\n                  </EmptyState>\n                </div>\n              )}\n            </div>\n          </div>\n        </div>\n      </AppShell.Main>\n\n      {panel && panelApp && (\n        <AppPanel\n          app={panelApp}\n          connection={panel.open ? connectionOf(panel.appId) : panel.closing}\n          open={panel.open}\n          onOpenChange={(open) => (open ? setPanel({ ...panel, open }) : close())}\n          onConnect={() => connect(panelApp)}\n          onDisconnect={() => disconnect(panelApp)}\n          onSyncChange={(syncing) => setSyncing(panelApp, syncing)}\n        />\n      )}\n    </AppShell>\n  );\n}\n"
    },
    {
      "path": "src/blocks/integrations/page-header.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/integrations/page-header.tsx",
      "content": "'use client';\n\n// TODO(custom): page header (title, a line of description, search field on the right); no PageHeader in Wideset.\nimport { RiSearchLine } from '@remixicon/react';\nimport { TextInput } from '@/components/ui/wideset/text-input/TextInput';\n\nimport { WORKSPACE } from './data';\n\ntype PageHeaderProps = {\n  query: string;\n  onQueryChange: (query: string) => void;\n};\n\n/** The page's title, what the page is for, and the search over every app. */\nexport function PageHeader({ query, onQueryChange }: PageHeaderProps) {\n  return (\n    <header className=\"gap-ws-9 flex flex-wrap items-center justify-between\">\n      <div className=\"gap-ws-2 flex min-w-0 flex-col\">\n        <h1 className=\"typography-title-md text-ws-static-strong\">Integrations</h1>\n        <p className=\"typography-body-md text-ws-static-subtle\">\n          Connect the tools {WORKSPACE.name} already uses. Orbit syncs them every 15 minutes.\n        </p>\n      </div>\n      <TextInput\n        size=\"sm\"\n        className=\"w-[20rem] max-w-full\"\n        value={query}\n        onChange={(event) => onQueryChange(event.target.value)}\n      >\n        <TextInput.Prefix inner>\n          <TextInput.Icon icon={RiSearchLine} />\n        </TextInput.Prefix>\n        <TextInput.Input type=\"search\" placeholder=\"Search apps\" aria-label=\"Search apps\" />\n        <TextInput.Suffix inner>\n          <TextInput.ClearButton aria-label=\"Clear search\" />\n        </TextInput.Suffix>\n      </TextInput>\n    </header>\n  );\n}\n"
    },
    {
      "path": "src/blocks/integrations/people.assets.ts",
      "type": "registry:file",
      "target": "blocks/wideset/integrations/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,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',\n};\n"
    },
    {
      "path": "src/blocks/integrations/person-avatar.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/integrations/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/integrations/sidebar.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/integrations/sidebar.tsx",
      "content": "'use client';\n\n// TODO(custom): workspace switcher and account menu are composed by hand.\nimport { RiAddLine, RiArrowDownSLine, RiLogoutBoxRLine, RiSettingsLine } 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 { useState } from 'react';\n\nimport { BrandMark } from './brand-mark';\nimport {\n  ACCOUNT,\n  HELP_LINK,\n  MAIN_LINKS,\n  type NavLink,\n  PRODUCT,\n  SETTINGS_LINKS,\n  WORKSPACE,\n} from './data';\nimport { PersonAvatar } from './person-avatar';\n\n/**\n * The workspace sidebar: switcher, the app's pages, settings (Integrations is one of them) and the\n * signed-in account. Its surface comes from the screen's `AppShell direction`. Its toggle sits in the page bar, so the screen holds `collapsed` and passes it\n * down; collapsed, it keeps the mark, the page icons and the avatar. It has no search of its own:\n * the page's search is the one on this screen.\n */\nexport function IntegrationsSidebar(\n  props: Pick<SidebarProps, 'id' | 'collapsed' | 'onCollapsedChange'>,\n) {\n  const [active, setActive] = useState('integrations');\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\">{MAIN_LINKS.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        {SETTINGS_LINKS.map(link)}\n      </div>\n    </nav>\n  );\n\n  return (\n    <Sidebar {...props}>\n      <Sidebar.Header>\n        <Sidebar.Expanded>\n          <div className=\"gap-ws-7 py-ws-3 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        </Sidebar.Expanded>\n        <Sidebar.Collapsed>\n          <div className=\"py-ws-3 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(HELP_LINK)}</div>\n          {/* The line keeps the nav's inset in every direction: on Inset's grey ground, run edge to\n              edge, it would stop 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"
  }
}
