feat: add asset variants table and URL selection

This commit is contained in:
William Valentin
2026-02-01 12:08:18 -08:00
parent 24a092544e
commit 26e2d74d2b
5 changed files with 190 additions and 17 deletions

View File

@@ -0,0 +1,9 @@
export function pickVariantKey(
input: { variants: Array<{ kind: string; size: number; key: string }> },
req: { kind: string; size: number },
) {
const v = input.variants.find(
(x) => x.kind === req.kind && x.size === req.size,
);
return v?.key ?? null;
}