# Add the "Call for Artists" block to this P1 project

Add a Puck component from P1 Blocks (https://p1-blocks.prolificdigital.io/blocks/call-for-artists) to this Pantheon Content Publisher (P1) Next.js project. Poster-style open call with deadline stamp, fee, eligibility, jurors, prizes, materials checklist, timeline and submit link.

## Steps

1. Create `components/puck/call-for-artists-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 { callForArtistsBlock } from "./components/puck/call-for-artists-block";`
3. Register it under `components` as `CallForArtistsBlock: callForArtistsBlock`.
4. Add `"CallForArtistsBlock"` 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/call-for-artists-block.tsx`

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

/**
 * Call for Artists — an open call set like an exhibition poster: monumental title, a deadline
 * stamp with a machine-readable date, entry fee, eligibility, juror(s), prizes and stipends,
 * a required-materials checklist, a dated timeline and a submit link.
 * Register: `CallForArtistsBlock: callForArtistsBlock` in puck.config.tsx.
 */

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

export type CallForArtistsProps = {
  eyebrow: string;
  title: string;
  headingLevel: Heading;
  intro: string;
  deadlineText: string;
  deadlineIso: string;
  deadlineTime: string;
  fee: string;
  eligibility: string;
  prizes: { amount: string; label: string }[];
  jurors: { name: string; role: string }[];
  materials: string;
  timeline: { dateText: string; isoDate: string; label: string }[];
  submitLabel: string;
  submitHref: string;
  questions: string;
};

const SUB = { h1: "h2", h2: "h3", h3: "h4", h4: "h5" } as const;
const ring = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600";
const sectionLabel = "border-b border-neutral-950 pb-3 text-xs font-semibold tracking-widest text-neutral-950 uppercase";

const isoOf = (s: string) => {
  const m = /^(\d{4})-(\d{2})-(\d{2})/.exec(s || "");
  return m ? `${m[1]}-${m[2]}-${m[3]}` : "";
};
const lines = (s: string) => (s || "").split("\n").map((l) => l.trim()).filter(Boolean);

export const callForArtistsBlock: ComponentConfig<CallForArtistsProps> = {
  label: "Call for Artists",
  fields: {
    eyebrow: { type: "text", label: "Eyebrow", metadata: { help: "Like Open call. Leave blank to hide it." } },
    title: { type: "text", label: "Title", metadata: { help: "The name of the exhibition or opportunity." } },
    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", metadata: { help: "Leave blank to hide it." } },
    deadlineText: { type: "text", label: "Deadline", metadata: { help: "As people should read it, like January 15, 2027." } },
    deadlineIso: { type: "text", label: "Deadline (YYYY-MM-DD)", metadata: { help: "Like 2027-01-15. Lets search engines and calendars read the date." } },
    deadlineTime: { type: "text", label: "Deadline time", metadata: { help: "Like 11:59 p.m. Central. Leave blank to hide it." } },
    fee: { type: "text", label: "Entry fee", metadata: { help: "Write it out, like No entry fee, or $25 per artist." } },
    eligibility: { type: "textarea", label: "Eligibility", metadata: { help: "One requirement per line." } },
    prizes: {
      type: "array",
      label: "Prizes and stipends",
      min: 0,
      max: 6,
      getItemSummary: (item) => [item?.amount, item?.label].filter(Boolean).join(" · ") || "Prize",
      defaultItemProps: { amount: "$500", label: "Honorable mention" },
      arrayFields: {
        amount: { type: "text", label: "Amount", metadata: { help: "Shown large, like $5,000." } },
        label: { type: "text", label: "Description" },
      },
    },
    jurors: {
      type: "array",
      label: "Jurors",
      min: 0,
      max: 4,
      getItemSummary: (item) => item?.name || "Juror",
      defaultItemProps: { name: "Juror name", role: "" },
      arrayFields: {
        name: { type: "text", label: "Name" },
        role: { type: "text", label: "Title and institution" },
      },
    },
    materials: { type: "textarea", label: "Required materials", metadata: { help: "One item per line. Shown as a checklist." } },
    timeline: {
      type: "array",
      label: "Timeline",
      min: 0,
      max: 8,
      getItemSummary: (item) => [item?.dateText, item?.label].filter(Boolean).join(": ") || "Date",
      defaultItemProps: { dateText: "March 1, 2027", isoDate: "2027-03-01", label: "Milestone" },
      arrayFields: {
        dateText: { type: "text", label: "Date" },
        isoDate: { type: "text", label: "Date (YYYY-MM-DD)", metadata: { help: "Optional. Lets calendars read the date." } },
        label: { type: "text", label: "What happens" },
      },
    },
    submitLabel: { type: "text", label: "Submit button text", metadata: { help: "Leave blank to hide it." } },
    submitHref: { type: "text", label: "Submit link", metadata: { help: "Your submission form or portal." } },
    questions: { type: "text", label: "Questions line", metadata: { help: "Like Questions? Email artists@… Leave blank to hide it." } },
  },
  defaultProps: {
    eyebrow: "Open call · Regional biennial",
    title: "Ground Truth: The 2027 Upper River Biennial",
    headingLevel: "h2",
    intro: "The Halvorsen invites artists living in the Upper Mississippi watershed to submit work for our fourth regional biennial, opening in June 2027. Any medium. Any career stage. We pay every artist we show.",
    deadlineText: "January 15, 2027",
    deadlineIso: "2027-01-15",
    deadlineTime: "11:59 p.m. Central",
    fee: "No entry fee",
    eligibility: "Artists 18 and older living in Minnesota, Wisconsin, Iowa or Illinois\nWork made in the last three years\nUp to five works per artist, in any medium\nCollaboratives and collectives are welcome to apply as one entry",
    prizes: [
      { amount: "$10,000", label: "Halvorsen Purchase Prize; the work enters the permanent collection" },
      { amount: "$1,500", label: "Artist fee paid to every artist in the exhibition" },
      { amount: "$2,500", label: "Two emerging-artist awards" },
    ],
    jurors: [
      { name: "Odalys Fenwick-Baptiste", role: "Chief Curator, Lakeshore Center for Contemporary Art" },
      { name: "Henrik Aaltonen", role: "Artist and Professor of Sculpture, Northfield College" },
      { name: "Signe Arneson", role: "Curator of Contemporary Art, Halvorsen Museum of Art" },
    ],
    materials: "Up to five images or video links, one per work\nTitle, year, medium and dimensions for each work\nArtist statement, 300 words or fewer\nShort CV or bio, two pages or fewer\nProof of residence, like a utility bill or lease",
    timeline: [
      { dateText: "October 15, 2026", isoDate: "2026-10-15", label: "Submissions open" },
      { dateText: "December 3, 2026", isoDate: "2026-12-03", label: "Free portfolio review night, 5–8 p.m." },
      { dateText: "January 15, 2027", isoDate: "2027-01-15", label: "Deadline" },
      { dateText: "March 1, 2027", isoDate: "2027-03-01", label: "Artists notified by email" },
      { dateText: "June 12, 2027", isoDate: "2027-06-12", label: "Exhibition opens" },
    ],
    submitLabel: "Submit your work",
    submitHref: "/open-call/submit",
    questions: "Questions? Email artists@halvorsen.example.org or call 555-0157.",
  },
  render: ({ eyebrow, title, headingLevel, intro, deadlineText, deadlineIso, deadlineTime, fee, eligibility, prizes, jurors, materials, timeline, submitLabel, submitHref, questions }) => {
    const H = headingLevel || "h2";
    const Sub = SUB[H] ?? "h3";
    const deadline = isoOf(deadlineIso);
    const eligible = lines(eligibility);
    const materialList = lines(materials);
    const prizeList = (prizes ?? []).filter((p) => p?.amount || p?.label);
    const jurorList = (jurors ?? []).filter((j) => j?.name);
    const dates = (timeline ?? []).filter((t) => t?.dateText || t?.label);

    const submitButton = submitLabel ? (
      <a href={submitHref || "#"} className={`inline-flex min-h-12 items-center justify-center gap-2 bg-indigo-600 px-7 text-base font-semibold text-white transition hover:bg-indigo-700 motion-reduce:transition-none ${ring}`}>
        {submitLabel}
        <svg aria-hidden="true" viewBox="0 0 20 20" fill="currentColor" className="size-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;

    return (
      <section className="overflow-hidden 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 grid-cols-1 gap-10 lg:grid-cols-12 lg:items-start lg:gap-12">
            <div className="lg:col-span-8">
              {eyebrow ? (
                <p className="flex items-center gap-3 text-xs font-semibold tracking-widest text-indigo-700 uppercase">
                  <span aria-hidden="true" className="size-2 rounded-full bg-indigo-600" />
                  {eyebrow}
                </p>
              ) : null}
              {title ? <H className={`${eyebrow ? "mt-5" : ""} font-serif text-5xl leading-none font-normal tracking-tight text-balance break-words text-neutral-950 sm:text-7xl lg:text-8xl`}>{title}</H> : null}
              {intro ? <p className="mt-8 max-w-2xl text-lg leading-8 text-pretty text-neutral-600">{intro}</p> : null}
            </div>

            {deadlineText || fee ? (
              <div className="lg:col-span-4 lg:pt-10">
                {deadlineText ? (
                  <div className="border-2 border-neutral-950 bg-white p-6 sm:max-w-sm lg:-rotate-2">
                    <p className="text-xs font-semibold tracking-widest text-neutral-950 uppercase">Deadline</p>
                    <p className="mt-3 font-serif text-4xl leading-none tracking-tight text-indigo-700 sm:text-5xl">
                      {deadline ? <time dateTime={deadline}>{deadlineText}</time> : deadlineText}
                    </p>
                    {deadlineTime ? <p className="mt-3 text-sm font-medium text-neutral-950">{deadlineTime}</p> : null}
                  </div>
                ) : null}
                {fee ? (
                  <p className="mt-6 inline-flex items-center gap-2 border-b border-neutral-950 pb-1 font-serif text-2xl text-neutral-950 italic">
                    {fee}
                  </p>
                ) : null}
                {submitButton ? <div className="mt-8">{submitButton}</div> : null}
              </div>
            ) : null}
          </div>

          {prizeList.length ? (
            <div className="mt-16 lg:mt-24">
              <Sub className={sectionLabel}>Prizes &amp; stipends</Sub>
              <ul role="list" className="grid grid-cols-1 divide-y divide-neutral-200 sm:grid-cols-3 sm:divide-x sm:divide-y-0">
                {prizeList.map((p, i) => (
                  <li key={`${p.amount}-${i}`} className="py-6 sm:px-6 sm:py-8 sm:first:pl-0">
                    {p.amount ? <p className="font-serif text-5xl leading-none tracking-tight text-neutral-950 tabular-nums lg:text-6xl">{p.amount}</p> : null}
                    {p.label ? <p className="mt-3 max-w-xs text-sm leading-6 text-pretty text-neutral-600">{p.label}</p> : null}
                  </li>
                ))}
              </ul>
            </div>
          ) : null}

          <div className="mt-14 grid grid-cols-1 gap-14 lg:mt-20 lg:grid-cols-3 lg:gap-12">
            {eligible.length ? (
              <div>
                <Sub className={sectionLabel}>Who can apply</Sub>
                <ul role="list" className="mt-5 space-y-3">
                  {eligible.map((e, i) => (
                    <li key={`${e}-${i}`} className="flex gap-3 text-base leading-7 text-neutral-800">
                      <span aria-hidden="true" className="mt-3 h-px w-4 shrink-0 bg-indigo-600" />
                      {e}
                    </li>
                  ))}
                </ul>
              </div>
            ) : null}

            {materialList.length ? (
              <div>
                <Sub className={sectionLabel}>What to submit</Sub>
                <ul role="list" className="mt-5 space-y-3">
                  {materialList.map((m, i) => (
                    <li key={`${m}-${i}`} className="flex gap-3 text-base leading-7 text-neutral-800">
                      <svg aria-hidden="true" viewBox="0 0 20 20" className="mt-1 size-5 shrink-0">
                        <rect x="1.5" y="1.5" width="17" height="17" fill="none" strokeWidth="1.5" className="stroke-neutral-950" />
                        <path d="M5.5 10.5l3 3 6-7" fill="none" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="stroke-indigo-600" />
                      </svg>
                      {m}
                    </li>
                  ))}
                </ul>
              </div>
            ) : null}

            {jurorList.length ? (
              <div>
                <Sub className={sectionLabel}>{jurorList.length === 1 ? "Juror" : "Jurors"}</Sub>
                <ul role="list" className="mt-2 divide-y divide-neutral-200">
                  {jurorList.map((j, i) => (
                    <li key={`${j.name}-${i}`} className="py-4">
                      <p className="font-serif text-xl leading-snug text-neutral-950">{j.name}</p>
                      {j.role ? <p className="mt-1 text-sm leading-6 text-neutral-600">{j.role}</p> : null}
                    </li>
                  ))}
                </ul>
              </div>
            ) : null}
          </div>

          {dates.length ? (
            <div className="mt-16 lg:mt-24">
              <Sub className={sectionLabel}>Timeline</Sub>
              <ol role="list" className="relative mt-8 grid grid-cols-1 gap-8 sm:grid-cols-2 lg:grid-cols-5 lg:gap-6">
                {dates.map((t, i) => {
                  const iso = isoOf(t.isoDate);
                  const isDeadline = deadline && iso === deadline;
                  return (
                    <li key={`${t.label}-${i}`} className="relative border-l border-neutral-950 pl-4 lg:border-t lg:border-l-0 lg:pt-5 lg:pl-0">
                      <span aria-hidden="true" className={`absolute top-1 -left-1.5 size-3 rounded-full lg:-top-1.5 lg:left-0 ${isDeadline ? "bg-indigo-600" : "border border-neutral-950 bg-white"}`} />
                      <p className="text-sm font-semibold text-neutral-950 tabular-nums">{iso ? <time dateTime={iso}>{t.dateText}</time> : t.dateText}</p>
                      <p className={`mt-1 font-serif text-lg leading-snug text-pretty ${isDeadline ? "text-indigo-700 italic" : "text-neutral-800"}`}>{t.label}</p>
                    </li>
                  );
                })}
              </ol>
            </div>
          ) : null}

          {questions || (submitButton && !(deadlineText || fee)) ? (
            <div className="mt-16 flex flex-col gap-4 border-t border-neutral-950 pt-8 sm:flex-row sm:items-center sm:gap-8">
              {!(deadlineText || fee) ? submitButton : null}
              {questions ? <p className="text-sm leading-6 break-words text-neutral-600">{questions}</p> : null}
            </div>
          ) : null}
        </div>
      </section>
    );
  },
};
```
