A third settings mode next to 'inline' and 'modal': a large dialog where every consent category is a card with its on/off control, description and an expandable list of the cookies it covers (name, provider, purpose, duration), taken from Cookie Settings → Cookies — the same rows as <CookieTable>. The developer picks the mode with one prop; the component default stays 'inline', so existing sites are unchanged. Cookie Settings gets a localized detailLabels group (list labels, English fallback); getConsentTexts passes texts.cookies and texts.details, sharing the row mapping with getCookieTable. New classNames slots and data-ipal handles for the cards and lists. Docs for devs and agents: consent.md (modes compared, which to pick — new projects default to 'detailed' when the cookie list is filled), AGENT.md, PROGRAMISTA §2.8/§2.11/§6, skills ipal-setup, ipal-site, ipal-upgrade, ipal-locale-add, ipal-consent-check. Postgres/SQLite projects need migrate:create for the new fields. Co-Authored-By: Claude Opus 5.5 <[email protected]>
5.5 KiB
5.5 KiB
name, description
| name | description |
|---|---|
| ipal-setup | Sets up a new client project on Payload 3 + Next 16 + @intecion/ipal-kit from an empty folder with the full mandatory feature set (AGENT.md §0b) — registry and dependencies, version overrides, i18n config, payload.config with ipalKit (2FA injected, white-label, forms, mailAdapter, R2 storage), core collections, design tokens, UI primitives, proxy with Markdown negotiation, layout with JSON-LD, Turnstile and consent, catch-all page, SEO routes, GEO routes (llms.txt, llms-full.txt, Markdown, MCP), security headers, env validation. Use when starting a new website project or when a project is missing its ipal-kit foundation. |
ipal-setup
Cel: OBOWIĄZKOWY KOMPLET z AGENT.md §0b — wszystkie 18 pozycji. Wszystko
sprawdza etap 11; nie kończysz z brakami (chyba że ipal-audit-skip z decyzji klienta).
Kod i szczegóły: node_modules/@intecion/ipal-kit/docs/dev/PROGRAMISTA.md §1–2
(przed instalacją pakietu: poproś użytkownika o ten plik albo działaj wg kroków
poniżej i doczytaj po pnpm add). Reguły: docs/agent/AGENT.md.
Jeden etap = jeden commit. Nie czekasz na OK między etapami (AGENT.md §0a) — pytania o brakujące dane zbierasz w jedną listę na początku; tryb „krok po kroku” tylko, gdy użytkownik o to poprosi. Pełna budowa strony: skill ipal-site.
- Instalacja —
.npmrc(@intecion:registry=…,legacy-peer-deps=true),pnpm add @intecion/ipal-kit+ zależności z PROGRAMISTA §1 razem z@payloadcms/storage-s3i@clocklimited/payload-2fa,pnpm.overridesna wersjępayloaddla wszystkich@payloadcms/*, build z--webpack. Nigdy instalacja z gita. Nie twórzmiddleware.ts. - Skille i AGENTS.md — skopiuj skille (AGENT.md §14), w
tsconfig.json"exclude": ["node_modules", ".agents"], utwórzAGENTS.mdwg AGENT.md §13 z danymi od użytkownika (zapytaj o: klient, domena, rynek, języki, dane R2, klucze Turnstile, SMTP/Graph). - Konfiguracja —
src/i18n.config.ts(as const satisfies I18nConfig),payload.config.tswg PROGRAMISTA §2.3:twoFactorz wstrzykniętympayloadTotp,whiteLabel: true,email: mailAdapter(),forms: {…},buildR2Storage(['media'], { s3Storage })zawsze (bezR2_*w dev = dysk lokalny),indexNow: true,consentLog: true..env.examplezR2_*,IPAL_IP_HEADER,NEXT_PUBLIC_SERVER_URL,IPAL_NOINDEX(puste;1na stagingu). - Rdzeń — wspólne pola i prymitywy (
../ipal-block/resources/kod-sekcji.md),Pages(zbuildSummaryField()— GEO),MediazfocalPoint: true,normalizeFilenameHook,buildOptimizeUploadHook/buildOptimizeUploadField,buildMediaPlaceholderHook/buildMediaPlaceholderField; prymitywMediaprzezmediaImageProps/videoProps(PROGRAMISTA §2.4, storage.md). Żadnych innych kolekcji (userswstrzykuje plugin). - Style —
styles.cssz@themezDESIGN.md(jeśli brak — zapytaj o Impeccable albo załóż neutralne tokeny),fluid.csslubfluid-wide.css(AGENT §6.11a), fonty przeznext/fontzlatin-ext,@sourcena plugin (AGENT.md §6.11, przykład w../ipal-block/resources/kod-sekcji.md). - Routing —
proxy.ts(createProxy(i18nConfig, { NextResponse, markdown: true })),lib/content.ts(createContentHelperszmarkdownAlternate: true,summaryField,mcp— PROGRAMISTA §2.7), layout bez<head>:<SiteProviders shell={await getSiteShell(locale)} logEndpoint banner={<CookieBanner equalChoice settings="detailed" />}>(tryb okna ustawieńinline/modal/detailedwg designu — consent.md), catch-all:createPageRoute(content, { blocks, notFound, permanentRedirect, blockProps })+ literałrevalidate,not-found.tsx:createNotFoundPage(content, { load: loadNotFoundView })+notFoundView.tszrenderNotFoundView(PROGRAMISTA §2.6–2.8, pages.md). - SEO i bezpieczeństwo — sitemap, robots, manifest, health jako re-eksporty z
lib/content(sitemapRoute,robots,manifest,healthRoute; zforce-dynamicpoza robots; bez CSS wpublic/),htmlLimitedBots,buildSecurityHeaders,buildUploadSecurityHeaders,images: buildImagesConfig(),instrumentation.tszassertEnv(ipalEnvRules({ storage: true, ipHeader: true }))z@intecion/ipal-kit/env(PROGRAMISTA §2.8–2.9, env.md). - GEO (obowiązkowe) — re-eksporty z
lib/content:llms.txt(llmsRoute),llms-full.txt(llmsFullRoute),md/[locale]/[[...slug]]/route.ts(markdownRoute),api/mcp/route.ts(mcpGET/mcpPOST, publiczny),indexnow-key.txt/route.ts(indexNowKeyRoute); robots wpuszcza boty AI (PROGRAMISTA §2.8, AGENT.md §0b.5–8). - Formularze — skill ipal-form: blok z
<RenderForm>,formClasses.ts,createSubmitActionraz, każdy formularz z seeda (mail do firmy + potwierdzenie do klienta). Cookies: skan + import (ipal-consent-check),<CookieTable>na stronie polityki cookies; ta sama lista pokazuje się w okniesettings="detailed"(Detail labels w panelu). - Nawigacja — skill ipal-nav.
- Kontrola kompletu —
pnpm generate:types,pnpm payload generate:importmap, ipal-audit (pełny) = 0 błędów, w tym sekcja „missing: …” (§0b); popnpm build && pnpm startipal-seo-check = 0 błędów (llms, Markdown, MCP, JSON-LD). Potem lista kroków w panelu dla użytkownika (PROGRAMISTA §2.11) z kluczami Turnstile i transportem maila.
Dalej: bloki (skill ipal-block), kolekcje treści (ipal-collection).