# Add the "Performance Season" block to this P1 project

Add a Puck component from P1 Blocks (https://p1-blocks.prolificdigital.io/blocks/performance-season) to this Pantheon Content Publisher (P1) Next.js project. Season lineup grouped by month with company, dates, hall, genre, prices, seat availability text and ticket links.

## Steps

1. Create `components/puck/performance-season-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 { performanceSeasonBlock } from "./components/puck/performance-season-block";`
3. Register it under `components` as `PerformanceSeasonBlock: performanceSeasonBlock`.
4. Add `"PerformanceSeasonBlock"` 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/performance-season-block.tsx`

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

/**
 * Performance Season — a performing arts center's season lineup, grouped by month like a
 * printed season brochure: production, company, dates, hall, genre, price range and seat
 * availability spelled out in text ("Few seats left", "Sold out"), each with a ticket link.
 * Register: `PerformanceSeasonBlock: performanceSeasonBlock` in puck.config.tsx.
 */

type Heading = "h1" | "h2" | "h3" | "h4";
type Availability = "onsale" | "few" | "soldout";

type Production = {
  month: string;
  title: string;
  company: string;
  dates: string;
  venue: string;
  genre: string;
  priceRange: string;
  availability: Availability;
  imageUrl: string;
  imageAlt: string;
  href: string;
};

export type PerformanceSeasonProps = {
  eyebrow: string;
  heading: string;
  headingLevel: Heading;
  seasonLabel: string;
  intro: string;
  ticketLabel: string;
  soldOutLabel: string;
  subscribeLabel: string;
  subscribeHref: string;
  productions: Production[];
};

const SUB = { h1: "h2", h2: "h3", h3: "h4", h4: "h5" } as const;
const SUB2 = { h1: "h3", h2: "h4", h3: "h5", h4: "h6" } as const;
const ring = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600";

const AVAIL: Record<Availability, string> = { onsale: "On sale", few: "Few seats left", soldout: "Sold out" };

export const performanceSeasonBlock: ComponentConfig<PerformanceSeasonProps> = {
  label: "Performance Season",
  fields: {
    eyebrow: { type: "text", label: "Eyebrow", metadata: { help: "Leave blank to hide it." } },
    heading: { type: "text", label: "Heading" },
    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." },
    },
    seasonLabel: { type: "text", label: "Season", metadata: { help: "Set large beside the heading, like 2026–27. Leave blank to hide it." } },
    intro: { type: "textarea", label: "Intro", metadata: { help: "Leave blank to hide it." } },
    ticketLabel: { type: "text", label: "Ticket link text", metadata: { help: "Like Tickets. The production's name is added for screen readers." } },
    soldOutLabel: { type: "text", label: "Sold-out link text", metadata: { help: "Replaces the ticket text when a show is sold out, like Join waitlist." } },
    subscribeLabel: { type: "text", label: "Subscription link text", metadata: { help: "Like Build a subscription. Leave blank to hide it." } },
    subscribeHref: { type: "text", label: "Subscription link" },
    productions: {
      type: "array",
      label: "Productions",
      min: 1,
      max: 30,
      getItemSummary: (item) => [item?.month, item?.title].filter(Boolean).join(" · ") || "Production",
      defaultItemProps: {
        month: "May 2027",
        title: "New production",
        company: "",
        dates: "May 7–9, 2027",
        venue: "Main Hall",
        genre: "Theater",
        priceRange: "$25–$65",
        availability: "onsale",
        imageUrl: "",
        imageAlt: "",
        href: "",
      },
      arrayFields: {
        month: { type: "text", label: "Month", metadata: { help: "Productions with the same month text are grouped together, in the order they appear here." } },
        title: { type: "text", label: "Production" },
        company: { type: "text", label: "Company or artist", metadata: { help: "Leave blank to hide it." } },
        dates: { type: "text", label: "Dates", metadata: { help: "Like October 9–11, 2026." } },
        venue: { type: "text", label: "Hall" },
        genre: { type: "text", label: "Genre", metadata: { help: "One or two words, like Dance or Chamber music." } },
        priceRange: { type: "text", label: "Prices", metadata: { help: "Like $29–$89." } },
        availability: {
          type: "select",
          label: "Availability",
          options: [
            { label: "On sale", value: "onsale" },
            { label: "Few seats left", value: "few" },
            { label: "Sold out", value: "soldout" },
          ],
        },
        imageUrl: { type: "text", label: "Image URL", metadata: { help: "Leave blank for a text-only row." } },
        imageAlt: { type: "text", label: "Image alt text" },
        href: { type: "text", label: "Tickets link", metadata: { help: "Leave blank to hide the ticket link." } },
      },
    },
  },
  defaultProps: {
    eyebrow: "Larkspur Performing Arts Center",
    heading: "The season",
    headingLevel: "h2",
    seasonLabel: "2026–27",
    intro: "Forty-one performances across three halls, from a new Nutcracker to a jazz residency in the Studio. Subscribers save up to 25 percent and exchange tickets for free.",
    ticketLabel: "Tickets",
    soldOutLabel: "Join waitlist",
    subscribeLabel: "Build a subscription",
    subscribeHref: "/subscribe",
    productions: [
      { month: "October 2026", title: "Rite of Spring / Rite of Fall", company: "Northwind Dance Collective", dates: "October 9–11", venue: "Halvard Main Hall", genre: "Dance", priceRange: "$29–$79", availability: "onsale", imageUrl: "https://picsum.photos/seed/riteofspring/800/600", imageAlt: "Dancers in rust-colored costumes leaping across a dark stage", href: "/season/rite" },
      { month: "October 2026", title: "Late Quartets", company: "The Eckhart String Quartet", dates: "October 24", venue: "Wren Recital Hall", genre: "Chamber music", priceRange: "$35–$55", availability: "few", imageUrl: "https://picsum.photos/seed/latequartets/800/600", imageAlt: "Four string players seated in a semicircle under warm stage light", href: "/season/late-quartets" },
      { month: "November 2026", title: "The Lighthouse Keeper's Daughter", company: "Larkspur Repertory Theater", dates: "November 5–22", venue: "Halvard Main Hall", genre: "Theater", priceRange: "$32–$89", availability: "onsale", imageUrl: "https://picsum.photos/seed/lighthousekeeper/800/600", imageAlt: "An actor holding a lantern on a stage set built like a rocky shoreline", href: "/season/lighthouse" },
      { month: "November 2026", title: "Ana Ruiz-Halloran Trio", company: "Studio Jazz Residency", dates: "November 13 & 14", venue: "The Studio", genre: "Jazz", priceRange: "$25", availability: "soldout", imageUrl: "https://picsum.photos/seed/jazztrio/800/600", imageAlt: "Pianist, bassist and drummer playing in a small club-style room", href: "/season/ruiz-halloran" },
      { month: "December 2026", title: "The Nutcracker, Reimagined", company: "Larkspur Ballet with the Riverside Youth Orchestra", dates: "December 4–27", venue: "Halvard Main Hall", genre: "Ballet", priceRange: "$39–$129", availability: "few", imageUrl: "https://picsum.photos/seed/nutcrackernew/800/600", imageAlt: "Ballerinas in white tutus under falling paper snow", href: "/season/nutcracker" },
      { month: "December 2026", title: "A Lessons & Carols Sing-Along", company: "Cedar Falls Choral Society", dates: "December 19", venue: "Wren Recital Hall", genre: "Choral", priceRange: "$15–$30", availability: "onsale", imageUrl: "", imageAlt: "", href: "/season/carols" },
    ],
  },
  render: ({ eyebrow, heading, headingLevel, seasonLabel, intro, ticketLabel, soldOutLabel, subscribeLabel, subscribeHref, productions }) => {
    const H = headingLevel || "h2";
    const Sub = SUB[H] ?? "h3";
    const Item = SUB2[H] ?? "h4";
    const list = (productions ?? []).filter((p) => p?.title);

    const groups: { month: string; items: Production[] }[] = [];
    for (const p of list) {
      const key = (p.month || "").trim();
      const g = groups.find((x) => x.month === key);
      if (g) g.items.push(p);
      else groups.push({ month: key, items: [p] });
    }

    return (
      <section className="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">
          {eyebrow || heading || seasonLabel || intro ? (
            <header className="grid grid-cols-1 gap-8 lg:grid-cols-12 lg:items-end lg:gap-12">
              <div className="lg:col-span-8">
                {eyebrow ? <p className="text-xs font-semibold tracking-widest text-indigo-700 uppercase">{eyebrow}</p> : null}
                {heading || seasonLabel ? (
                  <H className={`${eyebrow ? "mt-4" : ""} font-serif text-5xl leading-none font-normal tracking-tight text-neutral-950 sm:text-7xl lg:text-8xl`}>
                    {heading}
                    {heading && seasonLabel ? " " : null}
                    {seasonLabel ? <span className="block text-indigo-700 italic tabular-nums">{seasonLabel}</span> : null}
                  </H>
                ) : null}
              </div>
              {intro || subscribeLabel ? (
                <div className="lg:col-span-4">
                  {intro ? <p className="text-base leading-7 text-pretty text-neutral-600">{intro}</p> : null}
                  {subscribeLabel ? (
                    <a href={subscribeHref || "#"} className={`mt-5 inline-flex min-h-11 items-center justify-center bg-indigo-600 px-5 py-2.5 text-sm font-semibold text-white transition hover:bg-indigo-700 motion-reduce:transition-none ${ring}`}>
                      {subscribeLabel}
                    </a>
                  ) : null}
                </div>
              ) : null}
            </header>
          ) : null}

          {groups.length ? (
            <div className="mt-14 space-y-16 lg:mt-20 lg:space-y-20">
              {groups.map((g, gi) => (
                <div key={`${g.month}-${gi}`} className="grid grid-cols-1 gap-6 border-t border-neutral-950 pt-6 lg:grid-cols-12 lg:gap-12">
                  <div className="lg:col-span-3">
                    <div className="lg:sticky lg:top-8">
                      {g.month ? <Sub className="font-serif text-3xl leading-none font-normal text-neutral-950 italic sm:text-4xl">{g.month}</Sub> : null}
                      <p className="mt-2 text-xs font-semibold tracking-widest text-neutral-600 uppercase">
                        {g.items.length} {g.items.length === 1 ? "production" : "productions"}
                      </p>
                    </div>
                  </div>
                  <ul role="list" className="divide-y divide-neutral-200 lg:col-span-9 lg:-mt-6">
                    {g.items.map((p, i) => {
                      const avail: Availability = p.availability && AVAIL[p.availability] ? p.availability : "onsale";
                      const soldOut = avail === "soldout";
                      const linkText = soldOut ? soldOutLabel || "Join waitlist" : ticketLabel || "Tickets";
                      return (
                        <li key={`${p.title}-${i}`} className="py-6 lg:py-8">
                          <article className="grid grid-cols-1 gap-5 sm:grid-cols-12 sm:gap-6">
                            {p.imageUrl ? (
                              <div className="sm:col-span-4 lg:col-span-3">
                                <img src={p.imageUrl} alt={p.imageAlt || ""} loading="lazy" className={`aspect-4/3 w-full bg-neutral-100 object-cover ${soldOut ? "grayscale" : ""}`} />
                              </div>
                            ) : null}
                            <div className={`min-w-0 ${p.imageUrl ? "sm:col-span-8 lg:col-span-6" : "sm:col-span-12 lg:col-span-9"}`}>
                              {p.genre ? <p className="inline-block border border-neutral-950 px-2 py-0.5 text-xs font-semibold tracking-widest text-neutral-950 uppercase">{p.genre}</p> : null}
                              <Item className="mt-3 font-serif text-2xl leading-tight font-normal tracking-tight text-balance text-neutral-950 sm:text-3xl">{p.title}</Item>
                              {p.company ? <p className="mt-1 text-base text-neutral-700">{p.company}</p> : null}
                              {p.dates || p.venue ? (
                                <p className="mt-3 text-sm leading-6 text-neutral-600">
                                  {p.dates ? <span className="font-semibold text-neutral-950">{p.dates}</span> : null}
                                  {p.dates && p.venue ? <span aria-hidden="true"> · </span> : null}
                                  {p.venue}
                                </p>
                              ) : null}
                            </div>
                            <div className="flex flex-wrap items-center justify-between gap-4 border-t border-neutral-200 pt-4 sm:col-span-12 sm:border-t-0 sm:pt-0 lg:col-span-3 lg:flex-col lg:items-end lg:justify-start lg:text-right">
                              <div>
                                {p.priceRange ? <p className="font-serif text-2xl leading-none text-neutral-950 tabular-nums">{p.priceRange}</p> : null}
                                <p className="mt-2 inline-flex items-center gap-2 text-xs font-semibold tracking-widest text-neutral-950 uppercase">
                                  <span aria-hidden="true" className={avail === "few" ? "size-2 rotate-45 bg-indigo-600" : soldOut ? "h-px w-3 bg-neutral-950" : "size-2 rounded-full border border-neutral-950"} />
                                  {AVAIL[avail]}
                                </p>
                              </div>
                              {p.href ? (
                                <a
                                  href={p.href}
                                  className={`inline-flex min-h-11 items-center justify-center gap-2 px-5 text-sm font-semibold transition motion-reduce:transition-none ${ring} ${soldOut ? "text-neutral-950 ring-1 ring-neutral-950 ring-inset hover:bg-neutral-100" : "bg-neutral-950 text-white hover:bg-indigo-700"}`}
                                >
                                  {linkText}
                                  <span className="sr-only">: {p.title}</span>
                                </a>
                              ) : null}
                            </div>
                          </article>
                        </li>
                      );
                    })}
                  </ul>
                </div>
              ))}
            </div>
          ) : null}
        </div>
      </section>
    );
  },
};
```
