Docs: reconcile agent, developer and module docs with the code

- AGENT.md, skills, PROGRAMISTA, vibe, README and module pages checked
  against src/ and package.json; every mismatch fixed (consent/analytics
  loading, revalidation scope, generateStaticParams, construction gating,
  Turnstile fail modes, email/Graph, MCP, i18n, links, slug, hooks, ...)
- New pages: frontend.md, media.md, integrations.md; docs/README.md now
  indexes every page
- Main rule (plugin helps, never limits) at the top of AGENT.md,
  PROGRAMISTA.md, docs/README.md, README and the setup/plugin-gap skills;
  module pages gain a "Wyłączenie, nadpisanie, rozszerzenie" section
- README/PROGRAMISTA: stop telling projects to install packages ipal-kit
  already depends on; peer table; publish flow matches prepublishOnly
- ipal-skills: refuse --dest without a value or pointing at the project
  root (previously could delete ipal-* folders in cwd)
- docsConsistency: option keys, IPAL_* env names, relative links, README
  index, AGENT.md section refs, skill frontmatter, frontend.md helper keys,
  no `pnpm add` of own dependencies

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-10-22 17:06:52 +02:00
co-authored by Claude Opus 5.5
parent 12fbd424a5
commit 6e0f59c62b
49 changed files with 1736 additions and 605 deletions
+9 -1
View File
@@ -19,6 +19,7 @@ import { RenderRichText } from '@intecion/ipal-kit/rsc'
<RenderRichText data={page.content} className="prose prose-slate max-w-none" />
```
Propsy: `data` (puste → `null`), `className`, `converters`, `headingIds`.
`data` to pole richText z dokumentu — JUŻ zlokalizowane (Payload zwraca wartość
bieżącego locale). Zero obsługi kluczy per język, zero hardkodu `.pl`.
@@ -80,7 +81,7 @@ const items = block.tableOfContents?.show ? extractHeadings(block.content) : []
(działa bez JS); w przeglądarce link czytanej sekcji dostaje `aria-current="location"` i `classNames.linkActive`.
`classNames`: `nav`, `label`, `list`, `item`, `link`, `linkActive`; `offset` (domyślnie 0.3 wysokości ekranu);
`data-ipal="toc"`, `data-level` na pozycjach.
- `buildTableOfContentsField()` — przełącznik „Show table of contents” + lokalizowana etykieta (typ `TableOfContentsSettings`).
- `buildTableOfContentsField({ name = 'tableOfContents' })` — przełącznik „Show table of contents” + lokalizowana etykieta (typ `TableOfContentsSettings`).
Nowe pole w bloku = migracja (`pnpm payload migrate:create`).
## lexicalToMarkdown — richText → Markdown (dla AI)
@@ -116,3 +117,10 @@ Payload już ma (to edytor). Zero dodatkowych zależności.
listy, upload, relacje, horizontal rule…)
- **Rozjazd przy aktualizacji** — Payload utrzymuje konwerter, nie Ty
- **`any`** — typowane (SerializedEditorState)
## Wyłączenie, nadpisanie, rozszerzenie
- Moduł nie ma opcji w `ipalKit()` — nic nie dodaje do schematu; komponenty i funkcje używasz albo nie.
- Wygląd węzłów nadpisujesz przez `converters` (spread `defaultConverters`); id nagłówków przez `headingIds` (`levels`, `className`).
- `extractHeadings(data, { levels })` i `headingText(node)` — klocki do własnego spisu treści; `<TableOfContents>` stylujesz `classNames`, próg aktywnej sekcji — `offset`.
- `lexicalToMarkdown` nie ma opcji (obsługiwane węzły są stałe; nieznane degradują się do tekstu) — inny format wymaga własnego konwertera.