@riverbankcms/sdk 0.89.1 → 0.90.0

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 (161) hide show
  1. package/README.md +27 -4
  2. package/dist/{PreviewEditorSidebar-JDR64FEC.mjs → PreviewEditorSidebar-KVXNF3VW.mjs} +3 -3
  3. package/dist/{PreviewEditorUI-67TMJMAF.mjs → PreviewEditorUI-J3JN5Z7T.mjs} +3 -3
  4. package/dist/SdkPreviewModeRuntime-UBL6MSNP.mjs +8 -0
  5. package/dist/_dts/ai/src/contracts/proposals.d.ts +216 -0
  6. package/dist/_dts/altcha/src/AltchaWidget.d.ts +1 -1
  7. package/dist/_dts/api/src/bookingOperations.d.ts +2 -0
  8. package/dist/_dts/api/src/bookingRecords.d.ts +4 -2
  9. package/dist/_dts/api/src/bookings.d.ts +3 -1
  10. package/dist/_dts/api/src/index.d.ts +6 -5
  11. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +15 -5
  12. package/dist/_dts/api/src/request.d.ts +21 -0
  13. package/dist/_dts/api/src/sdk-event-upsert.d.ts +3 -1
  14. package/dist/_dts/api/src/sdkContracts.d.ts +2 -0
  15. package/dist/_dts/api/src/types.d.ts +3 -1
  16. package/dist/_dts/api/src/url.d.ts +6 -3
  17. package/dist/_dts/block-form/src/utils/visibleWhen.d.ts +1 -0
  18. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterThumbnailCard.d.ts +5 -1
  19. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterThumbnailGrid.d.ts +9 -1
  20. package/dist/_dts/block-form/src/widgets/RepeaterField/components/index.d.ts +1 -0
  21. package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +7 -11
  22. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +6 -0
  23. package/dist/_dts/blocks/src/index.d.ts +2 -1
  24. package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +14 -6
  25. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -4
  26. package/dist/_dts/blocks/src/system/blocks/hero.d.ts +0 -2
  27. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +3 -3
  28. package/dist/_dts/blocks/src/system/blocks/shop.shared.d.ts +8 -0
  29. package/dist/_dts/blocks/src/system/constants/events.d.ts +4 -1
  30. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +3 -1
  31. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -0
  32. package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +17 -5
  33. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +51 -6
  34. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -0
  35. package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.d.ts +2 -2
  36. package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +1 -17
  37. package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +5 -9
  38. package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +5 -9
  39. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +2 -1
  40. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +24 -0
  41. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +5 -0
  42. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.d.ts +4 -4
  43. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.d.ts +50 -0
  44. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +2 -2
  45. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +21 -0
  46. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +1 -1
  47. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +11 -1
  48. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -1
  49. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +11 -1
  50. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/calendarViewOptions.d.ts +10 -0
  51. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventProductEligibility.d.ts +24 -0
  52. package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +5 -2
  53. package/dist/_dts/blocks/src/system/runtime/nodes/shop-checkout-form.d.ts +2 -2
  54. package/dist/_dts/content-model/src/entry-slots/index.d.ts +1 -0
  55. package/dist/_dts/content-model/src/entry-slots/sdkBlocks.d.ts +21 -0
  56. package/dist/_dts/content-model/src/entry-slots/types.d.ts +7 -0
  57. package/dist/_dts/core/src/money-input.d.ts +18 -0
  58. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +50 -0
  59. package/dist/_dts/media-editor/src/MediaEditor.d.ts +2 -1
  60. package/dist/_dts/media-editor/src/fieldUi.d.ts +6 -0
  61. package/dist/_dts/media-editor/src/index.d.ts +1 -1
  62. package/dist/_dts/preview-next/src/client/index.d.ts +1 -0
  63. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +3 -2
  64. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +3 -2
  65. package/dist/_dts/preview-next/src/client/preview/PreviewThemedSiteDocument.d.ts +3 -2
  66. package/dist/_dts/preview-next/src/client/preview/SiteChromeEditableSurface.d.ts +2 -2
  67. package/dist/_dts/preview-next/src/client/preview/themeRuntime.d.ts +6 -0
  68. package/dist/_dts/preview-next/src/client/sdk/SdkPreviewMode.d.ts +2 -1
  69. package/dist/_dts/sdk/src/cli/commands/pull-dated-offering-scope.d.ts +10 -0
  70. package/dist/_dts/sdk/src/cli/content/reader.d.ts +12 -5
  71. package/dist/_dts/sdk/src/client/management/types.d.ts +6 -55
  72. package/dist/_dts/sdk/src/components.d.ts +1 -0
  73. package/dist/_dts/sdk/src/config/field-definitions.d.ts +3 -1
  74. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +3 -1
  75. package/dist/_dts/sdk/src/next/types.d.ts +8 -11
  76. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +1 -1
  77. package/dist/_dts/sdk/src/rendering/blocks-theme-scope.d.ts +2 -1
  78. package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +8 -7
  79. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +5 -6
  80. package/dist/_dts/sdk/src/rendering/index.d.ts +1 -0
  81. package/dist/_dts/sdk/src/rendering/server.d.ts +1 -0
  82. package/dist/_dts/sdk/src/rendering/themeRuntime.d.ts +26 -0
  83. package/dist/_dts/sdk/src/version.d.ts +1 -1
  84. package/dist/_dts/site-commands/src/commands.d.ts +18 -0
  85. package/dist/_dts/theme-core/src/ResponsiveScope.d.ts +12 -0
  86. package/dist/_dts/theme-core/src/accordions/types.d.ts +1 -1
  87. package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +2 -2
  88. package/dist/_dts/theme-core/src/buttons/types.d.ts +5 -5
  89. package/dist/_dts/theme-core/src/cards/types.d.ts +2 -2
  90. package/dist/_dts/theme-core/src/index.d.ts +2 -0
  91. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +21 -21
  92. package/dist/_dts/theme-core/src/schema.d.ts +18 -18
  93. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -2
  94. package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +2 -2
  95. package/dist/_dts/theme-core/src/site-styles/logoBranding.d.ts +4 -4
  96. package/dist/_dts/theme-core/src/themeRuntime.d.ts +11 -0
  97. package/dist/{chunk-HKJQERFR.mjs → chunk-AEOYWPE4.mjs} +91 -55
  98. package/dist/{chunk-F645A5UV.mjs → chunk-BOQXMCSP.mjs} +129 -101
  99. package/dist/{chunk-ZQRBLCW5.mjs → chunk-GSPFFUVB.mjs} +2 -2
  100. package/dist/{chunk-7YUAXONX.mjs → chunk-PMBB6MQ7.mjs} +1280 -774
  101. package/dist/{chunk-TGBJWKMP.mjs → chunk-RQ3XZ4SJ.mjs} +9 -1
  102. package/dist/{chunk-7N46MZHI.mjs → chunk-UG7I7S7W.mjs} +1 -1
  103. package/dist/cli/index.mjs +899 -531
  104. package/dist/cli/init-docs/content/cli-reference.md +6 -1
  105. package/dist/cli/init-docs/content/content-management.md +27 -0
  106. package/dist/client/{accordion-MUCVNGQ7.mjs → accordion-GXQNWQ6O.mjs} +1 -1
  107. package/dist/client/{bookingForm-PKD6EFIE.mjs → bookingForm-STLUJ36H.mjs} +25 -270
  108. package/dist/client/bookings.mjs +432 -269
  109. package/dist/client/{carousel-3TKQSNJC.mjs → carousel-CVRN6EPP.mjs} +1 -1
  110. package/dist/client/{cart-6XHSZK23.mjs → cart-IYIBA5CL.mjs} +5 -6
  111. package/dist/client/{checkout-FVSPM6FI.mjs → checkout-O3BGM4GS.mjs} +5 -6
  112. package/dist/client/chunk-4RTFGHZN.mjs +433 -0
  113. package/dist/client/{chunk-UQFY4AHX.mjs → chunk-6DPXDOIL.mjs} +65 -28
  114. package/dist/client/{chunk-ZT5XE7FK.mjs → chunk-D3ETC2SU.mjs} +1 -1
  115. package/dist/client/{chunk-CQKKFEQD.mjs → chunk-DAS5CIER.mjs} +274 -105
  116. package/dist/client/{chunk-SDIYSQAY.mjs → chunk-HIHOQGIP.mjs} +2 -3
  117. package/dist/client/{chunk-ZJZZA5EP.mjs → chunk-MFPKS6QS.mjs} +11 -14
  118. package/dist/client/{chunk-EY42X22F.mjs → chunk-NBFRJ5NB.mjs} +156 -4
  119. package/dist/client/{chunk-VGLXACVK.mjs → chunk-VFHZLZAC.mjs} +1 -1
  120. package/dist/client/{chunk-STJ2NCQM.mjs → chunk-WHZQDPBZ.mjs} +19 -1
  121. package/dist/client/{chunk-RSQWWUAD.mjs → chunk-Z62JYS5O.mjs} +3 -3
  122. package/dist/client/client.mjs +3292 -2827
  123. package/dist/client/{courseRegistration-ATZSYDHM.mjs → courseRegistration-2D3ACMJR.mjs} +18 -56
  124. package/dist/client/{eventCalendar-6T2UGKKP.mjs → eventCalendar-QY4UZUFF.mjs} +8 -9
  125. package/dist/client/{eventCombined-Q4VANXVF.mjs → eventCombined-RRCDKJC2.mjs} +8 -9
  126. package/dist/client/{eventDetails-DW37E7VW.mjs → eventDetails-YO335BUT.mjs} +8 -9
  127. package/dist/client/{eventListing-XURTSAUW.mjs → eventListing-PXA6GFQ3.mjs} +8 -9
  128. package/dist/client/{eventRegistration-MRKEVAXW.mjs → eventRegistration-2ZHEDDXO.mjs} +8 -9
  129. package/dist/client/{form-WZZFFGMU.mjs → form-ZS6KX4U2.mjs} +6 -6
  130. package/dist/client/{headerSection-EQYVQBLM.mjs → headerSection-QK5SLIIB.mjs} +2 -2
  131. package/dist/client/hooks.mjs +1084 -1029
  132. package/dist/client/{locationMap-MFF5VAZR.mjs → locationMap-GFNIUD2X.mjs} +2 -2
  133. package/dist/client/{newsletterForm-JQ77UYIE.mjs → newsletterForm-PGLTTCUG.mjs} +4 -4
  134. package/dist/client/{productDetail-25LMT3IZ.mjs → productDetail-OPBE5ZPI.mjs} +5 -6
  135. package/dist/client/{productList-5ABEMKUG.mjs → productList-NI72Q62Z.mjs} +5 -6
  136. package/dist/client/rendering/client.mjs +2692 -2285
  137. package/dist/client/rendering/islands.mjs +18 -18
  138. package/dist/client/rendering.mjs +2611 -2156
  139. package/dist/client/{shop-OMMQZ6YO.mjs → shop-3ZQPEWYI.mjs} +5 -6
  140. package/dist/client/spam-protection.mjs +4 -5
  141. package/dist/preview-next/before-render.mjs +2 -2
  142. package/dist/preview-next/client/runtime.mjs +5 -5
  143. package/dist/{sdk-runtime-WNLBZ3ZH.mjs → sdk-runtime-FSHXCWDS.mjs} +6 -6
  144. package/dist/server/components.mjs +1722 -1453
  145. package/dist/server/config-validation.mjs +1316 -1261
  146. package/dist/server/config.mjs +1316 -1261
  147. package/dist/server/data.mjs +1084 -1029
  148. package/dist/server/index.mjs +135 -100
  149. package/dist/server/navigation.mjs +20 -30
  150. package/dist/server/next.mjs +1782 -1500
  151. package/dist/server/page-converter.mjs +1009 -946
  152. package/dist/server/prebuild.mjs +1 -1
  153. package/dist/server/rendering/server.mjs +1722 -1453
  154. package/dist/server/rendering.mjs +1728 -1459
  155. package/dist/server/routing.mjs +1127 -1045
  156. package/dist/server/server.mjs +1219 -1129
  157. package/dist/server/theme-bridge.mjs +8 -5
  158. package/package.json +2 -2
  159. package/dist/SdkPreviewModeRuntime-ZBEMRV7N.mjs +0 -8
  160. package/dist/client/chunk-LQFDYWPJ.mjs +0 -184
  161. package/dist/client/chunk-ZFHRN6W2.mjs +0 -66
@@ -1545,12 +1545,17 @@ var init_schema2 = __esm({
1545
1545
  minItems: z.number().int().nonnegative().optional(),
1546
1546
  maxItems: z.number().int().nonnegative().optional()
1547
1547
  });
1548
- visibleWhenSchema = z.union([
1549
- visibleWhenPredicateSchema,
1550
- z.object({
1551
- allOf: z.array(visibleWhenPredicateSchema).min(1)
1552
- })
1553
- ]);
1548
+ visibleWhenSchema = z.lazy(
1549
+ () => z.union([
1550
+ visibleWhenPredicateSchema,
1551
+ z.object({
1552
+ allOf: z.array(visibleWhenSchema).min(1)
1553
+ }),
1554
+ z.object({
1555
+ anyOf: z.array(visibleWhenSchema).min(1)
1556
+ })
1557
+ ])
1558
+ );
1554
1559
  uiSchema = z.object({
1555
1560
  widget: z.string().optional(),
1556
1561
  // Container/widget presets (used by Group/Repeater widgets themselves, not for widget selection)
@@ -13388,11 +13393,11 @@ function bind(from, options) {
13388
13393
  }
13389
13394
  });
13390
13395
  }
13391
- function when(path27, options) {
13396
+ function when(path28, options) {
13392
13397
  return (node) => ({
13393
13398
  ...node,
13394
13399
  $when: {
13395
- when: { from: path27 },
13400
+ when: { from: path28 },
13396
13401
  ...options?.equals !== void 0 ? { equals: options.equals } : {},
13397
13402
  ...options?.not ? { not: true } : {}
13398
13403
  }
@@ -13499,7 +13504,7 @@ var init_builder2 = __esm({
13499
13504
  });
13500
13505
 
13501
13506
  // ../blocks/src/system/node/fragments/backgroundLayer.ts
13502
- function backgroundLayer(path27, options = {}) {
13507
+ function backgroundLayer(path28, options = {}) {
13503
13508
  const {
13504
13509
  styleClassName = "background-style rb-absolute rb-inset-0 rb-z-neg-10 rb-h-full rb-w-full rb-pointer-events-none",
13505
13510
  imageClassName,
@@ -13513,7 +13518,7 @@ function backgroundLayer(path27, options = {}) {
13513
13518
  className: styleClassName,
13514
13519
  style: {
13515
13520
  $bind: {
13516
- from: path27,
13521
+ from: path28,
13517
13522
  transforms: [
13518
13523
  {
13519
13524
  id: "background.resolveStyle",
@@ -13523,20 +13528,20 @@ function backgroundLayer(path27, options = {}) {
13523
13528
  }
13524
13529
  }
13525
13530
  });
13526
- const imageLayer = createBackgroundImageNode(path27, imageClassName, {
13531
+ const imageLayer = createBackgroundImageNode(path28, imageClassName, {
13527
13532
  loading: imageLoading,
13528
13533
  fetchPriority: imageFetchPriority
13529
13534
  });
13530
- const overlayLayer = createBackgroundOverlayNode(path27, overlayClassName);
13535
+ const overlayLayer = createBackgroundOverlayNode(path28, overlayClassName);
13531
13536
  return omitImageLayer ? [styleLayer, overlayLayer] : [styleLayer, imageLayer, overlayLayer];
13532
13537
  }
13533
- function createBackgroundImageNode(path27, baseClassName = "rb-absolute rb-z-neg-10", options = {}) {
13534
- const imagePath = `${path27}.image`;
13538
+ function createBackgroundImageNode(path28, baseClassName = "rb-absolute rb-z-neg-10", options = {}) {
13539
+ const imagePath = `${path28}.image`;
13535
13540
  return media(
13536
13541
  {
13537
13542
  className: {
13538
13543
  $bind: {
13539
- from: path27,
13544
+ from: path28,
13540
13545
  transforms: [
13541
13546
  {
13542
13547
  id: "background.resolveImageClassName",
@@ -13547,7 +13552,7 @@ function createBackgroundImageNode(path27, baseClassName = "rb-absolute rb-z-neg
13547
13552
  },
13548
13553
  style: {
13549
13554
  $bind: {
13550
- from: path27,
13555
+ from: path28,
13551
13556
  transforms: [{ id: "background.resolveImageStyle" }]
13552
13557
  }
13553
13558
  },
@@ -13559,8 +13564,8 @@ function createBackgroundImageNode(path27, baseClassName = "rb-absolute rb-z-neg
13559
13564
  bind(imagePath)
13560
13565
  );
13561
13566
  }
13562
- function createBackgroundOverlayNode(path27, className = "background-overlay rb-absolute rb-inset-0 rb-z-neg-10 rb-h-full rb-w-full rb-pointer-events-none") {
13563
- const overlayPath = `${path27}.overlay`;
13567
+ function createBackgroundOverlayNode(path28, className = "background-overlay rb-absolute rb-inset-0 rb-z-neg-10 rb-h-full rb-w-full rb-pointer-events-none") {
13568
+ const overlayPath = `${path28}.overlay`;
13564
13569
  return el("div", {
13565
13570
  className,
13566
13571
  style: {
@@ -14400,10 +14405,10 @@ var init_sectionForegroundStyles = __esm({
14400
14405
  });
14401
14406
 
14402
14407
  // ../blocks/src/system/transforms/registry/boxStyles.ts
14403
- function readPath(source, path27) {
14404
- if (!source || !path27) return void 0;
14405
- if (!path27.includes(".")) return source[path27];
14406
- return path27.split(".").reduce((acc, segment) => {
14408
+ function readPath(source, path28) {
14409
+ if (!source || !path28) return void 0;
14410
+ if (!path28.includes(".")) return source[path28];
14411
+ return path28.split(".").reduce((acc, segment) => {
14407
14412
  if (acc && typeof acc === "object" && segment in acc) {
14408
14413
  return acc[segment];
14409
14414
  }
@@ -15395,27 +15400,27 @@ function scopePropValue(value, scope) {
15395
15400
  }
15396
15401
  return value;
15397
15402
  }
15398
- function scopeContentPath(path27, scope) {
15403
+ function scopeContentPath(path28, scope) {
15399
15404
  if (!scope || scope.length === 0) {
15400
- return path27;
15405
+ return path28;
15401
15406
  }
15402
- if (path27 === "content") {
15407
+ if (path28 === "content") {
15403
15408
  return `content.${scope}`;
15404
15409
  }
15405
- if (path27.startsWith("content.")) {
15406
- const remainder = path27.slice("content.".length);
15410
+ if (path28.startsWith("content.")) {
15411
+ const remainder = path28.slice("content.".length);
15407
15412
  return remainder.length > 0 ? `content.${scope}.${remainder}` : `content.${scope}`;
15408
15413
  }
15409
- if (path27.startsWith("content[")) {
15410
- return path27.replace(/^content/, `content.${scope}`);
15414
+ if (path28.startsWith("content[")) {
15415
+ return path28.replace(/^content/, `content.${scope}`);
15411
15416
  }
15412
- if (path27.startsWith("$root.")) {
15413
- return path27;
15417
+ if (path28.startsWith("$root.")) {
15418
+ return path28;
15414
15419
  }
15415
- if (path27.includes(".")) {
15416
- return path27;
15420
+ if (path28.includes(".")) {
15421
+ return path28;
15417
15422
  }
15418
- return `content.${scope}.${path27}`;
15423
+ return `content.${scope}.${path28}`;
15419
15424
  }
15420
15425
  var FRAGMENT_ID_PATTERN, FIELD_ID_PATTERN, dataLoaderSchema, fragmentDataSchema, fragmentConfigSchema, FragmentConfigError;
15421
15426
  var init_types14 = __esm({
@@ -15700,9 +15705,6 @@ var init_heroCopy = __esm({
15700
15705
  maxLength: 600
15701
15706
  }
15702
15707
  ],
15703
- // Layout order is [eyebrow, headline, subheadline]. The hero block's
15704
- // `splitEditorial` variant reads these nodes by index; keep the order stable
15705
- // (it fails fast at import if the count changes).
15706
15708
  layout: [
15707
15709
  text(
15708
15710
  {
@@ -18334,8 +18336,8 @@ function decodeSuccess(value) {
18334
18336
  function decodeFailure(issues) {
18335
18337
  return { ok: false, issues };
18336
18338
  }
18337
- function zodIssuePath(path27) {
18338
- return path27.flatMap((segment) => {
18339
+ function zodIssuePath(path28) {
18340
+ return path28.flatMap((segment) => {
18339
18341
  if (typeof segment === "string" || typeof segment === "number") {
18340
18342
  return [segment];
18341
18343
  }
@@ -19232,6 +19234,40 @@ var init_shared2 = __esm({
19232
19234
  init_filtering();
19233
19235
  }
19234
19236
  });
19237
+ var publicPassProductSchema, publicPassProductCollectionSchema, publicMembershipProductSchema, publicMembershipProductCollectionSchema;
19238
+ var init_shop_shared = __esm({
19239
+ "../blocks/src/system/blocks/shop.shared.ts"() {
19240
+ publicPassProductSchema = z.object({
19241
+ id: z.string(),
19242
+ productUseCase: z.enum(["event_pass", "appointment_package"]).default("event_pass"),
19243
+ name: z.string(),
19244
+ description: z.string().nullable(),
19245
+ price: z.number(),
19246
+ currency: z.string(),
19247
+ creditsTotal: z.number(),
19248
+ pricePerCredit: z.number(),
19249
+ validDays: z.number().nullable(),
19250
+ eligibleCategoryIds: z.array(z.string()),
19251
+ eligibleCategoryNames: z.array(z.string())
19252
+ });
19253
+ publicPassProductCollectionSchema = z.object({
19254
+ passes: z.array(publicPassProductSchema)
19255
+ });
19256
+ publicMembershipProductSchema = z.object({
19257
+ id: z.string(),
19258
+ name: z.string(),
19259
+ description: z.string().nullable(),
19260
+ price: z.number(),
19261
+ currency: z.string(),
19262
+ billingInterval: z.enum(["month", "year"]),
19263
+ eligibleCategoryIds: z.array(z.string()),
19264
+ eligibleCategoryNames: z.array(z.string())
19265
+ });
19266
+ publicMembershipProductCollectionSchema = z.object({
19267
+ memberships: z.array(publicMembershipProductSchema)
19268
+ });
19269
+ }
19270
+ });
19235
19271
  var occurrenceContextSchema;
19236
19272
  var init_event_registration_shared = __esm({
19237
19273
  "../blocks/src/system/blocks/event-registration.shared.ts"() {
@@ -19251,6 +19287,9 @@ var init_event_registration_shared = __esm({
19251
19287
  function isEventCalendarDisplayMode(value) {
19252
19288
  return typeof value === "string" && eventCalendarDisplayModeValues.includes(value);
19253
19289
  }
19290
+ function isEventCalendarDefaultView(value) {
19291
+ return typeof value === "string" && eventCalendarDefaultViewValues.includes(value);
19292
+ }
19254
19293
  function isEventCalendarListLayout(value) {
19255
19294
  return typeof value === "string" && eventCalendarListLayoutValues.includes(value);
19256
19295
  }
@@ -19258,11 +19297,12 @@ function isEventContentType(slug) {
19258
19297
  if (!slug) return false;
19259
19298
  return EVENT_CONTENT_TYPE_SLUGS.includes(slug);
19260
19299
  }
19261
- var EVENT_CONTENT_TYPE_SLUGS, eventCalendarDisplayModeValues, eventCalendarListLayoutValues, eventCalendarListLayoutOptions;
19300
+ var EVENT_CONTENT_TYPE_SLUGS, eventCalendarDisplayModeValues, eventCalendarDefaultViewValues, eventCalendarListLayoutValues, eventCalendarListLayoutOptions;
19262
19301
  var init_events = __esm({
19263
19302
  "../blocks/src/system/constants/events.ts"() {
19264
19303
  EVENT_CONTENT_TYPE_SLUGS = ["event", "events"];
19265
- eventCalendarDisplayModeValues = ["combined", "month", "week", "list", "timetable"];
19304
+ eventCalendarDisplayModeValues = ["combined", "calendar", "list", "timetable"];
19305
+ eventCalendarDefaultViewValues = ["month", "week"];
19266
19306
  eventCalendarListLayoutValues = ["stack", "grid", "compact"];
19267
19307
  eventCalendarListLayoutOptions = [
19268
19308
  { id: "stack", label: "Stack" },
@@ -19407,7 +19447,7 @@ var init_pricing = __esm({
19407
19447
  DEFAULT_EVENT_CURRENCY = "USD";
19408
19448
  }
19409
19449
  });
19410
- var previewStageSchema, registrationButtonVariantSchema, eventButtonVariantSchema, eventLayoutSchema, eventCalendarDisplayModeSchema, columnOptionSchema, weekStartSchema, filterAutoShowSchema, calendarTabViewsSchema;
19450
+ var previewStageSchema, registrationButtonVariantSchema, eventButtonVariantSchema, eventLayoutSchema, eventCalendarDisplayModeSchema, eventCalendarDefaultViewSchema, columnOptionSchema, weekStartSchema, filterAutoShowSchema, calendarTabViewsSchema;
19411
19451
  var init_contract_schemas = __esm({
19412
19452
  "../blocks/src/system/runtime/nodes/shared/contract-schemas.ts"() {
19413
19453
  init_events();
@@ -19416,6 +19456,7 @@ var init_contract_schemas = __esm({
19416
19456
  eventButtonVariantSchema = z.enum(["primary", "secondary", "outline", "link"]);
19417
19457
  eventLayoutSchema = z.enum(eventCalendarListLayoutValues);
19418
19458
  eventCalendarDisplayModeSchema = z.enum(eventCalendarDisplayModeValues);
19459
+ eventCalendarDefaultViewSchema = z.enum(eventCalendarDefaultViewValues);
19419
19460
  columnOptionSchema = z.enum(["2", "3", "4"]);
19420
19461
  weekStartSchema = z.enum(["sunday", "monday"]);
19421
19462
  filterAutoShowSchema = z.enum(["auto", "always", "never"]);
@@ -19443,7 +19484,7 @@ function eventMatchesOccurrenceId(event, occurrenceId) {
19443
19484
  function findPreSelectedEvent(input) {
19444
19485
  const occurrenceContext = input.occurrenceContext;
19445
19486
  if (!occurrenceContext) {
19446
- return null;
19487
+ return input.scopedEvents.length === 1 ? input.scopedEvents[0] ?? null : null;
19447
19488
  }
19448
19489
  const contextDate = getBookingLocalDateKey(toScheduledBookingDateTime({
19449
19490
  startsAt: occurrenceContext.startsAt,
@@ -19580,6 +19621,7 @@ var EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS, EVENT_REGISTRATION_SHELL_STEP_
19580
19621
  var init_event_registration_interactive = __esm({
19581
19622
  "../blocks/src/system/runtime/nodes/event-registration.interactive.ts"() {
19582
19623
  init_schemas2();
19624
+ init_shop_shared();
19583
19625
  init_event_registration_shared();
19584
19626
  init_events();
19585
19627
  init_pricing();
@@ -19619,7 +19661,9 @@ var init_event_registration_interactive = __esm({
19619
19661
  overlayEnabled: z.boolean().optional(),
19620
19662
  spamProtectionEnabled: z.boolean().optional(),
19621
19663
  stage: previewStageSchema.optional(),
19622
- supportEmail: z.string().optional()
19664
+ supportEmail: z.string().optional(),
19665
+ sitePasses: publicPassProductCollectionSchema.nullable().optional(),
19666
+ siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
19623
19667
  });
19624
19668
  eventRegistrationDisplaySchema = z.object({
19625
19669
  kind: z.literal("event-registration"),
@@ -19642,7 +19686,9 @@ var init_event_registration_interactive = __esm({
19642
19686
  buttonVariant: registrationButtonVariantSchema.optional(),
19643
19687
  overlayEnabled: z.boolean().optional(),
19644
19688
  spamProtectionEnabled: z.boolean().optional(),
19645
- supportEmail: z.string().optional()
19689
+ supportEmail: z.string().optional(),
19690
+ sitePasses: publicPassProductCollectionSchema.nullable().optional(),
19691
+ siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
19646
19692
  });
19647
19693
  eventRegistrationRenderSchema = z.object({
19648
19694
  display: eventRegistrationDisplaySchema,
@@ -19675,7 +19721,9 @@ var init_event_registration_interactive = __esm({
19675
19721
  buttonVariant: source.buttonVariant,
19676
19722
  overlayEnabled: source.overlayEnabled,
19677
19723
  spamProtectionEnabled: source.spamProtectionEnabled,
19678
- supportEmail: source.supportEmail
19724
+ supportEmail: source.supportEmail,
19725
+ sitePasses: source.sitePasses ?? null,
19726
+ siteMemberships: source.siteMemberships ?? null
19679
19727
  }
19680
19728
  })
19681
19729
  });
@@ -19811,34 +19859,6 @@ var init_course_registration_interactive = __esm({
19811
19859
  });
19812
19860
  }
19813
19861
  });
19814
- var publicPassProductSchema, publicMembershipProductSchema;
19815
- var init_shop_shared = __esm({
19816
- "../blocks/src/system/blocks/shop.shared.ts"() {
19817
- publicPassProductSchema = z.object({
19818
- id: z.string(),
19819
- productUseCase: z.enum(["event_pass", "appointment_package"]).default("event_pass"),
19820
- name: z.string(),
19821
- description: z.string().nullable(),
19822
- price: z.number(),
19823
- currency: z.string(),
19824
- creditsTotal: z.number(),
19825
- pricePerCredit: z.number(),
19826
- validDays: z.number().nullable(),
19827
- eligibleCategoryIds: z.array(z.string()),
19828
- eligibleCategoryNames: z.array(z.string())
19829
- });
19830
- publicMembershipProductSchema = z.object({
19831
- id: z.string(),
19832
- name: z.string(),
19833
- description: z.string().nullable(),
19834
- price: z.number(),
19835
- currency: z.string(),
19836
- billingInterval: z.enum(["month", "year"]),
19837
- eligibleCategoryIds: z.array(z.string()),
19838
- eligibleCategoryNames: z.array(z.string())
19839
- });
19840
- }
19841
- });
19842
19862
  var eventDetailsManifest, occurrenceContextSchema2, eventAutoApplyDiscountPreviewBaseSchema, eventAutoApplyDiscountPreviewSchema, eventDetailsBlockDefinition;
19843
19863
  var init_event_details = __esm({
19844
19864
  "../blocks/src/system/blocks/event-details.ts"() {
@@ -20012,8 +20032,8 @@ var init_event_details = __esm({
20012
20032
  dataSchemas: {
20013
20033
  eventDetailsData: z.object({
20014
20034
  events: publicEventsArraySchema,
20015
- sitePasses: z.object({ passes: z.array(publicPassProductSchema) }),
20016
- siteMemberships: z.object({ memberships: z.array(publicMembershipProductSchema) }),
20035
+ sitePasses: publicPassProductCollectionSchema,
20036
+ siteMemberships: publicMembershipProductCollectionSchema,
20017
20037
  autoApplyDiscount: eventAutoApplyDiscountPreviewSchema.nullable().optional().default(null)
20018
20038
  }).optional(),
20019
20039
  occurrenceContext: occurrenceContextSchema2.optional()
@@ -20385,6 +20405,7 @@ function buildEventCalendarDisplay(source) {
20385
20405
  }),
20386
20406
  startOfWeek: source.startOfWeek ?? "monday",
20387
20407
  calendarTabViews: source.calendarTabViews ?? "both",
20408
+ defaultCalendarView: source.defaultCalendarView ?? "month",
20388
20409
  showFilters: source.showFilters ?? true,
20389
20410
  showCategoryFilter: source.showCategoryFilter ?? "auto",
20390
20411
  showVenueFilter: source.showVenueFilter ?? false,
@@ -20436,6 +20457,7 @@ var init_EventCalendar_interactive = __esm({
20436
20457
  loadMoreText: z.string().optional(),
20437
20458
  startOfWeek: weekStartSchema.optional(),
20438
20459
  calendarTabViews: calendarTabViewsSchema.optional(),
20460
+ defaultCalendarView: eventCalendarDefaultViewSchema.optional(),
20439
20461
  showFilters: z.boolean().nullable().optional(),
20440
20462
  showCategoryFilter: filterAutoShowSchema.optional(),
20441
20463
  showVenueFilter: z.boolean().nullable().optional(),
@@ -20467,6 +20489,7 @@ var init_EventCalendar_interactive = __esm({
20467
20489
  paginationAction: eventListPaginationActionSchema,
20468
20490
  startOfWeek: weekStartSchema,
20469
20491
  calendarTabViews: calendarTabViewsSchema,
20492
+ defaultCalendarView: eventCalendarDefaultViewSchema,
20470
20493
  showFilters: z.boolean(),
20471
20494
  showCategoryFilter: filterAutoShowSchema,
20472
20495
  showVenueFilter: z.boolean(),
@@ -28937,11 +28960,11 @@ function validationContext(options = {}) {
28937
28960
  allowIncomplete: isDraft || (options.allowIncomplete ?? false)
28938
28961
  };
28939
28962
  }
28940
- function formatFieldPath(path27) {
28941
- return path27.map((segment) => String(segment)).join(".");
28963
+ function formatFieldPath(path28) {
28964
+ return path28.map((segment) => String(segment)).join(".");
28942
28965
  }
28943
- function toZodIssuePath(path27) {
28944
- return [...path27];
28966
+ function toZodIssuePath(path28) {
28967
+ return [...path28];
28945
28968
  }
28946
28969
  function fieldIssueToMessage(issue5) {
28947
28970
  switch (issue5.kind) {
@@ -28995,7 +29018,7 @@ function pluralize(label, count) {
28995
29018
  if (count === 1) return label;
28996
29019
  return label.endsWith("s") ? label : `${label}s`;
28997
29020
  }
28998
- function deriveFieldValidationPlan(field, path27 = [field.id]) {
29021
+ function deriveFieldValidationPlan(field, path28 = [field.id]) {
28999
29022
  const required = Boolean(field.required);
29000
29023
  switch (field.type) {
29001
29024
  case "text": {
@@ -29006,7 +29029,7 @@ function deriveFieldValidationPlan(field, path27 = [field.id]) {
29006
29029
  });
29007
29030
  if (typeof field.ui?.min === "number") constraints2.push({ kind: "numberMin", minimum: field.ui.min });
29008
29031
  if (typeof field.ui?.max === "number") constraints2.push({ kind: "numberMax", maximum: field.ui.max });
29009
- return makePlan("number", "number", field, path27, required, constraints2);
29032
+ return makePlan("number", "number", field, path28, required, constraints2);
29010
29033
  }
29011
29034
  const constraints = commonConstraints(required, {
29012
29035
  kind: field.ui?.widget === "iconPicker" ? "blockIconValue" : "textType"
@@ -29015,7 +29038,7 @@ function deriveFieldValidationPlan(field, path27 = [field.id]) {
29015
29038
  if (inputType === "tel") constraints.push({ kind: "phoneFormat" });
29016
29039
  if (field.ui?.pattern) constraints.push({ kind: "patternFormat", pattern: field.ui.pattern });
29017
29040
  if (typeof field.maxLength === "number") constraints.push({ kind: "maxLength", maximum: field.maxLength });
29018
- return makePlan("string", "string", field, path27, required, constraints);
29041
+ return makePlan("string", "string", field, path28, required, constraints);
29019
29042
  }
29020
29043
  case "number": {
29021
29044
  const constraints = commonConstraints(required, {
@@ -29023,34 +29046,34 @@ function deriveFieldValidationPlan(field, path27 = [field.id]) {
29023
29046
  });
29024
29047
  if (typeof field.min === "number") constraints.push({ kind: "numberMin", minimum: field.min });
29025
29048
  if (typeof field.max === "number") constraints.push({ kind: "numberMax", maximum: field.max });
29026
- return makePlan("number", "number", field, path27, required, constraints);
29049
+ return makePlan("number", "number", field, path28, required, constraints);
29027
29050
  }
29028
29051
  case "slug": {
29029
29052
  const constraints = commonConstraints(required, { kind: "textType" }, { kind: "slugFormat" });
29030
29053
  if (typeof field.maxLength === "number") constraints.push({ kind: "maxLength", maximum: field.maxLength });
29031
- return makePlan("string", "string", field, path27, required, constraints);
29054
+ return makePlan("string", "string", field, path28, required, constraints);
29032
29055
  }
29033
29056
  case "url":
29034
29057
  return makePlan(
29035
29058
  "string",
29036
29059
  "string",
29037
29060
  field,
29038
- path27,
29061
+ path28,
29039
29062
  required,
29040
29063
  commonConstraints(required, { kind: "textType" }, { kind: "urlFormat", allowRelative: Boolean(field.allowRelative) })
29041
29064
  );
29042
29065
  case "reference":
29043
- return makePlan("string", "string", field, path27, required, commonConstraints(required, { kind: "referenceText" }));
29066
+ return makePlan("string", "string", field, path28, required, commonConstraints(required, { kind: "referenceText" }));
29044
29067
  case "date":
29045
- return makePlan("string", "string", field, path27, required, commonConstraints(required, { kind: "textType" }, { kind: "dateFormat" }));
29068
+ return makePlan("string", "string", field, path28, required, commonConstraints(required, { kind: "textType" }, { kind: "dateFormat" }));
29046
29069
  case "time":
29047
- return makePlan("string", "string", field, path27, required, commonConstraints(required, { kind: "textType" }, { kind: "timeFormat" }));
29070
+ return makePlan("string", "string", field, path28, required, commonConstraints(required, { kind: "textType" }, { kind: "timeFormat" }));
29048
29071
  case "datetime":
29049
29072
  return makePlan(
29050
29073
  "string",
29051
29074
  "string",
29052
29075
  field,
29053
- path27,
29076
+ path28,
29054
29077
  required,
29055
29078
  commonConstraints(required, { kind: "textType" }, { kind: "datetimeFormat" })
29056
29079
  );
@@ -29059,7 +29082,7 @@ function deriveFieldValidationPlan(field, path27 = [field.id]) {
29059
29082
  "select",
29060
29083
  "select",
29061
29084
  field,
29062
- path27,
29085
+ path28,
29063
29086
  required,
29064
29087
  commonConstraints(required, {
29065
29088
  kind: "selectOption",
@@ -29068,40 +29091,40 @@ function deriveFieldValidationPlan(field, path27 = [field.id]) {
29068
29091
  })
29069
29092
  );
29070
29093
  case "richText":
29071
- return makePlan("richText", "object", field, path27, required, commonConstraints(required, { kind: "richTextDoc" }));
29094
+ return makePlan("richText", "object", field, path28, required, commonConstraints(required, { kind: "richTextDoc" }));
29072
29095
  case "media":
29073
29096
  case "file":
29074
- return makePlan("media", "object", field, path27, required, commonConstraints(required, { kind: "mediaObject" }));
29097
+ return makePlan("media", "object", field, path28, required, commonConstraints(required, { kind: "mediaObject" }));
29075
29098
  case "link":
29076
- return makePlan("link", "object", field, path27, required, commonConstraints(required, { kind: "linkObject" }));
29099
+ return makePlan("link", "object", field, path28, required, commonConstraints(required, { kind: "linkObject" }));
29077
29100
  case "boolean":
29078
- return makePlan("boolean", "boolean", field, path27, required, requiredConstraints(required));
29101
+ return makePlan("boolean", "boolean", field, path28, required, requiredConstraints(required));
29079
29102
  case "repeater":
29080
29103
  return {
29081
- ...makePlan("repeater", "array", field, path27, required, commonConstraints(required, { kind: "arrayType" })),
29104
+ ...makePlan("repeater", "array", field, path28, required, commonConstraints(required, { kind: "arrayType" })),
29082
29105
  ...field.polymorphic && field.itemTypes ? {
29083
- repeatedItemVariants: deriveRepeatedItemVariants(field, [...path27, 0])
29106
+ repeatedItemVariants: deriveRepeatedItemVariants(field, [...path28, 0])
29084
29107
  } : {
29085
- repeatedItemPlan: deriveNestedFieldPlans(getRepeaterFields(field), [...path27, 0])
29108
+ repeatedItemPlan: deriveNestedFieldPlans(getRepeaterFields(field), [...path28, 0])
29086
29109
  },
29087
29110
  constraints: withRepeaterItemConstraints(field, commonConstraints(required, { kind: "arrayType" }))
29088
29111
  };
29089
29112
  case "group":
29090
29113
  case "modal":
29091
29114
  return {
29092
- ...makePlan("group", "object", field, path27, required, requiredConstraints(required)),
29093
- children: deriveNestedFieldPlans(field.schema?.fields ?? [], path27),
29115
+ ...makePlan("group", "object", field, path28, required, requiredConstraints(required)),
29116
+ children: deriveNestedFieldPlans(field.schema?.fields ?? [], path28),
29094
29117
  allowNullChildren: field.type === "group" && field.ui?.widget === "locationPicker"
29095
29118
  };
29096
29119
  case "tabGroup":
29097
29120
  return {
29098
- ...makePlan("group", "object", field, path27, required, requiredConstraints(required)),
29099
- children: field.tabs.flatMap((tab) => deriveNestedFieldPlans(tab.fields, path27))
29121
+ ...makePlan("group", "object", field, path28, required, requiredConstraints(required)),
29122
+ children: field.tabs.flatMap((tab) => deriveNestedFieldPlans(tab.fields, path28))
29100
29123
  };
29101
29124
  case "presetOrCustom":
29102
29125
  case "contentTypeSelect":
29103
29126
  case "entryPicker":
29104
- return makePlan("passthrough", "unknown", field, path27, false, []);
29127
+ return makePlan("passthrough", "unknown", field, path28, false, []);
29105
29128
  default:
29106
29129
  return assertNever2(field);
29107
29130
  }
@@ -29115,14 +29138,14 @@ function commonConstraints(required, ...specific) {
29115
29138
  function requiredConstraints(required) {
29116
29139
  return required ? [{ kind: "required" }] : [];
29117
29140
  }
29118
- function makePlan(kind, valueKind2, field, path27, required, constraints) {
29141
+ function makePlan(kind, valueKind2, field, path28, required, constraints) {
29119
29142
  return {
29120
29143
  kind,
29121
29144
  valueKind: valueKind2,
29122
29145
  fieldId: field.id,
29123
29146
  label: field.label,
29124
29147
  fieldType: field.type,
29125
- path: path27,
29148
+ path: path28,
29126
29149
  required,
29127
29150
  visibility: fieldVisibility(field),
29128
29151
  constraints
@@ -29459,18 +29482,18 @@ function materializeRepeaterItemPlan(plan, parentPath, index) {
29459
29482
  return rebaseFieldPlanPath(plan, [...parentPath, 0], [...parentPath, index]);
29460
29483
  }
29461
29484
  function rebaseFieldPlanPath(plan, fromPrefix, toPrefix) {
29462
- const path27 = rebaseFieldPath(plan.path, fromPrefix, toPrefix);
29485
+ const path28 = rebaseFieldPath(plan.path, fromPrefix, toPrefix);
29463
29486
  switch (plan.kind) {
29464
29487
  case "group":
29465
29488
  return {
29466
29489
  ...plan,
29467
- path: path27,
29490
+ path: path28,
29468
29491
  children: plan.children.map((childPlan) => rebaseFieldPlanPath(childPlan, fromPrefix, toPrefix))
29469
29492
  };
29470
29493
  case "repeater":
29471
29494
  return {
29472
29495
  ...plan,
29473
- path: path27,
29496
+ path: path28,
29474
29497
  ...plan.repeatedItemVariants ? {
29475
29498
  repeatedItemVariants: plan.repeatedItemVariants.map((variant) => ({
29476
29499
  ...variant,
@@ -29491,20 +29514,20 @@ function rebaseFieldPlanPath(plan, fromPrefix, toPrefix) {
29491
29514
  case "passthrough":
29492
29515
  return {
29493
29516
  ...plan,
29494
- path: path27
29517
+ path: path28
29495
29518
  };
29496
29519
  default:
29497
29520
  return assertNever2(plan);
29498
29521
  }
29499
29522
  }
29500
- function rebaseFieldPath(path27, fromPrefix, toPrefix) {
29501
- if (!startsWithFieldPath(path27, fromPrefix)) {
29502
- throw new Error(`Cannot rebase field path ${formatFieldPath(path27)} from ${formatFieldPath(fromPrefix)}`);
29523
+ function rebaseFieldPath(path28, fromPrefix, toPrefix) {
29524
+ if (!startsWithFieldPath(path28, fromPrefix)) {
29525
+ throw new Error(`Cannot rebase field path ${formatFieldPath(path28)} from ${formatFieldPath(fromPrefix)}`);
29503
29526
  }
29504
- return [...toPrefix, ...path27.slice(fromPrefix.length)];
29527
+ return [...toPrefix, ...path28.slice(fromPrefix.length)];
29505
29528
  }
29506
- function startsWithFieldPath(path27, prefix) {
29507
- return prefix.every((segment, index) => path27[index] === segment);
29529
+ function startsWithFieldPath(path28, prefix) {
29530
+ return prefix.every((segment, index) => path28[index] === segment);
29508
29531
  }
29509
29532
  function issue(plan, kind, extra) {
29510
29533
  return {
@@ -29530,8 +29553,8 @@ function fieldPlanToZod(plan, options = {}) {
29530
29553
  }
29531
29554
  function addFieldIssueToZodContext(zodCtx, validationIssue, rootPath) {
29532
29555
  const message = fieldIssueToMessage(validationIssue);
29533
- const path27 = relativeZodIssuePath(validationIssue.path, rootPath);
29534
- const issuePath = path27.length > 0 ? { path: toZodIssuePath(path27) } : {};
29556
+ const path28 = relativeZodIssuePath(validationIssue.path, rootPath);
29557
+ const issuePath = path28.length > 0 ? { path: toZodIssuePath(path28) } : {};
29535
29558
  switch (validationIssue.kind) {
29536
29559
  case "required":
29537
29560
  if (validationIssue.emptyOrigin) {
@@ -29584,8 +29607,8 @@ function addFieldIssueToZodContext(zodCtx, validationIssue, rootPath) {
29584
29607
  assertNever2(validationIssue);
29585
29608
  }
29586
29609
  }
29587
- function relativeZodIssuePath(path27, rootPath) {
29588
- return startsWithFieldPath(path27, rootPath) ? path27.slice(rootPath.length) : path27;
29610
+ function relativeZodIssuePath(path28, rootPath) {
29611
+ return startsWithFieldPath(path28, rootPath) ? path28.slice(rootPath.length) : path28;
29589
29612
  }
29590
29613
  function compilePattern(pattern) {
29591
29614
  try {
@@ -29954,32 +29977,6 @@ var splitReverseLayout = splitLayoutWith([
29954
29977
  splitContentColumn,
29955
29978
  splitImageColumn
29956
29979
  ]);
29957
- var heroEyebrowNode = heroCopyFragment.layout[0];
29958
- var heroHeadlineNode = heroCopyFragment.layout[1];
29959
- var heroSubheadlineNode = heroCopyFragment.layout[2];
29960
- var heroCtaRowNode = heroCtaRowFragment.layout[0];
29961
- if (!heroEyebrowNode || !heroHeadlineNode || !heroSubheadlineNode || !heroCtaRowNode) {
29962
- throw new Error("Hero copy/CTA fragments are missing their expected layout nodes.");
29963
- }
29964
- var heroEditorialBottomRow = inline(
29965
- {
29966
- gap: "lg",
29967
- align: "end",
29968
- justify: "start",
29969
- wrap: true,
29970
- className: "rb-w-full"
29971
- },
29972
- [heroSubheadlineNode, heroCtaRowNode]
29973
- );
29974
- var splitEditorialContentColumn = heroContentWrapper(
29975
- [heroEyebrowNode, heroHeadlineNode, heroEditorialBottomRow],
29976
- "md",
29977
- "rb-w-full rb-text-left"
29978
- );
29979
- var splitEditorialLayout = splitLayoutWith([
29980
- splitEditorialContentColumn,
29981
- splitImageColumn
29982
- ]);
29983
29980
  var heroConfig = {
29984
29981
  id: "block.hero",
29985
29982
  title: "Hero",
@@ -30003,7 +30000,8 @@ var heroConfig = {
30003
30000
  id: "imageShape",
30004
30001
  label: "Image shape",
30005
30002
  defaultValue: "default",
30006
- uiIntent: "display"
30003
+ uiIntent: "display",
30004
+ visibleWhen: { field: "variant", oneOf: ["split", "splitReverse"] }
30007
30005
  })
30008
30006
  ],
30009
30007
  layout: classicLayout,
@@ -30011,8 +30009,7 @@ var heroConfig = {
30011
30009
  classic: classicLayout,
30012
30010
  micro: microLayout,
30013
30011
  split: splitLayout,
30014
- splitReverse: splitReverseLayout,
30015
- splitEditorial: splitEditorialLayout
30012
+ splitReverse: splitReverseLayout
30016
30013
  },
30017
30014
  defaultVariant: "classic",
30018
30015
  description: "Hero section with headline, subtitle, and repeatable CTAs.",
@@ -31659,8 +31656,10 @@ function resolveGeneratedHeroLayoutStyles(content) {
31659
31656
  return isPlainObject2(raw) ? raw : null;
31660
31657
  }
31661
31658
  function readHeroLayoutString(content, generatedKey, fallbackKey = generatedKey) {
31659
+ const explicitValue = readString(content, fallbackKey);
31660
+ if (explicitValue !== void 0) return explicitValue;
31662
31661
  const generated = resolveGeneratedHeroLayoutStyles(content);
31663
- return generated && typeof generated[generatedKey] === "string" ? generated[generatedKey] : readString(content, fallbackKey);
31662
+ return generated && typeof generated[generatedKey] === "string" ? generated[generatedKey] : void 0;
31664
31663
  }
31665
31664
  function resolveHeroVariant(content) {
31666
31665
  const variant = readString(content, "variant");
@@ -31673,7 +31672,7 @@ function resolveHeroContentAlignment(content) {
31673
31672
  const raw = readHeroLayoutString(content, "contentAlignment");
31674
31673
  if (raw === "left" || raw === "center" || raw === "right") return raw;
31675
31674
  const variant = resolveHeroVariant(content);
31676
- if (variant === "split" || variant === "splitReverse" || variant === "splitEditorial") return "left";
31675
+ if (variant === "split" || variant === "splitReverse") return "left";
31677
31676
  return "center";
31678
31677
  }
31679
31678
  function resolveHeroVerticalAlignment(content) {
@@ -31683,7 +31682,7 @@ function resolveHeroVerticalAlignment(content) {
31683
31682
  const minHeight = sectionStyles?.minHeight;
31684
31683
  if (minHeight === "banner" || minHeight === "hero" || minHeight === "immersive") return "center";
31685
31684
  const variant = resolveHeroVariant(content);
31686
- if (variant === "split" || variant === "splitReverse" || variant === "splitEditorial") return "center";
31685
+ if (variant === "split" || variant === "splitReverse") return "center";
31687
31686
  return "top";
31688
31687
  }
31689
31688
  function resolveHeroContentMaxWidth(content) {
@@ -32743,9 +32742,9 @@ function maybeBuildSupabaseTransformUrl(inputUrl, options) {
32743
32742
  const remainder = url.pathname.slice(idx + marker.length);
32744
32743
  const parts = remainder.split("/").filter(Boolean);
32745
32744
  const bucket = parts[0];
32746
- const path27 = parts.slice(1).join("/");
32747
- if (!bucket || !path27) return inputUrl;
32748
- url.pathname = `/storage/v1/render/image/public/${bucket}/${path27}`;
32745
+ const path28 = parts.slice(1).join("/");
32746
+ if (!bucket || !path28) return inputUrl;
32747
+ url.pathname = `/storage/v1/render/image/public/${bucket}/${path28}`;
32749
32748
  url.search = "";
32750
32749
  if (width) url.searchParams.set("width", String(width));
32751
32750
  if (height) url.searchParams.set("height", String(height));
@@ -35304,6 +35303,7 @@ init_styledSection();
35304
35303
  init_fragments();
35305
35304
  init_api_bindings();
35306
35305
  init_shared2();
35306
+ init_shop_shared();
35307
35307
  init_defineBlock();
35308
35308
  init_event_registration_shared();
35309
35309
  init_event_registration_interactive();
@@ -35458,6 +35458,8 @@ var eventRegistrationManifest = createBlockManifest({
35458
35458
  },
35459
35459
  // Event data from loader
35460
35460
  events: { $bind: { from: "data.events" } },
35461
+ sitePasses: { $bind: { from: "data.sitePasses" } },
35462
+ siteMemberships: { $bind: { from: "data.siteMemberships" } },
35461
35463
  // Stage for preview mode (allows registering for draft events)
35462
35464
  stage: {
35463
35465
  $bind: { from: "$root.previewStage", fallback: "published" }
@@ -35476,7 +35478,9 @@ var eventRegistrationBlockDefinition = {
35476
35478
  manifest: eventRegistrationManifest,
35477
35479
  runtime: eventRegistrationBlockRuntime,
35478
35480
  dataSchemas: {
35479
- events: z.array(publicEventSchema).optional(),
35481
+ events: publicEventsArraySchema.optional(),
35482
+ sitePasses: publicPassProductCollectionSchema.optional(),
35483
+ siteMemberships: publicMembershipProductCollectionSchema.optional(),
35480
35484
  occurrenceContext: occurrenceContextSchema.optional()
35481
35485
  },
35482
35486
  dataLoaders: {
@@ -35495,6 +35499,20 @@ var eventRegistrationBlockDefinition = {
35495
35499
  entryId: { $bind: { from: "$root.contentEntry._entryId", fallback: "" } }
35496
35500
  },
35497
35501
  mode: "server"
35502
+ },
35503
+ sitePasses: {
35504
+ endpoint: "listPublicPasses",
35505
+ params: {
35506
+ siteId: { $bind: { from: "$root.siteId" } }
35507
+ },
35508
+ mode: "server"
35509
+ },
35510
+ siteMemberships: {
35511
+ endpoint: "listPublicMemberships",
35512
+ params: {
35513
+ siteId: { $bind: { from: "$root.siteId" } }
35514
+ },
35515
+ mode: "server"
35498
35516
  }
35499
35517
  }
35500
35518
  };
@@ -36319,6 +36337,9 @@ function normalizeEventCalendarContent(content) {
36319
36337
  ...variant ? { variant } : {},
36320
36338
  displayMode: normalizeEventCalendarDisplayMode(record.displayMode),
36321
36339
  listLayout: normalizeEventCalendarListLayout(record.listLayout),
36340
+ defaultCalendarView: normalizeEventCalendarDefaultView(
36341
+ record.defaultCalendarView
36342
+ ),
36322
36343
  kind,
36323
36344
  eventSurface: normalizeEventSurfaceScope(record.eventSurface),
36324
36345
  filterEventPresets: normalizeEventSurfacePresets(record.filterEventPresets),
@@ -36336,6 +36357,9 @@ function normalizeEventCalendarDisplayMode(value) {
36336
36357
  function normalizeEventCalendarListLayout(value) {
36337
36358
  return isEventCalendarListLayout(value) ? value : void 0;
36338
36359
  }
36360
+ function normalizeEventCalendarDefaultView(value) {
36361
+ return isEventCalendarDefaultView(value) ? value : void 0;
36362
+ }
36339
36363
  var eventCalendarLayout = [
36340
36364
  styledSection({
36341
36365
  children: sectionContainer(
@@ -36395,6 +36419,9 @@ var eventCalendarLayout = [
36395
36419
  calendarTabViews: {
36396
36420
  $bind: { from: "content.calendarTabViews", fallback: "both" }
36397
36421
  },
36422
+ defaultCalendarView: {
36423
+ $bind: { from: "content.defaultCalendarView", fallback: "month" }
36424
+ },
36398
36425
  // Filtering options
36399
36426
  showFilters: {
36400
36427
  $bind: { from: "content.showFilters", fallback: true }
@@ -36461,8 +36488,7 @@ var eventCalendarAdditionalFields = [
36461
36488
  defaultValue: "combined",
36462
36489
  options: [
36463
36490
  { value: "combined", label: "Combined (List + Calendar tabs)" },
36464
- { value: "month", label: "Month calendar" },
36465
- { value: "week", label: "Week agenda" },
36491
+ { value: "calendar", label: "Calendar" },
36466
36492
  { value: "timetable", label: "Timetable" },
36467
36493
  { value: "list", label: "List" }
36468
36494
  ],
@@ -36501,7 +36527,12 @@ var eventCalendarAdditionalFields = [
36501
36527
  ],
36502
36528
  ui: {
36503
36529
  intent: "display",
36504
- visibleWhen: { field: "listLayout", equals: "grid" }
36530
+ visibleWhen: {
36531
+ allOf: [
36532
+ { field: "variant", oneOf: ["combined", "list"] },
36533
+ { field: "listLayout", equals: "grid" }
36534
+ ]
36535
+ }
36505
36536
  }
36506
36537
  },
36507
36538
  {
@@ -36549,7 +36580,12 @@ var eventCalendarAdditionalFields = [
36549
36580
  required: false,
36550
36581
  ui: {
36551
36582
  intent: "display",
36552
- visibleWhen: { field: "paginationMode", equals: "seeAllLink" }
36583
+ visibleWhen: {
36584
+ allOf: [
36585
+ { field: "variant", oneOf: ["combined", "list"] },
36586
+ { field: "paginationMode", equals: "seeAllLink" }
36587
+ ]
36588
+ }
36553
36589
  }
36554
36590
  },
36555
36591
  {
@@ -36582,7 +36618,7 @@ var eventCalendarAdditionalFields = [
36582
36618
  intent: "display",
36583
36619
  visibleWhen: {
36584
36620
  field: "variant",
36585
- oneOf: ["combined", "month", "week"]
36621
+ oneOf: ["combined", "calendar", "timetable"]
36586
36622
  }
36587
36623
  }
36588
36624
  },
@@ -36605,6 +36641,33 @@ var eventCalendarAdditionalFields = [
36605
36641
  visibleWhen: { field: "variant", equals: "combined" }
36606
36642
  }
36607
36643
  },
36644
+ {
36645
+ id: "defaultCalendarView",
36646
+ type: "select",
36647
+ label: "Calendar view",
36648
+ description: "Choose the standalone calendar view, or the first view in combined mode",
36649
+ required: false,
36650
+ multiple: false,
36651
+ defaultValue: "month",
36652
+ options: [
36653
+ { value: "month", label: "Month" },
36654
+ { value: "week", label: "Week" }
36655
+ ],
36656
+ ui: {
36657
+ intent: "display",
36658
+ visibleWhen: {
36659
+ anyOf: [
36660
+ { field: "variant", equals: "calendar" },
36661
+ {
36662
+ allOf: [
36663
+ { field: "variant", equals: "combined" },
36664
+ { field: "calendarTabViews", equals: "both" }
36665
+ ]
36666
+ }
36667
+ ]
36668
+ }
36669
+ }
36670
+ },
36608
36671
  // Filtering options
36609
36672
  {
36610
36673
  id: "kind",
@@ -36632,7 +36695,7 @@ var eventCalendarAdditionalFields = [
36632
36695
  intent: "display",
36633
36696
  visibleWhen: {
36634
36697
  field: "variant",
36635
- oneOf: ["combined", "list", "timetable"]
36698
+ oneOf: ["combined", "calendar", "list", "timetable"]
36636
36699
  }
36637
36700
  }
36638
36701
  },
@@ -36652,8 +36715,10 @@ var eventCalendarAdditionalFields = [
36652
36715
  ui: {
36653
36716
  intent: "display",
36654
36717
  visibleWhen: {
36655
- field: "variant",
36656
- oneOf: ["combined", "list", "timetable"]
36718
+ allOf: [
36719
+ { field: "variant", oneOf: ["combined", "calendar", "list", "timetable"] },
36720
+ { field: "showFilters", equals: true }
36721
+ ]
36657
36722
  }
36658
36723
  }
36659
36724
  },
@@ -36667,8 +36732,10 @@ var eventCalendarAdditionalFields = [
36667
36732
  ui: {
36668
36733
  intent: "display",
36669
36734
  visibleWhen: {
36670
- field: "variant",
36671
- oneOf: ["combined", "list", "timetable"]
36735
+ allOf: [
36736
+ { field: "variant", oneOf: ["combined", "calendar", "list", "timetable"] },
36737
+ { field: "showFilters", equals: true }
36738
+ ]
36672
36739
  }
36673
36740
  }
36674
36741
  },
@@ -36682,8 +36749,10 @@ var eventCalendarAdditionalFields = [
36682
36749
  ui: {
36683
36750
  intent: "display",
36684
36751
  visibleWhen: {
36685
- field: "variant",
36686
- oneOf: ["combined", "list", "timetable"]
36752
+ allOf: [
36753
+ { field: "variant", oneOf: ["combined", "calendar", "list", "timetable"] },
36754
+ { field: "showFilters", equals: true }
36755
+ ]
36687
36756
  }
36688
36757
  }
36689
36758
  },
@@ -36697,8 +36766,15 @@ var eventCalendarAdditionalFields = [
36697
36766
  ui: {
36698
36767
  intent: "display",
36699
36768
  visibleWhen: {
36700
- field: "variant",
36701
- oneOf: ["combined", "list", "week", "timetable"]
36769
+ anyOf: [
36770
+ { field: "variant", oneOf: ["combined", "list", "timetable"] },
36771
+ {
36772
+ allOf: [
36773
+ { field: "variant", equals: "calendar" },
36774
+ { field: "defaultCalendarView", equals: "week" }
36775
+ ]
36776
+ }
36777
+ ]
36702
36778
  }
36703
36779
  }
36704
36780
  },
@@ -36814,8 +36890,7 @@ var eventCalendarAdditionalFields = [
36814
36890
  ];
36815
36891
  var eventCalendarVariants = {
36816
36892
  combined: eventCalendarLayout[0],
36817
- month: eventCalendarLayout[0],
36818
- week: eventCalendarLayout[0],
36893
+ calendar: eventCalendarLayout[0],
36819
36894
  timetable: eventCalendarLayout[0],
36820
36895
  list: eventCalendarLayout[0]
36821
36896
  };
@@ -36827,8 +36902,7 @@ var eventCalendarVariants = {
36827
36902
  multiple: false,
36828
36903
  options: [
36829
36904
  { value: "combined" },
36830
- { value: "month" },
36831
- { value: "week" },
36905
+ { value: "calendar" },
36832
36906
  { value: "timetable" },
36833
36907
  { value: "list" }
36834
36908
  ]
@@ -36841,6 +36915,13 @@ var eventCalendarVariants = {
36841
36915
  options: eventCalendarListLayoutOptions.map((option) => ({
36842
36916
  value: option.id
36843
36917
  }))
36918
+ },
36919
+ {
36920
+ id: "defaultCalendarView",
36921
+ type: "select",
36922
+ required: false,
36923
+ multiple: false,
36924
+ options: [{ value: "month" }, { value: "week" }]
36844
36925
  }
36845
36926
  ];
36846
36927
  var eventCalendarConfig = {
@@ -36884,8 +36965,7 @@ var eventCalendarConfig = {
36884
36965
  defaultVariant: "combined",
36885
36966
  variantOptions: {
36886
36967
  combined: { label: "Combined" },
36887
- month: { label: "Month" },
36888
- week: { label: "Week" },
36968
+ calendar: { label: "Calendar" },
36889
36969
  timetable: { label: "Timetable" },
36890
36970
  list: { label: "List" }
36891
36971
  }
@@ -39084,9 +39164,9 @@ var shopBlockDefinition = {
39084
39164
  runtime: shopBlockRuntime,
39085
39165
  dataSchemas: {
39086
39166
  // listPublicPasses returns { passes: [...] }
39087
- passes: z.object({ passes: z.array(publicPassProductSchema) }).optional(),
39167
+ passes: publicPassProductCollectionSchema.optional(),
39088
39168
  // listPublicMemberships returns { memberships: [...] }
39089
- memberships: z.object({ memberships: z.array(publicMembershipProductSchema) }).optional()
39169
+ memberships: publicMembershipProductCollectionSchema.optional()
39090
39170
  },
39091
39171
  dataLoaders: {
39092
39172
  // Load passes for display
@@ -40536,13 +40616,6 @@ var systemBlockDefinitionsRaw = [
40536
40616
  weight: "featured",
40537
40617
  bias: "clear",
40538
40618
  surfaces: heroSectionSurfaces
40539
- }),
40540
- layoutProfile({
40541
- variantKey: "splitEditorial",
40542
- family: "split",
40543
- weight: "featured",
40544
- bias: "clear",
40545
- surfaces: heroSectionSurfaces
40546
40619
  })
40547
40620
  ]
40548
40621
  })),
@@ -40786,9 +40859,8 @@ var systemBlockDefinitionsRaw = [
40786
40859
  flow: offeringsFlow,
40787
40860
  layoutProfiles: [
40788
40861
  layoutProfile({ variantKey: "combined", family: "grid", weight: "standard" }),
40862
+ layoutProfile({ variantKey: "calendar", family: "stack", weight: "standard" }),
40789
40863
  layoutProfile({ variantKey: "list", family: "stack", weight: "standard" }),
40790
- layoutProfile({ variantKey: "month", family: "grid", weight: "standard" }),
40791
- layoutProfile({ variantKey: "week", family: "stack", weight: "standard" }),
40792
40864
  layoutProfile({ variantKey: "timetable", family: "stack", weight: "standard" })
40793
40865
  ]
40794
40866
  })),
@@ -41370,10 +41442,7 @@ function normalizeRenderStage(stage) {
41370
41442
  return stage === "preview" ? "preview" : "published";
41371
41443
  }
41372
41444
  function isRouteVisibleInStage(routeEntry, stageInput) {
41373
- const stage = normalizeRenderStage(stageInput);
41374
- if (stage === "preview" || !isRouteRecord(routeEntry)) {
41375
- return true;
41376
- }
41445
+ if (normalizeRenderStage(stageInput) === "preview" || !isRouteRecord(routeEntry)) return true;
41377
41446
  const status = routeEntry.status;
41378
41447
  return !(typeof status === "string" && status !== "published");
41379
41448
  }
@@ -41382,52 +41451,45 @@ function extractRouteHref(candidate, stageInput = "published") {
41382
41451
  const trimmed = candidate.trim();
41383
41452
  return trimmed.length > 0 ? trimmed : null;
41384
41453
  }
41385
- if (!isRouteRecord(candidate)) {
41386
- return null;
41387
- }
41388
- const stage = normalizeRenderStage(stageInput);
41389
- const fields3 = stage === "preview" ? ["draftPath", "path", "href", "url"] : ["path", "href", "url"];
41454
+ if (!isRouteRecord(candidate)) return null;
41455
+ const fields3 = normalizeRenderStage(stageInput) === "preview" ? [
41456
+ "draftPath",
41457
+ "path",
41458
+ "href",
41459
+ "url"
41460
+ ] : [
41461
+ "path",
41462
+ "href",
41463
+ "url"
41464
+ ];
41390
41465
  for (const field of fields3) {
41391
41466
  const value = candidate[field];
41392
- if (typeof value === "string" && value.trim().length > 0) {
41393
- return value.trim();
41394
- }
41467
+ if (typeof value === "string" && value.trim().length > 0) return value.trim();
41395
41468
  }
41396
41469
  return null;
41397
41470
  }
41398
41471
  function extractRouteUpdatedAt(candidate) {
41399
- if (!isRouteRecord(candidate)) {
41400
- return null;
41401
- }
41402
- const fields3 = [
41472
+ if (!isRouteRecord(candidate)) return null;
41473
+ for (const field of [
41403
41474
  "updatedAt",
41404
41475
  "updated_at",
41405
41476
  "publishedAt",
41406
41477
  "published_at",
41407
41478
  "modifiedAt",
41408
41479
  "modified_at"
41409
- ];
41410
- for (const field of fields3) {
41480
+ ]) {
41411
41481
  const value = candidate[field];
41412
- if (typeof value === "string" && value.length > 0) {
41413
- return value;
41414
- }
41482
+ if (typeof value === "string" && value.length > 0) return value;
41415
41483
  }
41416
41484
  return null;
41417
41485
  }
41418
41486
  function resolveRouteTargetForStage(routeIdValue, routes, stageInput) {
41419
41487
  const routeId = typeof routeIdValue === "string" ? routeIdValue : null;
41420
- if (!routeId || !routes) {
41421
- return null;
41422
- }
41488
+ if (!routeId || !routes) return null;
41423
41489
  const routeEntry = routes[routeId];
41424
- if (!isRouteVisibleInStage(routeEntry, stageInput)) {
41425
- return null;
41426
- }
41490
+ if (!isRouteVisibleInStage(routeEntry, stageInput)) return null;
41427
41491
  const href = extractRouteHref(routeEntry, stageInput);
41428
- if (!href) {
41429
- return null;
41430
- }
41492
+ if (!href) return null;
41431
41493
  return {
41432
41494
  routeId,
41433
41495
  href,
@@ -42582,19 +42644,23 @@ function normalizeDashboardOrigin(input) {
42582
42644
  }
42583
42645
  function deriveCmsApiUrlFromDashboardUrl(input) {
42584
42646
  const origin = normalizeDashboardOrigin(input);
42585
- return origin ? `${origin}/api` : "";
42647
+ return origin ? normalizeCmsApiBaseUrl(`${origin}/api`) : "";
42648
+ }
42649
+ function normalizeCmsApiBaseUrl(input) {
42650
+ return input.trim().replace(/\/+$/, "").replace(/(?:\/api)+$/i, "/api");
42586
42651
  }
42587
42652
  function getCmsApiUrl() {
42588
42653
  if (typeof window !== "undefined") {
42589
- return "/api";
42654
+ return normalizeCmsApiBaseUrl("/api");
42590
42655
  }
42591
42656
  const internalUrl = process.env.CMS_API_URL;
42592
42657
  if (internalUrl) {
42593
- return internalUrl.replace(/\/$/, "");
42658
+ return normalizeCmsApiBaseUrl(internalUrl);
42594
42659
  }
42595
42660
  const dashboardUrl = process.env.NEXT_PUBLIC_DASHBOARD_URL;
42596
42661
  if (dashboardUrl) {
42597
- return deriveCmsApiUrlFromDashboardUrl(dashboardUrl);
42662
+ const apiUrl = deriveCmsApiUrlFromDashboardUrl(dashboardUrl);
42663
+ if (apiUrl) return apiUrl;
42598
42664
  }
42599
42665
  throw new Error(
42600
42666
  "CMS_API_URL or NEXT_PUBLIC_DASHBOARD_URL is not configured. Set NEXT_PUBLIC_DASHBOARD_URL to your dashboard URL (e.g., http://localhost:4000)"
@@ -42728,6 +42794,27 @@ function serializeQueryValue(value) {
42728
42794
  if (value instanceof Date) return value.toISOString();
42729
42795
  return null;
42730
42796
  }
42797
+ function normalizeHeaders(source) {
42798
+ const normalized = {};
42799
+ if (!source) return normalized;
42800
+ new Headers(source).forEach((value, key) => {
42801
+ normalized[key] = value;
42802
+ });
42803
+ return normalized;
42804
+ }
42805
+ function buildRequestHeaders(input) {
42806
+ const headers = {
42807
+ ...normalizeHeaders(input.optionsHeaders),
42808
+ ...normalizeHeaders(input.authHeaders)
42809
+ };
42810
+ if (input.sdkVersion) {
42811
+ headers["x-sdk-version"] = input.sdkVersion;
42812
+ }
42813
+ if (input.includeJsonContentType) {
42814
+ headers["Content-Type"] = "application/json";
42815
+ }
42816
+ return headers;
42817
+ }
42731
42818
  function serializePathParam(endpoint, key, value) {
42732
42819
  if (typeof value === "string") {
42733
42820
  return value;
@@ -42863,104 +42950,20 @@ function createRawCMSClient(headers = {}, baseUrl) {
42863
42950
  params,
42864
42951
  options = {}
42865
42952
  }) => {
42866
- const resolvedBaseUrl = baseUrl ?? resolveApiBaseUrl();
42867
- let url = buildEndpointURL(resolvedBaseUrl, endpoint);
42868
- const originalPath = API_ENDPOINTS[endpoint].path;
42869
- const unusedParams = {};
42870
- if (params) {
42871
- Object.entries(params).forEach(([key, value]) => {
42872
- const bracePlaceholder = `{${key}}`;
42873
- const colonPlaceholder = `:${key}`;
42874
- if (originalPath.includes(bracePlaceholder) || originalPath.includes(colonPlaceholder)) {
42875
- const stringValue2 = serializePathParam(endpoint, key, value);
42876
- url = url.replace(bracePlaceholder, stringValue2);
42877
- url = url.replace(colonPlaceholder, stringValue2);
42878
- } else {
42879
- unusedParams[key] = value;
42880
- }
42881
- });
42882
- }
42883
- const unresolvedPathParams = [
42884
- ...url.match(/\{[^}]+\}/g) ?? [],
42885
- ...url.match(/(^|\/):([A-Za-z][A-Za-z0-9_]*)\b/g) ?? []
42886
- ];
42887
- if (unresolvedPathParams.length > 0) {
42888
- const missingParams = Array.from(
42889
- new Set(
42890
- unresolvedPathParams.map((token) => {
42891
- if (token.startsWith("{") && token.endsWith("}")) {
42892
- return token.slice(1, -1);
42893
- }
42894
- return token.replace(/^\//, "").slice(1);
42895
- })
42896
- )
42897
- );
42898
- throw new Error(
42899
- `Missing required path params for endpoint ${String(endpoint)}: ${missingParams.join(", ")}`
42900
- );
42901
- }
42902
- const endpointConfig = API_ENDPOINTS[endpoint];
42903
- const method = endpointConfig.method;
42904
- const isGetOrHead = method === "GET" || method === "HEAD";
42905
- const queryParams = new URLSearchParams();
42906
- Object.entries(unusedParams).forEach(([key, value]) => {
42907
- appendQueryParam(queryParams, key, value);
42953
+ const plan = buildApiRequestPlan({
42954
+ endpoint,
42955
+ body,
42956
+ params,
42957
+ options,
42958
+ headers,
42959
+ baseUrl: normalizeCmsApiBaseUrl(baseUrl ?? resolveApiBaseUrl()),
42960
+ sdkVersion
42908
42961
  });
42909
- if (isGetOrHead && typeof body === "object" && body !== null && !isFormDataBody(body)) {
42910
- Object.entries(body).forEach(([key, value]) => {
42911
- appendQueryParam(queryParams, key, value);
42912
- });
42913
- }
42914
- const queryString = queryParams.toString();
42915
- if (queryString) {
42916
- url += (url.includes("?") ? "&" : "?") + queryString;
42917
- }
42918
- const formDataBody = isFormDataBody(body) ? body : void 0;
42919
- const optionsNext = options?.next;
42920
- const nextOptions = { ...optionsNext ?? {} };
42921
- const cacheIsNoStore = options?.cache === "no-store";
42922
- if (cacheIsNoStore) {
42923
- delete nextOptions.revalidate;
42924
- } else if (isGetOrHead && nextOptions.revalidate === void 0 && "revalidate" in endpointConfig && typeof endpointConfig.revalidate === "number") {
42925
- nextOptions.revalidate = endpointConfig.revalidate;
42926
- }
42927
- if ("tags" in endpointConfig && Array.isArray(endpointConfig.tags)) {
42928
- const processedTags = endpointConfig.tags.map((tag) => {
42929
- let processedTag = tag;
42930
- if (params) {
42931
- Object.entries(params).forEach(([key, value]) => {
42932
- processedTag = processedTag.replace(`{${key}}`, String(value));
42933
- });
42934
- }
42935
- return /\{[^}]+\}/.test(processedTag) ? null : processedTag;
42936
- }).filter((tag) => tag !== null);
42937
- nextOptions.tags = Array.from(/* @__PURE__ */ new Set([...nextOptions.tags ?? [], ...processedTags]));
42938
- }
42939
- const requestInit = {
42940
- method,
42941
- ...options,
42942
- // Include credentials for same-origin requests (sends cookies for auth)
42943
- credentials: "same-origin",
42944
- // Don't include body for GET/HEAD requests
42945
- // FormData is pre-narrowed via isFormDataBody() above
42946
- body: isGetOrHead || body == null ? void 0 : formDataBody ?? JSON.stringify(body),
42947
- headers: {
42948
- ...options.headers,
42949
- ...headers,
42950
- // Include SDK version if set
42951
- ...sdkVersion && { "x-sdk-version": sdkVersion },
42952
- // Don't set Content-Type for GET/HEAD requests without body
42953
- ...isGetOrHead ? {} : formDataBody ? {} : { "Content-Type": "application/json" }
42954
- },
42955
- // Add Next.js caching options
42956
- next: Object.keys(nextOptions).length > 0 ? nextOptions : void 0
42957
- };
42958
- const fetchPromise = fetch(url, requestInit);
42959
- if (!isGetOrHead && "tags" in endpointConfig && Array.isArray(endpointConfig.tags)) {
42960
- const tags2 = endpointConfig.tags.map((tag) => tag);
42962
+ const fetchPromise = fetch(plan.url, plan.init);
42963
+ if (plan.cacheInvalidationTags) {
42961
42964
  return fetchPromise.then((response) => {
42962
42965
  if (response.ok) {
42963
- invalidateCacheTags(tags2, params);
42966
+ invalidateCacheTags(plan.cacheInvalidationTags, params);
42964
42967
  }
42965
42968
  return response;
42966
42969
  });
@@ -42968,6 +42971,100 @@ function createRawCMSClient(headers = {}, baseUrl) {
42968
42971
  return fetchPromise;
42969
42972
  };
42970
42973
  }
42974
+ function buildApiRequestPlan(input) {
42975
+ const { endpoint, body, params, headers = {}, baseUrl } = input;
42976
+ const options = input.options ?? {};
42977
+ let url = buildEndpointURL(baseUrl, endpoint);
42978
+ const originalPath = API_ENDPOINTS[endpoint].path;
42979
+ const unusedParams = {};
42980
+ if (params) {
42981
+ Object.entries(params).forEach(([key, value]) => {
42982
+ const bracePlaceholder = `{${key}}`;
42983
+ const colonPlaceholder = `:${key}`;
42984
+ if (originalPath.includes(bracePlaceholder) || originalPath.includes(colonPlaceholder)) {
42985
+ const stringValue2 = serializePathParam(endpoint, key, value);
42986
+ url = url.replace(bracePlaceholder, stringValue2);
42987
+ url = url.replace(colonPlaceholder, stringValue2);
42988
+ } else {
42989
+ unusedParams[key] = value;
42990
+ }
42991
+ });
42992
+ }
42993
+ const unresolvedPathParams = [
42994
+ ...url.match(/\{[^}]+\}/g) ?? [],
42995
+ ...url.match(/(^|\/):([A-Za-z][A-Za-z0-9_]*)\b/g) ?? []
42996
+ ];
42997
+ if (unresolvedPathParams.length > 0) {
42998
+ const missingParams = Array.from(
42999
+ new Set(
43000
+ unresolvedPathParams.map((token) => {
43001
+ if (token.startsWith("{") && token.endsWith("}")) {
43002
+ return token.slice(1, -1);
43003
+ }
43004
+ return token.replace(/^\//, "").slice(1);
43005
+ })
43006
+ )
43007
+ );
43008
+ throw new Error(
43009
+ `Missing required path params for endpoint ${String(endpoint)}: ${missingParams.join(", ")}`
43010
+ );
43011
+ }
43012
+ const endpointConfig = API_ENDPOINTS[endpoint];
43013
+ const method = endpointConfig.method;
43014
+ const isGetOrHead = method === "GET" || method === "HEAD";
43015
+ const queryParams = new URLSearchParams();
43016
+ Object.entries(unusedParams).forEach(([key, value]) => {
43017
+ appendQueryParam(queryParams, key, value);
43018
+ });
43019
+ if (isGetOrHead && typeof body === "object" && body !== null && !isFormDataBody(body)) {
43020
+ Object.entries(body).forEach(([key, value]) => {
43021
+ appendQueryParam(queryParams, key, value);
43022
+ });
43023
+ }
43024
+ const queryString = queryParams.toString();
43025
+ if (queryString) {
43026
+ url += (url.includes("?") ? "&" : "?") + queryString;
43027
+ }
43028
+ const formDataBody = isFormDataBody(body) ? body : void 0;
43029
+ const optionsNext = options?.next;
43030
+ const nextOptions = { ...optionsNext ?? {} };
43031
+ const cacheIsNoStore = options?.cache === "no-store";
43032
+ if (cacheIsNoStore) {
43033
+ delete nextOptions.revalidate;
43034
+ } else if (isGetOrHead && nextOptions.revalidate === void 0 && "revalidate" in endpointConfig && typeof endpointConfig.revalidate === "number") {
43035
+ nextOptions.revalidate = endpointConfig.revalidate;
43036
+ }
43037
+ if ("tags" in endpointConfig && Array.isArray(endpointConfig.tags)) {
43038
+ const processedTags = endpointConfig.tags.map((tag) => {
43039
+ let processedTag = tag;
43040
+ if (params) {
43041
+ Object.entries(params).forEach(([key, value]) => {
43042
+ processedTag = processedTag.replace(`{${key}}`, String(value));
43043
+ });
43044
+ }
43045
+ return /\{[^}]+\}/.test(processedTag) ? null : processedTag;
43046
+ }).filter((tag) => tag !== null);
43047
+ nextOptions.tags = Array.from(/* @__PURE__ */ new Set([...nextOptions.tags ?? [], ...processedTags]));
43048
+ }
43049
+ const init = {
43050
+ method,
43051
+ ...options,
43052
+ credentials: "same-origin",
43053
+ body: isGetOrHead || body == null ? void 0 : formDataBody ?? JSON.stringify(body),
43054
+ headers: buildRequestHeaders({
43055
+ optionsHeaders: options.headers,
43056
+ authHeaders: headers,
43057
+ sdkVersion: input.sdkVersion,
43058
+ includeJsonContentType: !isGetOrHead && !formDataBody
43059
+ }),
43060
+ ...Object.keys(nextOptions).length > 0 ? { next: nextOptions } : {}
43061
+ };
43062
+ return {
43063
+ url,
43064
+ init,
43065
+ ...!isGetOrHead && "tags" in endpointConfig && Array.isArray(endpointConfig.tags) ? { cacheInvalidationTags: endpointConfig.tags.map((tag) => tag) } : {}
43066
+ };
43067
+ }
42971
43068
  function createParsedClient(rawClient) {
42972
43069
  return async (params) => {
42973
43070
  const response = await rawClient(params);
@@ -43909,8 +44006,8 @@ var TEMPLATE_BINDING_META_PATHS = [
43909
44006
  "createdAt",
43910
44007
  "updatedAt"
43911
44008
  ];
43912
- function describeInvalidTemplateBindingMetaPath(path27) {
43913
- return `Meta path "${path27}" is not valid. Allowed: ${TEMPLATE_BINDING_META_PATHS.join(", ")}`;
44009
+ function describeInvalidTemplateBindingMetaPath(path28) {
44010
+ return `Meta path "${path28}" is not valid. Allowed: ${TEMPLATE_BINDING_META_PATHS.join(", ")}`;
43914
44011
  }
43915
44012
 
43916
44013
  // ../content-model/src/routeTemplate.ts
@@ -43989,6 +44086,25 @@ function splitRouteSegments(routePattern) {
43989
44086
  function isUnsupportedDynamicSegment(segment) {
43990
44087
  return segment.startsWith(":") || segment.includes("{") || segment.includes("}");
43991
44088
  }
44089
+ var defaultContentSchema = z.record(
44090
+ z.string(),
44091
+ z.unknown()
44092
+ );
44093
+ function createSdkEntrySlotBlockInputSchema(contentSchema = defaultContentSchema) {
44094
+ return z.object({
44095
+ identifier: z.string().nullable().optional(),
44096
+ kind: z.string().min(1, "Block kind is required"),
44097
+ content: contentSchema
44098
+ });
44099
+ }
44100
+ function createSdkEntrySlotBlocksInputSchema(contentSchema) {
44101
+ return z.record(
44102
+ z.string(),
44103
+ z.array(createSdkEntrySlotBlockInputSchema(contentSchema))
44104
+ );
44105
+ }
44106
+ createSdkEntrySlotBlockInputSchema();
44107
+ var sdkEntrySlotBlocksInputSchema = createSdkEntrySlotBlocksInputSchema();
43992
44108
 
43993
44109
  // src/contracts/bindings.ts
43994
44110
  var BINDING_TRANSFORMS = {
@@ -44299,7 +44415,7 @@ var contentConfigSchema = contentConfigBaseSchema.superRefine((data, ctx) => {
44299
44415
  });
44300
44416
  }
44301
44417
  const paths = data.pages.map((p) => p.path);
44302
- const duplicatePaths = paths.filter((path27, i) => paths.indexOf(path27) !== i);
44418
+ const duplicatePaths = paths.filter((path28, i) => paths.indexOf(path28) !== i);
44303
44419
  if (duplicatePaths.length > 0) {
44304
44420
  ctx.addIssue({
44305
44421
  code: z.ZodIssueCode.custom,
@@ -44356,18 +44472,18 @@ function validateLayoutNodeTypes(layout) {
44356
44472
  errors
44357
44473
  };
44358
44474
  }
44359
- function validateNodeTypesRecursive(node, path27, errors) {
44475
+ function validateNodeTypesRecursive(node, path28, errors) {
44360
44476
  if (!ALLOWED_NODE_TYPES_SET.has(node.type)) {
44361
44477
  errors.push({
44362
- path: `${path27}.type`,
44478
+ path: `${path28}.type`,
44363
44479
  type: "invalid_node_type",
44364
44480
  value: node.type,
44365
- message: `Unknown node type "${node.type}" at ${path27}. Valid types: section, stack, text, etc.`
44481
+ message: `Unknown node type "${node.type}" at ${path28}. Valid types: section, stack, text, etc.`
44366
44482
  });
44367
44483
  }
44368
44484
  if (node.children && Array.isArray(node.children)) {
44369
44485
  node.children.forEach((child, index) => {
44370
- validateNodeTypesRecursive(child, `${path27}.children[${index}]`, errors);
44486
+ validateNodeTypesRecursive(child, `${path28}.children[${index}]`, errors);
44371
44487
  });
44372
44488
  }
44373
44489
  }
@@ -44379,45 +44495,45 @@ function validateTransformIds(layout) {
44379
44495
  errors
44380
44496
  };
44381
44497
  }
44382
- function validateTransformIdsRecursive(node, path27, errors) {
44498
+ function validateTransformIdsRecursive(node, path28, errors) {
44383
44499
  if (node.$bind?.transforms && Array.isArray(node.$bind.transforms)) {
44384
- validateTransformList(node.$bind.transforms, `${path27}.$bind.transforms`, errors);
44500
+ validateTransformList(node.$bind.transforms, `${path28}.$bind.transforms`, errors);
44385
44501
  }
44386
44502
  if (node.$repeat?.collection?.transforms && Array.isArray(node.$repeat.collection.transforms)) {
44387
- validateTransformList(node.$repeat.collection.transforms, `${path27}.$repeat.collection.transforms`, errors);
44503
+ validateTransformList(node.$repeat.collection.transforms, `${path28}.$repeat.collection.transforms`, errors);
44388
44504
  }
44389
44505
  if (node.$when?.when?.transforms && Array.isArray(node.$when.when.transforms)) {
44390
- validateTransformList(node.$when.when.transforms, `${path27}.$when.when.transforms`, errors);
44506
+ validateTransformList(node.$when.when.transforms, `${path28}.$when.when.transforms`, errors);
44391
44507
  }
44392
44508
  if (node.$scopes && Array.isArray(node.$scopes)) {
44393
44509
  node.$scopes.forEach((scope, index) => {
44394
44510
  if (scope.from?.transforms && Array.isArray(scope.from.transforms)) {
44395
- validateTransformList(scope.from.transforms, `${path27}.$scopes[${index}].from.transforms`, errors);
44511
+ validateTransformList(scope.from.transforms, `${path28}.$scopes[${index}].from.transforms`, errors);
44396
44512
  }
44397
44513
  });
44398
44514
  }
44399
44515
  if (node.props) {
44400
- validatePropsTransforms(node.props, `${path27}.props`, errors);
44516
+ validatePropsTransforms(node.props, `${path28}.props`, errors);
44401
44517
  }
44402
44518
  if (node.children && Array.isArray(node.children)) {
44403
44519
  node.children.forEach((child, index) => {
44404
- validateTransformIdsRecursive(child, `${path27}.children[${index}]`, errors);
44520
+ validateTransformIdsRecursive(child, `${path28}.children[${index}]`, errors);
44405
44521
  });
44406
44522
  }
44407
44523
  }
44408
- function validateTransformList(transforms, path27, errors) {
44524
+ function validateTransformList(transforms, path28, errors) {
44409
44525
  transforms.forEach((transform, index) => {
44410
44526
  if (!ALLOWED_TRANSFORM_IDS_SET.has(transform.id)) {
44411
44527
  errors.push({
44412
- path: `${path27}[${index}].id`,
44528
+ path: `${path28}[${index}].id`,
44413
44529
  type: "invalid_transform_id",
44414
44530
  value: transform.id,
44415
- message: `Unknown transform "${transform.id}" at ${path27}. Valid transforms: string.uppercase, value.fallback, etc.`
44531
+ message: `Unknown transform "${transform.id}" at ${path28}. Valid transforms: string.uppercase, value.fallback, etc.`
44416
44532
  });
44417
44533
  }
44418
44534
  });
44419
44535
  }
44420
- function validatePropsTransforms(props2, path27, errors) {
44536
+ function validatePropsTransforms(props2, path28, errors) {
44421
44537
  for (const [key, value] of Object.entries(props2)) {
44422
44538
  if (isBindingObject(value)) {
44423
44539
  const binding = value;
@@ -44425,16 +44541,16 @@ function validatePropsTransforms(props2, path27, errors) {
44425
44541
  binding.$bind.transforms.forEach((transform, index) => {
44426
44542
  if (!ALLOWED_TRANSFORM_IDS_SET.has(transform.id)) {
44427
44543
  errors.push({
44428
- path: `${path27}.${key}.$bind.transforms[${index}].id`,
44544
+ path: `${path28}.${key}.$bind.transforms[${index}].id`,
44429
44545
  type: "invalid_transform_id",
44430
44546
  value: transform.id,
44431
- message: `Unknown transform "${transform.id}" at ${path27}.${key}. Valid transforms: string.uppercase, value.fallback, etc.`
44547
+ message: `Unknown transform "${transform.id}" at ${path28}.${key}. Valid transforms: string.uppercase, value.fallback, etc.`
44432
44548
  });
44433
44549
  }
44434
44550
  });
44435
44551
  }
44436
44552
  } else if (value && typeof value === "object" && !Array.isArray(value)) {
44437
- validatePropsTransforms(value, `${path27}.${key}`, errors);
44553
+ validatePropsTransforms(value, `${path28}.${key}`, errors);
44438
44554
  }
44439
44555
  }
44440
44556
  }
@@ -44964,8 +45080,8 @@ async function readApiResponse(response, requestInfo, options = {}) {
44964
45080
  function createHttpClient(config2) {
44965
45081
  const baseUrl = `${config2.dashboardUrl}/api/sdk/${config2.siteId}`;
44966
45082
  const timeout = config2.timeout ?? 3e4;
44967
- async function request(method, path27, options) {
44968
- let url = `${baseUrl}${path27}`;
45083
+ async function request(method, path28, options) {
45084
+ let url = `${baseUrl}${path28}`;
44969
45085
  if (options?.params && Object.keys(options.params).length > 0) {
44970
45086
  const searchParams = new URLSearchParams(options.params);
44971
45087
  url = `${url}?${searchParams.toString()}`;
@@ -44988,7 +45104,7 @@ function createHttpClient(config2) {
44988
45104
  } catch (error) {
44989
45105
  const requestInfo2 = buildRequestInfo({
44990
45106
  method,
44991
- path: path27,
45107
+ path: path28,
44992
45108
  url,
44993
45109
  baseUrl,
44994
45110
  dashboardUrl: config2.dashboardUrl,
@@ -45013,7 +45129,7 @@ function createHttpClient(config2) {
45013
45129
  }
45014
45130
  const requestInfo = buildRequestInfo({
45015
45131
  method,
45016
- path: path27,
45132
+ path: path28,
45017
45133
  url,
45018
45134
  baseUrl,
45019
45135
  dashboardUrl: config2.dashboardUrl,
@@ -45043,17 +45159,17 @@ function createHttpClient(config2) {
45043
45159
  return json.data;
45044
45160
  }
45045
45161
  return {
45046
- async get(path27, params) {
45047
- return request("GET", path27, { params });
45162
+ async get(path28, params) {
45163
+ return request("GET", path28, { params });
45048
45164
  },
45049
- async post(path27, body) {
45050
- return request("POST", path27, { body });
45165
+ async post(path28, body) {
45166
+ return request("POST", path28, { body });
45051
45167
  },
45052
- async patch(path27, body) {
45053
- return request("PATCH", path27, { body });
45168
+ async patch(path28, body) {
45169
+ return request("PATCH", path28, { body });
45054
45170
  },
45055
- async delete(path27, body) {
45056
- await request("DELETE", path27, { body });
45171
+ async delete(path28, body) {
45172
+ await request("DELETE", path28, { body });
45057
45173
  }
45058
45174
  };
45059
45175
  }
@@ -46498,12 +46614,12 @@ function collectPushConfigSyncWarnings(sync) {
46498
46614
  async function pushToDashboard(output, dashboardUrl, siteId, apiKey, config2, options) {
46499
46615
  const normalizedDashboardUrl = dashboardUrl.replace(/\/+$/, "");
46500
46616
  const baseUrl = `${normalizedDashboardUrl}/api`;
46501
- const path27 = `/sites/${siteId}/sdk-config`;
46502
- const pushUrl = `${baseUrl}${path27}`;
46617
+ const path28 = `/sites/${siteId}/sdk-config`;
46618
+ const pushUrl = `${baseUrl}${path28}`;
46503
46619
  output.info(`Pushing config to ${pushUrl}...`);
46504
46620
  const requestInfo = {
46505
46621
  method: "POST",
46506
- path: path27,
46622
+ path: path28,
46507
46623
  url: pushUrl,
46508
46624
  baseUrl,
46509
46625
  dashboardUrl: normalizedDashboardUrl,
@@ -47307,6 +47423,7 @@ function toWritableLocalEvent(event) {
47307
47423
  identifier: event.identifier,
47308
47424
  title: event.title,
47309
47425
  slug: event.slug,
47426
+ path: event.path,
47310
47427
  status: event.status,
47311
47428
  visibility: event.visibility,
47312
47429
  schedule: event.schedule,
@@ -47319,7 +47436,8 @@ function toWritableLocalEvent(event) {
47319
47436
  formRef: event.formRef,
47320
47437
  settings: event.settings,
47321
47438
  presentation: event.presentation,
47322
- tags: event.tags
47439
+ tags: event.tags,
47440
+ blocks: event.blocks
47323
47441
  };
47324
47442
  }
47325
47443
  async function writeCourses(contentDir, pulledCourses, options) {
@@ -47708,13 +47826,16 @@ async function readEventCategories(contentDir) {
47708
47826
  return categories;
47709
47827
  }
47710
47828
  async function readEvents(contentDir) {
47829
+ return (await readEventsWithFilePaths(contentDir)).map(({ filePath: _filePath, ...event }) => event);
47830
+ }
47831
+ async function readEventsWithFilePaths(contentDir) {
47711
47832
  const eventsDir = path5.join(contentDir, "events");
47712
47833
  const events = [];
47713
47834
  const files = await listFiles(eventsDir, ".json");
47714
47835
  for (const filePath of files) {
47715
47836
  try {
47716
47837
  const event = await readJsonFile(filePath);
47717
- events.push(event);
47838
+ events.push({ ...event, filePath });
47718
47839
  } catch (error) {
47719
47840
  console.warn(`Warning: Could not parse ${filePath}:`, error);
47720
47841
  }
@@ -49377,11 +49498,11 @@ function findChangedFields(local, remote, prefix = "") {
49377
49498
  const changes = [];
49378
49499
  const allKeys = /* @__PURE__ */ new Set([...Object.keys(local), ...Object.keys(remote)]);
49379
49500
  for (const key of allKeys) {
49380
- const path27 = prefix ? `${prefix}.${key}` : key;
49501
+ const path28 = prefix ? `${prefix}.${key}` : key;
49381
49502
  const localVal = local[key];
49382
49503
  const remoteVal = remote[key];
49383
49504
  if (!equal(localVal, remoteVal)) {
49384
- changes.push(path27);
49505
+ changes.push(path28);
49385
49506
  }
49386
49507
  }
49387
49508
  return changes;
@@ -50451,11 +50572,11 @@ function findChangedFieldsWithValues(local, remote, prefix = "") {
50451
50572
  const changes = [];
50452
50573
  const allKeys = /* @__PURE__ */ new Set([...Object.keys(local), ...Object.keys(remote)]);
50453
50574
  for (const key of allKeys) {
50454
- const path27 = prefix ? `${prefix}.${key}` : key;
50575
+ const path28 = prefix ? `${prefix}.${key}` : key;
50455
50576
  const localVal = local[key];
50456
50577
  const remoteVal = remote[key];
50457
50578
  if (!equal(localVal, remoteVal)) {
50458
- changes.push({ path: path27, before: remoteVal, after: localVal });
50579
+ changes.push({ path: path28, before: remoteVal, after: localVal });
50459
50580
  }
50460
50581
  }
50461
50582
  return changes;
@@ -50872,6 +50993,19 @@ function maskPullDiffForScope(diff, pullScope) {
50872
50993
  }
50873
50994
  return diff;
50874
50995
  }
50996
+
50997
+ // src/cli/commands/pull-dated-offering-scope.ts
50998
+ function isDatedOfferingPullScope(scope) {
50999
+ return scope === "venues" || scope === "event-categories" || scope === "events" || scope === "courses";
51000
+ }
51001
+ function filterPullItemsByIdentifier(items, identifier, getIdentifier) {
51002
+ return identifier ? items.filter((item) => getIdentifier(item) === identifier) : [...items];
51003
+ }
51004
+ function reportMissingScopedPullItem(input) {
51005
+ if (!input.identifier || input.found) return false;
51006
+ input.output.error(`${input.scope} item not found: ${input.identifier}`);
51007
+ return true;
51008
+ }
50875
51009
  var CANONICAL_EVENT_ENTRY_TYPE = "event";
50876
51010
  var EVENT_MIGRATION_COMMAND = "riverbankcms migrate events";
50877
51011
  var EVENT_PUSH_COMMAND = "riverbankcms push events";
@@ -51170,7 +51304,8 @@ function mapRemoteEventToLocalComparable(e) {
51170
51304
  formRef: e.formRef,
51171
51305
  settings: e.settings,
51172
51306
  presentation: e.presentation,
51173
- tags: e.tags
51307
+ tags: e.tags,
51308
+ blocks: e.blocks
51174
51309
  };
51175
51310
  }
51176
51311
  function mapLocalEventToComparable(e) {
@@ -51189,7 +51324,8 @@ function mapLocalEventToComparable(e) {
51189
51324
  formRef: e.formRef,
51190
51325
  settings: e.settings,
51191
51326
  presentation: e.presentation,
51192
- tags: e.tags
51327
+ tags: e.tags,
51328
+ blocks: e.blocks
51193
51329
  };
51194
51330
  }
51195
51331
  function mapRemoteCourseToLocalComparable(course) {
@@ -51501,7 +51637,7 @@ async function warnForLocalLegacyEventEntries(input) {
51501
51637
  formatLegacyEventEntryWarning(legacyEventEntryFiles)
51502
51638
  );
51503
51639
  }
51504
- var pullCommand = new Command("pull").description("Pull content from CMS").argument("[scope]", "What to pull: entries, pages, navigation, settings, forms, theme, footer, venues, event-categories, events, courses, or all (default)").argument("[type]", "Content type (entries) or page identifier (pages)").argument("[identifier]", 'Entry identifier (when scope is "entries" and type is set)').option("--output <dir>", "Output directory", "./content").option("--force", "Overwrite existing files without prompting").option("--yes", "Skip confirmation prompt (same as --force)").option("--sync-media", "Sync media files from source to target environment").option("--overwrite-media", "When using --sync-media, overwrite target media on checksum mismatch").option("--local-media", "Download media referenced by identifiers to content/media").option("--dry-run", "Show what would be pulled without writing files").option("--json-diff [mode]", "Output diff as JSON (summary or full)", "summary").option("--with-theme", "Also pull theme when pulling all content").option("--name <name>", "Theme name for theme pull / --with-theme (default: current)").option("--no-meta", "Skip writing .meta/ and media manifest files (content files still written)").option("--diff", "Show human-readable field-level diff with before/after values (requires --dry-run)").addHelpText("after", `
51640
+ var pullCommand = new Command("pull").description("Pull content from CMS").argument("[scope]", "What to pull: entries, pages, navigation, settings, forms, theme, footer, venues, event-categories, events, courses, or all (default)").argument("[type]", "Content type (entries) or item identifier (pages, venues, event-categories, events, courses)").argument("[identifier]", 'Entry identifier (when scope is "entries" and type is set)').option("--output <dir>", "Output directory", "./content").option("--force", "Overwrite existing files without prompting").option("--yes", "Skip confirmation prompt (same as --force)").option("--sync-media", "Sync media files from source to target environment").option("--overwrite-media", "When using --sync-media, overwrite target media on checksum mismatch").option("--local-media", "Download media referenced by identifiers to content/media").option("--dry-run", "Show what would be pulled without writing files").option("--json-diff [mode]", "Output diff as JSON (summary or full)", "summary").option("--with-theme", "Also pull theme when pulling all content").option("--name <name>", "Theme name for theme pull / --with-theme (default: current)").option("--no-meta", "Skip writing .meta/ and media manifest files (content files still written)").option("--diff", "Show human-readable field-level diff with before/after values (requires --dry-run)").addHelpText("after", `
51505
51641
  Examples:
51506
51642
  $ riverbankcms pull # Pull all content
51507
51643
  $ riverbankcms pull --dry-run # Preview what would be pulled
@@ -51520,7 +51656,9 @@ Examples:
51520
51656
  $ riverbankcms pull venues # Pull venues
51521
51657
  $ riverbankcms pull event-categories # Pull event categories
51522
51658
  $ riverbankcms pull events # Pull events
51659
+ $ riverbankcms pull events the-whole-in-your-heart # Pull a specific event
51523
51660
  $ riverbankcms pull courses # Pull courses
51661
+ $ riverbankcms pull courses beginners # Pull a specific course
51524
51662
  $ riverbankcms pull theme # Pull theme to content/themes/current.json
51525
51663
  $ riverbankcms pull theme --name=neon # Pull theme to content/themes/neon.json
51526
51664
  $ riverbankcms pull --output ./src/content # Custom output directory
@@ -51588,7 +51726,7 @@ Media Sync:
51588
51726
  const resolvedJsonDiffMode = jsonDiffMode ?? (options.jsonDiff === true ? "summary" : void 0);
51589
51727
  if (identifier && pullScope2 !== "entries") {
51590
51728
  output.error("An item identifier is only supported for entries pulls", {
51591
- suggestion: 'Use "riverbankcms pull pages <page-identifier>" for a single page.'
51729
+ suggestion: 'Use "riverbankcms pull events <event-identifier>" or "riverbankcms pull pages <page-identifier>" with the identifier as the second argument.'
51592
51730
  });
51593
51731
  return;
51594
51732
  }
@@ -51732,17 +51870,23 @@ Media Sync:
51732
51870
  }
51733
51871
  process.exitCode = 1;
51734
51872
  };
51735
- if (pullScope2 === "venues" || pullScope2 === "event-categories" || pullScope2 === "events" || pullScope2 === "courses") {
51873
+ if (isDatedOfferingPullScope(pullScope2)) {
51736
51874
  const hasLocal = await contentDirExists(contentDir);
51737
51875
  const label = pullScope2 === "venues" ? "Venues" : pullScope2 === "event-categories" ? "Event Categories" : pullScope2 === "events" ? "Events" : "Courses";
51738
51876
  if (pullScope2 === "venues") {
51739
51877
  const result = await client.pull.venues();
51878
+ if (reportMissingScopedPullItem({
51879
+ output,
51880
+ scope: pullScope2,
51881
+ identifier: type,
51882
+ found: result.venues.some((venue) => venue.slug === type)
51883
+ })) return;
51740
51884
  const local = hasLocal ? await readVenues(contentDir) : [];
51741
51885
  await handleDryRunKeyedArrayScope({
51742
51886
  scope: "venues",
51743
51887
  label,
51744
- remoteItems: result.venues,
51745
- localItems: local,
51888
+ remoteItems: filterPullItemsByIdentifier(result.venues, type, (venue) => venue.slug),
51889
+ localItems: filterPullItemsByIdentifier(local, type, (venue) => venue.slug),
51746
51890
  getRemoteId: (v) => v.slug,
51747
51891
  getLocalId: (v) => v.slug,
51748
51892
  remoteToComparable: mapRemoteVenueToLocalComparable,
@@ -51752,12 +51896,18 @@ Media Sync:
51752
51896
  }
51753
51897
  if (pullScope2 === "event-categories") {
51754
51898
  const result = await client.pull.eventCategories();
51899
+ if (reportMissingScopedPullItem({
51900
+ output,
51901
+ scope: pullScope2,
51902
+ identifier: type,
51903
+ found: result.eventCategories.some((category) => category.identifier === type)
51904
+ })) return;
51755
51905
  const local = hasLocal ? await readEventCategories(contentDir) : [];
51756
51906
  await handleDryRunKeyedArrayScope({
51757
51907
  scope: "event-categories",
51758
51908
  label,
51759
- remoteItems: result.eventCategories,
51760
- localItems: local,
51909
+ remoteItems: filterPullItemsByIdentifier(result.eventCategories, type, (category) => category.identifier),
51910
+ localItems: filterPullItemsByIdentifier(local, type, (category) => category.identifier),
51761
51911
  getRemoteId: (c) => c.identifier,
51762
51912
  getLocalId: (c) => c.identifier,
51763
51913
  remoteToComparable: mapRemoteEventCategoryToLocalComparable,
@@ -51767,12 +51917,18 @@ Media Sync:
51767
51917
  }
51768
51918
  if (pullScope2 === "courses") {
51769
51919
  const result = await client.pull.courses();
51920
+ if (reportMissingScopedPullItem({
51921
+ output,
51922
+ scope: pullScope2,
51923
+ identifier: type,
51924
+ found: result.courses.some((course) => course.identifier === type)
51925
+ })) return;
51770
51926
  const local = hasLocal ? await readCourses(contentDir) : [];
51771
51927
  await handleDryRunKeyedArrayScope({
51772
51928
  scope: "courses",
51773
51929
  label,
51774
- remoteItems: result.courses,
51775
- localItems: local,
51930
+ remoteItems: filterPullItemsByIdentifier(result.courses, type, (course) => course.identifier),
51931
+ localItems: filterPullItemsByIdentifier(local, type, (course) => course.identifier),
51776
51932
  getRemoteId: (course) => course.identifier,
51777
51933
  getLocalId: (course) => course.identifier,
51778
51934
  remoteToComparable: mapRemoteCourseToLocalComparable,
@@ -51782,12 +51938,18 @@ Media Sync:
51782
51938
  }
51783
51939
  {
51784
51940
  const result = await client.pull.events();
51941
+ if (reportMissingScopedPullItem({
51942
+ output,
51943
+ scope: pullScope2,
51944
+ identifier: type,
51945
+ found: result.events.some((event) => event.identifier === type)
51946
+ })) return;
51785
51947
  const local = hasLocal ? await readEvents(contentDir) : [];
51786
51948
  await handleDryRunKeyedArrayScope({
51787
51949
  scope: "events",
51788
51950
  label,
51789
- remoteItems: result.events,
51790
- localItems: local,
51951
+ remoteItems: filterPullItemsByIdentifier(result.events, type, (event) => event.identifier),
51952
+ localItems: filterPullItemsByIdentifier(local, type, (event) => event.identifier),
51791
51953
  getRemoteId: (e) => e.identifier,
51792
51954
  getLocalId: (e) => e.identifier,
51793
51955
  remoteToComparable: mapRemoteEventToLocalComparable,
@@ -51956,7 +52118,7 @@ Media Sync:
51956
52118
  const dirExists = await contentDirExists(contentDir);
51957
52119
  if (identifier && pullScope !== "entries") {
51958
52120
  output.error("An item identifier is only supported for entries pulls", {
51959
- suggestion: 'Use "riverbankcms pull pages <page-identifier>" for a single page.'
52121
+ suggestion: 'Use "riverbankcms pull events <event-identifier>" or "riverbankcms pull pages <page-identifier>" with the identifier as the second argument.'
51960
52122
  });
51961
52123
  return;
51962
52124
  }
@@ -52186,8 +52348,15 @@ Media Sync:
52186
52348
  break;
52187
52349
  }
52188
52350
  case "venues": {
52189
- output.info("Pulling venues");
52351
+ output.info(`Pulling venues${type ? ` ${type}` : ""}`);
52190
52352
  const result = await client.pull.venues();
52353
+ if (reportMissingScopedPullItem({
52354
+ output,
52355
+ scope: "venues",
52356
+ identifier: type,
52357
+ found: result.venues.some((venue) => venue.slug === type)
52358
+ })) return;
52359
+ result.venues = filterPullItemsByIdentifier(result.venues, type, (venue) => venue.slug);
52191
52360
  const mediaContent = createScopedPullContent(result.meta, { venues: result.venues });
52192
52361
  await applyMediaIdentifiers(mediaContent);
52193
52362
  await syncMediaIfRequested(mediaContent);
@@ -52196,8 +52365,15 @@ Media Sync:
52196
52365
  break;
52197
52366
  }
52198
52367
  case "event-categories": {
52199
- output.info("Pulling event categories");
52368
+ output.info(`Pulling event categories${type ? ` ${type}` : ""}`);
52200
52369
  const result = await client.pull.eventCategories();
52370
+ if (reportMissingScopedPullItem({
52371
+ output,
52372
+ scope: "event-categories",
52373
+ identifier: type,
52374
+ found: result.eventCategories.some((category) => category.identifier === type)
52375
+ })) return;
52376
+ result.eventCategories = filterPullItemsByIdentifier(result.eventCategories, type, (category) => category.identifier);
52201
52377
  const mediaContent = createScopedPullContent(result.meta, { eventCategories: result.eventCategories });
52202
52378
  await applyMediaIdentifiers(mediaContent);
52203
52379
  await syncMediaIfRequested(mediaContent);
@@ -52206,8 +52382,15 @@ Media Sync:
52206
52382
  break;
52207
52383
  }
52208
52384
  case "events": {
52209
- output.info("Pulling events");
52385
+ output.info(`Pulling events${type ? ` ${type}` : ""}`);
52210
52386
  const result = await client.pull.events();
52387
+ if (reportMissingScopedPullItem({
52388
+ output,
52389
+ scope: "events",
52390
+ identifier: type,
52391
+ found: result.events.some((event) => event.identifier === type)
52392
+ })) return;
52393
+ result.events = filterPullItemsByIdentifier(result.events, type, (event) => event.identifier);
52211
52394
  const mediaContent = createScopedPullContent(result.meta, { events: result.events });
52212
52395
  await applyMediaIdentifiers(mediaContent);
52213
52396
  await syncMediaIfRequested(mediaContent);
@@ -52217,8 +52400,15 @@ Media Sync:
52217
52400
  break;
52218
52401
  }
52219
52402
  case "courses": {
52220
- output.info("Pulling courses");
52403
+ output.info(`Pulling courses${type ? ` ${type}` : ""}`);
52221
52404
  const result = await client.pull.courses();
52405
+ if (reportMissingScopedPullItem({
52406
+ output,
52407
+ scope: "courses",
52408
+ identifier: type,
52409
+ found: result.courses.some((course) => course.identifier === type)
52410
+ })) return;
52411
+ result.courses = filterPullItemsByIdentifier(result.courses, type, (course) => course.identifier);
52222
52412
  const mediaContent = createScopedPullContent(result.meta, { courses: result.courses });
52223
52413
  await applyMediaIdentifiers(mediaContent);
52224
52414
  await syncMediaIfRequested(mediaContent);
@@ -52612,8 +52802,8 @@ function normalizeLocalContentShape(content) {
52612
52802
  var identifierRegex = /^[a-z0-9][a-z0-9-]*$/;
52613
52803
  var currencyRegex = /^[A-Z]{3}$/;
52614
52804
  var isoDateTimeRegex = /^\d{4}-\d{2}-\d{2}T.+/;
52615
- function issue2(path27, message) {
52616
- return { path: path27, message };
52805
+ function issue2(path28, message) {
52806
+ return { path: path28, message };
52617
52807
  }
52618
52808
  function isRecord15(value) {
52619
52809
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -52630,27 +52820,27 @@ function isWholeMinuteIsoDateTime(value) {
52630
52820
  return Number.isFinite(epochMs) && epochMs % 6e4 === 0;
52631
52821
  }
52632
52822
  function validateTicketType(raw, index, currency) {
52633
- const path27 = ["ticketTypes", String(index)];
52634
- if (!isRecord15(raw)) return [issue2(path27, "Ticket type must be an object")];
52823
+ const path28 = ["ticketTypes", String(index)];
52824
+ if (!isRecord15(raw)) return [issue2(path28, "Ticket type must be an object")];
52635
52825
  const issues = [];
52636
52826
  const identifier = raw.identifier;
52637
52827
  if (typeof identifier !== "string" || !identifierRegex.test(identifier)) {
52638
52828
  issues.push(
52639
52829
  issue2(
52640
- [...path27, "identifier"],
52830
+ [...path28, "identifier"],
52641
52831
  "Ticket identifier must use lowercase letters, numbers, and hyphens"
52642
52832
  )
52643
52833
  );
52644
52834
  }
52645
52835
  const name = raw.name;
52646
52836
  if (typeof name !== "string" || name.trim().length === 0) {
52647
- issues.push(issue2([...path27, "name"], "Ticket name is required"));
52837
+ issues.push(issue2([...path28, "name"], "Ticket name is required"));
52648
52838
  }
52649
52839
  const priceAmount = raw.priceAmount;
52650
52840
  if (!isWholeNumber(priceAmount) || priceAmount < 0) {
52651
52841
  issues.push(
52652
52842
  issue2(
52653
- [...path27, "priceAmount"],
52843
+ [...path28, "priceAmount"],
52654
52844
  "Ticket priceAmount must be a non-negative integer"
52655
52845
  )
52656
52846
  );
@@ -52659,7 +52849,7 @@ function validateTicketType(raw, index, currency) {
52659
52849
  if (priceCurrency !== void 0 && priceCurrency !== null && priceCurrency !== currency) {
52660
52850
  issues.push(
52661
52851
  issue2(
52662
- [...path27, "priceCurrency"],
52852
+ [...path28, "priceCurrency"],
52663
52853
  "Ticket priceCurrency must match pricing.priceCurrency"
52664
52854
  )
52665
52855
  );
@@ -52668,7 +52858,7 @@ function validateTicketType(raw, index, currency) {
52668
52858
  if (sortOrder !== void 0 && (!isWholeNumber(sortOrder) || sortOrder < 0)) {
52669
52859
  issues.push(
52670
52860
  issue2(
52671
- [...path27, "sortOrder"],
52861
+ [...path28, "sortOrder"],
52672
52862
  "Ticket sortOrder must be a non-negative integer"
52673
52863
  )
52674
52864
  );
@@ -52677,7 +52867,7 @@ function validateTicketType(raw, index, currency) {
52677
52867
  if (capacityLimit2 !== void 0 && capacityLimit2 !== null && (!isWholeNumber(capacityLimit2) || capacityLimit2 < 1)) {
52678
52868
  issues.push(
52679
52869
  issue2(
52680
- [...path27, "capacityLimit"],
52870
+ [...path28, "capacityLimit"],
52681
52871
  "Ticket capacityLimit must be a positive integer"
52682
52872
  )
52683
52873
  );
@@ -52686,7 +52876,7 @@ function validateTicketType(raw, index, currency) {
52686
52876
  if (attendanceScope !== void 0 && attendanceScope !== "in_person" && attendanceScope !== "online" && attendanceScope !== "both") {
52687
52877
  issues.push(
52688
52878
  issue2(
52689
- [...path27, "attendanceScope"],
52879
+ [...path28, "attendanceScope"],
52690
52880
  "Ticket attendanceScope must be in_person, online, or both"
52691
52881
  )
52692
52882
  );
@@ -52695,7 +52885,7 @@ function validateTicketType(raw, index, currency) {
52695
52885
  if (saleStartsAt !== void 0 && saleStartsAt !== null && (typeof saleStartsAt !== "string" || !isWholeMinuteIsoDateTime(saleStartsAt))) {
52696
52886
  issues.push(
52697
52887
  issue2(
52698
- [...path27, "saleStartsAt"],
52888
+ [...path28, "saleStartsAt"],
52699
52889
  "Ticket saleStartsAt must be an ISO datetime aligned to a whole minute"
52700
52890
  )
52701
52891
  );
@@ -52704,7 +52894,7 @@ function validateTicketType(raw, index, currency) {
52704
52894
  if (saleEndsAt !== void 0 && saleEndsAt !== null && (typeof saleEndsAt !== "string" || !isWholeMinuteIsoDateTime(saleEndsAt))) {
52705
52895
  issues.push(
52706
52896
  issue2(
52707
- [...path27, "saleEndsAt"],
52897
+ [...path28, "saleEndsAt"],
52708
52898
  "Ticket saleEndsAt must be an ISO datetime aligned to a whole minute"
52709
52899
  )
52710
52900
  );
@@ -52712,7 +52902,7 @@ function validateTicketType(raw, index, currency) {
52712
52902
  if (typeof saleStartsAt === "string" && typeof saleEndsAt === "string" && Date.parse(saleEndsAt) <= Date.parse(saleStartsAt)) {
52713
52903
  issues.push(
52714
52904
  issue2(
52715
- [...path27, "saleEndsAt"],
52905
+ [...path28, "saleEndsAt"],
52716
52906
  "Ticket saleEndsAt must be after saleStartsAt"
52717
52907
  )
52718
52908
  );
@@ -52721,7 +52911,7 @@ function validateTicketType(raw, index, currency) {
52721
52911
  if (cmsTicketTypeId !== void 0 && cmsTicketTypeId !== null && (typeof cmsTicketTypeId !== "string" || cmsTicketTypeId.length === 0)) {
52722
52912
  issues.push(
52723
52913
  issue2(
52724
- [...path27, "cmsTicketTypeId"],
52914
+ [...path28, "cmsTicketTypeId"],
52725
52915
  "Ticket cmsTicketTypeId must be a non-empty string"
52726
52916
  )
52727
52917
  );
@@ -52905,8 +53095,8 @@ var supportedKinds = /* @__PURE__ */ new Set([
52905
53095
  "deferred_manual",
52906
53096
  "flexible_balance"
52907
53097
  ]);
52908
- function issue3(path27, message) {
52909
- return { path: path27, message };
53098
+ function issue3(path28, message) {
53099
+ return { path: path28, message };
52910
53100
  }
52911
53101
  function isRecord16(value) {
52912
53102
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -52923,15 +53113,15 @@ function isDepositRefundability(value) {
52923
53113
  function isSupportedOptionKind(value) {
52924
53114
  return typeof value === "string" && supportedKinds.has(value);
52925
53115
  }
52926
- function validateFlexibleBalanceDueDateRule(raw, path27) {
53116
+ function validateFlexibleBalanceDueDateRule(raw, path28) {
52927
53117
  if (!isRecord16(raw)) {
52928
- return [issue3(path27, "Flexible balance dueDateRule must be an object")];
53118
+ return [issue3(path28, "Flexible balance dueDateRule must be an object")];
52929
53119
  }
52930
53120
  if (raw.kind === "relative_to_start_date") {
52931
53121
  if (!isPositiveWholeNumber(raw.daysBeforeStart)) {
52932
53122
  return [
52933
53123
  issue3(
52934
- [...path27, "daysBeforeStart"],
53124
+ [...path28, "daysBeforeStart"],
52935
53125
  "Flexible balance daysBeforeStart must be a positive integer"
52936
53126
  )
52937
53127
  ];
@@ -52945,7 +53135,7 @@ function validateFlexibleBalanceDueDateRule(raw, path27) {
52945
53135
  if (typeof raw.dueAt !== "string" || !Number.isFinite(Date.parse(raw.dueAt))) {
52946
53136
  return [
52947
53137
  issue3(
52948
- [...path27, "dueAt"],
53138
+ [...path28, "dueAt"],
52949
53139
  "Flexible balance fixed dueAt must be an ISO datetime"
52950
53140
  )
52951
53141
  ];
@@ -52957,14 +53147,14 @@ function validateFlexibleBalanceDueDateRule(raw, path27) {
52957
53147
  }
52958
53148
  return [
52959
53149
  issue3(
52960
- [...path27, "kind"],
53150
+ [...path28, "kind"],
52961
53151
  "Flexible balance dueDateRule kind must be relative_to_start_date or fixed_calendar_date"
52962
53152
  )
52963
53153
  ];
52964
53154
  }
52965
- function validateFlexibleBalanceConfig(raw, path27) {
53155
+ function validateFlexibleBalanceConfig(raw, path28) {
52966
53156
  if (!isRecord16(raw)) {
52967
- return [issue3(path27, "Flexible balance config must be an object")];
53157
+ return [issue3(path28, "Flexible balance config must be an object")];
52968
53158
  }
52969
53159
  const issues = [];
52970
53160
  const upfrontAmountCents = raw.upfrontAmountCents;
@@ -52974,7 +53164,7 @@ function validateFlexibleBalanceConfig(raw, path27) {
52974
53164
  if (!isWholeNumber2(upfrontAmountCents) || upfrontAmountCents < 0) {
52975
53165
  issues.push(
52976
53166
  issue3(
52977
- [...path27, "upfrontAmountCents"],
53167
+ [...path28, "upfrontAmountCents"],
52978
53168
  "Flexible balance upfrontAmountCents must be a non-negative integer"
52979
53169
  )
52980
53170
  );
@@ -52984,7 +53174,7 @@ function validateFlexibleBalanceConfig(raw, path27) {
52984
53174
  if (!isDepositRefundability(depositRefundability)) {
52985
53175
  issues.push(
52986
53176
  issue3(
52987
- [...path27, "depositRefundability"],
53177
+ [...path28, "depositRefundability"],
52988
53178
  "Flexible balance depositRefundability must be refundable or non_refundable"
52989
53179
  )
52990
53180
  );
@@ -52993,7 +53183,7 @@ function validateFlexibleBalanceConfig(raw, path27) {
52993
53183
  }
52994
53184
  const dueDateRule = validateFlexibleBalanceDueDateRule(
52995
53185
  raw.dueDateRule,
52996
- [...path27, "dueDateRule"]
53186
+ [...path28, "dueDateRule"]
52997
53187
  );
52998
53188
  if (Array.isArray(dueDateRule)) {
52999
53189
  issues.push(...dueDateRule);
@@ -53008,14 +53198,14 @@ function validateFlexibleBalanceConfig(raw, path27) {
53008
53198
  };
53009
53199
  }
53010
53200
  function validateCollectionOption(raw, index) {
53011
- const path27 = ["allowedOptions", String(index)];
53201
+ const path28 = ["allowedOptions", String(index)];
53012
53202
  if (!isRecord16(raw)) {
53013
- return [issue3(path27, "Payment option must be an object")];
53203
+ return [issue3(path28, "Payment option must be an object")];
53014
53204
  }
53015
53205
  if (raw.kind === "instalment_plan") {
53016
53206
  return [
53017
53207
  issue3(
53018
- [...path27, "kind"],
53208
+ [...path28, "kind"],
53019
53209
  "Event instalment plans are not supported yet. Use upfront, deferred_manual, or flexible_balance."
53020
53210
  )
53021
53211
  ];
@@ -53023,7 +53213,7 @@ function validateCollectionOption(raw, index) {
53023
53213
  if (!isSupportedOptionKind(raw.kind)) {
53024
53214
  return [
53025
53215
  issue3(
53026
- [...path27, "kind"],
53216
+ [...path28, "kind"],
53027
53217
  "Payment option kind must be upfront, deferred_manual, or flexible_balance"
53028
53218
  )
53029
53219
  ];
@@ -53034,7 +53224,7 @@ function validateCollectionOption(raw, index) {
53034
53224
  return { kind: raw.kind };
53035
53225
  case "flexible_balance": {
53036
53226
  const config2 = validateFlexibleBalanceConfig(raw.config, [
53037
- ...path27,
53227
+ ...path28,
53038
53228
  "config"
53039
53229
  ]);
53040
53230
  if (Array.isArray(config2)) {
@@ -54504,6 +54694,7 @@ var upsertEventSeriesCommandSchema = z.object({
54504
54694
  ref: eventSeriesRefSchema,
54505
54695
  input: z.object({
54506
54696
  slug: z.string().min(1),
54697
+ path: z.string().startsWith("/").nullable().optional(),
54507
54698
  title: z.string().min(1),
54508
54699
  archetype: z.enum(offeringArchetypes),
54509
54700
  status: z.enum(["draft", "active", "archived", "cancelled"]).optional(),
@@ -54528,6 +54719,7 @@ var upsertEventSeriesCommandSchema = z.object({
54528
54719
  paymentTerms: z.unknown().optional(),
54529
54720
  presentation: unknownRecordSchema.nullable().optional(),
54530
54721
  tags: z.array(z.string()).readonly().optional(),
54722
+ blocks: entrySlotBlocksSchema.optional(),
54531
54723
  staffRefs: z.array(staffRefSchema).readonly().optional()
54532
54724
  }).strict()
54533
54725
  }).strict();
@@ -55905,13 +56097,13 @@ function collectOfferingRequires(input, intervals, intervalPath) {
55905
56097
  function optionalRef(ref, field) {
55906
56098
  return ref ? [{ ref, field }] : [];
55907
56099
  }
55908
- function collectVenueRefsFromIntervals(intervals, path27) {
55909
- return intervals.flatMap((interval, index) => optionalRef(interval.venueRef, `${path27}[${index}].venueRef`));
56100
+ function collectVenueRefsFromIntervals(intervals, path28) {
56101
+ return intervals.flatMap((interval, index) => optionalRef(interval.venueRef, `${path28}[${index}].venueRef`));
55910
56102
  }
55911
- function collectNavigationRefs(items, path27) {
56103
+ function collectNavigationRefs(items, path28) {
55912
56104
  return items.flatMap((item, index) => {
55913
56105
  if (!isRecord18(item)) return [];
55914
- const itemPath = `${path27}[${index}]`;
56106
+ const itemPath = `${path28}[${index}]`;
55915
56107
  const refs = [];
55916
56108
  if (typeof item.pageRef === "string") {
55917
56109
  refs.push({ ref: item.pageRef, field: `${itemPath}.pageRef` });
@@ -55925,26 +56117,26 @@ function collectNavigationRefs(items, path27) {
55925
56117
  return refs;
55926
56118
  });
55927
56119
  }
55928
- function collectBlockRefs(blocks, path27) {
56120
+ function collectBlockRefs(blocks, path28) {
55929
56121
  return blocks.flatMap((block, index) => {
55930
56122
  if (!isRecord18(block)) return [];
55931
- const blockPath = `${path27}[${index}]`;
56123
+ const blockPath = `${path28}[${index}]`;
55932
56124
  return [
55933
56125
  ...collectNestedRefs(block.props, `${blockPath}.props`),
55934
56126
  ...collectNestedRefs(block.children, `${blockPath}.children`)
55935
56127
  ];
55936
56128
  });
55937
56129
  }
55938
- function collectNestedRefs(value, path27) {
56130
+ function collectNestedRefs(value, path28) {
55939
56131
  if (typeof value === "string") {
55940
56132
  const parsed = parseResourceRef(value);
55941
- return parsed.ok ? [{ ref: value, field: path27 }] : [];
56133
+ return parsed.ok ? [{ ref: value, field: path28 }] : [];
55942
56134
  }
55943
56135
  if (Array.isArray(value)) {
55944
- return value.flatMap((item, index) => collectNestedRefs(item, `${path27}[${index}]`));
56136
+ return value.flatMap((item, index) => collectNestedRefs(item, `${path28}[${index}]`));
55945
56137
  }
55946
56138
  if (!isRecord18(value)) return [];
55947
- return Object.entries(value).flatMap(([key, child]) => collectNestedRefs(child, `${path27}.${key}`));
56139
+ return Object.entries(value).flatMap(([key, child]) => collectNestedRefs(child, `${path28}.${key}`));
55948
56140
  }
55949
56141
 
55950
56142
  // ../site-commands/src/staticExecutionGaps.ts
@@ -56223,8 +56415,8 @@ function invalidPayloadError(input, issue5) {
56223
56415
  message: `${field}: ${issue5.message}`
56224
56416
  };
56225
56417
  }
56226
- function commandIndexForIssuePath(path27) {
56227
- return path27[0] === "commands" && typeof path27[1] === "number" ? path27[1] : -1;
56418
+ function commandIndexForIssuePath(path28) {
56419
+ return path28[0] === "commands" && typeof path28[1] === "number" ? path28[1] : -1;
56228
56420
  }
56229
56421
  function commandTypeForIssue(input, commandIndex) {
56230
56422
  if (!isRecord18(input) || !isUnknownArray3(input.commands)) return null;
@@ -56234,9 +56426,9 @@ function commandTypeForIssue(input, commandIndex) {
56234
56426
  function isUnknownArray3(value) {
56235
56427
  return Array.isArray(value);
56236
56428
  }
56237
- function formatIssuePath(path27) {
56238
- if (path27.length === 0) return "<root>";
56239
- return path27.reduce((formatted, segment) => {
56429
+ function formatIssuePath(path28) {
56430
+ if (path28.length === 0) return "<root>";
56431
+ return path28.reduce((formatted, segment) => {
56240
56432
  if (typeof segment === "number") return `${formatted}[${segment}]`;
56241
56433
  if (formatted.length === 0) return String(segment);
56242
56434
  return `${formatted}.${String(segment)}`;
@@ -56905,8 +57097,8 @@ init_src();
56905
57097
  var timeRegex = /^([01]\d|2[0-3]):([0-5]\d)(:([0-5]\d))?$/;
56906
57098
  var explicitOffsetDateTimeRegex = /^(\d{4})-(\d{2})-(\d{2})T([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d))?(\.\d{1,3})?(Z|[+-]([01]\d|2[0-3]):[0-5]\d)$/;
56907
57099
  var localDateTimeRegex = /^(\d{4})-(\d{2})-(\d{2})T([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d))?(\.\d{1,3})?$/;
56908
- function issue4(path27, message) {
56909
- return { path: path27, message };
57100
+ function issue4(path28, message) {
57101
+ return { path: path28, message };
56910
57102
  }
56911
57103
  function isValidDateParts(year, month, day) {
56912
57104
  const date = new Date(Date.UTC(year, month - 1, day));
@@ -57330,6 +57522,7 @@ function eventSeriesCommand(event) {
57330
57522
  ref: createEventSeriesRef([event.identifier]),
57331
57523
  input: {
57332
57524
  slug: event.slug,
57525
+ path: event.path,
57333
57526
  title: event.title,
57334
57527
  archetype: "custom",
57335
57528
  status: event.status === "completed" ? void 0 : event.status,
@@ -57354,7 +57547,8 @@ function eventSeriesCommand(event) {
57354
57547
  settings: event.settings,
57355
57548
  paymentTerms: event.paymentTerms,
57356
57549
  presentation: event.presentation,
57357
- tags: event.tags
57550
+ tags: event.tags,
57551
+ blocks: event.blocks
57358
57552
  }
57359
57553
  });
57360
57554
  }
@@ -57518,6 +57712,7 @@ function eventSeriesUpsertInput(command) {
57518
57712
  identifier: command.input.slug,
57519
57713
  title: command.input.title,
57520
57714
  slug: command.input.slug,
57715
+ path: command.input.path,
57521
57716
  status: command.input.status,
57522
57717
  visibility: managementVisibility(command.input.visibility),
57523
57718
  schedule: scheduleFromOccurrence(occurrence),
@@ -57532,7 +57727,8 @@ function eventSeriesUpsertInput(command) {
57532
57727
  formRef: command.input.formIdentifier ?? (command.input.formRef ? refSlug(command.input.formRef) : null),
57533
57728
  settings: command.input.settings,
57534
57729
  presentation: command.input.presentation,
57535
- tags: command.input.tags ? [...command.input.tags] : void 0
57730
+ tags: command.input.tags ? [...command.input.tags] : void 0,
57731
+ blocks: command.input.blocks
57536
57732
  };
57537
57733
  }
57538
57734
  function eventContentInput(content) {
@@ -60407,13 +60603,118 @@ async function pushEventCategoriesScope(ctx, options) {
60407
60603
  })
60408
60604
  });
60409
60605
  }
60410
-
60411
- // src/cli/commands/push/scopes/events.ts
60606
+ function findDuplicateLocalEventIdentifiers(events) {
60607
+ const filePathsByIdentifier = /* @__PURE__ */ new Map();
60608
+ for (const event of events) {
60609
+ const filePaths = filePathsByIdentifier.get(event.identifier) ?? [];
60610
+ filePaths.push(event.filePath);
60611
+ filePathsByIdentifier.set(event.identifier, filePaths);
60612
+ }
60613
+ return [...filePathsByIdentifier.entries()].filter(([, filePaths]) => filePaths.length > 1).map(([identifier, filePaths]) => ({ identifier, filePaths }));
60614
+ }
60615
+ function formatDuplicateEventFilePath(contentDir, filePath) {
60616
+ return path5.relative(contentDir, filePath) || filePath;
60617
+ }
60618
+ function normalizeLocalPath(value) {
60619
+ const [withoutHash] = value.split("#");
60620
+ const [withoutQuery] = (withoutHash ?? "").split("?");
60621
+ if (!withoutQuery || !withoutQuery.startsWith("/")) return value;
60622
+ return withoutQuery.length > 1 ? withoutQuery.replace(/\/+$/u, "") || "/" : "/";
60623
+ }
60624
+ function localEventPath(event) {
60625
+ return normalizeLocalPath(event.path?.trim() || `/events/${event.slug}`);
60626
+ }
60627
+ function collectNavigationPathReferences(navigation) {
60628
+ if (!navigation) return [];
60629
+ const references = [];
60630
+ const visit = (items, menuName) => {
60631
+ for (const item of items) {
60632
+ const link2 = item.link;
60633
+ if (link2 && typeof link2 === "object" && "href" in link2) {
60634
+ const href = link2.href;
60635
+ if (typeof href === "string" && href.startsWith("/")) {
60636
+ references.push({
60637
+ path: normalizeLocalPath(href),
60638
+ menuName,
60639
+ label: item.label
60640
+ });
60641
+ }
60642
+ }
60643
+ if (item.children?.length) {
60644
+ visit(item.children, menuName);
60645
+ }
60646
+ }
60647
+ };
60648
+ for (const menu of navigation.menus) {
60649
+ visit(menu.items, menu.name);
60650
+ }
60651
+ return references;
60652
+ }
60653
+ function findEventNavigationPathMismatches(events, navigation) {
60654
+ const references = collectNavigationPathReferences(navigation);
60655
+ const mismatches = [];
60656
+ for (const event of events) {
60657
+ const eventPath = localEventPath(event);
60658
+ const slugSuffix = `/${event.slug}`;
60659
+ for (const reference of references) {
60660
+ if (reference.path.endsWith(slugSuffix) && reference.path !== eventPath && !reference.path.startsWith(`${eventPath}/`)) {
60661
+ mismatches.push({
60662
+ eventIdentifier: event.identifier,
60663
+ eventPath,
60664
+ navigationPath: reference.path,
60665
+ menuName: reference.menuName,
60666
+ label: reference.label
60667
+ });
60668
+ }
60669
+ }
60670
+ }
60671
+ return mismatches;
60672
+ }
60673
+ function warnForEventNavigationPathMismatches(ctx, mismatches) {
60674
+ if (mismatches.length === 0) return;
60675
+ ctx.output.warn("Navigation links may not match canonical event paths", {
60676
+ details: mismatches.map(
60677
+ (mismatch) => ` - ${mismatch.menuName} > ${mismatch.label}: ${mismatch.navigationPath} points at event "${mismatch.eventIdentifier}", but content/events uses ${mismatch.eventPath}`
60678
+ ).join("\n"),
60679
+ suggestion: "Update content/events/*.json path or content/navigation.json so event links resolve to the same route."
60680
+ });
60681
+ }
60412
60682
  async function pushEventsScope(ctx, options) {
60413
60683
  const { client } = ctx;
60414
60684
  const only = options?.only;
60415
- const events = await readEvents(ctx.contentDir);
60416
- const mediaContent = { ...createEmptyLocalContent(), events };
60685
+ const events = await readEventsWithFilePaths(ctx.contentDir);
60686
+ const duplicateIdentifiers = findDuplicateLocalEventIdentifiers(
60687
+ only ? events.filter((event) => only.has(event.identifier)) : events
60688
+ );
60689
+ if (duplicateIdentifiers.length > 0) {
60690
+ ctx.output.error("Duplicate event identifiers detected", {
60691
+ details: duplicateIdentifiers.map(
60692
+ (duplicate) => ` ${duplicate.identifier}:
60693
+ ${duplicate.filePaths.map((filePath) => ` - ${formatDuplicateEventFilePath(ctx.contentDir, filePath)}`).join("\n")}`
60694
+ ).join("\n"),
60695
+ suggestion: "Each content/events/*.json file must have a unique identifier. Delete or merge stale duplicate event files before pushing."
60696
+ });
60697
+ return {
60698
+ status: "aborted",
60699
+ scopeCommand: "events",
60700
+ scopeName: "events",
60701
+ created: 0,
60702
+ updated: 0,
60703
+ deleted: 0,
60704
+ failed: duplicateIdentifiers.length,
60705
+ errors: duplicateIdentifiers.map((duplicate) => ({
60706
+ identifier: duplicate.identifier,
60707
+ error: `Duplicate event identifier in ${duplicate.filePaths.map((filePath) => formatDuplicateEventFilePath(ctx.contentDir, filePath)).join(", ")}`
60708
+ }))
60709
+ };
60710
+ }
60711
+ const eventItems = events.map(({ filePath: _filePath, ...event }) => event);
60712
+ const selectedEventItems = only ? eventItems.filter((event) => only.has(event.identifier)) : eventItems;
60713
+ warnForEventNavigationPathMismatches(
60714
+ ctx,
60715
+ findEventNavigationPathMismatches(selectedEventItems, await readNavigation(ctx.contentDir))
60716
+ );
60717
+ const mediaContent = { ...createEmptyLocalContent(), events: eventItems };
60417
60718
  const mediaResult = await syncLocalMediaForScopePush(ctx, mediaContent);
60418
60719
  if (!mediaResult.ok) {
60419
60720
  ctx.output.error("Local media sync failed", {
@@ -60438,7 +60739,7 @@ async function pushEventsScope(ctx, options) {
60438
60739
  getIdentifier: (event) => event.identifier,
60439
60740
  getDisplayLabel: (event) => event.title,
60440
60741
  shouldPushItem: only ? (event) => only.has(event.identifier) : void 0,
60441
- readLocal: async () => events,
60742
+ readLocal: async () => eventItems,
60442
60743
  readMeta: async (dir) => {
60443
60744
  const meta = await readEventsMeta(dir);
60444
60745
  return meta?.events ?? null;
@@ -60673,7 +60974,7 @@ function firstNestedContainerChange(localChanges, remoteChanges) {
60673
60974
  }
60674
60975
  function firstSameFieldConflictPath(localChanges, remoteChanges) {
60675
60976
  const remotePaths = new Set(remoteChanges.keys());
60676
- return [...localChanges.keys()].filter((path27) => remotePaths.has(path27)).sort()[0] ?? null;
60977
+ return [...localChanges.keys()].filter((path28) => remotePaths.has(path28)).sort()[0] ?? null;
60677
60978
  }
60678
60979
  function unsupportedNestedMerge(subject, fieldPath) {
60679
60980
  return {
@@ -60755,37 +61056,37 @@ function valueKind(value) {
60755
61056
  if (typeof value === "object") return "object";
60756
61057
  return "scalar";
60757
61058
  }
60758
- function entryChange(path27, value, containerKind) {
61059
+ function entryChange(path28, value, containerKind) {
60759
61060
  switch (containerKind) {
60760
61061
  case "array":
60761
- if (Array.isArray(value)) return { path: path27, value, containerKind };
61062
+ if (Array.isArray(value)) return { path: path28, value, containerKind };
60762
61063
  break;
60763
61064
  case "object":
60764
61065
  if (value && typeof value === "object" && !Array.isArray(value)) {
60765
- return { path: path27, value, containerKind };
61066
+ return { path: path28, value, containerKind };
60766
61067
  }
60767
61068
  break;
60768
61069
  case "null":
60769
- if (value === null || value === void 0) return { path: path27, value, containerKind };
61070
+ if (value === null || value === void 0) return { path: path28, value, containerKind };
60770
61071
  break;
60771
61072
  case "scalar":
60772
- if (isScalarEntryChangeValue(value)) return { path: path27, value, containerKind };
61073
+ if (isScalarEntryChangeValue(value)) return { path: path28, value, containerKind };
60773
61074
  break;
60774
61075
  default:
60775
61076
  assertNever(containerKind);
60776
61077
  }
60777
- throw new Error(`Invalid entry merge change at ${path27}.`);
61078
+ throw new Error(`Invalid entry merge change at ${path28}.`);
60778
61079
  }
60779
61080
  function isScalarEntryChangeValue(value) {
60780
61081
  return value === void 0 || value === null || ["boolean", "number", "string"].includes(typeof value);
60781
61082
  }
60782
- function expectStringValue(path27, value) {
61083
+ function expectStringValue(path28, value) {
60783
61084
  if (typeof value === "string") return value;
60784
- throw new Error(`Entry merge expected ${path27} to be a string.`);
61085
+ throw new Error(`Entry merge expected ${path28} to be a string.`);
60785
61086
  }
60786
- function expectBooleanValue(path27, value) {
61087
+ function expectBooleanValue(path28, value) {
60787
61088
  if (typeof value === "boolean") return value;
60788
- throw new Error(`Entry merge expected ${path27} to be a boolean.`);
61089
+ throw new Error(`Entry merge expected ${path28} to be a boolean.`);
60789
61090
  }
60790
61091
  function expectStatusValue(value) {
60791
61092
  if (value === "draft" || value === "published") return value;
@@ -61297,7 +61598,7 @@ async function unlinkIfExists(filePath) {
61297
61598
  }
61298
61599
 
61299
61600
  // src/cli/commands/push-execute.ts
61300
- async function executeScopedPush(output, isRemote, options, globalOpts, scopeLabel, pullCommand2, shouldDeleteOrphans, pushFn) {
61601
+ async function executeScopedPush(output, isRemote, options, globalOpts, scopeLabel, pullCommand2, shouldDeleteOrphans, pushFn, scopedOptions) {
61301
61602
  const cliConfig = await loadCliConfig();
61302
61603
  const contentDir = path5.resolve(options.contentDir ?? cliConfig.contentDir);
61303
61604
  if (!await contentDirExists(contentDir)) {
@@ -61311,21 +61612,24 @@ async function executeScopedPush(output, isRemote, options, globalOpts, scopeLab
61311
61612
  managementApiKey: env.managementApiKey,
61312
61613
  siteId: env.siteId
61313
61614
  });
61314
- const result = await pushFn({
61315
- output,
61316
- contentDir,
61317
- siteId: env.siteId,
61318
- targetEnv: isRemote ? "remote" : "local",
61319
- client,
61320
- dryRun: options.dryRun,
61321
- force: options.force ?? false,
61322
- isJsonOutput: globalOpts.json ?? false,
61323
- forceUpdateAsset: options.forceUpdateAsset,
61324
- deleteOrphaned: shouldDeleteOrphans,
61325
- autoPullStale: options.autoPullStale ?? false,
61326
- skipMeta: !(options.meta ?? true),
61327
- humanDiff: options.diff ?? false
61328
- });
61615
+ const result = await pushFn(
61616
+ {
61617
+ output,
61618
+ contentDir,
61619
+ siteId: env.siteId,
61620
+ targetEnv: isRemote ? "remote" : "local",
61621
+ client,
61622
+ dryRun: options.dryRun,
61623
+ force: options.force ?? false,
61624
+ isJsonOutput: globalOpts.json ?? false,
61625
+ forceUpdateAsset: options.forceUpdateAsset,
61626
+ deleteOrphaned: shouldDeleteOrphans,
61627
+ autoPullStale: options.autoPullStale ?? false,
61628
+ skipMeta: !(options.meta ?? true),
61629
+ humanDiff: options.diff ?? false
61630
+ },
61631
+ scopedOptions
61632
+ );
61329
61633
  if (result.status === "pushed" && result.failed > 0 || result.status === "failed") {
61330
61634
  process.exitCode = 1;
61331
61635
  output.result(false, `${scopeLabel} push had failures`, result);
@@ -61582,6 +61886,7 @@ ${errors}`
61582
61886
  return { success: true };
61583
61887
  }
61584
61888
  if (pushScope === "venues") {
61889
+ const only = type ? /* @__PURE__ */ new Set([type]) : void 0;
61585
61890
  return executeScopedPush(
61586
61891
  output,
61587
61892
  isRemote,
@@ -61590,10 +61895,12 @@ ${errors}`
61590
61895
  "Venues",
61591
61896
  "venues",
61592
61897
  shouldDeleteOrphans,
61593
- pushVenuesScope
61898
+ pushVenuesScope,
61899
+ only ? { only } : void 0
61594
61900
  );
61595
61901
  }
61596
61902
  if (pushScope === "event-categories") {
61903
+ const only = type ? /* @__PURE__ */ new Set([type]) : void 0;
61597
61904
  return executeScopedPush(
61598
61905
  output,
61599
61906
  isRemote,
@@ -61602,10 +61909,12 @@ ${errors}`
61602
61909
  "Event categories",
61603
61910
  "event-categories",
61604
61911
  shouldDeleteOrphans,
61605
- pushEventCategoriesScope
61912
+ pushEventCategoriesScope,
61913
+ only ? { only } : void 0
61606
61914
  );
61607
61915
  }
61608
61916
  if (pushScope === "events") {
61917
+ const only = type ? /* @__PURE__ */ new Set([type]) : void 0;
61609
61918
  return executeScopedPush(
61610
61919
  output,
61611
61920
  isRemote,
@@ -61614,10 +61923,12 @@ ${errors}`
61614
61923
  "Events",
61615
61924
  "events",
61616
61925
  shouldDeleteOrphans,
61617
- pushEventsScope
61926
+ pushEventsScope,
61927
+ only ? { only } : void 0
61618
61928
  );
61619
61929
  }
61620
61930
  if (pushScope === "courses") {
61931
+ const only = type ? /* @__PURE__ */ new Set([type]) : void 0;
61621
61932
  return executeScopedPush(
61622
61933
  output,
61623
61934
  isRemote,
@@ -61626,7 +61937,8 @@ ${errors}`
61626
61937
  "Courses",
61627
61938
  "courses",
61628
61939
  shouldDeleteOrphans,
61629
- pushCoursesScope
61940
+ pushCoursesScope,
61941
+ only ? { only } : void 0
61630
61942
  );
61631
61943
  }
61632
61944
  if (pushScope === "footer") {
@@ -65196,7 +65508,7 @@ var SimpleCache = class {
65196
65508
  };
65197
65509
 
65198
65510
  // src/version.ts
65199
- var SDK_VERSION = "0.89.1";
65511
+ var SDK_VERSION = "0.90.0";
65200
65512
 
65201
65513
  // src/client/error.ts
65202
65514
  var RiverbankApiError = class _RiverbankApiError extends Error {
@@ -66759,19 +67071,19 @@ function createRiverbankClient(config2) {
66759
67071
  );
66760
67072
  }
66761
67073
  async function getPageWithResilienceInternal(params) {
66762
- const { siteId, path: path27, preview = false, signal } = params;
67074
+ const { siteId, path: path28, preview = false, signal } = params;
66763
67075
  const publishedRuntimeCache = planPublishedRuntimeCache({
66764
67076
  endpoint: "getContentByPath",
66765
- params: { siteId, path: path27, preview },
67077
+ params: { siteId, path: path28, preview },
66766
67078
  siteId
66767
67079
  });
66768
- const cacheKey = publishedRuntimeCache?.cacheKey ?? `page:${siteId}:${path27}:${preview}`;
67080
+ const cacheKey = publishedRuntimeCache?.cacheKey ?? `page:${siteId}:${path28}:${preview}`;
66769
67081
  return resilientFetch(
66770
67082
  cacheKey,
66771
67083
  async (sig) => {
66772
67084
  return await apiClient({
66773
67085
  endpoint: "getContentByPath",
66774
- params: { siteId, path: path27, preview: String(preview) },
67086
+ params: { siteId, path: path28, preview: String(preview) },
66775
67087
  options: { signal: sig }
66776
67088
  });
66777
67089
  },
@@ -66780,7 +67092,7 @@ function createRiverbankClient(config2) {
66780
67092
  signal,
66781
67093
  publishedRuntimeCache,
66782
67094
  // Prebuild fallback only for published pages (not preview)
66783
- prebuildFallback: prebuildLoader && !preview ? () => prebuildLoader.loadPage(siteId, path27) : void 0
67095
+ prebuildFallback: prebuildLoader && !preview ? () => prebuildLoader.loadPage(siteId, path28) : void 0
66784
67096
  }
66785
67097
  );
66786
67098
  }
@@ -67240,17 +67552,17 @@ function createRiverbankClient(config2) {
67240
67552
  };
67241
67553
  },
67242
67554
  async checkRedirect(params) {
67243
- const { siteId, path: path27, signal } = params;
67244
- if (!siteId || !path27) {
67555
+ const { siteId, path: path28, signal } = params;
67556
+ if (!siteId || !path28) {
67245
67557
  throw new Error("checkRedirect() requires siteId and path");
67246
67558
  }
67247
- const cacheKey = `redirect:${siteId}:${path27}`;
67559
+ const cacheKey = `redirect:${siteId}:${path28}`;
67248
67560
  return resilientFetchData(
67249
67561
  cacheKey,
67250
67562
  async (sig) => {
67251
67563
  return await apiClient({
67252
67564
  endpoint: "checkRedirect",
67253
- params: { site: siteId, path: path27 },
67565
+ params: { site: siteId, path: path28 },
67254
67566
  options: { signal: sig }
67255
67567
  });
67256
67568
  },
@@ -67660,7 +67972,7 @@ async function loadDeployConfig() {
67660
67972
  }
67661
67973
  async function checkWorkingDirectoryClean(git, prebuildOutput) {
67662
67974
  const status = await git.status();
67663
- const dirtyFiles = status.files.map((f) => f.path).filter((path27) => !path27.startsWith(prebuildOutput));
67975
+ const dirtyFiles = status.files.map((f) => f.path).filter((path28) => !path28.startsWith(prebuildOutput));
67664
67976
  return {
67665
67977
  clean: dirtyFiles.length === 0,
67666
67978
  dirtyFiles
@@ -68191,25 +68503,25 @@ function mapMediaGuardDiagnosticsToAuditIssues(diagnostics) {
68191
68503
  }
68192
68504
  }));
68193
68505
  }
68194
- function extractEmbedReferences(data, path27 = []) {
68506
+ function extractEmbedReferences(data, path28 = []) {
68195
68507
  const refs = [];
68196
68508
  if (!data || typeof data !== "object") return refs;
68197
68509
  if (Array.isArray(data)) {
68198
68510
  data.forEach((item, index) => {
68199
- refs.push(...extractEmbedReferences(item, [...path27, String(index)]));
68511
+ refs.push(...extractEmbedReferences(item, [...path28, String(index)]));
68200
68512
  });
68201
68513
  return refs;
68202
68514
  }
68203
68515
  const obj = data;
68204
68516
  if (obj.kind === "embed" && typeof obj.contentType === "string" && typeof obj.identifier === "string") {
68205
68517
  refs.push({
68206
- path: path27.join("."),
68518
+ path: path28.join("."),
68207
68519
  contentType: obj.contentType,
68208
68520
  identifier: obj.identifier
68209
68521
  });
68210
68522
  }
68211
68523
  for (const [key, value] of Object.entries(obj)) {
68212
- refs.push(...extractEmbedReferences(value, [...path27, key]));
68524
+ refs.push(...extractEmbedReferences(value, [...path28, key]));
68213
68525
  }
68214
68526
  return refs;
68215
68527
  }
@@ -69143,7 +69455,7 @@ function formatThemeSummaryForPrompt(summary) {
69143
69455
  }
69144
69456
 
69145
69457
  // src/manifest/validation/layout-utils.ts
69146
- function collectLayoutNodeInfos(node, path27 = "layout", out = []) {
69458
+ function collectLayoutNodeInfos(node, path28 = "layout", out = []) {
69147
69459
  if (!node || typeof node !== "object") return out;
69148
69460
  const n = node;
69149
69461
  const type = typeof n.type === "string" ? n.type : "unknown";
@@ -69152,10 +69464,10 @@ function collectLayoutNodeInfos(node, path27 = "layout", out = []) {
69152
69464
  const b = n.$bind;
69153
69465
  if (typeof b.from === "string") bindFrom = b.from;
69154
69466
  }
69155
- out.push({ path: path27, type, bindFrom });
69467
+ out.push({ path: path28, type, bindFrom });
69156
69468
  if (Array.isArray(n.children)) {
69157
69469
  for (let i = 0; i < n.children.length; i++) {
69158
- collectLayoutNodeInfos(n.children[i], `${path27}.children[${i}]`, out);
69470
+ collectLayoutNodeInfos(n.children[i], `${path28}.children[${i}]`, out);
69159
69471
  }
69160
69472
  }
69161
69473
  return out;
@@ -69577,7 +69889,7 @@ function extractNestedHrefBindFromProps(props2) {
69577
69889
  const bind2 = href.$bind;
69578
69890
  return bind2 && typeof bind2 === "object" ? bind2 : null;
69579
69891
  }
69580
- function findMissingLinkHrefs(node, blockId, fields3, path27 = "layout", repeatStack = []) {
69892
+ function findMissingLinkHrefs(node, blockId, fields3, path28 = "layout", repeatStack = []) {
69581
69893
  const errors = [];
69582
69894
  if (!node || typeof node !== "object") return errors;
69583
69895
  const n = node;
@@ -69606,21 +69918,21 @@ function findMissingLinkHrefs(node, blockId, fields3, path27 = "layout", repeatS
69606
69918
  if (isBoundToLinkField) {
69607
69919
  if (!hrefBind || !hrefFrom) {
69608
69920
  errors.push({
69609
- path: path27,
69610
- message: `Block "${blockId}": ${nodeType} node at ${path27} is bound to a link field but is missing props.href binding`,
69921
+ path: path28,
69922
+ message: `Block "${blockId}": ${nodeType} node at ${path28} is bound to a link field but is missing props.href binding`,
69611
69923
  suggestion: `Add props.href: { "$bind": { "from": "${bindFrom ?? "content.yourLinkField"}", "fallback": null, "transforms": [{ "id": "links.resolve" }] } }`
69612
69924
  });
69613
69925
  } else if (!bindingHasTransform(hrefBind, "links.resolve")) {
69614
69926
  errors.push({
69615
- path: path27,
69616
- message: `Block "${blockId}": ${nodeType} node at ${path27} has props.href binding but is missing transforms: [{id:"links.resolve"}]`,
69927
+ path: path28,
69928
+ message: `Block "${blockId}": ${nodeType} node at ${path28} has props.href binding but is missing transforms: [{id:"links.resolve"}]`,
69617
69929
  suggestion: `Set props.href.$bind.transforms to [{ "id": "links.resolve" }].`
69618
69930
  });
69619
69931
  }
69620
69932
  if (bindFrom && bindFieldType === "link" && !bindingHasTransform(bind2, "links.label")) {
69621
69933
  errors.push({
69622
- path: path27,
69623
- message: `Block "${blockId}": ${nodeType} node at ${path27} binds label from a link field but is missing links.label transform`,
69934
+ path: path28,
69935
+ message: `Block "${blockId}": ${nodeType} node at ${path28} binds label from a link field but is missing links.label transform`,
69624
69936
  suggestion: `Set node.$bind.transforms to [{ "id": "links.label" }] so the label renders as text.`
69625
69937
  });
69626
69938
  }
@@ -69633,7 +69945,7 @@ function findMissingLinkHrefs(node, blockId, fields3, path27 = "layout", repeatS
69633
69945
  n.children[i],
69634
69946
  blockId,
69635
69947
  fields3,
69636
- `${path27}.children[${i}]`,
69948
+ `${path28}.children[${i}]`,
69637
69949
  nextRepeatStack
69638
69950
  )
69639
69951
  );
@@ -69641,7 +69953,7 @@ function findMissingLinkHrefs(node, blockId, fields3, path27 = "layout", repeatS
69641
69953
  }
69642
69954
  return errors;
69643
69955
  }
69644
- function detectRedundantLinkLabels(node, blockId, fields3, path27 = "layout", repeatStack = []) {
69956
+ function detectRedundantLinkLabels(node, blockId, fields3, path28 = "layout", repeatStack = []) {
69645
69957
  const errors = [];
69646
69958
  if (!node || typeof node !== "object") return errors;
69647
69959
  const n = node;
@@ -69663,7 +69975,7 @@ function detectRedundantLinkLabels(node, blockId, fields3, path27 = "layout", re
69663
69975
  const redundancies = findRedundantLinkTextSiblings(
69664
69976
  children,
69665
69977
  nextRepeatStack,
69666
- path27
69978
+ path28
69667
69979
  );
69668
69980
  errors.push(
69669
69981
  ...redundancies.map((r) => ({
@@ -69680,7 +69992,7 @@ function detectRedundantLinkLabels(node, blockId, fields3, path27 = "layout", re
69680
69992
  n.children[i],
69681
69993
  blockId,
69682
69994
  fields3,
69683
- `${path27}.children[${i}]`,
69995
+ `${path28}.children[${i}]`,
69684
69996
  nextRepeatStack
69685
69997
  )
69686
69998
  );
@@ -69919,19 +70231,19 @@ function extractBlockIdFromSelector(selector) {
69919
70231
  const match = selector.match(/\[data-block=(["'])(custom\.[^"']+)\1\]/);
69920
70232
  return match?.[2] ?? null;
69921
70233
  }
69922
- function validateNodeType(nodeType, path27, ctx) {
70234
+ function validateNodeType(nodeType, path28, ctx) {
69923
70235
  if (!ALLOWED_NODE_TYPES.includes(
69924
70236
  nodeType
69925
70237
  )) {
69926
70238
  return {
69927
- path: `${path27}.type`,
69928
- message: `Block "${ctx.blockId}": Unknown node type "${nodeType}" at ${path27}`,
70239
+ path: `${path28}.type`,
70240
+ message: `Block "${ctx.blockId}": Unknown node type "${nodeType}" at ${path28}`,
69929
70241
  suggestion: `ALLOWED: ${ALLOWED_NODE_TYPES.slice(0, 10).join(", ")}... FIX: Replace "${nodeType}" with a valid node type.`
69930
70242
  };
69931
70243
  }
69932
70244
  return null;
69933
70245
  }
69934
- function validateTransforms(transforms, path27, ctx) {
70246
+ function validateTransforms(transforms, path28, ctx) {
69935
70247
  const errors = [];
69936
70248
  for (let i = 0; i < transforms.length; i++) {
69937
70249
  const transform = transforms[i];
@@ -69940,7 +70252,7 @@ function validateTransforms(transforms, path27, ctx) {
69940
70252
  transform.id
69941
70253
  )) {
69942
70254
  errors.push({
69943
- path: `${path27}.transforms[${i}].id`,
70255
+ path: `${path28}.transforms[${i}].id`,
69944
70256
  message: `Block "${ctx.blockId}": Unknown transform "${transform.id}"`,
69945
70257
  suggestion: `ALLOWED: ${ALLOWED_TRANSFORM_IDS.slice(0, 8).join(", ")}... FIX: Replace with a valid transform ID or remove.`
69946
70258
  });
@@ -69949,7 +70261,7 @@ function validateTransforms(transforms, path27, ctx) {
69949
70261
  }
69950
70262
  return errors;
69951
70263
  }
69952
- function validateBinding(bind2, path27, ctx) {
70264
+ function validateBinding(bind2, path28, ctx) {
69953
70265
  const errors = [];
69954
70266
  if ("from" in bind2 && typeof bind2.from === "string") {
69955
70267
  const bindPath = bind2.from;
@@ -69957,7 +70269,7 @@ function validateBinding(bind2, path27, ctx) {
69957
70269
  const fieldId = bindPath.replace("content.", "").split(".")[0] ?? "";
69958
70270
  if (fieldId && !ctx.fieldIds.has(fieldId)) {
69959
70271
  errors.push({
69960
- path: `${path27}.from`,
70272
+ path: `${path28}.from`,
69961
70273
  message: `Block "${ctx.blockId}": $bind references unknown field "${fieldId}"`,
69962
70274
  suggestion: `DEFINED FIELDS: ${Array.from(ctx.fieldIds).join(", ")}. FIX: Add field { id: '${fieldId}', type: '...' } or use existing field.`
69963
70275
  });
@@ -69965,31 +70277,31 @@ function validateBinding(bind2, path27, ctx) {
69965
70277
  }
69966
70278
  }
69967
70279
  if ("transforms" in bind2 && Array.isArray(bind2.transforms)) {
69968
- errors.push(...validateTransforms(bind2.transforms, path27, ctx));
70280
+ errors.push(...validateTransforms(bind2.transforms, path28, ctx));
69969
70281
  }
69970
70282
  return errors;
69971
70283
  }
69972
- function validateLayoutDeep(node, blockId, fields3, path27 = "layout") {
70284
+ function validateLayoutDeep(node, blockId, fields3, path28 = "layout") {
69973
70285
  const ctx = {
69974
70286
  blockId,
69975
70287
  fieldIds: collectFieldIds(fields3)
69976
70288
  };
69977
- return validateLayoutNode(node, path27, ctx);
70289
+ return validateLayoutNode(node, path28, ctx);
69978
70290
  }
69979
- function validateLayoutNode(node, path27, ctx) {
70291
+ function validateLayoutNode(node, path28, ctx) {
69980
70292
  const errors = [];
69981
70293
  if (!node || typeof node !== "object") {
69982
70294
  return errors;
69983
70295
  }
69984
70296
  const n = node;
69985
70297
  if ("type" in n && typeof n.type === "string") {
69986
- const typeError = validateNodeType(n.type, path27, ctx);
70298
+ const typeError = validateNodeType(n.type, path28, ctx);
69987
70299
  if (typeError) errors.push(typeError);
69988
70300
  }
69989
70301
  if ("$bind" in n && n.$bind && typeof n.$bind === "object") {
69990
70302
  const bindErrors = validateBinding(
69991
70303
  n.$bind,
69992
- `${path27}.$bind`,
70304
+ `${path28}.$bind`,
69993
70305
  ctx
69994
70306
  );
69995
70307
  errors.push(...bindErrors);
@@ -69997,7 +70309,7 @@ function validateLayoutNode(node, path27, ctx) {
69997
70309
  if ("props" in n && n.props && typeof n.props === "object") {
69998
70310
  const propsErrors = validatePropsBindings(
69999
70311
  n.props,
70000
- `${path27}.props`,
70312
+ `${path28}.props`,
70001
70313
  ctx
70002
70314
  );
70003
70315
  errors.push(...propsErrors);
@@ -70006,7 +70318,7 @@ function validateLayoutNode(node, path27, ctx) {
70006
70318
  for (let i = 0; i < n.children.length; i++) {
70007
70319
  const childErrors = validateLayoutNode(
70008
70320
  n.children[i],
70009
- `${path27}.children[${i}]`,
70321
+ `${path28}.children[${i}]`,
70010
70322
  ctx
70011
70323
  );
70012
70324
  errors.push(...childErrors);
@@ -70014,17 +70326,17 @@ function validateLayoutNode(node, path27, ctx) {
70014
70326
  }
70015
70327
  return errors;
70016
70328
  }
70017
- function validatePropsBindings(props2, path27, ctx) {
70329
+ function validatePropsBindings(props2, path28, ctx) {
70018
70330
  const errors = [];
70019
70331
  for (const [key, value] of Object.entries(props2)) {
70020
70332
  if (value && typeof value === "object" && "$bind" in value) {
70021
70333
  const bind2 = value.$bind;
70022
- const bindErrors = validateBinding(bind2, `${path27}.${key}.$bind`, ctx);
70334
+ const bindErrors = validateBinding(bind2, `${path28}.${key}.$bind`, ctx);
70023
70335
  errors.push(...bindErrors);
70024
70336
  } else if (value && typeof value === "object" && !Array.isArray(value)) {
70025
70337
  const nestedErrors = validatePropsBindings(
70026
70338
  value,
70027
- `${path27}.${key}`,
70339
+ `${path28}.${key}`,
70028
70340
  ctx
70029
70341
  );
70030
70342
  errors.push(...nestedErrors);
@@ -70157,7 +70469,7 @@ function collectUsedFieldRefs(node) {
70157
70469
  visit(node, []);
70158
70470
  return { topLevel, nestedByRepeater, itemNameByRepeater };
70159
70471
  }
70160
- function findMissingBindings(node, blockId, path27 = "layout") {
70472
+ function findMissingBindings(node, blockId, path28 = "layout") {
70161
70473
  const errors = [];
70162
70474
  if (!node || typeof node !== "object") {
70163
70475
  return errors;
@@ -70167,15 +70479,15 @@ function findMissingBindings(node, blockId, path27 = "layout") {
70167
70479
  if ("$repeat" in n && n.$repeat && typeof n.$repeat === "object") {
70168
70480
  if (nodeType && CONTENT_NODE_TYPES.includes(nodeType)) {
70169
70481
  errors.push({
70170
- path: path27,
70171
- message: `Block "${blockId}": ${nodeType} node at ${path27} uses $repeat, but content nodes cannot be repeat containers`,
70482
+ path: path28,
70483
+ message: `Block "${blockId}": ${nodeType} node at ${path28} uses $repeat, but content nodes cannot be repeat containers`,
70172
70484
  suggestion: `Move $repeat to a container node (grid/stack/div) and put a ${nodeType} child inside with $bind.from like "item.field".`
70173
70485
  });
70174
70486
  }
70175
70487
  if (!Array.isArray(n.children) || n.children.length === 0) {
70176
70488
  errors.push({
70177
- path: path27,
70178
- message: `Block "${blockId}": node at ${path27} uses $repeat but has no children to repeat`,
70489
+ path: path28,
70490
+ message: `Block "${blockId}": node at ${path28} uses $repeat but has no children to repeat`,
70179
70491
  suggestion: 'Add one or more child nodes under children[] that bind to the repeat item (e.g., $bind.from: "item.text").'
70180
70492
  });
70181
70493
  }
@@ -70184,15 +70496,15 @@ function findMissingBindings(node, blockId, path27 = "layout") {
70184
70496
  const hasBind = "$bind" in n && n.$bind && typeof n.$bind === "object" && "from" in n.$bind;
70185
70497
  if (Array.isArray(n.children) && n.children.length > 0) {
70186
70498
  errors.push({
70187
- path: path27,
70188
- message: `Block "${blockId}": ${nodeType} node at ${path27} has children, but content nodes must have children: null`,
70499
+ path: path28,
70500
+ message: `Block "${blockId}": ${nodeType} node at ${path28} has children, but content nodes must have children: null`,
70189
70501
  suggestion: `Replace this ${nodeType} with a container node (div/stack/inline) and put the ${nodeType} nodes inside it.`
70190
70502
  });
70191
70503
  }
70192
70504
  if (!hasBind) {
70193
70505
  errors.push({
70194
- path: `${path27}`,
70195
- message: `Block "${blockId}": ${nodeType} node at ${path27} has no $bind - it won't display any content`,
70506
+ path: `${path28}`,
70507
+ message: `Block "${blockId}": ${nodeType} node at ${path28} has no $bind - it won't display any content`,
70196
70508
  suggestion: `Add $bind: { from: "content.fieldName" } to connect this ${nodeType} to a field. Example: { "type": "${nodeType}", "$bind": { "from": "content.headline" } }`
70197
70509
  });
70198
70510
  }
@@ -70202,7 +70514,7 @@ function findMissingBindings(node, blockId, path27 = "layout") {
70202
70514
  const childErrors = findMissingBindings(
70203
70515
  n.children[i],
70204
70516
  blockId,
70205
- `${path27}.children[${i}]`
70517
+ `${path28}.children[${i}]`
70206
70518
  );
70207
70519
  errors.push(...childErrors);
70208
70520
  }
@@ -70219,13 +70531,13 @@ function getMaxDepth(node, currentDepth = 0) {
70219
70531
  );
70220
70532
  }
70221
70533
  var CONTAINER_NODE_TYPES = ["section", "stack", "grid", "div", "inline"];
70222
- function detectPotentialTruncation(node, maxAllowedDepth, currentDepth = 0, path27 = "layout") {
70534
+ function detectPotentialTruncation(node, maxAllowedDepth, currentDepth = 0, path28 = "layout") {
70223
70535
  if (!node || typeof node !== "object") return [];
70224
70536
  const n = node;
70225
70537
  const truncatedPaths = [];
70226
70538
  if (currentDepth === maxAllowedDepth && n.children === null) {
70227
70539
  if (CONTAINER_NODE_TYPES.includes(n.type || "")) {
70228
- truncatedPaths.push(`${path27} (${n.type ?? "node"} at depth ${currentDepth})`);
70540
+ truncatedPaths.push(`${path28} (${n.type ?? "node"} at depth ${currentDepth})`);
70229
70541
  }
70230
70542
  }
70231
70543
  if (n.children && Array.isArray(n.children)) {
@@ -70235,7 +70547,7 @@ function detectPotentialTruncation(node, maxAllowedDepth, currentDepth = 0, path
70235
70547
  child,
70236
70548
  maxAllowedDepth,
70237
70549
  currentDepth + 1,
70238
- `${path27}.children[${i}]`
70550
+ `${path28}.children[${i}]`
70239
70551
  )
70240
70552
  );
70241
70553
  });
@@ -70255,8 +70567,8 @@ function formatValidationFeedback(errors, output) {
70255
70567
  `The layout reached the maximum depth of ${MAX_LAYOUT_DEPTH} levels.`
70256
70568
  );
70257
70569
  lines.push("These container nodes at the depth limit have no children:");
70258
- for (const path27 of truncatedPaths) {
70259
- lines.push(` \u26A0\uFE0F ${path27}`);
70570
+ for (const path28 of truncatedPaths) {
70571
+ lines.push(` \u26A0\uFE0F ${path28}`);
70260
70572
  }
70261
70573
  lines.push("");
70262
70574
  lines.push(
@@ -70719,11 +71031,11 @@ var pass3bOutputSchema = z.object({
70719
71031
  customCssAtRules: z.array(llmMediaAtRuleSchema).nullable(),
70720
71032
  rationale: z.string()
70721
71033
  });
70722
- function getNodeAtPath(layout, path27) {
70723
- if (path27 === "" || path27 === "root" || path27 === "layout") {
71034
+ function getNodeAtPath(layout, path28) {
71035
+ if (path28 === "" || path28 === "root" || path28 === "layout") {
70724
71036
  return layout;
70725
71037
  }
70726
- let normalizedPath = path27;
71038
+ let normalizedPath = path28;
70727
71039
  if (normalizedPath.startsWith("layout.")) {
70728
71040
  normalizedPath = normalizedPath.slice(7);
70729
71041
  }
@@ -72410,6 +72722,7 @@ var eventUpsertInputSchema = z.object({
72410
72722
  identifier: z.string().min(1).optional(),
72411
72723
  title: z.string().min(1, "title is required"),
72412
72724
  slug: z.string().min(1).optional(),
72725
+ path: z.string().startsWith("/", "path must start with /").nullable().optional(),
72413
72726
  status: z.enum(["draft", "active", "archived", "cancelled", "completed"]).optional(),
72414
72727
  visibility: z.enum(["private", "public", "unlisted"]).optional(),
72415
72728
  schedule: eventScheduleInputSchema,
@@ -72422,7 +72735,8 @@ var eventUpsertInputSchema = z.object({
72422
72735
  formRef: z.string().nullable().optional(),
72423
72736
  settings: z.record(z.string(), z.unknown()).optional(),
72424
72737
  presentation: z.record(z.string(), z.unknown()).nullable().optional(),
72425
- tags: z.array(z.string()).optional()
72738
+ tags: z.array(z.string()).optional(),
72739
+ blocks: sdkEntrySlotBlocksInputSchema.optional()
72426
72740
  });
72427
72741
  var formatEventRow = (event) => [
72428
72742
  event.identifier,
@@ -73029,9 +73343,6 @@ function mergeLegacyEventIntoCanonical(legacy, event) {
73029
73343
  unmappableFields.push(`data.${key}`);
73030
73344
  }
73031
73345
  }
73032
- if (legacy.entry.blocks && Object.keys(legacy.entry.blocks).length > 0) {
73033
- unmappableFields.push("blocks");
73034
- }
73035
73346
  if (unmappableFields.length > 0) {
73036
73347
  return { tag: "unmappable", fields: unmappableFields.sort() };
73037
73348
  }
@@ -73096,6 +73407,17 @@ function mergeLegacyEventIntoCanonical(legacy, event) {
73096
73407
  conflicts.push(result.field);
73097
73408
  }
73098
73409
  }
73410
+ const blocksResult = mergeBlocks({
73411
+ current: event.blocks,
73412
+ incoming: legacy.entry.blocks,
73413
+ set: (blocks) => ({ ...mergedEvent, blocks })
73414
+ });
73415
+ if (blocksResult.tag === "changed") {
73416
+ mergedEvent = blocksResult.event;
73417
+ mergedFields.push(...blocksResult.fields);
73418
+ } else if (blocksResult.tag === "conflict") {
73419
+ conflicts.push(...blocksResult.fields);
73420
+ }
73099
73421
  if (hasMeaningfulValue(data.presentation)) {
73100
73422
  if (!isRecord21(data.presentation)) {
73101
73423
  return { tag: "unmappable", fields: ["data.presentation"] };
@@ -73127,6 +73449,52 @@ function mergeLegacyEventIntoCanonical(legacy, event) {
73127
73449
  conflicts
73128
73450
  };
73129
73451
  }
73452
+ function mergeBlocks(input) {
73453
+ if (!hasMeaningfulValue(input.incoming)) {
73454
+ return { tag: "ignored" };
73455
+ }
73456
+ const incoming = input.incoming;
73457
+ const current = input.current;
73458
+ if (!incoming) {
73459
+ return { tag: "ignored" };
73460
+ }
73461
+ if (!current || !hasMeaningfulValue(current)) {
73462
+ return {
73463
+ tag: "changed",
73464
+ event: input.set(incoming),
73465
+ fields: Object.keys(incoming).sort().map((slotKey) => `blocks.${slotKey}`)
73466
+ };
73467
+ }
73468
+ const nextBlocks = { ...current };
73469
+ const changedFields = [];
73470
+ const conflictFields = [];
73471
+ for (const slotKey of Object.keys(incoming).sort()) {
73472
+ const incomingBlocks = incoming[slotKey] ?? [];
73473
+ const currentBlocks = current[slotKey];
73474
+ if (currentBlocks === void 0) {
73475
+ nextBlocks[slotKey] = incomingBlocks;
73476
+ changedFields.push(`blocks.${slotKey}`);
73477
+ continue;
73478
+ }
73479
+ if (!valuesMatch(currentBlocks, incomingBlocks)) {
73480
+ conflictFields.push(`blocks.${slotKey}`);
73481
+ }
73482
+ }
73483
+ if (conflictFields.length > 0) {
73484
+ return {
73485
+ tag: "conflict",
73486
+ fields: conflictFields
73487
+ };
73488
+ }
73489
+ if (changedFields.length === 0) {
73490
+ return { tag: "unchanged" };
73491
+ }
73492
+ return {
73493
+ tag: "changed",
73494
+ event: input.set(nextBlocks),
73495
+ fields: changedFields
73496
+ };
73497
+ }
73130
73498
  async function planEventMigration(contentDir) {
73131
73499
  const legacyReadResults = await readLegacyEventEntries(contentDir);
73132
73500
  const invalidLegacyItems = legacyReadResults.filter((result) => result.tag === "invalid").map((result) => ({