diff --git a/AGENTS.md b/AGENTS.md index 44a03a0..643577d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,8 +2,8 @@ # This is NOT the Next.js you know -This version has breaking changes - APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices. +This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices. -This block is written and re-added by `next dev` - verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean. +This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean. diff --git a/components/public/constellation-image.tsx b/components/public/constellation-image.tsx new file mode 100644 index 0000000..80238be --- /dev/null +++ b/components/public/constellation-image.tsx @@ -0,0 +1,124 @@ +import Image from "next/image"; + +import type { PublicGuide } from "@/lib/guides/queries"; +import { constellationChartRows } from "@/lib/guides/export-image"; +import { cn } from "@/lib/utils"; + +function percentage(value: number): string { + return `${value.toLocaleString(undefined, { maximumFractionDigits: 2 })}%`; +} + +export function ConstellationImage({ + guide, + group, + sectionNote, +}: { + guide: PublicGuide; + group: PublicGuide["constellationGroups"][number]; + sectionNote: string | null | undefined; +}) { + const rows = constellationChartRows(group.rows); + const background = guide.character.nameCardImageUrl ?? guide.coverUrl; + const character = guide.character.splashImageUrl ?? guide.character.imageUrl; + const footer = group.note ?? sectionNote; + + return ( +
+ Team Damage +
++ {footer} +
+ ) : null} +{group.note}
: null} +