# Add the "Student Outcomes" block to this P1 project

Add a Puck component from P1 Blocks (https://p1-blocks.prolificdigital.io/blocks/student-outcomes) to this Pantheon Content Publisher (P1) Next.js project. Career outcome figures, top employers and top graduate schools, with a source line for every number.

## Steps

1. Create `components/puck/student-outcomes-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 { studentOutcomesBlock } from "./components/puck/student-outcomes-block";`
3. Register it under `components` as `StudentOutcomesBlock: studentOutcomesBlock`.
4. Add `"StudentOutcomesBlock"` 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/student-outcomes-block.tsx`

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

/**
 * Student Outcomes — headline career numbers, top employers and top graduate schools,
 * with a required source line so every figure can be traced.
 * Register: `StudentOutcomesBlock: studentOutcomesBlock` in puck.config.tsx.
 */

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

type Metric = { value: string; label: string };

export type StudentOutcomesProps = {
  heading: string;
  headingLevel: Heading;
  intro: string;
  metrics: Metric[];
  employersHeading: string;
  employers: string;
  schoolsHeading: string;
  schools: string;
  source: string;
  ctaLabel: string;
  ctaHref: string;
};

const childHeading = { h1: "h2", h2: "h3", h3: "h4", h4: "h5" } as const;

const lines = (raw: string) =>
  (raw || "")
    .split("\n")
    .map((l) => l.trim())
    .filter(Boolean);

export const studentOutcomesBlock: ComponentConfig<StudentOutcomesProps> = {
  label: "Student Outcomes",
  fields: {
    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" },
    metrics: {
      type: "array",
      label: "Headline numbers",
      min: 1,
      max: 4,
      getItemSummary: (item) => [item?.value, item?.label].filter(Boolean).join(" ").slice(0, 48) || "Number",
      defaultItemProps: { value: "90%", label: "Describe what this number measures" },
      arrayFields: {
        value: { type: "text", label: "Number", metadata: { help: "Type it as it should appear, such as 94% or $58,200." } },
        label: { type: "textarea", label: "What it measures", metadata: { help: "Be specific: who was counted and over what time." } },
      },
    },
    employersHeading: { type: "text", label: "Employers heading" },
    employers: { type: "textarea", label: "Top employers", metadata: { help: "One employer per line. Leave blank to hide this list." } },
    schoolsHeading: { type: "text", label: "Graduate schools heading" },
    schools: { type: "textarea", label: "Top graduate schools", metadata: { help: "One school per line. Leave blank to hide this list." } },
    source: {
      type: "textarea",
      label: "Source (required)",
      metadata: { help: "Name the survey, graduating class and response or knowledge rate. Outcome numbers without a source shouldn't be published." },
    },
    ctaLabel: { type: "text", label: "Link text", metadata: { help: "Such as See outcomes by major. Leave blank to hide it." } },
    ctaHref: { type: "text", label: "Link" },
  },
  defaultProps: {
    heading: "Where Northfield graduates go",
    headingLevel: "h2",
    intro: "Every year we ask the newest graduating class what they're doing six months after commencement. Here is what the Class of 2025 told us.",
    metrics: [
      { value: "94%", label: "employed or in graduate school within six months" },
      { value: "$58,200", label: "median starting salary for full-time jobs" },
      { value: "81%", label: "completed at least one internship before graduating" },
      { value: "640", label: "employers recruited on campus during the year" },
    ],
    employersHeading: "Top employers",
    employers:
      "Meridian Health System\nCalder & Finch Engineering\nLakeshore Public Schools\nBrightwater Financial\nOstrander Analytics\nHarbor County Government\nNorthline Energy\nPrairie Valley Credit Union",
    schoolsHeading: "Top graduate schools",
    schools:
      "Northfield State University\nLakeshore University School of Law\nRidgeview College of Medicine\nWestern Plains University\nEastbrook Institute of Technology\nCarrow University",
    source: "Source: Class of 2025 First-Destination Survey, 87% knowledge rate. Sample data for illustration.",
    ctaLabel: "See outcomes by major",
    ctaHref: "/outcomes",
  },
  render: ({ heading, headingLevel, intro, metrics, employersHeading, employers, schoolsHeading, schools, source, ctaLabel, ctaHref }) => {
    const H = headingLevel || "h2";
    const Sub = childHeading[headingLevel] || "h3";
    const stats = (metrics ?? []).filter((m) => m?.value);
    const employerList = lines(employers);
    const schoolList = lines(schools);
    const hasLists = employerList.length > 0 || schoolList.length > 0;

    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">
          <div className="grid gap-12 lg:grid-cols-12 lg:gap-16">
            {heading || intro || ctaLabel ? (
              <div className="lg:col-span-5">
                {heading ? <H className="text-3xl font-semibold tracking-tight text-balance text-neutral-950 sm:text-4xl lg:text-5xl">{heading}</H> : null}
                {intro ? <p className="mt-5 text-lg leading-8 text-pretty text-neutral-600">{intro}</p> : null}
                {ctaLabel ? (
                  <a
                    href={ctaHref || "#"}
                    className="group mt-6 inline-flex min-h-11 items-center gap-1.5 rounded font-semibold 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"
                  >
                    {ctaLabel}
                    <svg aria-hidden="true" viewBox="0 0 20 20" fill="currentColor" className="size-5 transition group-hover:translate-x-0.5">
                      <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>
            ) : null}

            {stats.length ? (
              <dl className={`grid gap-x-8 gap-y-10 sm:grid-cols-2 ${heading || intro || ctaLabel ? "lg:col-span-7" : "lg:col-span-12 lg:grid-cols-4"}`}>
                {stats.map((stat, i) => (
                  <div key={`${stat.value}-${i}`} className="flex flex-col-reverse gap-3 border-t-2 border-indigo-600 pt-5">
                    <dt className="text-base leading-7 text-pretty text-neutral-600">{stat.label}</dt>
                    <dd className="text-5xl font-semibold tracking-tight text-neutral-950 tabular-nums sm:text-6xl">{stat.value}</dd>
                  </div>
                ))}
              </dl>
            ) : null}
          </div>

          {hasLists ? (
            <div className="mt-16 grid gap-6 sm:mt-20 lg:grid-cols-12 lg:gap-8">
              {employerList.length ? (
                <div className={`rounded-3xl bg-neutral-50 p-6 ring-1 ring-neutral-200 sm:p-8 ${schoolList.length ? "lg:col-span-7" : "lg:col-span-12"}`}>
                  {employersHeading ? <Sub className="text-sm font-semibold tracking-wide text-neutral-950 uppercase">{employersHeading}</Sub> : null}
                  <ul role="list" className={`grid grid-cols-1 gap-px overflow-hidden rounded-2xl bg-neutral-200 ring-1 ring-neutral-200 sm:grid-cols-2 ${employersHeading ? "mt-5" : ""} ${schoolList.length ? "" : "lg:grid-cols-4"}`}>
                    {employerList.map((name, i) => (
                      <li key={`${name}-${i}`} className="flex min-h-20 items-center justify-center bg-white px-4 py-5 text-center text-base leading-6 font-semibold tracking-tight text-balance text-neutral-800">
                        {name}
                      </li>
                    ))}
                  </ul>
                </div>
              ) : null}
              {schoolList.length ? (
                <div className={`rounded-3xl bg-neutral-50 p-6 ring-1 ring-neutral-200 sm:p-8 ${employerList.length ? "lg:col-span-5" : "lg:col-span-12"}`}>
                  {schoolsHeading ? <Sub className="text-sm font-semibold tracking-wide text-neutral-950 uppercase">{schoolsHeading}</Sub> : null}
                  <ul role="list" className={`divide-y divide-neutral-200 ${schoolsHeading ? "mt-3" : ""}`}>
                    {schoolList.map((name, i) => (
                      <li key={`${name}-${i}`} className="flex items-start gap-3 py-3.5 text-base leading-6 text-neutral-800">
                        <span aria-hidden="true" className="mt-2.5 size-1.5 shrink-0 rounded-full bg-indigo-600" />
                        {name}
                      </li>
                    ))}
                  </ul>
                </div>
              ) : null}
            </div>
          ) : null}

          {source ? (
            <p className="mt-10 flex max-w-3xl gap-2 text-sm leading-6 text-pretty text-neutral-600 sm:mt-12">
              <svg aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" className="mt-1 size-4 shrink-0 text-neutral-500">
                <path fillRule="evenodd" d="M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0ZM9 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM6.75 8a.75.75 0 0 0 0 1.5h.75v1.75a.75.75 0 0 0 1.5 0v-2.5A.75.75 0 0 0 8.25 8h-1.5Z" clipRule="evenodd" />
              </svg>
              {source}
            </p>
          ) : null}
        </div>
      </section>
    );
  },
};
```
