# Add the "Commencement Info" block to this P1 project

Add a Puck component from P1 Blocks (https://p1-blocks.prolificdigital.io/blocks/commencement-info) to this Pantheon Content Publisher (P1) Next.js project. Commencement ceremony schedule table with venue, ticket and livestream links, and an accessible seating note.

## Steps

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

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

/**
 * Commencement Info — the ceremony schedule as a real table, with the venue, ticket and
 * livestream links, and an accessible seating note beside it.
 * Register: `CommencementInfoBlock: commencementInfoBlock` in puck.config.tsx.
 */

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

type Ceremony = {
  ceremony: string;
  date: string;
  dateIso: string;
  time: string;
  colleges: string;
};

export type CommencementInfoProps = {
  eyebrow: string;
  heading: string;
  headingLevel: Heading;
  intro: string;
  caption: string;
  ceremonies: Ceremony[];
  venueName: string;
  venueAddress: string;
  mapLabel: string;
  mapHref: string;
  ticketsLabel: string;
  ticketsHref: string;
  ticketsNote: string;
  livestreamLabel: string;
  livestreamHref: string;
  accessibilityNote: string;
  accessibilityEmail: string;
  accessibilityPhone: string;
};

const childHeading = { h1: "h2", h2: "h3", h3: "h4", h4: "h5" } as const;
const isoPattern = /^\d{4}-\d{2}-\d{2}/;

export const commencementInfoBlock: ComponentConfig<CommencementInfoProps> = {
  label: "Commencement Info",
  fields: {
    eyebrow: { type: "text", label: "Eyebrow", metadata: { help: "Small line above the heading. 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." },
    },
    intro: { type: "textarea", label: "Intro" },
    caption: { type: "text", label: "Table caption", metadata: { help: "Names the schedule for screen reader users and sits above it." } },
    ceremonies: {
      type: "array",
      label: "Ceremonies",
      min: 1,
      max: 16,
      getItemSummary: (item) => [item?.ceremony, item?.date].filter(Boolean).join(" · ") || "Ceremony",
      defaultItemProps: { ceremony: "New ceremony", date: "Saturday, May 15", dateIso: "2027-05-15", time: "10 a.m.", colleges: "" },
      arrayFields: {
        ceremony: { type: "text", label: "Ceremony" },
        date: { type: "text", label: "Date", metadata: { help: "As it should appear, such as Friday, May 14." } },
        dateIso: { type: "text", label: "Date (YYYY-MM-DD)", metadata: { help: "For calendars and screen readers. Leave blank if the date isn't set yet." } },
        time: { type: "text", label: "Time", metadata: { help: "Such as 9 a.m. (doors 8 a.m.)." } },
        colleges: { type: "text", label: "Who walks", metadata: { help: "The colleges or degrees in this ceremony." } },
      },
    },
    venueName: { type: "text", label: "Venue name", metadata: { help: "Leave blank to hide the venue card." } },
    venueAddress: { type: "textarea", label: "Venue address" },
    mapLabel: { type: "text", label: "Map link text", metadata: { help: "Leave blank to hide it." } },
    mapHref: { type: "text", label: "Map link" },
    ticketsLabel: { type: "text", label: "Tickets link text", metadata: { help: "Leave blank to hide it." } },
    ticketsHref: { type: "text", label: "Tickets link" },
    ticketsNote: { type: "text", label: "Tickets note", metadata: { help: "One short line under the tickets button. Leave blank to hide it." } },
    livestreamLabel: { type: "text", label: "Livestream link text", metadata: { help: "Leave blank to hide it." } },
    livestreamHref: { type: "text", label: "Livestream link" },
    accessibilityNote: { type: "textarea", label: "Accessible seating note", metadata: { help: "How guests request accessible seating, interpreters or captioning. Leave blank to hide it." } },
    accessibilityEmail: { type: "text", label: "Accessibility email", metadata: { help: "Leave blank to hide it." } },
    accessibilityPhone: { type: "text", label: "Accessibility phone", metadata: { help: "Leave blank to hide it." } },
  },
  defaultProps: {
    eyebrow: "Class of 2027",
    heading: "Commencement weekend",
    headingLevel: "h2",
    intro: "Five ceremonies over two days, each about two hours. Graduates arrive 90 minutes early to line up; guests should plan for security screening at every entrance.",
    caption: "Spring 2027 commencement ceremonies",
    ceremonies: [
      { ceremony: "Graduate and doctoral hooding", date: "Friday, May 14", dateIso: "2027-05-14", time: "6 p.m.", colleges: "All master's and doctoral degrees" },
      { ceremony: "Morning ceremony", date: "Saturday, May 15", dateIso: "2027-05-15", time: "9 a.m.", colleges: "Arts and Sciences; Harlan School of Public Affairs" },
      { ceremony: "Midday ceremony", date: "Saturday, May 15", dateIso: "2027-05-15", time: "1 p.m.", colleges: "Engineering and Computing; Business" },
      { ceremony: "Afternoon ceremony", date: "Saturday, May 15", dateIso: "2027-05-15", time: "5 p.m.", colleges: "Nursing and Health Sciences; Education" },
      { ceremony: "Professional Studies ceremony", date: "Sunday, May 16", dateIso: "2027-05-16", time: "11 a.m.", colleges: "School of Professional Studies; online programs" },
    ],
    venueName: "Hollis Arena",
    venueAddress: "1200 University Avenue\nNorthfield",
    mapLabel: "Parking and directions",
    mapHref: "/maps/hollis-arena",
    ticketsLabel: "Request guest tickets",
    ticketsHref: "/commencement/tickets",
    ticketsNote: "Six free tickets per graduate. Requests close April 23.",
    livestreamLabel: "Watch the livestream",
    livestreamHref: "/commencement/live",
    accessibilityNote: "Accessible seating for guests using wheelchairs and their companions is on the floor level at Gate B, with no ticket upgrade required. ASL interpretation and live captioning are provided at every ceremony.",
    accessibilityEmail: "commencement@northfield.example.edu",
    accessibilityPhone: "(555) 555-0142",
  },
  render: ({
    id,
    eyebrow,
    heading,
    headingLevel,
    intro,
    caption,
    ceremonies,
    venueName,
    venueAddress,
    mapLabel,
    mapHref,
    ticketsLabel,
    ticketsHref,
    ticketsNote,
    livestreamLabel,
    livestreamHref,
    accessibilityNote,
    accessibilityEmail,
    accessibilityPhone,
  }) => {
    const H = headingLevel || "h2";
    const Sub = childHeading[headingLevel] || "h3";
    const list = (ceremonies ?? []).filter((c) => c?.ceremony);
    const captionId = `${id || "commencement"}-caption`;
    const hasHeader = Boolean(eyebrow || heading || intro);
    const hasAside = Boolean(venueName || ticketsLabel || livestreamLabel || accessibilityNote);

    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">
          {hasHeader ? (
            <div className="max-w-3xl">
              {eyebrow ? (
                <p className="inline-flex items-center gap-2 text-sm font-semibold tracking-wide text-indigo-700 uppercase">
                  <svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" className="size-5">
                    <path strokeLinecap="round" strokeLinejoin="round" d="M4.26 10.147a60.438 60.438 0 0 0-.491 6.347A48.62 48.62 0 0 1 12 20.904a48.62 48.62 0 0 1 8.232-4.41 60.46 60.46 0 0 0-.491-6.347m-15.482 0a50.636 50.636 0 0 0-2.658-.813A59.906 59.906 0 0 1 12 3.493a59.903 59.903 0 0 1 10.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0 1 12 13.489a50.702 50.702 0 0 1 7.74-3.342M6.75 15a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm0 0v-3.675A55.378 55.378 0 0 1 12 8.443m-7.007 11.55A5.981 5.981 0 0 0 6.75 15.75v-1.5" />
                  </svg>
                  {eyebrow}
                </p>
              ) : null}
              {heading ? (
                <H className={`text-3xl font-semibold tracking-tight text-balance text-neutral-950 sm:text-4xl lg:text-5xl ${eyebrow ? "mt-3" : ""}`}>{heading}</H>
              ) : null}
              {intro ? <p className="mt-5 text-lg leading-8 text-pretty text-neutral-600">{intro}</p> : null}
            </div>
          ) : null}

          <div className={`grid grid-cols-1 gap-10 lg:grid-cols-12 lg:gap-12 ${hasHeader ? "mt-10 sm:mt-14" : ""}`}>
            {list.length ? (
              <div className={hasAside ? "lg:col-span-8" : "lg:col-span-12"}>
                <div
                  role="region"
                  aria-labelledby={captionId}
                  tabIndex={0}
                  className="relative overflow-x-auto rounded-2xl ring-1 ring-neutral-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
                >
                  <table className="w-full min-w-xl border-collapse text-left">
                    <caption id={captionId} className="border-b border-neutral-200 bg-neutral-50 px-5 py-4 text-left text-sm font-semibold text-neutral-900">
                      {caption || "Commencement schedule"}
                    </caption>
                    <thead>
                      <tr className="border-b border-neutral-200">
                        <th scope="col" className="px-5 py-3 text-xs font-semibold tracking-wide text-neutral-600 uppercase">
                          Date
                        </th>
                        <th scope="col" className="px-5 py-3 text-xs font-semibold tracking-wide text-neutral-600 uppercase">
                          Time
                        </th>
                        <th scope="col" className="px-5 py-3 text-xs font-semibold tracking-wide text-neutral-600 uppercase">
                          Ceremony
                        </th>
                      </tr>
                    </thead>
                    <tbody className="divide-y divide-neutral-200">
                      {list.map((c, i) => {
                        const iso = isoPattern.test(c.dateIso || "") ? c.dateIso.slice(0, 10) : "";
                        return (
                          <tr key={`${c.ceremony}-${i}`} className="align-top">
                            <td className="px-5 py-4 text-sm font-medium whitespace-nowrap text-neutral-950">
                              {iso ? <time dateTime={iso}>{c.date || iso}</time> : c.date || "TBA"}
                            </td>
                            <td className="px-5 py-4 text-sm whitespace-nowrap text-neutral-950 tabular-nums">{c.time || "TBA"}</td>
                            <th scope="row" className="px-5 py-4 text-left font-normal">
                              <span className="block text-base font-semibold text-neutral-950">{c.ceremony}</span>
                              {c.colleges ? <span className="mt-1 block text-sm leading-6 text-pretty text-neutral-600">{c.colleges}</span> : null}
                            </th>
                          </tr>
                        );
                      })}
                    </tbody>
                  </table>
                </div>
              </div>
            ) : null}

            {hasAside ? (
              <aside aria-label="Venue, tickets and accessibility" className={`space-y-4 ${list.length ? "lg:col-span-4" : "lg:col-span-12"}`}>
                {venueName ? (
                  <div className="rounded-2xl bg-neutral-950 p-6 text-white sm:p-7">
                    <p className="text-xs font-semibold tracking-wide text-indigo-300 uppercase">Venue</p>
                    <Sub className="mt-2 text-2xl font-semibold tracking-tight">{venueName}</Sub>
                    {venueAddress ? <p className="mt-2 text-sm leading-6 whitespace-pre-line text-neutral-300">{venueAddress}</p> : null}
                    {mapLabel ? (
                      <a
                        href={mapHref || "#"}
                        className="mt-4 inline-flex min-h-11 items-center gap-1.5 rounded-md 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"
                      >
                        <svg aria-hidden="true" viewBox="0 0 20 20" fill="currentColor" className="size-4 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>
                        {mapLabel}
                      </a>
                    ) : null}
                  </div>
                ) : null}

                {ticketsLabel || livestreamLabel ? (
                  <div className="rounded-2xl p-6 ring-1 ring-neutral-200 sm:p-7">
                    <div className="flex flex-col gap-3">
                      {ticketsLabel ? (
                        <a
                          href={ticketsHref || "#"}
                          className="inline-flex min-h-11 items-center justify-center gap-2 rounded-lg bg-indigo-600 px-5 py-3 text-base font-semibold text-white shadow-sm transition hover:bg-indigo-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
                        >
                          <svg aria-hidden="true" viewBox="0 0 20 20" fill="currentColor" className="size-5">
                            <path fillRule="evenodd" d="M13 3v1.27a.75.75 0 0 0 1.5 0V3h2.25A2.25 2.25 0 0 1 19 5.25v2.628a.75.75 0 0 1-.5.707 1.5 1.5 0 0 0 0 2.83c.3.106.5.39.5.707v2.628A2.25 2.25 0 0 1 16.75 17H14.5v-1.27a.75.75 0 0 0-1.5 0V17H3.25A2.25 2.25 0 0 1 1 14.75v-2.628c0-.318.2-.601.5-.707a1.5 1.5 0 0 0 0-2.83.75.75 0 0 1-.5-.707V5.25A2.25 2.25 0 0 1 3.25 3H13Zm1.5 4.396a.75.75 0 0 0-1.5 0v1.042a.75.75 0 0 0 1.5 0V7.396Zm0 4.167a.75.75 0 0 0-1.5 0v1.041a.75.75 0 0 0 1.5 0v-1.041Z" clipRule="evenodd" />
                          </svg>
                          {ticketsLabel}
                        </a>
                      ) : null}
                      {livestreamLabel ? (
                        <a
                          href={livestreamHref || "#"}
                          className="inline-flex min-h-11 items-center justify-center gap-2 rounded-lg bg-white px-5 py-3 text-base font-semibold text-neutral-950 ring-1 ring-neutral-300 transition ring-inset hover:bg-neutral-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
                        >
                          <svg aria-hidden="true" viewBox="0 0 20 20" fill="currentColor" className="size-5 text-indigo-600">
                            <path d="M3.25 4A2.25 2.25 0 0 0 1 6.25v7.5A2.25 2.25 0 0 0 3.25 16h7.5A2.25 2.25 0 0 0 13 13.75v-7.5A2.25 2.25 0 0 0 10.75 4h-7.5ZM19 4.75a.75.75 0 0 0-1.28-.53l-3 3a.75.75 0 0 0-.22.53v4.5c0 .199.079.39.22.53l3 3a.75.75 0 0 0 1.28-.53V4.75Z" />
                          </svg>
                          {livestreamLabel}
                        </a>
                      ) : null}
                    </div>
                    {ticketsNote ? <p className="mt-4 text-sm leading-6 text-pretty text-neutral-600">{ticketsNote}</p> : null}
                  </div>
                ) : null}

                {accessibilityNote ? (
                  <div className="rounded-2xl bg-indigo-50 p-6 ring-1 ring-indigo-600/15 sm:p-7">
                    <p className="flex items-center gap-2 text-sm font-semibold text-indigo-900">
                      <svg aria-hidden="true" viewBox="0 0 24 24" fill="currentColor" className="size-5 text-indigo-700">
                        <circle cx="12" cy="4" r="2" />
                        <path d="M19 9.25a1 1 0 0 0-1-1H6a1 1 0 0 0 0 2h4v3.2l-2.9 6.6a1 1 0 1 0 1.83.8L11.6 15h.8l2.67 5.85a1 1 0 0 0 1.83-.8L14 13.45v-3.2h4a1 1 0 0 0 1-1Z" />
                      </svg>
                      Accessible seating and services
                    </p>
                    <p className="mt-3 text-sm leading-6 text-pretty text-neutral-800">{accessibilityNote}</p>
                    {accessibilityEmail || accessibilityPhone ? (
                      <p className="mt-2 flex flex-col items-start text-sm font-semibold">
                        {accessibilityEmail ? (
                          <a
                            href={`mailto:${accessibilityEmail}`}
                            className="inline-flex min-h-11 max-w-full items-center rounded-md break-all text-indigo-800 underline decoration-indigo-300 underline-offset-4 hover:text-indigo-950 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
                          >
                            {accessibilityEmail}
                          </a>
                        ) : null}
                        {accessibilityPhone ? (
                          <a
                            href={`tel:${accessibilityPhone.replace(/[^0-9+]/g, "")}`}
                            className="inline-flex min-h-11 items-center rounded-md text-indigo-800 underline decoration-indigo-300 underline-offset-4 hover:text-indigo-950 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
                          >
                            {accessibilityPhone}
                          </a>
                        ) : null}
                      </p>
                    ) : null}
                  </div>
                ) : null}
              </aside>
            ) : null}
          </div>
        </div>
      </section>
    );
  },
};
```
