# Add the "Festival Lineup" block to this P1 project

Add a Puck component from P1 Blocks (https://p1-blocks.prolificdigital.io/blocks/festival-lineup) to this Pantheon Content Publisher (P1) Next.js project. A festival header, a CSS-only day switcher of stage-by-stage set times, ticket tiers and getting-there notes.

## Steps

1. Create `components/puck/festival-lineup-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 { festivalLineupBlock } from "./components/puck/festival-lineup-block";`
3. Register it under `components` as `FestivalLineupBlock: festivalLineupBlock`.
4. Add `"FestivalLineupBlock"` to the best-fitting entry in `categories` (this block's library category is "Tourism"). 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/festival-lineup-block.tsx`

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

/**
 * Festival Lineup — a festival at a glance: name, dates and venue over a photo, a day
 * switcher (CSS-only radio tabs, up to four days) showing each stage's set times, ticket
 * tiers and a getting-there note. Register: `FestivalLineupBlock: festivalLineupBlock` in puck.config.tsx.
 */

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

export type FestivalLineupProps = {
  eyebrow: string;
  name: string;
  headingLevel: Heading;
  dates: string;
  venue: string;
  intro: string;
  imageUrl: string;
  imageAlt: string;
  lineupHeading: string;
  days: {
    label: string;
    date: string;
    stages: { stage: string; acts: string }[];
  }[];
  ticketsHeading: string;
  tiers: { name: string; price: string; includes: string }[];
  ticketsLabel: string;
  ticketsHref: string;
  gettingThereHeading: string;
  gettingThere: string;
  gettingThereLabel: string;
  gettingThereHref: string;
};

const childHeading: Record<Heading, "h2" | "h3" | "h4" | "h5"> = { h1: "h2", h2: "h3", h3: "h4", h4: "h5" };
const grandchildHeading: Record<Heading, "h3" | "h4" | "h5" | "h6"> = { h1: "h3", h2: "h4", h3: "h5", h4: "h6" };

const FOCUS = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600";
const ARROW = "M2 8a.75.75 0 0 1 .75-.75h8.69L8.22 4.03a.75.75 0 0 1 1.06-1.06l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 0 1-1.06-1.06l3.22-3.22H2.75A.75.75 0 0 1 2 8Z";

// Radio tabs need literal class names per slot so Tailwind can see them: radio → tab label → panel.
const SLOTS = [
  {
    peer: "peer/d0",
    tab: "peer-checked/d0:bg-neutral-950 peer-checked/d0:text-white peer-checked/d0:ring-neutral-950 peer-focus-visible/d0:outline-2 peer-focus-visible/d0:outline-offset-2 peer-focus-visible/d0:outline-indigo-600",
    panel: "peer-checked/d0:block",
  },
  {
    peer: "peer/d1",
    tab: "peer-checked/d1:bg-neutral-950 peer-checked/d1:text-white peer-checked/d1:ring-neutral-950 peer-focus-visible/d1:outline-2 peer-focus-visible/d1:outline-offset-2 peer-focus-visible/d1:outline-indigo-600",
    panel: "peer-checked/d1:block",
  },
  {
    peer: "peer/d2",
    tab: "peer-checked/d2:bg-neutral-950 peer-checked/d2:text-white peer-checked/d2:ring-neutral-950 peer-focus-visible/d2:outline-2 peer-focus-visible/d2:outline-offset-2 peer-focus-visible/d2:outline-indigo-600",
    panel: "peer-checked/d2:block",
  },
  {
    peer: "peer/d3",
    tab: "peer-checked/d3:bg-neutral-950 peer-checked/d3:text-white peer-checked/d3:ring-neutral-950 peer-focus-visible/d3:outline-2 peer-focus-visible/d3:outline-offset-2 peer-focus-visible/d3:outline-indigo-600",
    panel: "peer-checked/d3:block",
  },
];

function parseActs(raw: string) {
  return (raw || "")
    .split("\n")
    .map((line) => line.trim())
    .filter(Boolean)
    .map((line) => {
      const bar = line.indexOf("|");
      return bar === -1 ? { time: "", act: line } : { time: line.slice(0, bar).trim(), act: line.slice(bar + 1).trim() };
    })
    .filter((a) => a.act);
}

export const festivalLineupBlock: ComponentConfig<FestivalLineupProps> = {
  label: "Festival Lineup",
  fields: {
    eyebrow: { type: "text", label: "Eyebrow", metadata: { help: "Small line above the festival name, like “Presented by Visit Riverbend”. Leave blank to hide it." } },
    name: { type: "text", label: "Festival 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. Section and stage titles use the next levels down." },
    },
    dates: { type: "text", label: "Dates", metadata: { help: "Like “June 12–14, 2026”." } },
    venue: { type: "text", label: "Venue" },
    intro: { type: "textarea", label: "Intro" },
    imageUrl: { type: "text", label: "Image URL", metadata: { help: "A wide crowd or stage photo. Text sits on the left, so pick a photo with a calm left side." } },
    imageAlt: { type: "text", label: "Image alt text", metadata: { help: "Describe the photo for screen reader users. Leave blank only if it's purely decorative." } },
    lineupHeading: { type: "text", label: "Lineup heading" },
    days: {
      type: "array",
      label: "Days",
      min: 1,
      max: 4,
      getItemSummary: (item) => `${item?.label || "Day"}${item?.date ? ` · ${item.date}` : ""}`,
      defaultItemProps: { label: "Sunday", date: "", stages: [{ stage: "Main Stage", acts: "6:00 PM | Headliner" }] },
      arrayFields: {
        label: { type: "text", label: "Day", metadata: { help: "Short, shown on the day switcher, like “Friday”." } },
        date: { type: "text", label: "Date", metadata: { help: "Like “June 12”. Leave blank to hide it." } },
        stages: {
          type: "array",
          label: "Stages",
          min: 1,
          max: 4,
          getItemSummary: (item) => item?.stage || "Stage",
          defaultItemProps: { stage: "New stage", acts: "5:00 PM | Opening act" },
          arrayFields: {
            stage: { type: "text", label: "Stage name" },
            acts: { type: "textarea", label: "Acts", metadata: { help: "One act per line as “time | act”, like “7:30 PM | The Low Water Band”. Leave the time and bar off if there isn't one." } },
          },
        },
      },
    },
    ticketsHeading: { type: "text", label: "Tickets heading" },
    tiers: {
      type: "array",
      label: "Ticket tiers",
      min: 0,
      max: 4,
      getItemSummary: (item) => `${item?.name || "Tier"}${item?.price ? ` · ${item.price}` : ""}`,
      defaultItemProps: { name: "New tier", price: "$0", includes: "" },
      arrayFields: {
        name: { type: "text", label: "Name" },
        price: { type: "text", label: "Price", metadata: { help: "Like “$45” or “Free”." } },
        includes: { type: "textarea", label: "What's included" },
      },
    },
    ticketsLabel: { type: "text", label: "Tickets button text", metadata: { help: "Leave blank to hide it." } },
    ticketsHref: { type: "text", label: "Tickets link" },
    gettingThereHeading: { type: "text", label: "Getting there heading" },
    gettingThere: { type: "textarea", label: "Getting there note" },
    gettingThereLabel: { type: "text", label: "Getting there link text", metadata: { help: "Leave blank to hide it." } },
    gettingThereHref: { type: "text", label: "Getting there link" },
  },
  defaultProps: {
    eyebrow: "Visit Riverbend presents",
    name: "Bend in the River Music Festival",
    headingLevel: "h2",
    dates: "June 12–14, 2026",
    venue: "Waterfront Park, Riverbend",
    intro: "Three nights, three stages and forty acts on the lawn where the river turns. Bring a blanket, stay for the fireworks barge on Saturday.",
    imageUrl: "https://picsum.photos/seed/riverbend-festival/2000/1100",
    imageAlt: "A crowd with raised hands facing a lit outdoor stage at dusk",
    lineupHeading: "Lineup",
    days: [
      {
        label: "Friday",
        date: "June 12",
        stages: [
          { stage: "River Stage", acts: "5:30 PM | Juniper & the Ferrymen\n7:00 PM | Delta Static\n9:00 PM | The Low Water Band" },
          { stage: "Bluff Stage", acts: "5:00 PM | Riverbend Youth Jazz Ensemble\n6:30 PM | Marisol Vega\n8:15 PM | Cottonwood Choir" },
          { stage: "Porch Stage", acts: "6:00 PM | Open-string pickers' circle\n8:00 PM | Ada Pruitt (solo)" },
        ],
      },
      {
        label: "Saturday",
        date: "June 13",
        stages: [
          { stage: "River Stage", acts: "4:00 PM | Lantern Hill\n6:00 PM | The Sandbar Saints\n8:30 PM | Night Heron\n10:00 PM | Fireworks barge" },
          { stage: "Bluff Stage", acts: "3:30 PM | Kids' drum parade\n5:30 PM | Tomas Reyes Quartet\n7:45 PM | Halfmoon Revival" },
          { stage: "Porch Stage", acts: "5:00 PM | Songwriters in the round\n7:30 PM | The Quiet Pines" },
        ],
      },
      {
        label: "Sunday",
        date: "June 14",
        stages: [
          { stage: "River Stage", acts: "1:00 PM | Gospel brunch with Riverbend Mass Choir\n3:30 PM | Old Mill Stringband\n5:30 PM | Closing set: Delta Static & friends" },
          { stage: "Porch Stage", acts: "2:00 PM | Banjo workshop (all ages)\n4:00 PM | Ada Pruitt & June Calloway" },
        ],
      },
    ],
    ticketsHeading: "Tickets",
    tiers: [
      { name: "Single day", price: "$45", includes: "Lawn access for one day. Kids 12 and under free with an adult." },
      { name: "Weekend pass", price: "$110", includes: "All three days, plus re-entry and the Sunday gospel brunch." },
      { name: "River Club", price: "$260", includes: "Weekend pass, shaded deck seating, private restrooms and two drink tickets a day." },
    ],
    ticketsLabel: "Buy tickets",
    ticketsHref: "/festival/tickets",
    gettingThereHeading: "Getting there",
    gettingThere: "Free shuttles loop from the Market Street and Convention Center garages every 10 minutes from 3 PM. Bike valet is free at the Front Street gate, and accessible drop-off is at the Ferry Landing entrance.",
    gettingThereLabel: "Parking and shuttle map",
    gettingThereHref: "/festival/getting-there",
  },
  render: ({
    id,
    eyebrow,
    name,
    headingLevel,
    dates,
    venue,
    intro,
    imageUrl,
    imageAlt,
    lineupHeading,
    days,
    ticketsHeading,
    tiers,
    ticketsLabel,
    ticketsHref,
    gettingThereHeading,
    gettingThere,
    gettingThereLabel,
    gettingThereHref,
  }) => {
    const H = headingLevel || "h2";
    const SubH = childHeading[H] ?? "h3";
    const StageH = grandchildHeading[H] ?? "h4";
    const uid = id || "festival";
    const dayList = (days ?? []).filter((d) => d?.label || (d?.stages ?? []).length).slice(0, SLOTS.length);
    const tierList = (tiers ?? []).filter((t) => t?.name);
    return (
      <section className="bg-neutral-50 px-4 py-16 sm:px-6 sm:py-20 lg:px-8 lg:py-24">
        <div className="mx-auto max-w-7xl">
          <header className="relative isolate overflow-hidden rounded-3xl bg-neutral-950 px-6 pt-48 pb-10 sm:px-10 sm:pt-56 sm:pb-12 lg:px-14 lg:pt-64">
            {imageUrl ? <img src={imageUrl} alt={imageAlt || ""} className="absolute inset-0 -z-20 size-full object-cover" /> : null}
            <div aria-hidden="true" className="absolute inset-0 -z-10 bg-linear-to-t from-neutral-950 via-neutral-950/70 to-neutral-950/10" />
            {eyebrow ? <p className="text-sm font-semibold tracking-widest text-indigo-200 uppercase">{eyebrow}</p> : null}
            {name ? <H className="mt-3 max-w-3xl text-4xl font-semibold tracking-tight text-balance text-white sm:text-6xl">{name}</H> : null}
            {dates || venue ? (
              <dl className="mt-6 flex flex-col gap-3 text-base text-white sm:flex-row sm:flex-wrap sm:gap-x-8">
                {dates ? (
                  <div className="flex items-center gap-2">
                    <dt>
                      <svg aria-hidden="true" viewBox="0 0 20 20" fill="currentColor" className="size-5 text-indigo-300">
                        <path fillRule="evenodd" d="M5.75 2a.75.75 0 0 1 .75.75V4h7V2.75a.75.75 0 0 1 1.5 0V4h.25A2.75 2.75 0 0 1 18 6.75v8.5A2.75 2.75 0 0 1 15.25 18H4.75A2.75 2.75 0 0 1 2 15.25v-8.5A2.75 2.75 0 0 1 4.75 4H5V2.75A.75.75 0 0 1 5.75 2Zm-1 5.5c-.69 0-1.25.56-1.25 1.25v6.5c0 .69.56 1.25 1.25 1.25h10.5c.69 0 1.25-.56 1.25-1.25v-6.5c0-.69-.56-1.25-1.25-1.25H4.75Z" clipRule="evenodd" />
                      </svg>
                      <span className="sr-only">Dates</span>
                    </dt>
                    <dd className="font-semibold">{dates}</dd>
                  </div>
                ) : null}
                {venue ? (
                  <div className="flex items-center gap-2">
                    <dt>
                      <svg aria-hidden="true" viewBox="0 0 20 20" fill="currentColor" className="size-5 text-indigo-300">
                        <path fillRule="evenodd" d="m9.69 18.933.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 0 0 .281-.14c.186-.096.446-.24.757-.433.62-.384 1.445-.966 2.274-1.765C15.302 14.988 17 12.493 17 9A7 7 0 1 0 3 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 0 0 2.273 1.765 11.842 11.842 0 0 0 .976.544l.062.029.018.008.006.003ZM10 11.25a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5Z" clipRule="evenodd" />
                      </svg>
                      <span className="sr-only">Venue</span>
                    </dt>
                    <dd className="font-semibold">{venue}</dd>
                  </div>
                ) : null}
              </dl>
            ) : null}
            {intro ? <p className="mt-6 max-w-2xl text-lg leading-8 text-pretty text-neutral-200">{intro}</p> : null}
          </header>

          {dayList.length > 0 ? (
            <div className="mt-12 sm:mt-16">
              {lineupHeading ? <SubH className="text-2xl font-semibold tracking-tight text-neutral-950 sm:text-3xl">{lineupHeading}</SubH> : null}
              <div className="relative mt-6 flex flex-wrap gap-2">
                {dayList.map((day, d) => (
                  <input
                    key={`r-${d}`}
                    type="radio"
                    name={`${uid}-day`}
                    id={`${uid}-day-${d}`}
                    defaultChecked={d === 0}
                    className={`${SLOTS[d].peer} sr-only`}
                  />
                ))}
                {dayList.map((day, d) => (
                  <label
                    key={`l-${d}`}
                    htmlFor={`${uid}-day-${d}`}
                    className={`inline-flex min-h-11 cursor-pointer flex-col justify-center rounded-full bg-white px-5 py-2 text-left text-sm font-semibold text-neutral-800 ring-1 ring-neutral-300 transition hover:ring-neutral-500 ${SLOTS[d].tab}`}
                  >
                    <span>{day.label || `Day ${d + 1}`}</span>
                    {day.date ? <span className="text-xs font-medium opacity-80">{day.date}</span> : null}
                  </label>
                ))}
                {dayList.map((day, d) => {
                  const stages = (day.stages ?? []).filter((s) => s?.stage || s?.acts);
                  return (
                    <div key={`p-${d}`} className={`hidden w-full basis-full pt-6 ${SLOTS[d].panel}`}>
                      <p className="sr-only">
                        {day.label}
                        {day.date ? `, ${day.date}` : ""}
                      </p>
                      <div className="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3">
                        {stages.map((stage, s) => {
                          const acts = parseActs(stage.acts);
                          return (
                            <div key={`${stage.stage}-${s}`} className="rounded-2xl bg-white p-6 ring-1 ring-neutral-950/5 shadow-xs">
                              <StageH className="flex items-center gap-2 text-sm font-semibold tracking-widest text-indigo-700 uppercase">
                                <span aria-hidden="true" className="size-2 rounded-full bg-indigo-600" />
                                {stage.stage || `Stage ${s + 1}`}
                              </StageH>
                              {acts.length > 0 ? (
                                <ol role="list" className="mt-4 divide-y divide-neutral-100">
                                  {acts.map((a, k) => (
                                    <li key={`${a.act}-${k}`} className="flex items-baseline gap-4 py-3">
                                      {a.time ? <span className="w-18 shrink-0 text-sm text-neutral-600 tabular-nums">{a.time}</span> : null}
                                      <span className={`min-w-0 font-semibold text-neutral-950 ${k === acts.length - 1 ? "text-lg" : "text-base"}`}>{a.act}</span>
                                    </li>
                                  ))}
                                </ol>
                              ) : null}
                            </div>
                          );
                        })}
                      </div>
                    </div>
                  );
                })}
              </div>
            </div>
          ) : null}

          {tierList.length > 0 || gettingThere ? (
            <div className="mt-12 grid grid-cols-1 gap-6 sm:mt-16 lg:grid-cols-3 lg:gap-8">
              {tierList.length > 0 ? (
                <div className="lg:col-span-2">
                  <div className="flex flex-wrap items-end justify-between gap-4">
                    {ticketsHeading ? <SubH className="text-2xl font-semibold tracking-tight text-neutral-950 sm:text-3xl">{ticketsHeading}</SubH> : null}
                    {ticketsLabel ? (
                      <a
                        href={ticketsHref || "#"}
                        className={`inline-flex min-h-11 items-center justify-center rounded-lg bg-indigo-600 px-5 py-2.5 text-sm font-semibold text-white shadow-sm transition hover:bg-indigo-700 ${FOCUS}`}
                      >
                        {ticketsLabel}
                      </a>
                    ) : null}
                  </div>
                  <ul role="list" className="mt-6 grid grid-cols-1 gap-4 sm:grid-cols-3">
                    {tierList.map((tier, t) => (
                      <li key={`${tier.name}-${t}`} className="flex flex-col rounded-2xl bg-white p-6 ring-1 ring-neutral-950/5 shadow-xs">
                        <p className="text-sm font-semibold text-neutral-700">{tier.name}</p>
                        {tier.price ? <p className="mt-2 text-3xl font-semibold tracking-tight text-neutral-950 tabular-nums">{tier.price}</p> : null}
                        {tier.includes ? <p className="mt-3 text-sm leading-6 text-pretty text-neutral-600">{tier.includes}</p> : null}
                      </li>
                    ))}
                  </ul>
                </div>
              ) : null}
              {gettingThere ? (
                <aside className={`rounded-2xl bg-neutral-950 p-6 text-white sm:p-8 ${tierList.length > 0 ? "" : "lg:col-span-3"}`}>
                  {gettingThereHeading ? (
                    <SubH className="flex items-center gap-2 text-lg font-semibold tracking-tight">
                      <svg aria-hidden="true" viewBox="0 0 20 20" fill="currentColor" className="size-5 text-indigo-300">
                        <path d="M6.5 3c-1.051 0-2.093.04-3.125.117A1.49 1.49 0 0 0 2 4.607V10.5h9V4.606c0-.771-.59-1.43-1.375-1.489A41.568 41.568 0 0 0 6.5 3ZM2 12v2.5A1.5 1.5 0 0 0 3.5 16h.041a3 3 0 0 1 5.918 0h.791a.75.75 0 0 0 .75-.75V12H2Z" />
                        <path d="M6.5 18a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM13.25 5a.75.75 0 0 0-.75.75v8.514a3.001 3.001 0 0 1 4.893 1.44c.37-.275.61-.719.595-1.227a24.905 24.905 0 0 0-1.784-8.549A1.486 1.486 0 0 0 14.823 5H13.25ZM14.5 18a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z" />
                      </svg>
                      {gettingThereHeading}
                    </SubH>
                  ) : null}
                  <p className="mt-3 text-base leading-7 text-pretty text-neutral-300">{gettingThere}</p>
                  {gettingThereLabel ? (
                    <a
                      href={gettingThereHref || "#"}
                      className="group mt-4 inline-flex min-h-11 items-center gap-1.5 rounded-sm text-sm font-semibold text-white underline decoration-neutral-500 underline-offset-4 hover:decoration-white focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white"
                    >
                      {gettingThereLabel}
                      <svg aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" className="size-4 transition group-hover:translate-x-0.5">
                        <path fillRule="evenodd" d={ARROW} clipRule="evenodd" />
                      </svg>
                    </a>
                  ) : null}
                </aside>
              ) : null}
            </div>
          ) : null}
        </div>
      </section>
    );
  },
};
```
