import SpecSheet from "@/components/SpecSheet"; import NoteField from "@/components/NoteField"; import type { Song } from "@/lib/browse"; import { fmtBytes } from "@/lib/format"; import type { NoteMap } from "@/lib/notes"; import { operationsFor, readSpec, validateSpec } from "@/lib/spec"; import { TRIM_SETS } from "@/lib/trim"; // The Spec tab: the spec sheet (what the song is made of, and so the // operations it can run) and the plans in plan/ with their notes -- // SongProject's aside, moved unchanged (P4a-3). export default async function SpecTab({ song, notes }: { song: Song; notes: NoteMap }) { const spec = await readSpec(song.id); const problems = await validateSpec(spec); return (
p.name)} trimSets={Object.values(TRIM_SETS).map((t) => ({ id: t.id, label: t.label }))} />
plans
{song.plans.length === 0 ? (

no plan/ directory

) : (
    {song.plans.map((p) => (
  • {p.name} {fmtBytes(p.size)}
  • ))}
)} {song.hasClipsCsv &&
clips.csv present
}
); }