Files
ipal-kit/src/index.ts
T
Radosław SmolińskiandClaude Fable 5.2 425fac14fb IAPL rename: the old names keep working, and a second cookie name and counter key for new sites
- exports: ipalKit, IpalOptions, ipalEnvRules, IpalEnvFeatures, ipalT, ipalVar, IPAL_TOKENS,
  IPAL_BREAKPOINTS, IpalTokenName, IpalGlobalSlug are aliases of the iapl names
- env: IAPL_* is read first, IPAL_* as fallback (readEnv; EnvRule.aliases for assertEnv);
  the crawler service reads IPAL_CRAWLER_SITES too
- doctor: reads ipal-doctor.json when it is the only one, the old pointer block, ipal-audit-skip
  and old skill folders; new rule legacy-names (info) and storage-names (warning)
- iapl-skills: installs iapl-*, removes the 16 old folders by exact name, rewrites the old
  pointer block in place; a project's own ipal-* skill stays
- storageNames: 'ipal' (default) | 'iapl': the cookie the scanner declares and the 2FA counter's
  kv prefix; <PageStats visitorCookie>, IAPL_VISITOR_COOKIE, verifyLimit.keyPrefix
- test/legacyNames.test.ts: 24 tests for all of the above

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-25 17:31:13 +01:00

470 lines
21 KiB
TypeScript

export { lightboxNotificationFields } from './globals/Notifications/fields.js'
export { applyGlobalOverrides } from './globals/overrides.js'
export type { GlobalOverride, GlobalOverrides, IaplGlobalSlug, IpalGlobalSlug } from './globals/overrides.js'
export type { AccessOption, Role } from './modules/access/index.js'
export {
adminOnly,
adminOnlyField,
adminOrEditor,
adminOrEditorField,
adminOrSelf,
adminOrSelfIn,
authenticated,
buildRolesField,
hasMinimumRole,
injectRoles,
isAdmin,
isEditor,
requireRole,
requireRoleField,
ROLE_HIERARCHY,
staffCollectionSlugs,
userMeetsRole,
} from './modules/access/index.js'
export { applyPanelRole, countBelowPanelRole, DEFAULT_PANEL_ROLE, panelAccess, resolvePanelRole } from './modules/access/panelRole.js'
export { applyPasswordRule, buildPasswordRuleHook, checkPassword, DEFAULT_PASSWORD_MIN_LENGTH, resolvePasswordRule } from './modules/access/passwordRule.js'
export type { PasswordRuleOptions } from './modules/access/passwordRule.js'
export { isPasswordRuleHook, staffRuleOf } from './modules/access/ruleMark.js'
export type { StaffRuleMark } from './modules/access/ruleMark.js'
export {
adoptLateAuthCollections,
applyFirstUserRoute,
applyStaffAccountAccess,
bothAllow,
buildFirstUserEndpoint,
canHoldStaffRole,
hasPluginRoles,
openSignUpCollections,
rolesAreAList,
rolesByAdminOnly,
rolesNotOwn,
sameStaffCollectionAccess,
staffCollectionsNobodyManages,
staffCollectionsOnOwnRoles,
staffCollectionsOpenToOthers,
staffCreateAccess,
staffReadAccess,
staffUpdateAccess,
unknownStaffCollections,
} from './modules/access/selfRegistration.js'
export type { AccountsMarker, LateAdoption, StaffAccountAccessOptions, StaffAccountRules } from './modules/access/selfRegistration.js'
export type { FirstUserRouteOption } from './modules/access/selfRegistration.js'
export type { AccountsOptions } from './modules/access/types.js'
// Concrete files, not module barrels: a barrel that also re-exports 'use client'
// components would load React UI into payload.config / the CLI (test/entryGraph).
export { A11Y_COOKIE, A11Y_DEFAULT, a11yAttributes, parseA11y, serializeA11y } from './modules/accessibility/state.js'
export type { A11yState } from './modules/accessibility/state.js'
export { applyAdminI18n } from './modules/admin-i18n/apply.js'
export { ADMIN_LANGUAGES, adminDocumentTitle, adminTexts, defineTexts, formatDateTime, formatNumber, iaplT, ipalT } from './modules/admin-i18n/index.js'
export type { AdminLanguage, AdminText, AdminTextKey } from './modules/admin-i18n/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 { shouldLoadGoogle } from './modules/analytics/shouldLoadGoogle.js'
// Shared section fields (header: eyebrow/heading/intro, settings: anchor/background).
export { blockHasImage, blockPosition } from './modules/blocks/position.js'
export { buildSectionHeaderField, buildSectionSettingsField } from './modules/blocks/sectionFields.js'
export type { SectionHeaderFieldOptions, SectionSettingsFieldOptions } from './modules/blocks/sectionFields.js'
export { buildAdminImageEndpoints } from './modules/branding/adminImages.js'
export { ADMIN_META_TEXTS, adminMetaForSite, buildAdminMeta, DEFAULT_AGENCY, syncAdminMeta } from './modules/branding/adminMeta.js'
export type { AdminMetaOptions, AgencyOption, ResolvedAdminMeta } from './modules/branding/adminMeta.js'
export { fetchPublicImage, PUBLIC_IMAGE_MAX_BYTES, publicImageDataUri, rasterImageType, siteOrigin } from './modules/branding/publicImage.js'
export {
ACCEPT_ALL_CONSENT,
buildConsentLogCollection,
buildConsentLogEndpoint,
CONSENT_CATEGORIES,
CONSENT_CATEGORY_LABELS,
CONSENT_COOKIE,
CONSENT_FALLBACK,
CONSENT_FALLBACK_PL,
CONSENT_LOG_SLUG,
CONSENT_MAX_AGE,
CONSENT_VERSION,
consentCategoryOptions,
consentFallback,
DEFAULT_CONSENT,
getConsentTexts,
getCookieTable,
parseConsent,
readConsentRecord,
REJECT_ALL_CONSENT,
serializeConsent,
setDefaultConsent,
updateConsent,
} from './modules/consent/index.js'
export type { ConsentCategory, ConsentLogOptions, ConsentState, ConsentStorage, ConsentTexts, CookieTableRow } from './modules/consent/index.js'
// Cookie scanner — review list, scan, declarations, Open Cookie Database lookup (docs/cookie-scanner.md).
export {
addCookieScannerTabs,
addToCookieList,
applyCookieFindings,
approveCookies,
bearerMatches,
buildCookieApprovalEndpoints,
buildCookieCrawlEndpoints,
buildCookieCrawlGlobal,
buildCookieReviewCollection,
buildCookieScanEndpoints,
collectCookieFindings,
COOKIE_APPROVAL_PATH,
COOKIE_APPROVAL_VIEW_PATH,
COOKIE_CRAWL_PATH,
COOKIE_CRAWL_RESULTS_PATH,
COOKIE_CRAWL_SLUG,
COOKIE_REVIEW_SLUG,
COOKIE_SCAN_LABELS,
COOKIE_SCAN_PATH,
COOKIE_SCAN_TOKEN_ENV,
COOKIE_SCAN_URL_ENV,
cookieNameMatches,
cookieScanContext,
countPendingCookies,
DEFAULT_COOKIE_INTEGRATIONS,
DEFAULT_DATABASE_CATEGORIES,
DEFAULT_TRACKER_HOSTS,
DEFAULT_UNKNOWN_CATEGORY,
findCrawlViolations,
finishCrawl,
flagGoneEntries,
GOOGLE_TAG_HOSTS,
indexCookieDatabase,
ingestCrawlResult,
loadCookieApproval,
loadCookieDatabase,
lookupCookie,
mergeCookieReview,
mergeCookieScanLabels,
nextChange,
parseCookieNames,
parseCrawlResult,
PENDING_WHERE,
resolveCrawlConfig,
runCookieScan,
sameCookie,
sendCrawlWarning,
suggestionFor,
} from './modules/consent/scanner/index.js'
export type {
CookieApprovalItem,
CookieApprovalList,
CookieApprovalOptions,
CookieApprovalResult,
CookieChange,
CookieCrawlOptions,
CookieDatabaseIndex,
CookieDeclaration,
CookieFinding,
CookieFindingSource,
CookieIntegration,
CookieObservation,
CookieReviewEntryRef,
CookieReviewValues,
CookieScanContext,
CookieScanLabels,
CookieScannerOptions,
CookieScanSummary,
CookieStorage,
CrawlIngestSummary,
CrawlObservation,
CrawlRequest,
CrawlResult,
CrawlViolation,
LocalizedText,
OpenCookieCategory,
ResolvedCrawlConfig,
} from './modules/consent/scanner/index.js'
export { constructionNoticeHref, isPathAllowed, isPathVisibleIn } from './modules/construction/logic.js'
export { CONSTRUCTION_CLOSE_LABEL, CONSTRUCTION_CLOSE_LABEL_PL, constructionCloseLabel } from './modules/construction/texts.js'
export type { ConstructionMode } from './modules/construction/types.js'
export { CONSTRUCTION_NOTICE_PARAM } from './modules/construction/types.js'
export { pathOf } from './modules/construction/visibility.js'
export type { PathVisibility } from './modules/construction/visibility.js'
export type { ContentCollectionOption, ContentOption, ResolvedRoute } from './modules/content/index.js'
export {
archiveFieldName,
blocksToMarkdown,
buildArchivePath,
buildEntryPath,
createMarkdownRenderer,
createMarkdownRoute,
createSearchRoute,
getArchiveEntries,
listContent,
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'
// Files on panel forms (forms.attachments): checked, e-mailed, never stored.
export { mailAttachmentLimit } from './modules/email/attachmentLimit.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'
// 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, checkDatabaseName, databaseNameFromUri, databaseNamesFor, iaplEnvRules, ipalEnvRules } from './modules/env/index.js'
export type { AssertEnvOptions, EnvKind, EnvRule, IaplEnvFeatures, IpalEnvFeatures } from './modules/env/index.js'
export type { FormAttachmentsOption, FormFileScanInput, FormFileScanResult, FormSubmitEndpointOptions } from './modules/forms/attachments/config.js'
export { buildFileBlock, fileBlock } from './modules/forms/attachments/fileBlock.js'
export { FORM_FILE_TYPES, formatFileSize, RISKY_FILE_EXTENSIONS } from './modules/forms/attachments/fileTypes.js'
export type { FormFileDetect, FormFileType } from './modules/forms/attachments/fileTypes.js'
export { checkboxGroupBlock, placeholderField, stepBlock, timeBlock, withPlaceholder } from './modules/forms/builderBlocks.js'
export { initialBuilderValues, inputFields, splitSteps, stepOfField, validateBuilderFields, visibleFields } from './modules/forms/builderLogic.js'
export type { BuilderField, BuilderFileLimits, BuilderFormDoc, BuilderFormTexts, BuilderStep, FieldCondition } from './modules/forms/builderTypes.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 {
buildValidator,
checked,
custom,
email,
isEmail,
localizedRules,
maxLength,
minLength,
pattern,
required,
VALIDATION_MESSAGES,
validationMessages,
} from './modules/forms/validators.js'
export type { Rule, ValidationMessages } from './modules/forms/validators.js'
export type { ContentHelpers, EntryJsonLdContext, PageJsonLdOptions, SiteShell } from './modules/frontend/createContentHelpers.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,
buildFillEmptyLocalesCollectionHook,
buildFillEmptyLocalesGlobalHook,
buildGlobalRevalidateHook,
buildPreventDeleteSystemPage,
buildRevalidateHook,
buildValidateUniqueRole,
fillEmptyLocales,
setPublishedAtHook,
trackSlugHistoryHook,
withFillLocales,
} from './modules/hooks/index.js'
export type { FillEmptyLocalesTarget } from './modules/hooks/index.js'
export { createProxy, DEFAULT_PROXY_MATCHER } from './modules/i18n/createProxy.js'
export { getLocalizedSlugs } from './modules/i18n/getLocalizedSlugs.js'
export { getDefaultLocale, getLocaleCodes, getLocaleDefinition, isValidLocale } from './modules/i18n/helpers.js'
export type { I18nConfig, LocaleDefinition, LocalizedSlugs } from './modules/i18n/index.js'
export { createLocaleMiddleware, DEFAULT_MIDDLEWARE_MATCHER } from './modules/i18n/localeMiddleware.js'
export type { LocaleMiddlewareResult } from './modules/i18n/localeMiddleware.js'
export { buildLocalizedPath, switchLocalePath } from './modules/i18n/localizedPath.js'
export { LOCALE_COOKIE_NAME, matchAcceptLanguage, negotiateLocale } from './modules/i18n/negotiateLocale.js'
export { resolveLocalized } from './modules/i18n/resolveLocalized.js'
export { buildIntegrationStatusBanner, buildIntegrationStatusField, recordIntegrationStatus } from './modules/integrations/index.js'
export type { IntegrationBannerTexts, IntegrationLabel, IntegrationState, IntegrationStatus } from './modules/integrations/index.js'
// Image lightbox — pure helpers (components live in /client).
export { formatLightboxCounter, LIGHTBOX_FALLBACK, LIGHTBOX_FALLBACK_PL, lightboxFallback, lightboxImage, lightboxIndex, resolveLightboxTexts } from './modules/lightbox/index.js'
export type { LightboxClassNames, LightboxImage, LightboxImageOptions, LightboxRenderImage, LightboxTexts } from './modules/lightbox/index.js'
export { buildLinkField, buildLinksField, homeSlugFrom, resolveLink, resolveLinkHref, resolveNav, resolveSystemLinks, safeHref } from './modules/links/index.js'
export type {
BuildLinkFieldOptions,
BuildLinksFieldOptions,
LinkAppearance,
LinkAppearanceOption,
LinkValue,
NavItem,
ResolvedLink,
ResolveLinkHrefOptions,
ResolveNavOptions,
SystemLink,
} from './modules/links/index.js'
// Read-only MCP server (Claude/agents connect to the site and query it).
export { createMcpRoute } from './modules/mcp/index.js'
export { buildOptimizeUploadField, buildOptimizeUploadHook, normalizeFilename, normalizeFilenameHook } from './modules/media/index.js'
export type { OptimizeUploadOptions } from './modules/media/index.js'
export {
buildMediaPlaceholderField,
buildMediaPlaceholderHook,
MEDIA_SIZES,
mediaImageProps,
videoProps,
} from './modules/media/index.js'
export type { MediaImageOptions, MediaImageProps, VideoMode, VideoProps } from './modules/media/index.js'
export { getNotificationTexts, NOTIFICATION_FALLBACK, NOTIFICATION_FALLBACK_PL, notificationFallback, resolveFormMessage } from './modules/notifications/index.js'
export type { FormNotificationTexts, NotificationTexts } from './modules/notifications/index.js'
export type { PagesOption, SystemPageRole } from './modules/pages/index.js'
export { ALL_SYSTEM_PAGE_ROLES, getSystemPagePath, unlistedPageIds } from './modules/pages/index.js'
export type { GlobalQueryOptions } from './modules/payload/index.js'
export {
getGlobal,
getSiteIntegrations,
getSiteSettings,
SITE_INTEGRATIONS_SLUG,
SITE_SETTINGS_SLUG,
} from './modules/payload/index.js'
export { buildTableOfContentsField, extractHeadings, headingText } from './modules/richtext/headings.js'
export type { ExtractHeadingsOptions, HeadingItem, HeadingLevel } from './modules/richtext/headings.js'
// Lexical → Markdown (pure, no React) — for AI-readable output.
export { lexicalToMarkdown } from './modules/richtext/lexicalToMarkdown.js'
export {
buildKeepSecret,
INTEGRATION_SECRET_FIELDS,
isSecretMask,
keepSecretBeforeValidate,
maskSecretAfterRead,
maskSecretsOnRestore,
maskWriteOnlySecrets,
SECRET_CLEAR,
SECRET_MASK,
SMTP_PASSWORD_BOUND_TO,
writeOnlySecret,
writeOnlySecrets,
} from './modules/secrets/writeOnly.js'
export type { WriteOnlySecretOptions } from './modules/secrets/writeOnly.js'
export {
buildAdminCsp,
buildAdminCspHeaders,
buildCsp,
buildCspHeaders,
buildReportingEndpoints,
buildSecurityHeaders,
buildUploadSecurityHeaders,
createCspNonce,
createCspReportRoute,
CSP_NONCE_HEADER,
cspHeaderKey,
DEFAULT_CSP_REPORT_GROUP,
parseCspReports,
totpAdminPath,
totpRedirectTarget,
UPLOAD_SECURITY_HEADERS,
withSecurityConfig,
} from './modules/security/index.js'
export type {
BuildAdminCspArgs,
BuildCspArgs,
CreateCspReportRouteArgs,
CspDirective,
CspSources,
CspViolation,
TotpRedirectArgs,
TotpUser,
WithSecurityConfigOptions,
} from './modules/security/index.js'
export type { BuildSecurityHeadersArgs, SecurityHeader } from './modules/security/index.js'
export { findImportMapFile, missingImportMapEntries } from './modules/security/totp/importMapCheck.js'
export { changedViewKeys, copyViews, SAFE_TOTP_VIEW, safeAdminBack, totpViewImportKey, wrapTotpViews } from './modules/security/totp/safeBack.js'
export type { SafeBackContext, SafeBackRule, TotpViewComponent } from './modules/security/totp/safeBack.js'
export { ownOrigins, reportRefusedOrigin, requestFromOwnOrigin } from './modules/security/totp/sameOrigin.js'
export { requireSecondFactor, secondFactorPassed, twoFactorSetupDeadline, twoFactorSetupState } from './modules/security/totp/secondFactor.js'
export type { TwoFactorSetupState } from './modules/security/totp/secondFactor.js'
export { SETUP_FROM_FIELD } from './modules/security/totp/secondFactor.js'
export {
backfillSetupFrom,
buildSetupFields,
buildTwoFactorResetEndpoint,
countAccountsWithoutTotp,
DEFAULT_SETUP_WINDOW_HOURS,
resolveRequireSetup,
stampSetupFrom,
strictExempt,
TWO_FACTOR_RESET_PATH,
} from './modules/security/totp/setupRequired.js'
export type { RequireSetupOptions, TwoFactorResetOptions } from './modules/security/totp/setupRequired.js'
export { TOTP_TEXTS, TOTP_VIEW_TITLE } from './modules/security/totp/totpTexts.js'
export { buildVerifyLimit, clearVerifyLimits, verifyLimitKey } from './modules/security/totp/verifyLimit.js'
export type { VerifyLimitOptions } from './modules/security/totp/verifyLimit.js'
export type { OgImage } from './modules/seo/buildMetadata.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 { collectSiteIndex } from './modules/seo/index.js'
export {
buildIndexNowHook,
createIndexNowKeyRoute,
getIndexNowKey,
INDEXNOW_KEY_ENV,
INDEXNOW_KEY_PATH,
submitToIndexNow,
} from './modules/seo/index.js'
export type { CollectSiteIndexArgs, SiteIndexEntry } 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, FAVICON_MIN_SIZE, faviconProblems, sameAsUrls, validateFaviconField } from './modules/seo/index.js'
export type { FaviconProblem } from './modules/seo/index.js'
export { buildNoindexField } from './modules/seo/index.js'
export { buildSpeakableJsonLd } from './modules/seo/index.js'
export { buildSummaryField, SKIP_AUTO_FILL } from './modules/seo/index.js'
export { buildBreadcrumbJsonLd, buildNavigationJsonLd, buildSiteNavigationJsonLd, buildWebSiteJsonLd } from './modules/seo/index.js'
// Local SEO structured data — LocalBusiness (map pack), Service (offering), FAQPage.
export { buildFaqJsonLd, buildLocalBusinessJsonLd, buildServiceJsonLd } from './modules/seo/index.js'
export { buildArticleJsonLd, buildProductJsonLd, buildWebPageJsonLd, formatOpeningHours } from './modules/seo/index.js'
export { buildLlmsTxt } from './modules/seo/index.js'
// Site Settings → Title separator: stored name → character; SQL for the 1.14.x → GraphQL-safe values migration.
export { TITLE_SEPARATORS, titleSeparatorChar, titleSeparatorSql } from './modules/seo/index.js'
export type { TitleSeparatorName } from './modules/seo/index.js'
// Site Settings → Search engines: verification codes and AI crawler rules, for custom metadata/robots routes.
export { robotsOptionsFrom, verificationFrom } from './modules/seo/index.js'
export type { AiBotRule, AiBotsPolicy, VerificationMetadata } from './modules/seo/index.js'
export { buildSitemapCss, buildSitemapIndexXml, buildSitemapXml, DEFAULT_SITEMAP_CREDIT, SITEMAP_STYLE_PARAM } from './modules/seo/index.js'
export type { SitemapRouteOptions, SitemapStyleOptions } from './modules/seo/index.js'
export { applyCollectionOverride } from './modules/shared/collectionOverride.js'
export type { CollectionOverride } from './modules/shared/collectionOverride.js'
export { clientIp, setRateLimitStore, setUnknownIpFactor, UNKNOWN_IP_FACTOR } from './modules/shared/rateLimit.js'
export type { ClientIpOptions, RateLimitStore } from './modules/shared/rateLimit.js'
export { buildSlugField, toSlug } from './modules/slug/index.js'
export { STATS_SLUG } from './modules/stats/index.js'
export type { StatsOptions, StatsPage, StatsVisit } from './modules/stats/index.js'
export { IAPL_VISITOR_COOKIE, VISITOR_COOKIE, visitorCookieFor } from './modules/stats/visitorCookie.js'
export type { StorageNames } from './modules/stats/visitorCookie.js'
export { buildImagesConfig } from './modules/storage/buildImagesConfig.js'
export type { ImagesConfig } from './modules/storage/buildImagesConfig.js'
export { buildR2Storage } from './modules/storage/index.js'
export { isTheme, isThemeSetting, LEGACY_THEME_STORAGE_KEY, THEME_ATTRIBUTE, THEME_STORAGE_ATTRIBUTE, THEME_STORAGE_KEY, themeConfigFrom, themeScript } from './modules/theme/index.js'
export type { Theme, ThemeConfig, ThemeSetting } from './modules/theme/index.js'
// Imported from the file, not the turnstile barrel — that one re-exports verify,
// which imports 'server-only'.
export { defineTokens, IAPL_BREAKPOINTS, IAPL_TOKENS, iaplVar, IPAL_BREAKPOINTS, IPAL_TOKENS, ipalVar } from './modules/tokens/index.js'
export type { IaplTokenName, IpalTokenName, TokensInput } from './modules/tokens/index.js'
export { getTurnstileConfig, TURNSTILE_SECRET_ENV, turnstileSecretFromEnv } from './modules/turnstile/config.js'
export type { TurnstileConfig } from './modules/turnstile/config.js'
export { iapl, ipalKit } from './plugin.js'
export type { IaplOptions, IpalOptions, ThemeOptions } from './types.js'