{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "block-media-viewer",
  "type": "registry:block",
  "title": "Media viewer",
  "description": "A file opened full screen over the app: the file large in the middle with zoom, moving to the previous or next, its details and comments beside it, and closing back to its row.",
  "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/list-item.json",
    "https://wideset.co/r/sidebar.json",
    "https://wideset.co/r/table.json",
    "https://wideset.co/r/text-input.json",
    "https://wideset.co/r/toast.json",
    "https://wideset.co/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/media-viewer/brand-mark.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/media-viewer/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/media-viewer/comment-field.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/media-viewer/comment-field.tsx",
      "content": "'use client';\n\nimport { RiSendPlaneLine } from '@remixicon/react';\nimport { TextInput } from '@/components/ui/wideset/text-input/TextInput';\nimport { type FormEvent, useState } from 'react';\n\nimport { PEOPLE } from './data';\nimport { PersonAvatar } from './person-avatar';\n\n/**\n * The one-line field for a new comment, under the others (copied from the recording block):\n * Enter or the arrow sends it, and nothing is sent while it is empty.\n */\nexport function CommentField({ onComment }: { onComment: (text: string) => void }) {\n  const [text, setText] = useState('');\n  const me = PEOPLE.maya;\n\n  const send = (event: FormEvent) => {\n    event.preventDefault();\n    if (!text.trim()) return;\n    onComment(text.trim());\n    setText('');\n  };\n\n  return (\n    <form onSubmit={send} className=\"gap-ws-5 flex items-center\">\n      <PersonAvatar size=\"sm\" name={me.name} initials={me.initials} color={me.color} aria-hidden />\n      <TextInput\n        size=\"sm\"\n        className=\"min-w-0 flex-1\"\n        value={text}\n        onChange={(event) => setText(event.target.value)}\n      >\n        <TextInput.Input placeholder=\"Add a comment\" aria-label=\"Add a comment\" />\n        <TextInput.Suffix inner>\n          <TextInput.IconButton\n            type=\"submit\"\n            icon={RiSendPlaneLine}\n            aria-label=\"Send comment\"\n            disabled={!text.trim()}\n          />\n        </TextInput.Suffix>\n      </TextInput>\n    </form>\n  );\n}\n"
    },
    {
      "path": "src/blocks/media-viewer/comment-list.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/media-viewer/comment-list.tsx",
      "content": "'use client';\n\n// TODO(custom): comments on a file (who, when, the text); no Comment component in Wideset.\nimport { type Comment, PEOPLE } from './data';\nimport { formatPosted } from './format';\nimport { PersonAvatar } from './person-avatar';\n\n/**\n * Comments on the file, oldest first, as a conversation reads: who wrote, how long ago, then the\n * text. Drawn like the recording block's comments, without the moment of the call.\n */\nexport function CommentList({ comments }: { comments: Comment[] }) {\n  if (comments.length === 0) {\n    return <p className=\"typography-body-md text-ws-static-subtle\">No comments yet.</p>;\n  }\n\n  return (\n    <ol aria-label=\"Comments\" className=\"gap-ws-9 flex flex-col\">\n      {comments.map((comment) => {\n        const author = PEOPLE[comment.by];\n        return (\n          <li key={comment.id} className=\"gap-ws-5 flex\">\n            <PersonAvatar\n              size=\"sm\"\n              name={author.name}\n              initials={author.initials}\n              color={author.color}\n              aria-hidden\n            />\n            <div className=\"gap-ws-2 flex min-w-0 flex-1 flex-col\">\n              <p className=\"typography-label-sm gap-ws-5 flex flex-wrap items-baseline\">\n                <span className=\"typography-label-strong-sm text-ws-static-strong\">\n                  {author.name}\n                </span>\n                <time dateTime={comment.postedAt} className=\"text-ws-static-subtle\">\n                  {formatPosted(comment.postedAt)}\n                </time>\n              </p>\n              <p className=\"typography-body-md text-ws-static-base\">{comment.text}</p>\n            </div>\n          </li>\n        );\n      })}\n    </ol>\n  );\n}\n"
    },
    {
      "path": "src/blocks/media-viewer/data.ts",
      "type": "registry:file",
      "target": "blocks/wideset/media-viewer/data.ts",
      "content": "import {\n  type RemixiconComponentType,\n  RiBankCardLine,\n  RiContactsBook3Line,\n  RiFolder3Fill,\n  RiFolder3Line,\n  RiHandCoinLine,\n  RiHome5Line,\n  RiInbox2Line,\n  RiKey2Line,\n  RiLineChartLine,\n  RiPieChart2Line,\n  RiPlugLine,\n  RiQuestionLine,\n  RiSettings3Line,\n  RiTeamLine,\n} from '@remixicon/react';\nimport type { AvatarColor } from '@/components/ui/wideset/avatar/Avatar.colors';\n\n/*\n  The Q4 proposals folder in Lumen Studio's files: a proposal and a pitch deck for each customer\n  in play this quarter, and three charts from the pipeline review. Northwind Health's proposal,\n  the third file, is open in the viewer. Today is 10 November 2026.\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' };\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 mainLinks: 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  { id: 'files', label: 'Files', icon: RiFolder3Line, activeIcon: RiFolder3Fill },\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/** \"Now\" for every relative date on the page, so the screen reads the same on any day. */\nexport const NOW = '2026-11-10T15:20:00Z';\n\nexport type Person = { name: string; initials: string; color?: AvatarColor };\n\nexport type PersonId = 'maya' | 'jonas' | 'priya' | 'tom' | 'elena' | 'daniel';\n\nexport const PEOPLE: Record<PersonId, Person> = {\n  maya: { name: account.name, initials: account.initials, color: 'orange' },\n  jonas: { name: 'Jonas Weber', initials: 'JW' },\n  priya: { name: 'Priya Raman', initials: 'PR' },\n  tom: { name: 'Tom Becker', initials: 'TB' },\n  elena: { name: 'Elena Silva', initials: 'ES' },\n  daniel: { name: 'Daniel Reyes', initials: 'DR' },\n};\n\n/** What a file is: a proposal (PDF), a pitch deck, or a chart exported as an image. */\nexport type Kind = 'pdf' | 'deck' | 'image';\n\nexport const KIND_LABEL: Record<Kind, string> = {\n  pdf: 'PDF document',\n  deck: 'Presentation',\n  image: 'PNG image',\n};\n\nexport type Comment = { id: string; by: PersonId; postedAt: string; text: string };\n\nexport type Access = 'Owner' | 'Can edit' | 'Can view';\n\nexport type FileItem = {\n  id: string;\n  name: string;\n  kind: Kind;\n  owner: PersonId;\n  /** ISO date and time of the last change, and who made it. */\n  modified: string;\n  modifiedBy: PersonId;\n  /** Bytes. */\n  size: number;\n  /** Who has it, besides its owner. */\n  sharedWith: { person: PersonId; access: Exclude<Access, 'Owner'> }[];\n  comments: Comment[];\n  /** The customer a proposal or deck is for; a chart's title instead. */\n  subject: string;\n};\n\nconst MB = 1024 * 1024;\nconst team = (access: Exclude<Access, 'Owner'>, ...people: PersonId[]) =>\n  people.map((person) => ({ person, access }));\n\nexport const FOLDER = { name: 'Q4 proposals', path: ['Files', 'Q4 proposals'] };\n\nexport const FILES: FileItem[] = [\n  {\n    id: 'halcyon-proposal',\n    name: 'Halcyon Freight proposal.pdf',\n    kind: 'pdf',\n    owner: 'maya',\n    modified: '2026-11-09T17:05:00Z',\n    modifiedBy: 'maya',\n    size: 2.1 * MB,\n    sharedWith: team('Can edit', 'jonas'),\n    comments: [],\n    subject: 'Halcyon Freight',\n  },\n  {\n    id: 'pipeline-chart',\n    name: 'Q4 pipeline by stage.png',\n    kind: 'image',\n    owner: 'priya',\n    modified: '2026-11-08T10:40:00Z',\n    modifiedBy: 'priya',\n    size: 0.4 * MB,\n    sharedWith: team('Can view', 'maya', 'jonas', 'tom'),\n    comments: [\n      {\n        id: 'c1',\n        by: 'tom',\n        postedAt: '2026-11-08T11:02:00Z',\n        text: 'Negotiation looks light. Two deals moved back to proposal on Friday.',\n      },\n    ],\n    subject: 'Q4 pipeline by stage',\n  },\n  {\n    id: 'northwind-proposal',\n    name: 'Northwind Health proposal.pdf',\n    kind: 'pdf',\n    owner: 'jonas',\n    modified: '2026-11-10T09:12:00Z',\n    modifiedBy: 'priya',\n    size: 2.4 * MB,\n    sharedWith: [...team('Can edit', 'maya', 'priya'), ...team('Can view', 'elena')],\n    comments: [\n      {\n        id: 'c2',\n        by: 'priya',\n        postedAt: '2026-11-10T09:15:00Z',\n        text: 'Moved support to six months after yesterday’s call. The total is updated on page 1.',\n      },\n      {\n        id: 'c3',\n        by: 'maya',\n        postedAt: '2026-11-10T09:40:00Z',\n        text: 'Looks good. Let’s send it once legal has seen the data processing terms.',\n      },\n    ],\n    subject: 'Northwind Health',\n  },\n  {\n    id: 'northwind-deck',\n    name: 'Northwind Health pitch.pptx',\n    kind: 'deck',\n    owner: 'jonas',\n    modified: '2026-11-07T15:30:00Z',\n    modifiedBy: 'jonas',\n    size: 14.2 * MB,\n    sharedWith: team('Can edit', 'maya'),\n    comments: [],\n    subject: 'Northwind Health',\n  },\n  {\n    id: 'kestrel-proposal',\n    name: 'Kestrel Analytics proposal.pdf',\n    kind: 'pdf',\n    owner: 'priya',\n    modified: '2026-11-06T13:20:00Z',\n    modifiedBy: 'priya',\n    size: 1.8 * MB,\n    sharedWith: team('Can edit', 'maya', 'daniel'),\n    comments: [],\n    subject: 'Kestrel Analytics',\n  },\n  {\n    id: 'atlas-deck',\n    name: 'Atlas Robotics pitch.pptx',\n    kind: 'deck',\n    owner: 'tom',\n    modified: '2026-11-05T09:10:00Z',\n    modifiedBy: 'tom',\n    size: 11.6 * MB,\n    sharedWith: team('Can view', 'maya'),\n    comments: [],\n    subject: 'Atlas Robotics',\n  },\n  {\n    id: 'win-rate-chart',\n    name: 'Win rate by segment.png',\n    kind: 'image',\n    owner: 'priya',\n    modified: '2026-11-04T16:45:00Z',\n    modifiedBy: 'priya',\n    size: 0.3 * MB,\n    sharedWith: team('Can view', 'maya', 'tom'),\n    comments: [],\n    subject: 'Win rate by segment',\n  },\n  {\n    id: 'cobalt-proposal',\n    name: 'Cobalt Security proposal.pdf',\n    kind: 'pdf',\n    owner: 'elena',\n    modified: '2026-11-03T11:00:00Z',\n    modifiedBy: 'elena',\n    size: 2.2 * MB,\n    sharedWith: team('Can edit', 'maya'),\n    comments: [],\n    subject: 'Cobalt Security',\n  },\n  {\n    id: 'juniper-deck',\n    name: 'Juniper Legal pitch.pptx',\n    kind: 'deck',\n    owner: 'daniel',\n    modified: '2026-11-02T14:25:00Z',\n    modifiedBy: 'daniel',\n    size: 9.8 * MB,\n    sharedWith: team('Can view', 'maya', 'elena'),\n    comments: [],\n    subject: 'Juniper Legal',\n  },\n  {\n    id: 'marlow-proposal',\n    name: 'Marlow & Finch proposal.pdf',\n    kind: 'pdf',\n    owner: 'maya',\n    modified: '2026-10-30T10:05:00Z',\n    modifiedBy: 'maya',\n    size: 1.6 * MB,\n    sharedWith: team('Can edit', 'daniel'),\n    comments: [],\n    subject: 'Marlow & Finch',\n  },\n  {\n    id: 'tidewater-deck',\n    name: 'Tidewater Energy pitch.pptx',\n    kind: 'deck',\n    owner: 'elena',\n    modified: '2026-10-28T09:50:00Z',\n    modifiedBy: 'elena',\n    size: 12.9 * MB,\n    sharedWith: team('Can view', 'maya'),\n    comments: [],\n    subject: 'Tidewater Energy',\n  },\n  {\n    id: 'deal-size-chart',\n    name: 'Deal size by quarter.png',\n    kind: 'image',\n    owner: 'priya',\n    modified: '2026-10-27T17:15:00Z',\n    modifiedBy: 'priya',\n    size: 0.3 * MB,\n    sharedWith: team('Can view', 'maya', 'jonas'),\n    comments: [],\n    subject: 'Deal size by quarter',\n  },\n];\n\n/** The file the viewer opens on. */\nexport const OPEN_ON_LOAD = 'northwind-proposal';\n\nexport type Chart = {\n  /** What the bars measure, under the title. */\n  note: string;\n  unit: 'thousands' | 'percent';\n  bars: { label: string; value: number }[];\n};\n\n/** Each chart image's content, by its subject. */\nexport const CHARTS: Record<string, Chart> = {\n  'Q4 pipeline by stage': {\n    note: 'Open pipeline value by stage, in US dollars',\n    unit: 'thousands',\n    bars: [\n      { label: 'Lead', value: 1240 },\n      { label: 'Qualified', value: 860 },\n      { label: 'Proposal', value: 610 },\n      { label: 'Negotiation', value: 290 },\n      { label: 'Won', value: 180 },\n    ],\n  },\n  'Win rate by segment': {\n    note: 'Deals won of deals closed, last four quarters',\n    unit: 'percent',\n    bars: [\n      { label: 'Enterprise', value: 28 },\n      { label: 'Mid-market', value: 34 },\n      { label: 'SMB', value: 22 },\n      { label: 'Public sector', value: 17 },\n    ],\n  },\n  'Deal size by quarter': {\n    note: 'Average won deal, in US dollars',\n    unit: 'thousands',\n    bars: [\n      { label: 'Q1', value: 38 },\n      { label: 'Q2', value: 42 },\n      { label: 'Q3', value: 47 },\n      { label: 'Q4', value: 51 },\n    ],\n  },\n};\n\n/** The proposal's price lines, on its first page. */\nexport const PRICING = [\n  { item: 'Discovery, two weeks', amount: '$18,000.00' },\n  { item: 'Design and delivery, six months', amount: '$96,000.00' },\n  { item: 'Support after launch, six months', amount: '$24,000.00' },\n];\n"
    },
    {
      "path": "src/blocks/media-viewer/facts-list.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/media-viewer/facts-list.tsx",
      "content": "'use client';\n\n// TODO(custom): facts read back as rows (label left, value right, groups under a line, a strong total); no DescriptionList in Wideset.\nimport { cn } from '@/lib/wideset/utils';\n\nexport type Fact = {\n  label: string;\n  value: string;\n  /** The figure the reader is after: the total. */\n  strong?: boolean;\n};\n\n/**\n * Facts as rows, the label on the left and its value on the right edge, so amounts stand in one\n * column. Each group after the first opens under a line. The line is the group's own border: a\n * `dl` holds only its rows.\n */\nexport function FactsList({ groups }: { groups: Fact[][] }) {\n  return (\n    <div className=\"gap-ws-9 flex flex-col\">\n      {groups.map((facts, index) => (\n        <dl\n          key={facts[0].label}\n          className={cn(\n            'gap-ws-7 flex flex-col',\n            index > 0 && 'border-ws-static-base pt-ws-9 border-t',\n          )}\n        >\n          {facts.map(({ label, value, strong }) => (\n            <div key={label} className=\"gap-ws-9 flex items-baseline justify-between\">\n              <dt\n                className={\n                  strong\n                    ? 'typography-label-strong-md text-ws-static-strong'\n                    : 'typography-body-md text-ws-static-subtle'\n                }\n              >\n                {label}\n              </dt>\n              <dd\n                className={cn(\n                  'text-right tabular-nums',\n                  strong\n                    ? 'typography-label-strong-md text-ws-static-strong'\n                    : 'typography-body-md text-ws-static-base',\n                )}\n              >\n                {value}\n              </dd>\n            </div>\n          ))}\n        </dl>\n      ))}\n    </div>\n  );\n}\n"
    },
    {
      "path": "src/blocks/media-viewer/file-details.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/media-viewer/file-details.tsx",
      "content": "'use client';\n\nimport { CommentField } from './comment-field';\nimport { CommentList } from './comment-list';\nimport { type Access, type FileItem, FOLDER, KIND_LABEL, PEOPLE, type PersonId } from './data';\nimport { FactsList } from './facts-list';\nimport { formatModified, formatSize } from './format';\nimport { PersonAvatar } from './person-avatar';\n\nconst TITLE = 'typography-label-strong-md text-ws-static-strong';\n\n/**\n * The file's details beside it, in three sections split by space: the facts (kind, size, where\n * it lives, owner, last change), who it is shared with and how, and the comments with a field\n * to add one. It scrolls on its own, so the file stays put.\n */\nexport function FileDetails({\n  file,\n  onComment,\n}: {\n  file: FileItem;\n  onComment: (text: string) => void;\n}) {\n  const people: { person: PersonId; access: Access }[] = [\n    { person: file.owner, access: 'Owner' },\n    ...file.sharedWith,\n  ];\n\n  return (\n    <aside\n      aria-label=\"File details\"\n      className=\"border-ws-static-subtle ws-scrollbar w-[20rem] shrink-0 overflow-y-auto border-l\"\n    >\n      <div className=\"gap-ws-14 p-ws-11 flex flex-col\">\n        <section className=\"gap-ws-9 flex flex-col\">\n          <h3 className={TITLE}>Details</h3>\n          <FactsList\n            groups={[\n              [\n                { label: 'Type', value: KIND_LABEL[file.kind] },\n                { label: 'Size', value: formatSize(file.size) },\n                { label: 'Location', value: FOLDER.path.join(' / ') },\n                { label: 'Owner', value: PEOPLE[file.owner].name },\n                { label: 'Modified', value: formatModified(file.modified) },\n                { label: 'Modified by', value: PEOPLE[file.modifiedBy].name },\n              ],\n            ]}\n          />\n        </section>\n\n        <section className=\"gap-ws-9 flex flex-col\">\n          <h3 className={TITLE}>Shared with</h3>\n          <ul className=\"gap-ws-7 flex flex-col\">\n            {people.map(({ person, access }) => (\n              <li key={person} className=\"gap-ws-5 flex items-center\">\n                <PersonAvatar\n                  size=\"sm\"\n                  name={PEOPLE[person].name}\n                  initials={PEOPLE[person].initials}\n                  color={PEOPLE[person].color}\n                  aria-hidden\n                />\n                <span className=\"typography-label-sm text-ws-static-strong min-w-0 flex-1 truncate\">\n                  {PEOPLE[person].name}\n                </span>\n                <span className=\"typography-label-sm text-ws-static-subtle\">{access}</span>\n              </li>\n            ))}\n          </ul>\n        </section>\n\n        <section className=\"gap-ws-9 flex flex-col\">\n          <h3 className={TITLE}>Comments</h3>\n          <CommentList comments={file.comments} />\n          <CommentField onComment={onComment} />\n        </section>\n      </div>\n    </aside>\n  );\n}\n"
    },
    {
      "path": "src/blocks/media-viewer/file-icon.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/media-viewer/file-icon.tsx",
      "content": "'use client';\n\n// TODO(custom): a file's kind as an icon on a neutral tile; Wideset's Thumbnail colours each kind and has no deck or image-of-a-chart kind.\nimport {\n  type RemixiconComponentType,\n  RiFilePdf2Line,\n  RiImageLine,\n  RiSlideshowLine,\n} from '@remixicon/react';\nimport { cn } from '@/lib/wideset/utils';\n\nimport type { Kind } from './data';\n\nconst ICONS: Record<Kind, RemixiconComponentType> = {\n  pdf: RiFilePdf2Line,\n  deck: RiSlideshowLine,\n  image: RiImageLine,\n};\n\n/**\n * What a row holds, at a glance: the kind's line icon on a bordered tile, the same grey for every\n * kind (copied from the Files block). In a list of files a colour per kind would be the loudest\n * thing on the page, and the kind is not a judgement.\n */\nexport function FileIcon({ kind, className }: { kind: Kind; className?: string }) {\n  const Icon = ICONS[kind];\n  return (\n    <span\n      aria-hidden=\"true\"\n      className={cn(\n        'border-ws-static-subtle bg-ws-static-foreground rounded-ws-control-lg size-ws-14 flex shrink-0 items-center justify-center border',\n        className,\n      )}\n    >\n      <Icon className=\"size-ws-9 text-ws-static-subtle\" />\n    </span>\n  );\n}\n"
    },
    {
      "path": "src/blocks/media-viewer/file-list.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/media-viewer/file-list.tsx",
      "content": "'use client';\n\nimport { Table } from '@/components/ui/wideset/table/Table';\n\nimport { type FileItem, PEOPLE } from './data';\nimport { FileIcon } from './file-icon';\nimport { formatDateTime, formatModified, formatSize } from './format';\nimport { PersonAvatar } from './person-avatar';\n\n/** The id of a file's name button, so the viewer can give the focus back to it on close. */\nexport const fileButtonId = (id: string) => `file-${id}`;\n\n/**\n * The folder's files as a list. A row is one target: clicking anywhere on it opens the file in\n * the viewer. The name is a button, so the keyboard reaches each file and the viewer has a\n * control to return the focus to; its click reaches the row like any other.\n */\nexport function FileList({ files, onOpen }: { files: FileItem[]; onOpen: (id: string) => void }) {\n  return (\n    <div className=\"ws-scrollbar overflow-x-auto\">\n      <Table size=\"md\" interactive className=\"min-w-[40rem] table-fixed\">\n        <Table.Head>\n          <Table.Row>\n            <Table.Header>Name</Table.Header>\n            <Table.Header className=\"w-[11rem]\">Owner</Table.Header>\n            <Table.Header className=\"w-[9.5rem]\">Modified</Table.Header>\n            <Table.Header align=\"right\" className=\"w-[6rem]\">\n              Size\n            </Table.Header>\n          </Table.Row>\n        </Table.Head>\n        <Table.Body>\n          {files.map((file) => {\n            const owner = PEOPLE[file.owner];\n            return (\n              <Table.Row key={file.id} onClick={() => onOpen(file.id)}>\n                <Table.Cell>\n                  <div className=\"gap-ws-7 flex items-center\">\n                    <FileIcon kind={file.kind} />\n                    <button\n                      type=\"button\"\n                      id={fileButtonId(file.id)}\n                      className=\"text-ws-static-strong focus-visible:wds-focus-visible outline-ws-dynamic-primary-strong-default rounded-ws-control-sm min-w-0 truncate text-left\"\n                    >\n                      {file.name}\n                    </button>\n                  </div>\n                </Table.Cell>\n                <Table.Cell>\n                  <div className=\"gap-ws-5 flex items-center\">\n                    <PersonAvatar\n                      size=\"sm\"\n                      name={owner.name}\n                      initials={owner.initials}\n                      color={owner.color}\n                    />\n                    <span className=\"truncate\">{owner.name}</span>\n                  </div>\n                </Table.Cell>\n                <Table.Cell>\n                  <time\n                    dateTime={file.modified}\n                    title={formatDateTime(file.modified)}\n                    className=\"text-ws-static-subtle\"\n                  >\n                    {formatModified(file.modified)}\n                  </time>\n                </Table.Cell>\n                <Table.Cell align=\"right\" className=\"tabular-nums\">\n                  {formatSize(file.size)}\n                </Table.Cell>\n              </Table.Row>\n            );\n          })}\n        </Table.Body>\n      </Table>\n    </div>\n  );\n}\n"
    },
    {
      "path": "src/blocks/media-viewer/file-preview.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/media-viewer/file-preview.tsx",
      "content": "'use client';\n\n// TODO(custom): a file drawn at its real size (a proposal's first page, a deck's title slide, a chart image), scaled for zoom; Wideset has no file viewer, and blocks ship no images.\nimport { cn } from '@/lib/wideset/utils';\n\nimport { CHARTS, type FileItem, type Kind, KIND_LABEL, PEOPLE, PRICING } from './data';\nimport { formatChartValue } from './format';\n\n/** Each kind's size at 100%: a US Letter page at 96 dpi, a 16:9 slide, a chart export. */\nexport const NATURAL: Record<Kind, { width: number; height: number }> = {\n  pdf: { width: 816, height: 1056 },\n  deck: { width: 1280, height: 720 },\n  image: { width: 1200, height: 800 },\n};\n\n/*\n  The viewer is always dark, so inside it the inverse tokens are always the light ones: the paper\n  is `inverse-background` and its text `inverse-*`, white paper with dark type in both themes,\n  as a document is.\n*/\nconst PAPER = 'bg-ws-static-inverse-background text-ws-static-inverse-strong h-full w-full';\n\n/** A proposal's first page: who it is for, the summary, the scope and the price. */\nfunction ProposalPage({ file }: { file: FileItem }) {\n  return (\n    <div className={cn(PAPER, 'p-ws-20 gap-ws-14 flex flex-col')}>\n      <div className=\"typography-label-sm text-ws-static-inverse-subtle flex justify-between\">\n        <span className=\"typography-label-strong-sm text-ws-static-inverse-strong\">\n          Lumen Studio\n        </span>\n        <span>Proposal · November 2026</span>\n      </div>\n      <div className=\"gap-ws-3 flex flex-col\">\n        <h3 className=\"typography-title-sm\">A proposal for {file.subject}</h3>\n        <p className=\"typography-body-md text-ws-static-inverse-subtle\">\n          Prepared by {PEOPLE[file.owner].name}, Lumen Studio\n        </p>\n      </div>\n      <section className=\"gap-ws-5 flex flex-col\">\n        <h4 className=\"typography-label-strong-md\">Summary</h4>\n        <p className=\"typography-body-md text-ws-static-inverse-base\">\n          {file.subject} asked for a partner to redesign the tools its teams use with customers\n          every day. This proposal covers a six-month engagement: two weeks of discovery with your\n          teams, then design and delivery in fortnightly releases, and six months of support after\n          launch.\n        </p>\n      </section>\n      <section className=\"gap-ws-5 flex flex-col\">\n        <h4 className=\"typography-label-strong-md\">Scope</h4>\n        <ul className=\"typography-body-md text-ws-static-inverse-base gap-ws-3 pl-ws-9 flex list-disc flex-col\">\n          <li>\n            Discovery: interviews with the people who use the tools, and a map of what slows them.\n          </li>\n          <li>Design: the flows that matter most, tested with real users every two weeks.</li>\n          <li>Delivery: production-ready screens and components, built with your engineers.</li>\n        </ul>\n      </section>\n      <section className=\"gap-ws-5 flex flex-col\">\n        <h4 className=\"typography-label-strong-md\">Pricing</h4>\n        <table className=\"typography-body-md w-full\">\n          <tbody>\n            {PRICING.map((row) => (\n              <tr key={row.item} className=\"border-ws-static-inverse-subtle border-b\">\n                <td className=\"py-ws-5 text-ws-static-inverse-base\">{row.item}</td>\n                <td className=\"py-ws-5 text-right tabular-nums\">{row.amount}</td>\n              </tr>\n            ))}\n            <tr className=\"typography-label-strong-md\">\n              <td className=\"py-ws-5\">Total</td>\n              <td className=\"py-ws-5 text-right tabular-nums\">$138,000.00</td>\n            </tr>\n          </tbody>\n        </table>\n      </section>\n      <section className=\"gap-ws-5 flex flex-col\">\n        <h4 className=\"typography-label-strong-md\">Timeline</h4>\n        <p className=\"typography-body-md text-ws-static-inverse-base\">\n          Discovery starts the week this proposal is signed. The first release follows four weeks\n          later, then one every two weeks until the engagement ends.\n        </p>\n      </section>\n      <p className=\"typography-caption-md text-ws-static-inverse-subtle mt-auto text-right\">\n        Page 1 of 4\n      </p>\n    </div>\n  );\n}\n\n/** A pitch deck's title slide: the customer, the deck's name, who presents it. */\nfunction TitleSlide({ file }: { file: FileItem }) {\n  return (\n    <div className={cn(PAPER, 'p-ws-24 flex flex-col justify-between')}>\n      <span className=\"typography-label-strong-md\">Lumen Studio</span>\n      <div className=\"gap-ws-9 flex flex-col\">\n        <p className=\"typography-label-md text-ws-static-inverse-subtle\">Q4 2026 · Pitch</p>\n        {/* A slide's own type: drawn at the slide's size, then scaled with it. */}\n        <h3 className=\"typography-title-lg max-w-[48rem]\">Working with {file.subject}</h3>\n        <p className=\"typography-body-lg text-ws-static-inverse-base\">\n          {PEOPLE[file.owner].name}, Lumen Studio\n        </p>\n      </div>\n      <p className=\"typography-label-sm text-ws-static-inverse-subtle text-right tabular-nums\">\n        1 / 18\n      </p>\n    </div>\n  );\n}\n\n/** A chart image: its title and note, then one bar per row in the one series colour. */\nfunction ChartImage({ file }: { file: FileItem }) {\n  const chart = CHARTS[file.subject];\n  const max = Math.max(...chart.bars.map((bar) => bar.value));\n  return (\n    <div className={cn(PAPER, 'p-ws-20 gap-ws-16 flex flex-col')}>\n      <div className=\"gap-ws-3 flex flex-col\">\n        <h3 className=\"typography-title-sm\">{file.subject}</h3>\n        <p className=\"typography-body-md text-ws-static-inverse-subtle\">{chart.note}</p>\n      </div>\n      {/* The bars are drawn for the eye; a screen reader gets the same values as a list. */}\n      <ul className=\"sr-only\">\n        {chart.bars.map((bar) => (\n          <li key={bar.label}>\n            {bar.label}: {formatChartValue(bar.value, chart.unit)}\n          </li>\n        ))}\n      </ul>\n      <svg viewBox=\"0 0 1040 520\" className=\"w-full flex-1\" aria-hidden=\"true\">\n        {chart.bars.map((bar, row) => {\n          const y = row * (520 / chart.bars.length);\n          const width = (bar.value / max) * 760;\n          return (\n            <g key={bar.label}>\n              <text x=\"0\" y={y + 34} className=\"typography-body-lg fill-ws-static-inverse-base\">\n                {bar.label}\n              </text>\n              <rect\n                x=\"160\"\n                y={y + 12}\n                width={width}\n                height=\"36\"\n                rx=\"4\"\n                className=\"fill-(--ws-non-semantic-fill-blue-strong)\"\n              />\n              <text\n                x={160 + width + 16}\n                y={y + 36}\n                className=\"typography-label-strong-lg fill-ws-static-inverse-strong tabular-nums\"\n              >\n                {formatChartValue(bar.value, chart.unit)}\n              </text>\n            </g>\n          );\n        })}\n      </svg>\n    </div>\n  );\n}\n\n/**\n * A file at its real size times `scale`: an SVG whose width and height carry the zoom, with the\n * file drawn inside at 100% (HTML in a foreignObject), so zooming scales it as one picture and\n * the page needs no inline style. A named group, not an image, so a screen reader reads the\n * file's own headings, text and table inside it.\n */\nexport function FilePreview({ file, scale }: { file: FileItem; scale: number }) {\n  const { width, height } = NATURAL[file.kind];\n  return (\n    <svg\n      role=\"group\"\n      aria-label={`${KIND_LABEL[file.kind]}: ${file.name}`}\n      viewBox={`0 0 ${width} ${height}`}\n      width={Math.round(width * scale)}\n      height={Math.round(height * scale)}\n      className=\"rounded-ws-control-sm shrink-0\"\n    >\n      <foreignObject width={width} height={height}>\n        {file.kind === 'pdf' && <ProposalPage file={file} />}\n        {file.kind === 'deck' && <TitleSlide file={file} />}\n        {file.kind === 'image' && <ChartImage file={file} />}\n      </foreignObject>\n    </svg>\n  );\n}\n"
    },
    {
      "path": "src/blocks/media-viewer/format.ts",
      "type": "registry:file",
      "target": "blocks/wideset/media-viewer/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 * 1000;\n\nconst time = new Intl.DateTimeFormat(LOCALE, { timeStyle: 'short', timeZone: 'UTC' });\nconst dayThisYear = new Intl.DateTimeFormat(LOCALE, {\n  month: 'short',\n  day: 'numeric',\n  timeZone: 'UTC',\n});\nconst dateTime = new Intl.DateTimeFormat(LOCALE, {\n  dateStyle: 'medium',\n  timeStyle: 'short',\n  timeZone: 'UTC',\n});\nconst number = new Intl.NumberFormat(LOCALE, { maximumFractionDigits: 1 });\nconst usd = new Intl.NumberFormat(LOCALE, {\n  style: 'currency',\n  currency: 'USD',\n  notation: 'compact',\n  maximumFractionDigits: 2,\n});\nconst percent = new Intl.NumberFormat(LOCALE, { style: 'percent' });\n\nconst daysAgo = (iso: string) =>\n  Math.round((Date.parse(NOW.slice(0, 10)) - Date.parse(iso.slice(0, 10))) / DAY);\n\n/** \"Today, 9:12 AM\", \"Yesterday\", \"Nov 6\": as near as it is. */\nexport const formatModified = (iso: string) => {\n  const days = daysAgo(iso);\n  if (days === 0) return `Today, ${time.format(new Date(iso))}`;\n  if (days === 1) return 'Yesterday';\n  return dayThisYear.format(new Date(iso));\n};\n\n/** Nov 10, 2026, 9:12 AM: the full moment. */\nexport const formatDateTime = (iso: string) => dateTime.format(new Date(iso));\n\n/** \"Just now\", \"Today, 9:40 AM\": when a comment was posted. */\nexport const formatPosted = (iso: string) => (iso === NOW ? 'Just now' : formatModified(iso));\n\n/** 2.4 MB, 410 KB: binary units, as file managers show them. */\nexport const formatSize = (bytes: number) =>\n  bytes < 1024 * 1024\n    ? `${Math.round(bytes / 1024)} KB`\n    : `${number.format(bytes / 1024 / 1024)} MB`;\n\n/** A chart's value: $1.24M or $610K for money, 28% for a rate. */\nexport const formatChartValue = (value: number, unit: 'thousands' | 'percent') =>\n  unit === 'percent' ? percent.format(value / 100) : usd.format(value * 1000);\n"
    },
    {
      "path": "src/blocks/media-viewer/index.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/media-viewer/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 { cn } from '@/lib/wideset/utils';\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 { useCallback, useEffect, useId, useRef, useState } from 'react';\n\nimport { type FileItem, FILES, FOLDER, NOW, OPEN_ON_LOAD } from './data';\nimport { fileButtonId, FileList } from './file-list';\nimport { formatSize } from './format';\nimport { MediaViewer } from './media-viewer';\nimport type { MoreAction } from './more-menu';\nimport { PageHeader } from './page-header';\nimport { MediaViewerSidebar } from './sidebar';\nimport { ViewerToast, type ViewerToastData } from './viewer-toast';\n\n/** One column of the page: the header and the body share its edges. */\nconst COLUMN = 'px-ws-14 mx-auto w-full max-w-[80rem]';\n\n/**\n * The screen under the toasts: the folder's page, and the viewer over it while a file is open.\n * It holds the files and which one is open, so the viewer's actions (trash, comments) change the\n * same list the page shows. While the viewer is open the page is inert; when it closes, the\n * focus goes back to the row of the file it showed.\n */\nfunction Screen() {\n  const { showToast, dismissToast } = useToast();\n  const sidebarId = useId();\n  const [collapsed, setCollapsed] = useState(false);\n  const [files, setFiles] = useState(FILES);\n  const [openId, setOpenId] = useState<string | null>(OPEN_ON_LOAD);\n  const lastShown = useRef<string | null>(null);\n  // What an action in the viewer reports is drawn inside the viewer, in its dark scope; the\n  // page's own toasts (ToastProvider) are left for what is said once the viewer has closed.\n  const [viewerToast, setViewerToast] = useState<ViewerToastData>();\n  const dismissViewerToast = useCallback(() => setViewerToast(undefined), []);\n  const say = (message: string, onUndo?: () => void) =>\n    setViewerToast({ key: Date.now(), message, onUndo });\n  const index = files.findIndex((file) => file.id === openId);\n  const open = index >= 0;\n\n  const close = () => {\n    lastShown.current = openId;\n    setOpenId(null);\n    setViewerToast(undefined);\n  };\n\n  // Once the page is no longer inert, the opener takes the focus back.\n  useEffect(() => {\n    if (openId === null && lastShown.current) {\n      document.getElementById(fileButtonId(lastShown.current))?.focus();\n    }\n  }, [openId]);\n\n  const copyLink = (file: FileItem) => {\n    // Clipboard access can be refused (an iframe, a test); the toast still confirms the action.\n    navigator.clipboard?.writeText(`https://orbit.so/f/${file.id}`).catch(() => undefined);\n    say(`Link to ${file.name} copied. People in the workspace can open it.`);\n  };\n\n  const trash = (file: FileItem) => {\n    const at = files.indexOf(file);\n    const rest = files.filter((item) => item !== file);\n    setFiles(rest);\n    // Only this file comes back, where it was; comments and other changes since stay.\n    const restore = () =>\n      setFiles((current) =>\n        current.some((item) => item.id === file.id)\n          ? current\n          : [...current.slice(0, at), file, ...current.slice(at)],\n      );\n    const message = `Moved ${file.name} to the trash`;\n    // The viewer moves on to the file that took its place and says so itself.\n    if (rest.length > 0) {\n      setOpenId(rest[Math.min(at, rest.length - 1)].id);\n      say(message, restore);\n      return;\n    }\n    // On an empty folder it closes, so the page says it.\n    close();\n    const id = showToast({\n      content: message,\n      action: (\n        <Toast.Action\n          preset=\"ghost\"\n          onClick={() => {\n            restore();\n            dismissToast(id);\n          }}\n        >\n          Undo\n        </Toast.Action>\n      ),\n    });\n  };\n\n  const onMore = (file: FileItem, action: MoreAction) => {\n    if (action === 'copy-link') copyLink(file);\n    if (action === 'show-in-folder') close();\n    if (action === 'trash') trash(file);\n  };\n\n  const addComment = (file: FileItem, text: string) =>\n    setFiles(\n      files.map((item) =>\n        item === file\n          ? {\n              ...item,\n              comments: [\n                ...item.comments,\n                { id: `c${Date.now()}`, by: 'maya', postedAt: NOW, text },\n              ],\n            }\n          : item,\n      ),\n    );\n\n  return (\n    <>\n      <AppShell className=\"ws-block-utility\" direction=\"inset\" inert={open}>\n        <MediaViewerSidebar id={sidebarId} collapsed={collapsed} onCollapsedChange={setCollapsed} />\n        <AppShell.Main>\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\n                pulled left so its glyph, not its box, sits 20px from the edge; the crumbs follow\n                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={() => setCollapsed(!collapsed)}\n                className=\"-ml-ws-5\"\n              />\n              <Breadcrumbs separator=\"arrow\">\n                <Breadcrumbs.Item asChild>\n                  <a href=\"#files\">Files</a>\n                </Breadcrumbs.Item>\n                <Breadcrumbs.Item>{FOLDER.name}</Breadcrumbs.Item>\n              </Breadcrumbs>\n            </div>\n          </div>\n\n          {/* The page scrolls inside the card, so the card's corners stay put. */}\n          <div className=\"ws-scrollbar min-h-0 flex-1 overflow-y-auto\">\n            <div className={cn(COLUMN, 'gap-ws-12 pt-ws-14 pb-ws-16 flex flex-col')}>\n              <PageHeader />\n              <FileList files={files} onOpen={setOpenId} />\n            </div>\n          </div>\n        </AppShell.Main>\n      </AppShell>\n\n      {open && (\n        <MediaViewer\n          files={files}\n          index={index}\n          onIndexChange={(next) => setOpenId(files[next].id)}\n          onClose={close}\n          onDownload={(file) => say(`Downloading ${file.name} (${formatSize(file.size)})`)}\n          onShare={copyLink}\n          onMore={onMore}\n          onComment={addComment}\n          toast={\n            viewerToast && (\n              <ViewerToast\n                key={viewerToast.key}\n                toast={viewerToast}\n                onDismiss={dismissViewerToast}\n              />\n            )\n          }\n        />\n      )}\n    </>\n  );\n}\n\n/**\n * Media viewer (panel): a file opened full screen over the app. Behind it, a folder of files on\n * an Inset page; the viewer opens on load on the third file, and any row opens it again. It\n * shows the file large with previous and next, zoom under it, its details and comments beside\n * it, and closes back to the row it came from.\n */\nexport default function MediaViewerBlock() {\n  return (\n    <ToastProvider>\n      <Screen />\n    </ToastProvider>\n  );\n}\n"
    },
    {
      "path": "src/blocks/media-viewer/media-viewer.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/media-viewer/media-viewer.tsx",
      "content": "'use client';\n\n// TODO(custom): a full-screen file viewer (a dialog over the whole window: bar, file, previous / next, zoom, details); Wideset's Modal is a fixed 600px card and cannot go full screen, and there is no viewer.\nimport {\n  RiArrowLeftSLine,\n  RiArrowRightSLine,\n  RiCloseLine,\n  RiDownloadLine,\n  RiInformationLine,\n  RiShareLine,\n} from '@remixicon/react';\nimport { Button } from '@/components/ui/wideset/button/Button';\nimport { cn } from '@/lib/wideset/utils';\nimport { IconButton } from '@/components/ui/wideset/button/IconButton';\nimport { type KeyboardEvent, type ReactNode, useEffect, useId, useRef, useState } from 'react';\n\nimport type { FileItem } from './data';\nimport { FileDetails } from './file-details';\nimport { FileIcon } from './file-icon';\nimport { FilePreview, NATURAL } from './file-preview';\nimport { type MoreAction, MoreMenu } from './more-menu';\nimport { useElementSize } from './use-element-size';\nimport { type Zoom, ZoomControls } from './zoom-controls';\n\n/** Room around the file at Fit: wide enough at the sides for the previous and next arrows. */\nconst GUTTER = { x: 128, y: 40 };\nconst FOCUSABLE =\n  'button:not(:disabled), input:not(:disabled), textarea:not(:disabled), [href], [tabindex]:not([tabindex=\"-1\"])';\n\ntype MediaViewerProps = {\n  files: FileItem[];\n  /** The file on screen, as an index into `files`. */\n  index: number;\n  onIndexChange: (index: number) => void;\n  onClose: () => void;\n  onDownload: (file: FileItem) => void;\n  onShare: (file: FileItem) => void;\n  onMore: (file: FileItem, action: MoreAction) => void;\n  onComment: (file: FileItem, text: string) => void;\n  /** What the viewer has to say about the last action: drawn inside it, in its dark scope. */\n  toast?: ReactNode;\n};\n\n/**\n * A file opened over the whole app. It is a modal dialog drawn by hand: the page behind is made\n * inert by the screen, Tab cycles inside, Escape closes, and the left and right arrows move to\n * the previous and next file (not while typing a comment). It is a dark island (`dark` on its\n * root, as the lesson's video is), opaque so nothing on the page competes with the file: the\n * scrim token is 56% and lets the page's text show through.\n *\n * The bar names the file and its place in the folder and holds its actions: Share is the one\n * filled button. The file fits the window by default; zooming past it scrolls the stage.\n */\nexport function MediaViewer({\n  files,\n  index,\n  onIndexChange,\n  onClose,\n  onDownload,\n  onShare,\n  onMore,\n  onComment,\n  toast,\n}: MediaViewerProps) {\n  const dialog = useRef<HTMLDivElement>(null);\n  const titleId = useId();\n  const [zoom, setZoom] = useState<Zoom>('fit');\n  const [details, setDetails] = useState(true);\n  const [stageRef, stage] = useElementSize<HTMLDivElement>();\n  const file = files[index];\n  const natural = NATURAL[file.kind];\n  const fit = Math.max(\n    0.1,\n    Math.min(\n      (stage.width - GUTTER.x * 2) / natural.width,\n      (stage.height - GUTTER.y * 2) / natural.height,\n    ),\n  );\n  const scale = zoom === 'fit' ? fit : zoom;\n\n  // The dialog takes the focus when it opens, so the arrows and Escape work at once.\n  useEffect(() => dialog.current?.focus(), []);\n\n  const go = (step: number) => {\n    const next = index + step;\n    if (next < 0 || next >= files.length) return;\n    setZoom('fit');\n    onIndexChange(next);\n  };\n\n  const onKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n    const root = dialog.current;\n    // A menu opened from the bar renders outside the dialog; its keys are its own.\n    if (!root || !root.contains(event.target as Node)) return;\n    const typing = (event.target as HTMLElement).closest('input, textarea');\n\n    if (event.key === 'Escape') {\n      event.preventDefault();\n      onClose();\n    } else if (event.key === 'ArrowLeft' && !typing) {\n      go(-1);\n    } else if (event.key === 'ArrowRight' && !typing) {\n      go(1);\n    } else if (event.key === 'Tab') {\n      const items = [...root.querySelectorAll<HTMLElement>(FOCUSABLE)];\n      const first = items[0];\n      const last = items.at(-1);\n      const at = document.activeElement;\n      if (event.shiftKey && (at === first || at === root)) {\n        event.preventDefault();\n        last?.focus();\n      } else if (!event.shiftKey && at === last) {\n        event.preventDefault();\n        first?.focus();\n      }\n    }\n  };\n\n  const arrow = 'absolute top-1/2 -translate-y-1/2';\n\n  return (\n    // The dialog's own keys (Escape, the arrows, Tab) are handled on it, as Radix's dialogs do.\n    // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n    <div\n      ref={dialog}\n      role=\"dialog\"\n      aria-modal=\"true\"\n      aria-labelledby={titleId}\n      tabIndex={-1}\n      onKeyDown={onKeyDown}\n      // The entry renders the viewer beside its AppShell, outside the block's layout root.\n      className=\"ws-block-utility dark bg-ws-static-background text-ws-static-strong z-ws-modal fixed inset-0 flex flex-col outline-hidden\"\n    >\n      {/* A line under the bar, edge to edge: the details' line starts on it, so neither line\n          ends in the air. */}\n      <header className=\"h-ws-20 px-ws-11 gap-ws-7 border-ws-static-subtle flex shrink-0 items-center border-b\">\n        <FileIcon kind={file.kind} />\n        <div className=\"gap-ws-5 flex min-w-0 flex-1 items-baseline\">\n          <h2 id={titleId} className=\"typography-label-strong-md truncate\">\n            {file.name}\n          </h2>\n          <p className=\"typography-label-sm text-ws-static-subtle shrink-0 tabular-nums\">\n            {index + 1} of {files.length}\n          </p>\n        </div>\n        <div className=\"gap-ws-3 flex items-center\">\n          <IconButton\n            icon={RiDownloadLine}\n            variant=\"secondary\"\n            preset=\"ghost\"\n            size=\"sm\"\n            aria-label={`Download ${file.name}`}\n            onClick={() => onDownload(file)}\n          />\n          <MoreMenu name={file.name} onAction={(action) => onMore(file, action)} />\n          <IconButton\n            icon={RiInformationLine}\n            variant=\"secondary\"\n            preset=\"ghost\"\n            size=\"sm\"\n            aria-label=\"Details\"\n            aria-pressed={details}\n            onClick={() => setDetails(!details)}\n          />\n          <Button size=\"sm\" onClick={() => onShare(file)} className=\"mx-ws-3\">\n            <Button.Icon icon={RiShareLine} />\n            Share\n          </Button>\n          <IconButton\n            icon={RiCloseLine}\n            variant=\"secondary\"\n            preset=\"ghost\"\n            size=\"sm\"\n            aria-label=\"Close\"\n            aria-keyshortcuts=\"Escape\"\n            onClick={onClose}\n            className=\"-mr-ws-3\"\n          />\n        </div>\n      </header>\n\n      <div className=\"flex min-h-0 flex-1\">\n        <div className=\"flex min-w-0 flex-1 flex-col\">\n          <div className=\"relative min-h-0 flex-1\">\n            {/* The stage scrolls when the file is zoomed past the window; it takes the focus for\n                that, so the keyboard can scroll it too. */}\n            <div\n              ref={stageRef}\n              // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex -- a scrolling region must be reachable by keyboard\n              tabIndex={0}\n              role=\"region\"\n              aria-label=\"File\"\n              className=\"focus-visible:wds-focus-visible outline-ws-dynamic-primary-strong-default ws-scrollbar h-full overflow-auto focus-visible:-outline-offset-4\"\n            >\n              <div className=\"px-ws-20 py-ws-16 flex min-h-full w-max min-w-full items-center justify-center\">\n                <FilePreview file={file} scale={scale} />\n              </div>\n            </div>\n            <IconButton\n              icon={RiArrowLeftSLine}\n              variant=\"secondary\"\n              preset=\"border\"\n              aria-label=\"Previous file\"\n              aria-keyshortcuts=\"ArrowLeft\"\n              disabled={index === 0}\n              onClick={() => go(-1)}\n              className={cn(arrow, 'left-ws-11')}\n            />\n            <IconButton\n              icon={RiArrowRightSLine}\n              variant=\"secondary\"\n              preset=\"border\"\n              aria-label=\"Next file\"\n              aria-keyshortcuts=\"ArrowRight\"\n              disabled={index === files.length - 1}\n              onClick={() => go(1)}\n              className={cn(arrow, 'right-ws-11')}\n            />\n          </div>\n          <div className=\"h-ws-20 flex shrink-0 items-center justify-center\">\n            <ZoomControls zoom={zoom} scale={scale} onZoomChange={setZoom} />\n          </div>\n        </div>\n\n        {details && <FileDetails file={file} onComment={(text) => onComment(file, text)} />}\n      </div>\n      {toast}\n    </div>\n  );\n}\n"
    },
    {
      "path": "src/blocks/media-viewer/more-menu.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/media-viewer/more-menu.tsx",
      "content": "'use client';\n\nimport {\n  type RemixiconComponentType,\n  RiDeleteBinLine,\n  RiFolderOpenLine,\n  RiLinkM,\n  RiMoreFill,\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';\n\nexport type MoreAction = 'copy-link' | 'show-in-folder' | 'trash';\n\nconst Entry = ({\n  label,\n  icon: Icon,\n  onSelect,\n  danger,\n}: {\n  label: string;\n  icon: RemixiconComponentType;\n  onSelect: () => void;\n  danger?: boolean;\n}) => (\n  <DropdownMenu.Item variant={danger ? 'danger' : undefined} onSelect={onSelect}>\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  </DropdownMenu.Item>\n);\n\n/**\n * The file's other actions behind ⋯ in the viewer's bar: its link, its folder, then Move to\n * trash, alone and last. The menu opens over the viewer, in the page's theme.\n */\nexport function MoreMenu({\n  name,\n  onAction,\n}: {\n  name: string;\n  onAction: (action: MoreAction) => void;\n}) {\n  return (\n    <DropdownMenu>\n      <DropdownMenu.Trigger asChild>\n        <IconButton\n          icon={RiMoreFill}\n          variant=\"secondary\"\n          preset=\"ghost\"\n          size=\"sm\"\n          aria-label={`More actions for ${name}`}\n        />\n      </DropdownMenu.Trigger>\n      <DropdownMenu.Content align=\"end\" className=\"ws-block-utility w-[13rem]\">\n        <Entry label=\"Copy link\" icon={RiLinkM} onSelect={() => onAction('copy-link')} />\n        <Entry\n          label=\"Show in folder\"\n          icon={RiFolderOpenLine}\n          onSelect={() => onAction('show-in-folder')}\n        />\n        <DropdownMenu.Separator />\n        <Entry\n          label=\"Move to trash\"\n          icon={RiDeleteBinLine}\n          danger\n          onSelect={() => onAction('trash')}\n        />\n      </DropdownMenu.Content>\n    </DropdownMenu>\n  );\n}\n"
    },
    {
      "path": "src/blocks/media-viewer/page-header.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/media-viewer/page-header.tsx",
      "content": "'use client';\n\n// TODO(custom): page header (title, a line of description, the actions on the right); no PageHeader in Wideset.\nimport { RiUpload2Line } from '@remixicon/react';\nimport { Button } from '@/components/ui/wideset/button/Button';\n\nimport { FOLDER } from './data';\n\n/**\n * The folder's name, what it holds, and Upload. Copied from the Files block, so the folder reads\n * as the same page; Upload is a secondary button here, since the viewer over the page carries the\n * screen's one filled button (Share).\n */\nexport function PageHeader() {\n  return (\n    <header className=\"gap-ws-12 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\">{FOLDER.name}</h1>\n        <p className=\"typography-body-md text-ws-static-subtle\">\n          Proposals, pitch decks and pipeline charts for the deals closing this quarter.\n        </p>\n      </div>\n      <Button size=\"sm\" variant=\"secondary\" preset=\"border\">\n        <Button.Icon icon={RiUpload2Line} />\n        Upload\n      </Button>\n    </header>\n  );\n}\n"
    },
    {
      "path": "src/blocks/media-viewer/people.assets.ts",
      "type": "registry:file",
      "target": "blocks/wideset/media-viewer/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/4AAQSkZJRgABAQAAAQABAAD/4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAAC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guvUqske0zCnKFbjSjw5nlWqsxCXC8tVEzOGnUH6Wanpm1rTC82JHMKyhyrNSmTboc5veCS26eO8kc/8Auo5LjOQpC2HB3k9fEeNO/D/FNHjYLYrteBctPTqDuP39EuYjhM9AQX6tO62ISN1kKI7zigPcM4/9r2jOhxdu5Ye3nMeRST+9ObTuKQgckoVj4CufaXO1l2JA9UwifcQlINeE45XHEK6WpP8A0Tb21t+wT/hsAp6dsfT+lVvtN1XEg2OZbFJ33HXnQT0AKif3odoOlX7xPjMRGlLU84BugchRT612Yo1BbLiuJkzgs7mTwPI4+YribENHSbDc7kxdbY83ObcCu1cGUhBHIHqfdW/DsSio6J74j59wd77+y7UU/jygP5K6tl1pTpyxQrUnk22P93WrGyp1rcPIdKhENwwpKVD/AC1ZHmKshhhCmUuJOUqG8DWnh+qdUROjedQb9j/N1nr2CN4cBoVyJDqbXAeexxSnPvNU3r3S6NS2hxmT3nXDvFR9o86tTU8pK1tQ0EHdO+sD6D9/lUZmR/SVoZ6YJPyodj9c4TthiP8Apr3/AIWigjswvdv8IABZAxdJoU0r0WM8W1LKcpODU20dGLmqYCLZ3oq1b2E54EDr4YOKnGv9nV4scS5xosbtoM94LS6gZW2c5/v31MNjezB3TzMm6TlBTz7Q7MeG8QT/AH76K1eLxvpTJmuSLAduZ6KkNIY5AANOd/pW0lJjwY5J7yS2SfHKhWrqyLjsJIHD+mfuP3rduZ7JqO37TjY+WDWxfWu2tkhPUJCx8ONDOEa40WLQybFwafZ2n3fsqY1B49G9voT+mq//2Q==',\n};\n"
    },
    {
      "path": "src/blocks/media-viewer/person-avatar.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/media-viewer/person-avatar.tsx",
      "content": "'use client';\n\nimport type { AvatarProps } from '@/components/ui/wideset/avatar/Avatar.types';\nimport { Avatar } from '@/components/ui/wideset/avatar/Avatar';\n\nimport { PHOTOS } from './people.assets';\n\ntype PersonAvatarProps = Pick<\n  AvatarProps,\n  'size' | 'shape' | 'status' | 'color' | 'className' | 'title' | 'aria-hidden' | 'aria-label'\n> & {\n  /** The person's full name: the key their photo is filed under. */\n  name: string;\n  initials: string;\n  /** Leave empty beside the person's name; pass the name where the avatar stands alone. */\n  alt?: string;\n};\n\n/**\n * A person's avatar: their photo when the sample people have one, otherwise their initials in\n * their colour. A real product mixes the two, so every place the block draws a person asks here\n * and the choice is made once. The initials stay as the fallback if the image fails to load.\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/media-viewer/sidebar.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/media-viewer/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 MediaViewerSidebar(\n  props: Pick<SidebarProps, 'id' | 'collapsed' | 'onCollapsedChange'>,\n) {\n  const [active, setActive] = useState('files');\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"
    },
    {
      "path": "src/blocks/media-viewer/use-element-size.ts",
      "type": "registry:file",
      "target": "blocks/wideset/media-viewer/use-element-size.ts",
      "content": "'use client';\n\nimport { useLayoutEffect, useRef, useState } from 'react';\n\n/**\n * An element's inner size, kept current as the window or a panel beside it changes. Where\n * `ResizeObserver` does not exist (tests, old browsers) it is measured once.\n */\nexport function useElementSize<T extends HTMLElement>() {\n  const ref = useRef<T>(null);\n  const [size, setSize] = useState({ width: 0, height: 0 });\n\n  useLayoutEffect(() => {\n    const element = ref.current;\n    if (!element) return;\n    const measure = () => setSize({ width: element.clientWidth, height: element.clientHeight });\n    measure();\n    if (typeof ResizeObserver !== 'function') return;\n    const observer = new ResizeObserver(measure);\n    observer.observe(element);\n    return () => observer.disconnect();\n  }, []);\n\n  return [ref, size] as const;\n}\n"
    },
    {
      "path": "src/blocks/media-viewer/viewer-toast.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/media-viewer/viewer-toast.tsx",
      "content": "'use client';\n\n// TODO(custom): a toast drawn inside the viewer; ToastProvider portals its stack to the body and\n// takes no container, so it cannot sit in the viewer's dark scope.\nimport { Toast } from '@/components/ui/wideset/toast/Toast';\nimport { useEffect, useRef, useState } from 'react';\n\nexport type ViewerToastData = {\n  /** Changes with every toast, so a new one starts its own clock. */\n  key: number;\n  message: string;\n  /** Takes the action back; the toast then offers Undo. */\n  onUndo?: () => void;\n};\n\n/** How long it stays, as the library's toasts do. */\nconst DURATION = 5000;\n\n/**\n * What the viewer says after an action (link copied, download started, file trashed), in its\n * bottom right corner. It is drawn inside the viewer and not by `ToastProvider`: there it sits in\n * the viewer's `dark` scope, so it is the light toast of the dark theme in both themes instead of\n * a dark toast on the dark viewer, and Tab reaches Undo from inside the dialog. One at a time: a\n * new one takes the place of the last. Its clock stops while it is hovered or focused, and when\n * it goes with the focus inside, the focus returns to the viewer.\n */\nexport function ViewerToast({\n  toast,\n  onDismiss,\n}: {\n  toast: ViewerToastData;\n  onDismiss: () => void;\n}) {\n  const ref = useRef<HTMLDivElement>(null);\n  const [hovered, setHovered] = useState(false);\n  const [focused, setFocused] = useState(false);\n\n  const dismiss = () => {\n    const root = ref.current;\n    if (root?.contains(document.activeElement)) {\n      root.closest<HTMLElement>('[role=\"dialog\"]')?.focus();\n    }\n    onDismiss();\n  };\n  const dismissRef = useRef(dismiss);\n  dismissRef.current = dismiss;\n\n  const paused = hovered || focused;\n  useEffect(() => {\n    if (paused) return;\n    const timer = setTimeout(() => dismissRef.current(), DURATION);\n    return () => clearTimeout(timer);\n  }, [toast.key, paused]);\n\n  return (\n    <div\n      ref={ref}\n      className=\"right-ws-9 bottom-ws-9 z-ws-notification absolute w-full max-w-[24rem]\"\n      onMouseEnter={() => setHovered(true)}\n      onMouseLeave={() => setHovered(false)}\n      onFocus={() => setFocused(true)}\n      onBlur={(event) => {\n        if (!event.currentTarget.contains(event.relatedTarget)) setFocused(false);\n      }}\n    >\n      <Toast onDismiss={dismiss}>\n        <Toast.Message>{toast.message}</Toast.Message>\n        {toast.onUndo && (\n          <Toast.Action\n            preset=\"ghost\"\n            onClick={() => {\n              toast.onUndo?.();\n              dismiss();\n            }}\n          >\n            Undo\n          </Toast.Action>\n        )}\n      </Toast>\n    </div>\n  );\n}\n"
    },
    {
      "path": "src/blocks/media-viewer/zoom-controls.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/media-viewer/zoom-controls.tsx",
      "content": "'use client';\n\nimport { RiAspectRatioLine, RiZoomInLine, RiZoomOutLine } from '@remixicon/react';\nimport { Button } from '@/components/ui/wideset/button/Button';\nimport { IconButton } from '@/components/ui/wideset/button/IconButton';\n\n/** The zoom steps, as a document viewer offers them. */\nexport const ZOOM_STEPS = [0.25, 0.5, 0.75, 1, 1.25, 1.5, 2, 3];\n\nexport type Zoom = number | 'fit';\n\ntype ZoomControlsProps = {\n  zoom: Zoom;\n  /** The scale on screen: the chosen step, or what Fit works out to. */\n  scale: number;\n  onZoomChange: (zoom: Zoom) => void;\n};\n\n/**\n * Zoom under the file: out, the current size (which returns to 100%), in, and Fit, pressed\n * while the file fits the window. Out and in step through the zoom steps from wherever the\n * scale is, so from Fit at 73% they go to 50% or 75%.\n */\nexport function ZoomControls({ zoom, scale, onZoomChange }: ZoomControlsProps) {\n  const smaller = ZOOM_STEPS.filter((step) => step < scale - 0.001).at(-1);\n  const larger = ZOOM_STEPS.find((step) => step > scale + 0.001);\n  const percent = Math.round(scale * 100);\n\n  return (\n    <div role=\"group\" aria-label=\"Zoom\" className=\"gap-ws-3 flex items-center\">\n      <IconButton\n        icon={RiZoomOutLine}\n        variant=\"secondary\"\n        preset=\"ghost\"\n        size=\"sm\"\n        aria-label=\"Zoom out\"\n        disabled={smaller === undefined}\n        onClick={() => smaller !== undefined && onZoomChange(smaller)}\n      />\n      <Button\n        variant=\"secondary\"\n        preset=\"ghost\"\n        size=\"sm\"\n        aria-label={`Actual size, now ${percent}%`}\n        onClick={() => onZoomChange(1)}\n        className=\"min-w-[4.5rem]\"\n      >\n        {`${percent}%`}\n      </Button>\n      <IconButton\n        icon={RiZoomInLine}\n        variant=\"secondary\"\n        preset=\"ghost\"\n        size=\"sm\"\n        aria-label=\"Zoom in\"\n        disabled={larger === undefined}\n        onClick={() => larger !== undefined && onZoomChange(larger)}\n      />\n      <IconButton\n        icon={RiAspectRatioLine}\n        variant=\"secondary\"\n        preset=\"ghost\"\n        size=\"sm\"\n        aria-label=\"Fit to window\"\n        aria-pressed={zoom === 'fit'}\n        onClick={() => onZoomChange('fit')}\n      />\n    </div>\n  );\n}\n"
    }
  ],
  "meta": {
    "version": "1.1.0",
    "commit": "a734f9f0"
  }
}
