# Add the "Board List" block to this P1 project

Add a Puck component from P1 Blocks (https://p1-blocks.prolificdigital.io/blocks/board-list) to this Pantheon Content Publisher (P1) Next.js project. Compact board of directors roster with officers first, professional affiliations and an executive staff subsection.

## Steps

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

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

/**
 * Board List — a compact, text-only roster of your board of directors (officers listed
 * first) with each member's professional affiliation, plus an executive staff subsection.
 * Register: `BoardListBlock: boardListBlock` in puck.config.tsx.
 */

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

export type BoardListProps = {
  heading: string;
  headingLevel: Heading;
  intro: string;
  officersLabel: string;
  directorsLabel: string;
  members: { name: string; role: string; affiliation: string; officer: boolean }[];
  staffLabel: string;
  staff: { name: string; title: string; email: string }[];
  footnote: string;
};

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

const initials = (name: string) =>
  name
    .split(/\s+/)
    .filter((w) => /^[A-Za-zÀ-ÿ]/.test(w))
    .slice(0, 2)
    .map((w) => w[0])
    .join("")
    .toUpperCase();

export const boardListBlock: ComponentConfig<BoardListProps> = {
  label: "Board List",
  fields: {
    heading: { type: "textarea", 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" },
    officersLabel: { type: "text", label: "Officers heading", metadata: { help: "Like Officers. Members marked as officers are listed first under it." } },
    directorsLabel: { type: "text", label: "Directors heading", metadata: { help: "Like Directors. Everyone not marked as an officer." } },
    members: {
      type: "array",
      label: "Board members",
      min: 1,
      max: 40,
      getItemSummary: (item) => [item?.name, item?.officer ? item?.role : ""].filter(Boolean).join(" · ") || "Member",
      defaultItemProps: { name: "New member", role: "Director", affiliation: "", officer: false },
      arrayFields: {
        name: { type: "text", label: "Name" },
        role: { type: "text", label: "Board role", metadata: { help: "Like Chair, Treasurer or Director." } },
        affiliation: { type: "text", label: "Affiliation", metadata: { help: "Their job and organization, like Partner, Ridgeway Legal. Leave blank to hide it." } },
        officer: {
          type: "radio",
          label: "Officer",
          options: [
            { label: "Yes", value: true },
            { label: "No", value: false },
          ],
          metadata: { help: "Officers are listed first, in the order you add them." },
        },
      },
    },
    staffLabel: { type: "text", label: "Staff heading", metadata: { help: "Like Executive staff. Leave blank and remove all staff to hide the section." } },
    staff: {
      type: "array",
      label: "Executive staff",
      min: 0,
      max: 12,
      getItemSummary: (item) => item?.name || "Staff member",
      defaultItemProps: { name: "New staff member", title: "Director of Programs", email: "" },
      arrayFields: {
        name: { type: "text", label: "Name" },
        title: { type: "text", label: "Title" },
        email: { type: "text", label: "Email", metadata: { help: "Optional. Shown as a mail link." } },
      },
    },
    footnote: { type: "textarea", label: "Footnote", metadata: { help: "Board terms, how to nominate someone, or where meeting minutes live." } },
  },
  defaultProps: {
    heading: "Board of directors",
    headingLevel: "h2",
    intro: "Larkspur Valley Food Bank is governed by a volunteer board of neighbors who serve three-year terms and give their time without pay.",
    officersLabel: "Officers",
    directorsLabel: "Directors",
    members: [
      { name: "Marisol Ochoa", role: "Chair", affiliation: "Operations Director, Valley Regional Hospital", officer: true },
      { name: "David Kim", role: "Vice Chair", affiliation: "Owner, Kim Family Farms", officer: true },
      { name: "Renée Whitfield", role: "Treasurer", affiliation: "CPA, Whitfield & Lowe", officer: true },
      { name: "Thomas Brennan", role: "Secretary", affiliation: "Retired principal, Larkspur Unified", officer: true },
      { name: "Aisha Bello", role: "Director", affiliation: "Attorney, Ridgeway Legal Aid", officer: false },
      { name: "Gabriel Ruiz", role: "Director", affiliation: "Logistics Manager, Northline Freight", officer: false },
      { name: "Helen Park", role: "Director", affiliation: "Pastor, Grace Community Church", officer: false },
      { name: "Jamal Carter", role: "Director", affiliation: "Former client and community organizer", officer: false },
      { name: "Linnea Sorensen", role: "Director", affiliation: "VP Marketing, Cascade Credit Union", officer: false },
    ],
    staffLabel: "Executive staff",
    staff: [
      { name: "Patricia Nguyen", title: "Executive Director", email: "pnguyen@larkspurfood.org" },
      { name: "Owen Hartley", title: "Director of Operations", email: "ohartley@larkspurfood.org" },
      { name: "Camila Duarte", title: "Director of Development", email: "cduarte@larkspurfood.org" },
    ],
    footnote: "Board meetings are held the second Tuesday of each odd month and are open to the public. To suggest a board candidate, email board@larkspurfood.org.",
  },
  render: ({ id, heading, headingLevel, intro, officersLabel, directorsLabel, members, staffLabel, staff, footnote }) => {
    const H = headingLevel || "h2";
    const Sub = childHeading[H] ?? "h3";
    const all = (members ?? []).filter((m) => m?.name);
    const officers = all.filter((m) => m.officer);
    const directors = all.filter((m) => !m.officer);
    const team = (staff ?? []).filter((s) => s?.name);
    const uid = id || "board";

    const groups = [
      { key: "officers", label: officersLabel, people: officers, emphasis: true },
      { key: "directors", label: directorsLabel, people: directors, emphasis: false },
    ].filter((g) => g.people.length);

    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 grid max-w-7xl grid-cols-1 gap-10 lg:grid-cols-12 lg:gap-16">
          <div className="lg:col-span-4">
            <div className="lg:sticky lg:top-8">
              {heading ? <H className="text-3xl font-semibold tracking-tight text-balance text-neutral-950 sm:text-4xl">{heading}</H> : null}
              {intro ? <p className="mt-4 text-lg leading-8 text-pretty text-neutral-600">{intro}</p> : null}
              {footnote ? <p className="mt-6 border-l-2 border-indigo-600 pl-4 text-sm leading-6 text-pretty text-neutral-600">{footnote}</p> : null}
            </div>
          </div>

          <div className="space-y-12 lg:col-span-8">
            {groups.map((g) => {
              const labelId = `${uid}-${g.key}`;
              return (
                <div key={g.key}>
                  {g.label ? (
                    <Sub id={labelId} className="flex items-center gap-3 text-sm font-semibold tracking-wide text-neutral-950 uppercase">
                      {g.label}
                      <span className="rounded-full bg-neutral-100 px-2 py-0.5 text-xs font-medium text-neutral-600 tabular-nums">{g.people.length}</span>
                    </Sub>
                  ) : null}
                  <ul role="list" aria-labelledby={g.label ? labelId : undefined} className={`grid grid-cols-1 border-t border-neutral-200 sm:grid-cols-2 sm:gap-x-8 ${g.label ? "mt-4" : ""}`}>
                    {g.people.map((m, i) => (
                      <li key={`${m.name}-${i}`} className="flex items-start gap-4 border-b border-neutral-200 py-4">
                        {g.emphasis ? (
                          <span aria-hidden="true" className="grid size-10 shrink-0 place-items-center rounded-full bg-indigo-50 text-sm font-semibold text-indigo-700 ring-1 ring-indigo-600/15 ring-inset">
                            {initials(m.name)}
                          </span>
                        ) : null}
                        <div className="min-w-0">
                          <p className="flex flex-wrap items-baseline gap-x-2 gap-y-0.5">
                            <span className="font-semibold text-neutral-950">{m.name}</span>
                            {m.role && (g.emphasis || m.role.toLowerCase() !== "director") ? (
                              <span className={`text-sm font-medium ${g.emphasis ? "text-indigo-700" : "text-neutral-600"}`}>{m.role}</span>
                            ) : null}
                          </p>
                          {m.affiliation ? <p className="mt-0.5 text-sm leading-6 break-words text-neutral-600">{m.affiliation}</p> : null}
                        </div>
                      </li>
                    ))}
                  </ul>
                </div>
              );
            })}

            {team.length ? (
              <div className="rounded-2xl bg-neutral-50 p-6 ring-1 ring-neutral-200 sm:p-8">
                {staffLabel ? (
                  <Sub id={`${uid}-staff`} className="text-sm font-semibold tracking-wide text-neutral-950 uppercase">
                    {staffLabel}
                  </Sub>
                ) : null}
                <ul role="list" aria-labelledby={staffLabel ? `${uid}-staff` : undefined} className={`grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 ${staffLabel ? "mt-5" : ""}`}>
                  {team.map((s, i) => (
                    <li key={`${s.name}-${i}`} className="min-w-0">
                      <p className="font-semibold text-neutral-950">{s.name}</p>
                      {s.title ? <p className="text-sm text-neutral-600">{s.title}</p> : null}
                      {s.email ? (
                        <a
                          href={`mailto:${s.email}`}
                          className="mt-1 inline-flex min-h-11 max-w-full items-center text-sm font-medium break-all text-indigo-700 underline decoration-indigo-300 underline-offset-4 hover:decoration-indigo-700 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
                        >
                          {s.email}
                        </a>
                      ) : null}
                    </li>
                  ))}
                </ul>
              </div>
            ) : null}
          </div>
        </div>
      </section>
    );
  },
};
```
