@tetherto/dev-websites-core 0.3.3 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +147 -26
  2. package/dist/cache/handler.d.mts +51 -0
  3. package/dist/cache/handler.d.mts.map +1 -0
  4. package/dist/cache/handler.mjs +178 -0
  5. package/dist/cache/handler.mjs.map +1 -0
  6. package/dist/cache/index.d.mts +170 -0
  7. package/dist/cache/index.d.mts.map +1 -0
  8. package/dist/cache/index.mjs +297 -0
  9. package/dist/cache/index.mjs.map +1 -0
  10. package/dist/cms/google-oauth.d.mts +20 -0
  11. package/dist/cms/google-oauth.d.mts.map +1 -0
  12. package/dist/cms/google-oauth.mjs +130 -0
  13. package/dist/cms/google-oauth.mjs.map +1 -0
  14. package/dist/cms/index.d.mts +2 -2
  15. package/dist/cms/index.mjs +2 -2
  16. package/dist/cms.mjs +136 -5
  17. package/dist/cms.mjs.map +1 -1
  18. package/dist/index.d.mts +11 -2
  19. package/dist/index.d.mts.map +1 -1
  20. package/dist/index.mjs +4 -3
  21. package/dist/index5.d.mts +2 -2
  22. package/dist/seo/index.mjs +2 -1
  23. package/dist/seo.mjs +2 -13
  24. package/dist/seo.mjs.map +1 -1
  25. package/dist/site-url.mjs +16 -0
  26. package/dist/site-url.mjs.map +1 -0
  27. package/dist/ui/components/Card/Card.d.mts +1 -1
  28. package/dist/ui/components/GoogleOAuthButton/GoogleOAuthButton.d.mts +5 -0
  29. package/dist/ui/components/GoogleOAuthButton/GoogleOAuthButton.d.mts.map +1 -0
  30. package/dist/ui/components/GoogleOAuthButton/GoogleOAuthButton.mjs +72 -0
  31. package/dist/ui/components/GoogleOAuthButton/GoogleOAuthButton.mjs.map +1 -0
  32. package/dist/ui/components/GoogleOAuthButton/googleOAuthStartPath.d.mts +6 -0
  33. package/dist/ui/components/GoogleOAuthButton/googleOAuthStartPath.d.mts.map +1 -0
  34. package/dist/ui/components/GoogleOAuthButton/googleOAuthStartPath.mjs +7 -0
  35. package/dist/ui/components/GoogleOAuthButton/googleOAuthStartPath.mjs.map +1 -0
  36. package/dist/ui/components/GoogleOAuthButton/index.d.mts +2 -0
  37. package/dist/ui/components/GoogleOAuthButton/index.mjs +2 -0
  38. package/dist/ui/index.d.mts +3 -1
  39. package/dist/ui/index.mjs +1 -0
  40. package/package.json +32 -3
  41. package/src/ui/components/GoogleOAuthButton/GoogleOAuthButton.tsx +69 -0
  42. package/src/ui/components/GoogleOAuthButton/googleOAuthStartPath.ts +2 -0
  43. package/src/ui/components/GoogleOAuthButton/index.ts +1 -0
package/dist/cms.mjs CHANGED
@@ -708,6 +708,31 @@ const showcaseContentBlocks = [
708
708
  imageBlock
709
709
  ];
710
710
  //#endregion
711
+ //#region src/cms/hooks/coerce-blog-post-categories.ts
712
+ function toCategoryIdList(value) {
713
+ if (value == null || value === "") return [];
714
+ return (Array.isArray(value) ? value : [value]).map((item) => {
715
+ if (typeof item === "string" || typeof item === "number") return String(item);
716
+ if (item && typeof item === "object" && "id" in item && item.id != null) return String(item.id);
717
+ return null;
718
+ }).filter((id) => Boolean(id));
719
+ }
720
+ /** Posts saved before `category` became `hasMany` still store a single value. */
721
+ const coerceBlogPostCategoriesOnWrite = ({ data }) => {
722
+ if (!data || !("category" in data)) return data;
723
+ data.category = toCategoryIdList(data.category);
724
+ return data;
725
+ };
726
+ const coerceBlogPostCategoriesOnRead = ({ doc }) => {
727
+ if (!doc) return doc;
728
+ if (doc.category == null || doc.category === "") {
729
+ doc.category = [];
730
+ return doc;
731
+ }
732
+ if (!Array.isArray(doc.category)) doc.category = [doc.category];
733
+ return doc;
734
+ };
735
+ //#endregion
711
736
  //#region src/cms/hooks/set-published-at.ts
712
737
  const setPublishedAt = ({ data }) => {
713
738
  if (data && !data.publishedAt && data._status === "published") data.publishedAt = (/* @__PURE__ */ new Date()).toISOString();
@@ -746,7 +771,10 @@ function createBlogPosts(access) {
746
771
  delete: access.adminOnly
747
772
  },
748
773
  versions: draftsWithAutosave,
749
- hooks: { beforeChange: [setPublishedAt] },
774
+ hooks: {
775
+ beforeChange: [setPublishedAt, coerceBlogPostCategoriesOnWrite],
776
+ afterRead: [coerceBlogPostCategoriesOnRead]
777
+ },
750
778
  fields: [
751
779
  {
752
780
  name: "title",
@@ -798,6 +826,8 @@ function createBlogPosts(access) {
798
826
  name: "category",
799
827
  type: "relationship",
800
828
  relationTo: "categories",
829
+ hasMany: true,
830
+ label: "Categories",
801
831
  admin: { position: "sidebar" }
802
832
  },
803
833
  {
@@ -1468,7 +1498,7 @@ function createUsers(access) {
1468
1498
  return {
1469
1499
  slug: "users",
1470
1500
  admin: { useAsTitle: "email" },
1471
- auth: true,
1501
+ auth: { verify: false },
1472
1502
  access: {
1473
1503
  read: access.adminOnly,
1474
1504
  create: access.adminOnly,
@@ -1476,7 +1506,29 @@ function createUsers(access) {
1476
1506
  delete: access.adminOnly,
1477
1507
  admin: access.adminOnly
1478
1508
  },
1479
- fields: []
1509
+ fields: [
1510
+ {
1511
+ name: "googleId",
1512
+ type: "text",
1513
+ unique: true,
1514
+ index: true,
1515
+ admin: {
1516
+ position: "sidebar",
1517
+ readOnly: true,
1518
+ description: "Google OAuth user ID"
1519
+ }
1520
+ },
1521
+ {
1522
+ name: "name",
1523
+ type: "text",
1524
+ admin: { description: "Display name from Google" }
1525
+ },
1526
+ {
1527
+ name: "picture",
1528
+ type: "text",
1529
+ admin: { description: "Profile picture URL from Google" }
1530
+ }
1531
+ ]
1480
1532
  };
1481
1533
  }
1482
1534
  //#endregion
@@ -1644,8 +1696,13 @@ function buildCmsConfig(options) {
1644
1696
  const collections = [...STOCK_COLLECTION_SLUGS.map((slug) => applyCollectionOverride(stock[slug], overrides[slug])).filter((c) => c !== null), ...options.extraCollections ?? []];
1645
1697
  const siteSettings = applyGlobalOverride(createSiteSettings(access), overrides["site-settings"]);
1646
1698
  const globals = [...siteSettings ? [siteSettings] : [], ...options.extraGlobals ?? []];
1699
+ const { jobs: jobsOverride, ...payloadRest } = options.payload ?? {};
1647
1700
  return buildConfig({
1648
- ...options.payload,
1701
+ ...payloadRest,
1702
+ jobs: {
1703
+ autoRun: [{ cron: "* * * * *" }],
1704
+ ...jobsOverride
1705
+ },
1649
1706
  ...defined({
1650
1707
  sharp: options.sharp,
1651
1708
  cors: options.cors,
@@ -1712,6 +1769,80 @@ function createS3MediaPlugin(options = {}) {
1712
1769
  });
1713
1770
  }
1714
1771
  //#endregion
1715
- export { videoBlock as A, slugify as B, sectionHeadingBlock as C, richTextBlock as D, stepsBlock as E, codeBlockLanguages as F, createAccessHelpers as H, defaultCodeLanguage as I, languageOptions as L, downloadCtaBlock as M, codeTabsBlock as N, getRichTextEditorConfig as O, codeBlock as P, createAuthors as R, showcaseContentBlocks as S, leafBlocks as T, createApiTokens as V, createBlogPosts as _, applyCollectionOverride as a, blogContentBlocks as b, createUsers as c, createMedia as d, createEvents as f, createCategories as g, createChangelog as h, STOCK_COLLECTION_SLUGS as i, imageBlock as j, richTextEditor as k, createLegalPages as l, createChangelogTags as m, requireEnvAtRuntime as n, applyGlobalOverride as o, createEventTags as p, buildCmsConfig as r, createSiteSettings as s, createS3MediaPlugin as t, createPages as u, draftsWithAutosave as v, accordionBlock as w, pageContentBlocks as x, setPublishedAt as y, seoFields as z };
1772
+ //#region src/cms/globals/createAnnouncementBanner.ts
1773
+ const validateBannerId = (value, { siblingData }) => {
1774
+ if (siblingData?.enabled && !String(value ?? "").trim()) return "Banner ID is required when the banner is enabled.";
1775
+ return true;
1776
+ };
1777
+ /** Announcement banner global (no site revalidation — add via applyGlobalOverride hooks). */
1778
+ function createAnnouncementBanner(access) {
1779
+ return {
1780
+ slug: "announcement-banner",
1781
+ label: "Announcement Banner",
1782
+ admin: { description: "Sticky site-wide banner shown above the main navigation. Bump Banner ID when replacing content so users who dismissed an older message in the current session see the new one." },
1783
+ access: {
1784
+ read: access.publicRead,
1785
+ update: access.adminOnly
1786
+ },
1787
+ fields: [
1788
+ {
1789
+ name: "enabled",
1790
+ type: "checkbox",
1791
+ defaultValue: false,
1792
+ admin: { description: "When off, the banner is hidden on the public site." }
1793
+ },
1794
+ {
1795
+ name: "bannerId",
1796
+ type: "text",
1797
+ admin: { description: "Stable identifier for this banner version. Change it when publishing new copy so users who dismissed an older banner in this session see the update." },
1798
+ validate: validateBannerId
1799
+ },
1800
+ {
1801
+ type: "row",
1802
+ fields: [{
1803
+ name: "prefix",
1804
+ type: "text",
1805
+ localized: true,
1806
+ maxLength: 8,
1807
+ admin: {
1808
+ width: "25%",
1809
+ description: "Accent label (max 8 characters), e.g. \"New:\""
1810
+ }
1811
+ }, {
1812
+ name: "description",
1813
+ type: "text",
1814
+ localized: true,
1815
+ maxLength: 1e3,
1816
+ admin: {
1817
+ width: "75%",
1818
+ description: "Banner message (max 1000 characters)."
1819
+ }
1820
+ }]
1821
+ },
1822
+ {
1823
+ type: "row",
1824
+ fields: [{
1825
+ name: "ctaLabel",
1826
+ type: "text",
1827
+ localized: true,
1828
+ maxLength: 18,
1829
+ admin: {
1830
+ width: "50%",
1831
+ description: "Optional button label (max 18 characters)."
1832
+ }
1833
+ }, {
1834
+ name: "ctaHref",
1835
+ type: "text",
1836
+ admin: {
1837
+ width: "50%",
1838
+ description: "Optional button URL. Relative paths stay in-site."
1839
+ }
1840
+ }]
1841
+ }
1842
+ ]
1843
+ };
1844
+ }
1845
+ //#endregion
1846
+ export { richTextBlock as A, languageOptions as B, blogContentBlocks as C, accordionBlock as D, sectionHeadingBlock as E, downloadCtaBlock as F, createAccessHelpers as G, seoFields as H, codeTabsBlock as I, codeBlock as L, richTextEditor as M, videoBlock as N, leafBlocks as O, imageBlock as P, codeBlockLanguages as R, coerceBlogPostCategoriesOnWrite as S, showcaseContentBlocks as T, slugify as U, createAuthors as V, createApiTokens as W, createCategories as _, STOCK_COLLECTION_SLUGS as a, setPublishedAt as b, createSiteSettings as c, createPages as d, createMedia as f, createChangelog as g, createChangelogTags as h, buildCmsConfig as i, getRichTextEditorConfig as j, stepsBlock as k, createUsers as l, createEventTags as m, createS3MediaPlugin as n, applyCollectionOverride as o, createEvents as p, requireEnvAtRuntime as r, applyGlobalOverride as s, createAnnouncementBanner as t, createLegalPages as u, createBlogPosts as v, pageContentBlocks as w, coerceBlogPostCategoriesOnRead as x, draftsWithAutosave as y, defaultCodeLanguage as z };
1716
1847
 
1717
1848
  //# sourceMappingURL=cms.mjs.map
package/dist/cms.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cms.mjs","names":[],"sources":["../src/cms/shared/access.ts","../src/cms/collections/createApiTokens.ts","../src/cms/hooks/slugify.ts","../src/cms/shared/seo-fields.ts","../src/cms/collections/createAuthors.ts","../src/cms/blocks/language-options.ts","../src/cms/blocks/code.ts","../src/cms/blocks/code-tabs.ts","../src/cms/blocks/download-cta.ts","../src/cms/blocks/image.ts","../src/cms/blocks/video.ts","../src/cms/lexical/editor.ts","../src/cms/blocks/rich-text.ts","../src/cms/blocks/steps.ts","../src/cms/blocks/leaf-blocks.ts","../src/cms/blocks/accordion.ts","../src/cms/blocks/section-heading.ts","../src/cms/blocks/index.ts","../src/cms/hooks/set-published-at.ts","../src/cms/shared/drafts-with-autosave.ts","../src/cms/collections/createBlogPosts.ts","../src/cms/collections/createCategories.ts","../src/cms/collections/createChangelog.ts","../src/cms/collections/createChangelogTags.ts","../src/cms/collections/createEventTags.ts","../src/cms/collections/createEvents.ts","../src/cms/collections/createMedia.ts","../src/cms/collections/createPages.ts","../src/cms/collections/createUsers.ts","../src/cms/globals/createSiteSettings.ts","../src/cms/applyOverride.ts","../src/cms/overrides.ts","../src/cms/buildCmsConfig.ts","../src/cms/requireEnv.ts","../src/cms/createS3MediaPlugin.ts"],"sourcesContent":["import type { Access, FieldAccess, PayloadRequest } from 'payload'\n\nexport type AccessOptions = {\n /**\n * When true, disabled `api-tokens` users are denied public reads.\n * Defaults to on when the stock `api-tokens` collection is enabled.\n */\n apiTokens?: boolean\n}\n\nexport type AccessHelpers = {\n adminOnly: ({ req }: { req: PayloadRequest }) => boolean\n adminOrPublished: Access\n publicRead: Access\n adminOnlyField: FieldAccess\n}\n\nconst isAdminUser = (req: PayloadRequest): boolean => req.user?.collection === 'users'\n\nconst isDisabledApiToken = (req: PayloadRequest): boolean =>\n req.user?.collection === 'api-tokens' && req.user?.enabled === false\n\n/**\n * Build access helpers. Pass `{ apiTokens: true }` when the `api-tokens`\n * collection is registered (stock by default via `buildCmsConfig`).\n */\nexport function createAccessHelpers(options: AccessOptions = {}): AccessHelpers {\n const apiTokens = options.apiTokens === true\n\n const adminOnly = ({ req }: { req: PayloadRequest }): boolean => isAdminUser(req)\n\n const adminOrPublished: Access = ({ req }) => {\n if (isAdminUser(req)) return true\n if (apiTokens && isDisabledApiToken(req)) return false\n return { _status: { equals: 'published' } }\n }\n\n const publicRead: Access = ({ req }) => {\n if (apiTokens && isDisabledApiToken(req)) return false\n return true\n }\n\n const adminOnlyField: FieldAccess = ({ req }) => isAdminUser(req)\n\n return { adminOnly, adminOrPublished, publicRead, adminOnlyField }\n}\n","import type { AccessHelpers } from '../shared/access.js'\nimport type { Access, CollectionConfig } from 'payload'\n\nconst adminOrSelf: Access = ({ req }) => {\n if (req.user?.collection === 'users') return true\n if (req.user?.collection === 'api-tokens') return { id: { equals: req.user.id } }\n return false\n}\n\n/**\n * Stock API-key auth collection for server-to-server Payload REST/GraphQL clients.\n * Disable per site with `overrides['api-tokens'] = false`.\n */\nexport function createApiTokens(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'api-tokens',\n labels: {\n singular: 'API Token',\n plural: 'API Tokens',\n },\n admin: {\n useAsTitle: 'name',\n defaultColumns: ['name', 'description', 'enabled', 'createdAt'],\n description:\n 'Server-to-server tokens for non-admin clients calling the Payload REST/GraphQL API. ' +\n 'Each token authenticates as an api-tokens user and is restricted to published, public-readable content.',\n },\n auth: {\n useAPIKey: true,\n disableLocalStrategy: true,\n },\n access: {\n read: adminOrSelf,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n admin: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n admin: {\n description: 'Human-readable label, e.g. \"mobile-app-prod\" or \"partner-foo\".',\n },\n },\n {\n name: 'description',\n type: 'textarea',\n admin: {\n description: 'Who is this token for and what is it used for? Free-form notes.',\n },\n },\n {\n name: 'enabled',\n type: 'checkbox',\n defaultValue: true,\n admin: {\n position: 'sidebar',\n description:\n 'Disable to soft-revoke. To hard-revoke, clear the API Key field or delete the document.',\n },\n },\n ],\n }\n}\n","import type { FieldHook } from 'payload'\n\nexport const slugify: FieldHook = ({ value }) =>\n typeof value === 'string'\n ? value\n .toLowerCase()\n .replace(/\\s+/g, '-')\n .replace(/[^a-z0-9-]/g, '')\n : value\n","import type { GroupField, Validate } from 'payload'\n\nconst MAX_META_TITLE = 60\nconst MAX_META_DESCRIPTION = 160\n\nconst validateMetaTitle: Validate<string | null | undefined> = (value) => {\n if (!value || value.trim().length === 0) return 'Meta title is required.'\n if (value.length > MAX_META_TITLE)\n return `Meta title must be ${MAX_META_TITLE} characters or fewer (currently ${value.length}).`\n return true\n}\n\nconst validateMetaDescription: Validate<string | null | undefined> = (value) => {\n if (!value || value.trim().length === 0) return 'Meta description is required.'\n if (value.length > MAX_META_DESCRIPTION)\n return `Meta description must be ${MAX_META_DESCRIPTION} characters or fewer (currently ${value.length}).`\n return true\n}\n\nconst validateUrl: Validate<string | null | undefined> = (value) => {\n if (!value) return true\n try {\n new URL(value)\n return true\n } catch {\n return 'Must be a valid URL (e.g. https://example.com/page).'\n }\n}\n\nexport const seoFields: GroupField = {\n name: 'seo',\n type: 'group',\n label: 'SEO',\n fields: [\n {\n name: 'metaTitle',\n type: 'text',\n required: true,\n localized: true,\n maxLength: MAX_META_TITLE,\n validate: validateMetaTitle,\n admin: {\n description: `Required. ${MAX_META_TITLE} characters max — shown in browser tabs and search results.`,\n },\n },\n {\n name: 'metaDescription',\n type: 'textarea',\n required: true,\n localized: true,\n validate: validateMetaDescription,\n admin: {\n description: `Required. ${MAX_META_DESCRIPTION} characters max — shown in search result snippets.`,\n },\n },\n {\n name: 'ogImage',\n type: 'upload',\n relationTo: 'media',\n admin: {\n description:\n 'Used when the page is shared on social media (1200×630 recommended). Falls back to cover image if empty.',\n },\n },\n {\n name: 'canonicalUrl',\n type: 'text',\n validate: validateUrl,\n admin: {\n description: 'Override for syndicated content. Leave empty to auto-derive from slug.',\n },\n },\n {\n name: 'noIndex',\n type: 'checkbox',\n defaultValue: false,\n admin: {\n description: 'When checked, search engines will not index this page.',\n },\n },\n {\n name: 'noFollow',\n type: 'checkbox',\n defaultValue: false,\n admin: {\n description:\n 'When checked, search engines will not follow links on this page (paired with noIndex if needed).',\n },\n },\n ],\n}\n","import { slugify } from '../hooks/slugify.js'\nimport { seoFields } from '../shared/seo-fields.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\nexport function createAuthors(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'authors',\n admin: {\n useAsTitle: 'name',\n defaultColumns: ['name', 'slug', 'role'],\n },\n access: {\n read: access.publicRead,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: { position: 'sidebar' },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'avatar',\n type: 'upload',\n relationTo: 'media',\n },\n {\n name: 'role',\n type: 'text',\n localized: true,\n admin: {\n description: 'Job title or role (e.g. \"Lead Engineer\")',\n },\n },\n {\n name: 'bio',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'social',\n type: 'group',\n label: 'Social Profiles',\n admin: { position: 'sidebar' },\n fields: [\n { name: 'website', type: 'text' },\n { name: 'twitter', type: 'text', admin: { description: '@handle or full URL' } },\n { name: 'linkedin', type: 'text' },\n { name: 'github', type: 'text' },\n ],\n },\n {\n ...seoFields,\n fields: [\n ...seoFields.fields,\n {\n name: 'jsonLd',\n type: 'group',\n label: 'Structured Data Overrides',\n admin: {\n description: 'Used in JSON-LD Person schema on author pages and article bylines.',\n },\n fields: [\n {\n name: 'jobTitle',\n type: 'text',\n admin: { description: 'schema.org jobTitle (defaults to role if empty)' },\n },\n {\n name: 'worksFor',\n type: 'text',\n admin: { description: 'Organization name for schema.org worksFor' },\n },\n {\n name: 'sameAs',\n type: 'array',\n admin: {\n description: 'Extra canonical URLs for this person (Wikipedia, Crunchbase, etc.)',\n },\n fields: [{ name: 'url', type: 'text', required: true }],\n },\n ],\n },\n ],\n },\n ],\n }\n}\n","/** Shared language options for CMS code blocks and Lexical CodeBlock feature. */\nexport const languageOptions = [\n { label: 'TypeScript', value: 'typescript' },\n { label: 'JavaScript', value: 'javascript' },\n { label: 'Python', value: 'python' },\n { label: 'Bash / Shell', value: 'bash' },\n { label: 'Shell', value: 'shell' },\n { label: 'JSON', value: 'json' },\n { label: 'CSS', value: 'css' },\n { label: 'HTML', value: 'html' },\n { label: 'Rust', value: 'rust' },\n { label: 'Go', value: 'go' },\n { label: 'YAML', value: 'yaml' },\n { label: 'Markdown', value: 'markdown' },\n { label: 'Plain Text', value: 'plaintext' },\n]\n\nexport const codeBlockLanguages: Record<string, string> = Object.fromEntries(\n languageOptions.map((opt) => [opt.value, opt.label])\n)\n\nexport const defaultCodeLanguage = 'plaintext'\n","import { languageOptions } from './language-options.js'\n\nimport type { Block } from 'payload'\n\nexport const codeBlock: Block = {\n slug: 'code',\n labels: { singular: 'Code Block', plural: 'Code Blocks' },\n fields: [\n {\n name: 'language',\n type: 'select',\n defaultValue: 'typescript',\n options: languageOptions,\n },\n {\n name: 'filename',\n type: 'text',\n admin: { description: 'Optional filename label shown above the block' },\n },\n {\n name: 'code',\n type: 'code',\n required: true,\n admin: { language: 'typescript' },\n },\n ],\n}\n","import { languageOptions } from './language-options.js'\n\nimport type { Block } from 'payload'\n\nexport const codeTabsBlock: Block = {\n slug: 'code-tabs',\n labels: { singular: 'Code Tabs', plural: 'Code Tabs' },\n fields: [\n {\n name: 'tabs',\n type: 'array',\n required: true,\n minRows: 1,\n fields: [\n {\n name: 'label',\n type: 'text',\n required: true,\n admin: { description: 'Tab label (e.g. Windows, Linux, Android)' },\n },\n {\n name: 'language',\n type: 'select',\n defaultValue: 'bash',\n options: languageOptions,\n },\n {\n name: 'code',\n type: 'code',\n required: true,\n admin: { language: 'bash' },\n },\n ],\n },\n ],\n}\n","import type { Block } from 'payload'\n\nexport const downloadCtaBlock: Block = {\n slug: 'download-cta',\n labels: { singular: 'Download CTA', plural: 'Download CTAs' },\n fields: [\n {\n name: 'eyebrow',\n type: 'text',\n localized: true,\n },\n {\n name: 'heading',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'headingAccent',\n type: 'text',\n localized: true,\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'submitLabel',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'downloadUrl',\n type: 'text',\n required: true,\n },\n {\n name: 'downloadLabel',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'successMessage',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'consent',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'footnote',\n type: 'textarea',\n localized: true,\n },\n ],\n}\n","import type { Block } from 'payload'\n\nexport const imageBlock: Block = {\n slug: 'image',\n labels: { singular: 'Image', plural: 'Images' },\n fields: [\n {\n name: 'image',\n type: 'upload',\n relationTo: 'media',\n required: true,\n },\n {\n name: 'caption',\n type: 'text',\n localized: true,\n },\n {\n name: 'size',\n type: 'select',\n defaultValue: 'full',\n options: [\n { label: 'Full Width', value: 'full' },\n { label: 'Wide', value: 'wide' },\n { label: 'Medium', value: 'medium' },\n ],\n },\n ],\n}\n","import type { Block } from 'payload'\n\nexport const videoBlock: Block = {\n slug: 'video',\n labels: { singular: 'Video', plural: 'Videos' },\n fields: [\n {\n name: 'video',\n type: 'upload',\n relationTo: 'media',\n required: true,\n filterOptions: {\n mimeType: { contains: 'video' },\n },\n },\n {\n name: 'caption',\n type: 'text',\n localized: true,\n },\n {\n name: 'size',\n type: 'select',\n defaultValue: 'full',\n options: [\n { label: 'Full Width', value: 'full' },\n { label: 'Wide', value: 'wide' },\n { label: 'Medium', value: 'medium' },\n ],\n },\n ],\n}\n","import {\n BlocksFeature,\n CodeBlock,\n EXPERIMENTAL_TableFeature,\n UploadFeature,\n editorConfigFactory,\n lexicalEditor,\n} from '@payloadcms/richtext-lexical'\n\nimport { codeBlockLanguages, defaultCodeLanguage } from '../blocks/language-options.js'\nimport { videoBlock } from '../blocks/video.js'\n\nimport type { FeatureProviderServer } from '@payloadcms/richtext-lexical'\nimport type { SanitizedConfig } from 'payload'\n\nconst richTextFeatures = ({\n defaultFeatures,\n}: {\n defaultFeatures: FeatureProviderServer[]\n rootFeatures: FeatureProviderServer[]\n}) => [\n ...defaultFeatures.filter((feature) => feature.key !== 'upload'),\n UploadFeature({\n collections: {\n media: {\n fields: [\n {\n name: 'caption',\n type: 'text',\n },\n ],\n },\n },\n }),\n BlocksFeature({\n blocks: [\n CodeBlock({\n languages: codeBlockLanguages,\n defaultLanguage: defaultCodeLanguage,\n }),\n videoBlock,\n ],\n }),\n EXPERIMENTAL_TableFeature(),\n]\n\n/**\n * Shared Lexical editor for every `richText` field.\n *\n * Adds `CodeBlock`, inline `video` block, media upload captions, and\n * `EXPERIMENTAL_TableFeature` on top of Payload defaults.\n */\n// Return type is derived from `lexicalEditor` (a public export) rather than the\n// inferred `LexicalRichTextAdapterProvider` (not re-exported), so the generated\n// declaration stays portable while keeping the narrow Lexical adapter type that\n// consumers like `editorConfigFactory.fromEditor` require.\nexport const richTextEditor = (): ReturnType<typeof lexicalEditor> =>\n lexicalEditor({\n features: richTextFeatures,\n })\n\n/** Resolve Lexical editor config for seed scripts / markdown conversion. */\nexport async function getRichTextEditorConfig(config: SanitizedConfig) {\n return editorConfigFactory.fromFeatures({\n config,\n features: richTextFeatures,\n })\n}\n","import { richTextEditor } from '../lexical/editor.js'\n\nimport type { Block } from 'payload'\n\nexport const richTextBlock: Block = {\n slug: 'rich-text',\n labels: { singular: 'Rich Text', plural: 'Rich Text Blocks' },\n fields: [\n {\n name: 'content',\n type: 'richText',\n localized: true,\n editor: richTextEditor(),\n },\n ],\n}\n","import type { Block } from 'payload'\n\nexport const stepsBlock: Block = {\n slug: 'steps',\n labels: { singular: 'Steps List', plural: 'Steps Lists' },\n fields: [\n {\n name: 'items',\n type: 'array',\n required: true,\n minRows: 1,\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'avatar',\n type: 'upload',\n relationTo: 'media',\n admin: { description: 'Optional avatar or icon shown next to the step' },\n },\n ],\n },\n ],\n}\n","import { codeBlock } from './code.js'\nimport { codeTabsBlock } from './code-tabs.js'\nimport { downloadCtaBlock } from './download-cta.js'\nimport { imageBlock } from './image.js'\nimport { richTextBlock } from './rich-text.js'\nimport { stepsBlock } from './steps.js'\nimport { videoBlock } from './video.js'\n\nimport type { Block } from 'payload'\n\nexport const leafBlocks: Block[] = [\n richTextBlock,\n codeBlock,\n codeTabsBlock,\n imageBlock,\n videoBlock,\n downloadCtaBlock,\n stepsBlock,\n]\n","import { leafBlocks } from './leaf-blocks.js'\n\nimport type { Block } from 'payload'\n\nexport const accordionBlock: Block = {\n slug: 'accordion',\n labels: { singular: 'Accordion', plural: 'Accordions' },\n fields: [\n {\n name: 'items',\n type: 'array',\n required: true,\n minRows: 1,\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'defaultOpen',\n type: 'checkbox',\n defaultValue: false,\n },\n {\n name: 'content',\n type: 'blocks',\n blocks: leafBlocks,\n localized: true,\n },\n ],\n },\n ],\n}\n","import type { Block } from 'payload'\n\nexport const sectionHeadingBlock: Block = {\n slug: 'section-heading',\n labels: { singular: 'Section Heading', plural: 'Section Headings' },\n fields: [\n {\n name: 'text',\n type: 'text',\n required: true,\n localized: true,\n },\n ],\n}\n","import { accordionBlock } from './accordion.js'\nimport { codeBlock } from './code.js'\nimport { codeTabsBlock } from './code-tabs.js'\nimport { downloadCtaBlock } from './download-cta.js'\nimport { imageBlock } from './image.js'\nimport { richTextBlock } from './rich-text.js'\nimport { sectionHeadingBlock } from './section-heading.js'\nimport { stepsBlock } from './steps.js'\nimport { videoBlock } from './video.js'\n\nimport type { Block } from 'payload'\n\nexport { richTextBlock } from './rich-text.js'\nexport { codeBlock } from './code.js'\nexport { codeTabsBlock } from './code-tabs.js'\nexport { imageBlock } from './image.js'\nexport { videoBlock } from './video.js'\nexport { downloadCtaBlock } from './download-cta.js'\nexport { stepsBlock } from './steps.js'\nexport { accordionBlock } from './accordion.js'\nexport { sectionHeadingBlock } from './section-heading.js'\nexport { leafBlocks } from './leaf-blocks.js'\nexport { languageOptions, codeBlockLanguages, defaultCodeLanguage } from './language-options.js'\n\nexport const blogContentBlocks: Block[] = [\n richTextBlock,\n codeBlock,\n codeTabsBlock,\n imageBlock,\n videoBlock,\n downloadCtaBlock,\n stepsBlock,\n accordionBlock,\n]\n\nexport const pageContentBlocks: Block[] = [\n richTextBlock,\n codeBlock,\n codeTabsBlock,\n imageBlock,\n stepsBlock,\n accordionBlock,\n]\n\nexport const showcaseContentBlocks: Block[] = [\n sectionHeadingBlock,\n richTextBlock,\n codeBlock,\n imageBlock,\n]\n","import type { CollectionBeforeChangeHook } from 'payload'\n\nexport const setPublishedAt: CollectionBeforeChangeHook = ({ data }) => {\n if (data && !data.publishedAt && data._status === 'published') {\n data.publishedAt = new Date().toISOString()\n }\n return data\n}\n","import type { CollectionConfig } from 'payload'\n\nexport const draftsWithAutosave: CollectionConfig['versions'] = {\n maxPerDoc: 25,\n drafts: {\n autosave: {\n interval: 800,\n },\n schedulePublish: true,\n },\n}\n","import { blogContentBlocks } from '../blocks/index.js'\nimport { setPublishedAt } from '../hooks/set-published-at.js'\nimport { slugify } from '../hooks/slugify.js'\nimport { draftsWithAutosave } from '../shared/drafts-with-autosave.js'\nimport { seoFields } from '../shared/seo-fields.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\n/** Stock blog-posts collection (no site revalidation — add via overrides.hooks). */\nexport function createBlogPosts(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'blog-posts',\n defaultSort: '-publishedAt',\n admin: {\n useAsTitle: 'title',\n defaultColumns: ['title', 'slug', 'author', 'publishedAt', '_status'],\n },\n access: {\n read: access.adminOrPublished,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n versions: draftsWithAutosave,\n hooks: {\n beforeChange: [setPublishedAt],\n },\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: {\n position: 'sidebar',\n description: 'URL-friendly identifier. Not localized — one slug per post.',\n },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'coverImage',\n type: 'upload',\n relationTo: 'media',\n },\n {\n name: 'imageAlt',\n type: 'text',\n localized: true,\n admin: {\n description:\n 'Alt text used for the auto-generated social/OG image (`og:image:alt`). Should describe the post for screen readers.',\n },\n },\n {\n name: 'excerpt',\n type: 'textarea',\n localized: true,\n admin: {\n description: 'Short summary shown in listing cards and meta description fallback.',\n },\n },\n {\n name: 'content',\n type: 'blocks',\n localized: true,\n blocks: blogContentBlocks,\n },\n {\n name: 'author',\n type: 'relationship',\n relationTo: 'authors',\n admin: { position: 'sidebar' },\n },\n {\n name: 'category',\n type: 'relationship',\n relationTo: 'categories',\n admin: { position: 'sidebar' },\n },\n {\n name: 'readingTime',\n type: 'number',\n min: 1,\n admin: {\n position: 'sidebar',\n description: 'Estimated reading time in minutes.',\n },\n },\n {\n name: 'publishedAt',\n type: 'date',\n admin: {\n position: 'sidebar',\n date: { pickerAppearance: 'dayAndTime' },\n description: 'Auto-filled on first publish if left empty.',\n },\n },\n {\n name: 'showLatestNews',\n type: 'checkbox',\n defaultValue: true,\n admin: {\n position: 'sidebar',\n description: 'Show a \"Latest News\" section at the bottom of this post.',\n },\n },\n seoFields,\n ],\n }\n}\n","import { slugify } from '../hooks/slugify.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\nexport function createCategories(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'categories',\n admin: {\n useAsTitle: 'name',\n defaultColumns: ['name', 'slug'],\n },\n access: {\n read: access.publicRead,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: { position: 'sidebar' },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n },\n ],\n }\n}\n","import { slugify } from '../hooks/slugify.js'\nimport { draftsWithAutosave } from '../shared/drafts-with-autosave.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\n/**\n * Stock changelog collection (shared fields only).\n * Site-specific body / GitHub / related-block fields — add via `overrides.fields`.\n * Revalidation — add via `overrides.hooks`.\n */\nexport function createChangelog(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'changelog',\n labels: { singular: 'Changelog', plural: 'Changelog' },\n defaultSort: '-releaseDate',\n admin: {\n useAsTitle: 'title',\n defaultColumns: ['title', 'version', 'versionType', 'tags', 'releaseDate', '_status'],\n },\n access: {\n read: access.adminOrPublished,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n versions: draftsWithAutosave,\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n admin: {\n description:\n 'Release headline shown on the changelog detail page (e.g. \"Added Solana Support\").',\n },\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: {\n position: 'sidebar',\n description: 'URL-friendly identifier. Not localized — one slug per entry.',\n },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'version',\n type: 'text',\n admin: {\n position: 'sidebar',\n description:\n 'Optional semantic version label shown in the badge, e.g. v1.1.0 or 2.3.0. Omit for non-versioned announcements.',\n },\n },\n {\n name: 'versionType',\n type: 'select',\n options: [\n { label: 'Major', value: 'major' },\n { label: 'Minor', value: 'minor' },\n { label: 'Patch', value: 'patch' },\n ],\n admin: {\n position: 'sidebar',\n description:\n 'Release line for badge styling (major / minor / patch). Editors set this explicitly.',\n },\n },\n {\n name: 'releaseDate',\n type: 'date',\n required: true,\n admin: {\n position: 'sidebar',\n date: { pickerAppearance: 'dayOnly', displayFormat: 'MMM d, yyyy' },\n },\n },\n {\n name: 'tags',\n type: 'relationship',\n relationTo: 'changelog-tags',\n hasMany: true,\n label: 'Tags',\n admin: {\n position: 'sidebar',\n description: 'Editor-managed tags from the Changelog Tags collection.',\n },\n },\n {\n name: 'heroImage',\n type: 'upload',\n relationTo: 'media',\n admin: {\n description: 'Large visual above the article body on the changelog detail page.',\n },\n },\n {\n name: 'summary',\n type: 'textarea',\n localized: true,\n admin: {\n description: 'Short excerpt for listing cards and previews.',\n },\n },\n ],\n }\n}\n","import { slugify } from '../hooks/slugify.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\n/** Stock changelog-tags (no site revalidation — add via overrides.hooks). */\nexport function createChangelogTags(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'changelog-tags',\n defaultSort: 'order',\n admin: {\n useAsTitle: 'name',\n defaultColumns: ['name', 'slug', 'order'],\n description: 'Tags shown on changelog entries.',\n },\n access: {\n read: access.publicRead,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: {\n position: 'sidebar',\n description: 'URL-friendly identifier used by listing filters.',\n },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'order',\n type: 'number',\n defaultValue: 0,\n admin: {\n position: 'sidebar',\n description: 'Display order in admin lists (ascending). Ties broken by name.',\n },\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n admin: { description: 'Optional context shown to editors. Not rendered publicly yet.' },\n },\n ],\n }\n}\n","import { slugify } from '../hooks/slugify.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\n/** Stock event-tags (no site revalidation — add via overrides.hooks). */\nexport function createEventTags(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'event-tags',\n labels: { singular: 'Event Tag', plural: 'Event Tags' },\n defaultSort: 'order',\n admin: {\n useAsTitle: 'name',\n defaultColumns: ['name', 'slug', 'order'],\n description:\n 'Reusable event categories (Meetup, Workshop, Hackathon, …). Editors can add types without code changes. Related from Events.',\n },\n access: {\n read: access.publicRead,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: {\n position: 'sidebar',\n description: 'URL-friendly identifier used by filters and relationships.',\n },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'order',\n type: 'number',\n defaultValue: 0,\n admin: {\n position: 'sidebar',\n description: 'Display order in admin lists (ascending). Ties broken by name.',\n },\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n admin: { description: 'Optional context shown to editors.' },\n },\n ],\n }\n}\n","import { setPublishedAt } from '../hooks/set-published-at.js'\nimport { slugify } from '../hooks/slugify.js'\nimport { richTextEditor } from '../lexical/editor.js'\nimport { draftsWithAutosave } from '../shared/drafts-with-autosave.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig, Validate } from 'payload'\n\n/**\n * Display abbreviations accepted in addition to IANA names (e.g. Europe/Paris).\n * Sites map these to IANA when they need a timezone database identifier.\n */\nconst TIMEZONE_ABBREVIATIONS = new Set([\n 'UTC',\n 'GMT',\n 'CET',\n 'CEST',\n 'WET',\n 'WEST',\n 'EET',\n 'EEST',\n 'BST',\n 'EST',\n 'EDT',\n 'CST',\n 'CDT',\n 'MST',\n 'MDT',\n 'PST',\n 'PDT',\n])\n\nfunction parseDate(value: unknown): Date | null {\n if (value instanceof Date) {\n return Number.isNaN(value.getTime()) ? null : value\n }\n if (typeof value === 'string' && value.trim()) {\n const date = new Date(value)\n return Number.isNaN(date.getTime()) ? null : date\n }\n return null\n}\n\nfunction isValidIanaTimeZone(timeZone: string): boolean {\n try {\n Intl.DateTimeFormat('en-US', { timeZone }).format(new Date())\n return true\n } catch {\n return false\n }\n}\n\nconst validateTimezone: Validate<string | null | undefined> = (value) => {\n if (!value || !value.trim()) return 'Timezone is required.'\n const timeZone = value.trim()\n if (TIMEZONE_ABBREVIATIONS.has(timeZone.toUpperCase())) return true\n if (isValidIanaTimeZone(timeZone)) return true\n return 'Must be a timezone abbreviation (CET, UTC, …) or a valid IANA timezone (e.g. Europe/Paris).'\n}\n\nconst validateExternalUrl: Validate<string | null | undefined> = (value) => {\n if (!value || !value.trim()) return 'External URL is required.'\n try {\n new URL(value)\n return true\n } catch {\n return 'Must be a valid URL (e.g. https://example.com/event).'\n }\n}\n\nconst validateEndsAt: Validate<string | Date | null | undefined> = (value, { siblingData }) => {\n const end = parseDate(value)\n if (!end) return 'End date and time is required.'\n\n const start = parseDate(\n siblingData && typeof siblingData === 'object' && 'startsAt' in siblingData\n ? siblingData.startsAt\n : undefined\n )\n if (start && end.getTime() <= start.getTime()) {\n return 'End date and time must be after the start.'\n }\n\n return true\n}\n\n/**\n * Stock events collection (shared fields only).\n * SEO / site-specific fields — add via `overrides.fields`.\n * Revalidation — add via `overrides.hooks`.\n */\nexport function createEvents(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'events',\n labels: { singular: 'Event', plural: 'Events' },\n defaultSort: 'startsAt',\n admin: {\n useAsTitle: 'title',\n defaultColumns: ['title', 'slug', 'tag', 'startsAt', 'endsAt', '_status'],\n description: 'Reusable events consumed by marketing / community surfaces across sites.',\n },\n access: {\n read: access.adminOrPublished,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n versions: draftsWithAutosave,\n hooks: {\n beforeChange: [setPublishedAt],\n },\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: {\n position: 'sidebar',\n description: 'URL-friendly identifier. Not localized — one slug per event.',\n },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'summary',\n type: 'textarea',\n required: true,\n localized: true,\n admin: {\n description: 'Short description for listings, previews, and calendar bodies.',\n },\n },\n {\n name: 'coverImage',\n type: 'upload',\n relationTo: 'media',\n admin: {\n description: 'Optional cover/hero image for detail or promotional surfaces.',\n },\n },\n {\n name: 'startsAt',\n type: 'date',\n required: true,\n admin: {\n position: 'sidebar',\n date: { pickerAppearance: 'dayAndTime', displayFormat: 'MMM d, yyyy h:mm a' },\n description: 'Event start date and time. Sites derive upcoming vs past from this value.',\n },\n },\n {\n name: 'endsAt',\n type: 'date',\n required: true,\n validate: validateEndsAt,\n admin: {\n position: 'sidebar',\n date: { pickerAppearance: 'dayAndTime', displayFormat: 'MMM d, yyyy h:mm a' },\n description: 'Event end date and time. Must be after the start.',\n },\n },\n {\n name: 'timezone',\n type: 'text',\n required: true,\n validate: validateTimezone,\n admin: {\n position: 'sidebar',\n description:\n 'Display timezone: abbreviation (CET, WET, UTC) or IANA name (Europe/Paris).',\n },\n },\n {\n name: 'location',\n type: 'text',\n required: true,\n localized: true,\n admin: {\n description: 'Venue or platform (e.g. Discord, Online, Lisbon).',\n },\n },\n {\n name: 'tag',\n type: 'relationship',\n relationTo: 'event-tags',\n required: true,\n admin: {\n position: 'sidebar',\n description: 'Primary event category from Event Tags.',\n },\n },\n {\n name: 'ctaKind',\n type: 'select',\n required: true,\n defaultValue: 'link',\n options: [\n { label: 'External link', value: 'link' },\n { label: 'Add to calendar', value: 'calendar' },\n ],\n admin: {\n position: 'sidebar',\n description:\n 'Primary listing action. Link opens the external URL; calendar lets the site offer an add-to-calendar flow.',\n },\n },\n {\n name: 'ctaLabel',\n type: 'text',\n required: true,\n localized: true,\n admin: {\n description: 'Label for the primary listing action (e.g. Register, Watch recording).',\n },\n },\n {\n name: 'ctaUrl',\n type: 'text',\n required: true,\n validate: validateExternalUrl,\n admin: {\n description:\n 'External event URL. Opened for link actions; included in calendar details for calendar actions.',\n },\n },\n {\n name: 'content',\n type: 'richText',\n localized: true,\n editor: richTextEditor(),\n admin: {\n description: 'Optional long-form body for event detail pages.',\n },\n },\n {\n name: 'publishedAt',\n type: 'date',\n admin: {\n position: 'sidebar',\n date: { pickerAppearance: 'dayAndTime' },\n description: 'Auto-filled on first publish if left empty.',\n },\n },\n ],\n }\n}\n","import type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\n/** Stock media upload collection (always publicly readable once uploaded). */\nexport function createMedia(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'media',\n admin: {\n useAsTitle: 'filename',\n defaultColumns: ['filename', 'alt', 'updatedAt'],\n },\n access: {\n read: access.publicRead,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n upload: {\n imageSizes: [\n {\n name: 'thumbnail',\n width: 400,\n height: 300,\n position: 'centre',\n },\n {\n name: 'card',\n width: 768,\n height: 512,\n position: 'centre',\n },\n {\n name: 'tablet',\n width: 1024,\n height: undefined,\n position: 'centre',\n },\n ],\n adminThumbnail: 'thumbnail',\n mimeTypes: ['image/*', 'video/*', 'application/pdf'],\n },\n fields: [\n {\n name: 'alt',\n type: 'text',\n required: true,\n localized: true,\n },\n ],\n }\n}\n","import { pageContentBlocks } from '../blocks/index.js'\nimport { setPublishedAt } from '../hooks/set-published-at.js'\nimport { slugify } from '../hooks/slugify.js'\nimport { draftsWithAutosave } from '../shared/drafts-with-autosave.js'\nimport { seoFields } from '../shared/seo-fields.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\nfunction createContentPageCollection(\n access: AccessHelpers,\n slug: 'pages' | 'legal-pages'\n): CollectionConfig {\n return {\n slug,\n admin: {\n useAsTitle: 'title',\n defaultColumns: ['title', 'slug', 'publishedAt', '_status'],\n },\n access: {\n read: access.adminOrPublished,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n versions: draftsWithAutosave,\n hooks: {\n beforeChange: [setPublishedAt],\n },\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: {\n position: 'sidebar',\n description: 'URL-friendly identifier. Not localized — one slug per page.',\n },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'content',\n type: 'blocks',\n localized: true,\n blocks: pageContentBlocks,\n },\n {\n name: 'publishedAt',\n type: 'date',\n admin: {\n position: 'sidebar',\n date: { pickerAppearance: 'dayAndTime' },\n description: 'Auto-filled on first publish if left empty.',\n },\n },\n seoFields,\n ],\n }\n}\n\nexport function createPages(access: AccessHelpers): CollectionConfig {\n return createContentPageCollection(access, 'pages')\n}\n\nexport function createLegalPages(access: AccessHelpers): CollectionConfig {\n return createContentPageCollection(access, 'legal-pages')\n}\n","import type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\nexport function createUsers(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'users',\n admin: {\n useAsTitle: 'email',\n },\n auth: true,\n access: {\n read: access.adminOnly,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n admin: access.adminOnly,\n },\n fields: [],\n }\n}\n","import type { AccessHelpers } from '../shared/access.js'\nimport type { GlobalConfig } from 'payload'\n\nexport function createSiteSettings(access: AccessHelpers): GlobalConfig {\n return {\n slug: 'site-settings',\n label: 'Site Settings',\n access: {\n read: access.publicRead,\n update: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n localized: true,\n admin: {\n description: 'Public site name used in titles and structured data.',\n },\n },\n {\n name: 'defaultDescription',\n type: 'textarea',\n required: true,\n localized: true,\n admin: {\n description: 'Fallback meta description when a page does not define its own.',\n },\n },\n {\n name: 'defaultOgImage',\n type: 'upload',\n relationTo: 'media',\n admin: {\n description: 'Default Open Graph image (1200×630 recommended).',\n },\n },\n {\n name: 'organization',\n type: 'group',\n label: 'Organization',\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n },\n {\n name: 'legalName',\n type: 'text',\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'logo',\n type: 'upload',\n relationTo: 'media',\n },\n {\n name: 'foundingDate',\n type: 'text',\n admin: { description: 'Year or ISO date for schema.org structured data.' },\n },\n ],\n },\n {\n name: 'social',\n type: 'group',\n label: 'Social Profiles',\n fields: [\n { name: 'twitter', type: 'text' },\n { name: 'github', type: 'text' },\n { name: 'linkedin', type: 'text' },\n ],\n },\n ],\n }\n}\n","import type { CollectionConfig, Field, GlobalConfig } from 'payload'\n\ntype OverridableConfig = CollectionConfig | GlobalConfig\n\ntype Override<TConfig extends OverridableConfig> =\n | false\n | {\n fields?: (base: Field[]) => Field[]\n hooks?: Partial<TConfig['hooks']>\n admin?: Partial<TConfig['admin']>\n access?: Partial<TConfig['access']>\n config?: (base: TConfig) => TConfig\n }\n\nexport type CollectionOverride = Override<CollectionConfig>\nexport type GlobalOverride = Override<GlobalConfig>\n\ntype HookArrays = Record<string, unknown[] | undefined>\n\n// Payload collection/global hooks are all arrays of functions, so overrides are\n// appended to the base hooks rather than replacing them.\nfunction mergeHooks(base: HookArrays | undefined, extra: HookArrays | undefined): HookArrays {\n const keys = new Set([...Object.keys(base ?? {}), ...Object.keys(extra ?? {})])\n const merged: HookArrays = {}\n keys.forEach((key) => {\n const combined = [...(base?.[key] ?? []), ...(extra?.[key] ?? [])]\n if (combined.length) merged[key] = combined\n })\n return merged\n}\n\nfunction applyOverride<TConfig extends OverridableConfig>(\n base: TConfig,\n override: Override<TConfig> | undefined\n): TConfig | null {\n if (override === false) return null\n if (!override) return base\n\n const next = {\n ...base,\n ...(override.admin && { admin: { ...base.admin, ...override.admin } }),\n ...(override.access && { access: { ...base.access, ...override.access } }),\n ...(override.fields && { fields: override.fields(base.fields ?? []) }),\n ...(override.hooks && { hooks: mergeHooks(base.hooks, override.hooks as HookArrays) }),\n } as TConfig\n\n return override.config ? override.config(next) : next\n}\n\nexport const applyCollectionOverride = (\n base: CollectionConfig,\n override: CollectionOverride | undefined\n): CollectionConfig | null => applyOverride(base, override)\n\nexport const applyGlobalOverride = (\n base: GlobalConfig,\n override: GlobalOverride | undefined\n): GlobalConfig | null => applyOverride(base, override)\n","import type { CollectionOverride, GlobalOverride } from './applyOverride.js'\n\n/** Slugs of the stock collections shipped by `buildCmsConfig`, in registration order. */\nexport const STOCK_COLLECTION_SLUGS = [\n 'users',\n 'api-tokens',\n 'media',\n 'authors',\n 'categories',\n 'blog-posts',\n 'pages',\n 'legal-pages',\n 'changelog-tags',\n 'changelog',\n 'event-tags',\n 'events',\n] as const\n\nexport type StockCollectionSlug = (typeof STOCK_COLLECTION_SLUGS)[number]\n\n/** Typed map of collection/global overrides for `buildCmsConfig`. */\nexport type Overrides = Partial<Record<StockCollectionSlug, CollectionOverride>> & {\n 'site-settings'?: GlobalOverride\n}\n","import { buildConfig } from 'payload'\n\nimport { createAccessHelpers, type AccessOptions } from './shared/access.js'\nimport { createApiTokens } from './collections/createApiTokens.js'\nimport { createAuthors } from './collections/createAuthors.js'\nimport { createBlogPosts } from './collections/createBlogPosts.js'\nimport { createCategories } from './collections/createCategories.js'\nimport { createChangelog } from './collections/createChangelog.js'\nimport { createChangelogTags } from './collections/createChangelogTags.js'\nimport { createEventTags } from './collections/createEventTags.js'\nimport { createEvents } from './collections/createEvents.js'\nimport { createMedia } from './collections/createMedia.js'\nimport { createLegalPages, createPages } from './collections/createPages.js'\nimport { createUsers } from './collections/createUsers.js'\nimport { createSiteSettings } from './globals/createSiteSettings.js'\nimport { richTextEditor } from './lexical/editor.js'\nimport { applyCollectionOverride, applyGlobalOverride } from './applyOverride.js'\nimport { STOCK_COLLECTION_SLUGS, type Overrides, type StockCollectionSlug } from './overrides.js'\n\nimport type { CollectionConfig, Config, GlobalConfig, Plugin } from 'payload'\n\nexport type BuildCmsConfigOptions<TLocale extends string = string> = {\n secret: string\n // Payload DB adapter instance (e.g. mongooseAdapter({ url }))\n db: Config['db']\n /** Sharp instance from the `sharp` package. */\n sharp?: Config['sharp']\n cors?: Config['cors']\n csrf?: Config['csrf']\n locales: readonly TLocale[]\n /** Must be one of `locales`. */\n defaultLocale: TLocale\n admin?: Config['admin']\n plugins?: Plugin[]\n /** Defaults to the package Lexical editor. */\n editor?: Config['editor']\n access?: AccessOptions\n /** Collection/global slug → override | false. */\n overrides?: Overrides\n extraCollections?: CollectionConfig[]\n extraGlobals?: GlobalConfig[]\n typescript?: Config['typescript']\n /** Extra top-level Payload config keys (e.g. endpoints, graphQL). */\n payload?: Partial<\n Omit<\n Config,\n | 'secret'\n | 'db'\n | 'sharp'\n | 'cors'\n | 'csrf'\n | 'admin'\n | 'plugins'\n | 'editor'\n | 'collections'\n | 'globals'\n | 'localization'\n | 'typescript'\n >\n >\n}\n\n/** Drop keys whose value is `undefined` so they don't clobber Payload defaults. */\nfunction defined<T extends Record<string, unknown>>(obj: T): Partial<T> {\n return Object.fromEntries(Object.entries(obj).filter(([, v]) => v !== undefined)) as Partial<T>\n}\n\n/**\n * Build a Payload config from shared stock collections/globals plus site\n * overrides and extras. Types are still generated in the consuming app.\n */\nexport function buildCmsConfig<const TLocale extends string>(\n options: BuildCmsConfigOptions<TLocale>\n) {\n const overrides = options.overrides ?? {}\n const access = createAccessHelpers({\n ...options.access,\n apiTokens: options.access?.apiTokens ?? overrides['api-tokens'] !== false,\n })\n\n const stock: Record<StockCollectionSlug, CollectionConfig> = {\n 'users': createUsers(access),\n 'api-tokens': createApiTokens(access),\n 'media': createMedia(access),\n 'authors': createAuthors(access),\n 'categories': createCategories(access),\n 'blog-posts': createBlogPosts(access),\n 'pages': createPages(access),\n 'legal-pages': createLegalPages(access),\n 'changelog-tags': createChangelogTags(access),\n 'changelog': createChangelog(access),\n 'event-tags': createEventTags(access),\n 'events': createEvents(access),\n }\n\n const collections = [\n ...STOCK_COLLECTION_SLUGS.map((slug) =>\n applyCollectionOverride(stock[slug], overrides[slug])\n ).filter((c): c is CollectionConfig => c !== null),\n ...(options.extraCollections ?? []),\n ]\n\n const siteSettings = applyGlobalOverride(createSiteSettings(access), overrides['site-settings'])\n const globals = [...(siteSettings ? [siteSettings] : []), ...(options.extraGlobals ?? [])]\n\n return buildConfig({\n ...options.payload,\n ...defined({\n sharp: options.sharp,\n cors: options.cors,\n csrf: options.csrf,\n plugins: options.plugins,\n }),\n secret: options.secret,\n db: options.db,\n admin: {\n user: 'users',\n ...options.admin,\n },\n editor: options.editor ?? richTextEditor(),\n collections,\n ...(globals.length ? { globals } : {}),\n localization: {\n locales: options.locales.map((code) => ({\n code,\n label: code.toUpperCase(),\n })),\n defaultLocale: options.defaultLocale,\n fallback: true,\n },\n typescript: options.typescript ?? {\n outputFile: 'src/payload-types.ts',\n },\n })\n}\n","import { createLogger } from '../utils/logger/logger.js'\n\nconst log = createLogger('env')\n\n/**\n * Read a required env var. During Next.js `phase-production-build` and\n * `generate:importmap` (when NEXT_PHASE is unset) returns \"\" instead of throwing,\n * because those phases do not connect to the DB.\n */\nexport function requireEnvAtRuntime(name: string): string {\n const value = process.env[name]\n const isBuildTime = !process.env.NEXT_PHASE || process.env.NEXT_PHASE === 'phase-production-build'\n if (!value && !isBuildTime) {\n log.error(`Missing required environment variable: ${name}`)\n throw new Error(`Missing required environment variable: ${name}`)\n }\n return value ?? ''\n}\n","import { s3Storage } from '@payloadcms/storage-s3'\n\nimport type { Plugin } from 'payload'\n\nexport type CreateS3MediaPluginOptions = {\n /** Defaults to `process.env.AWS_S3_BUCKET`. */\n bucket?: string\n accessKeyId?: string\n secretAccessKey?: string\n region?: string\n /** Custom S3-compatible endpoint (MinIO, etc.). Defaults to `AWS_S3_ENDPOINT`. */\n endpoint?: string\n /** Defaults to `AWS_S3_FORCE_PATH_STYLE === 'true'`. */\n forcePathStyle?: boolean\n /** Collection slug that owns uploads. Defaults to `media`. */\n collection?: string\n}\n\n/** Payload S3 storage plugin wired for the stock `media` collection. */\nexport function createS3MediaPlugin(options: CreateS3MediaPluginOptions = {}): Plugin {\n const bucket = options.bucket ?? process.env.AWS_S3_BUCKET ?? ''\n const endpoint = options.endpoint ?? process.env.AWS_S3_ENDPOINT ?? ''\n const forcePathStyle = options.forcePathStyle ?? process.env.AWS_S3_FORCE_PATH_STYLE === 'true'\n\n return s3Storage({\n enabled: Boolean(bucket),\n collections: {\n [options.collection ?? 'media']: true,\n },\n bucket,\n config: {\n credentials: {\n accessKeyId: options.accessKeyId ?? process.env.AWS_ACCESS_KEY_ID ?? '',\n secretAccessKey: options.secretAccessKey ?? process.env.AWS_SECRET_ACCESS_KEY ?? '',\n },\n region: options.region ?? process.env.AWS_S3_REGION ?? 'us-east-1',\n ...(endpoint ? { endpoint } : {}),\n ...(forcePathStyle ? { forcePathStyle: true } : {}),\n },\n })\n}\n"],"mappings":";;;;;AAiBA,MAAM,eAAe,QAAiC,IAAI,MAAM,eAAe;AAE/E,MAAM,sBAAsB,QAC1B,IAAI,MAAM,eAAe,gBAAgB,IAAI,MAAM,YAAY;;;;;AAMjE,SAAgB,oBAAoB,UAAyB,CAAC,GAAkB;CAC9E,MAAM,YAAY,QAAQ,cAAc;CAExC,MAAM,aAAa,EAAE,UAA4C,YAAY,GAAG;CAEhF,MAAM,oBAA4B,EAAE,UAAU;EAC5C,IAAI,YAAY,GAAG,GAAG,OAAO;EAC7B,IAAI,aAAa,mBAAmB,GAAG,GAAG,OAAO;EACjD,OAAO,EAAE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GACf,QAAQ,OAAO;GACf,QAAQ,OAAO;EACjB;EACA,UAAU;EACV,OAAO,EACL,cAAc,CAAC,cAAc,EAC/B;EACA,QAAQ;GACN;IACE,MAAM;IACN,MAAM;IACN,UAAU;IACV,WAAW;GACb;GACA;IACE,MAAM;IACN,MAAM;IACN,UAAU;IACV,QAAQ;IACR,OAAO;KACL,UAAU;KACV,aAAa;IACf;IACA,OAAO,EAAE,gBAAgB,CAAC,OAAO,EAAE;GACrC;GACA;IACE,MAAM;IACN,MAAM;IACN,UAAU;IACV,WAAW;IACX,OAAO,EACL,aAAa,iEACf;GACF;GACA;IACE,MAAM;IACN,MAAM;IACN,YAAY;IACZ,OAAO,EACL,aAAa,gEACf;GACF;GACA;IACE,MAAM;IACN,MAAM;IACN,UAAU;IACV,OAAO;KACL,UAAU;KACV,MAAM;MAAE,kBAAkB;MAAc,eAAe;KAAqB;KAC5E,aAAa;IACf;GACF;GACA;IACE,MAAM;IACN,MAAM;IACN,UAAU;IACV,UAAU;IACV,OAAO;KACL,UAAU;KACV,MAAM;MAAE,kBAAkB;MAAc,eAAe;KAAqB;KAC5E,aAAa;IACf;GACF;GACA;IACE,MAAM;IACN,MAAM;IACN,UAAU;IACV,UAAU;IACV,OAAO;KACL,UAAU;KACV,aACE;IACJ;GACF;GACA;IACE,MAAM;IACN,MAAM;IACN,UAAU;IACV,WAAW;IACX,OAAO,EACL,aAAa,oDACf;GACF;GACA;IACE,MAAM;IACN,MAAM;IACN,YAAY;IACZ,UAAU;IACV,OAAO;KACL,UAAU;KACV,aAAa;IACf;GACF;GACA;IACE,MAAM;IACN,MAAM;IACN,UAAU;IACV,cAAc;IACd,SAAS,CACP;KAAE,OAAO;KAAiB,OAAO;IAAO,GACxC;KAAE,OAAO;KAAmB,OAAO;IAAW,CAChD;IACA,OAAO;KACL,UAAU;KACV,aACE;IACJ;GACF;GACA;IACE,MAAM;IACN,MAAM;IACN,UAAU;IACV,WAAW;IACX,OAAO,EACL,aAAa,yEACf;GACF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Tokens.ts","../src/cms/hooks/slugify.ts","../src/cms/shared/seo-fields.ts","../src/cms/collections/createAuthors.ts","../src/cms/blocks/language-options.ts","../src/cms/blocks/code.ts","../src/cms/blocks/code-tabs.ts","../src/cms/blocks/download-cta.ts","../src/cms/blocks/image.ts","../src/cms/blocks/video.ts","../src/cms/lexical/editor.ts","../src/cms/blocks/rich-text.ts","../src/cms/blocks/steps.ts","../src/cms/blocks/leaf-blocks.ts","../src/cms/blocks/accordion.ts","../src/cms/blocks/section-heading.ts","../src/cms/blocks/index.ts","../src/cms/hooks/coerce-blog-post-categories.ts","../src/cms/hooks/set-published-at.ts","../src/cms/shared/drafts-with-autosave.ts","../src/cms/collections/createBlogPosts.ts","../src/cms/collections/createCategories.ts","../src/cms/collections/createChangelog.ts","../src/cms/collections/createChangelogTags.ts","../src/cms/collections/createEventTags.ts","../src/cms/collections/createEvents.ts","../src/cms/collections/createMedia.ts","../src/cms/collections/createPages.ts","../src/cms/collections/createUsers.ts","../src/cms/globals/createSiteSettings.ts","../src/cms/applyOverride.ts","../src/cms/overrides.ts","../src/cms/buildCmsConfig.ts","../src/cms/requireEnv.ts","../src/cms/createS3MediaPlugin.ts","../src/cms/globals/createAnnouncementBanner.ts"],"sourcesContent":["import type { Access, FieldAccess, PayloadRequest } from 'payload'\n\nexport type AccessOptions = {\n /**\n * When true, disabled `api-tokens` users are denied public reads.\n * Defaults to on when the stock `api-tokens` collection is enabled.\n */\n apiTokens?: boolean\n}\n\nexport type AccessHelpers = {\n adminOnly: ({ req }: { req: PayloadRequest }) => boolean\n adminOrPublished: Access\n publicRead: Access\n adminOnlyField: FieldAccess\n}\n\nconst isAdminUser = (req: PayloadRequest): boolean => req.user?.collection === 'users'\n\nconst isDisabledApiToken = (req: PayloadRequest): boolean =>\n req.user?.collection === 'api-tokens' && req.user?.enabled === false\n\n/**\n * Build access helpers. Pass `{ apiTokens: true }` when the `api-tokens`\n * collection is registered (stock by default via `buildCmsConfig`).\n */\nexport function createAccessHelpers(options: AccessOptions = {}): AccessHelpers {\n const apiTokens = options.apiTokens === true\n\n const adminOnly = ({ req }: { req: PayloadRequest }): boolean => isAdminUser(req)\n\n const adminOrPublished: Access = ({ req }) => {\n if (isAdminUser(req)) return true\n if (apiTokens && isDisabledApiToken(req)) return false\n return { _status: { equals: 'published' } }\n }\n\n const publicRead: Access = ({ req }) => {\n if (apiTokens && isDisabledApiToken(req)) return false\n return true\n }\n\n const adminOnlyField: FieldAccess = ({ req }) => isAdminUser(req)\n\n return { adminOnly, adminOrPublished, publicRead, adminOnlyField }\n}\n","import type { AccessHelpers } from '../shared/access.js'\nimport type { Access, CollectionConfig } from 'payload'\n\nconst adminOrSelf: Access = ({ req }) => {\n if (req.user?.collection === 'users') return true\n if (req.user?.collection === 'api-tokens') return { id: { equals: req.user.id } }\n return false\n}\n\n/**\n * Stock API-key auth collection for server-to-server Payload REST/GraphQL clients.\n * Disable per site with `overrides['api-tokens'] = false`.\n */\nexport function createApiTokens(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'api-tokens',\n labels: {\n singular: 'API Token',\n plural: 'API Tokens',\n },\n admin: {\n useAsTitle: 'name',\n defaultColumns: ['name', 'description', 'enabled', 'createdAt'],\n description:\n 'Server-to-server tokens for non-admin clients calling the Payload REST/GraphQL API. ' +\n 'Each token authenticates as an api-tokens user and is restricted to published, public-readable content.',\n },\n auth: {\n useAPIKey: true,\n disableLocalStrategy: true,\n },\n access: {\n read: adminOrSelf,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n admin: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n admin: {\n description: 'Human-readable label, e.g. \"mobile-app-prod\" or \"partner-foo\".',\n },\n },\n {\n name: 'description',\n type: 'textarea',\n admin: {\n description: 'Who is this token for and what is it used for? Free-form notes.',\n },\n },\n {\n name: 'enabled',\n type: 'checkbox',\n defaultValue: true,\n admin: {\n position: 'sidebar',\n description:\n 'Disable to soft-revoke. To hard-revoke, clear the API Key field or delete the document.',\n },\n },\n ],\n }\n}\n","import type { FieldHook } from 'payload'\n\nexport const slugify: FieldHook = ({ value }) =>\n typeof value === 'string'\n ? value\n .toLowerCase()\n .replace(/\\s+/g, '-')\n .replace(/[^a-z0-9-]/g, '')\n : value\n","import type { GroupField, Validate } from 'payload'\n\nconst MAX_META_TITLE = 60\nconst MAX_META_DESCRIPTION = 160\n\nconst validateMetaTitle: Validate<string | null | undefined> = (value) => {\n if (!value || value.trim().length === 0) return 'Meta title is required.'\n if (value.length > MAX_META_TITLE)\n return `Meta title must be ${MAX_META_TITLE} characters or fewer (currently ${value.length}).`\n return true\n}\n\nconst validateMetaDescription: Validate<string | null | undefined> = (value) => {\n if (!value || value.trim().length === 0) return 'Meta description is required.'\n if (value.length > MAX_META_DESCRIPTION)\n return `Meta description must be ${MAX_META_DESCRIPTION} characters or fewer (currently ${value.length}).`\n return true\n}\n\nconst validateUrl: Validate<string | null | undefined> = (value) => {\n if (!value) return true\n try {\n new URL(value)\n return true\n } catch {\n return 'Must be a valid URL (e.g. https://example.com/page).'\n }\n}\n\nexport const seoFields: GroupField = {\n name: 'seo',\n type: 'group',\n label: 'SEO',\n fields: [\n {\n name: 'metaTitle',\n type: 'text',\n required: true,\n localized: true,\n maxLength: MAX_META_TITLE,\n validate: validateMetaTitle,\n admin: {\n description: `Required. ${MAX_META_TITLE} characters max — shown in browser tabs and search results.`,\n },\n },\n {\n name: 'metaDescription',\n type: 'textarea',\n required: true,\n localized: true,\n validate: validateMetaDescription,\n admin: {\n description: `Required. ${MAX_META_DESCRIPTION} characters max — shown in search result snippets.`,\n },\n },\n {\n name: 'ogImage',\n type: 'upload',\n relationTo: 'media',\n admin: {\n description:\n 'Used when the page is shared on social media (1200×630 recommended). Falls back to cover image if empty.',\n },\n },\n {\n name: 'canonicalUrl',\n type: 'text',\n validate: validateUrl,\n admin: {\n description: 'Override for syndicated content. Leave empty to auto-derive from slug.',\n },\n },\n {\n name: 'noIndex',\n type: 'checkbox',\n defaultValue: false,\n admin: {\n description: 'When checked, search engines will not index this page.',\n },\n },\n {\n name: 'noFollow',\n type: 'checkbox',\n defaultValue: false,\n admin: {\n description:\n 'When checked, search engines will not follow links on this page (paired with noIndex if needed).',\n },\n },\n ],\n}\n","import { slugify } from '../hooks/slugify.js'\nimport { seoFields } from '../shared/seo-fields.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\nexport function createAuthors(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'authors',\n admin: {\n useAsTitle: 'name',\n defaultColumns: ['name', 'slug', 'role'],\n },\n access: {\n read: access.publicRead,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: { position: 'sidebar' },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'avatar',\n type: 'upload',\n relationTo: 'media',\n },\n {\n name: 'role',\n type: 'text',\n localized: true,\n admin: {\n description: 'Job title or role (e.g. \"Lead Engineer\")',\n },\n },\n {\n name: 'bio',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'social',\n type: 'group',\n label: 'Social Profiles',\n admin: { position: 'sidebar' },\n fields: [\n { name: 'website', type: 'text' },\n { name: 'twitter', type: 'text', admin: { description: '@handle or full URL' } },\n { name: 'linkedin', type: 'text' },\n { name: 'github', type: 'text' },\n ],\n },\n {\n ...seoFields,\n fields: [\n ...seoFields.fields,\n {\n name: 'jsonLd',\n type: 'group',\n label: 'Structured Data Overrides',\n admin: {\n description: 'Used in JSON-LD Person schema on author pages and article bylines.',\n },\n fields: [\n {\n name: 'jobTitle',\n type: 'text',\n admin: { description: 'schema.org jobTitle (defaults to role if empty)' },\n },\n {\n name: 'worksFor',\n type: 'text',\n admin: { description: 'Organization name for schema.org worksFor' },\n },\n {\n name: 'sameAs',\n type: 'array',\n admin: {\n description: 'Extra canonical URLs for this person (Wikipedia, Crunchbase, etc.)',\n },\n fields: [{ name: 'url', type: 'text', required: true }],\n },\n ],\n },\n ],\n },\n ],\n }\n}\n","/** Shared language options for CMS code blocks and Lexical CodeBlock feature. */\nexport const languageOptions = [\n { label: 'TypeScript', value: 'typescript' },\n { label: 'JavaScript', value: 'javascript' },\n { label: 'Python', value: 'python' },\n { label: 'Bash / Shell', value: 'bash' },\n { label: 'Shell', value: 'shell' },\n { label: 'JSON', value: 'json' },\n { label: 'CSS', value: 'css' },\n { label: 'HTML', value: 'html' },\n { label: 'Rust', value: 'rust' },\n { label: 'Go', value: 'go' },\n { label: 'YAML', value: 'yaml' },\n { label: 'Markdown', value: 'markdown' },\n { label: 'Plain Text', value: 'plaintext' },\n]\n\nexport const codeBlockLanguages: Record<string, string> = Object.fromEntries(\n languageOptions.map((opt) => [opt.value, opt.label])\n)\n\nexport const defaultCodeLanguage = 'plaintext'\n","import { languageOptions } from './language-options.js'\n\nimport type { Block } from 'payload'\n\nexport const codeBlock: Block = {\n slug: 'code',\n labels: { singular: 'Code Block', plural: 'Code Blocks' },\n fields: [\n {\n name: 'language',\n type: 'select',\n defaultValue: 'typescript',\n options: languageOptions,\n },\n {\n name: 'filename',\n type: 'text',\n admin: { description: 'Optional filename label shown above the block' },\n },\n {\n name: 'code',\n type: 'code',\n required: true,\n admin: { language: 'typescript' },\n },\n ],\n}\n","import { languageOptions } from './language-options.js'\n\nimport type { Block } from 'payload'\n\nexport const codeTabsBlock: Block = {\n slug: 'code-tabs',\n labels: { singular: 'Code Tabs', plural: 'Code Tabs' },\n fields: [\n {\n name: 'tabs',\n type: 'array',\n required: true,\n minRows: 1,\n fields: [\n {\n name: 'label',\n type: 'text',\n required: true,\n admin: { description: 'Tab label (e.g. Windows, Linux, Android)' },\n },\n {\n name: 'language',\n type: 'select',\n defaultValue: 'bash',\n options: languageOptions,\n },\n {\n name: 'code',\n type: 'code',\n required: true,\n admin: { language: 'bash' },\n },\n ],\n },\n ],\n}\n","import type { Block } from 'payload'\n\nexport const downloadCtaBlock: Block = {\n slug: 'download-cta',\n labels: { singular: 'Download CTA', plural: 'Download CTAs' },\n fields: [\n {\n name: 'eyebrow',\n type: 'text',\n localized: true,\n },\n {\n name: 'heading',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'headingAccent',\n type: 'text',\n localized: true,\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'submitLabel',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'downloadUrl',\n type: 'text',\n required: true,\n },\n {\n name: 'downloadLabel',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'successMessage',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'consent',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'footnote',\n type: 'textarea',\n localized: true,\n },\n ],\n}\n","import type { Block } from 'payload'\n\nexport const imageBlock: Block = {\n slug: 'image',\n labels: { singular: 'Image', plural: 'Images' },\n fields: [\n {\n name: 'image',\n type: 'upload',\n relationTo: 'media',\n required: true,\n },\n {\n name: 'caption',\n type: 'text',\n localized: true,\n },\n {\n name: 'size',\n type: 'select',\n defaultValue: 'full',\n options: [\n { label: 'Full Width', value: 'full' },\n { label: 'Wide', value: 'wide' },\n { label: 'Medium', value: 'medium' },\n ],\n },\n ],\n}\n","import type { Block } from 'payload'\n\nexport const videoBlock: Block = {\n slug: 'video',\n labels: { singular: 'Video', plural: 'Videos' },\n fields: [\n {\n name: 'video',\n type: 'upload',\n relationTo: 'media',\n required: true,\n filterOptions: {\n mimeType: { contains: 'video' },\n },\n },\n {\n name: 'caption',\n type: 'text',\n localized: true,\n },\n {\n name: 'size',\n type: 'select',\n defaultValue: 'full',\n options: [\n { label: 'Full Width', value: 'full' },\n { label: 'Wide', value: 'wide' },\n { label: 'Medium', value: 'medium' },\n ],\n },\n ],\n}\n","import {\n BlocksFeature,\n CodeBlock,\n EXPERIMENTAL_TableFeature,\n UploadFeature,\n editorConfigFactory,\n lexicalEditor,\n} from '@payloadcms/richtext-lexical'\n\nimport { codeBlockLanguages, defaultCodeLanguage } from '../blocks/language-options.js'\nimport { videoBlock } from '../blocks/video.js'\n\nimport type { FeatureProviderServer } from '@payloadcms/richtext-lexical'\nimport type { SanitizedConfig } from 'payload'\n\nconst richTextFeatures = ({\n defaultFeatures,\n}: {\n defaultFeatures: FeatureProviderServer[]\n rootFeatures: FeatureProviderServer[]\n}) => [\n ...defaultFeatures.filter((feature) => feature.key !== 'upload'),\n UploadFeature({\n collections: {\n media: {\n fields: [\n {\n name: 'caption',\n type: 'text',\n },\n ],\n },\n },\n }),\n BlocksFeature({\n blocks: [\n CodeBlock({\n languages: codeBlockLanguages,\n defaultLanguage: defaultCodeLanguage,\n }),\n videoBlock,\n ],\n }),\n EXPERIMENTAL_TableFeature(),\n]\n\n/**\n * Shared Lexical editor for every `richText` field.\n *\n * Adds `CodeBlock`, inline `video` block, media upload captions, and\n * `EXPERIMENTAL_TableFeature` on top of Payload defaults.\n */\n// Return type is derived from `lexicalEditor` (a public export) rather than the\n// inferred `LexicalRichTextAdapterProvider` (not re-exported), so the generated\n// declaration stays portable while keeping the narrow Lexical adapter type that\n// consumers like `editorConfigFactory.fromEditor` require.\nexport const richTextEditor = (): ReturnType<typeof lexicalEditor> =>\n lexicalEditor({\n features: richTextFeatures,\n })\n\n/** Resolve Lexical editor config for seed scripts / markdown conversion. */\nexport async function getRichTextEditorConfig(config: SanitizedConfig) {\n return editorConfigFactory.fromFeatures({\n config,\n features: richTextFeatures,\n })\n}\n","import { richTextEditor } from '../lexical/editor.js'\n\nimport type { Block } from 'payload'\n\nexport const richTextBlock: Block = {\n slug: 'rich-text',\n labels: { singular: 'Rich Text', plural: 'Rich Text Blocks' },\n fields: [\n {\n name: 'content',\n type: 'richText',\n localized: true,\n editor: richTextEditor(),\n },\n ],\n}\n","import type { Block } from 'payload'\n\nexport const stepsBlock: Block = {\n slug: 'steps',\n labels: { singular: 'Steps List', plural: 'Steps Lists' },\n fields: [\n {\n name: 'items',\n type: 'array',\n required: true,\n minRows: 1,\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'avatar',\n type: 'upload',\n relationTo: 'media',\n admin: { description: 'Optional avatar or icon shown next to the step' },\n },\n ],\n },\n ],\n}\n","import { codeBlock } from './code.js'\nimport { codeTabsBlock } from './code-tabs.js'\nimport { downloadCtaBlock } from './download-cta.js'\nimport { imageBlock } from './image.js'\nimport { richTextBlock } from './rich-text.js'\nimport { stepsBlock } from './steps.js'\nimport { videoBlock } from './video.js'\n\nimport type { Block } from 'payload'\n\nexport const leafBlocks: Block[] = [\n richTextBlock,\n codeBlock,\n codeTabsBlock,\n imageBlock,\n videoBlock,\n downloadCtaBlock,\n stepsBlock,\n]\n","import { leafBlocks } from './leaf-blocks.js'\n\nimport type { Block } from 'payload'\n\nexport const accordionBlock: Block = {\n slug: 'accordion',\n labels: { singular: 'Accordion', plural: 'Accordions' },\n fields: [\n {\n name: 'items',\n type: 'array',\n required: true,\n minRows: 1,\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'defaultOpen',\n type: 'checkbox',\n defaultValue: false,\n },\n {\n name: 'content',\n type: 'blocks',\n blocks: leafBlocks,\n localized: true,\n },\n ],\n },\n ],\n}\n","import type { Block } from 'payload'\n\nexport const sectionHeadingBlock: Block = {\n slug: 'section-heading',\n labels: { singular: 'Section Heading', plural: 'Section Headings' },\n fields: [\n {\n name: 'text',\n type: 'text',\n required: true,\n localized: true,\n },\n ],\n}\n","import { accordionBlock } from './accordion.js'\nimport { codeBlock } from './code.js'\nimport { codeTabsBlock } from './code-tabs.js'\nimport { downloadCtaBlock } from './download-cta.js'\nimport { imageBlock } from './image.js'\nimport { richTextBlock } from './rich-text.js'\nimport { sectionHeadingBlock } from './section-heading.js'\nimport { stepsBlock } from './steps.js'\nimport { videoBlock } from './video.js'\n\nimport type { Block } from 'payload'\n\nexport { richTextBlock } from './rich-text.js'\nexport { codeBlock } from './code.js'\nexport { codeTabsBlock } from './code-tabs.js'\nexport { imageBlock } from './image.js'\nexport { videoBlock } from './video.js'\nexport { downloadCtaBlock } from './download-cta.js'\nexport { stepsBlock } from './steps.js'\nexport { accordionBlock } from './accordion.js'\nexport { sectionHeadingBlock } from './section-heading.js'\nexport { leafBlocks } from './leaf-blocks.js'\nexport { languageOptions, codeBlockLanguages, defaultCodeLanguage } from './language-options.js'\n\nexport const blogContentBlocks: Block[] = [\n richTextBlock,\n codeBlock,\n codeTabsBlock,\n imageBlock,\n videoBlock,\n downloadCtaBlock,\n stepsBlock,\n accordionBlock,\n]\n\nexport const pageContentBlocks: Block[] = [\n richTextBlock,\n codeBlock,\n codeTabsBlock,\n imageBlock,\n stepsBlock,\n accordionBlock,\n]\n\nexport const showcaseContentBlocks: Block[] = [\n sectionHeadingBlock,\n richTextBlock,\n codeBlock,\n imageBlock,\n]\n","import type { CollectionAfterReadHook, CollectionBeforeChangeHook } from 'payload'\n\nfunction toCategoryIdList(value: unknown): string[] {\n if (value == null || value === '') return []\n const items = Array.isArray(value) ? value : [value]\n return items\n .map((item) => {\n if (typeof item === 'string' || typeof item === 'number') return String(item)\n if (item && typeof item === 'object' && 'id' in item && item.id != null) {\n return String(item.id)\n }\n return null\n })\n .filter((id): id is string => Boolean(id))\n}\n\n/** Posts saved before `category` became `hasMany` still store a single value. */\nexport const coerceBlogPostCategoriesOnWrite: CollectionBeforeChangeHook = ({ data }) => {\n if (!data || !('category' in data)) return data\n data.category = toCategoryIdList(data.category)\n return data\n}\n\nexport const coerceBlogPostCategoriesOnRead: CollectionAfterReadHook = ({ doc }) => {\n if (!doc) return doc\n if (doc.category == null || doc.category === '') {\n doc.category = []\n return doc\n }\n if (!Array.isArray(doc.category)) {\n doc.category = [doc.category]\n }\n return doc\n}\n","import type { CollectionBeforeChangeHook } from 'payload'\n\nexport const setPublishedAt: CollectionBeforeChangeHook = ({ data }) => {\n if (data && !data.publishedAt && data._status === 'published') {\n data.publishedAt = new Date().toISOString()\n }\n return data\n}\n","import type { CollectionConfig } from 'payload'\n\nexport const draftsWithAutosave: CollectionConfig['versions'] = {\n maxPerDoc: 25,\n drafts: {\n autosave: {\n interval: 800,\n },\n schedulePublish: true,\n },\n}\n","import { blogContentBlocks } from '../blocks/index.js'\nimport {\n coerceBlogPostCategoriesOnRead,\n coerceBlogPostCategoriesOnWrite,\n} from '../hooks/coerce-blog-post-categories.js'\nimport { setPublishedAt } from '../hooks/set-published-at.js'\nimport { slugify } from '../hooks/slugify.js'\nimport { draftsWithAutosave } from '../shared/drafts-with-autosave.js'\nimport { seoFields } from '../shared/seo-fields.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\n/** Stock blog-posts collection (no site revalidation — add via overrides.hooks). */\nexport function createBlogPosts(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'blog-posts',\n defaultSort: '-publishedAt',\n admin: {\n useAsTitle: 'title',\n defaultColumns: ['title', 'slug', 'author', 'publishedAt', '_status'],\n },\n access: {\n read: access.adminOrPublished,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n versions: draftsWithAutosave,\n hooks: {\n beforeChange: [setPublishedAt, coerceBlogPostCategoriesOnWrite],\n afterRead: [coerceBlogPostCategoriesOnRead],\n },\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: {\n position: 'sidebar',\n description: 'URL-friendly identifier. Not localized — one slug per post.',\n },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'coverImage',\n type: 'upload',\n relationTo: 'media',\n },\n {\n name: 'imageAlt',\n type: 'text',\n localized: true,\n admin: {\n description:\n 'Alt text used for the auto-generated social/OG image (`og:image:alt`). Should describe the post for screen readers.',\n },\n },\n {\n name: 'excerpt',\n type: 'textarea',\n localized: true,\n admin: {\n description: 'Short summary shown in listing cards and meta description fallback.',\n },\n },\n {\n name: 'content',\n type: 'blocks',\n localized: true,\n blocks: blogContentBlocks,\n },\n {\n name: 'author',\n type: 'relationship',\n relationTo: 'authors',\n admin: { position: 'sidebar' },\n },\n {\n name: 'category',\n type: 'relationship',\n relationTo: 'categories',\n hasMany: true,\n label: 'Categories',\n admin: { position: 'sidebar' },\n },\n {\n name: 'readingTime',\n type: 'number',\n min: 1,\n admin: {\n position: 'sidebar',\n description: 'Estimated reading time in minutes.',\n },\n },\n {\n name: 'publishedAt',\n type: 'date',\n admin: {\n position: 'sidebar',\n date: { pickerAppearance: 'dayAndTime' },\n description: 'Auto-filled on first publish if left empty.',\n },\n },\n {\n name: 'showLatestNews',\n type: 'checkbox',\n defaultValue: true,\n admin: {\n position: 'sidebar',\n description: 'Show a \"Latest News\" section at the bottom of this post.',\n },\n },\n seoFields,\n ],\n }\n}\n","import { slugify } from '../hooks/slugify.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\nexport function createCategories(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'categories',\n admin: {\n useAsTitle: 'name',\n defaultColumns: ['name', 'slug'],\n },\n access: {\n read: access.publicRead,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: { position: 'sidebar' },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n },\n ],\n }\n}\n","import { slugify } from '../hooks/slugify.js'\nimport { draftsWithAutosave } from '../shared/drafts-with-autosave.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\n/**\n * Stock changelog collection (shared fields only).\n * Site-specific body / GitHub / related-block fields — add via `overrides.fields`.\n * Revalidation — add via `overrides.hooks`.\n */\nexport function createChangelog(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'changelog',\n labels: { singular: 'Changelog', plural: 'Changelog' },\n defaultSort: '-releaseDate',\n admin: {\n useAsTitle: 'title',\n defaultColumns: ['title', 'version', 'versionType', 'tags', 'releaseDate', '_status'],\n },\n access: {\n read: access.adminOrPublished,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n versions: draftsWithAutosave,\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n admin: {\n description:\n 'Release headline shown on the changelog detail page (e.g. \"Added Solana Support\").',\n },\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: {\n position: 'sidebar',\n description: 'URL-friendly identifier. Not localized — one slug per entry.',\n },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'version',\n type: 'text',\n admin: {\n position: 'sidebar',\n description:\n 'Optional semantic version label shown in the badge, e.g. v1.1.0 or 2.3.0. Omit for non-versioned announcements.',\n },\n },\n {\n name: 'versionType',\n type: 'select',\n options: [\n { label: 'Major', value: 'major' },\n { label: 'Minor', value: 'minor' },\n { label: 'Patch', value: 'patch' },\n ],\n admin: {\n position: 'sidebar',\n description:\n 'Release line for badge styling (major / minor / patch). Editors set this explicitly.',\n },\n },\n {\n name: 'releaseDate',\n type: 'date',\n required: true,\n admin: {\n position: 'sidebar',\n date: { pickerAppearance: 'dayOnly', displayFormat: 'MMM d, yyyy' },\n },\n },\n {\n name: 'tags',\n type: 'relationship',\n relationTo: 'changelog-tags',\n hasMany: true,\n label: 'Tags',\n admin: {\n position: 'sidebar',\n description: 'Editor-managed tags from the Changelog Tags collection.',\n },\n },\n {\n name: 'heroImage',\n type: 'upload',\n relationTo: 'media',\n admin: {\n description: 'Large visual above the article body on the changelog detail page.',\n },\n },\n {\n name: 'summary',\n type: 'textarea',\n localized: true,\n admin: {\n description: 'Short excerpt for listing cards and previews.',\n },\n },\n ],\n }\n}\n","import { slugify } from '../hooks/slugify.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\n/** Stock changelog-tags (no site revalidation — add via overrides.hooks). */\nexport function createChangelogTags(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'changelog-tags',\n defaultSort: 'order',\n admin: {\n useAsTitle: 'name',\n defaultColumns: ['name', 'slug', 'order'],\n description: 'Tags shown on changelog entries.',\n },\n access: {\n read: access.publicRead,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: {\n position: 'sidebar',\n description: 'URL-friendly identifier used by listing filters.',\n },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'order',\n type: 'number',\n defaultValue: 0,\n admin: {\n position: 'sidebar',\n description: 'Display order in admin lists (ascending). Ties broken by name.',\n },\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n admin: { description: 'Optional context shown to editors. Not rendered publicly yet.' },\n },\n ],\n }\n}\n","import { slugify } from '../hooks/slugify.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\n/** Stock event-tags (no site revalidation — add via overrides.hooks). */\nexport function createEventTags(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'event-tags',\n labels: { singular: 'Event Tag', plural: 'Event Tags' },\n defaultSort: 'order',\n admin: {\n useAsTitle: 'name',\n defaultColumns: ['name', 'slug', 'order'],\n description:\n 'Reusable event categories (Meetup, Workshop, Hackathon, …). Editors can add types without code changes. Related from Events.',\n },\n access: {\n read: access.publicRead,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: {\n position: 'sidebar',\n description: 'URL-friendly identifier used by filters and relationships.',\n },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'order',\n type: 'number',\n defaultValue: 0,\n admin: {\n position: 'sidebar',\n description: 'Display order in admin lists (ascending). Ties broken by name.',\n },\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n admin: { description: 'Optional context shown to editors.' },\n },\n ],\n }\n}\n","import { setPublishedAt } from '../hooks/set-published-at.js'\nimport { slugify } from '../hooks/slugify.js'\nimport { richTextEditor } from '../lexical/editor.js'\nimport { draftsWithAutosave } from '../shared/drafts-with-autosave.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig, Validate } from 'payload'\n\n/**\n * Display abbreviations accepted in addition to IANA names (e.g. Europe/Paris).\n * Sites map these to IANA when they need a timezone database identifier.\n */\nconst TIMEZONE_ABBREVIATIONS = new Set([\n 'UTC',\n 'GMT',\n 'CET',\n 'CEST',\n 'WET',\n 'WEST',\n 'EET',\n 'EEST',\n 'BST',\n 'EST',\n 'EDT',\n 'CST',\n 'CDT',\n 'MST',\n 'MDT',\n 'PST',\n 'PDT',\n])\n\nfunction parseDate(value: unknown): Date | null {\n if (value instanceof Date) {\n return Number.isNaN(value.getTime()) ? null : value\n }\n if (typeof value === 'string' && value.trim()) {\n const date = new Date(value)\n return Number.isNaN(date.getTime()) ? null : date\n }\n return null\n}\n\nfunction isValidIanaTimeZone(timeZone: string): boolean {\n try {\n Intl.DateTimeFormat('en-US', { timeZone }).format(new Date())\n return true\n } catch {\n return false\n }\n}\n\nconst validateTimezone: Validate<string | null | undefined> = (value) => {\n if (!value || !value.trim()) return 'Timezone is required.'\n const timeZone = value.trim()\n if (TIMEZONE_ABBREVIATIONS.has(timeZone.toUpperCase())) return true\n if (isValidIanaTimeZone(timeZone)) return true\n return 'Must be a timezone abbreviation (CET, UTC, …) or a valid IANA timezone (e.g. Europe/Paris).'\n}\n\nconst validateExternalUrl: Validate<string | null | undefined> = (value) => {\n if (!value || !value.trim()) return 'External URL is required.'\n try {\n new URL(value)\n return true\n } catch {\n return 'Must be a valid URL (e.g. https://example.com/event).'\n }\n}\n\nconst validateEndsAt: Validate<string | Date | null | undefined> = (value, { siblingData }) => {\n const end = parseDate(value)\n if (!end) return 'End date and time is required.'\n\n const start = parseDate(\n siblingData && typeof siblingData === 'object' && 'startsAt' in siblingData\n ? siblingData.startsAt\n : undefined\n )\n if (start && end.getTime() <= start.getTime()) {\n return 'End date and time must be after the start.'\n }\n\n return true\n}\n\n/**\n * Stock events collection (shared fields only).\n * SEO / site-specific fields — add via `overrides.fields`.\n * Revalidation — add via `overrides.hooks`.\n */\nexport function createEvents(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'events',\n labels: { singular: 'Event', plural: 'Events' },\n defaultSort: 'startsAt',\n admin: {\n useAsTitle: 'title',\n defaultColumns: ['title', 'slug', 'tag', 'startsAt', 'endsAt', '_status'],\n description: 'Reusable events consumed by marketing / community surfaces across sites.',\n },\n access: {\n read: access.adminOrPublished,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n versions: draftsWithAutosave,\n hooks: {\n beforeChange: [setPublishedAt],\n },\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: {\n position: 'sidebar',\n description: 'URL-friendly identifier. Not localized — one slug per event.',\n },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'summary',\n type: 'textarea',\n required: true,\n localized: true,\n admin: {\n description: 'Short description for listings, previews, and calendar bodies.',\n },\n },\n {\n name: 'coverImage',\n type: 'upload',\n relationTo: 'media',\n admin: {\n description: 'Optional cover/hero image for detail or promotional surfaces.',\n },\n },\n {\n name: 'startsAt',\n type: 'date',\n required: true,\n admin: {\n position: 'sidebar',\n date: { pickerAppearance: 'dayAndTime', displayFormat: 'MMM d, yyyy h:mm a' },\n description: 'Event start date and time. Sites derive upcoming vs past from this value.',\n },\n },\n {\n name: 'endsAt',\n type: 'date',\n required: true,\n validate: validateEndsAt,\n admin: {\n position: 'sidebar',\n date: { pickerAppearance: 'dayAndTime', displayFormat: 'MMM d, yyyy h:mm a' },\n description: 'Event end date and time. Must be after the start.',\n },\n },\n {\n name: 'timezone',\n type: 'text',\n required: true,\n validate: validateTimezone,\n admin: {\n position: 'sidebar',\n description:\n 'Display timezone: abbreviation (CET, WET, UTC) or IANA name (Europe/Paris).',\n },\n },\n {\n name: 'location',\n type: 'text',\n required: true,\n localized: true,\n admin: {\n description: 'Venue or platform (e.g. Discord, Online, Lisbon).',\n },\n },\n {\n name: 'tag',\n type: 'relationship',\n relationTo: 'event-tags',\n required: true,\n admin: {\n position: 'sidebar',\n description: 'Primary event category from Event Tags.',\n },\n },\n {\n name: 'ctaKind',\n type: 'select',\n required: true,\n defaultValue: 'link',\n options: [\n { label: 'External link', value: 'link' },\n { label: 'Add to calendar', value: 'calendar' },\n ],\n admin: {\n position: 'sidebar',\n description:\n 'Primary listing action. Link opens the external URL; calendar lets the site offer an add-to-calendar flow.',\n },\n },\n {\n name: 'ctaLabel',\n type: 'text',\n required: true,\n localized: true,\n admin: {\n description: 'Label for the primary listing action (e.g. Register, Watch recording).',\n },\n },\n {\n name: 'ctaUrl',\n type: 'text',\n required: true,\n validate: validateExternalUrl,\n admin: {\n description:\n 'External event URL. Opened for link actions; included in calendar details for calendar actions.',\n },\n },\n {\n name: 'content',\n type: 'richText',\n localized: true,\n editor: richTextEditor(),\n admin: {\n description: 'Optional long-form body for event detail pages.',\n },\n },\n {\n name: 'publishedAt',\n type: 'date',\n admin: {\n position: 'sidebar',\n date: { pickerAppearance: 'dayAndTime' },\n description: 'Auto-filled on first publish if left empty.',\n },\n },\n ],\n }\n}\n","import type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\n/** Stock media upload collection (always publicly readable once uploaded). */\nexport function createMedia(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'media',\n admin: {\n useAsTitle: 'filename',\n defaultColumns: ['filename', 'alt', 'updatedAt'],\n },\n access: {\n read: access.publicRead,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n upload: {\n imageSizes: [\n {\n name: 'thumbnail',\n width: 400,\n height: 300,\n position: 'centre',\n },\n {\n name: 'card',\n width: 768,\n height: 512,\n position: 'centre',\n },\n {\n name: 'tablet',\n width: 1024,\n height: undefined,\n position: 'centre',\n },\n ],\n adminThumbnail: 'thumbnail',\n mimeTypes: ['image/*', 'video/*', 'application/pdf'],\n },\n fields: [\n {\n name: 'alt',\n type: 'text',\n required: true,\n localized: true,\n },\n ],\n }\n}\n","import { pageContentBlocks } from '../blocks/index.js'\nimport { setPublishedAt } from '../hooks/set-published-at.js'\nimport { slugify } from '../hooks/slugify.js'\nimport { draftsWithAutosave } from '../shared/drafts-with-autosave.js'\nimport { seoFields } from '../shared/seo-fields.js'\n\nimport type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\nfunction createContentPageCollection(\n access: AccessHelpers,\n slug: 'pages' | 'legal-pages'\n): CollectionConfig {\n return {\n slug,\n admin: {\n useAsTitle: 'title',\n defaultColumns: ['title', 'slug', 'publishedAt', '_status'],\n },\n access: {\n read: access.adminOrPublished,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n },\n versions: draftsWithAutosave,\n hooks: {\n beforeChange: [setPublishedAt],\n },\n fields: [\n {\n name: 'title',\n type: 'text',\n required: true,\n localized: true,\n },\n {\n name: 'slug',\n type: 'text',\n required: true,\n unique: true,\n admin: {\n position: 'sidebar',\n description: 'URL-friendly identifier. Not localized — one slug per page.',\n },\n hooks: { beforeValidate: [slugify] },\n },\n {\n name: 'content',\n type: 'blocks',\n localized: true,\n blocks: pageContentBlocks,\n },\n {\n name: 'publishedAt',\n type: 'date',\n admin: {\n position: 'sidebar',\n date: { pickerAppearance: 'dayAndTime' },\n description: 'Auto-filled on first publish if left empty.',\n },\n },\n seoFields,\n ],\n }\n}\n\nexport function createPages(access: AccessHelpers): CollectionConfig {\n return createContentPageCollection(access, 'pages')\n}\n\nexport function createLegalPages(access: AccessHelpers): CollectionConfig {\n return createContentPageCollection(access, 'legal-pages')\n}\n","import type { AccessHelpers } from '../shared/access.js'\nimport type { CollectionConfig } from 'payload'\n\nexport function createUsers(access: AccessHelpers): CollectionConfig {\n return {\n slug: 'users',\n admin: {\n useAsTitle: 'email',\n },\n auth: {\n verify: false,\n },\n access: {\n read: access.adminOnly,\n create: access.adminOnly,\n update: access.adminOnly,\n delete: access.adminOnly,\n admin: access.adminOnly,\n },\n fields: [\n {\n name: 'googleId',\n type: 'text',\n unique: true,\n index: true,\n admin: {\n position: 'sidebar',\n readOnly: true,\n description: 'Google OAuth user ID',\n },\n },\n {\n name: 'name',\n type: 'text',\n admin: {\n description: 'Display name from Google',\n },\n },\n {\n name: 'picture',\n type: 'text',\n admin: {\n description: 'Profile picture URL from Google',\n },\n },\n ],\n }\n}\n","import type { AccessHelpers } from '../shared/access.js'\nimport type { GlobalConfig } from 'payload'\n\nexport function createSiteSettings(access: AccessHelpers): GlobalConfig {\n return {\n slug: 'site-settings',\n label: 'Site Settings',\n access: {\n read: access.publicRead,\n update: access.adminOnly,\n },\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n localized: true,\n admin: {\n description: 'Public site name used in titles and structured data.',\n },\n },\n {\n name: 'defaultDescription',\n type: 'textarea',\n required: true,\n localized: true,\n admin: {\n description: 'Fallback meta description when a page does not define its own.',\n },\n },\n {\n name: 'defaultOgImage',\n type: 'upload',\n relationTo: 'media',\n admin: {\n description: 'Default Open Graph image (1200×630 recommended).',\n },\n },\n {\n name: 'organization',\n type: 'group',\n label: 'Organization',\n fields: [\n {\n name: 'name',\n type: 'text',\n required: true,\n },\n {\n name: 'legalName',\n type: 'text',\n },\n {\n name: 'description',\n type: 'textarea',\n localized: true,\n },\n {\n name: 'logo',\n type: 'upload',\n relationTo: 'media',\n },\n {\n name: 'foundingDate',\n type: 'text',\n admin: { description: 'Year or ISO date for schema.org structured data.' },\n },\n ],\n },\n {\n name: 'social',\n type: 'group',\n label: 'Social Profiles',\n fields: [\n { name: 'twitter', type: 'text' },\n { name: 'github', type: 'text' },\n { name: 'linkedin', type: 'text' },\n ],\n },\n ],\n }\n}\n","import type { CollectionConfig, Field, GlobalConfig } from 'payload'\n\ntype OverridableConfig = CollectionConfig | GlobalConfig\n\ntype Override<TConfig extends OverridableConfig> =\n | false\n | {\n fields?: (base: Field[]) => Field[]\n hooks?: Partial<TConfig['hooks']>\n admin?: Partial<TConfig['admin']>\n access?: Partial<TConfig['access']>\n config?: (base: TConfig) => TConfig\n }\n\nexport type CollectionOverride = Override<CollectionConfig>\nexport type GlobalOverride = Override<GlobalConfig>\n\ntype HookArrays = Record<string, unknown[] | undefined>\n\n// Payload collection/global hooks are all arrays of functions, so overrides are\n// appended to the base hooks rather than replacing them.\nfunction mergeHooks(base: HookArrays | undefined, extra: HookArrays | undefined): HookArrays {\n const keys = new Set([...Object.keys(base ?? {}), ...Object.keys(extra ?? {})])\n const merged: HookArrays = {}\n keys.forEach((key) => {\n const combined = [...(base?.[key] ?? []), ...(extra?.[key] ?? [])]\n if (combined.length) merged[key] = combined\n })\n return merged\n}\n\nfunction applyOverride<TConfig extends OverridableConfig>(\n base: TConfig,\n override: Override<TConfig> | undefined\n): TConfig | null {\n if (override === false) return null\n if (!override) return base\n\n const next = {\n ...base,\n ...(override.admin && { admin: { ...base.admin, ...override.admin } }),\n ...(override.access && { access: { ...base.access, ...override.access } }),\n ...(override.fields && { fields: override.fields(base.fields ?? []) }),\n ...(override.hooks && { hooks: mergeHooks(base.hooks, override.hooks as HookArrays) }),\n } as TConfig\n\n return override.config ? override.config(next) : next\n}\n\nexport const applyCollectionOverride = (\n base: CollectionConfig,\n override: CollectionOverride | undefined\n): CollectionConfig | null => applyOverride(base, override)\n\nexport const applyGlobalOverride = (\n base: GlobalConfig,\n override: GlobalOverride | undefined\n): GlobalConfig | null => applyOverride(base, override)\n","import type { CollectionOverride, GlobalOverride } from './applyOverride.js'\n\n/** Slugs of the stock collections shipped by `buildCmsConfig`, in registration order. */\nexport const STOCK_COLLECTION_SLUGS = [\n 'users',\n 'api-tokens',\n 'media',\n 'authors',\n 'categories',\n 'blog-posts',\n 'pages',\n 'legal-pages',\n 'changelog-tags',\n 'changelog',\n 'event-tags',\n 'events',\n] as const\n\nexport type StockCollectionSlug = (typeof STOCK_COLLECTION_SLUGS)[number]\n\n/** Typed map of collection/global overrides for `buildCmsConfig`. */\nexport type Overrides = Partial<Record<StockCollectionSlug, CollectionOverride>> & {\n 'site-settings'?: GlobalOverride\n}\n","import { buildConfig } from 'payload'\n\nimport { createAccessHelpers, type AccessOptions } from './shared/access.js'\nimport { createApiTokens } from './collections/createApiTokens.js'\nimport { createAuthors } from './collections/createAuthors.js'\nimport { createBlogPosts } from './collections/createBlogPosts.js'\nimport { createCategories } from './collections/createCategories.js'\nimport { createChangelog } from './collections/createChangelog.js'\nimport { createChangelogTags } from './collections/createChangelogTags.js'\nimport { createEventTags } from './collections/createEventTags.js'\nimport { createEvents } from './collections/createEvents.js'\nimport { createMedia } from './collections/createMedia.js'\nimport { createLegalPages, createPages } from './collections/createPages.js'\nimport { createUsers } from './collections/createUsers.js'\nimport { createSiteSettings } from './globals/createSiteSettings.js'\nimport { richTextEditor } from './lexical/editor.js'\nimport { applyCollectionOverride, applyGlobalOverride } from './applyOverride.js'\nimport { STOCK_COLLECTION_SLUGS, type Overrides, type StockCollectionSlug } from './overrides.js'\n\nimport type { CollectionConfig, Config, GlobalConfig, Plugin } from 'payload'\n\nexport type BuildCmsConfigOptions<TLocale extends string = string> = {\n secret: string\n // Payload DB adapter instance (e.g. mongooseAdapter({ url }))\n db: Config['db']\n /** Sharp instance from the `sharp` package. */\n sharp?: Config['sharp']\n cors?: Config['cors']\n csrf?: Config['csrf']\n locales: readonly TLocale[]\n /** Must be one of `locales`. */\n defaultLocale: TLocale\n admin?: Config['admin']\n plugins?: Plugin[]\n /** Defaults to the package Lexical editor. */\n editor?: Config['editor']\n access?: AccessOptions\n /** Collection/global slug → override | false. */\n overrides?: Overrides\n extraCollections?: CollectionConfig[]\n extraGlobals?: GlobalConfig[]\n typescript?: Config['typescript']\n /** Extra top-level Payload config keys (e.g. endpoints, graphQL). */\n payload?: Partial<\n Omit<\n Config,\n | 'secret'\n | 'db'\n | 'sharp'\n | 'cors'\n | 'csrf'\n | 'admin'\n | 'plugins'\n | 'editor'\n | 'collections'\n | 'globals'\n | 'localization'\n | 'typescript'\n >\n >\n}\n\n/** Drop keys whose value is `undefined` so they don't clobber Payload defaults. */\nfunction defined<T extends Record<string, unknown>>(obj: T): Partial<T> {\n return Object.fromEntries(Object.entries(obj).filter(([, v]) => v !== undefined)) as Partial<T>\n}\n\n/**\n * Build a Payload config from shared stock collections/globals plus site\n * overrides and extras. Types are still generated in the consuming app.\n */\nexport function buildCmsConfig<const TLocale extends string>(\n options: BuildCmsConfigOptions<TLocale>\n) {\n const overrides = options.overrides ?? {}\n const access = createAccessHelpers({\n ...options.access,\n apiTokens: options.access?.apiTokens ?? overrides['api-tokens'] !== false,\n })\n\n const stock: Record<StockCollectionSlug, CollectionConfig> = {\n 'users': createUsers(access),\n 'api-tokens': createApiTokens(access),\n 'media': createMedia(access),\n 'authors': createAuthors(access),\n 'categories': createCategories(access),\n 'blog-posts': createBlogPosts(access),\n 'pages': createPages(access),\n 'legal-pages': createLegalPages(access),\n 'changelog-tags': createChangelogTags(access),\n 'changelog': createChangelog(access),\n 'event-tags': createEventTags(access),\n 'events': createEvents(access),\n }\n\n const collections = [\n ...STOCK_COLLECTION_SLUGS.map((slug) =>\n applyCollectionOverride(stock[slug], overrides[slug])\n ).filter((c): c is CollectionConfig => c !== null),\n ...(options.extraCollections ?? []),\n ]\n\n const siteSettings = applyGlobalOverride(createSiteSettings(access), overrides['site-settings'])\n const globals = [...(siteSettings ? [siteSettings] : []), ...(options.extraGlobals ?? [])]\n const { jobs: jobsOverride, ...payloadRest } = options.payload ?? {}\n\n return buildConfig({\n ...payloadRest,\n jobs: {\n // In-process cron so Payload `schedulePublish` jobs actually run.\n // Override via `payload.jobs`. Do not use on serverless hosts.\n autoRun: [{ cron: '* * * * *' }],\n ...jobsOverride,\n },\n ...defined({\n sharp: options.sharp,\n cors: options.cors,\n csrf: options.csrf,\n plugins: options.plugins,\n }),\n secret: options.secret,\n db: options.db,\n admin: {\n user: 'users',\n ...options.admin,\n },\n editor: options.editor ?? richTextEditor(),\n collections,\n ...(globals.length ? { globals } : {}),\n localization: {\n locales: options.locales.map((code) => ({\n code,\n label: code.toUpperCase(),\n })),\n defaultLocale: options.defaultLocale,\n fallback: true,\n },\n typescript: options.typescript ?? {\n outputFile: 'src/payload-types.ts',\n },\n })\n}\n","import { createLogger } from '../utils/logger/logger.js'\n\nconst log = createLogger('env')\n\n/**\n * Read a required env var. During Next.js `phase-production-build` and\n * `generate:importmap` (when NEXT_PHASE is unset) returns \"\" instead of throwing,\n * because those phases do not connect to the DB.\n */\nexport function requireEnvAtRuntime(name: string): string {\n const value = process.env[name]\n const isBuildTime = !process.env.NEXT_PHASE || process.env.NEXT_PHASE === 'phase-production-build'\n if (!value && !isBuildTime) {\n log.error(`Missing required environment variable: ${name}`)\n throw new Error(`Missing required environment variable: ${name}`)\n }\n return value ?? ''\n}\n","import { s3Storage } from '@payloadcms/storage-s3'\n\nimport type { Plugin } from 'payload'\n\nexport type CreateS3MediaPluginOptions = {\n /** Defaults to `process.env.AWS_S3_BUCKET`. */\n bucket?: string\n accessKeyId?: string\n secretAccessKey?: string\n region?: string\n /** Custom S3-compatible endpoint (MinIO, etc.). Defaults to `AWS_S3_ENDPOINT`. */\n endpoint?: string\n /** Defaults to `AWS_S3_FORCE_PATH_STYLE === 'true'`. */\n forcePathStyle?: boolean\n /** Collection slug that owns uploads. Defaults to `media`. */\n collection?: string\n}\n\n/** Payload S3 storage plugin wired for the stock `media` collection. */\nexport function createS3MediaPlugin(options: CreateS3MediaPluginOptions = {}): Plugin {\n const bucket = options.bucket ?? process.env.AWS_S3_BUCKET ?? ''\n const endpoint = options.endpoint ?? process.env.AWS_S3_ENDPOINT ?? ''\n const forcePathStyle = options.forcePathStyle ?? process.env.AWS_S3_FORCE_PATH_STYLE === 'true'\n\n return s3Storage({\n enabled: Boolean(bucket),\n collections: {\n [options.collection ?? 'media']: true,\n },\n bucket,\n config: {\n credentials: {\n accessKeyId: options.accessKeyId ?? process.env.AWS_ACCESS_KEY_ID ?? '',\n secretAccessKey: options.secretAccessKey ?? process.env.AWS_SECRET_ACCESS_KEY ?? '',\n },\n region: options.region ?? process.env.AWS_S3_REGION ?? 'us-east-1',\n ...(endpoint ? { endpoint } : {}),\n ...(forcePathStyle ? { forcePathStyle: true } : {}),\n },\n })\n}\n","import type { AccessHelpers } from '../shared/access.js'\nimport type { GlobalConfig, Validate } from 'payload'\n\nconst validateBannerId: Validate<string | null | undefined, { enabled?: boolean | null }> = (\n value,\n { siblingData }\n) => {\n if (siblingData?.enabled && !String(value ?? '').trim()) {\n return 'Banner ID is required when the banner is enabled.'\n }\n return true\n}\n\n/** Announcement banner global (no site revalidation — add via applyGlobalOverride hooks). */\nexport function createAnnouncementBanner(access: AccessHelpers): GlobalConfig {\n return {\n slug: 'announcement-banner',\n label: 'Announcement Banner',\n admin: {\n description:\n 'Sticky site-wide banner shown above the main navigation. Bump Banner ID when replacing content so users who dismissed an older message in the current session see the new one.',\n },\n access: {\n read: access.publicRead,\n update: access.adminOnly,\n },\n fields: [\n {\n name: 'enabled',\n type: 'checkbox',\n defaultValue: false,\n admin: {\n description: 'When off, the banner is hidden on the public site.',\n },\n },\n {\n name: 'bannerId',\n type: 'text',\n admin: {\n description:\n 'Stable identifier for this banner version. Change it when publishing new copy so users who dismissed an older banner in this session see the update.',\n },\n validate: validateBannerId,\n },\n {\n type: 'row',\n fields: [\n {\n name: 'prefix',\n type: 'text',\n localized: true,\n maxLength: 8,\n admin: {\n width: '25%',\n description: 'Accent label (max 8 characters), e.g. \"New:\"',\n },\n },\n {\n name: 'description',\n type: 'text',\n localized: true,\n maxLength: 1000,\n admin: {\n width: '75%',\n description: 'Banner message (max 1000 characters).',\n },\n },\n ],\n },\n {\n type: 'row',\n fields: [\n {\n name: 'ctaLabel',\n type: 'text',\n localized: true,\n maxLength: 18,\n admin: {\n width: '50%',\n description: 'Optional button label (max 18 characters).',\n },\n },\n {\n name: 'ctaHref',\n type: 'text',\n admin: {\n width: '50%',\n description: 'Optional button URL. Relative paths stay in-site.',\n },\n },\n ],\n },\n ],\n }\n}\n"],"mappings":";;;;;AAiBA,MAAM,eAAe,QAAiC,IAAI,MAAM,eAAe;AAE/E,MAAM,sBAAsB,QAC1B,IAAI,MAAM,eAAe,gBAAgB,IAAI,MAAM,YAAY;;;;;AAMjE,SAAgB,oBAAoB,UAAyB,CAAC,GAAkB;CAC9E,MAAM,YAAY,QAAQ,cAAc;CAExC,MAAM,aAAa,EAAE,UAA4C,YAAY,GAAG;CAEhF,MAAM,oBAA4B,EAAE,UAAU;EAC5C,IAAI,YAAY,GAAG,GAAG,OAAO;EAC7B,IAAI,aAAa,mBAAmB,GAAG,GAAG,OAAO;EACjD,OAAO,EAAE,SAAS,EAAE,QAAQ,YAAY,EAAE;CAC5C;CAEA,MAAM,cAAsB,EAAE,UAAU;EACtC,IAAI,aAAa,mBAAmB,GAAG,GAAG,OAAO;EACjD,OAAO;CACT;CAEA,MAAM,kBAA+B,EAAE,UAAU,YAAY,GAAG;CAEhE,OAAO;EAAE;EAAW;EAAkB;EAAY;CAAe;AACnE;;;AC1CA,MAAM,eAAuB,EAAE,UAAU;CACvC,IAAI,IAAI,MAAM,eAAe,SAAS,OAAO;CAC7C,IAAI,IAAI,MAAM,eAAe,cAAc,OAAO,EAAE,IAAI,EAAE,QAAQ,IAAI,KAAK,GAAG,EAAE;CAChF,OAAO;AACT;;;;;AAMA,SAAgB,gBAAgB,QAAyC;CACvE,OAAO;EACL,MAAM;EACN,QAAQ;GACN,UAAU;GACV,QAAQ;EACV;EACA,OAAO;GACL,YAAY;GACZ,gBAAgB;IAAC;IAAQ;IAAe;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