"use client"; /** * TASK-0103 — the file block renderer (all kinds + all states). * * A `file` block references an uploaded file by `properties.fileId`. The * block renders from the SERVER-VERIFIED record (`GET /files/:id`): * * - kind = f(mimeType) — the post-scan MIME, never the extension * - URLs = the fresh signed URLs the API mints per read (15-min contract: * the detail is re-fetched whenever `now + 60 s > expiresAt`) * * States (spec Requirements §3): * - not READY (UPLOADING/SCANNING) → skeleton + status label * (live upload progress + cancel when this tab started the transfer) * - VIRUS_DETECTED → red "Blocked by virus scan" card, NO download * - FAILED → error card with the server message + Remove * - READY → per kind: * image inline, max-width 100 %, bottom-right resize handle * (50/75/100 % presets + free drag → `properties.widthPercent`), * caption toggle + inline editable text (`properties.caption`) * video native