gate locale behind functional consent
This commit is contained in:
Vendored
-11
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Builds a beforeChange hook that fills empty SEO meta fields from document
|
||||
* content. Only fills when the meta field is blank — never overwrites what an
|
||||
* editor typed. This runs server-side on every create/update, so editors get
|
||||
* sensible meta without clicking "auto-generate".
|
||||
*
|
||||
* The plugin doesn't know the client's collection shape, so the field mapping
|
||||
* is configurable; defaults follow the website template.
|
||||
*/ export { };
|
||||
|
||||
//# sourceMappingURL=autoFillMeta.d.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["autoFillMeta.d.ts"],"sourcesContent":["import type { CollectionBeforeChangeHook } from 'payload';\n/**\n * Maps document fields to SEO meta fields for auto-fill.\n * Defaults match the Payload website template (title → meta.title).\n */\nexport type AutoFillMapping = {\n /** Document field used to fill meta.description when empty. */\n description?: string;\n /** Document field used to fill meta.title when empty. Default: 'title'. */\n title?: string;\n};\n/**\n * Builds a beforeChange hook that fills empty SEO meta fields from document\n * content. Only fills when the meta field is blank — never overwrites what an\n * editor typed. This runs server-side on every create/update, so editors get\n * sensible meta without clicking \"auto-generate\".\n *\n * The plugin doesn't know the client's collection shape, so the field mapping\n * is configurable; defaults follow the website template.\n */\nexport declare function buildAutoFillMetaHook(mapping?: AutoFillMapping): CollectionBeforeChangeHook;\n"],"names":[],"mappings":"AAWA;;;;;;;;CAQC,GACD,WAAqG"}
|
||||
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
export { };
|
||||
|
||||
//# sourceMappingURL=buildMetadata.d.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["buildMetadata.d.ts"],"sourcesContent":["import type { I18nConfig, LocalizedSlugs } from '../i18n/index.js';\nimport type { TitleOrder } from './composeTitle.js';\nimport type { SeoMeta } from './types.js';\n/**\n * Subset of Next.js `Metadata` this helper produces. Kept local so the plugin\n * doesn't depend on `next` types; the shape is assignable to Next's Metadata.\n */\nexport type PageMetadata = {\n alternates?: {\n canonical?: string;\n languages?: Record<string, string>;\n };\n description?: string;\n openGraph?: {\n description?: string;\n images?: {\n url: string;\n }[];\n locale?: string;\n title: string;\n };\n title: string;\n};\ntype BuildMetadataArgs = {\n /** Absolute site origin, e.g. 'https://example.com'. */\n baseUrl?: string;\n config: I18nConfig;\n /** Home slug that collapses to the locale root. Defaults to 'home'. */\n homeSlug?: string;\n /** Resolved OG image URL (page image or site defaultShareImage). */\n imageUrl?: null | string;\n /** Current locale being rendered. */\n locale: string;\n /** SEO meta from the document (plugin-seo group). */\n meta?: null | SeoMeta;\n /** Page title or site name first. Defaults to 'page-first'. */\n order?: TitleOrder;\n /**\n * Localized segment the document lives under (an archive page's slugs).\n * Feeds both canonical and hreflang, so /pl/artykuly/moj-post and\n * /en/articles/my-post point at each other correctly.\n */\n prefix?: LocalizedSlugs;\n /**\n * Query string appended to canonical and every hreflang, e.g. '?page=2'.\n *\n * A paginated listing must be canonical to itself — pointing page 2 at page 1\n * tells Google the entries on it don't exist. Alternates carry the same page,\n * since /pl/artykuly?page=2 corresponds to /en/articles?page=2.\n */\n query?: string;\n /** Separator between page title and site name. Defaults to ' | '. */\n separator?: string;\n /** Site name for title composition and OG. */\n siteName?: null | string;\n /** slug per locale for this document — drives canonical + hreflang. */\n slugs: LocalizedSlugs;\n};\n/**\n * Assembles a Next.js-compatible Metadata object from document SEO fields and\n * site-level data. Locale-aware: canonical points at the current locale's\n * path, and hreflang alternates cover every locale the document exists in.\n *\n * Designed for use inside Next.js `generateMetadata`. The caller resolves the\n * pieces (meta group, site name, image URL, localized slugs) and passes them\n * in — the plugin composes, it doesn't fetch.\n */\nexport declare function buildMetadata({ baseUrl, config, homeSlug, imageUrl, locale, meta, order, prefix, query, separator, siteName, slugs, }: BuildMetadataArgs): PageMetadata;\nexport {};\n"],"names":[],"mappings":"AAoEA,WAAU"}
|
||||
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
export { };
|
||||
|
||||
//# sourceMappingURL=buildRobots.d.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["buildRobots.d.ts"],"sourcesContent":["type BuildRobotsArgs = {\n /** Absolute origin, e.g. 'https://example.com'. */\n baseUrl: string;\n /** Paths to disallow. Defaults to Payload's admin and API. */\n disallow?: string[];\n /** Whether to advertise the sitemap. Defaults to true. */\n sitemap?: boolean;\n};\n/**\n * Shape for Next's `app/robots.ts`.\n */\nexport type RobotsRules = {\n host?: string;\n rules: {\n allow?: string;\n disallow?: string[];\n userAgent: string;\n };\n sitemap?: string;\n};\n/**\n * Builds robots rules that allow crawling everything except the admin panel and\n * API, and point crawlers at the sitemap.\n *\n * ```ts\n * // app/robots.ts\n * export default function robots() {\n * return buildRobots({ baseUrl: process.env.NEXT_PUBLIC_SERVER_URL! })\n * }\n * ```\n *\n * The admin and API are disallowed by default — no reason for them in the index,\n * and it keeps crawl budget on real content.\n */\nexport declare function buildRobots({ baseUrl, disallow, sitemap, }: BuildRobotsArgs): RobotsRules;\nexport {};\n"],"names":[],"mappings":"AAmCA,WAAU"}
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
export { };
|
||||
|
||||
//# sourceMappingURL=buildSitemapEntries.d.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["buildSitemapEntries.d.ts"],"sourcesContent":["import type { BasePayload } from 'payload';\nimport type { ContentOption } from '../content/index.js';\nimport type { I18nConfig } from '../i18n/index.js';\n/**\n * One sitemap entry, shaped for Next's `app/sitemap.ts`.\n *\n * `alternates.languages` is the important part for a multilingual site: Next\n * renders it as `<xhtml:link rel=\"alternate\" hreflang=…>` per URL, which is\n * exactly what Google uses to connect language versions. A sitemap without it\n * is the common, weaker kind.\n */\nexport type SitemapEntry = {\n alternates?: {\n languages: Record<string, string>;\n };\n changeFrequency?: 'always' | 'daily' | 'hourly' | 'monthly' | 'never' | 'weekly' | 'yearly';\n lastModified?: Date | string;\n priority?: number;\n url: string;\n};\ntype BuildSitemapArgs = {\n /** Absolute origin, e.g. 'https://example.com'. Required for valid sitemap URLs. */\n baseUrl: string;\n changeFrequency?: SitemapEntry['changeFrequency'];\n config: I18nConfig;\n /** Archive-backed collections, same value as the plugin option. */\n content?: ContentOption;\n /**\n * Slug of the page that is the site root (collapses to /{locale}).\n * Read from System Pages when omitted.\n */\n homeSlug?: string;\n /** Pages collection slug. Defaults to 'pages'. */\n pagesSlug?: string;\n payload: BasePayload;\n /** SiteSettings global slug. Defaults to 'site-settings'. */\n settingsSlug?: string;\n};\n/**\n * Collects every public URL — pages and archive entries — as sitemap entries\n * with per-URL hreflang and lastmod.\n *\n * Reuses the same path/hreflang builders as page metadata, so the sitemap can't\n * drift from what the pages actually render (a classic source of sitemap bugs:\n * a URL listed one way and served another). Drafts and noindex documents are\n * omitted.\n *\n * ```ts\n * // app/sitemap.ts\n * export default async function sitemap() {\n * return buildSitemapEntries({\n * payload: await getPayload({ config }),\n * config: i18nConfig,\n * baseUrl: process.env.NEXT_PUBLIC_SERVER_URL!,\n * content: contentConfig,\n * })\n * }\n * ```\n */\nexport declare function buildSitemapEntries({ baseUrl, changeFrequency, config, content, homeSlug, pagesSlug, payload, settingsSlug, }: BuildSitemapArgs): Promise<SitemapEntry[]>;\nexport {};\n"],"names":[],"mappings":"AA4DA,WAAU"}
|
||||
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
/** Which part comes first in a composed title. */ export { };
|
||||
|
||||
//# sourceMappingURL=composeTitle.d.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["composeTitle.d.ts"],"sourcesContent":["/** Which part comes first in a composed title. */\nexport type TitleOrder = 'page-first' | 'site-first';\ntype ComposeTitleArgs = {\n /** Defaults to 'page-first' — the page title is what a visitor scans for. */\n order?: TitleOrder;\n /** Page-specific title, e.g. 'About Us'. */\n pageTitle?: null | string;\n /** Separator between page title and site name. Defaults to ' | '. */\n separator?: string;\n /** Site name, e.g. 'Acme Inc'. */\n siteName?: null | string;\n};\n/**\n * Composes a full document title from a page title and the site name.\n *\n * - both, page-first: \"About Us | Acme Inc\"\n * - both, site-first: \"Acme Inc | About Us\"\n * - page only: \"About Us\"\n * - site only: \"Acme Inc\"\n * - neither: \"\"\n *\n * Pure function — no dependency on Payload or request state.\n */\nexport declare function composeTitle({ order, pageTitle, separator, siteName, }: ComposeTitleArgs): string;\nexport {};\n"],"names":[],"mappings":"AAAA,gDAAgD,GAwBhD,WAAU"}
|
||||
@@ -1,3 +0,0 @@
|
||||
export { };
|
||||
|
||||
//# sourceMappingURL=createMetadataGenerator.d.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["createMetadataGenerator.d.ts"],"sourcesContent":["import type { BasePayload } from 'payload';\nimport type { I18nConfig } from '../i18n/index.js';\nimport type { PageMetadata } from './buildMetadata.js';\nimport type { SeoMeta } from './types.js';\n/**\n * A document as needed for metadata: its SEO meta group and localized slug.\n */\ntype MetadataDocument = {\n meta?: null | SeoMeta;\n slug?: null | Record<string, unknown>;\n};\ntype CreateMetadataGeneratorArgs = {\n /** Absolute site origin, e.g. 'https://example.com'. */\n baseUrl?: string;\n config: I18nConfig;\n /** Home slug that collapses to the locale root. Defaults to 'home'. */\n homeSlug?: string;\n /**\n * Resolves the document to build metadata for, given route params.\n * The client supplies this (they own the collections and routing); it should\n * fetch with `locale: 'all'` so the slug field is a locale→value map.\n */\n resolveDocument: (args: {\n locale: string;\n params: Record<string, string | string[]>;\n payload: BasePayload;\n }) => Promise<MetadataDocument | null>;\n /** Resolves the OG image URL for the document, if any. */\n resolveImageUrl?: (args: {\n doc: MetadataDocument;\n locale: string;\n payload: BasePayload;\n }) => Promise<null | string>;\n /** Resolves the site name (e.g. from SiteSettings). */\n resolveSiteName?: (args: {\n locale: string;\n payload: BasePayload;\n }) => Promise<null | string>;\n};\n/**\n * Builds a metadata generator, collapsing the usual generateMetadata\n * boilerplate into a single wired-up function.\n *\n * The client provides resolvers (they own collections/routing); the plugin\n * owns the assembly (title composition, canonical, hreflang, OG).\n *\n * The returned function takes `{ payload, params, locale }` — Next calls\n * `generateMetadata({ params })` without those, and the plugin never calls\n * getPayload itself, so the client wraps it in their route file:\n *\n * ```ts\n * // app/(frontend)/[locale]/[[...slug]]/page.tsx\n * const generate = createMetadataGenerator({\n * config: i18nConfig,\n * baseUrl: process.env.NEXT_PUBLIC_SERVER_URL,\n * resolveDocument: async ({ payload, params, locale }) => { ... },\n * })\n *\n * export async function generateMetadata({ params }) {\n * const { locale, slug } = await params\n * const payload = await getPayload({ config: await config })\n * return generate({ payload, params: { slug: slug ?? [] }, locale })\n * }\n * ```\n *\n * `resolveDocument` should fetch with `locale: 'all'` so the slug field comes\n * back as a locale→value map — that's what hreflang alternates are built from.\n */\nexport declare function createMetadataGenerator(args: CreateMetadataGeneratorArgs): (context: {\n locale: string;\n params: Record<string, string | string[]>;\n payload: BasePayload;\n}) => Promise<PageMetadata>;\nexport {};\n"],"names":[],"mappings":"AAyEA,WAAU"}
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
export { };
|
||||
|
||||
//# sourceMappingURL=createPageMetadata.d.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["createPageMetadata.d.ts"],"sourcesContent":["import type { BasePayload } from 'payload';\nimport type { ContentOption } from '../content/index.js';\nimport type { I18nConfig } from '../i18n/index.js';\nimport type { PageMetadata } from './buildMetadata.js';\ntype CreatePageMetadataArgs = {\n /** Absolute site origin, e.g. 'https://example.com'. */\n baseUrl?: string;\n /** Collection holding pages. Defaults to 'pages'. */\n collection?: string;\n config: I18nConfig;\n /**\n * Archive-backed collections, same value as the plugin option. Pass it and\n * entry URLs (/pl/artykuly/moj-post) get correct canonical and hreflang;\n * omit it and only pages are handled.\n */\n content?: ContentOption;\n /** SiteSettings global slug. Defaults to 'site-settings'. */\n settingsSlug?: string;\n /** Field on SiteSettings holding the site name. Defaults to 'siteName'. */\n siteNameField?: string;\n};\ntype PageMetadataContext = {\n locale: string;\n /**\n * Page number from ?page= on an archive listing. Pass it and page 2 gets a\n * canonical to itself; leave it out and every page claims to be page 1.\n */\n page?: number;\n payload: BasePayload;\n /** Route slug segments; empty/undefined means the locale root. */\n slug?: string[];\n};\n/**\n * Metadata for the page route, with every resolver already wired.\n *\n * `createMetadataGenerator` asks the client for resolvers because it can't know\n * their collections. But for the plugin's own conventions it does know: pages\n * live in one collection, the site name sits on SiteSettings, the OG image sits\n * on the plugin-seo `meta` group, the home page is whatever System Pages points\n * at, and — with `content` — entries live under their collection's archive page.\n * Re-declaring all that in every project is copy-paste, so this resolves it.\n *\n * Reach for `createMetadataGenerator` instead when a route doesn't follow those\n * conventions — custom image logic, a different global, hand-rolled paths.\n *\n * The plugin never calls getPayload, and Next calls generateMetadata without a\n * payload, so the client keeps a small wrapper:\n *\n * ```ts\n * const pageMetadata = createPageMetadata({ config: i18nConfig, baseUrl, content })\n *\n * export async function generateMetadata({ params }) {\n * const { locale, slug } = await params\n * return pageMetadata({ payload: await getPayload({ config }), locale, slug })\n * }\n * ```\n */\nexport declare function createPageMetadata(args: CreatePageMetadataArgs): ({ slug, locale, page, payload, }: PageMetadataContext) => Promise<PageMetadata>;\nexport {};\n"],"names":[],"mappings":"AA0DA,WAAU"}
|
||||
Vendored
-3
@@ -1,3 +0,0 @@
|
||||
export { };
|
||||
|
||||
//# sourceMappingURL=hreflang.d.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["hreflang.d.ts"],"sourcesContent":["import type { I18nConfig, LocalizedSlugs } from '../i18n/index.js';\ntype BuildHreflangArgs = {\n /** Absolute site origin, e.g. 'https://example.com'. Omit for relative paths. */\n baseUrl?: string;\n config: I18nConfig;\n /** Home slug that collapses to the locale root. Defaults to 'home'. */\n homeSlug?: string;\n /**\n * Localized segment the document lives under (an archive page's slugs),\n * e.g. { pl: 'artykuly', en: 'articles' }. Locales missing from the prefix\n * are omitted — an entry with no archive in that language has no URL there.\n */\n prefix?: LocalizedSlugs;\n /** slug per locale for the current document, e.g. { pl: 'o-nas', en: 'about' } */\n slugs: LocalizedSlugs;\n};\n/**\n * Builds a map of locale → URL for hreflang alternate links, suitable for\n * Next.js Metadata `alternates.languages`.\n *\n * Bridges SEO and i18n: for each configured locale that the document has a\n * slug in, it produces the locale-aware path (via buildLocalizedPath),\n * optionally prefixed with an absolute origin.\n *\n * @example\n * buildHreflangAlternates({\n * slugs: { pl: 'o-nas', en: 'about' },\n * config,\n * baseUrl: 'https://example.com',\n * })\n * // → { pl: 'https://example.com/pl/o-nas', en: 'https://example.com/en/about' }\n */\nexport declare function buildHreflangAlternates({ baseUrl, config, homeSlug, prefix, slugs, }: BuildHreflangArgs): Record<string, string>;\nexport {};\n"],"names":[],"mappings":"AAiCA,WAAU"}
|
||||
Vendored
-15
@@ -1,15 +0,0 @@
|
||||
export { buildAutoFillMetaHook } from './autoFillMeta.js';
|
||||
export { buildMetadata } from './buildMetadata.js';
|
||||
export { buildRobots } from './buildRobots.js';
|
||||
export { buildSitemapEntries } from './buildSitemapEntries.js';
|
||||
export { composeTitle } from './composeTitle.js';
|
||||
export { createMetadataGenerator } from './createMetadataGenerator.js';
|
||||
export { createPageMetadata } from './createPageMetadata.js';
|
||||
export { buildHreflangAlternates } from './hreflang.js';
|
||||
export { injectAutoFillMeta } from './injectAutoFillMeta.js';
|
||||
export { injectSeoTabs } from './injectSeoTabs.js';
|
||||
export { readSiteMetaConfig } from './readSiteMetaConfig.js';
|
||||
export { buildSeoPlugin } from './seoPluginConfig.js';
|
||||
export { slugsAcrossLocales } from './slugsAcrossLocales.js';
|
||||
|
||||
//# sourceMappingURL=index.d.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["index.d.ts"],"sourcesContent":["export { buildAutoFillMetaHook } from './autoFillMeta.js';\nexport type { AutoFillMapping } from './autoFillMeta.js';\nexport { buildMetadata } from './buildMetadata.js';\nexport type { PageMetadata } from './buildMetadata.js';\nexport { buildRobots } from './buildRobots.js';\nexport type { RobotsRules } from './buildRobots.js';\nexport { buildSitemapEntries } from './buildSitemapEntries.js';\nexport type { SitemapEntry } from './buildSitemapEntries.js';\nexport { composeTitle } from './composeTitle.js';\nexport type { TitleOrder } from './composeTitle.js';\nexport { createMetadataGenerator } from './createMetadataGenerator.js';\nexport { createPageMetadata } from './createPageMetadata.js';\nexport { buildHreflangAlternates } from './hreflang.js';\nexport { injectAutoFillMeta } from './injectAutoFillMeta.js';\nexport { injectSeoTabs } from './injectSeoTabs.js';\nexport { readSiteMetaConfig } from './readSiteMetaConfig.js';\nexport type { SiteMetaConfig } from './readSiteMetaConfig.js';\nexport { buildSeoPlugin } from './seoPluginConfig.js';\nexport { slugsAcrossLocales } from './slugsAcrossLocales.js';\nexport type { SeoMeta, SeoOption } from './types.js';\n"],"names":["buildAutoFillMetaHook","buildMetadata","buildRobots","buildSitemapEntries","composeTitle","createMetadataGenerator","createPageMetadata","buildHreflangAlternates","injectAutoFillMeta","injectSeoTabs","readSiteMetaConfig","buildSeoPlugin","slugsAcrossLocales"],"mappings":"AAAA,SAASA,qBAAqB,QAAQ,oBAAoB;AAE1D,SAASC,aAAa,QAAQ,qBAAqB;AAEnD,SAASC,WAAW,QAAQ,mBAAmB;AAE/C,SAASC,mBAAmB,QAAQ,2BAA2B;AAE/D,SAASC,YAAY,QAAQ,oBAAoB;AAEjD,SAASC,uBAAuB,QAAQ,+BAA+B;AACvE,SAASC,kBAAkB,QAAQ,0BAA0B;AAC7D,SAASC,uBAAuB,QAAQ,gBAAgB;AACxD,SAASC,kBAAkB,QAAQ,0BAA0B;AAC7D,SAASC,aAAa,QAAQ,qBAAqB;AACnD,SAASC,kBAAkB,QAAQ,0BAA0B;AAE7D,SAASC,cAAc,QAAQ,uBAAuB;AACtD,SAASC,kBAAkB,QAAQ,0BAA0B"}
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* Injects the auto-fill meta hook into every SEO-enabled collection.
|
||||
*
|
||||
* Runs after @payloadcms/plugin-seo has added the meta group, appending a
|
||||
* beforeChange hook that fills empty meta from document content. Existing
|
||||
* hooks are preserved (plugin hook runs last, so editor input and other hooks
|
||||
* win first).
|
||||
*/ export { };
|
||||
|
||||
//# sourceMappingURL=injectAutoFillMeta.d.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["injectAutoFillMeta.d.ts"],"sourcesContent":["import type { Config } from 'payload';\nimport type { SeoOption } from './types.js';\n/**\n * Injects the auto-fill meta hook into every SEO-enabled collection.\n *\n * Runs after @payloadcms/plugin-seo has added the meta group, appending a\n * beforeChange hook that fills empty meta from document content. Existing\n * hooks are preserved (plugin hook runs last, so editor input and other hooks\n * win first).\n */\nexport declare function injectAutoFillMeta(config: Config, seo: SeoOption): Config;\n"],"names":[],"mappings":"AAEA;;;;;;;CAOC,GACD,WAAmF"}
|
||||
Vendored
-16
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* Wraps each SEO-enabled collection's fields into a tabbed UI: a "Content" tab
|
||||
* holding the collection's own fields, and an "SEO" tab holding the `meta`
|
||||
* group that @payloadcms/plugin-seo added.
|
||||
*
|
||||
* This replaces plugin-seo's own `tabbedUI`, which merges tabs by inspecting
|
||||
* the first field and breaks when other plugins/fields (roles, slug) already
|
||||
* sit in the collection — producing an empty SEO tab. Running this AFTER
|
||||
* plugin-seo (so `meta` already exists) and after other field injections lets
|
||||
* us build the tabs deterministically.
|
||||
*
|
||||
* If a collection's first field is already a tabs field, the SEO tab is
|
||||
* appended to it instead of creating a new wrapper.
|
||||
*/ export { };
|
||||
|
||||
//# sourceMappingURL=injectSeoTabs.d.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["injectSeoTabs.d.ts"],"sourcesContent":["import type { Config } from 'payload';\nimport type { SeoOption } from './types.js';\n/**\n * Wraps each SEO-enabled collection's fields into a tabbed UI: a \"Content\" tab\n * holding the collection's own fields, and an \"SEO\" tab holding the `meta`\n * group that @payloadcms/plugin-seo added.\n *\n * This replaces plugin-seo's own `tabbedUI`, which merges tabs by inspecting\n * the first field and breaks when other plugins/fields (roles, slug) already\n * sit in the collection — producing an empty SEO tab. Running this AFTER\n * plugin-seo (so `meta` already exists) and after other field injections lets\n * us build the tabs deterministically.\n *\n * If a collection's first field is already a tabs field, the SEO tab is\n * appended to it instead of creating a new wrapper.\n */\nexport declare function injectSeoTabs(config: Config, seo: SeoOption): Config;\n"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;CAaC,GACD,WAA8E"}
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* Reads the site-wide inputs to title and URL composition from SiteSettings.
|
||||
*
|
||||
* Split out of metadata assembly because these are one concern with one source:
|
||||
* whatever an editor set in the panel. Metadata generation shouldn't also know
|
||||
* that the separator arrives unpadded, or that the home slug hides inside a
|
||||
* relationship — it should receive a resolved config.
|
||||
*/ export { };
|
||||
|
||||
//# sourceMappingURL=readSiteMetaConfig.d.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["readSiteMetaConfig.d.ts"],"sourcesContent":["import type { BasePayload } from 'payload';\nimport type { TitleOrder } from './composeTitle.js';\nexport type SiteMetaConfig = {\n /** Slug of the page assigned as Homepage; collapses to the locale root. */\n homeSlug?: string;\n order?: TitleOrder;\n /** Padded separator, e.g. ' | ' — the panel stores the bare character. */\n separator?: string;\n siteName: null | string;\n};\n/**\n * Reads the site-wide inputs to title and URL composition from SiteSettings.\n *\n * Split out of metadata assembly because these are one concern with one source:\n * whatever an editor set in the panel. Metadata generation shouldn't also know\n * that the separator arrives unpadded, or that the home slug hides inside a\n * relationship — it should receive a resolved config.\n */\nexport declare function readSiteMetaConfig({ locale, payload, settingsSlug, siteNameField, }: {\n locale: string;\n payload: BasePayload;\n settingsSlug?: string;\n siteNameField?: string;\n}): Promise<SiteMetaConfig>;\n"],"names":[],"mappings":"AAUA;;;;;;;CAOC,GACD,WAK4B"}
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
export { };
|
||||
|
||||
//# sourceMappingURL=seoPluginConfig.d.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["seoPluginConfig.d.ts"],"sourcesContent":["import type { Plugin } from 'payload';\nimport type { SeoOption } from './types.js';\ntype BuildSeoPluginArgs = {\n seo: SeoOption;\n /** Upload collection slug for the meta image (typically 'media'). */\n uploadsCollection?: string;\n};\n/**\n * Configures @payloadcms/plugin-seo from IPAL's SeoOption.\n *\n * Adds the `meta` field group (title, description, image) to the client's\n * chosen collections. tabbedUI is intentionally NOT used — it merges tabs by\n * inspecting the first field, which breaks when other plugins/fields (roles,\n * slug) already sit in the collection, leaving an empty SEO tab. Instead the\n * SEO UI fields are injected into a controlled tab by injectSeoTabs.\n */\nexport declare function buildSeoPlugin({ seo, uploadsCollection }: BuildSeoPluginArgs): Plugin;\nexport {};\n"],"names":[],"mappings":"AAiBA,WAAU"}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Reads a document's slug in every locale — the map hreflang alternates are
|
||||
* built from.
|
||||
*
|
||||
* Needs its own query because a document fetched in one locale returns `slug`
|
||||
* as a plain string. Fetching with `locale: 'all'` turns *every* localized
|
||||
* field into a locale→value map, which is right for the slug and wrong for
|
||||
* everything else (a title map would break title composition), so this asks
|
||||
* only for what it needs and at depth 0.
|
||||
*/ export { };
|
||||
|
||||
//# sourceMappingURL=slugsAcrossLocales.d.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["slugsAcrossLocales.d.ts"],"sourcesContent":["import type { BasePayload } from 'payload';\nimport type { I18nConfig, LocalizedSlugs } from '../i18n/index.js';\n/**\n * Reads a document's slug in every locale — the map hreflang alternates are\n * built from.\n *\n * Needs its own query because a document fetched in one locale returns `slug`\n * as a plain string. Fetching with `locale: 'all'` turns *every* localized\n * field into a locale→value map, which is right for the slug and wrong for\n * everything else (a title map would break title composition), so this asks\n * only for what it needs and at depth 0.\n */\nexport declare function slugsAcrossLocales({ id, collection, config, payload, }: {\n collection: string;\n config: I18nConfig;\n id: number | string;\n payload: BasePayload;\n}): Promise<LocalizedSlugs>;\n"],"names":[],"mappings":"AAEA;;;;;;;;;CASC,GACD,WAK4B"}
|
||||
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
/**
|
||||
* Minimal shape of the SEO meta group as stored on a document by
|
||||
* @payloadcms/plugin-seo. The client's generated types are richer; helpers
|
||||
* depend only on this.
|
||||
*/ export { };
|
||||
|
||||
//# sourceMappingURL=types.d.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["types.d.ts"],"sourcesContent":["import type { Field } from 'payload';\nimport type { AutoFillMapping } from './autoFillMeta.js';\n/**\n * SEO configuration.\n *\n * The plugin wires @payloadcms/plugin-seo into the client's config and adds\n * locale-aware metadata helpers on top. Collections come from options because\n * the plugin doesn't own the client's content collections (e.g. Pages).\n */\nexport type SeoOption = {\n /**\n * Auto-fill empty meta from document fields on save. Defaults to the website\n * template mapping (title → meta.title). Set to false to disable.\n */\n autoFill?: AutoFillMapping | false;\n /** Collection slugs that receive SEO meta fields, e.g. ['pages', 'posts']. */\n collections: string[];\n /** Extra fields appended to the SEO group in the admin. */\n fields?: Field[];\n /** Optional: customize how meta descriptions are generated. */\n generateDescription?: (args: {\n doc: Record<string, unknown>;\n }) => string;\n /** Optional: customize how meta titles are generated in the admin preview. */\n generateTitle?: (args: {\n doc: Record<string, unknown>;\n }) => string;\n};\n/**\n * Minimal shape of the SEO meta group as stored on a document by\n * @payloadcms/plugin-seo. The client's generated types are richer; helpers\n * depend only on this.\n */\nexport type SeoMeta = {\n description?: null | string;\n image?: unknown;\n title?: null | string;\n /** When set, used as the whole title — no site name, no separator. */\n titleOverride?: null | string;\n};\n"],"names":[],"mappings":"AA4BA;;;;CAIC,GACD,WAME"}
|
||||
Reference in New Issue
Block a user