D
DreamLake

Preview

File Preview

Lightweight, GitHub-style file preview for any URL — independent of timeline, dtype, and lane systems.

Why a separate system?

The pre-built Views and <TrackerContainer> target time-synchronized robotics data: every track has a clock, a dtype, and a lane. <FilePreview> is the inverse — single-shot, business-agnostic, no clock involvement.

  • Business-agnostic — input is just a URL. No tracks, no playlists, no dtype dispatch.
  • No time — render once and stop. There is no clock subscription, no useFrame, no requestAnimationFrame.
  • Drop-in for any URL — pre-signed S3, public CDN, blob URL, or local dev server.

Together with the timeline system, a typical experiment dashboard uses both: timeline for sensor streams, <FilePreview> for episode artifacts (configs, logs, checkpoints, frame dumps).

Quick Start

import { FilePreview } from '@vuer-ai/vuer-m3u/preview'
import '@vuer-ai/vuer-m3u/styles.css'
 
<FilePreview url="https://s3.example.com/file.png" />

That's it. The preview resolves a kind from the URL extension, lazy-loads the matching previewer chunk, and renders. No config required.

See it in action

One previewer per kind — image, CSV, JSONL, NumPy .npy, and MCAP — all rendered live below.

Loading demo…
import { FilePreview } from '@vuer-ai/vuer-m3u/preview'
import '@vuer-ai/vuer-m3u/styles.css'

export function ArtifactGallery() {
  return (
    <div className="grid gap-4">
      <FilePreview url="/path/to/scene.svg" />
      <FilePreview url="/path/to/poses.csv" />
      <FilePreview url="/path/to/events.jsonl" />
      <FilePreview url="/path/to/joints.npy" />
      <FilePreview url="/path/to/recording.mcap" />
    </div>
  )
}

Supported file types

KindExtensionsLoading strategyLazyDefault limit
Imagejpg jpeg png gif webp avif svgNative <img>20 MB (hard)
Video / Audiomp4 webm mov mp3 wav ogg flacNative <video> / <audio>streaming
Text / Codetxt py ts tsx js json yaml toml go rs c cpp ...fetch + highlight.jsyes5 MB (soft)
Markdownmd mdxreact-markdown + GFMyes5 MB (soft)
CSV / TSVcsv tsvRFC 4180 parser, virtual listyes10 MB (soft)
JSONLjsonl ndjsonLine parser, virtual listyes10 MB (soft)
NPYnpyNumPy parser, two-stage Rangeyes1024-element preview
MCAPmcap@mcap/core indexed readeryesfooter + summary only

Files with unrecognized extensions render an unsupported placeholder with a download link; failed fetches render an error state.

Where to next

  • Design — why this looks the way it does
  • API<FilePreview> props, PreviewLimits, ResolvedFileMeta
  • Size Strategy — hard vs soft limits, range requests
  • Recipes — auth headers, metadata pass-through, file switcher