@riverbankcms/sdk 0.139.0 → 0.140.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 (196) hide show
  1. package/README.md +1 -1
  2. package/dist/{PreviewEditorSidebar-BDeenhi3.mjs → PreviewEditorSidebar-CUyTzd5z.mjs} +4 -4
  3. package/dist/{PreviewEditorUI-DSRhgjF5.mjs → PreviewEditorUI-Agkw4v5i.mjs} +3 -3
  4. package/dist/{PreviewQueryProvider-D2K8GLUG.mjs → PreviewQueryProvider-CN0ewic5.mjs} +1 -1
  5. package/dist/{SdkPreviewModeRuntime-CL7wSnYu.mjs → SdkPreviewModeRuntime-DdbeAdS8.mjs} +22 -8
  6. package/dist/{SiteChromeCustomizeContext-BhDn-5ir.mjs → SiteChromeCustomizeContext-CqGOz-Kv.mjs} +2053 -1110
  7. package/dist/_dts/ai/src/contracts/proposals.d.ts +165 -165
  8. package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +212 -212
  9. package/dist/_dts/api/src/accessAdmin.d.ts +74 -104
  10. package/dist/_dts/api/src/aiEndpoints.d.ts +5 -1
  11. package/dist/_dts/api/src/authSubmission.d.ts +46 -0
  12. package/dist/_dts/api/src/billing.d.ts +8 -4
  13. package/dist/_dts/api/src/billingEndpointDefinitions.d.ts +23 -0
  14. package/dist/_dts/api/src/billingEndpointTypes.d.ts +26 -0
  15. package/dist/_dts/api/src/blocks.d.ts +2 -0
  16. package/dist/_dts/api/src/bookingRecords.d.ts +1 -2
  17. package/dist/_dts/api/src/commercePortalEndpoints.d.ts +8 -1
  18. package/dist/_dts/api/src/communications.d.ts +0 -1
  19. package/dist/_dts/api/src/contentRuntime.d.ts +8 -3
  20. package/dist/_dts/api/src/endpoints.d.ts +93 -64
  21. package/dist/_dts/api/src/event-destination-policy.d.ts +2 -1
  22. package/dist/_dts/api/src/footerSettings.d.ts +9 -6
  23. package/dist/_dts/api/src/index.d.ts +5 -6
  24. package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
  25. package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
  26. package/dist/_dts/api/src/mailingListIntegration.d.ts +8 -2
  27. package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +1 -1
  28. package/dist/_dts/api/src/navigation/types.d.ts +1 -1
  29. package/dist/_dts/api/src/onboarding/confirmationResend.d.ts +25 -0
  30. package/dist/_dts/api/src/onboarding/surfaceData.d.ts +32 -32
  31. package/dist/_dts/api/src/publicBookingAvailabilityEndpointDefinitions.d.ts +8 -0
  32. package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +1 -0
  33. package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +11 -3
  34. package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +3 -29
  35. package/dist/_dts/api/src/publicOnboardingAttemptEndpointDefinitions.d.ts +65 -0
  36. package/dist/_dts/api/src/saveOutcome.d.ts +20 -0
  37. package/dist/_dts/api/src/sdkContracts.d.ts +3 -22
  38. package/dist/_dts/api/src/sdkPushContracts.d.ts +18 -0
  39. package/dist/_dts/api/src/sdkThemeWire.d.ts +44 -44
  40. package/dist/_dts/api/src/settings/permissions.d.ts +12 -0
  41. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +9 -5
  42. package/dist/_dts/api/src/siteOnboarding.d.ts +2 -9
  43. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +2 -4
  44. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +3 -1
  45. package/dist/_dts/api/src/siteSettings.d.ts +20 -7
  46. package/dist/_dts/api/src/types.d.ts +77 -77
  47. package/dist/_dts/api/src/wholeSeriesRuns.d.ts +2 -37
  48. package/dist/_dts/billing/src/membership/index.d.ts +3 -0
  49. package/dist/_dts/billing/src/plans/types.d.ts +3 -0
  50. package/dist/_dts/billing/src/site-arrangements.d.ts +14 -3
  51. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +16 -4
  52. package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +2 -0
  53. package/dist/_dts/blocks/src/pageRendererContracts.d.ts +5 -0
  54. package/dist/_dts/blocks/src/portal/types.d.ts +2 -4
  55. package/dist/_dts/blocks/src/portal/waitlist-types.d.ts +35 -0
  56. package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +2 -0
  57. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +42 -0
  58. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -0
  59. package/dist/_dts/blocks/src/system/data/index.d.ts +2 -2
  60. package/dist/_dts/blocks/src/system/data/prefetchBlockData.d.ts +2 -1
  61. package/dist/_dts/blocks/src/system/data/types.d.ts +9 -0
  62. package/dist/_dts/blocks/src/system/registry.d.ts +1 -0
  63. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +0 -28
  64. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
  65. package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +7 -3
  66. package/dist/_dts/blocks/src/system/runtime/api/types/portal.d.ts +1 -1
  67. package/dist/_dts/blocks/src/system/runtime/api/types/waitlist-claims.d.ts +7 -2
  68. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +30 -6
  69. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +15 -3
  70. package/dist/_dts/blocks/src/system/runtime/nodes/appointment-services.d.ts +43 -0
  71. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +1 -2
  72. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +2 -0
  73. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/checkoutRecovery.d.ts +14 -0
  74. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventSourceRecovery.d.ts +56 -0
  75. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +6 -8
  76. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useCheckoutRecovery.d.ts +8 -0
  77. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +8 -7
  78. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +10 -2
  79. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventSourceRecovery.d.ts +18 -0
  80. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.client.d.ts +1 -1
  81. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +24 -6
  82. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +4 -2
  83. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +6 -0
  84. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +1 -0
  85. package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +1 -0
  86. package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -6
  87. package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
  88. package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +2 -0
  89. package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +4 -0
  90. package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +27 -4
  91. package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +2 -1
  92. package/dist/_dts/content-editor/src/hooks/useBlockAutosave.d.ts +3 -1
  93. package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +3 -0
  94. package/dist/_dts/core/src/branded.d.ts +0 -8
  95. package/dist/_dts/core/src/index.d.ts +1 -0
  96. package/dist/_dts/core/src/mailing-list-setup-parser.d.ts +1 -1
  97. package/dist/_dts/core/src/mailing-list-setup.d.ts +14 -1
  98. package/dist/_dts/core/src/mailing-list-submission.d.ts +7 -27
  99. package/dist/_dts/core/src/participants.d.ts +2 -29
  100. package/dist/_dts/core/src/public-experience.d.ts +4 -0
  101. package/dist/_dts/core/src/public-profile.d.ts +27 -1
  102. package/dist/_dts/core/src/site-route-target.d.ts +9 -2
  103. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +293 -606
  104. package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/MailingListGlobalSettingsSummary.d.ts +10 -0
  105. package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/MailingListTargetingField.d.ts +3 -2
  106. package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/context.d.ts +3 -2
  107. package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/loaders.d.ts +3 -2
  108. package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/targetingState.d.ts +19 -0
  109. package/dist/_dts/sdk/src/public-api/contracts.d.ts +14 -20
  110. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
  111. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -0
  112. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +7 -1
  113. package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +1 -0
  114. package/dist/_dts/sdk/src/version.d.ts +1 -1
  115. package/dist/_dts/theme-core/src/accordions/types.d.ts +3 -3
  116. package/dist/_dts/theme-core/src/cards/types.d.ts +21 -21
  117. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  118. package/dist/_dts/theme-core/src/header/interactionPalette.d.ts +8 -2
  119. package/dist/_dts/theme-core/src/header/legacyHeaderVariant.d.ts +2 -2
  120. package/dist/_dts/theme-core/src/inputs/types.d.ts +2 -2
  121. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +54 -54
  122. package/dist/_dts/theme-core/src/runtime/buildThemeRuntimeFromBridge.d.ts +1 -4
  123. package/dist/_dts/theme-core/src/schema.d.ts +84 -84
  124. package/dist/_dts/theme-core/src/shared/componentStyles.d.ts +1 -1
  125. package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
  126. package/dist/_dts/theme-core/src/surfaces/foregroundInteraction.d.ts +77 -0
  127. package/dist/_dts/theme-core/src/surfaces/index.d.ts +1 -0
  128. package/dist/_dts/theme-core/src/typography/generateTypographyCss.d.ts +2 -2
  129. package/dist/_dts/ui/src/lib/use-delayed-flag.d.ts +9 -0
  130. package/dist/_dts/ui/src/pending-button.d.ts +10 -0
  131. package/dist/client/{BookingConsentAgreement-CZvTDtsK.mjs → BookingConsentAgreement-CuKa82V4.mjs} +4 -4
  132. package/dist/client/{DiscountCodeDisclosure-D-DsLCMU.mjs → DiscountCodeDisclosure-BbYieKWB.mjs} +1 -1
  133. package/dist/client/{EventCombined.client-dWqgd5ZO.mjs → EventCombined.client-LTfR1Aby.mjs} +6 -6
  134. package/dist/client/{EventListing.client-BMRa9IYp.mjs → EventListing.client-DUHpYSuo.mjs} +2 -2
  135. package/dist/client/{LeafletStaticMap-D21W9kBZ.mjs → LeafletStaticMap-CHRupL6m.mjs} +1 -1
  136. package/dist/client/{accordion-FxF_ta47.mjs → accordion-6HiIFxNL.mjs} +1 -1
  137. package/dist/client/{bookingForm-YnwW4TGw.mjs → bookingForm-Dlmid43H.mjs} +7 -7
  138. package/dist/client/bookings.mjs +325 -140
  139. package/dist/client/{carousel-vng7fFT5.mjs → carousel-DmkZRRq_.mjs} +2 -2
  140. package/dist/client/{carousel.client-59G_WMr4.mjs → carousel.client-DQTjCVQT.mjs} +1 -1
  141. package/dist/client/{cart-DEPDsjNk.mjs → cart-CIC24330.mjs} +3 -3
  142. package/dist/client/{checkout-CZRWu9rW.mjs → checkout-D1Zw9imo.mjs} +3 -3
  143. package/dist/client/{checkoutUrls-BuseL0dw.mjs → checkoutUrls-FL6lRkrt.mjs} +1 -1
  144. package/dist/client/client.mjs +1717 -882
  145. package/dist/client/{colorStyles-CrxJrPjJ.mjs → colorStyles-3013aRAY.mjs} +3 -1
  146. package/dist/client/{context-DvU_WUmd.mjs → context-Cy1OayHx.mjs} +6 -19
  147. package/dist/client/{dates-wnPMiRl5.mjs → dates-aDcfoLHr.mjs} +2 -2
  148. package/dist/client/{eventCalendar-BA3Q5L15.mjs → eventCalendar-FQxMPAjf.mjs} +8 -8
  149. package/dist/client/{eventCombined-51wgR-1R.mjs → eventCombined-Dr3ac6Hb.mjs} +3 -3
  150. package/dist/client/{eventDetails-modaetpm.mjs → eventDetails-D-AzUHFQ.mjs} +4 -4
  151. package/dist/client/{eventListing-D8t2J3Kv.mjs → eventListing-B3XxBf3i.mjs} +3 -3
  152. package/dist/client/{eventRegistration-CYqtkCE_.mjs → eventRegistration-I6EaokFD.mjs} +500 -152
  153. package/dist/client/{form-CBKXN5In.mjs → form-BbWckVWY.mjs} +3 -3
  154. package/dist/client/{headerSection-DylDqNrs.mjs → headerSection-C9qU4Y7x.mjs} +2 -2
  155. package/dist/client/hooks.mjs +445 -180
  156. package/dist/client/{locationMap-CvWrG0vZ.mjs → locationMap-CLCShvlG.mjs} +3 -3
  157. package/dist/client/{media-BOHuueS5.mjs → media-DHpfFwd3.mjs} +1 -1
  158. package/dist/client/{newsletterForm-Btwk70zw.mjs → newsletterForm-Briukxzi.mjs} +130 -87
  159. package/dist/client/{pricing-Uzw-GQ6Y.mjs → pricing-Copadu-2.mjs} +1 -1
  160. package/dist/client/{productDetail-JLcUYKnd.mjs → productDetail-oujlRd-r.mjs} +3 -3
  161. package/dist/client/{productList-FM0cbUzj.mjs → productList-BRiIRUcd.mjs} +3 -3
  162. package/dist/client/{propsDecoder-DYzafZb2.mjs → propsDecoder-CB2KS_ko.mjs} +130 -24
  163. package/dist/client/rendering/client.mjs +911 -400
  164. package/dist/client/rendering/islands.mjs +19 -19
  165. package/dist/client/rendering.mjs +1696 -818
  166. package/dist/client/{scrollToBlock-CvXszexS.mjs → scrollToBlock-B1IS1_ua.mjs} +1 -1
  167. package/dist/client/{shop-BIcjvy5a.mjs → shop-Vn6yNFED.mjs} +6 -6
  168. package/dist/client/{shop-commerce-BZQsy7xw.mjs → shop-commerce-BVTqipYp.mjs} +7 -7
  169. package/dist/client/{shop-commerce-store-D5V7XAb5.mjs → shop-commerce-store-BVnJVy7v.mjs} +1 -1
  170. package/dist/client/{shopShared-DowkXevB.mjs → shopShared-COIeK77T.mjs} +4 -4
  171. package/dist/client/{useEventFilters-oMoTw_JE.mjs → useEventFilters-DzIUcS9n.mjs} +7 -7
  172. package/dist/preview-next/before-render.mjs +119 -64
  173. package/dist/preview-next/client/runtime.mjs +4 -4
  174. package/dist/preview-next/keepAlive.mjs +119 -64
  175. package/dist/preview-next/middleware.mjs +119 -64
  176. package/dist/{previewAuthStore-COUyAKaX.mjs → previewAuthStore-Gjb6r6vz.mjs} +119 -64
  177. package/dist/{sdk-runtime-D4k2LSGF.mjs → sdk-runtime-CnCLvZRv.mjs} +2 -2
  178. package/dist/{separator-UGtpag4Z.mjs → separator-DKDRJ1oH.mjs} +1 -1
  179. package/dist/server/components.mjs +787 -323
  180. package/dist/server/config-validation.mjs +328 -79
  181. package/dist/server/config.mjs +332 -83
  182. package/dist/server/data.mjs +441 -180
  183. package/dist/server/index.mjs +126 -66
  184. package/dist/server/next.mjs +1031 -595
  185. package/dist/server/page-converter.mjs +183 -74
  186. package/dist/server/prebuild.mjs +1 -1
  187. package/dist/server/rendering/server.mjs +1068 -592
  188. package/dist/server/rendering.mjs +802 -324
  189. package/dist/server/routing.mjs +506 -214
  190. package/dist/server/server.mjs +468 -244
  191. package/dist/server/theme-bridge.mjs +433 -100
  192. package/dist/server/theme.mjs +8 -2
  193. package/dist/styles/index.css +237 -43
  194. package/package.json +1 -1
  195. package/dist/_dts/blocks/src/system/runtime/shared/components/BookingOptionCompactRow.d.ts +0 -29
  196. package/dist/_dts/blocks/src/system/runtime/shared/components/BookingOptionList.d.ts +0 -13
@@ -1,4 +1,4 @@
1
- import { E as ok$1, T as err$1, a as paletteColorEntries, c as themeColorTokenSchema, g as parseEventSeriesId, h as parseEventOfferingId, l as parseColorTokenParts, o as paletteColorsFromEntries, p as parseAspectRatioValue, r as rgbColorValue, s as parseThemeColorToken } from "./colorStyles-CrxJrPjJ.mjs";
1
+ import { D as ok$1, E as err$1, _ as parseEventSeriesId, a as paletteColorEntries, c as themeColorTokenSchema, g as parseEventOfferingId, h as parseContentVersionId, l as parseColorTokenParts, o as paletteColorsFromEntries, p as parseAspectRatioValue, r as rgbColorValue, s as parseThemeColorToken } from "./colorStyles-3013aRAY.mjs";
2
2
  import "react";
3
3
  import { z } from "zod";
4
4
  import "react/jsx-runtime";
@@ -710,6 +710,9 @@ function parseBrevoListId(value) {
710
710
  return parsePositiveInteger(value);
711
711
  }
712
712
  //#endregion
713
+ //#region ../core/src/mailing-list-setup.ts
714
+ const DEFAULT_MAILING_LIST_SUCCESS_MESSAGE = "Thanks — you're on the list.";
715
+ //#endregion
713
716
  //#region ../core/src/mailing-list-setup-parser.ts
714
717
  function parseMailingListGlobalForm(value) {
715
718
  if (!isRecord$7(value)) return formError("shape");
@@ -718,12 +721,15 @@ function parseMailingListGlobalForm(value) {
718
721
  if (typeof value.includeOptionalPhone !== "boolean") return formError("includeOptionalPhone");
719
722
  const buttonLabel = parseRequiredString(value.buttonLabel);
720
723
  if (buttonLabel === null) return formError("buttonLabel");
724
+ const successMessage = parseRequiredString(value.successMessage);
725
+ if (successMessage === null) return formError("successMessage");
721
726
  const privacyNote = parseOptionalString(value.privacyNote);
722
727
  if (privacyNote === void 0) return formError("privacyNote");
723
728
  return ok$1({
724
729
  fields,
725
730
  includeOptionalPhone: value.includeOptionalPhone,
726
731
  buttonLabel,
732
+ successMessage,
727
733
  privacyNote
728
734
  });
729
735
  }
@@ -1097,11 +1103,17 @@ function parseMailingListSignedSourceToken(value) {
1097
1103
  const parsed = typeof value === "string" ? value.trim() : "";
1098
1104
  return /^[A-Za-z0-9._~-]{16,1000}$/u.test(parsed) ? parsed : null;
1099
1105
  }
1100
- function buildMailingListSignupBlockSourceRef(blockId) {
1101
- const parsed = parseMailingListBlockId(blockId);
1102
- return parsed !== null ? {
1106
+ function parseMailingListContentVersionId(value) {
1107
+ const parsed = parseContentVersionId(value);
1108
+ return parsed.ok ? parsed.value : null;
1109
+ }
1110
+ function buildMailingListSignupBlockSourceRef(blockId, contentVersionId) {
1111
+ const parsedBlockId = parseMailingListBlockId(blockId);
1112
+ const parsedContentVersionId = parseMailingListContentVersionId(contentVersionId);
1113
+ return parsedBlockId !== null && parsedContentVersionId !== null ? {
1103
1114
  tag: "block_ref",
1104
- blockId: parsed
1115
+ blockId: parsedBlockId,
1116
+ contentVersionId: parsedContentVersionId
1105
1117
  } : null;
1106
1118
  }
1107
1119
  //#endregion
@@ -5828,8 +5840,14 @@ const headerInteractionPillPaletteValues = [
5828
5840
  "accent"
5829
5841
  ];
5830
5842
  /**
5831
- * "No pill": the nav link keeps whatever hover treatment its recipe compiled,
5832
- * and the palette step writes nothing at all (#1318 Phase 4c decision 2).
5843
+ * "No pill": a colour change on hover rather than a filled background.
5844
+ *
5845
+ * The palette step writes nothing (#1318 Phase 4c decision 2), but on a
5846
+ * foreground-adaptive style that is not the end of the story: the hover colour
5847
+ * is derived from the resolved opening foreground at render time, paired with
5848
+ * the resting colour, so `quiet` resolves to a definite colour rather than to
5849
+ * whatever brand token the recipe happened to name. See
5850
+ * `applyOpeningForeground`.
5833
5851
  *
5834
5852
  * It exists because "a colour change on hover, no filled background" was not
5835
5853
  * expressible in the vocabulary, and it is what
@@ -6645,6 +6663,28 @@ z.object({
6645
6663
  });
6646
6664
  //#endregion
6647
6665
  //#region ../blocks/src/system/blocks/events/shared/schemas.ts
6666
+ const publicEventLoaderQuerySchemaShape = {
6667
+ limit: z.string().optional(),
6668
+ from: z.string().optional(),
6669
+ to: z.string().optional(),
6670
+ afterStartsAt: z.string().optional(),
6671
+ afterId: z.string().optional(),
6672
+ categoryIds: z.string().optional(),
6673
+ venueId: z.string().optional(),
6674
+ staffMemberId: z.string().optional(),
6675
+ eventSurface: z.string().optional(),
6676
+ eventPresets: z.string().optional(),
6677
+ scheduleScope: z.string().optional(),
6678
+ seriesId: z.string().optional(),
6679
+ seriesIds: z.string().optional(),
6680
+ runSeriesId: z.string().optional(),
6681
+ seriesSlug: z.string().optional(),
6682
+ includeOccurrenceId: z.string().optional(),
6683
+ readIntent: z.string().optional(),
6684
+ detailLevel: z.string().optional(),
6685
+ readProfile: z.string().optional()
6686
+ };
6687
+ z.object(publicEventLoaderQuerySchemaShape);
6648
6688
  const eventPresetSchema = z.enum([
6649
6689
  "event",
6650
6690
  "class",
@@ -7525,7 +7565,7 @@ function planCalendarMonthRanges(months) {
7525
7565
  const sorted = [...new Set(months)].sort();
7526
7566
  const ranges = [];
7527
7567
  for (const month of sorted) {
7528
- const previous = ranges.at(-1);
7568
+ const previous = ranges[ranges.length - 1];
7529
7569
  const end = calendarMonthKey(addMonths(calendarMonthDate(month), 1));
7530
7570
  if (previous?.endMonthExclusive === month && monthNumber(end) - monthNumber(previous.startMonth) <= 3) previous.endMonthExclusive = end;
7531
7571
  else ranges.push({
@@ -10832,6 +10872,44 @@ function getRegistrationStartAt(event, occurrenceContext) {
10832
10872
  return event?.registrationSubject.kind === "wholeSeries" ? event.startsAt : occurrenceContext?.startsAt ?? event?.startsAt;
10833
10873
  }
10834
10874
  //#endregion
10875
+ //#region ../blocks/src/system/runtime/nodes/event-registration/eventSourceRecovery.ts
10876
+ const { limit: _rawLimit, eventSurface: _rawEventSurface, scheduleScope: _rawScheduleScope, detailLevel: _rawDetailLevel, ...stringEventQueryShape } = publicEventLoaderQuerySchemaShape;
10877
+ const eventRecoveryRequestSchema = z.object({
10878
+ ...stringEventQueryShape,
10879
+ limit: z.coerce.number().int().positive().optional(),
10880
+ eventSurface: z.enum(eventSurfaceScopeValues).optional(),
10881
+ scheduleScope: z.enum(eventScheduleScopeValues).optional(),
10882
+ detailLevel: z.enum(["full", "listing"]).optional(),
10883
+ stage: z.enum(["preview", "published"]).optional()
10884
+ });
10885
+ function resolveEventRegistrationEventSource(input) {
10886
+ if (input.wholeSeriesRunEvents != null) return {
10887
+ kind: "loaded",
10888
+ events: input.wholeSeriesRunEvents
10889
+ };
10890
+ if (input.events != null) return {
10891
+ kind: "loaded",
10892
+ events: input.events
10893
+ };
10894
+ return {
10895
+ kind: "unresolved",
10896
+ request: parseEventLoaderRecoveryRequest(input.failures?.wholeSeriesRunEvents ?? input.failures?.events)
10897
+ };
10898
+ }
10899
+ const eventLoaderFailureSchema = z.object({
10900
+ endpoint: z.literal("listPublicEvents"),
10901
+ params: eventRecoveryRequestSchema.extend({ siteId: z.string().optional() })
10902
+ });
10903
+ function parseEventLoaderRecoveryRequest(value) {
10904
+ const parsed = eventLoaderFailureSchema.safeParse(value);
10905
+ if (!parsed.success) return null;
10906
+ const { siteId: _siteId, stage, ...params } = parsed.data.params;
10907
+ return {
10908
+ ...params,
10909
+ stage: stage ?? "published"
10910
+ };
10911
+ }
10912
+ //#endregion
10835
10913
  //#region ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
10836
10914
  const EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS = [
10837
10915
  "Date",
@@ -10849,8 +10927,6 @@ const eventRegistrationPublicEventSchema = z.preprocess(normalizeEventRegistrati
10849
10927
  const eventRegistrationHydrationSchemaShape = {
10850
10928
  occurrenceContext: occurrenceContextSchema.optional(),
10851
10929
  subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
10852
- events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
10853
- wholeSeriesRunEvents: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
10854
10930
  maxTickets: z.string().optional(),
10855
10931
  showVenue: z.boolean().optional(),
10856
10932
  showCapacity: z.boolean().optional(),
@@ -10862,12 +10938,22 @@ const eventRegistrationHydrationSchemaShape = {
10862
10938
  sitePasses: publicPassProductCollectionSchema.nullable().optional(),
10863
10939
  siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
10864
10940
  };
10941
+ const eventRegistrationEventSourceSchema = z.discriminatedUnion("kind", [z.object({
10942
+ kind: z.literal("loaded"),
10943
+ events: z.array(eventRegistrationPublicEventSchema)
10944
+ }), z.object({
10945
+ kind: z.literal("unresolved"),
10946
+ request: eventRecoveryRequestSchema.nullable()
10947
+ })]);
10865
10948
  const eventRegistrationSourceSchema = z.object({
10866
10949
  siteId: z.string().optional(),
10867
10950
  apiBaseUrl: z.string().optional(),
10868
10951
  portalToken: z.string().nullable().optional(),
10869
10952
  previewToken: z.string().nullable().optional(),
10870
10953
  ...eventRegistrationHydrationSchemaShape,
10954
+ events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
10955
+ wholeSeriesRunEvents: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
10956
+ eventLoaderFailures: z.record(z.string(), z.unknown()).nullable().optional(),
10871
10957
  className: z.string().nullable().optional(),
10872
10958
  buttonText: z.string().nullable().optional(),
10873
10959
  maxTickets: z.string().nullable().optional(),
@@ -10888,7 +10974,10 @@ const eventRegistrationDisplaySchema = z.discriminatedUnion("state", [z.object({
10888
10974
  titleText: z.string(),
10889
10975
  bodyText: z.string()
10890
10976
  })]);
10891
- const eventRegistrationHydrationSchema = z.object(eventRegistrationHydrationSchemaShape);
10977
+ const eventRegistrationHydrationSchema = z.object({
10978
+ ...eventRegistrationHydrationSchemaShape,
10979
+ eventSource: eventRegistrationEventSourceSchema
10980
+ });
10892
10981
  const eventRegistrationRenderSchema = z.object({
10893
10982
  display: eventRegistrationDisplaySchema,
10894
10983
  hydration: eventRegistrationHydrationSchema
@@ -10948,16 +11037,12 @@ function buildEventRegistrationShellStepLabels(source, scopedSourceEvents) {
10948
11037
  function toScopedEventRegistrationEvents(scopedSourceEvents) {
10949
11038
  return [...toRegistrationEvents(scopedSourceEvents), ...toWholeSeriesRegistrationEvents(scopedSourceEvents)];
10950
11039
  }
10951
- function scopeEventRegistrationSourceEvents(source) {
10952
- return resolveEventRegistrationScopedEvents(source.wholeSeriesRunEvents ?? source.events ?? [], {
11040
+ function scopeEventRegistrationSourceEvents(source, eventSource) {
11041
+ return resolveEventRegistrationScopedEvents(eventSource.kind === "loaded" ? eventSource.events : [], {
10953
11042
  occurrenceContext: source.occurrenceContext,
10954
11043
  subject: source.subject
10955
11044
  });
10956
11045
  }
10957
- function resolveLoadedEventRegistrationSourceEvents(source, scopedSourceEvents) {
10958
- if (source.events == null && source.wholeSeriesRunEvents == null) return null;
10959
- return [...scopedSourceEvents];
10960
- }
10961
11046
  /**
10962
11047
  * The one run this surface is registering for, when the scoped events describe
10963
11048
  * exactly one. More than one run means the visitor still has to choose.
@@ -10997,14 +11082,21 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
10997
11082
  render: createZodCodec(eventRegistrationRenderSchema)
10998
11083
  },
10999
11084
  buildRender: (source) => {
11000
- const scopedSourceEvents = scopeEventRegistrationSourceEvents(source);
11001
- const events = resolveLoadedEventRegistrationSourceEvents(source, scopedSourceEvents);
11085
+ const eventSource = resolveEventRegistrationEventSource({
11086
+ events: source.events,
11087
+ wholeSeriesRunEvents: source.wholeSeriesRunEvents,
11088
+ failures: source.eventLoaderFailures
11089
+ });
11090
+ const scopedSourceEvents = scopeEventRegistrationSourceEvents(source, eventSource);
11002
11091
  return {
11003
11092
  display: buildEventRegistrationDisplayFromScopedEvents(source, scopedSourceEvents),
11004
11093
  hydration: {
11005
11094
  occurrenceContext: source.occurrenceContext ?? null,
11006
11095
  subject: source.subject ?? null,
11007
- events,
11096
+ eventSource: eventSource.kind === "loaded" ? {
11097
+ ...eventSource,
11098
+ events: [...scopedSourceEvents]
11099
+ } : eventSource,
11008
11100
  maxTickets: source.maxTickets ?? void 0,
11009
11101
  showVenue: source.showVenue,
11010
11102
  showCapacity: source.showCapacity,
@@ -11396,6 +11488,15 @@ const newsletterFieldSchema = z.object({
11396
11488
  placeholder: z.string().optional()
11397
11489
  });
11398
11490
  const mailingListSignupBlockIdSchema = z.string().trim().min(1).transform(parseRequiredMailingListSignupBlockId);
11491
+ const mailingListContentVersionIdSchema = z.string().transform((value, ctx) => {
11492
+ const parsed = parseMailingListContentVersionId(value);
11493
+ if (parsed) return parsed;
11494
+ ctx.addIssue({
11495
+ code: z.ZodIssueCode.custom,
11496
+ message: "Invalid mailing-list content version ID"
11497
+ });
11498
+ return z.NEVER;
11499
+ });
11399
11500
  const signedMailingListSourceTokenSchema = z.string().trim().min(1).transform(parseRequiredMailingListSignedSourceToken);
11400
11501
  const newsletterSourceCommonSchema = z.object({
11401
11502
  siteId: z.string().optional(),
@@ -11409,7 +11510,8 @@ const newsletterSourceCommonSchema = z.object({
11409
11510
  const newsletterSourceSchema = z.discriminatedUnion("source", [
11410
11511
  newsletterSourceCommonSchema.extend({
11411
11512
  source: z.literal("block"),
11412
- blockId: z.string().nullable().optional()
11513
+ blockId: z.string().nullable().optional(),
11514
+ contentVersionId: z.string().nullable().optional()
11413
11515
  }),
11414
11516
  newsletterSourceCommonSchema.extend({
11415
11517
  source: z.literal("signed-footer"),
@@ -11425,6 +11527,7 @@ const newsletterDisplaySchema = z.object({
11425
11527
  availability: z.enum(["ready", "unavailable"]),
11426
11528
  className: z.string().nullable(),
11427
11529
  buttonLabel: z.string(),
11530
+ successMessage: z.string(),
11428
11531
  buttonVariant: newsletterButtonVariantSchema,
11429
11532
  privacyNote: z.string().nullable(),
11430
11533
  fields: z.array(newsletterFieldSchema),
@@ -11439,7 +11542,8 @@ const newsletterHydrationSchema = z.object({
11439
11542
  tag: z.literal("block-source"),
11440
11543
  sourceRef: z.object({
11441
11544
  tag: z.literal("block_ref"),
11442
- blockId: mailingListSignupBlockIdSchema
11545
+ blockId: mailingListSignupBlockIdSchema,
11546
+ contentVersionId: mailingListContentVersionIdSchema
11443
11547
  }).nullable()
11444
11548
  }),
11445
11549
  z.object({
@@ -11479,6 +11583,7 @@ function buildNewsletterDisplay(source) {
11479
11583
  fields: { preset: "emailOnly" },
11480
11584
  includeOptionalPhone: false,
11481
11585
  buttonLabel: "Subscribe",
11586
+ successMessage: DEFAULT_MAILING_LIST_SUCCESS_MESSAGE,
11482
11587
  privacyNote: null
11483
11588
  };
11484
11589
  const targeting = source.targeting ?? { mode: "default" };
@@ -11488,6 +11593,7 @@ function buildNewsletterDisplay(source) {
11488
11593
  availability: runtimeTargetingIsAvailable(context, targeting, choices) ? "ready" : "unavailable",
11489
11594
  className: source.className ?? null,
11490
11595
  buttonLabel: form.buttonLabel,
11596
+ successMessage: form.successMessage,
11491
11597
  buttonVariant: source.buttonVariant ?? "primary",
11492
11598
  privacyNote: form.privacyNote,
11493
11599
  fields: getGlobalFormFields(form),
@@ -11518,7 +11624,7 @@ const newsletterFormBlockRuntime = defineProgressiveBlockRuntime({
11518
11624
  function projectNewsletterFormHydrationTarget(source) {
11519
11625
  switch (source.source) {
11520
11626
  case "block": {
11521
- const sourceRef = buildMailingListSignupBlockSourceRef(source.blockId);
11627
+ const sourceRef = buildMailingListSignupBlockSourceRef(source.blockId, source.contentVersionId);
11522
11628
  if (sourceRef?.tag === "block_ref") return {
11523
11629
  tag: "block-source",
11524
11630
  sourceRef
@@ -12515,4 +12621,4 @@ function defineIslandPropsDecoder(kind) {
12515
12621
  };
12516
12622
  }
12517
12623
  //#endregion
12518
- export { getOrderedDayNames as $, resolveBookingTimeZoneId as $t, isSemanticSpacing as A, isBookingRequirementConsentFieldId as At, buildEventRuntimeFilters as B, CANCELLED_SESSION_STATUS as Bt, WIZARD_STEPS as C, resolveBookingPaymentStep as Ct, staticHeaderChromeRuntime as D, projectSelectedAppointmentConsentIntoForm as Dt, buildEventCalendarListingRender as E, toSelectedCollectionOptionKind as Et, calendarWindowBounds as F, err as Ft, getCardOrientation as G, formatBookingDateParts as Gt, normalizeCsvIds as H, parseMailingListVisitorSelection as Ht, calendarWindowMonths as I, ok as It, addDays as J, formatBookingTime as Jt, getContainerClass as K, formatBookingDateTime as Kt, calendarWindowPageSchema as L, okWith as Lt, calendarMonthDate as M, isRecord$4 as Mt, calendarPageResponseError as N, assertNever$1 as Nt, resolveEventRegistrationScopedEvents as O, resolveSelectedAppointmentConsent as Ot, calendarQueryKey as P, clearWorkflowFeedback as Pt, getDayOfWeek as Q, parseBookingLocalDate as Qt, planCalendarMonthRanges as R, reportWorkflowError as Rt, resolveRegistrationTarget as S, resolveAppointmentCheckoutVerificationState as St, getWizardStepsForContext as T, resolveDefaultBookingServiceId as Tt, normalizeCsvString as U, addLocalScheduleDays as Ut, getEventRuntimeFiltersKey as V, resolveWholeSeriesBookingPhase as Vt, normalizeOptionalId as W, formatBookingDate as Wt, buildCalendarViewport as X, getBookingLocalDateKey as Xt, addMonths as Y, formatLocalScheduleDate as Yt, formatDateKey as Z, getLocalScheduleDate as Zt, toWholeSeriesRegistrationEvents as _, getBookingServiceSlidingScale as _t, buildProductDetailDisplay as a, isPublicEventPricingOptionDisplayable as an, groupPublicEventsByRun as at, resolveDiscountContext as b, parseBookingCurrencyInputToCents as bt, EMPTY_COMMERCE_CART_STATE as c, publicEventPricingOptions as cn, resolveOnColorForThemeToken as ct, deriveCommerceCheckoutState as d, formatCurrencyAmount as dn, normalizeCardRole as dt, toBookingTimeZone as en, getWeekCalendarDays as et, parseStoredCommerceCartState as f, parseCurrencyCode as fn, logger as ft, toRegistrationEvents as g, getBookingRedirectStateFromLocation as gt, getRegistrationStartAt as h, formatBookingSubmissionPreparationError as ht, buildProductCardDisplay as i, formatEventPricing as in, resolveRuntimeEventDestination as it, resolveSpacing as j, RichTextDocSchema as jt, SEMANTIC_SPACING_VALUES as k, BOOKING_FORM_DATA_RESERVED_KEYS as kt, buildPassCartItem as l, publicEventPricingStrategy as ln, resolveTokenOrCssColorValue as lt, reduceCommerceCart as m, formatBookingCentsAsCurrencyInput as mt, getShopDisplayForItems as n, toScheduledBookingDateTime as nn, isToday as nt, formatCommercePrice as o, publicEventPricingCurrency as on, boxBackgroundSchema as ot, productItemKey as p, assertNever$2 as pn, deriveBookingFormViewState as pt, MONTH_NAMES as q, formatBookingInstant as qt, buildCartDisplay as r, formatBookingPriceDisplay as rn, shiftCalendarAnchorDate as rt, formatInterval as s, publicEventPricingDisplay as sn, isCssColorLiteral as st, defineIslandPropsDecoder as t, toScheduledBookingDateRange as tn, isSameCalendarDay as tt, buildProductCartItem as u, publicEventPricingType as un, themeButtonClassName as ut, findEventByOccurrenceId as v, getBookingSuccessMessage as vt, getStepNumber as w, resolveBookingSiteId as wt, resolveEventRequiresPayment as x, prepareBookingSubmission as xt, findPreSelectedEvent as y, isBookingServiceSlidingAmountInRange as yt, resolveCalendarReadProfile as z, reportWorkflowSuccess as zt };
12624
+ export { getDayOfWeek as $, parseBookingLocalDate as $t, SEMANTIC_SPACING_VALUES as A, BOOKING_FORM_DATA_RESERVED_KEYS as At, resolveCalendarReadProfile as B, reportWorkflowSuccess as Bt, resolveRegistrationTarget as C, resolveAppointmentCheckoutVerificationState as Ct, buildEventCalendarListingRender as D, toSelectedCollectionOptionKind as Dt, getWizardStepsForContext as E, resolveDefaultBookingServiceId as Et, calendarQueryKey as F, clearWorkflowFeedback as Ft, normalizeOptionalId as G, formatBookingDate as Gt, getEventRuntimeFiltersKey as H, resolveWholeSeriesBookingPhase as Ht, calendarWindowBounds as I, err as It, MONTH_NAMES as J, formatBookingInstant as Jt, getCardOrientation as K, formatBookingDateParts as Kt, calendarWindowMonths as L, ok as Lt, resolveSpacing as M, RichTextDocSchema as Mt, calendarMonthDate as N, isRecord$4 as Nt, staticHeaderChromeRuntime as O, projectSelectedAppointmentConsentIntoForm as Ot, calendarPageResponseError as P, assertNever$1 as Pt, formatDateKey as Q, getLocalScheduleDate as Qt, calendarWindowPageSchema as R, okWith as Rt, resolveEventRequiresPayment as S, prepareBookingSubmission as St, getStepNumber as T, resolveBookingSiteId as Tt, normalizeCsvIds as U, parseMailingListVisitorSelection as Ut, buildEventRuntimeFilters as V, CANCELLED_SESSION_STATUS as Vt, normalizeCsvString as W, addLocalScheduleDays as Wt, addMonths as X, formatLocalScheduleDate as Xt, addDays as Y, formatBookingTime as Yt, buildCalendarViewport as Z, getBookingLocalDateKey as Zt, toRegistrationEvents as _, getBookingRedirectStateFromLocation as _t, buildProductDetailDisplay as a, formatEventPricing as an, resolveRuntimeEventDestination as at, findPreSelectedEvent as b, isBookingServiceSlidingAmountInRange as bt, EMPTY_COMMERCE_CART_STATE as c, publicEventPricingDisplay as cn, isCssColorLiteral as ct, deriveCommerceCheckoutState as d, publicEventPricingType as dn, themeButtonClassName as dt, resolveBookingTimeZoneId as en, getOrderedDayNames as et, parseStoredCommerceCartState as f, formatCurrencyAmount as fn, normalizeCardRole as ft, getRegistrationStartAt as g, formatBookingSubmissionPreparationError as gt, buildEventRegistrationDisplayFromScopedEvents as h, formatBookingCentsAsCurrencyInput as ht, buildProductCardDisplay as i, formatBookingPriceDisplay as in, shiftCalendarAnchorDate as it, isSemanticSpacing as j, isBookingRequirementConsentFieldId as jt, resolveEventRegistrationScopedEvents as k, resolveSelectedAppointmentConsent as kt, buildPassCartItem as l, publicEventPricingOptions as ln, resolveOnColorForThemeToken as lt, reduceCommerceCart as m, assertNever$2 as mn, deriveBookingFormViewState as mt, getShopDisplayForItems as n, toScheduledBookingDateRange as nn, isSameCalendarDay as nt, formatCommercePrice as o, isPublicEventPricingOptionDisplayable as on, groupPublicEventsByRun as ot, productItemKey as p, parseCurrencyCode as pn, logger as pt, getContainerClass as q, formatBookingDateTime as qt, buildCartDisplay as r, toScheduledBookingDateTime as rn, isToday as rt, formatInterval as s, publicEventPricingCurrency as sn, boxBackgroundSchema as st, defineIslandPropsDecoder as t, toBookingTimeZone as tn, getWeekCalendarDays as tt, buildProductCartItem as u, publicEventPricingStrategy as un, resolveTokenOrCssColorValue as ut, toWholeSeriesRegistrationEvents as v, getBookingServiceSlidingScale as vt, WIZARD_STEPS as w, resolveBookingPaymentStep as wt, resolveDiscountContext as x, parseBookingCurrencyInputToCents as xt, findEventByOccurrenceId as y, getBookingSuccessMessage as yt, planCalendarMonthRanges as z, reportWorkflowError as zt };