Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54c2d64cce | ||
|
|
e29c919e5e | ||
|
|
0f6bbd597b | ||
|
|
65437a144b | ||
|
|
e7ad64230a | ||
|
|
5af5033148 |
Vendored
+56
-56
@@ -1,74 +1,74 @@
|
|||||||
export type { AccessOption, Role } from './modules/access/index.js';
|
export { ipalKit } from './plugin.js';
|
||||||
export { adminOnly, adminOnlyField, adminOrEditor, adminOrEditorField, adminOrSelf, authenticated, hasMinimumRole, isAdmin, isEditor, requireRole, requireRoleField, ROLE_HIERARCHY, } from './modules/access/index.js';
|
export type { IpalOptions } from './types.js';
|
||||||
export { A11Y_COOKIE, A11Y_DEFAULT, a11yAttributes, parseA11y, serializeA11y } from './modules/accessibility/index.js';
|
|
||||||
export type { A11yState } from './modules/accessibility/index.js';
|
|
||||||
export { rowLabel } from './modules/admin-ui/index.js';
|
|
||||||
export type { RowLabelProps } from './modules/admin-ui/index.js';
|
|
||||||
export type { AnalyticsConfig } from './modules/analytics/index.js';
|
|
||||||
export { getAnalyticsConfig } from './modules/analytics/index.js';
|
|
||||||
export { ACCEPT_ALL_CONSENT, CONSENT_CATEGORIES, CONSENT_COOKIE, CONSENT_MAX_AGE, CONSENT_VERSION, DEFAULT_CONSENT, getConsentTexts, parseConsent, REJECT_ALL_CONSENT, serializeConsent, setDefaultConsent, updateConsent, } from './modules/consent/index.js';
|
|
||||||
export type { ConsentCategory, ConsentState, ConsentTexts } from './modules/consent/index.js';
|
|
||||||
export type { ContentCollectionOption, ContentOption, ResolvedRoute } from './modules/content/index.js';
|
|
||||||
export { archiveFieldName, blocksToMarkdown, buildArchivePath, buildEntryPath, createMarkdownRenderer, createSearchRoute, getArchiveEntries, MARKDOWN_PREFIX, markdownHref, markdownResponse, parsePageParam, prefersMarkdown, resolveNotFoundPage, resolveRedirect, resolveRoute, searchContent, } from './modules/content/index.js';
|
|
||||||
export type { ArchiveEntries } from './modules/content/index.js';
|
|
||||||
export type { SearchResult } from './modules/content/index.js';
|
|
||||||
export { graphAdapter } from './modules/email/graphAdapter.js';
|
|
||||||
export type { GraphAdapterArgs } from './modules/email/graphAdapter.js';
|
|
||||||
export { mailAdapter } from './modules/email/mailAdapter.js';
|
|
||||||
export type { MailAdapterArgs } from './modules/email/mailAdapter.js';
|
|
||||||
export { panelSmtpAdapter } from './modules/email/panelSmtpAdapter.js';
|
|
||||||
export type { PanelSmtpAdapterArgs } from './modules/email/panelSmtpAdapter.js';
|
|
||||||
export { assertEnv, ipalEnvRules } from './modules/env/index.js';
|
|
||||||
export type { AssertEnvOptions, EnvKind, EnvRule, IpalEnvFeatures } from './modules/env/index.js';
|
|
||||||
export { buildFormAnalyticsFields } from './modules/forms/formAnalyticsFields.js';
|
|
||||||
export { buildFormsPlugin } from './modules/forms/formsPluginConfig.js';
|
|
||||||
export { HONEYPOT_FIELD, honeypotInputProps, isHoneypotTripped } from './modules/forms/honeypot.js';
|
|
||||||
export type { FormsCollectionOverrides, FormsFieldsOverride, FormsOption, } from './modules/forms/types.js';
|
|
||||||
export type { FormErrors, FormSubmitAction, Validator } from './modules/forms/useForm.js';
|
|
||||||
export { buildValidator, checked, custom, email, isEmail, maxLength, minLength, pattern, required, } from './modules/forms/validators.js';
|
|
||||||
export type { Rule } from './modules/forms/validators.js';
|
|
||||||
export { createContentHelpers } from './modules/frontend/index.js';
|
|
||||||
export { createHealthRoute } from './modules/health/index.js';
|
|
||||||
export { buildCrossLocaleFieldSync, buildPreventDeleteSystemPage, buildRevalidateHook, buildValidateUniqueRole, setPublishedAtHook, trackSlugHistoryHook } from './modules/hooks/index.js';
|
|
||||||
export type { I18nConfig, LocaleDefinition, LocalizedSlugs } from './modules/i18n/index.js';
|
export type { I18nConfig, LocaleDefinition, LocalizedSlugs } from './modules/i18n/index.js';
|
||||||
export { buildLocalizedPath, getDefaultLocale, getLocaleCodes, getLocaleDefinition, getLocalizedSlugs, isValidLocale, LOCALE_COOKIE_NAME, matchAcceptLanguage, negotiateLocale, switchLocalePath, } from './modules/i18n/index.js';
|
export { buildLocalizedPath, getDefaultLocale, getLocaleCodes, getLocaleDefinition, getLocalizedSlugs, isValidLocale, LOCALE_COOKIE_NAME, matchAcceptLanguage, negotiateLocale, switchLocalePath, } from './modules/i18n/index.js';
|
||||||
|
export type { PagesOption, SystemPageRole } from './modules/pages/index.js';
|
||||||
|
export { ALL_SYSTEM_PAGE_ROLES, getSystemPagePath } from './modules/pages/index.js';
|
||||||
|
export type { AccessOption, Role } from './modules/access/index.js';
|
||||||
|
export { adminOnly, adminOnlyField, adminOrEditor, adminOrEditorField, adminOrSelf, authenticated, hasMinimumRole, isAdmin, isEditor, requireRole, requireRoleField, ROLE_HIERARCHY, } from './modules/access/index.js';
|
||||||
|
export type { GlobalQueryOptions } from './modules/payload/index.js';
|
||||||
|
export { getGlobal, getSiteSettings, getSiteIntegrations, SITE_SETTINGS_SLUG, SITE_INTEGRATIONS_SLUG, } from './modules/payload/index.js';
|
||||||
|
export type { SeoOption, SeoMeta, PageMetadata } from './modules/seo/index.js';
|
||||||
|
export { composeTitle, buildHreflangAlternates, buildMetadata, readSiteMetaConfig, slugsAcrossLocales, } from './modules/seo/index.js';
|
||||||
|
export type { SiteMetaConfig } from './modules/seo/index.js';
|
||||||
|
export type { ContentOption, ContentCollectionOption, ResolvedRoute } from './modules/content/index.js';
|
||||||
|
export { createContentHelpers } from './modules/frontend/index.js';
|
||||||
|
export { resolveRoute, resolveRedirect, resolveNotFoundPage, blocksToMarkdown, createMarkdownRenderer, markdownResponse, prefersMarkdown, markdownHref, MARKDOWN_PREFIX, searchContent, createSearchRoute, archiveFieldName, getArchiveEntries, buildArchivePath, buildEntryPath, parsePageParam, } from './modules/content/index.js';
|
||||||
|
export type { ArchiveEntries } from './modules/content/index.js';
|
||||||
|
export type { SearchResult } from './modules/content/index.js';
|
||||||
|
export { lexicalToMarkdown } from './modules/richtext/index.js';
|
||||||
|
export type { AutoFillMapping, SitemapEntry, RobotsRules, RobotsOptions } from './modules/seo/index.js';
|
||||||
|
export { buildAutoFillMetaHook, injectAutoFillMeta, createMetadataGenerator, createPageMetadata, buildSitemapEntries, buildRobots, AI_ASSISTANT_BOTS, AI_TRAINING_BOTS, } from './modules/seo/index.js';
|
||||||
export type { LocaleMiddlewareResult } from './modules/i18n/index.js';
|
export type { LocaleMiddlewareResult } from './modules/i18n/index.js';
|
||||||
export { createLocaleMiddleware, DEFAULT_MIDDLEWARE_MATCHER, } from './modules/i18n/index.js';
|
export { createLocaleMiddleware, DEFAULT_MIDDLEWARE_MATCHER, } from './modules/i18n/index.js';
|
||||||
export { createProxy, DEFAULT_PROXY_MATCHER } from './modules/i18n/index.js';
|
export { createProxy, DEFAULT_PROXY_MATCHER } from './modules/i18n/index.js';
|
||||||
export { resolveLocalized } from './modules/i18n/index.js';
|
export { resolveLocalized } from './modules/i18n/index.js';
|
||||||
export { buildLinkField, buildLinksField, resolveLinkHref } from './modules/links/index.js';
|
export { CONSENT_CATEGORIES, DEFAULT_CONSENT, ACCEPT_ALL_CONSENT, REJECT_ALL_CONSENT, CONSENT_COOKIE, CONSENT_VERSION, CONSENT_MAX_AGE, serializeConsent, parseConsent, setDefaultConsent, updateConsent, getConsentTexts, } from './modules/consent/index.js';
|
||||||
export type { BuildLinkFieldOptions, BuildLinksFieldOptions, LinkAppearance, LinkValue, ResolveLinkHrefOptions, } from './modules/links/index.js';
|
export type { ConsentCategory, ConsentState, ConsentTexts } from './modules/consent/index.js';
|
||||||
|
export { panelSmtpAdapter } from './modules/email/panelSmtpAdapter.js';
|
||||||
|
export { graphAdapter } from './modules/email/graphAdapter.js';
|
||||||
|
export { mailAdapter } from './modules/email/mailAdapter.js';
|
||||||
|
export type { MailAdapterArgs } from './modules/email/mailAdapter.js';
|
||||||
|
export type { GraphAdapterArgs } from './modules/email/graphAdapter.js';
|
||||||
|
export type { PanelSmtpAdapterArgs } from './modules/email/panelSmtpAdapter.js';
|
||||||
|
export { buildFormsPlugin } from './modules/forms/formsPluginConfig.js';
|
||||||
|
export type { FormsOption, FormsCollectionOverrides, FormsFieldsOverride, } from './modules/forms/types.js';
|
||||||
|
export { buildValidator, isEmail, required, email, minLength, maxLength, checked, pattern, custom, } from './modules/forms/validators.js';
|
||||||
|
export type { Rule } from './modules/forms/validators.js';
|
||||||
|
export type { FormErrors, FormSubmitAction, Validator } from './modules/forms/useForm.js';
|
||||||
|
export { HONEYPOT_FIELD, honeypotInputProps, isHoneypotTripped } from './modules/forms/honeypot.js';
|
||||||
|
export { buildFormAnalyticsFields } from './modules/forms/formAnalyticsFields.js';
|
||||||
|
export { createHealthRoute } from './modules/health/index.js';
|
||||||
export { createMcpRoute } from './modules/mcp/index.js';
|
export { createMcpRoute } from './modules/mcp/index.js';
|
||||||
export { buildOptimizeUploadField, buildOptimizeUploadHook, normalizeFilename, normalizeFilenameHook } from './modules/media/index.js';
|
export { assertEnv, ipalEnvRules } from './modules/env/index.js';
|
||||||
export type { OptimizeUploadOptions } from './modules/media/index.js';
|
export type { EnvRule, EnvKind, AssertEnvOptions, IpalEnvFeatures } from './modules/env/index.js';
|
||||||
export { getNotificationTexts, NOTIFICATION_FALLBACK, resolveFormMessage } from './modules/notifications/index.js';
|
export type { AnalyticsConfig } from './modules/analytics/index.js';
|
||||||
export type { FormNotificationTexts, NotificationTexts } from './modules/notifications/index.js';
|
export { getAnalyticsConfig } from './modules/analytics/index.js';
|
||||||
export type { PagesOption, SystemPageRole } from './modules/pages/index.js';
|
export { buildSlugField, toSlug } from './modules/slug/index.js';
|
||||||
export { ALL_SYSTEM_PAGE_ROLES, getSystemPagePath } from './modules/pages/index.js';
|
export { createLlmsTxtRoute, createSitemapRouteHandler, createManifestHandler } from './modules/seo/index.js';
|
||||||
export type { GlobalQueryOptions } from './modules/payload/index.js';
|
export { getNotificationTexts, resolveFormMessage, NOTIFICATION_FALLBACK } from './modules/notifications/index.js';
|
||||||
export { getGlobal, getSiteIntegrations, getSiteSettings, SITE_INTEGRATIONS_SLUG, SITE_SETTINGS_SLUG, } from './modules/payload/index.js';
|
|
||||||
export { lexicalToMarkdown } from './modules/richtext/index.js';
|
|
||||||
export { buildSecurityHeaders } from './modules/security/index.js';
|
export { buildSecurityHeaders } from './modules/security/index.js';
|
||||||
export { buildCsp } from './modules/security/index.js';
|
export { buildCsp } from './modules/security/index.js';
|
||||||
export type { BuildCspArgs } from './modules/security/index.js';
|
export type { BuildCspArgs } from './modules/security/index.js';
|
||||||
export type { BuildSecurityHeadersArgs, SecurityHeader } from './modules/security/index.js';
|
|
||||||
export type { PageMetadata, SeoMeta, SeoOption } from './modules/seo/index.js';
|
|
||||||
export { buildHreflangAlternates, buildMetadata, composeTitle, readSiteMetaConfig, slugsAcrossLocales, } from './modules/seo/index.js';
|
|
||||||
export type { SiteMetaConfig } from './modules/seo/index.js';
|
|
||||||
export type { AutoFillMapping, RobotsOptions, RobotsRules, SitemapEntry } from './modules/seo/index.js';
|
|
||||||
export { AI_ASSISTANT_BOTS, AI_TRAINING_BOTS, buildAutoFillMetaHook, buildRobots, buildSitemapEntries, createMetadataGenerator, createPageMetadata, injectAutoFillMeta, } from './modules/seo/index.js';
|
|
||||||
export { createLlmsTxtRoute, createManifestHandler, createSitemapRouteHandler } from './modules/seo/index.js';
|
|
||||||
export { buildIconsMetadata, buildOrganizationJsonLd, validateFaviconField } from './modules/seo/index.js';
|
export { buildIconsMetadata, buildOrganizationJsonLd, validateFaviconField } from './modules/seo/index.js';
|
||||||
export { buildNoindexField } from './modules/seo/index.js';
|
export { buildNoindexField } from './modules/seo/index.js';
|
||||||
|
export { rowLabel } from './modules/admin-ui/index.js';
|
||||||
|
export type { RowLabelProps } from './modules/admin-ui/index.js';
|
||||||
|
export { buildLinkField, buildLinksField, resolveLinkHref } from './modules/links/index.js';
|
||||||
|
export type { LinkAppearance, LinkValue, BuildLinkFieldOptions, BuildLinksFieldOptions, ResolveLinkHrefOptions, } from './modules/links/index.js';
|
||||||
export { buildSpeakableJsonLd } from './modules/seo/index.js';
|
export { buildSpeakableJsonLd } from './modules/seo/index.js';
|
||||||
export { buildSummaryField } from './modules/seo/index.js';
|
export { buildSummaryField } from './modules/seo/index.js';
|
||||||
export { buildBreadcrumbJsonLd, buildSiteNavigationJsonLd, buildWebSiteJsonLd } from './modules/seo/index.js';
|
export { buildWebSiteJsonLd, buildBreadcrumbJsonLd, buildSiteNavigationJsonLd } from './modules/seo/index.js';
|
||||||
export { buildFaqJsonLd, buildLocalBusinessJsonLd, buildServiceJsonLd } from './modules/seo/index.js';
|
export { buildLocalBusinessJsonLd, buildFaqJsonLd, buildServiceJsonLd } from './modules/seo/index.js';
|
||||||
export { buildArticleJsonLd } from './modules/seo/index.js';
|
export { buildArticleJsonLd } from './modules/seo/index.js';
|
||||||
export { buildLlmsTxt } from './modules/seo/index.js';
|
export { buildLlmsTxt } from './modules/seo/index.js';
|
||||||
export { buildSitemapCss, buildSitemapXml, DEFAULT_SITEMAP_CREDIT, SITEMAP_STYLE_PARAM } from './modules/seo/index.js';
|
export { buildSitemapXml, buildSitemapCss, SITEMAP_STYLE_PARAM, DEFAULT_SITEMAP_CREDIT } from './modules/seo/index.js';
|
||||||
export type { SitemapRouteOptions, SitemapStyleOptions } from './modules/seo/index.js';
|
export type { SitemapRouteOptions, SitemapStyleOptions } from './modules/seo/index.js';
|
||||||
export { buildSlugField, toSlug } from './modules/slug/index.js';
|
|
||||||
export { buildR2Storage } from './modules/storage/index.js';
|
export { buildR2Storage } from './modules/storage/index.js';
|
||||||
export { ipalKit } from './plugin.js';
|
export { normalizeFilename, normalizeFilenameHook, buildOptimizeUploadHook, buildOptimizeUploadField } from './modules/media/index.js';
|
||||||
export type { IpalOptions } from './types.js';
|
export type { OptimizeUploadOptions } from './modules/media/index.js';
|
||||||
|
export { buildRevalidateHook, setPublishedAtHook, buildPreventDeleteSystemPage, buildValidateUniqueRole, trackSlugHistoryHook, buildCrossLocaleFieldSync } from './modules/hooks/index.js';
|
||||||
|
export { A11Y_COOKIE, A11Y_DEFAULT, a11yAttributes, parseA11y, serializeA11y } from './modules/accessibility/index.js';
|
||||||
|
export type { A11yState } from './modules/accessibility/index.js';
|
||||||
|
export type { SecurityHeader, BuildSecurityHeadersArgs } from './modules/security/index.js';
|
||||||
|
export type { NotificationTexts, FormNotificationTexts } from './modules/notifications/index.js';
|
||||||
|
|||||||
Vendored
+34
-34
@@ -1,59 +1,59 @@
|
|||||||
|
export { ipalKit } from './plugin.js';
|
||||||
|
export { buildLocalizedPath, getDefaultLocale, getLocaleCodes, getLocaleDefinition, getLocalizedSlugs, isValidLocale, LOCALE_COOKIE_NAME, matchAcceptLanguage, negotiateLocale, switchLocalePath } from './modules/i18n/index.js';
|
||||||
|
export { ALL_SYSTEM_PAGE_ROLES, getSystemPagePath } from './modules/pages/index.js';
|
||||||
export { adminOnly, adminOnlyField, adminOrEditor, adminOrEditorField, adminOrSelf, authenticated, hasMinimumRole, isAdmin, isEditor, requireRole, requireRoleField, ROLE_HIERARCHY } from './modules/access/index.js';
|
export { adminOnly, adminOnlyField, adminOrEditor, adminOrEditorField, adminOrSelf, authenticated, hasMinimumRole, isAdmin, isEditor, requireRole, requireRoleField, ROLE_HIERARCHY } from './modules/access/index.js';
|
||||||
export { A11Y_COOKIE, A11Y_DEFAULT, a11yAttributes, parseA11y, serializeA11y } from './modules/accessibility/index.js';
|
export { getGlobal, getSiteSettings, getSiteIntegrations, SITE_SETTINGS_SLUG, SITE_INTEGRATIONS_SLUG } from './modules/payload/index.js';
|
||||||
export { rowLabel } from './modules/admin-ui/index.js';
|
export { composeTitle, buildHreflangAlternates, buildMetadata, readSiteMetaConfig, slugsAcrossLocales } from './modules/seo/index.js';
|
||||||
export { getAnalyticsConfig } from './modules/analytics/index.js';
|
export { createContentHelpers } from './modules/frontend/index.js';
|
||||||
export { ACCEPT_ALL_CONSENT, CONSENT_CATEGORIES, CONSENT_COOKIE, CONSENT_MAX_AGE, CONSENT_VERSION, DEFAULT_CONSENT, getConsentTexts, parseConsent, REJECT_ALL_CONSENT, serializeConsent, setDefaultConsent, updateConsent } from './modules/consent/index.js';
|
export { resolveRoute, resolveRedirect, resolveNotFoundPage, blocksToMarkdown, createMarkdownRenderer, markdownResponse, prefersMarkdown, markdownHref, MARKDOWN_PREFIX, searchContent, createSearchRoute, archiveFieldName, getArchiveEntries, buildArchivePath, buildEntryPath, parsePageParam } from './modules/content/index.js';
|
||||||
export { archiveFieldName, blocksToMarkdown, buildArchivePath, buildEntryPath, createMarkdownRenderer, createSearchRoute, getArchiveEntries, MARKDOWN_PREFIX, markdownHref, markdownResponse, parsePageParam, prefersMarkdown, resolveNotFoundPage, resolveRedirect, resolveRoute, searchContent } from './modules/content/index.js';
|
// Lexical → Markdown (pure, no React) — for AI-readable output.
|
||||||
export { graphAdapter } from './modules/email/graphAdapter.js';
|
export { lexicalToMarkdown } from './modules/richtext/index.js';
|
||||||
export { mailAdapter } from './modules/email/mailAdapter.js';
|
export { buildAutoFillMetaHook, injectAutoFillMeta, createMetadataGenerator, createPageMetadata, buildSitemapEntries, buildRobots, AI_ASSISTANT_BOTS, AI_TRAINING_BOTS } from './modules/seo/index.js';
|
||||||
|
export { createLocaleMiddleware, DEFAULT_MIDDLEWARE_MATCHER } from './modules/i18n/index.js';
|
||||||
|
export { createProxy, DEFAULT_PROXY_MATCHER } from './modules/i18n/index.js';
|
||||||
|
export { resolveLocalized } from './modules/i18n/index.js';
|
||||||
|
export { CONSENT_CATEGORIES, DEFAULT_CONSENT, ACCEPT_ALL_CONSENT, REJECT_ALL_CONSENT, CONSENT_COOKIE, CONSENT_VERSION, CONSENT_MAX_AGE, serializeConsent, parseConsent, setDefaultConsent, updateConsent, getConsentTexts } from './modules/consent/index.js';
|
||||||
// Imported straight from the file, NOT from ./modules/email/index.js — that
|
// Imported straight from the file, NOT from ./modules/email/index.js — that
|
||||||
// barrel re-exports sendEmail, which imports 'server-only' and would crash when
|
// barrel re-exports sendEmail, which imports 'server-only' and would crash when
|
||||||
// Payload loads the config (or runs generate:importmap) as a plain Node script.
|
// Payload loads the config (or runs generate:importmap) as a plain Node script.
|
||||||
export { panelSmtpAdapter } from './modules/email/panelSmtpAdapter.js';
|
export { panelSmtpAdapter } from './modules/email/panelSmtpAdapter.js';
|
||||||
// Boot-time environment validation (fail fast on misconfigured deploys).
|
export { graphAdapter } from './modules/email/graphAdapter.js';
|
||||||
export { assertEnv, ipalEnvRules } from './modules/env/index.js';
|
export { mailAdapter } from './modules/email/mailAdapter.js';
|
||||||
// Panel-managed form analytics (config-time field builder).
|
|
||||||
export { buildFormAnalyticsFields } from './modules/forms/formAnalyticsFields.js';
|
|
||||||
export { buildFormsPlugin } from './modules/forms/formsPluginConfig.js';
|
export { buildFormsPlugin } from './modules/forms/formsPluginConfig.js';
|
||||||
export { HONEYPOT_FIELD, honeypotInputProps, isHoneypotTripped } from './modules/forms/honeypot.js';
|
|
||||||
// Validation rules are pure — exported server-side too, for re-validating a
|
// Validation rules are pure — exported server-side too, for re-validating a
|
||||||
// submission inside a server action. (useForm/useContactForm are client-only →
|
// submission inside a server action. (useForm/useContactForm are client-only →
|
||||||
// '@intecion/ipal-kit/client'.)
|
// '@intecion/ipal-kit/client'.)
|
||||||
export { buildValidator, checked, custom, email, isEmail, maxLength, minLength, pattern, required } from './modules/forms/validators.js';
|
export { buildValidator, isEmail, required, email, minLength, maxLength, checked, pattern, custom } from './modules/forms/validators.js';
|
||||||
export { createContentHelpers } from './modules/frontend/index.js';
|
export { HONEYPOT_FIELD, honeypotInputProps, isHoneypotTripped } from './modules/forms/honeypot.js';
|
||||||
|
// Panel-managed form analytics (config-time field builder).
|
||||||
|
export { buildFormAnalyticsFields } from './modules/forms/formAnalyticsFields.js';
|
||||||
// Healthcheck route (Coolify/Docker liveness with a real DB round-trip).
|
// Healthcheck route (Coolify/Docker liveness with a real DB round-trip).
|
||||||
export { createHealthRoute } from './modules/health/index.js';
|
export { createHealthRoute } from './modules/health/index.js';
|
||||||
export { buildCrossLocaleFieldSync, buildPreventDeleteSystemPage, buildRevalidateHook, buildValidateUniqueRole, setPublishedAtHook, trackSlugHistoryHook } from './modules/hooks/index.js';
|
|
||||||
export { buildLocalizedPath, getDefaultLocale, getLocaleCodes, getLocaleDefinition, getLocalizedSlugs, isValidLocale, LOCALE_COOKIE_NAME, matchAcceptLanguage, negotiateLocale, switchLocalePath } from './modules/i18n/index.js';
|
|
||||||
export { createLocaleMiddleware, DEFAULT_MIDDLEWARE_MATCHER } from './modules/i18n/index.js';
|
|
||||||
export { createProxy, DEFAULT_PROXY_MATCHER } from './modules/i18n/index.js';
|
|
||||||
export { resolveLocalized } from './modules/i18n/index.js';
|
|
||||||
export { buildLinkField, buildLinksField, resolveLinkHref } from './modules/links/index.js';
|
|
||||||
// Read-only MCP server (Claude/agents connect to the site and query it).
|
// Read-only MCP server (Claude/agents connect to the site and query it).
|
||||||
export { createMcpRoute } from './modules/mcp/index.js';
|
export { createMcpRoute } from './modules/mcp/index.js';
|
||||||
export { buildOptimizeUploadField, buildOptimizeUploadHook, normalizeFilename, normalizeFilenameHook } from './modules/media/index.js';
|
// Boot-time environment validation (fail fast on misconfigured deploys).
|
||||||
export { getNotificationTexts, NOTIFICATION_FALLBACK, resolveFormMessage } from './modules/notifications/index.js';
|
export { assertEnv, ipalEnvRules } from './modules/env/index.js';
|
||||||
export { ALL_SYSTEM_PAGE_ROLES, getSystemPagePath } from './modules/pages/index.js';
|
export { getAnalyticsConfig } from './modules/analytics/index.js';
|
||||||
export { getGlobal, getSiteIntegrations, getSiteSettings, SITE_INTEGRATIONS_SLUG, SITE_SETTINGS_SLUG } from './modules/payload/index.js';
|
export { buildSlugField, toSlug } from './modules/slug/index.js';
|
||||||
// Lexical → Markdown (pure, no React) — for AI-readable output.
|
export { createLlmsTxtRoute, createSitemapRouteHandler, createManifestHandler } from './modules/seo/index.js';
|
||||||
export { lexicalToMarkdown } from './modules/richtext/index.js';
|
export { getNotificationTexts, resolveFormMessage, NOTIFICATION_FALLBACK } from './modules/notifications/index.js';
|
||||||
export { buildSecurityHeaders } from './modules/security/index.js';
|
export { buildSecurityHeaders } from './modules/security/index.js';
|
||||||
export { buildCsp } from './modules/security/index.js';
|
export { buildCsp } from './modules/security/index.js';
|
||||||
export { buildHreflangAlternates, buildMetadata, composeTitle, readSiteMetaConfig, slugsAcrossLocales } from './modules/seo/index.js';
|
|
||||||
export { AI_ASSISTANT_BOTS, AI_TRAINING_BOTS, buildAutoFillMetaHook, buildRobots, buildSitemapEntries, createMetadataGenerator, createPageMetadata, injectAutoFillMeta } from './modules/seo/index.js';
|
|
||||||
export { createLlmsTxtRoute, createManifestHandler, createSitemapRouteHandler } from './modules/seo/index.js';
|
|
||||||
export { buildIconsMetadata, buildOrganizationJsonLd, validateFaviconField } from './modules/seo/index.js';
|
export { buildIconsMetadata, buildOrganizationJsonLd, validateFaviconField } from './modules/seo/index.js';
|
||||||
export { buildNoindexField } from './modules/seo/index.js';
|
export { buildNoindexField } from './modules/seo/index.js';
|
||||||
|
export { rowLabel } from './modules/admin-ui/index.js';
|
||||||
|
export { buildLinkField, buildLinksField, resolveLinkHref } from './modules/links/index.js';
|
||||||
export { buildSpeakableJsonLd } from './modules/seo/index.js';
|
export { buildSpeakableJsonLd } from './modules/seo/index.js';
|
||||||
export { buildSummaryField } from './modules/seo/index.js';
|
export { buildSummaryField } from './modules/seo/index.js';
|
||||||
export { buildBreadcrumbJsonLd, buildSiteNavigationJsonLd, buildWebSiteJsonLd } from './modules/seo/index.js';
|
export { buildWebSiteJsonLd, buildBreadcrumbJsonLd, buildSiteNavigationJsonLd } from './modules/seo/index.js';
|
||||||
// Local SEO structured data — LocalBusiness (map pack), Service (offering), FAQPage.
|
// Local SEO structured data — LocalBusiness (map pack), Service (offering), FAQPage.
|
||||||
export { buildFaqJsonLd, buildLocalBusinessJsonLd, buildServiceJsonLd } from './modules/seo/index.js';
|
export { buildLocalBusinessJsonLd, buildFaqJsonLd, buildServiceJsonLd } from './modules/seo/index.js';
|
||||||
export { buildArticleJsonLd } from './modules/seo/index.js';
|
export { buildArticleJsonLd } from './modules/seo/index.js';
|
||||||
export { buildLlmsTxt } from './modules/seo/index.js';
|
export { buildLlmsTxt } from './modules/seo/index.js';
|
||||||
export { buildSitemapCss, buildSitemapXml, DEFAULT_SITEMAP_CREDIT, SITEMAP_STYLE_PARAM } from './modules/seo/index.js';
|
export { buildSitemapXml, buildSitemapCss, SITEMAP_STYLE_PARAM, DEFAULT_SITEMAP_CREDIT } from './modules/seo/index.js';
|
||||||
export { buildSlugField, toSlug } from './modules/slug/index.js';
|
|
||||||
export { buildR2Storage } from './modules/storage/index.js';
|
export { buildR2Storage } from './modules/storage/index.js';
|
||||||
export { ipalKit } from './plugin.js';
|
export { normalizeFilename, normalizeFilenameHook, buildOptimizeUploadHook, buildOptimizeUploadField } from './modules/media/index.js';
|
||||||
|
export { buildRevalidateHook, setPublishedAtHook, buildPreventDeleteSystemPage, buildValidateUniqueRole, trackSlugHistoryHook, buildCrossLocaleFieldSync } from './modules/hooks/index.js';
|
||||||
|
export { A11Y_COOKIE, A11Y_DEFAULT, a11yAttributes, parseA11y, serializeA11y } from './modules/accessibility/index.js';
|
||||||
|
|
||||||
//# sourceMappingURL=index.js.map
|
//# sourceMappingURL=index.js.map
|
||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
import { rowLabel } from 'src/modules/admin-ui/rowLabel.js';
|
import { rowLabel } from '../admin-ui/rowLabel.js';
|
||||||
const URL_PATTERN = /^(https?:\/\/|mailto:|tel:|#)/;
|
const URL_PATTERN = /^(?:https?:\/\/|mailto:|tel:|#)/;
|
||||||
/**
|
/**
|
||||||
* The ONE link shape for a project: a page, an external URL (also mailto:,
|
* The ONE link shape for a project: a page, an external URL (also mailto:,
|
||||||
* tel:, #anchor) or an uploaded file — plus label, new-tab flag and visual
|
* tel:, #anchor) or an uploaded file — plus label, new-tab flag and visual
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+9
-9
@@ -22,28 +22,28 @@ import { type SitemapStyleOptions } from './sitemapStyle.js';
|
|||||||
* baseUrl: process.env.NEXT_PUBLIC_SERVER_URL!, full: true })
|
* baseUrl: process.env.NEXT_PUBLIC_SERVER_URL!, full: true })
|
||||||
*/
|
*/
|
||||||
export declare function createLlmsTxtRoute(opts: {
|
export declare function createLlmsTxtRoute(opts: {
|
||||||
getCachedPayload: () => Promise<BasePayload>;
|
|
||||||
config: I18nConfig;
|
|
||||||
baseUrl: string;
|
baseUrl: string;
|
||||||
pagesSlug?: string;
|
config: I18nConfig;
|
||||||
settingsSlug?: string;
|
|
||||||
/** Inline every page's full Markdown (llms-full.txt). Default false. */
|
/** Inline every page's full Markdown (llms-full.txt). Default false. */
|
||||||
full?: boolean;
|
full?: boolean;
|
||||||
|
getCachedPayload: () => Promise<BasePayload>;
|
||||||
|
pagesSlug?: string;
|
||||||
|
settingsSlug?: string;
|
||||||
/** Field holding a richer AI summary (buildSummaryField) to prefer as description. */
|
/** Field holding a richer AI summary (buildSummaryField) to prefer as description. */
|
||||||
summaryField?: string;
|
summaryField?: string;
|
||||||
}): () => Promise<Response>;
|
}): () => Promise<Response>;
|
||||||
export type SitemapRouteOptions = {
|
export type SitemapRouteOptions = {
|
||||||
|
/** Legacy: your own stylesheet URL (e.g. '/sitemap.css'). Overrides `style`. */
|
||||||
|
cssUrl?: string;
|
||||||
/**
|
/**
|
||||||
* Built-in browser look (default ON): the XML points at `<this route>?style`
|
* Built-in browser look (default ON): the XML points at `<this route>?style`
|
||||||
* and the same handler serves the CSS — nothing to copy into /public.
|
* and the same handler serves the CSS — nothing to copy into /public.
|
||||||
* `false` = raw XML. Object = header/credit/accent (SitemapStyleOptions);
|
* `false` = raw XML. Object = header/credit/accent (SitemapStyleOptions);
|
||||||
* `title` may be async (sitemapRoute passes the Site Settings name).
|
* `title` may be async (sitemapRoute passes the Site Settings name).
|
||||||
*/
|
*/
|
||||||
style?: false | (Omit<SitemapStyleOptions, 'title'> & {
|
style?: ({
|
||||||
title?: string | (() => Promise<string | undefined>);
|
title?: (() => Promise<string | undefined>) | string;
|
||||||
});
|
} & Omit<SitemapStyleOptions, 'title'>) | false;
|
||||||
/** Legacy: your own stylesheet URL (e.g. '/sitemap.css'). Overrides `style`. */
|
|
||||||
cssUrl?: string;
|
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Ready-made Next route handler for /sitemap.xml, styled for humans out of the box.
|
* Ready-made Next route handler for /sitemap.xml, styled for humans out of the box.
|
||||||
|
|||||||
Vendored
+5
-5
@@ -24,12 +24,12 @@ import { buildSitemapCss, SITEMAP_STYLE_PARAM } from './sitemapStyle.js';
|
|||||||
try {
|
try {
|
||||||
const payload = await opts.getCachedPayload();
|
const payload = await opts.getCachedPayload();
|
||||||
const body = await buildLlmsTxt({
|
const body = await buildLlmsTxt({
|
||||||
payload,
|
|
||||||
config: opts.config,
|
|
||||||
baseUrl: opts.baseUrl,
|
baseUrl: opts.baseUrl,
|
||||||
pagesSlug: opts.pagesSlug,
|
config: opts.config,
|
||||||
settingsSlug: opts.settingsSlug,
|
|
||||||
full: opts.full,
|
full: opts.full,
|
||||||
|
pagesSlug: opts.pagesSlug,
|
||||||
|
payload,
|
||||||
|
settingsSlug: opts.settingsSlug,
|
||||||
summaryField: opts.summaryField
|
summaryField: opts.summaryField
|
||||||
});
|
});
|
||||||
return new Response(body, {
|
return new Response(body, {
|
||||||
@@ -75,8 +75,8 @@ import { buildSitemapCss, SITEMAP_STYLE_PARAM } from './sitemapStyle.js';
|
|||||||
title
|
title
|
||||||
}), {
|
}), {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'text/css; charset=utf-8',
|
|
||||||
'Cache-Control': 'public, max-age=3600',
|
'Cache-Control': 'public, max-age=3600',
|
||||||
|
'Content-Type': 'text/css; charset=utf-8',
|
||||||
'X-Robots-Tag': 'noindex'
|
'X-Robots-Tag': 'noindex'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
*/ /** Query parameter on the sitemap URL that returns the stylesheet instead of XML. */ export const SITEMAP_STYLE_PARAM = 'style';
|
*/ /** Query parameter on the sitemap URL that returns the stylesheet instead of XML. */ export const SITEMAP_STYLE_PARAM = 'style';
|
||||||
export const DEFAULT_SITEMAP_CREDIT = 'Technology by Intecion.com';
|
export const DEFAULT_SITEMAP_CREDIT = 'Technology by Intecion.com';
|
||||||
/** CSS `content: "…"` value — escapes backslashes, quotes and newlines. */ const cssString = (s)=>`"${s.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/[\r\n]+/g, ' ')}"`;
|
/** CSS `content: "…"` value — escapes backslashes, quotes and newlines. */ const cssString = (s)=>`"${s.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/[\r\n]+/g, ' ')}"`;
|
||||||
/** Only plain colour values — the option ends up inside a stylesheet. */ const safeColor = (c, fallback)=>c && /^(#[0-9a-f]{3,8}|[a-z]+|(rgb|hsl|oklch)a?\([\d\s.,%/-]+\))$/i.test(c.trim()) ? c.trim() : fallback;
|
/** Only plain colour values — the option ends up inside a stylesheet. */ const safeColor = (c, fallback)=>c && /^(?:#[0-9a-f]{3,8}|[a-z]+|(?:rgb|hsl|oklch)a?\([\d\s.,%/-]+\))$/i.test(c.trim()) ? c.trim() : fallback;
|
||||||
export function buildSitemapCss({ accent, credit, title } = {}) {
|
export function buildSitemapCss({ accent, credit, title } = {}) {
|
||||||
const heading = title?.trim() || 'XML Sitemap';
|
const heading = title?.trim() || 'XML Sitemap';
|
||||||
const note = credit === false ? '' : (credit ?? DEFAULT_SITEMAP_CREDIT).trim();
|
const note = credit === false ? '' : (credit ?? DEFAULT_SITEMAP_CREDIT).trim();
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@intecion/ipal-kit",
|
"name": "@intecion/ipal-kit",
|
||||||
"version": "1.8.5",
|
"version": "1.8.8",
|
||||||
"description": "Intecion Payload Advanced Library — a Payload CMS 3 plugin: i18n, SEO, forms, consent, analytics, blog/archives.",
|
"description": "Intecion Payload Advanced Library — a Payload CMS 3 plugin: i18n, SEO, forms, consent, analytics, blog/archives.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
+137
-137
@@ -1,3 +1,20 @@
|
|||||||
|
export { ipalKit } from './plugin.js'
|
||||||
|
export type { IpalOptions } from './types.js'
|
||||||
|
export type { I18nConfig, LocaleDefinition, LocalizedSlugs } from './modules/i18n/index.js'
|
||||||
|
export {
|
||||||
|
buildLocalizedPath,
|
||||||
|
getDefaultLocale,
|
||||||
|
getLocaleCodes,
|
||||||
|
getLocaleDefinition,
|
||||||
|
getLocalizedSlugs,
|
||||||
|
isValidLocale,
|
||||||
|
LOCALE_COOKIE_NAME,
|
||||||
|
matchAcceptLanguage,
|
||||||
|
negotiateLocale,
|
||||||
|
switchLocalePath,
|
||||||
|
} from './modules/i18n/index.js'
|
||||||
|
export type { PagesOption, SystemPageRole } from './modules/pages/index.js'
|
||||||
|
export { ALL_SYSTEM_PAGE_ROLES, getSystemPagePath } from './modules/pages/index.js'
|
||||||
export type { AccessOption, Role } from './modules/access/index.js'
|
export type { AccessOption, Role } from './modules/access/index.js'
|
||||||
export {
|
export {
|
||||||
adminOnly,
|
adminOnly,
|
||||||
@@ -13,102 +30,58 @@ export {
|
|||||||
requireRoleField,
|
requireRoleField,
|
||||||
ROLE_HIERARCHY,
|
ROLE_HIERARCHY,
|
||||||
} from './modules/access/index.js'
|
} from './modules/access/index.js'
|
||||||
export { A11Y_COOKIE, A11Y_DEFAULT, a11yAttributes, parseA11y, serializeA11y } from './modules/accessibility/index.js'
|
export type { GlobalQueryOptions } from './modules/payload/index.js'
|
||||||
export type { A11yState } from './modules/accessibility/index.js'
|
|
||||||
export { rowLabel } from './modules/admin-ui/index.js'
|
|
||||||
export type { RowLabelProps } from './modules/admin-ui/index.js'
|
|
||||||
export type { AnalyticsConfig } from './modules/analytics/index.js'
|
|
||||||
export { getAnalyticsConfig } from './modules/analytics/index.js'
|
|
||||||
export {
|
export {
|
||||||
ACCEPT_ALL_CONSENT,
|
getGlobal,
|
||||||
CONSENT_CATEGORIES,
|
getSiteSettings,
|
||||||
CONSENT_COOKIE,
|
getSiteIntegrations,
|
||||||
CONSENT_MAX_AGE,
|
SITE_SETTINGS_SLUG,
|
||||||
CONSENT_VERSION,
|
SITE_INTEGRATIONS_SLUG,
|
||||||
DEFAULT_CONSENT,
|
} from './modules/payload/index.js'
|
||||||
getConsentTexts,
|
export type { SeoOption, SeoMeta, PageMetadata } from './modules/seo/index.js'
|
||||||
parseConsent,
|
|
||||||
REJECT_ALL_CONSENT,
|
|
||||||
serializeConsent,
|
|
||||||
setDefaultConsent,
|
|
||||||
updateConsent,
|
|
||||||
} from './modules/consent/index.js'
|
|
||||||
export type { ConsentCategory, ConsentState, ConsentTexts } from './modules/consent/index.js'
|
|
||||||
export type { ContentCollectionOption, ContentOption, ResolvedRoute } from './modules/content/index.js'
|
|
||||||
export {
|
export {
|
||||||
archiveFieldName,
|
composeTitle,
|
||||||
|
buildHreflangAlternates,
|
||||||
|
buildMetadata,
|
||||||
|
readSiteMetaConfig,
|
||||||
|
slugsAcrossLocales,
|
||||||
|
} from './modules/seo/index.js'
|
||||||
|
export type { SiteMetaConfig } from './modules/seo/index.js'
|
||||||
|
export type { ContentOption, ContentCollectionOption, ResolvedRoute } from './modules/content/index.js'
|
||||||
|
export { createContentHelpers } from './modules/frontend/index.js'
|
||||||
|
export {
|
||||||
|
resolveRoute,
|
||||||
|
resolveRedirect,
|
||||||
|
resolveNotFoundPage,
|
||||||
blocksToMarkdown,
|
blocksToMarkdown,
|
||||||
|
createMarkdownRenderer,
|
||||||
|
markdownResponse,
|
||||||
|
prefersMarkdown,
|
||||||
|
markdownHref,
|
||||||
|
MARKDOWN_PREFIX,
|
||||||
|
searchContent,
|
||||||
|
createSearchRoute,
|
||||||
|
archiveFieldName,
|
||||||
|
getArchiveEntries,
|
||||||
buildArchivePath,
|
buildArchivePath,
|
||||||
buildEntryPath,
|
buildEntryPath,
|
||||||
createMarkdownRenderer,
|
|
||||||
createSearchRoute,
|
|
||||||
getArchiveEntries,
|
|
||||||
MARKDOWN_PREFIX,
|
|
||||||
markdownHref,
|
|
||||||
markdownResponse,
|
|
||||||
parsePageParam,
|
parsePageParam,
|
||||||
prefersMarkdown,
|
|
||||||
resolveNotFoundPage,
|
|
||||||
resolveRedirect,
|
|
||||||
resolveRoute,
|
|
||||||
searchContent,
|
|
||||||
} from './modules/content/index.js'
|
} from './modules/content/index.js'
|
||||||
export type { ArchiveEntries } from './modules/content/index.js'
|
export type { ArchiveEntries } from './modules/content/index.js'
|
||||||
export type { SearchResult } from './modules/content/index.js'
|
export type { SearchResult } from './modules/content/index.js'
|
||||||
export { graphAdapter } from './modules/email/graphAdapter.js'
|
// Lexical → Markdown (pure, no React) — for AI-readable output.
|
||||||
export type { GraphAdapterArgs } from './modules/email/graphAdapter.js'
|
export { lexicalToMarkdown } from './modules/richtext/index.js'
|
||||||
export { mailAdapter } from './modules/email/mailAdapter.js'
|
export type { AutoFillMapping, SitemapEntry, RobotsRules, RobotsOptions } from './modules/seo/index.js'
|
||||||
export type { MailAdapterArgs } from './modules/email/mailAdapter.js'
|
|
||||||
// Imported straight from the file, NOT from ./modules/email/index.js — that
|
|
||||||
// barrel re-exports sendEmail, which imports 'server-only' and would crash when
|
|
||||||
// Payload loads the config (or runs generate:importmap) as a plain Node script.
|
|
||||||
export { panelSmtpAdapter } from './modules/email/panelSmtpAdapter.js'
|
|
||||||
export type { PanelSmtpAdapterArgs } from './modules/email/panelSmtpAdapter.js'
|
|
||||||
// Boot-time environment validation (fail fast on misconfigured deploys).
|
|
||||||
export { assertEnv, ipalEnvRules } from './modules/env/index.js'
|
|
||||||
export type { AssertEnvOptions, EnvKind, EnvRule, IpalEnvFeatures } from './modules/env/index.js'
|
|
||||||
// Panel-managed form analytics (config-time field builder).
|
|
||||||
export { buildFormAnalyticsFields } from './modules/forms/formAnalyticsFields.js'
|
|
||||||
export { buildFormsPlugin } from './modules/forms/formsPluginConfig.js'
|
|
||||||
export { HONEYPOT_FIELD, honeypotInputProps, isHoneypotTripped } from './modules/forms/honeypot.js'
|
|
||||||
export type {
|
|
||||||
FormsCollectionOverrides,
|
|
||||||
FormsFieldsOverride,
|
|
||||||
FormsOption,
|
|
||||||
} from './modules/forms/types.js'
|
|
||||||
export type { FormErrors, FormSubmitAction, Validator } from './modules/forms/useForm.js'
|
|
||||||
// Validation rules are pure — exported server-side too, for re-validating a
|
|
||||||
// submission inside a server action. (useForm/useContactForm are client-only →
|
|
||||||
// '@intecion/ipal-kit/client'.)
|
|
||||||
export {
|
export {
|
||||||
buildValidator,
|
buildAutoFillMetaHook,
|
||||||
checked,
|
injectAutoFillMeta,
|
||||||
custom,
|
createMetadataGenerator,
|
||||||
email,
|
createPageMetadata,
|
||||||
isEmail,
|
buildSitemapEntries,
|
||||||
maxLength,
|
buildRobots,
|
||||||
minLength,
|
AI_ASSISTANT_BOTS,
|
||||||
pattern,
|
AI_TRAINING_BOTS,
|
||||||
required,
|
} from './modules/seo/index.js'
|
||||||
} from './modules/forms/validators.js'
|
|
||||||
export type { Rule } from './modules/forms/validators.js'
|
|
||||||
export { createContentHelpers } from './modules/frontend/index.js'
|
|
||||||
// Healthcheck route (Coolify/Docker liveness with a real DB round-trip).
|
|
||||||
export { createHealthRoute } from './modules/health/index.js'
|
|
||||||
export { buildCrossLocaleFieldSync, buildPreventDeleteSystemPage, buildRevalidateHook, buildValidateUniqueRole, setPublishedAtHook, trackSlugHistoryHook } from './modules/hooks/index.js'
|
|
||||||
export type { I18nConfig, LocaleDefinition, LocalizedSlugs } from './modules/i18n/index.js'
|
|
||||||
export {
|
|
||||||
buildLocalizedPath,
|
|
||||||
getDefaultLocale,
|
|
||||||
getLocaleCodes,
|
|
||||||
getLocaleDefinition,
|
|
||||||
getLocalizedSlugs,
|
|
||||||
isValidLocale,
|
|
||||||
LOCALE_COOKIE_NAME,
|
|
||||||
matchAcceptLanguage,
|
|
||||||
negotiateLocale,
|
|
||||||
switchLocalePath,
|
|
||||||
} from './modules/i18n/index.js'
|
|
||||||
export type { LocaleMiddlewareResult } from './modules/i18n/index.js'
|
export type { LocaleMiddlewareResult } from './modules/i18n/index.js'
|
||||||
export {
|
export {
|
||||||
createLocaleMiddleware,
|
createLocaleMiddleware,
|
||||||
@@ -116,70 +89,97 @@ export {
|
|||||||
} from './modules/i18n/index.js'
|
} from './modules/i18n/index.js'
|
||||||
export { createProxy, DEFAULT_PROXY_MATCHER } from './modules/i18n/index.js'
|
export { createProxy, DEFAULT_PROXY_MATCHER } from './modules/i18n/index.js'
|
||||||
export { resolveLocalized } from './modules/i18n/index.js'
|
export { resolveLocalized } from './modules/i18n/index.js'
|
||||||
export { buildLinkField, buildLinksField, resolveLinkHref } from './modules/links/index.js'
|
export {
|
||||||
|
CONSENT_CATEGORIES,
|
||||||
|
DEFAULT_CONSENT,
|
||||||
|
ACCEPT_ALL_CONSENT,
|
||||||
|
REJECT_ALL_CONSENT,
|
||||||
|
CONSENT_COOKIE,
|
||||||
|
CONSENT_VERSION,
|
||||||
|
CONSENT_MAX_AGE,
|
||||||
|
serializeConsent,
|
||||||
|
parseConsent,
|
||||||
|
setDefaultConsent,
|
||||||
|
updateConsent,
|
||||||
|
getConsentTexts,
|
||||||
|
} from './modules/consent/index.js'
|
||||||
|
export type { ConsentCategory, ConsentState, ConsentTexts } from './modules/consent/index.js'
|
||||||
|
// Imported straight from the file, NOT from ./modules/email/index.js — that
|
||||||
|
// barrel re-exports sendEmail, which imports 'server-only' and would crash when
|
||||||
|
// Payload loads the config (or runs generate:importmap) as a plain Node script.
|
||||||
|
export { panelSmtpAdapter } from './modules/email/panelSmtpAdapter.js'
|
||||||
|
export { graphAdapter } from './modules/email/graphAdapter.js'
|
||||||
|
export { mailAdapter } from './modules/email/mailAdapter.js'
|
||||||
|
export type { MailAdapterArgs } from './modules/email/mailAdapter.js'
|
||||||
|
export type { GraphAdapterArgs } from './modules/email/graphAdapter.js'
|
||||||
|
export type { PanelSmtpAdapterArgs } from './modules/email/panelSmtpAdapter.js'
|
||||||
|
export { buildFormsPlugin } from './modules/forms/formsPluginConfig.js'
|
||||||
export type {
|
export type {
|
||||||
BuildLinkFieldOptions,
|
FormsOption,
|
||||||
BuildLinksFieldOptions,
|
FormsCollectionOverrides,
|
||||||
LinkAppearance,
|
FormsFieldsOverride,
|
||||||
LinkValue,
|
} from './modules/forms/types.js'
|
||||||
ResolveLinkHrefOptions,
|
// Validation rules are pure — exported server-side too, for re-validating a
|
||||||
} from './modules/links/index.js'
|
// submission inside a server action. (useForm/useContactForm are client-only →
|
||||||
|
// '@intecion/ipal-kit/client'.)
|
||||||
|
export {
|
||||||
|
buildValidator,
|
||||||
|
isEmail,
|
||||||
|
required,
|
||||||
|
email,
|
||||||
|
minLength,
|
||||||
|
maxLength,
|
||||||
|
checked,
|
||||||
|
pattern,
|
||||||
|
custom,
|
||||||
|
} from './modules/forms/validators.js'
|
||||||
|
export type { Rule } from './modules/forms/validators.js'
|
||||||
|
export type { FormErrors, FormSubmitAction, Validator } from './modules/forms/useForm.js'
|
||||||
|
export { HONEYPOT_FIELD, honeypotInputProps, isHoneypotTripped } from './modules/forms/honeypot.js'
|
||||||
|
// Panel-managed form analytics (config-time field builder).
|
||||||
|
export { buildFormAnalyticsFields } from './modules/forms/formAnalyticsFields.js'
|
||||||
|
// Healthcheck route (Coolify/Docker liveness with a real DB round-trip).
|
||||||
|
export { createHealthRoute } from './modules/health/index.js'
|
||||||
// Read-only MCP server (Claude/agents connect to the site and query it).
|
// Read-only MCP server (Claude/agents connect to the site and query it).
|
||||||
export { createMcpRoute } from './modules/mcp/index.js'
|
export { createMcpRoute } from './modules/mcp/index.js'
|
||||||
export { buildOptimizeUploadField, buildOptimizeUploadHook, normalizeFilename, normalizeFilenameHook } from './modules/media/index.js'
|
// Boot-time environment validation (fail fast on misconfigured deploys).
|
||||||
export type { OptimizeUploadOptions } from './modules/media/index.js'
|
export { assertEnv, ipalEnvRules } from './modules/env/index.js'
|
||||||
export { getNotificationTexts, NOTIFICATION_FALLBACK, resolveFormMessage } from './modules/notifications/index.js'
|
export type { EnvRule, EnvKind, AssertEnvOptions, IpalEnvFeatures } from './modules/env/index.js'
|
||||||
export type { FormNotificationTexts, NotificationTexts } from './modules/notifications/index.js'
|
export type { AnalyticsConfig } from './modules/analytics/index.js'
|
||||||
export type { PagesOption, SystemPageRole } from './modules/pages/index.js'
|
export { getAnalyticsConfig } from './modules/analytics/index.js'
|
||||||
export { ALL_SYSTEM_PAGE_ROLES, getSystemPagePath } from './modules/pages/index.js'
|
export { buildSlugField, toSlug } from './modules/slug/index.js'
|
||||||
export type { GlobalQueryOptions } from './modules/payload/index.js'
|
export { createLlmsTxtRoute, createSitemapRouteHandler, createManifestHandler } from './modules/seo/index.js'
|
||||||
|
|
||||||
export {
|
export { getNotificationTexts, resolveFormMessage, NOTIFICATION_FALLBACK } from './modules/notifications/index.js'
|
||||||
getGlobal,
|
|
||||||
getSiteIntegrations,
|
|
||||||
getSiteSettings,
|
|
||||||
SITE_INTEGRATIONS_SLUG,
|
|
||||||
SITE_SETTINGS_SLUG,
|
|
||||||
} from './modules/payload/index.js'
|
|
||||||
// Lexical → Markdown (pure, no React) — for AI-readable output.
|
|
||||||
export { lexicalToMarkdown } from './modules/richtext/index.js'
|
|
||||||
export { buildSecurityHeaders } from './modules/security/index.js'
|
export { buildSecurityHeaders } from './modules/security/index.js'
|
||||||
export { buildCsp } from './modules/security/index.js'
|
export { buildCsp } from './modules/security/index.js'
|
||||||
export type { BuildCspArgs } from './modules/security/index.js'
|
export type { BuildCspArgs } from './modules/security/index.js'
|
||||||
export type { BuildSecurityHeadersArgs, SecurityHeader } from './modules/security/index.js'
|
|
||||||
export type { PageMetadata, SeoMeta, SeoOption } from './modules/seo/index.js'
|
|
||||||
export {
|
|
||||||
buildHreflangAlternates,
|
|
||||||
buildMetadata,
|
|
||||||
composeTitle,
|
|
||||||
readSiteMetaConfig,
|
|
||||||
slugsAcrossLocales,
|
|
||||||
} from './modules/seo/index.js'
|
|
||||||
export type { SiteMetaConfig } from './modules/seo/index.js'
|
|
||||||
export type { AutoFillMapping, RobotsOptions, RobotsRules, SitemapEntry } from './modules/seo/index.js'
|
|
||||||
export {
|
|
||||||
AI_ASSISTANT_BOTS,
|
|
||||||
AI_TRAINING_BOTS,
|
|
||||||
buildAutoFillMetaHook,
|
|
||||||
buildRobots,
|
|
||||||
buildSitemapEntries,
|
|
||||||
createMetadataGenerator,
|
|
||||||
createPageMetadata,
|
|
||||||
injectAutoFillMeta,
|
|
||||||
} from './modules/seo/index.js'
|
|
||||||
export { createLlmsTxtRoute, createManifestHandler, createSitemapRouteHandler } from './modules/seo/index.js'
|
|
||||||
export { buildIconsMetadata, buildOrganizationJsonLd, validateFaviconField } from './modules/seo/index.js'
|
export { buildIconsMetadata, buildOrganizationJsonLd, validateFaviconField } from './modules/seo/index.js'
|
||||||
export { buildNoindexField } from './modules/seo/index.js'
|
export { buildNoindexField } from './modules/seo/index.js'
|
||||||
|
export { rowLabel } from './modules/admin-ui/index.js'
|
||||||
|
export type { RowLabelProps } from './modules/admin-ui/index.js'
|
||||||
|
export { buildLinkField, buildLinksField, resolveLinkHref } from './modules/links/index.js'
|
||||||
|
export type {
|
||||||
|
LinkAppearance,
|
||||||
|
LinkValue,
|
||||||
|
BuildLinkFieldOptions,
|
||||||
|
BuildLinksFieldOptions,
|
||||||
|
ResolveLinkHrefOptions,
|
||||||
|
} from './modules/links/index.js'
|
||||||
export { buildSpeakableJsonLd } from './modules/seo/index.js'
|
export { buildSpeakableJsonLd } from './modules/seo/index.js'
|
||||||
export { buildSummaryField } from './modules/seo/index.js'
|
export { buildSummaryField } from './modules/seo/index.js'
|
||||||
export { buildBreadcrumbJsonLd, buildSiteNavigationJsonLd, buildWebSiteJsonLd } from './modules/seo/index.js'
|
export { buildWebSiteJsonLd, buildBreadcrumbJsonLd, buildSiteNavigationJsonLd } from './modules/seo/index.js'
|
||||||
// Local SEO structured data — LocalBusiness (map pack), Service (offering), FAQPage.
|
// Local SEO structured data — LocalBusiness (map pack), Service (offering), FAQPage.
|
||||||
export { buildFaqJsonLd, buildLocalBusinessJsonLd, buildServiceJsonLd } from './modules/seo/index.js'
|
export { buildLocalBusinessJsonLd, buildFaqJsonLd, buildServiceJsonLd } from './modules/seo/index.js'
|
||||||
export { buildArticleJsonLd } from './modules/seo/index.js'
|
export { buildArticleJsonLd } from './modules/seo/index.js'
|
||||||
export { buildLlmsTxt } from './modules/seo/index.js'
|
export { buildLlmsTxt } from './modules/seo/index.js'
|
||||||
export { buildSitemapCss, buildSitemapXml, DEFAULT_SITEMAP_CREDIT, SITEMAP_STYLE_PARAM } from './modules/seo/index.js'
|
export { buildSitemapXml, buildSitemapCss, SITEMAP_STYLE_PARAM, DEFAULT_SITEMAP_CREDIT } from './modules/seo/index.js'
|
||||||
export type { SitemapRouteOptions, SitemapStyleOptions } from './modules/seo/index.js'
|
export type { SitemapRouteOptions, SitemapStyleOptions } from './modules/seo/index.js'
|
||||||
export { buildSlugField, toSlug } from './modules/slug/index.js'
|
|
||||||
export { buildR2Storage } from './modules/storage/index.js'
|
export { buildR2Storage } from './modules/storage/index.js'
|
||||||
export { ipalKit } from './plugin.js'
|
export { normalizeFilename, normalizeFilenameHook, buildOptimizeUploadHook, buildOptimizeUploadField } from './modules/media/index.js'
|
||||||
export type { IpalOptions } from './types.js'
|
export type { OptimizeUploadOptions } from './modules/media/index.js'
|
||||||
|
export { buildRevalidateHook, setPublishedAtHook, buildPreventDeleteSystemPage, buildValidateUniqueRole, trackSlugHistoryHook, buildCrossLocaleFieldSync } from './modules/hooks/index.js'
|
||||||
|
export { A11Y_COOKIE, A11Y_DEFAULT, a11yAttributes, parseA11y, serializeA11y } from './modules/accessibility/index.js'
|
||||||
|
export type { A11yState } from './modules/accessibility/index.js'
|
||||||
|
export type { SecurityHeader, BuildSecurityHeadersArgs } from './modules/security/index.js'
|
||||||
|
export type { NotificationTexts, FormNotificationTexts } from './modules/notifications/index.js'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { ArrayField, Field, GroupField } from 'payload'
|
import type { ArrayField, Field, GroupField } from 'payload'
|
||||||
|
|
||||||
import { rowLabel } from 'src/modules/admin-ui/rowLabel.js'
|
import { rowLabel } from '../admin-ui/rowLabel.js'
|
||||||
|
|
||||||
export type LinkAppearance = 'link' | 'primary' | 'secondary'
|
export type LinkAppearance = 'link' | 'primary' | 'secondary'
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ export type BuildLinkFieldOptions = {
|
|||||||
uploadTo?: string
|
uploadTo?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const URL_PATTERN = /^(https?:\/\/|mailto:|tel:|#)/
|
const URL_PATTERN = /^(?:https?:\/\/|mailto:|tel:|#)/
|
||||||
|
|
||||||
type SiblingWithType = { type?: string } | undefined
|
type SiblingWithType = { type?: string } | undefined
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import type { BasePayload } from 'payload'
|
import type { BasePayload } from 'payload'
|
||||||
|
|
||||||
import type { I18nConfig } from '../i18n/index.js'
|
import type { I18nConfig } from '../i18n/index.js'
|
||||||
|
import type { SitemapEntry } from './buildSitemapEntries.js'
|
||||||
|
|
||||||
import { buildLlmsTxt } from './buildLlmsTxt.js'
|
import { buildLlmsTxt } from './buildLlmsTxt.js'
|
||||||
import { buildSitemapXml } from './buildSitemapXml.js'
|
import { buildSitemapXml } from './buildSitemapXml.js'
|
||||||
import type { SitemapEntry } from './buildSitemapEntries.js'
|
|
||||||
import { buildSitemapCss, SITEMAP_STYLE_PARAM, type SitemapStyleOptions } from './sitemapStyle.js'
|
import { buildSitemapCss, SITEMAP_STYLE_PARAM, type SitemapStyleOptions } from './sitemapStyle.js'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -25,13 +27,13 @@ import { buildSitemapCss, SITEMAP_STYLE_PARAM, type SitemapStyleOptions } from '
|
|||||||
* baseUrl: process.env.NEXT_PUBLIC_SERVER_URL!, full: true })
|
* baseUrl: process.env.NEXT_PUBLIC_SERVER_URL!, full: true })
|
||||||
*/
|
*/
|
||||||
export function createLlmsTxtRoute(opts: {
|
export function createLlmsTxtRoute(opts: {
|
||||||
getCachedPayload: () => Promise<BasePayload>
|
|
||||||
config: I18nConfig
|
|
||||||
baseUrl: string
|
baseUrl: string
|
||||||
pagesSlug?: string
|
config: I18nConfig
|
||||||
settingsSlug?: string
|
|
||||||
/** Inline every page's full Markdown (llms-full.txt). Default false. */
|
/** Inline every page's full Markdown (llms-full.txt). Default false. */
|
||||||
full?: boolean
|
full?: boolean
|
||||||
|
getCachedPayload: () => Promise<BasePayload>
|
||||||
|
pagesSlug?: string
|
||||||
|
settingsSlug?: string
|
||||||
/** Field holding a richer AI summary (buildSummaryField) to prefer as description. */
|
/** Field holding a richer AI summary (buildSummaryField) to prefer as description. */
|
||||||
summaryField?: string
|
summaryField?: string
|
||||||
}): () => Promise<Response> {
|
}): () => Promise<Response> {
|
||||||
@@ -39,12 +41,12 @@ export function createLlmsTxtRoute(opts: {
|
|||||||
try {
|
try {
|
||||||
const payload = await opts.getCachedPayload()
|
const payload = await opts.getCachedPayload()
|
||||||
const body = await buildLlmsTxt({
|
const body = await buildLlmsTxt({
|
||||||
payload,
|
|
||||||
config: opts.config,
|
|
||||||
baseUrl: opts.baseUrl,
|
baseUrl: opts.baseUrl,
|
||||||
pagesSlug: opts.pagesSlug,
|
config: opts.config,
|
||||||
settingsSlug: opts.settingsSlug,
|
|
||||||
full: opts.full,
|
full: opts.full,
|
||||||
|
pagesSlug: opts.pagesSlug,
|
||||||
|
payload,
|
||||||
|
settingsSlug: opts.settingsSlug,
|
||||||
summaryField: opts.summaryField,
|
summaryField: opts.summaryField,
|
||||||
})
|
})
|
||||||
return new Response(body, {
|
return new Response(body, {
|
||||||
@@ -62,15 +64,15 @@ export function createLlmsTxtRoute(opts: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type SitemapRouteOptions = {
|
export type SitemapRouteOptions = {
|
||||||
|
/** Legacy: your own stylesheet URL (e.g. '/sitemap.css'). Overrides `style`. */
|
||||||
|
cssUrl?: string
|
||||||
/**
|
/**
|
||||||
* Built-in browser look (default ON): the XML points at `<this route>?style`
|
* Built-in browser look (default ON): the XML points at `<this route>?style`
|
||||||
* and the same handler serves the CSS — nothing to copy into /public.
|
* and the same handler serves the CSS — nothing to copy into /public.
|
||||||
* `false` = raw XML. Object = header/credit/accent (SitemapStyleOptions);
|
* `false` = raw XML. Object = header/credit/accent (SitemapStyleOptions);
|
||||||
* `title` may be async (sitemapRoute passes the Site Settings name).
|
* `title` may be async (sitemapRoute passes the Site Settings name).
|
||||||
*/
|
*/
|
||||||
style?: false | (Omit<SitemapStyleOptions, 'title'> & { title?: string | (() => Promise<string | undefined>) })
|
style?: ({ title?: (() => Promise<string | undefined>) | string } & Omit<SitemapStyleOptions, 'title'>) | false
|
||||||
/** Legacy: your own stylesheet URL (e.g. '/sitemap.css'). Overrides `style`. */
|
|
||||||
cssUrl?: string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -102,8 +104,8 @@ export function createSitemapRouteHandler(
|
|||||||
}
|
}
|
||||||
return new Response(buildSitemapCss({ ...style, title }), {
|
return new Response(buildSitemapCss({ ...style, title }), {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'text/css; charset=utf-8',
|
|
||||||
'Cache-Control': 'public, max-age=3600',
|
'Cache-Control': 'public, max-age=3600',
|
||||||
|
'Content-Type': 'text/css; charset=utf-8',
|
||||||
'X-Robots-Tag': 'noindex',
|
'X-Robots-Tag': 'noindex',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const cssString = (s: string) => `"${s.replace(/\\/g, '\\\\').replace(/"/g, '\\"
|
|||||||
|
|
||||||
/** Only plain colour values — the option ends up inside a stylesheet. */
|
/** Only plain colour values — the option ends up inside a stylesheet. */
|
||||||
const safeColor = (c: string | undefined, fallback: string) =>
|
const safeColor = (c: string | undefined, fallback: string) =>
|
||||||
c && /^(#[0-9a-f]{3,8}|[a-z]+|(rgb|hsl|oklch)a?\([\d\s.,%/-]+\))$/i.test(c.trim()) ? c.trim() : fallback
|
c && /^(?:#[0-9a-f]{3,8}|[a-z]+|(?:rgb|hsl|oklch)a?\([\d\s.,%/-]+\))$/i.test(c.trim()) ? c.trim() : fallback
|
||||||
|
|
||||||
export function buildSitemapCss({ accent, credit, title }: SitemapStyleOptions = {}): string {
|
export function buildSitemapCss({ accent, credit, title }: SitemapStyleOptions = {}): string {
|
||||||
const heading = title?.trim() || 'XML Sitemap'
|
const heading = title?.trim() || 'XML Sitemap'
|
||||||
|
|||||||
Reference in New Issue
Block a user