@tetherto/dev-websites-core 0.3.2 → 0.3.3
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.
- package/README.md +2 -0
- package/dist/cms/index.d.mts +2 -2
- package/dist/cms/index.mjs +2 -2
- package/dist/cms.mjs +301 -3
- package/dist/cms.mjs.map +1 -1
- package/dist/index.d.mts +14 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index5.d.mts +2 -2
- package/dist/ui/components/Badge/Badge.d.mts +1 -1
- package/dist/ui/components/Button/Button.d.mts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -133,6 +133,8 @@ Registered by `buildCmsConfig` in this order. Disable or extend any of them via
|
|
|
133
133
|
| `legal-pages` | collection | Legal/policy content pages (same shape as `pages`). |
|
|
134
134
|
| `changelog-tags` | collection | Editor-managed tags shown on changelog entries. |
|
|
135
135
|
| `changelog` | collection | Changelog entries — **shared fields only** (see below). |
|
|
136
|
+
| `event-tags` | collection | Editor-managed event categories (Meetup, Workshop, Hackathon, …). Related from `events`. |
|
|
137
|
+
| `events` | collection | Events — drafts + autosave, start/end, timezone, location, tag, external URL, optional cover/body. |
|
|
136
138
|
| `site-settings` | global | Site name, default description/OG image, organization + social. |
|
|
137
139
|
|
|
138
140
|
Changelog stock ships shared fields only; site-specific body / GitHub /
|
package/dist/cms/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as videoBlock, B as buildCmsConfig, C as defaultCodeLanguage, D as accordionBlock, E as sectionHeadingBlock, F as setPublishedAt, G as GlobalOverride, H as STOCK_COLLECTION_SLUGS, I as slugify, J as AccessHelpers, K as applyCollectionOverride, L as seoFields, M as codeTabsBlock, N as codeBlock, O as stepsBlock, P as richTextBlock, R as draftsWithAutosave, S as codeBlockLanguages, T as leafBlocks, U as StockCollectionSlug, V as Overrides, W as CollectionOverride, X as createAccessHelpers, Y as AccessOptions, _ as getRichTextEditorConfig, a as createChangelogTags, b as pageContentBlocks, c as createBlogPosts, d as createMedia, f as createApiTokens, g as requireEnvAtRuntime, h as createS3MediaPlugin, i as createChangelog, j as imageBlock, k as downloadCtaBlock, l as createCategories, m as CreateS3MediaPluginOptions, n as createEvents, o as createLegalPages, p as createUsers, q as applyGlobalOverride, r as createEventTags, s as createPages, t as createSiteSettings, u as createAuthors, v as richTextEditor, w as languageOptions, x as showcaseContentBlocks, y as blogContentBlocks, z as BuildCmsConfigOptions } from "../index.mjs";
|
|
2
2
|
import { n as readPayloadMediaAsDataUrl, r as readPayloadMediaBuffer, t as PayloadMedia } from "../readMediaBuffer.mjs";
|
|
3
|
-
export { type AccessHelpers, type AccessOptions, type BuildCmsConfigOptions, type CollectionOverride, type CreateS3MediaPluginOptions, type GlobalOverride, type Overrides, type PayloadMedia, STOCK_COLLECTION_SLUGS, type StockCollectionSlug, accordionBlock, applyCollectionOverride, applyGlobalOverride, blogContentBlocks, buildCmsConfig, codeBlock, codeBlockLanguages, codeTabsBlock, createAccessHelpers, createApiTokens, createAuthors, createBlogPosts, createCategories, createChangelog, createChangelogTags, createLegalPages, createMedia, createPages, createS3MediaPlugin, createSiteSettings, createUsers, defaultCodeLanguage, downloadCtaBlock, draftsWithAutosave, getRichTextEditorConfig, imageBlock, languageOptions, leafBlocks, pageContentBlocks, readPayloadMediaAsDataUrl, readPayloadMediaBuffer, requireEnvAtRuntime, richTextBlock, richTextEditor, sectionHeadingBlock, seoFields, setPublishedAt, showcaseContentBlocks, slugify, stepsBlock, videoBlock };
|
|
3
|
+
export { type AccessHelpers, type AccessOptions, type BuildCmsConfigOptions, type CollectionOverride, type CreateS3MediaPluginOptions, type GlobalOverride, type Overrides, type PayloadMedia, STOCK_COLLECTION_SLUGS, type StockCollectionSlug, accordionBlock, applyCollectionOverride, applyGlobalOverride, blogContentBlocks, buildCmsConfig, codeBlock, codeBlockLanguages, codeTabsBlock, createAccessHelpers, createApiTokens, createAuthors, createBlogPosts, createCategories, createChangelog, createChangelogTags, createEventTags, createEvents, createLegalPages, createMedia, createPages, createS3MediaPlugin, createSiteSettings, createUsers, defaultCodeLanguage, downloadCtaBlock, draftsWithAutosave, getRichTextEditorConfig, imageBlock, languageOptions, leafBlocks, pageContentBlocks, readPayloadMediaAsDataUrl, readPayloadMediaBuffer, requireEnvAtRuntime, richTextBlock, richTextEditor, sectionHeadingBlock, seoFields, setPublishedAt, showcaseContentBlocks, slugify, stepsBlock, videoBlock };
|
package/dist/cms/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as videoBlock, B as slugify, C as sectionHeadingBlock, D as richTextBlock, E as stepsBlock, F as codeBlockLanguages, H as createAccessHelpers, I as defaultCodeLanguage, L as languageOptions, M as downloadCtaBlock, N as codeTabsBlock, O as getRichTextEditorConfig, P as codeBlock, R as createAuthors, S as showcaseContentBlocks, T as leafBlocks, V as createApiTokens, _ as createBlogPosts, a as applyCollectionOverride, b as blogContentBlocks, c as createUsers, d as createMedia, f as createEvents, g as createCategories, h as createChangelog, i as STOCK_COLLECTION_SLUGS, j as imageBlock, k as richTextEditor, l as createLegalPages, m as createChangelogTags, n as requireEnvAtRuntime, o as applyGlobalOverride, p as createEventTags, r as buildCmsConfig, s as createSiteSettings, t as createS3MediaPlugin, u as createPages, v as draftsWithAutosave, w as accordionBlock, x as pageContentBlocks, y as setPublishedAt, z as seoFields } from "../cms.mjs";
|
|
2
2
|
import { n as readPayloadMediaBuffer, t as readPayloadMediaAsDataUrl } from "../readMediaBuffer.mjs";
|
|
3
|
-
export { STOCK_COLLECTION_SLUGS, accordionBlock, applyCollectionOverride, applyGlobalOverride, blogContentBlocks, buildCmsConfig, codeBlock, codeBlockLanguages, codeTabsBlock, createAccessHelpers, createApiTokens, createAuthors, createBlogPosts, createCategories, createChangelog, createChangelogTags, createLegalPages, createMedia, createPages, createS3MediaPlugin, createSiteSettings, createUsers, defaultCodeLanguage, downloadCtaBlock, draftsWithAutosave, getRichTextEditorConfig, imageBlock, languageOptions, leafBlocks, pageContentBlocks, readPayloadMediaAsDataUrl, readPayloadMediaBuffer, requireEnvAtRuntime, richTextBlock, richTextEditor, sectionHeadingBlock, seoFields, setPublishedAt, showcaseContentBlocks, slugify, stepsBlock, videoBlock };
|
|
3
|
+
export { STOCK_COLLECTION_SLUGS, accordionBlock, applyCollectionOverride, applyGlobalOverride, blogContentBlocks, buildCmsConfig, codeBlock, codeBlockLanguages, codeTabsBlock, createAccessHelpers, createApiTokens, createAuthors, createBlogPosts, createCategories, createChangelog, createChangelogTags, createEventTags, createEvents, createLegalPages, createMedia, createPages, createS3MediaPlugin, createSiteSettings, createUsers, defaultCodeLanguage, downloadCtaBlock, draftsWithAutosave, getRichTextEditorConfig, imageBlock, languageOptions, leafBlocks, pageContentBlocks, readPayloadMediaAsDataUrl, readPayloadMediaBuffer, requireEnvAtRuntime, richTextBlock, richTextEditor, sectionHeadingBlock, seoFields, setPublishedAt, showcaseContentBlocks, slugify, stepsBlock, videoBlock };
|
package/dist/cms.mjs
CHANGED
|
@@ -1048,6 +1048,300 @@ function createChangelogTags(access) {
|
|
|
1048
1048
|
};
|
|
1049
1049
|
}
|
|
1050
1050
|
//#endregion
|
|
1051
|
+
//#region src/cms/collections/createEventTags.ts
|
|
1052
|
+
/** Stock event-tags (no site revalidation — add via overrides.hooks). */
|
|
1053
|
+
function createEventTags(access) {
|
|
1054
|
+
return {
|
|
1055
|
+
slug: "event-tags",
|
|
1056
|
+
labels: {
|
|
1057
|
+
singular: "Event Tag",
|
|
1058
|
+
plural: "Event Tags"
|
|
1059
|
+
},
|
|
1060
|
+
defaultSort: "order",
|
|
1061
|
+
admin: {
|
|
1062
|
+
useAsTitle: "name",
|
|
1063
|
+
defaultColumns: [
|
|
1064
|
+
"name",
|
|
1065
|
+
"slug",
|
|
1066
|
+
"order"
|
|
1067
|
+
],
|
|
1068
|
+
description: "Reusable event categories (Meetup, Workshop, Hackathon, …). Editors can add types without code changes. Related from Events."
|
|
1069
|
+
},
|
|
1070
|
+
access: {
|
|
1071
|
+
read: access.publicRead,
|
|
1072
|
+
create: access.adminOnly,
|
|
1073
|
+
update: access.adminOnly,
|
|
1074
|
+
delete: access.adminOnly
|
|
1075
|
+
},
|
|
1076
|
+
fields: [
|
|
1077
|
+
{
|
|
1078
|
+
name: "name",
|
|
1079
|
+
type: "text",
|
|
1080
|
+
required: true,
|
|
1081
|
+
localized: true
|
|
1082
|
+
},
|
|
1083
|
+
{
|
|
1084
|
+
name: "slug",
|
|
1085
|
+
type: "text",
|
|
1086
|
+
required: true,
|
|
1087
|
+
unique: true,
|
|
1088
|
+
admin: {
|
|
1089
|
+
position: "sidebar",
|
|
1090
|
+
description: "URL-friendly identifier used by filters and relationships."
|
|
1091
|
+
},
|
|
1092
|
+
hooks: { beforeValidate: [slugify] }
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
name: "order",
|
|
1096
|
+
type: "number",
|
|
1097
|
+
defaultValue: 0,
|
|
1098
|
+
admin: {
|
|
1099
|
+
position: "sidebar",
|
|
1100
|
+
description: "Display order in admin lists (ascending). Ties broken by name."
|
|
1101
|
+
}
|
|
1102
|
+
},
|
|
1103
|
+
{
|
|
1104
|
+
name: "description",
|
|
1105
|
+
type: "textarea",
|
|
1106
|
+
localized: true,
|
|
1107
|
+
admin: { description: "Optional context shown to editors." }
|
|
1108
|
+
}
|
|
1109
|
+
]
|
|
1110
|
+
};
|
|
1111
|
+
}
|
|
1112
|
+
//#endregion
|
|
1113
|
+
//#region src/cms/collections/createEvents.ts
|
|
1114
|
+
/**
|
|
1115
|
+
* Display abbreviations accepted in addition to IANA names (e.g. Europe/Paris).
|
|
1116
|
+
* Sites map these to IANA when they need a timezone database identifier.
|
|
1117
|
+
*/
|
|
1118
|
+
const TIMEZONE_ABBREVIATIONS = /* @__PURE__ */ new Set([
|
|
1119
|
+
"UTC",
|
|
1120
|
+
"GMT",
|
|
1121
|
+
"CET",
|
|
1122
|
+
"CEST",
|
|
1123
|
+
"WET",
|
|
1124
|
+
"WEST",
|
|
1125
|
+
"EET",
|
|
1126
|
+
"EEST",
|
|
1127
|
+
"BST",
|
|
1128
|
+
"EST",
|
|
1129
|
+
"EDT",
|
|
1130
|
+
"CST",
|
|
1131
|
+
"CDT",
|
|
1132
|
+
"MST",
|
|
1133
|
+
"MDT",
|
|
1134
|
+
"PST",
|
|
1135
|
+
"PDT"
|
|
1136
|
+
]);
|
|
1137
|
+
function parseDate(value) {
|
|
1138
|
+
if (value instanceof Date) return Number.isNaN(value.getTime()) ? null : value;
|
|
1139
|
+
if (typeof value === "string" && value.trim()) {
|
|
1140
|
+
const date = new Date(value);
|
|
1141
|
+
return Number.isNaN(date.getTime()) ? null : date;
|
|
1142
|
+
}
|
|
1143
|
+
return null;
|
|
1144
|
+
}
|
|
1145
|
+
function isValidIanaTimeZone(timeZone) {
|
|
1146
|
+
try {
|
|
1147
|
+
Intl.DateTimeFormat("en-US", { timeZone }).format(/* @__PURE__ */ new Date());
|
|
1148
|
+
return true;
|
|
1149
|
+
} catch {
|
|
1150
|
+
return false;
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
const validateTimezone = (value) => {
|
|
1154
|
+
if (!value || !value.trim()) return "Timezone is required.";
|
|
1155
|
+
const timeZone = value.trim();
|
|
1156
|
+
if (TIMEZONE_ABBREVIATIONS.has(timeZone.toUpperCase())) return true;
|
|
1157
|
+
if (isValidIanaTimeZone(timeZone)) return true;
|
|
1158
|
+
return "Must be a timezone abbreviation (CET, UTC, …) or a valid IANA timezone (e.g. Europe/Paris).";
|
|
1159
|
+
};
|
|
1160
|
+
const validateExternalUrl = (value) => {
|
|
1161
|
+
if (!value || !value.trim()) return "External URL is required.";
|
|
1162
|
+
try {
|
|
1163
|
+
new URL(value);
|
|
1164
|
+
return true;
|
|
1165
|
+
} catch {
|
|
1166
|
+
return "Must be a valid URL (e.g. https://example.com/event).";
|
|
1167
|
+
}
|
|
1168
|
+
};
|
|
1169
|
+
const validateEndsAt = (value, { siblingData }) => {
|
|
1170
|
+
const end = parseDate(value);
|
|
1171
|
+
if (!end) return "End date and time is required.";
|
|
1172
|
+
const start = parseDate(siblingData && typeof siblingData === "object" && "startsAt" in siblingData ? siblingData.startsAt : void 0);
|
|
1173
|
+
if (start && end.getTime() <= start.getTime()) return "End date and time must be after the start.";
|
|
1174
|
+
return true;
|
|
1175
|
+
};
|
|
1176
|
+
/**
|
|
1177
|
+
* Stock events collection (shared fields only).
|
|
1178
|
+
* SEO / site-specific fields — add via `overrides.fields`.
|
|
1179
|
+
* Revalidation — add via `overrides.hooks`.
|
|
1180
|
+
*/
|
|
1181
|
+
function createEvents(access) {
|
|
1182
|
+
return {
|
|
1183
|
+
slug: "events",
|
|
1184
|
+
labels: {
|
|
1185
|
+
singular: "Event",
|
|
1186
|
+
plural: "Events"
|
|
1187
|
+
},
|
|
1188
|
+
defaultSort: "startsAt",
|
|
1189
|
+
admin: {
|
|
1190
|
+
useAsTitle: "title",
|
|
1191
|
+
defaultColumns: [
|
|
1192
|
+
"title",
|
|
1193
|
+
"slug",
|
|
1194
|
+
"tag",
|
|
1195
|
+
"startsAt",
|
|
1196
|
+
"endsAt",
|
|
1197
|
+
"_status"
|
|
1198
|
+
],
|
|
1199
|
+
description: "Reusable events consumed by marketing / community surfaces across sites."
|
|
1200
|
+
},
|
|
1201
|
+
access: {
|
|
1202
|
+
read: access.adminOrPublished,
|
|
1203
|
+
create: access.adminOnly,
|
|
1204
|
+
update: access.adminOnly,
|
|
1205
|
+
delete: access.adminOnly
|
|
1206
|
+
},
|
|
1207
|
+
versions: draftsWithAutosave,
|
|
1208
|
+
hooks: { beforeChange: [setPublishedAt] },
|
|
1209
|
+
fields: [
|
|
1210
|
+
{
|
|
1211
|
+
name: "title",
|
|
1212
|
+
type: "text",
|
|
1213
|
+
required: true,
|
|
1214
|
+
localized: true
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
name: "slug",
|
|
1218
|
+
type: "text",
|
|
1219
|
+
required: true,
|
|
1220
|
+
unique: true,
|
|
1221
|
+
admin: {
|
|
1222
|
+
position: "sidebar",
|
|
1223
|
+
description: "URL-friendly identifier. Not localized — one slug per event."
|
|
1224
|
+
},
|
|
1225
|
+
hooks: { beforeValidate: [slugify] }
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
name: "summary",
|
|
1229
|
+
type: "textarea",
|
|
1230
|
+
required: true,
|
|
1231
|
+
localized: true,
|
|
1232
|
+
admin: { description: "Short description for listings, previews, and calendar bodies." }
|
|
1233
|
+
},
|
|
1234
|
+
{
|
|
1235
|
+
name: "coverImage",
|
|
1236
|
+
type: "upload",
|
|
1237
|
+
relationTo: "media",
|
|
1238
|
+
admin: { description: "Optional cover/hero image for detail or promotional surfaces." }
|
|
1239
|
+
},
|
|
1240
|
+
{
|
|
1241
|
+
name: "startsAt",
|
|
1242
|
+
type: "date",
|
|
1243
|
+
required: true,
|
|
1244
|
+
admin: {
|
|
1245
|
+
position: "sidebar",
|
|
1246
|
+
date: {
|
|
1247
|
+
pickerAppearance: "dayAndTime",
|
|
1248
|
+
displayFormat: "MMM d, yyyy h:mm a"
|
|
1249
|
+
},
|
|
1250
|
+
description: "Event start date and time. Sites derive upcoming vs past from this value."
|
|
1251
|
+
}
|
|
1252
|
+
},
|
|
1253
|
+
{
|
|
1254
|
+
name: "endsAt",
|
|
1255
|
+
type: "date",
|
|
1256
|
+
required: true,
|
|
1257
|
+
validate: validateEndsAt,
|
|
1258
|
+
admin: {
|
|
1259
|
+
position: "sidebar",
|
|
1260
|
+
date: {
|
|
1261
|
+
pickerAppearance: "dayAndTime",
|
|
1262
|
+
displayFormat: "MMM d, yyyy h:mm a"
|
|
1263
|
+
},
|
|
1264
|
+
description: "Event end date and time. Must be after the start."
|
|
1265
|
+
}
|
|
1266
|
+
},
|
|
1267
|
+
{
|
|
1268
|
+
name: "timezone",
|
|
1269
|
+
type: "text",
|
|
1270
|
+
required: true,
|
|
1271
|
+
validate: validateTimezone,
|
|
1272
|
+
admin: {
|
|
1273
|
+
position: "sidebar",
|
|
1274
|
+
description: "Display timezone: abbreviation (CET, WET, UTC) or IANA name (Europe/Paris)."
|
|
1275
|
+
}
|
|
1276
|
+
},
|
|
1277
|
+
{
|
|
1278
|
+
name: "location",
|
|
1279
|
+
type: "text",
|
|
1280
|
+
required: true,
|
|
1281
|
+
localized: true,
|
|
1282
|
+
admin: { description: "Venue or platform (e.g. Discord, Online, Lisbon)." }
|
|
1283
|
+
},
|
|
1284
|
+
{
|
|
1285
|
+
name: "tag",
|
|
1286
|
+
type: "relationship",
|
|
1287
|
+
relationTo: "event-tags",
|
|
1288
|
+
required: true,
|
|
1289
|
+
admin: {
|
|
1290
|
+
position: "sidebar",
|
|
1291
|
+
description: "Primary event category from Event Tags."
|
|
1292
|
+
}
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
name: "ctaKind",
|
|
1296
|
+
type: "select",
|
|
1297
|
+
required: true,
|
|
1298
|
+
defaultValue: "link",
|
|
1299
|
+
options: [{
|
|
1300
|
+
label: "External link",
|
|
1301
|
+
value: "link"
|
|
1302
|
+
}, {
|
|
1303
|
+
label: "Add to calendar",
|
|
1304
|
+
value: "calendar"
|
|
1305
|
+
}],
|
|
1306
|
+
admin: {
|
|
1307
|
+
position: "sidebar",
|
|
1308
|
+
description: "Primary listing action. Link opens the external URL; calendar lets the site offer an add-to-calendar flow."
|
|
1309
|
+
}
|
|
1310
|
+
},
|
|
1311
|
+
{
|
|
1312
|
+
name: "ctaLabel",
|
|
1313
|
+
type: "text",
|
|
1314
|
+
required: true,
|
|
1315
|
+
localized: true,
|
|
1316
|
+
admin: { description: "Label for the primary listing action (e.g. Register, Watch recording)." }
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
name: "ctaUrl",
|
|
1320
|
+
type: "text",
|
|
1321
|
+
required: true,
|
|
1322
|
+
validate: validateExternalUrl,
|
|
1323
|
+
admin: { description: "External event URL. Opened for link actions; included in calendar details for calendar actions." }
|
|
1324
|
+
},
|
|
1325
|
+
{
|
|
1326
|
+
name: "content",
|
|
1327
|
+
type: "richText",
|
|
1328
|
+
localized: true,
|
|
1329
|
+
editor: richTextEditor(),
|
|
1330
|
+
admin: { description: "Optional long-form body for event detail pages." }
|
|
1331
|
+
},
|
|
1332
|
+
{
|
|
1333
|
+
name: "publishedAt",
|
|
1334
|
+
type: "date",
|
|
1335
|
+
admin: {
|
|
1336
|
+
position: "sidebar",
|
|
1337
|
+
date: { pickerAppearance: "dayAndTime" },
|
|
1338
|
+
description: "Auto-filled on first publish if left empty."
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
]
|
|
1342
|
+
};
|
|
1343
|
+
}
|
|
1344
|
+
//#endregion
|
|
1051
1345
|
//#region src/cms/collections/createMedia.ts
|
|
1052
1346
|
/** Stock media upload collection (always publicly readable once uploaded). */
|
|
1053
1347
|
function createMedia(access) {
|
|
@@ -1313,7 +1607,9 @@ const STOCK_COLLECTION_SLUGS = [
|
|
|
1313
1607
|
"pages",
|
|
1314
1608
|
"legal-pages",
|
|
1315
1609
|
"changelog-tags",
|
|
1316
|
-
"changelog"
|
|
1610
|
+
"changelog",
|
|
1611
|
+
"event-tags",
|
|
1612
|
+
"events"
|
|
1317
1613
|
];
|
|
1318
1614
|
//#endregion
|
|
1319
1615
|
//#region src/cms/buildCmsConfig.ts
|
|
@@ -1341,7 +1637,9 @@ function buildCmsConfig(options) {
|
|
|
1341
1637
|
"pages": createPages(access),
|
|
1342
1638
|
"legal-pages": createLegalPages(access),
|
|
1343
1639
|
"changelog-tags": createChangelogTags(access),
|
|
1344
|
-
"changelog": createChangelog(access)
|
|
1640
|
+
"changelog": createChangelog(access),
|
|
1641
|
+
"event-tags": createEventTags(access),
|
|
1642
|
+
"events": createEvents(access)
|
|
1345
1643
|
};
|
|
1346
1644
|
const collections = [...STOCK_COLLECTION_SLUGS.map((slug) => applyCollectionOverride(stock[slug], overrides[slug])).filter((c) => c !== null), ...options.extraCollections ?? []];
|
|
1347
1645
|
const siteSettings = applyGlobalOverride(createSiteSettings(access), overrides["site-settings"]);
|
|
@@ -1414,6 +1712,6 @@ function createS3MediaPlugin(options = {}) {
|
|
|
1414
1712
|
});
|
|
1415
1713
|
}
|
|
1416
1714
|
//#endregion
|
|
1417
|
-
export {
|
|
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 };
|
|
1418
1716
|
|
|
1419
1717
|
//# 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/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 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] 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 { 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 }\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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{"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,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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rC;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;GACA;IACE,MAAM;IACN,MAAM;IACN,UAAU;IACV,UAAU;IACV,OAAO,EACL,aACE,kGACJ;GACF;GACA;IACE,MAAM;IACN,MAAM;IACN,WAAW;IACX,QAAQ,eAAe;IACvB,OAAO,EACL,aAAa,kDACf;GACF;GACA;IACE,MAAM;IACN,MAAM;IACN,OAAO;KACL,UAAU;KACV,MAAM,EAAE,kBAAkB,aAAa;KACvC,aAAa;IACf;GACF;EACF;CACF;AACF;;;;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a,KAAK;;;;;;AAO9B,SAAgB,oBAAoB,MAAsB;CACxD,MAAM,QAAQ,QAAQ,IAAI;CAC1B,MAAM,cAAc,CAAC,QAAQ,IAAI,cAAc,QAAQ,IAAI,eAAe;CAC1E,IAAI,CAAC,SAAS,CAAC,aAAa;EAC1B,IAAI,MAAM,0CAA0C,MAAM;EAC1D,MAAM,IAAI,MAAM,0CAA0C,MAAM;CAClE;CACA,OAAO,SAAS;AAClB;;;;ACEA,SAAgB,oBAAoB,UAAsC,CAAC,GAAW;CACpF,MAAM,SAAS,QAAQ,UAAU,QAAQ,IAAI,iBAAiB;CAC9D,MAAM,WAAW,QAAQ,YAAY,QAAQ,IAAI,mBAAmB;CACpE,MAAM,iBAAiB,QAAQ,kBAAkB,QAAQ,IAAI,4BAA4B;CAEzF,OAAO,UAAU;EACf,SAAS,QAAQ,MAAM;EACvB,aAAa,GACV,QAAQ,cAAc,UAAU,KACnC;EACA;EACA,QAAQ;GACN,aAAa;IACX,aAAa,QAAQ,eAAe,QAAQ,IAAI,qBAAqB;IACrE,iBAAiB,QAAQ,mBAAmB,QAAQ,IAAI,yBAAyB;GACnF;GACA,QAAQ,QAAQ,UAAU,QAAQ,IAAI,iBAAiB;GACvD,GAAI,WAAW,EAAE,SAAS,IAAI,CAAC;GAC/B,GAAI,iBAAiB,EAAE,gBAAgB,KAAK,IAAI,CAAC;EACnD;CACF,CAAC;AACH"}
|
package/dist/index.d.mts
CHANGED
|
@@ -38,7 +38,7 @@ declare const applyGlobalOverride: (base: GlobalConfig, override: GlobalOverride
|
|
|
38
38
|
//#endregion
|
|
39
39
|
//#region src/cms/overrides.d.ts
|
|
40
40
|
/** Slugs of the stock collections shipped by `buildCmsConfig`, in registration order. */
|
|
41
|
-
declare const STOCK_COLLECTION_SLUGS: readonly ["users", "api-tokens", "media", "authors", "categories", "blog-posts", "pages", "legal-pages", "changelog-tags", "changelog"];
|
|
41
|
+
declare const STOCK_COLLECTION_SLUGS: readonly ["users", "api-tokens", "media", "authors", "categories", "blog-posts", "pages", "legal-pages", "changelog-tags", "changelog", "event-tags", "events"];
|
|
42
42
|
type StockCollectionSlug = (typeof STOCK_COLLECTION_SLUGS)[number];
|
|
43
43
|
/** Typed map of collection/global overrides for `buildCmsConfig`. */
|
|
44
44
|
type Overrides = Partial<Record<StockCollectionSlug, CollectionOverride>> & {
|
|
@@ -207,8 +207,20 @@ declare function createChangelogTags(access: AccessHelpers): CollectionConfig;
|
|
|
207
207
|
*/
|
|
208
208
|
declare function createChangelog(access: AccessHelpers): CollectionConfig;
|
|
209
209
|
//#endregion
|
|
210
|
+
//#region src/cms/collections/createEventTags.d.ts
|
|
211
|
+
/** Stock event-tags (no site revalidation — add via overrides.hooks). */
|
|
212
|
+
declare function createEventTags(access: AccessHelpers): CollectionConfig;
|
|
213
|
+
//#endregion
|
|
214
|
+
//#region src/cms/collections/createEvents.d.ts
|
|
215
|
+
/**
|
|
216
|
+
* Stock events collection (shared fields only).
|
|
217
|
+
* SEO / site-specific fields — add via `overrides.fields`.
|
|
218
|
+
* Revalidation — add via `overrides.hooks`.
|
|
219
|
+
*/
|
|
220
|
+
declare function createEvents(access: AccessHelpers): CollectionConfig;
|
|
221
|
+
//#endregion
|
|
210
222
|
//#region src/cms/globals/createSiteSettings.d.ts
|
|
211
223
|
declare function createSiteSettings(access: AccessHelpers): GlobalConfig;
|
|
212
224
|
//#endregion
|
|
213
|
-
export {
|
|
225
|
+
export { videoBlock as A, buildCmsConfig as B, defaultCodeLanguage as C, accordionBlock as D, sectionHeadingBlock as E, setPublishedAt as F, GlobalOverride as G, STOCK_COLLECTION_SLUGS as H, slugify as I, AccessHelpers as J, applyCollectionOverride as K, seoFields as L, codeTabsBlock as M, codeBlock as N, stepsBlock as O, richTextBlock as P, draftsWithAutosave as R, codeBlockLanguages as S, leafBlocks as T, StockCollectionSlug as U, Overrides as V, CollectionOverride as W, createAccessHelpers as X, AccessOptions as Y, getRichTextEditorConfig as _, createChangelogTags as a, pageContentBlocks as b, createBlogPosts as c, createMedia as d, createApiTokens as f, requireEnvAtRuntime as g, createS3MediaPlugin as h, createChangelog as i, imageBlock as j, downloadCtaBlock as k, createCategories as l, CreateS3MediaPluginOptions as m, createEvents as n, createLegalPages as o, createUsers as p, applyGlobalOverride as q, createEventTags as r, createPages as s, createSiteSettings as t, createAuthors as u, richTextEditor as v, languageOptions as w, showcaseContentBlocks as x, blogContentBlocks as y, BuildCmsConfigOptions as z };
|
|
214
226
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/cms/shared/access.ts","../src/cms/applyOverride.ts","../src/cms/overrides.ts","../src/cms/buildCmsConfig.ts","../src/cms/shared/drafts-with-autosave.ts","../src/cms/shared/seo-fields.ts","../src/cms/hooks/slugify.ts","../src/cms/hooks/set-published-at.ts","../src/cms/blocks/rich-text.ts","../src/cms/blocks/code.ts","../src/cms/blocks/code-tabs.ts","../src/cms/blocks/image.ts","../src/cms/blocks/video.ts","../src/cms/blocks/download-cta.ts","../src/cms/blocks/steps.ts","../src/cms/blocks/accordion.ts","../src/cms/blocks/section-heading.ts","../src/cms/blocks/leaf-blocks.ts","../src/cms/blocks/language-options.ts","../src/cms/blocks/index.ts","../src/cms/lexical/editor.ts","../src/cms/requireEnv.ts","../src/cms/createS3MediaPlugin.ts","../src/cms/collections/createUsers.ts","../src/cms/collections/createApiTokens.ts","../src/cms/collections/createMedia.ts","../src/cms/collections/createAuthors.ts","../src/cms/collections/createCategories.ts","../src/cms/collections/createBlogPosts.ts","../src/cms/collections/createPages.ts","../src/cms/collections/createChangelogTags.ts","../src/cms/collections/createChangelog.ts","../src/cms/globals/createSiteSettings.ts"],"mappings":";;;KAEY;;;;;EAKV;;KAGU;EACV,cAAc;IAAS,KAAK;;EAC5B,kBAAkB;EAClB,YAAY;EACZ,gBAAgB;;;;;;iBAYF,oBAAoB,UAAS,gBAAqB;;;KCxB7D,oBAAoB,mBAAmB;KAEvC,SAAS,gBAAgB;EAGxB,UAAU,MAAM,YAAY;EAC5B,QAAQ,QAAQ;EAChB,QAAQ,QAAQ;EAChB,SAAS,QAAQ;EACjB,UAAU,MAAM,YAAY;;KAGtB,qBAAqB,SAAS;KAC9B,iBAAiB,SAAS;cAkCzB,0BACX,MAAM,kBACN,UAAU,mCACT;cAEU,sBACX,MAAM,cACN,UAAU,+BACT;;;;cCtDU;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/cms/shared/access.ts","../src/cms/applyOverride.ts","../src/cms/overrides.ts","../src/cms/buildCmsConfig.ts","../src/cms/shared/drafts-with-autosave.ts","../src/cms/shared/seo-fields.ts","../src/cms/hooks/slugify.ts","../src/cms/hooks/set-published-at.ts","../src/cms/blocks/rich-text.ts","../src/cms/blocks/code.ts","../src/cms/blocks/code-tabs.ts","../src/cms/blocks/image.ts","../src/cms/blocks/video.ts","../src/cms/blocks/download-cta.ts","../src/cms/blocks/steps.ts","../src/cms/blocks/accordion.ts","../src/cms/blocks/section-heading.ts","../src/cms/blocks/leaf-blocks.ts","../src/cms/blocks/language-options.ts","../src/cms/blocks/index.ts","../src/cms/lexical/editor.ts","../src/cms/requireEnv.ts","../src/cms/createS3MediaPlugin.ts","../src/cms/collections/createUsers.ts","../src/cms/collections/createApiTokens.ts","../src/cms/collections/createMedia.ts","../src/cms/collections/createAuthors.ts","../src/cms/collections/createCategories.ts","../src/cms/collections/createBlogPosts.ts","../src/cms/collections/createPages.ts","../src/cms/collections/createChangelogTags.ts","../src/cms/collections/createChangelog.ts","../src/cms/collections/createEventTags.ts","../src/cms/collections/createEvents.ts","../src/cms/globals/createSiteSettings.ts"],"mappings":";;;KAEY;;;;;EAKV;;KAGU;EACV,cAAc;IAAS,KAAK;;EAC5B,kBAAkB;EAClB,YAAY;EACZ,gBAAgB;;;;;;iBAYF,oBAAoB,UAAS,gBAAqB;;;KCxB7D,oBAAoB,mBAAmB;KAEvC,SA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,gBAAgB;;;iBCDtC,iBAAiB,QAAQ,gBAAgB;;;;iBCKzC,gBAAgB,QAAQ,gBAAgB;;;iBCyDxC,YAAY,QAAQ,gBAAgB;iBAIpC,iBAAiB,QAAQ,gBAAgB;;;;iBCjEzC,oBAAoB,QAAQ,gBAAgB;;;;;;;;iBCK5C,gBAAgB,QAAQ,gBAAgB;;;;iBCLxC,gBAAgB,QAAQ,gBAAgB;;;;;;;;iBCqFxC,aAAa,QAAQ,gBAAgB;;;iBCxFrC,mBAAmB,QAAQ,gBAAgB"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as videoBlock, B as slugify, C as sectionHeadingBlock, D as richTextBlock, E as stepsBlock, F as codeBlockLanguages, H as createAccessHelpers, I as defaultCodeLanguage, L as languageOptions, M as downloadCtaBlock, N as codeTabsBlock, O as getRichTextEditorConfig, P as codeBlock, R as createAuthors, S as showcaseContentBlocks, T as leafBlocks, V as createApiTokens, _ as createBlogPosts, a as applyCollectionOverride, b as blogContentBlocks, c as createUsers, d as createMedia, f as createEvents, g as createCategories, h as createChangelog, i as STOCK_COLLECTION_SLUGS, j as imageBlock, k as richTextEditor, l as createLegalPages, m as createChangelogTags, n as requireEnvAtRuntime, o as applyGlobalOverride, p as createEventTags, r as buildCmsConfig, s as createSiteSettings, t as createS3MediaPlugin, u as createPages, v as draftsWithAutosave, w as accordionBlock, x as pageContentBlocks, y as setPublishedAt, z as seoFields } from "./cms.mjs";
|
|
2
2
|
import { t as createLogger } from "./logger.mjs";
|
|
3
3
|
import { n as readPayloadMediaBuffer, t as readPayloadMediaAsDataUrl } from "./readMediaBuffer.mjs";
|
|
4
4
|
import { n as createMetadataFactory, r as getSiteUrl, t as getOgBackgroundDataUrl } from "./seo.mjs";
|
|
5
5
|
import { n as Languages, t as LanguageLabel } from "./i18n.mjs";
|
|
6
6
|
import { n as stripShikiPreBackground, t as toPlainValue } from "./utils.mjs";
|
|
7
|
-
export { LanguageLabel, Languages, STOCK_COLLECTION_SLUGS, accordionBlock, applyCollectionOverride, applyGlobalOverride, blogContentBlocks, buildCmsConfig, codeBlock, codeBlockLanguages, codeTabsBlock, createAccessHelpers, createApiTokens, createAuthors, createBlogPosts, createCategories, createChangelog, createChangelogTags, createLegalPages, createLogger, createMedia, createMetadataFactory, createPages, createS3MediaPlugin, createSiteSettings, createUsers, defaultCodeLanguage, downloadCtaBlock, draftsWithAutosave, getOgBackgroundDataUrl, getRichTextEditorConfig, getSiteUrl, imageBlock, languageOptions, leafBlocks, pageContentBlocks, readPayloadMediaAsDataUrl, readPayloadMediaBuffer, requireEnvAtRuntime, richTextBlock, richTextEditor, sectionHeadingBlock, seoFields, setPublishedAt, showcaseContentBlocks, slugify, stepsBlock, stripShikiPreBackground, toPlainValue, videoBlock };
|
|
7
|
+
export { LanguageLabel, Languages, STOCK_COLLECTION_SLUGS, accordionBlock, applyCollectionOverride, applyGlobalOverride, blogContentBlocks, buildCmsConfig, codeBlock, codeBlockLanguages, codeTabsBlock, createAccessHelpers, createApiTokens, createAuthors, createBlogPosts, createCategories, createChangelog, createChangelogTags, createEventTags, createEvents, createLegalPages, createLogger, createMedia, createMetadataFactory, createPages, createS3MediaPlugin, createSiteSettings, createUsers, defaultCodeLanguage, downloadCtaBlock, draftsWithAutosave, getOgBackgroundDataUrl, getRichTextEditorConfig, getSiteUrl, imageBlock, languageOptions, leafBlocks, pageContentBlocks, readPayloadMediaAsDataUrl, readPayloadMediaBuffer, requireEnvAtRuntime, richTextBlock, richTextEditor, sectionHeadingBlock, seoFields, setPublishedAt, showcaseContentBlocks, slugify, stepsBlock, stripShikiPreBackground, toPlainValue, videoBlock };
|
package/dist/index5.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as videoBlock, B as buildCmsConfig, C as defaultCodeLanguage, D as accordionBlock, E as sectionHeadingBlock, F as setPublishedAt, G as GlobalOverride, H as STOCK_COLLECTION_SLUGS, I as slugify, J as AccessHelpers, K as applyCollectionOverride, L as seoFields, M as codeTabsBlock, N as codeBlock, O as stepsBlock, P as richTextBlock, R as draftsWithAutosave, S as codeBlockLanguages, T as leafBlocks, U as StockCollectionSlug, V as Overrides, W as CollectionOverride, X as createAccessHelpers, Y as AccessOptions, _ as getRichTextEditorConfig, a as createChangelogTags, b as pageContentBlocks, c as createBlogPosts, d as createMedia, f as createApiTokens, g as requireEnvAtRuntime, h as createS3MediaPlugin, i as createChangelog, j as imageBlock, k as downloadCtaBlock, l as createCategories, m as CreateS3MediaPluginOptions, n as createEvents, o as createLegalPages, p as createUsers, q as applyGlobalOverride, r as createEventTags, s as createPages, t as createSiteSettings, u as createAuthors, v as richTextEditor, w as languageOptions, x as showcaseContentBlocks, y as blogContentBlocks, z as BuildCmsConfigOptions } from "./index.mjs";
|
|
2
2
|
import { n as readPayloadMediaAsDataUrl, r as readPayloadMediaBuffer, t as PayloadMedia } from "./readMediaBuffer.mjs";
|
|
3
3
|
import { n as Languages, t as LanguageLabel } from "./index2.mjs";
|
|
4
4
|
import { a as createMetadataFactory, i as OgImage, n as CreateMetadataFactoryOptions, o as GetSiteUrlOptions, r as CreateMetadataInput, s as getSiteUrl, t as getOgBackgroundDataUrl } from "./index3.mjs";
|
|
5
5
|
import { i as stripShikiPreBackground, n as createLogger, r as toPlainValue, t as Logger } from "./index4.mjs";
|
|
6
|
-
export { type AccessHelpers, type AccessOptions, type BuildCmsConfigOptions, type CollectionOverride, type CreateMetadataFactoryOptions, type CreateMetadataInput, type CreateS3MediaPluginOptions, type GetSiteUrlOptions, type GlobalOverride, LanguageLabel, Languages, type Logger, type OgImage, type Overrides, type PayloadMedia, STOCK_COLLECTION_SLUGS, type StockCollectionSlug, accordionBlock, applyCollectionOverride, applyGlobalOverride, blogContentBlocks, buildCmsConfig, codeBlock, codeBlockLanguages, codeTabsBlock, createAccessHelpers, createApiTokens, createAuthors, createBlogPosts, createCategories, createChangelog, createChangelogTags, createLegalPages, createLogger, createMedia, createMetadataFactory, createPages, createS3MediaPlugin, createSiteSettings, createUsers, defaultCodeLanguage, downloadCtaBlock, draftsWithAutosave, getOgBackgroundDataUrl, getRichTextEditorConfig, getSiteUrl, imageBlock, languageOptions, leafBlocks, pageContentBlocks, readPayloadMediaAsDataUrl, readPayloadMediaBuffer, requireEnvAtRuntime, richTextBlock, richTextEditor, sectionHeadingBlock, seoFields, setPublishedAt, showcaseContentBlocks, slugify, stepsBlock, stripShikiPreBackground, toPlainValue, videoBlock };
|
|
6
|
+
export { type AccessHelpers, type AccessOptions, type BuildCmsConfigOptions, type CollectionOverride, type CreateMetadataFactoryOptions, type CreateMetadataInput, type CreateS3MediaPluginOptions, type GetSiteUrlOptions, type GlobalOverride, LanguageLabel, Languages, type Logger, type OgImage, type Overrides, type PayloadMedia, STOCK_COLLECTION_SLUGS, type StockCollectionSlug, accordionBlock, applyCollectionOverride, applyGlobalOverride, blogContentBlocks, buildCmsConfig, codeBlock, codeBlockLanguages, codeTabsBlock, createAccessHelpers, createApiTokens, createAuthors, createBlogPosts, createCategories, createChangelog, createChangelogTags, createEventTags, createEvents, createLegalPages, createLogger, createMedia, createMetadataFactory, createPages, createS3MediaPlugin, createSiteSettings, createUsers, defaultCodeLanguage, downloadCtaBlock, draftsWithAutosave, getOgBackgroundDataUrl, getRichTextEditorConfig, getSiteUrl, imageBlock, languageOptions, leafBlocks, pageContentBlocks, readPayloadMediaAsDataUrl, readPayloadMediaBuffer, requireEnvAtRuntime, richTextBlock, richTextEditor, sectionHeadingBlock, seoFields, setPublishedAt, showcaseContentBlocks, slugify, stepsBlock, stripShikiPreBackground, toPlainValue, videoBlock };
|
|
@@ -2,7 +2,7 @@ import { HTMLAttributes } from "react";
|
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
3
|
//#region src/ui/components/Badge/Badge.d.ts
|
|
4
4
|
declare const badgeVariants: (props?: ({
|
|
5
|
-
variant?: "
|
|
5
|
+
variant?: "active" | "inactive" | "status" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
type BadgeProps = HTMLAttributes<HTMLSpanElement> & VariantProps<typeof badgeVariants> & {
|
|
8
8
|
asChild?: boolean;
|
|
@@ -3,7 +3,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
3
3
|
//#region src/ui/components/Button/Button.d.ts
|
|
4
4
|
declare const buttonVariants: (props?: ({
|
|
5
5
|
variant?: "link" | "solid" | "outline" | "ghost" | "secondary" | "social" | "action" | "elevated-outline" | null | undefined;
|
|
6
|
-
size?: "
|
|
6
|
+
size?: "social" | "default" | "sm" | "cta" | "icon" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
type ButtonProps = ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
9
9
|
asChild?: boolean;
|
package/package.json
CHANGED