@orion-studios/payload-studio 0.5.0-beta.4 → 0.5.0-beta.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/admin/client.js +68 -7
  2. package/dist/admin/client.mjs +68 -7
  3. package/dist/admin/index.d.mts +1 -1
  4. package/dist/admin/index.d.ts +1 -1
  5. package/dist/admin/index.js +37 -0
  6. package/dist/admin/index.mjs +3 -1
  7. package/dist/admin-app/client.d.mts +4 -0
  8. package/dist/admin-app/client.d.ts +4 -0
  9. package/dist/admin-app/client.js +705 -2
  10. package/dist/admin-app/client.mjs +701 -1
  11. package/dist/admin-app/index.d.mts +1 -1
  12. package/dist/admin-app/index.d.ts +1 -1
  13. package/dist/admin-app/index.js +167 -0
  14. package/dist/admin-app/index.mjs +13 -1
  15. package/dist/admin-app/styles.css +127 -0
  16. package/dist/blocks/index.js +457 -5
  17. package/dist/blocks/index.mjs +2 -2
  18. package/dist/{chunk-J7W5EE3B.mjs → chunk-7IGLXLUB.mjs} +37 -0
  19. package/dist/{chunk-ZLLNO5FM.mjs → chunk-GNYOAC5N.mjs} +44 -13
  20. package/dist/{chunk-UJFU323N.mjs → chunk-LB72FZZ3.mjs} +33 -9
  21. package/dist/{chunk-ETRRXURT.mjs → chunk-SIL2J5MF.mjs} +14 -0
  22. package/dist/{chunk-PC5622T7.mjs → chunk-XQYJXB46.mjs} +444 -6
  23. package/dist/chunk-XVH5SCBD.mjs +234 -0
  24. package/dist/index-BBvk9b9i.d.mts +97 -0
  25. package/dist/index-BBvk9b9i.d.ts +97 -0
  26. package/dist/{index-DbH0Ljwp.d.mts → index-CpG3UHcS.d.mts} +1 -0
  27. package/dist/{index-DbH0Ljwp.d.ts → index-CpG3UHcS.d.ts} +1 -0
  28. package/dist/{index-DJFhANvJ.d.ts → index-Dj21uD_B.d.mts} +5 -2
  29. package/dist/{index-DJFhANvJ.d.mts → index-Dj21uD_B.d.ts} +5 -2
  30. package/dist/index.d.mts +3 -3
  31. package/dist/index.d.ts +3 -3
  32. package/dist/index.js +904 -204
  33. package/dist/index.mjs +12 -12
  34. package/dist/nextjs/index.d.mts +1 -1
  35. package/dist/nextjs/index.d.ts +1 -1
  36. package/dist/nextjs/index.js +290 -13
  37. package/dist/nextjs/index.mjs +4 -1
  38. package/dist/studio-pages/builder.css +25 -1
  39. package/dist/studio-pages/client.js +3593 -1279
  40. package/dist/studio-pages/client.mjs +3593 -1279
  41. package/dist/studio-pages/index.js +33 -8
  42. package/dist/studio-pages/index.mjs +2 -2
  43. package/package.json +24 -12
  44. package/dist/chunk-AAOHJDNS.mjs +0 -67
  45. package/dist/index-BallJs-K.d.mts +0 -43
  46. package/dist/index-BallJs-K.d.ts +0 -43
package/dist/index.js CHANGED
@@ -43,6 +43,7 @@ module.exports = __toCommonJS(index_exports);
43
43
  var admin_exports = {};
44
44
  __export(admin_exports, {
45
45
  configureAdmin: () => configureAdmin,
46
+ createHeaderNavItemsField: () => createHeaderNavItemsField,
46
47
  createThemePreferenceField: () => createThemePreferenceField,
47
48
  themePreferenceField: () => themePreferenceField,
48
49
  withTooltips: () => withTooltips
@@ -306,12 +307,53 @@ function addTooltipToField(field, tooltips) {
306
307
  return field;
307
308
  }
308
309
 
310
+ // src/admin/fields/headerNav.ts
311
+ var createHeaderNavItemsField = () => ({
312
+ name: "navItems",
313
+ type: "array",
314
+ labels: { singular: "Navigation Link", plural: "Navigation Links" },
315
+ admin: {
316
+ description: "The links displayed in your website's main navigation menu."
317
+ },
318
+ fields: [
319
+ {
320
+ name: "label",
321
+ type: "text",
322
+ required: true,
323
+ admin: {
324
+ description: "The text shown for this navigation link."
325
+ }
326
+ },
327
+ {
328
+ name: "href",
329
+ type: "text",
330
+ required: true,
331
+ admin: {
332
+ description: 'The URL this link points to (e.g., "/about" or "https://example.com").'
333
+ }
334
+ },
335
+ {
336
+ name: "parentHref",
337
+ type: "text",
338
+ admin: {
339
+ description: "Optional parent link URL. If set to another nav item href, this item appears in that dropdown."
340
+ }
341
+ }
342
+ ]
343
+ });
344
+
309
345
  // src/admin-app/index.ts
310
346
  var admin_app_exports = {};
311
347
  __export(admin_app_exports, {
312
348
  AdminBreadcrumbs: () => AdminBreadcrumbs,
313
349
  AdminPage: () => AdminPage,
350
+ buildAdminPageLinkOptions: () => buildAdminPageLinkOptions,
351
+ buildNestedNavTree: () => buildNestedNavTree,
352
+ getAdminNavRows: () => getAdminNavRows,
314
353
  navItemIsActive: () => navItemIsActive,
354
+ normalizeAdminNavInputs: () => normalizeAdminNavInputs,
355
+ normalizeNestedNavItems: () => normalizeNestedNavItems,
356
+ parseAdminHeaderNavFromForm: () => parseAdminHeaderNavFromForm,
315
357
  roleCanAccessNav: () => roleCanAccessNav
316
358
  });
317
359
 
@@ -345,6 +387,161 @@ function AdminPage({ title, description, breadcrumbs, actions, children }) {
345
387
  ] });
346
388
  }
347
389
 
390
+ // src/admin-app/nestedNavigation.ts
391
+ var normalizeNestedNavItems = (items) => {
392
+ const deduped = [];
393
+ const seen = /* @__PURE__ */ new Set();
394
+ for (const item of items) {
395
+ const href = typeof item.href === "string" ? item.href.trim() : "";
396
+ const label = typeof item.label === "string" ? item.label.trim() : "";
397
+ const parentHref = typeof item.parentHref === "string" ? item.parentHref.trim() : "";
398
+ if (!href || !label || seen.has(href)) {
399
+ continue;
400
+ }
401
+ seen.add(href);
402
+ deduped.push({
403
+ href,
404
+ label,
405
+ ...parentHref ? { parentHref } : {}
406
+ });
407
+ }
408
+ const hrefs = new Set(deduped.map((item) => item.href));
409
+ return deduped.map((item) => ({
410
+ href: item.href,
411
+ label: item.label,
412
+ ...item.parentHref && item.parentHref !== item.href && hrefs.has(item.parentHref) ? { parentHref: item.parentHref } : {}
413
+ }));
414
+ };
415
+ var buildNestedNavTree = (items) => {
416
+ const childrenByParent = /* @__PURE__ */ new Map();
417
+ const topLevel = [];
418
+ for (const item of items) {
419
+ if (!item.parentHref) {
420
+ topLevel.push(item);
421
+ continue;
422
+ }
423
+ const children = childrenByParent.get(item.parentHref) || [];
424
+ children.push(item);
425
+ childrenByParent.set(item.parentHref, children);
426
+ }
427
+ if (topLevel.length === 0 && items.length > 0) {
428
+ return {
429
+ topLevel: items.map((item) => ({ href: item.href, label: item.label })),
430
+ childrenByParent: /* @__PURE__ */ new Map()
431
+ };
432
+ }
433
+ return { childrenByParent, topLevel };
434
+ };
435
+
436
+ // src/admin-app/navigationLinks.ts
437
+ var fallbackHomeOption = {
438
+ href: "/",
439
+ label: "Home",
440
+ title: "Home"
441
+ };
442
+ var buildAdminPageLinkOptions = (pages) => {
443
+ const options = pages.map((page) => {
444
+ const href = typeof page.path === "string" ? page.path.trim() : "";
445
+ const title = typeof page.title === "string" && page.title.trim().length > 0 ? page.title.trim() : "Untitled Page";
446
+ if (!href) {
447
+ return null;
448
+ }
449
+ const depth = href === "/" ? 0 : href.split("/").filter(Boolean).length;
450
+ const indentLevel = Math.max(depth - 1, 0);
451
+ const indent = indentLevel > 0 ? `${"\u21B3 ".repeat(indentLevel)}` : "";
452
+ return {
453
+ href,
454
+ label: `${indent}${title}`,
455
+ title
456
+ };
457
+ }).filter((option) => option !== null).sort((a, b) => {
458
+ if (a.href === "/" && b.href !== "/") return -1;
459
+ if (b.href === "/" && a.href !== "/") return 1;
460
+ return a.href.localeCompare(b.href);
461
+ });
462
+ if (options.length === 0) {
463
+ return [fallbackHomeOption];
464
+ }
465
+ return options;
466
+ };
467
+ var getAdminNavRows = (navItems, pageOptions, minRows = 6, maxRows = 20) => {
468
+ const preferredRows = Math.max(navItems.length + 2, Math.min(8, pageOptions.length));
469
+ return Math.min(Math.max(minRows, preferredRows), maxRows);
470
+ };
471
+ var normalizeAdminNavInputs = (rows, pageOptions) => {
472
+ const allowedLinks = new Map(pageOptions.map((option) => [option.href, option.title]));
473
+ const deduped = [];
474
+ const seen = /* @__PURE__ */ new Set();
475
+ for (const row of rows) {
476
+ const href = typeof row.href === "string" ? row.href.trim() : "";
477
+ const defaultLabel = allowedLinks.get(href);
478
+ const explicitLabel = typeof row.label === "string" ? row.label.trim() : "";
479
+ const parentHref = typeof row.parentHref === "string" ? row.parentHref.trim() : "";
480
+ if (!href || !defaultLabel || seen.has(href)) {
481
+ continue;
482
+ }
483
+ seen.add(href);
484
+ deduped.push({
485
+ href,
486
+ label: explicitLabel.length > 0 ? explicitLabel : defaultLabel,
487
+ ...parentHref.length > 0 ? { parentHref } : {}
488
+ });
489
+ }
490
+ const hrefs = new Set(deduped.map((item) => item.href));
491
+ const parentByHref = new Map(deduped.map((item) => [item.href, item.parentHref || ""]));
492
+ const createsCycle = (href, parentHref) => {
493
+ const visited = /* @__PURE__ */ new Set([href]);
494
+ let current = parentHref;
495
+ while (current) {
496
+ if (visited.has(current)) {
497
+ return true;
498
+ }
499
+ visited.add(current);
500
+ current = parentByHref.get(current) || "";
501
+ }
502
+ return false;
503
+ };
504
+ return deduped.map((item) => {
505
+ const parentHref = item.parentHref;
506
+ if (!parentHref || parentHref === item.href || !hrefs.has(parentHref) || createsCycle(item.href, parentHref)) {
507
+ return {
508
+ href: item.href,
509
+ label: item.label
510
+ };
511
+ }
512
+ return item;
513
+ });
514
+ };
515
+ var parseAdminHeaderNavFromForm = (formData, pageOptions, maxRows = 24) => {
516
+ const serialized = String(formData.get("navItemsState") || "").trim();
517
+ if (serialized.length > 0) {
518
+ try {
519
+ const parsed = JSON.parse(serialized);
520
+ if (Array.isArray(parsed)) {
521
+ return normalizeAdminNavInputs(parsed.slice(0, maxRows), pageOptions);
522
+ }
523
+ } catch {
524
+ }
525
+ }
526
+ const rawCount = Number(String(formData.get("navCount") || "0"));
527
+ const navCount = Number.isFinite(rawCount) ? Math.max(0, Math.min(rawCount, maxRows)) : 0;
528
+ const navRows = [];
529
+ for (let index = 0; index < navCount; index += 1) {
530
+ const href = String(formData.get(`navPage_${index}`) || "").trim();
531
+ const label = String(formData.get(`navLabel_${index}`) || "").trim();
532
+ const parentHref = String(formData.get(`navParentHref_${index}`) || "").trim();
533
+ navRows.push({
534
+ href,
535
+ label,
536
+ parentHref
537
+ });
538
+ }
539
+ if (navRows.length > 0) {
540
+ return normalizeAdminNavInputs(navRows, pageOptions);
541
+ }
542
+ return [];
543
+ };
544
+
348
545
  // src/admin-app/routeRegistry.ts
349
546
  var roleCanAccessNav = (role, item) => {
350
547
  if (!item.roles || item.roles.length === 0) {
@@ -400,6 +597,7 @@ var sectionStyleDefaults = {
400
597
  contentGradientPreset: "none",
401
598
  contentGradientTo: "#f4f6f2",
402
599
  contentWidth: "inherit",
600
+ sectionPaddingX: "inherit",
403
601
  sectionBackgroundColor: "#ffffff",
404
602
  sectionBackgroundMode: "none",
405
603
  sectionGradientAngle: "135",
@@ -437,6 +635,19 @@ var sectionStyleFields = () => [
437
635
  type: "select",
438
636
  defaultValue: sectionStyleDefaults.sectionPaddingY,
439
637
  options: [
638
+ { label: "None", value: "none" },
639
+ { label: "Small", value: "sm" },
640
+ { label: "Medium", value: "md" },
641
+ { label: "Large", value: "lg" }
642
+ ]
643
+ },
644
+ {
645
+ name: "sectionPaddingX",
646
+ type: "select",
647
+ defaultValue: sectionStyleDefaults.sectionPaddingX,
648
+ options: [
649
+ { label: "Inherit", value: "inherit" },
650
+ { label: "None", value: "none" },
440
651
  { label: "Small", value: "sm" },
441
652
  { label: "Medium", value: "md" },
442
653
  { label: "Large", value: "lg" }
@@ -575,6 +786,67 @@ var BeforeAfterBlock = {
575
786
  relationTo: "media",
576
787
  required: false
577
788
  },
789
+ {
790
+ name: "imageHeight",
791
+ type: "number",
792
+ defaultValue: 160,
793
+ min: 60,
794
+ max: 600,
795
+ admin: {
796
+ description: "Overrides the before/after image height (in pixels).",
797
+ step: 10
798
+ }
799
+ },
800
+ {
801
+ name: "imageFit",
802
+ type: "select",
803
+ defaultValue: "cover",
804
+ options: [
805
+ { label: "Cover", value: "cover" },
806
+ { label: "Contain", value: "contain" }
807
+ ]
808
+ },
809
+ {
810
+ name: "imageCornerStyle",
811
+ type: "select",
812
+ defaultValue: "rounded",
813
+ options: [
814
+ { label: "Rounded", value: "rounded" },
815
+ { label: "Square", value: "square" }
816
+ ]
817
+ },
818
+ {
819
+ name: "imagePosition",
820
+ type: "select",
821
+ defaultValue: "center",
822
+ options: [
823
+ { label: "Center", value: "center" },
824
+ { label: "Top", value: "top" },
825
+ { label: "Bottom", value: "bottom" },
826
+ { label: "Left", value: "left" },
827
+ { label: "Right", value: "right" }
828
+ ]
829
+ },
830
+ {
831
+ name: "imagePositionX",
832
+ type: "number",
833
+ min: 0,
834
+ max: 100,
835
+ admin: {
836
+ description: "Optional custom horizontal focus (0-100). Overrides Image Position when set.",
837
+ step: 1
838
+ }
839
+ },
840
+ {
841
+ name: "imagePositionY",
842
+ type: "number",
843
+ min: 0,
844
+ max: 100,
845
+ admin: {
846
+ description: "Optional custom vertical focus (0-100). Overrides Image Position when set.",
847
+ step: 1
848
+ }
849
+ },
578
850
  {
579
851
  name: "description",
580
852
  type: "textarea"
@@ -760,11 +1032,43 @@ var FeatureGridBlock = {
760
1032
  name: "description",
761
1033
  type: "textarea"
762
1034
  },
1035
+ {
1036
+ name: "iconType",
1037
+ type: "select",
1038
+ defaultValue: "badge",
1039
+ options: [
1040
+ { label: "Badge Text", value: "badge" },
1041
+ { label: "Icon", value: "lucide" }
1042
+ ],
1043
+ admin: {
1044
+ description: "Choose whether this item uses a short badge label or an icon."
1045
+ }
1046
+ },
763
1047
  {
764
1048
  name: "icon",
765
1049
  type: "text",
766
1050
  admin: {
767
- description: 'Optional short icon label (e.g. "01", "Leaf", "Star").'
1051
+ description: 'Optional short icon label (e.g. "01", "Leaf", "Star").',
1052
+ condition: (_, siblingData) => siblingData?.iconType !== "lucide"
1053
+ }
1054
+ },
1055
+ {
1056
+ name: "iconLucide",
1057
+ type: "select",
1058
+ options: [
1059
+ { label: "Shield Check", value: "ShieldCheck" },
1060
+ { label: "Clock", value: "Clock" },
1061
+ { label: "Leaf", value: "Leaf" },
1062
+ { label: "Dollar Sign", value: "DollarSign" },
1063
+ { label: "Hard Hat", value: "HardHat" },
1064
+ { label: "Sparkles", value: "Sparkles" },
1065
+ { label: "Tree Pine", value: "TreePine" },
1066
+ { label: "Badge Check", value: "BadgeCheck" },
1067
+ { label: "Calendar Clock", value: "CalendarClock" }
1068
+ ],
1069
+ admin: {
1070
+ description: "Select an icon for this item.",
1071
+ condition: (_, siblingData) => siblingData?.iconType === "lucide"
768
1072
  }
769
1073
  },
770
1074
  {
@@ -772,6 +1076,67 @@ var FeatureGridBlock = {
772
1076
  type: "upload",
773
1077
  relationTo: "media",
774
1078
  required: false
1079
+ },
1080
+ {
1081
+ name: "imageHeight",
1082
+ type: "number",
1083
+ defaultValue: 160,
1084
+ min: 40,
1085
+ max: 600,
1086
+ admin: {
1087
+ description: "Overrides the image height in the builder/section (in pixels).",
1088
+ step: 10
1089
+ }
1090
+ },
1091
+ {
1092
+ name: "imageFit",
1093
+ type: "select",
1094
+ defaultValue: "cover",
1095
+ options: [
1096
+ { label: "Cover", value: "cover" },
1097
+ { label: "Contain", value: "contain" }
1098
+ ]
1099
+ },
1100
+ {
1101
+ name: "imageCornerStyle",
1102
+ type: "select",
1103
+ defaultValue: "rounded",
1104
+ options: [
1105
+ { label: "Rounded", value: "rounded" },
1106
+ { label: "Square", value: "square" }
1107
+ ]
1108
+ },
1109
+ {
1110
+ name: "imagePosition",
1111
+ type: "select",
1112
+ defaultValue: "center",
1113
+ options: [
1114
+ { label: "Center", value: "center" },
1115
+ { label: "Top", value: "top" },
1116
+ { label: "Bottom", value: "bottom" },
1117
+ { label: "Left", value: "left" },
1118
+ { label: "Right", value: "right" }
1119
+ ]
1120
+ },
1121
+ {
1122
+ name: "imagePositionX",
1123
+ type: "number",
1124
+ min: 0,
1125
+ max: 100,
1126
+ admin: {
1127
+ description: "Optional custom horizontal focus (0-100). Overrides Image Position when set.",
1128
+ step: 1
1129
+ }
1130
+ },
1131
+ {
1132
+ name: "imagePositionY",
1133
+ type: "number",
1134
+ min: 0,
1135
+ max: 100,
1136
+ admin: {
1137
+ description: "Optional custom vertical focus (0-100). Overrides Image Position when set.",
1138
+ step: 1
1139
+ }
775
1140
  }
776
1141
  ]
777
1142
  },
@@ -898,10 +1263,44 @@ var HeroBlock = {
898
1263
  relationTo: "media"
899
1264
  },
900
1265
  {
901
- name: "backgroundImageURL",
902
- type: "text",
1266
+ name: "backgroundImageFit",
1267
+ type: "select",
1268
+ defaultValue: "cover",
1269
+ options: [
1270
+ { label: "Cover", value: "cover" },
1271
+ { label: "Cover (Square)", value: "cover-square" },
1272
+ { label: "Contain", value: "contain" },
1273
+ { label: "Contain (Square)", value: "contain-square" }
1274
+ ],
1275
+ admin: {
1276
+ description: "How the hero image should be sized within the section."
1277
+ }
1278
+ },
1279
+ {
1280
+ name: "backgroundImageCornerStyle",
1281
+ type: "select",
1282
+ defaultValue: "rounded",
1283
+ options: [
1284
+ { label: "Rounded", value: "rounded" },
1285
+ { label: "Square", value: "square" }
1286
+ ],
1287
+ admin: {
1288
+ description: "How the hero image corners should appear."
1289
+ }
1290
+ },
1291
+ {
1292
+ name: "backgroundImagePosition",
1293
+ type: "select",
1294
+ defaultValue: "center",
1295
+ options: [
1296
+ { label: "Center", value: "center" },
1297
+ { label: "Top", value: "top" },
1298
+ { label: "Bottom", value: "bottom" },
1299
+ { label: "Left", value: "left" },
1300
+ { label: "Right", value: "right" }
1301
+ ],
903
1302
  admin: {
904
- description: "Optional external/background image URL override for this hero section."
1303
+ description: "Where the hero image should anchor inside the section."
905
1304
  }
906
1305
  },
907
1306
  {
@@ -911,6 +1310,113 @@ var HeroBlock = {
911
1310
  description: "Optional background color override (example: #124a37)."
912
1311
  }
913
1312
  },
1313
+ {
1314
+ name: "backgroundOverlayMode",
1315
+ type: "select",
1316
+ defaultValue: "none",
1317
+ options: [
1318
+ { label: "None", value: "none" },
1319
+ { label: "Solid", value: "solid" },
1320
+ { label: "Gradient", value: "gradient" }
1321
+ ],
1322
+ admin: {
1323
+ description: "Optional overlay on top of the hero image (applies when an image is present)."
1324
+ }
1325
+ },
1326
+ {
1327
+ name: "backgroundOverlayOpacity",
1328
+ type: "number",
1329
+ defaultValue: 45,
1330
+ min: 0,
1331
+ max: 100,
1332
+ admin: {
1333
+ description: "Overlay opacity (0-100).",
1334
+ step: 1
1335
+ }
1336
+ },
1337
+ {
1338
+ name: "backgroundOverlayColor",
1339
+ type: "text",
1340
+ admin: {
1341
+ description: "Overlay solid color (example: #000000). Used when Overlay Mode is Solid."
1342
+ }
1343
+ },
1344
+ {
1345
+ name: "backgroundOverlayGradientFrom",
1346
+ type: "text",
1347
+ admin: {
1348
+ description: "Gradient overlay start color (example: #0d4a37). Used when Overlay Mode is Gradient."
1349
+ }
1350
+ },
1351
+ {
1352
+ name: "backgroundOverlayGradientTo",
1353
+ type: "text",
1354
+ admin: {
1355
+ description: "Gradient overlay end color (example: #1f684f). Used when Overlay Mode is Gradient."
1356
+ }
1357
+ },
1358
+ {
1359
+ name: "backgroundOverlayGradientAngle",
1360
+ type: "text",
1361
+ admin: {
1362
+ description: "Gradient overlay angle in degrees (0-360). Used when Overlay Mode is Gradient."
1363
+ }
1364
+ },
1365
+ {
1366
+ name: "backgroundOverlayGradientFromStrength",
1367
+ type: "number",
1368
+ defaultValue: 100,
1369
+ min: 0,
1370
+ max: 100,
1371
+ admin: {
1372
+ description: "Gradient start strength (0-100). Set to 0 for transparent.",
1373
+ step: 1
1374
+ }
1375
+ },
1376
+ {
1377
+ name: "backgroundOverlayGradientToStrength",
1378
+ type: "number",
1379
+ defaultValue: 100,
1380
+ min: 0,
1381
+ max: 100,
1382
+ admin: {
1383
+ description: "Gradient end strength (0-100). Set to 0 for transparent.",
1384
+ step: 1
1385
+ }
1386
+ },
1387
+ {
1388
+ name: "backgroundOverlayGradientStart",
1389
+ type: "number",
1390
+ defaultValue: 0,
1391
+ min: 0,
1392
+ max: 100,
1393
+ admin: {
1394
+ description: "Where the gradient starts (0-100).",
1395
+ step: 1
1396
+ }
1397
+ },
1398
+ {
1399
+ name: "backgroundOverlayGradientEnd",
1400
+ type: "number",
1401
+ defaultValue: 100,
1402
+ min: 0,
1403
+ max: 100,
1404
+ admin: {
1405
+ description: "Where the gradient ends (0-100).",
1406
+ step: 1
1407
+ }
1408
+ },
1409
+ {
1410
+ name: "backgroundOverlayGradientFeather",
1411
+ type: "number",
1412
+ defaultValue: 100,
1413
+ min: 0,
1414
+ max: 100,
1415
+ admin: {
1416
+ description: "How soft the transition is (0 = hard edge, 100 = smooth).",
1417
+ step: 1
1418
+ }
1419
+ },
914
1420
  {
915
1421
  name: "variant",
916
1422
  type: "select",
@@ -926,6 +1432,28 @@ var HeroBlock = {
926
1432
  }
927
1433
  ]
928
1434
  },
1435
+ {
1436
+ name: "heroHeight",
1437
+ type: "select",
1438
+ defaultValue: "sm",
1439
+ options: [
1440
+ {
1441
+ label: "Small",
1442
+ value: "sm"
1443
+ },
1444
+ {
1445
+ label: "Medium (Half Screen)",
1446
+ value: "md"
1447
+ },
1448
+ {
1449
+ label: "Full Screen",
1450
+ value: "full"
1451
+ }
1452
+ ],
1453
+ admin: {
1454
+ description: "Controls the vertical height of the hero section."
1455
+ }
1456
+ },
929
1457
  ...sectionStyleFields()
930
1458
  ]
931
1459
  };
@@ -971,6 +1499,67 @@ var LogoWallBlock = {
971
1499
  relationTo: "media",
972
1500
  required: false
973
1501
  },
1502
+ {
1503
+ name: "imageHeight",
1504
+ type: "number",
1505
+ defaultValue: 64,
1506
+ min: 24,
1507
+ max: 200,
1508
+ admin: {
1509
+ description: "Overrides the logo image height (in pixels).",
1510
+ step: 4
1511
+ }
1512
+ },
1513
+ {
1514
+ name: "imageFit",
1515
+ type: "select",
1516
+ defaultValue: "contain",
1517
+ options: [
1518
+ { label: "Cover", value: "cover" },
1519
+ { label: "Contain", value: "contain" }
1520
+ ]
1521
+ },
1522
+ {
1523
+ name: "imageCornerStyle",
1524
+ type: "select",
1525
+ defaultValue: "rounded",
1526
+ options: [
1527
+ { label: "Rounded", value: "rounded" },
1528
+ { label: "Square", value: "square" }
1529
+ ]
1530
+ },
1531
+ {
1532
+ name: "imagePosition",
1533
+ type: "select",
1534
+ defaultValue: "center",
1535
+ options: [
1536
+ { label: "Center", value: "center" },
1537
+ { label: "Top", value: "top" },
1538
+ { label: "Bottom", value: "bottom" },
1539
+ { label: "Left", value: "left" },
1540
+ { label: "Right", value: "right" }
1541
+ ]
1542
+ },
1543
+ {
1544
+ name: "imagePositionX",
1545
+ type: "number",
1546
+ min: 0,
1547
+ max: 100,
1548
+ admin: {
1549
+ description: "Optional custom horizontal focus (0-100). Overrides Image Position when set.",
1550
+ step: 1
1551
+ }
1552
+ },
1553
+ {
1554
+ name: "imagePositionY",
1555
+ type: "number",
1556
+ min: 0,
1557
+ max: 100,
1558
+ admin: {
1559
+ description: "Optional custom vertical focus (0-100). Overrides Image Position when set.",
1560
+ step: 1
1561
+ }
1562
+ },
974
1563
  {
975
1564
  name: "href",
976
1565
  type: "text"
@@ -1021,6 +1610,36 @@ var MediaBlock = {
1021
1610
  }
1022
1611
  ]
1023
1612
  },
1613
+ {
1614
+ name: "imageFit",
1615
+ type: "select",
1616
+ defaultValue: "cover",
1617
+ options: [
1618
+ { label: "Cover", value: "cover" },
1619
+ { label: "Contain", value: "contain" }
1620
+ ]
1621
+ },
1622
+ {
1623
+ name: "imageCornerStyle",
1624
+ type: "select",
1625
+ defaultValue: "rounded",
1626
+ options: [
1627
+ { label: "Rounded", value: "rounded" },
1628
+ { label: "Square", value: "square" }
1629
+ ]
1630
+ },
1631
+ {
1632
+ name: "imagePosition",
1633
+ type: "select",
1634
+ defaultValue: "center",
1635
+ options: [
1636
+ { label: "Center", value: "center" },
1637
+ { label: "Top", value: "top" },
1638
+ { label: "Bottom", value: "bottom" },
1639
+ { label: "Left", value: "left" },
1640
+ { label: "Right", value: "right" }
1641
+ ]
1642
+ },
1024
1643
  ...sectionStyleFields()
1025
1644
  ]
1026
1645
  };
@@ -1138,11 +1757,41 @@ var TestimonialsBlock = {
1138
1757
  type: "text",
1139
1758
  required: true
1140
1759
  },
1760
+ {
1761
+ name: "visibleCount",
1762
+ type: "number",
1763
+ defaultValue: 3,
1764
+ min: 1,
1765
+ max: 6,
1766
+ admin: {
1767
+ description: "How many testimonials to show at once.",
1768
+ step: 1
1769
+ }
1770
+ },
1771
+ {
1772
+ name: "autoRotate",
1773
+ type: "checkbox",
1774
+ defaultValue: true,
1775
+ admin: {
1776
+ description: "Automatically rotates through all testimonials."
1777
+ }
1778
+ },
1779
+ {
1780
+ name: "rotateIntervalSeconds",
1781
+ type: "number",
1782
+ defaultValue: 7,
1783
+ min: 2,
1784
+ max: 30,
1785
+ admin: {
1786
+ description: "How often to rotate (in seconds).",
1787
+ step: 1
1788
+ }
1789
+ },
1141
1790
  {
1142
1791
  name: "items",
1143
1792
  type: "array",
1144
1793
  minRows: 1,
1145
- maxRows: 6,
1794
+ maxRows: 30,
1146
1795
  fields: [
1147
1796
  {
1148
1797
  name: "quote",
@@ -1510,197 +2159,6 @@ function createPayloadClient(config) {
1510
2159
 
1511
2160
  // src/nextjs/queries/pages.ts
1512
2161
  var import_cache = require("next/cache");
1513
- function normalizePath(segments) {
1514
- if (!segments || segments.length === 0) {
1515
- return "/";
1516
- }
1517
- const cleaned = segments.map((segment) => segment.trim()).filter(Boolean).join("/");
1518
- return cleaned.length > 0 ? `/${cleaned}` : "/";
1519
- }
1520
- async function queryPageByPath(payload, path2, draft) {
1521
- const result = await payload.find({
1522
- collection: "pages",
1523
- depth: 2,
1524
- draft,
1525
- limit: 1,
1526
- overrideAccess: false,
1527
- where: {
1528
- path: {
1529
- equals: path2
1530
- }
1531
- }
1532
- });
1533
- if (result.docs.length > 0) {
1534
- return result.docs[0] || null;
1535
- }
1536
- if (path2 === "/") {
1537
- const homeResult = await payload.find({
1538
- collection: "pages",
1539
- depth: 2,
1540
- draft,
1541
- limit: 1,
1542
- overrideAccess: false,
1543
- where: {
1544
- slug: {
1545
- equals: "home"
1546
- }
1547
- }
1548
- });
1549
- return homeResult.docs[0] || null;
1550
- }
1551
- return null;
1552
- }
1553
- function createPageQueries(getPayloadClient, contentTag = "website-content") {
1554
- const getPublishedPageByPathCached = (0, import_cache.unstable_cache)(
1555
- async (path2) => {
1556
- const payload = await getPayloadClient();
1557
- return queryPageByPath(payload, path2, false);
1558
- },
1559
- ["page-by-path"],
1560
- { tags: [contentTag] }
1561
- );
1562
- async function getPageBySegments(segments, draft = false) {
1563
- const path2 = normalizePath(segments);
1564
- const payload = await getPayloadClient();
1565
- if (draft) {
1566
- return queryPageByPath(payload, path2, true);
1567
- }
1568
- return getPublishedPageByPathCached(path2);
1569
- }
1570
- async function listPublishedPagePaths() {
1571
- const payload = await getPayloadClient();
1572
- const pages = await payload.find({
1573
- collection: "pages",
1574
- depth: 0,
1575
- draft: false,
1576
- limit: 1e3,
1577
- pagination: false,
1578
- overrideAccess: false,
1579
- where: {
1580
- _status: {
1581
- equals: "published"
1582
- }
1583
- }
1584
- });
1585
- return pages.docs.map((doc) => doc.path).filter((path2) => typeof path2 === "string" && path2.length > 0);
1586
- }
1587
- function pathToSegments(path2) {
1588
- if (!path2 || path2 === "/") {
1589
- return [];
1590
- }
1591
- return path2.split("/").filter(Boolean);
1592
- }
1593
- return {
1594
- getPageBySegments,
1595
- listPublishedPagePaths,
1596
- pathToSegments
1597
- };
1598
- }
1599
-
1600
- // src/nextjs/queries/site.ts
1601
- var import_cache2 = require("next/cache");
1602
- function createSiteQueries(getPayloadClient, contentTag = "website-content") {
1603
- const getSiteSettingsCached = (0, import_cache2.unstable_cache)(
1604
- async () => {
1605
- const payload = await getPayloadClient();
1606
- const settings = await payload.findGlobal({
1607
- slug: "site-settings",
1608
- depth: 1
1609
- });
1610
- return settings;
1611
- },
1612
- ["site-settings-global"],
1613
- { tags: [contentTag] }
1614
- );
1615
- const getHeaderCached = (0, import_cache2.unstable_cache)(
1616
- async () => {
1617
- const payload = await getPayloadClient();
1618
- const header = await payload.findGlobal({
1619
- slug: "header",
1620
- depth: 1
1621
- });
1622
- return header;
1623
- },
1624
- ["header-global"],
1625
- { tags: [contentTag] }
1626
- );
1627
- const getFooterCached = (0, import_cache2.unstable_cache)(
1628
- async () => {
1629
- const payload = await getPayloadClient();
1630
- const footer = await payload.findGlobal({
1631
- slug: "footer",
1632
- depth: 1
1633
- });
1634
- return footer;
1635
- },
1636
- ["footer-global"],
1637
- { tags: [contentTag] }
1638
- );
1639
- async function getSiteSettings(draft = false) {
1640
- if (draft) {
1641
- const payload = await getPayloadClient();
1642
- const settings = await payload.findGlobal({
1643
- slug: "site-settings",
1644
- depth: 1,
1645
- draft: true
1646
- });
1647
- return settings;
1648
- }
1649
- return getSiteSettingsCached();
1650
- }
1651
- async function getHeader(draft = false) {
1652
- if (draft) {
1653
- const payload = await getPayloadClient();
1654
- const header = await payload.findGlobal({
1655
- slug: "header",
1656
- depth: 1,
1657
- draft: true
1658
- });
1659
- return header;
1660
- }
1661
- return getHeaderCached();
1662
- }
1663
- async function getFooter(draft = false) {
1664
- if (draft) {
1665
- const payload = await getPayloadClient();
1666
- const footer = await payload.findGlobal({
1667
- slug: "footer",
1668
- depth: 1,
1669
- draft: true
1670
- });
1671
- return footer;
1672
- }
1673
- return getFooterCached();
1674
- }
1675
- return {
1676
- getSiteSettings,
1677
- getHeader,
1678
- getFooter
1679
- };
1680
- }
1681
-
1682
- // src/nextjs/utilities/media.ts
1683
- function resolveMedia(media) {
1684
- if (!media) {
1685
- return null;
1686
- }
1687
- if (typeof media === "number" || typeof media === "string") {
1688
- return null;
1689
- }
1690
- if (media.url) {
1691
- return {
1692
- url: media.url,
1693
- alt: media.alt || ""
1694
- };
1695
- }
1696
- if (media.filename) {
1697
- return {
1698
- url: `/media/${media.filename}`,
1699
- alt: media.alt || ""
1700
- };
1701
- }
1702
- return null;
1703
- }
1704
2162
 
1705
2163
  // src/studio/index.ts
1706
2164
  var studio_exports = {};
@@ -1872,6 +2330,9 @@ var defaultNodeData = {
1872
2330
  items: [
1873
2331
  {
1874
2332
  description: "Before and after result summary.",
2333
+ imageCornerStyle: "rounded",
2334
+ imageFit: "cover",
2335
+ imagePosition: "center",
1875
2336
  label: "Project One"
1876
2337
  }
1877
2338
  ],
@@ -1895,9 +2356,9 @@ var defaultNodeData = {
1895
2356
  featureGrid: {
1896
2357
  ...withSectionStyleDefaults({}),
1897
2358
  items: [
1898
- { description: "Explain this point.", icon: "01", title: "Feature One" },
1899
- { description: "Explain this point.", icon: "02", title: "Feature Two" },
1900
- { description: "Explain this point.", icon: "03", title: "Feature Three" }
2359
+ { description: "Explain this point.", iconType: "badge", icon: "01", imageCornerStyle: "rounded", imageFit: "cover", imagePosition: "center", title: "Feature One" },
2360
+ { description: "Explain this point.", iconType: "badge", icon: "02", imageCornerStyle: "rounded", imageFit: "cover", imagePosition: "center", title: "Feature Two" },
2361
+ { description: "Explain this point.", iconType: "badge", icon: "03", imageCornerStyle: "rounded", imageFit: "cover", imagePosition: "center", title: "Feature Three" }
1901
2362
  ],
1902
2363
  title: "Section Title",
1903
2364
  variant: "cards"
@@ -1910,7 +2371,22 @@ var defaultNodeData = {
1910
2371
  },
1911
2372
  hero: {
1912
2373
  ...withSectionStyleDefaults({}),
1913
- backgroundColor: "#124a37",
2374
+ backgroundColor: "",
2375
+ backgroundOverlayMode: "none",
2376
+ backgroundOverlayOpacity: 45,
2377
+ backgroundOverlayColor: "#000000",
2378
+ backgroundOverlayGradientFrom: "#0d4a37",
2379
+ backgroundOverlayGradientTo: "#1f684f",
2380
+ backgroundOverlayGradientAngle: "135",
2381
+ backgroundOverlayGradientFromStrength: 100,
2382
+ backgroundOverlayGradientToStrength: 100,
2383
+ backgroundOverlayGradientStart: 0,
2384
+ backgroundOverlayGradientEnd: 100,
2385
+ backgroundOverlayGradientFeather: 100,
2386
+ backgroundImageCornerStyle: "rounded",
2387
+ backgroundImageFit: "cover",
2388
+ backgroundImagePosition: "center",
2389
+ heroHeight: "sm",
1914
2390
  headline: "New Hero Section",
1915
2391
  kicker: "Optional kicker",
1916
2392
  primaryHref: "/contact",
@@ -1923,13 +2399,16 @@ var defaultNodeData = {
1923
2399
  media: {
1924
2400
  ...withSectionStyleDefaults({}),
1925
2401
  caption: "Add a caption",
2402
+ imageCornerStyle: "rounded",
2403
+ imageFit: "cover",
2404
+ imagePosition: "center",
1926
2405
  size: "default"
1927
2406
  },
1928
2407
  logoWall: withSectionStyleDefaults({
1929
2408
  items: [
1930
- { name: "Trusted Partner 1" },
1931
- { name: "Trusted Partner 2" },
1932
- { name: "Trusted Partner 3" }
2409
+ { imageCornerStyle: "rounded", imageFit: "contain", imagePosition: "center", name: "Trusted Partner 1" },
2410
+ { imageCornerStyle: "rounded", imageFit: "contain", imagePosition: "center", name: "Trusted Partner 2" },
2411
+ { imageCornerStyle: "rounded", imageFit: "contain", imagePosition: "center", name: "Trusted Partner 3" }
1933
2412
  ],
1934
2413
  subtitle: "Trusted by teams and homeowners across Central Texas.",
1935
2414
  title: "Trusted by Local Organizations"
@@ -1970,8 +2449,11 @@ var defaultNodeData = {
1970
2449
  },
1971
2450
  testimonials: {
1972
2451
  ...withSectionStyleDefaults({}),
2452
+ autoRotate: true,
1973
2453
  items: [{ location: "City, ST", name: "Customer Name", quote: "Customer feedback goes here." }],
1974
- title: "What Customers Say"
2454
+ rotateIntervalSeconds: 7,
2455
+ title: "What Customers Say",
2456
+ visibleCount: 3
1975
2457
  },
1976
2458
  stats: withSectionStyleDefaults({
1977
2459
  items: [
@@ -2128,6 +2610,224 @@ var createDefaultStudioDocument = (title) => ({
2128
2610
  nodes: [],
2129
2611
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
2130
2612
  });
2613
+
2614
+ // src/nextjs/queries/pages.ts
2615
+ var PAGE_QUERY_CACHE_VERSION = "v2-studio-layout-published-only";
2616
+ function withStudioDocumentLayout(page) {
2617
+ if (!page) {
2618
+ return null;
2619
+ }
2620
+ try {
2621
+ const studioDocument = assertStudioDocumentV1(page.studioDocument);
2622
+ const compiledLayout = studioDocumentToLayout(studioDocument);
2623
+ if (Array.isArray(compiledLayout) && compiledLayout.length > 0) {
2624
+ return {
2625
+ ...page,
2626
+ layout: compiledLayout
2627
+ };
2628
+ }
2629
+ } catch {
2630
+ }
2631
+ return page;
2632
+ }
2633
+ function normalizePath(segments) {
2634
+ if (!segments || segments.length === 0) {
2635
+ return "/";
2636
+ }
2637
+ const cleaned = segments.map((segment) => segment.trim()).filter(Boolean).join("/");
2638
+ return cleaned.length > 0 ? `/${cleaned}` : "/";
2639
+ }
2640
+ async function queryPageByPath(payload, path2, draft) {
2641
+ const pathWhere = {
2642
+ path: {
2643
+ equals: path2
2644
+ }
2645
+ };
2646
+ const publishedWhere = {
2647
+ _status: {
2648
+ equals: "published"
2649
+ }
2650
+ };
2651
+ const result = await payload.find({
2652
+ collection: "pages",
2653
+ depth: 2,
2654
+ draft,
2655
+ limit: 1,
2656
+ overrideAccess: false,
2657
+ where: draft ? pathWhere : { and: [pathWhere, publishedWhere] }
2658
+ });
2659
+ if (result.docs.length > 0) {
2660
+ return withStudioDocumentLayout(result.docs[0] || null);
2661
+ }
2662
+ if (path2 === "/") {
2663
+ const homeWhere = {
2664
+ slug: {
2665
+ equals: "home"
2666
+ }
2667
+ };
2668
+ const homeResult = await payload.find({
2669
+ collection: "pages",
2670
+ depth: 2,
2671
+ draft,
2672
+ limit: 1,
2673
+ overrideAccess: false,
2674
+ where: draft ? homeWhere : { and: [homeWhere, publishedWhere] }
2675
+ });
2676
+ return withStudioDocumentLayout(homeResult.docs[0] || null);
2677
+ }
2678
+ return null;
2679
+ }
2680
+ function createPageQueries(getPayloadClient, contentTag = "website-content") {
2681
+ const getPublishedPageByPathCached = (0, import_cache.unstable_cache)(
2682
+ async (path2) => {
2683
+ const payload = await getPayloadClient();
2684
+ return queryPageByPath(payload, path2, false);
2685
+ },
2686
+ ["page-by-path", PAGE_QUERY_CACHE_VERSION],
2687
+ { tags: [contentTag] }
2688
+ );
2689
+ async function getPageBySegments(segments, draft = false) {
2690
+ const path2 = normalizePath(segments);
2691
+ const payload = await getPayloadClient();
2692
+ if (draft) {
2693
+ return queryPageByPath(payload, path2, true);
2694
+ }
2695
+ return getPublishedPageByPathCached(path2);
2696
+ }
2697
+ async function listPublishedPagePaths() {
2698
+ const payload = await getPayloadClient();
2699
+ const pages = await payload.find({
2700
+ collection: "pages",
2701
+ depth: 0,
2702
+ draft: false,
2703
+ limit: 1e3,
2704
+ pagination: false,
2705
+ overrideAccess: false,
2706
+ where: {
2707
+ _status: {
2708
+ equals: "published"
2709
+ }
2710
+ }
2711
+ });
2712
+ return pages.docs.map((doc) => doc.path).filter((path2) => typeof path2 === "string" && path2.length > 0);
2713
+ }
2714
+ function pathToSegments(path2) {
2715
+ if (!path2 || path2 === "/") {
2716
+ return [];
2717
+ }
2718
+ return path2.split("/").filter(Boolean);
2719
+ }
2720
+ return {
2721
+ getPageBySegments,
2722
+ listPublishedPagePaths,
2723
+ pathToSegments
2724
+ };
2725
+ }
2726
+
2727
+ // src/nextjs/queries/site.ts
2728
+ var import_cache2 = require("next/cache");
2729
+ function createSiteQueries(getPayloadClient, contentTag = "website-content") {
2730
+ const getSiteSettingsCached = (0, import_cache2.unstable_cache)(
2731
+ async () => {
2732
+ const payload = await getPayloadClient();
2733
+ const settings = await payload.findGlobal({
2734
+ slug: "site-settings",
2735
+ depth: 1
2736
+ });
2737
+ return settings;
2738
+ },
2739
+ ["site-settings-global"],
2740
+ { tags: [contentTag] }
2741
+ );
2742
+ const getHeaderCached = (0, import_cache2.unstable_cache)(
2743
+ async () => {
2744
+ const payload = await getPayloadClient();
2745
+ const header = await payload.findGlobal({
2746
+ slug: "header",
2747
+ depth: 1
2748
+ });
2749
+ return header;
2750
+ },
2751
+ ["header-global"],
2752
+ { tags: [contentTag] }
2753
+ );
2754
+ const getFooterCached = (0, import_cache2.unstable_cache)(
2755
+ async () => {
2756
+ const payload = await getPayloadClient();
2757
+ const footer = await payload.findGlobal({
2758
+ slug: "footer",
2759
+ depth: 1
2760
+ });
2761
+ return footer;
2762
+ },
2763
+ ["footer-global"],
2764
+ { tags: [contentTag] }
2765
+ );
2766
+ async function getSiteSettings(draft = false) {
2767
+ if (draft) {
2768
+ const payload = await getPayloadClient();
2769
+ const settings = await payload.findGlobal({
2770
+ slug: "site-settings",
2771
+ depth: 1,
2772
+ draft: true
2773
+ });
2774
+ return settings;
2775
+ }
2776
+ return getSiteSettingsCached();
2777
+ }
2778
+ async function getHeader(draft = false) {
2779
+ if (draft) {
2780
+ const payload = await getPayloadClient();
2781
+ const header = await payload.findGlobal({
2782
+ slug: "header",
2783
+ depth: 1,
2784
+ draft: true
2785
+ });
2786
+ return header;
2787
+ }
2788
+ return getHeaderCached();
2789
+ }
2790
+ async function getFooter(draft = false) {
2791
+ if (draft) {
2792
+ const payload = await getPayloadClient();
2793
+ const footer = await payload.findGlobal({
2794
+ slug: "footer",
2795
+ depth: 1,
2796
+ draft: true
2797
+ });
2798
+ return footer;
2799
+ }
2800
+ return getFooterCached();
2801
+ }
2802
+ return {
2803
+ getSiteSettings,
2804
+ getHeader,
2805
+ getFooter
2806
+ };
2807
+ }
2808
+
2809
+ // src/nextjs/utilities/media.ts
2810
+ function resolveMedia(media) {
2811
+ if (!media) {
2812
+ return null;
2813
+ }
2814
+ if (typeof media === "number" || typeof media === "string") {
2815
+ return null;
2816
+ }
2817
+ if (media.url) {
2818
+ return {
2819
+ url: media.url,
2820
+ alt: media.alt || ""
2821
+ };
2822
+ }
2823
+ if (media.filename) {
2824
+ return {
2825
+ url: `/media/${media.filename}`,
2826
+ alt: media.alt || ""
2827
+ };
2828
+ }
2829
+ return null;
2830
+ }
2131
2831
  // Annotate the CommonJS export names for ESM import in node:
2132
2832
  0 && (module.exports = {
2133
2833
  admin,