import type { EponymeImageValue, SectionFieldDefinition } from '../types/field.js'; export interface SeoFieldOptions { label?: string; description?: string; /** Emits the sharing image. Defaults to `true`. */ image?: boolean; /** Emits the Open Graph overrides and the switch that mirrors the page values. Defaults to `true`. */ social?: boolean; /** * Emits the indexing switches: `noindex`, `nofollow`, and `excludeFromSitemap` for a page that stays * indexable but out of the sitemap. Defaults to `true`. */ robots?: boolean; /** Emits the canonical URL, a path or an absolute `http(s)` URL. Defaults to `true`. */ canonical?: boolean; /** Constants for the whole site rather than per-entry fields, so they are not stored on every entry. */ siteName?: string; themeColor?: string; } /** What an entry stores. Every part is optional: an unfilled entry falls back to the page. */ export interface EponymeSeoValue { title?: string; description?: string; /** A bare address is what this field stored before images were objects; it is still read. */ image?: EponymeImageValue | string | null; shareSameAsPage?: boolean; ogTitle?: string; ogDescription?: string; /** Asks search engines not to index the page. Also keeps it out of the sitemap. */ noindex?: boolean; /** Asks search engines not to follow the links of the page. */ nofollow?: boolean; /** A path (`/articles/original`) or an absolute URL. Empty means the page's own URL. */ canonical?: string; /** Leaves an indexable page out of the sitemap. A `noindex` page is left out regardless. */ excludeFromSitemap?: boolean; } /** What `resolveEponymeSeo` returns. */ export interface EponymeResolvedSeo { title?: string; description?: string; image?: string; /** Text alternative of `image`, for `og:image:alt`. */ imageAlt?: string; ogTitle?: string; ogDescription?: string; siteName?: string; themeColor?: string; noindex: boolean; nofollow: boolean; /** `noindex, nofollow`-style value, or `undefined` when the page is indexed and followed. */ robots?: string; canonical?: string; excludeFromSitemap: boolean; } export interface EponymeSeoDefinition extends SectionFieldDefinition { seo: { siteName?: string; themeColor?: string; }; } /** * A `field.section()` carrying the usual SEO fields, the way `money` is a `field.number()` carrying a * currency: a preset, not a type of its own. */ export declare function seo(options?: SeoFieldOptions): EponymeSeoDefinition; /** Whether a stored SEO value keeps its page out of the sitemap. Unknown shapes keep it in. */ export declare function isEponymeSeoExcludedFromSitemap(value: unknown): boolean; /** The values to render, with the sharing ones filled in. */ export declare function resolveEponymeSeo(value: EponymeSeoValue | null | undefined, definition?: Pick): EponymeResolvedSeo; /** Whether a field definition is a `field.seo()` preset. */ export declare function isEponymeSeoDefinition(definition: unknown): definition is EponymeSeoDefinition; /** * Where each `field.seo()` of a schema stores its value, as key paths: `['seo']`, or `['meta', 'seo']` * inside a section, or `['options', 'seo', 'seo']` inside a tab. Arrays are not searched: an SEO value * belongs to the page, not to an item of a list. */ export declare function findEponymeSeoPaths(schema: Record, prefix?: string[]): string[][]; /** Whether any SEO value of an entry keeps it out of the sitemap. */ export declare function isEponymeEntryExcludedFromSitemap(data: unknown, seoPaths: string[][]): boolean;