# Add the "Artist Spotlight" block to this P1 project

Add a Puck component from P1 Blocks (https://p1-blocks.prolificdigital.io/blocks/artist-spotlight) to this Pantheon Content Publisher (P1) Next.js project. Magazine-style artist feature with portrait, bio, oversized statement quote, selected works and dated appearances.

## Steps

1. Create `components/puck/artist-spotlight-block.tsx` with the exact file contents below. If `components/puck/` doesn't exist, find the folder where this project keeps its Puck components (look at the imports in `puck.config.tsx`) and put it there.
2. In `puck.config.tsx`, import it: `import { artistSpotlightBlock } from "./components/puck/artist-spotlight-block";`
3. Register it under `components` as `ArtistSpotlightBlock: artistSpotlightBlock`.
4. Add `"ArtistSpotlightBlock"` to the best-fitting entry in `categories` (this block's library category is "Arts & culture"). Create a category only if none fits.
5. Run the project's type check (usually `pnpm typecheck`) and resolve anything project-specific.
6. If `package.json` has a `sync:registry` script, tell the user it must run (or that CI will run it) before the new component appears in the P1 editor.

## Rules

- Do not add dependencies. The block is self-contained by design: one type-only import from `@puckeditor/core`, Tailwind v4 classes, no client JavaScript.
- Keep the files as-is unless the user asks for changes. The accent color is `indigo-*`; if the project has brand colors, offer to swap them with a find-and-replace on `indigo-`.
- Images are plain `imageUrl` + `imageAlt` text fields. If this project defines a P1 media-library field (search for `"p1-media"`), offer to switch to it.
- Don't change prop names in `defaultProps`. Content editors' saved pages depend on them.

## File: `components/puck/artist-spotlight-block.tsx`

```tsx
import type { ComponentConfig } from "@puckeditor/core";

/**
 * Artist Spotlight — a magazine-style artist feature: tall portrait beside a monumental name,
 * biography, an oversized artist-statement quote, captioned thumbnails of selected works and a
 * dated list of upcoming appearances. Register: `ArtistSpotlightBlock: artistSpotlightBlock`.
 */

type Heading = "h1" | "h2" | "h3" | "h4";

export type ArtistSpotlightProps = {
  eyebrow: string;
  name: string;
  headingLevel: Heading;
  details: string;
  portraitUrl: string;
  portraitAlt: string;
  portraitCredit: string;
  bio: string;
  statement: string;
  statementCite: string;
  worksHeading: string;
  works: { imageUrl: string; imageAlt: string; title: string; year: string; medium: string }[];
  appearancesHeading: string;
  appearances: { dateText: string; isoDate: string; title: string; place: string; href: string }[];
  ctaLabel: string;
  ctaHref: string;
};

const SUB = { h1: "h2", h2: "h3", h3: "h4", h4: "h5" } as const;
const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
const ring = "focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-indigo-600";

// Month and day straight from the YYYY-MM-DD string, so the stamp never shifts with time zones.
const stamp = (iso: string) => {
  const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(iso || "");
  if (!m) return null;
  const month = MONTHS[Number(m[2]) - 1];
  const day = Number(m[3]);
  return month && day >= 1 && day <= 31 ? { month, day, iso: `${m[1]}-${m[2]}-${m[3]}` } : null;
};

export const artistSpotlightBlock: ComponentConfig<ArtistSpotlightProps> = {
  label: "Artist Spotlight",
  fields: {
    eyebrow: { type: "text", label: "Eyebrow", metadata: { help: "Like Artist in residence, 2026. Leave blank to hide it." } },
    name: { type: "text", label: "Artist name" },
    headingLevel: {
      type: "select",
      label: "Heading level",
      options: [
        { label: "H1", value: "h1" },
        { label: "H2", value: "h2" },
        { label: "H3", value: "h3" },
        { label: "H4", value: "h4" },
      ],
      metadata: { help: "Sets the page outline for screen readers and search. The look doesn't change." },
    },
    details: { type: "text", label: "Artist details", metadata: { help: "Like Born 1978, Duluth · Lives and works in Saint Paul. Leave blank to hide it." } },
    portraitUrl: { type: "text", label: "Portrait URL", metadata: { help: "A tall photo works best. Leave blank to hide it." } },
    portraitAlt: { type: "text", label: "Portrait alt text", metadata: { help: "Describe the photo for screen reader users." } },
    portraitCredit: { type: "text", label: "Portrait credit", metadata: { help: "Like Photo: Jae Lindahl. Leave blank to hide it." } },
    bio: { type: "textarea", label: "Biography", metadata: { help: "Separate paragraphs with a blank line." } },
    statement: { type: "textarea", label: "Artist statement", metadata: { help: "A short quote in the artist's own words, shown large. Leave blank to hide it." } },
    statementCite: { type: "text", label: "Statement source", metadata: { help: "Like From a 2026 interview with the museum. Leave blank to hide it." } },
    worksHeading: { type: "text", label: "Works heading" },
    works: {
      type: "array",
      label: "Selected works",
      min: 0,
      max: 8,
      getItemSummary: (item) => item?.title || "Work",
      defaultItemProps: { imageUrl: "https://picsum.photos/seed/selectedwork/800/800", imageAlt: "", title: "Untitled", year: "", medium: "" },
      arrayFields: {
        imageUrl: { type: "text", label: "Image URL" },
        imageAlt: { type: "text", label: "Image alt text", metadata: { help: "Describe what the work shows." } },
        title: { type: "text", label: "Title" },
        year: { type: "text", label: "Year" },
        medium: { type: "text", label: "Medium", metadata: { help: "Leave blank to hide it." } },
      },
      metadata: { help: "Leave empty to hide the works row." },
    },
    appearancesHeading: { type: "text", label: "Appearances heading" },
    appearances: {
      type: "array",
      label: "Upcoming appearances",
      min: 0,
      max: 8,
      getItemSummary: (item) => [item?.dateText, item?.title].filter(Boolean).join(" · ") || "Appearance",
      defaultItemProps: { dateText: "Saturday, March 6, 2027", isoDate: "2027-03-06", title: "Artist talk", place: "", href: "" },
      arrayFields: {
        dateText: { type: "text", label: "Date", metadata: { help: "As people should read it, with the time if there is one." } },
        isoDate: { type: "text", label: "Date (YYYY-MM-DD)", metadata: { help: "Draws the date stamp and lets calendars read the date." } },
        title: { type: "text", label: "Title" },
        place: { type: "text", label: "Where", metadata: { help: "Leave blank to hide it." } },
        href: { type: "text", label: "Link", metadata: { help: "Tickets or details. Leave blank for no link." } },
      },
      metadata: { help: "Leave empty to hide this list." },
    },
    ctaLabel: { type: "text", label: "Link text", metadata: { help: "Like See the exhibition. Leave blank to hide it." } },
    ctaHref: { type: "text", label: "Link" },
  },
  defaultProps: {
    eyebrow: "Artist in residence, 2026–27",
    name: "Ines Okonkwo-Lindqvist",
    headingLevel: "h2",
    details: "Born 1971, Lagos · Lives and works in Red Wing, Minnesota",
    portraitUrl: "https://picsum.photos/seed/artiststudio/1000/1300",
    portraitAlt: "The artist standing in her riverside studio, arms folded, large blue canvases leaning behind her",
    portraitCredit: "Photo: Jae Lindahl",
    bio: "Okonkwo-Lindqvist came to the upper Mississippi in 1994 to study hydrology and stayed to paint it. Her canvases are built from river silt, ground pigment and graphite, layered over months until the surface reads like a riverbed seen from above.\n\nHer work is held by the Halvorsen, the Walker-Brandt Collection and the National Gallery of Lagos. This year she is working in the museum's open studio on the second floor, where visitors can watch a new 30-foot painting take shape.",
    statement: "I don't paint the river. I let it leave a record, and then I try to read what it wrote.",
    statementCite: "From a conversation with the curators, 2026",
    worksHeading: "Selected works",
    works: [
      { imageUrl: "https://picsum.photos/seed/silt1/800/1000", imageAlt: "Dense grey-blue canvas with fine branching lines like a river delta", title: "Delta, Low Water", year: "2009", medium: "Silt and graphite on linen" },
      { imageUrl: "https://picsum.photos/seed/silt2/800/1000", imageAlt: "Pale ochre canvas crossed by a single dark meandering band", title: "Oxbow", year: "2014", medium: "Pigment and river clay" },
      { imageUrl: "https://picsum.photos/seed/silt3/800/1000", imageAlt: "Grid of twelve small square panels in shades of brown and green", title: "Twelve Soundings", year: "2019", medium: "Mixed media on panel" },
      { imageUrl: "https://picsum.photos/seed/silt4/800/1000", imageAlt: "Deep blue canvas with a faint horizon line and scattered white flecks", title: "Ice Out, April", year: "2024", medium: "Silt, mica and oil on canvas" },
    ],
    appearancesHeading: "Meet the artist",
    appearances: [
      { dateText: "Thursday, October 22, 2026, 6:30 p.m.", isoDate: "2026-10-22", title: "In conversation: Reading the river", place: "Lindgren Auditorium", href: "/events/reading-the-river" },
      { dateText: "Saturday, November 7, 2026, 1–4 p.m.", isoDate: "2026-11-07", title: "Open studio afternoon", place: "Second-floor studio, free with admission", href: "" },
      { dateText: "Sunday, December 6, 2026, 2 p.m.", isoDate: "2026-12-06", title: "Family workshop: Painting with mud", place: "Learning Center", href: "/events/painting-with-mud" },
    ],
    ctaLabel: "See The Weight of Water",
    ctaHref: "/exhibitions/the-weight-of-water",
  },
  render: ({ eyebrow, name, headingLevel, details, portraitUrl, portraitAlt, portraitCredit, bio, statement, statementCite, worksHeading, works, appearancesHeading, appearances, ctaLabel, ctaHref }) => {
    const H = headingLevel || "h2";
    const Sub = SUB[H] ?? "h3";
    const paragraphs = (bio || "").split(/\n\s*\n/).map((p) => p.trim()).filter(Boolean);
    const workList = (works ?? []).filter((w) => w?.imageUrl);
    const events = (appearances ?? []).filter((a) => a?.title);

    return (
      <section className="overflow-hidden bg-white px-4 py-16 sm:px-6 sm:py-20 lg:px-8 lg:py-24">
        <div className="mx-auto max-w-7xl">
          <div className="grid grid-cols-1 gap-10 lg:grid-cols-12 lg:gap-12">
            {portraitUrl ? (
              <figure className="lg:col-span-5">
                <div className="relative">
                  <span aria-hidden="true" className="absolute -top-3 -left-3 hidden h-2/3 w-2/3 bg-indigo-100 sm:block" />
                  <img src={portraitUrl} alt={portraitAlt || ""} className="relative aspect-3/4 w-full bg-neutral-100 object-cover" />
                </div>
                {portraitCredit ? <figcaption className="mt-3 text-xs text-neutral-600">{portraitCredit}</figcaption> : null}
              </figure>
            ) : null}

            <div className={`flex flex-col ${portraitUrl ? "lg:col-span-7 lg:pt-10" : "lg:col-span-12"}`}>
              {eyebrow ? (
                <p className="flex items-center gap-3 text-xs font-semibold tracking-widest text-indigo-700 uppercase">
                  <span aria-hidden="true" className="h-px w-8 bg-indigo-600" />
                  {eyebrow}
                </p>
              ) : null}
              {name ? (
                <H className={`${eyebrow ? "mt-5" : ""} font-serif text-5xl leading-none font-normal tracking-tight text-balance break-words text-neutral-950 sm:text-6xl lg:text-7xl`}>
                  {name}
                </H>
              ) : null}
              {details ? <p className="mt-5 text-sm font-medium tracking-wide text-neutral-600">{details}</p> : null}
              {paragraphs.length ? (
                <div className="mt-8 max-w-2xl space-y-5 border-t border-neutral-950 pt-8 text-base leading-7 text-pretty text-neutral-700 sm:text-lg sm:leading-8">
                  {paragraphs.map((p, i) => (
                    <p key={i} className={i === 0 ? "first-letter:float-left first-letter:mr-3 first-letter:font-serif first-letter:text-7xl first-letter:leading-none first-letter:text-indigo-700" : ""}>
                      {p}
                    </p>
                  ))}
                </div>
              ) : null}
              {ctaLabel ? (
                <a href={ctaHref || "#"} className={`group mt-8 inline-flex min-h-11 w-fit items-center gap-2 text-base font-semibold text-neutral-950 underline decoration-indigo-600 decoration-2 underline-offset-8 hover:decoration-4 ${ring}`}>
                  {ctaLabel}
                  <svg aria-hidden="true" viewBox="0 0 20 20" fill="currentColor" className="size-5 transition group-hover:translate-x-0.5 motion-reduce:transition-none">
                    <path fillRule="evenodd" d="M3 10a.75.75 0 0 1 .75-.75h10.64l-3.22-3.22a.75.75 0 1 1 1.06-1.06l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 1 1-1.06-1.06l3.22-3.22H3.75A.75.75 0 0 1 3 10Z" clipRule="evenodd" />
                  </svg>
                </a>
              ) : null}
            </div>
          </div>

          {statement ? (
            <figure className="mx-auto mt-20 max-w-5xl lg:mt-28">
              <blockquote className="relative pt-12 font-serif text-3xl leading-tight tracking-tight text-balance text-neutral-950 italic sm:pt-16 sm:text-5xl lg:pt-0 lg:text-6xl">
                <span aria-hidden="true" className="absolute top-0 left-0 font-serif text-8xl leading-none text-indigo-600 not-italic sm:text-9xl lg:-top-4 lg:-left-16">
                  &ldquo;
                </span>
                <p className="relative">{statement}</p>
              </blockquote>
              {statementCite || name ? (
                <figcaption className="mt-6 flex items-center gap-3 text-sm text-neutral-600">
                  <span aria-hidden="true" className="h-px w-10 bg-neutral-950" />
                  <span>
                    {name ? <span className="font-semibold text-neutral-950">{name}</span> : null}
                    {name && statementCite ? ", " : null}
                    {statementCite}
                  </span>
                </figcaption>
              ) : null}
            </figure>
          ) : null}

          {workList.length || events.length ? (
            <div className="mt-20 grid grid-cols-1 gap-16 lg:mt-28 lg:grid-cols-12 lg:gap-12">
              {workList.length ? (
                <div className={events.length ? "lg:col-span-7" : "lg:col-span-12"}>
                  <Sub className="border-b border-neutral-950 pb-3 text-xs font-semibold tracking-widest text-neutral-950 uppercase">{worksHeading || "Selected works"}</Sub>
                  <ul role="list" className={`mt-8 grid grid-cols-1 gap-x-6 gap-y-10 sm:grid-cols-2 ${events.length ? "" : "lg:grid-cols-4"}`}>
                    {workList.map((w, i) => (
                      <li key={`${w.title}-${i}`} className={i % 2 === 1 ? "sm:mt-10" : ""}>
                        <figure>
                          <img src={w.imageUrl} alt={w.imageAlt || ""} loading="lazy" className="aspect-4/5 w-full bg-neutral-100 object-cover" />
                          <figcaption className="mt-3 text-sm leading-5">
                            {w.title ? <cite className="font-serif text-base text-neutral-950 italic">{w.title}</cite> : null}
                            {w.year ? <span className="text-neutral-950">, {w.year}</span> : null}
                            {w.medium ? <span className="mt-0.5 block text-neutral-600">{w.medium}</span> : null}
                          </figcaption>
                        </figure>
                      </li>
                    ))}
                  </ul>
                </div>
              ) : null}

              {events.length ? (
                <div className={workList.length ? "lg:col-span-5" : "lg:col-span-12"}>
                  <Sub className="border-b border-neutral-950 pb-3 text-xs font-semibold tracking-widest text-neutral-950 uppercase">{appearancesHeading || "Upcoming appearances"}</Sub>
                  <ol role="list" className="divide-y divide-neutral-200">
                    {events.map((ev, i) => {
                      const d = stamp(ev.isoDate);
                      return (
                        <li key={`${ev.title}-${i}`} className="flex gap-5 py-6">
                          {d ? (
                            <div aria-hidden="true" className="w-14 shrink-0 text-center">
                              <span className="block text-xs font-semibold tracking-widest text-indigo-700 uppercase">{d.month}</span>
                              <span className="block font-serif text-4xl leading-none text-neutral-950 tabular-nums">{d.day}</span>
                            </div>
                          ) : null}
                          <div className="min-w-0">
                            <p className="font-serif text-xl leading-snug text-neutral-950">
                              {ev.href ? (
                                <a href={ev.href} className={`decoration-indigo-600 underline-offset-4 hover:underline ${ring}`}>
                                  {ev.title}
                                </a>
                              ) : (
                                ev.title
                              )}
                            </p>
                            {ev.dateText ? (
                              d ? (
                                <time dateTime={d.iso} className="mt-1 block text-sm text-neutral-950">
                                  {ev.dateText}
                                </time>
                              ) : (
                                <p className="mt-1 text-sm text-neutral-950">{ev.dateText}</p>
                              )
                            ) : null}
                            {ev.place ? <p className="text-sm text-neutral-600">{ev.place}</p> : null}
                          </div>
                        </li>
                      );
                    })}
                  </ol>
                </div>
              ) : null}
            </div>
          ) : null}
        </div>
      </section>
    );
  },
};
```
