@riverbankcms/sdk 0.135.0 → 0.136.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 (153) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +4 -8
  3. package/dist/{PreviewEditorSidebar-roNY0GVy.mjs → PreviewEditorSidebar-BU5ZlhQR.mjs} +4 -4
  4. package/dist/{PreviewEditorUI-KboDbEh_.mjs → PreviewEditorUI-9XkHL-bC.mjs} +3 -3
  5. package/dist/{PreviewQueryProvider-DcgaESkm.mjs → PreviewQueryProvider-wbEpXryy.mjs} +1 -1
  6. package/dist/{SdkPreviewModeRuntime-DBrF7Caa.mjs → SdkPreviewModeRuntime-CnWmj-2B.mjs} +50 -99
  7. package/dist/{SiteChromeCustomizeContext-DrIEpJKn.mjs → SiteChromeCustomizeContext-B6d5zkog.mjs} +2334 -1173
  8. package/dist/_dts/ai/src/contracts/proposals.d.ts +8 -554
  9. package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +401 -2312
  10. package/dist/_dts/api/src/contentRuntime.d.ts +6 -0
  11. package/dist/_dts/api/src/endpoints.d.ts +7 -0
  12. package/dist/_dts/api/src/index.d.ts +1 -0
  13. package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +7 -0
  14. package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +26 -0
  15. package/dist/_dts/api/src/sdkBlockContentAdmission.d.ts +5 -0
  16. package/dist/_dts/api/src/sdkThemeWire.d.ts +6 -432
  17. package/dist/_dts/block-form/src/blockDraftSaveability.d.ts +2 -3
  18. package/dist/_dts/block-form/src/utils/slug.d.ts +6 -0
  19. package/dist/_dts/blocks/src/PageRenderer.d.ts +12 -6
  20. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +48 -0
  21. package/dist/_dts/blocks/src/definitions.d.ts +14 -0
  22. package/dist/_dts/blocks/src/index.d.ts +4 -3
  23. package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +40 -0
  24. package/dist/_dts/blocks/src/server.d.ts +2 -2
  25. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +25 -0
  26. package/dist/_dts/blocks/src/system/data/index.d.ts +2 -0
  27. package/dist/_dts/blocks/src/system/data/publicLoaderCachePolicy.d.ts +78 -0
  28. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +2 -18
  29. package/dist/_dts/blocks/src/system/manifest/validation.d.ts +103 -16
  30. package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
  31. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -1
  32. package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
  33. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
  34. package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +19 -0
  35. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +52 -0
  36. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -0
  37. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +44 -18
  38. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +20 -3
  39. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/VerifyingTimeoutStep.d.ts +3 -1
  40. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +1 -0
  41. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.client.d.ts +2 -2
  42. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +40 -0
  43. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -0
  44. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +43 -0
  45. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarDayCell.d.ts +3 -1
  46. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarNavigationChevron.d.ts +4 -0
  47. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/DayEventsModal.d.ts +2 -1
  48. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModalContext.d.ts +3 -2
  49. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +3 -0
  50. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +31 -3
  51. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekTimetableView.d.ts +3 -1
  52. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +19 -1
  53. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/timetableModel.d.ts +4 -3
  54. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +3 -3
  55. package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +0 -1
  56. package/dist/_dts/calendar/src/grid.d.ts +24 -66
  57. package/dist/_dts/calendar/src/index.d.ts +2 -2
  58. package/dist/_dts/calendar/src/timetable.d.ts +5 -9
  59. package/dist/_dts/commerce/src/purchase/allocation.d.ts +11 -0
  60. package/dist/_dts/commerce/src/purchase/index.d.ts +2 -0
  61. package/dist/_dts/commerce/src/purchase/settlement.d.ts +33 -0
  62. package/dist/_dts/commerce/src/purchase/stripeCheckoutReturnUrl.d.ts +8 -0
  63. package/dist/_dts/content-model/src/templates/defaults.d.ts +6 -0
  64. package/dist/_dts/core/src/slug.d.ts +20 -5
  65. package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +1 -1
  66. package/dist/_dts/preview-next/src/client/preview/headerInteractionPaletteSurfaceState.d.ts +2 -1
  67. package/dist/_dts/sdk/src/client/publicLoaderCacheAccess.d.ts +6 -0
  68. package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -1
  69. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +10 -6
  70. package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +0 -1
  71. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +4 -4
  72. package/dist/_dts/sdk/src/rendering/helpers/footerPageOutline.d.ts +3 -0
  73. package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +3 -0
  74. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  75. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +17 -0
  76. package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +9 -3
  77. package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +1 -1
  78. package/dist/_dts/sdk/src/rendering/index.d.ts +2 -2
  79. package/dist/_dts/sdk/src/rendering/overrideResolution.d.ts +7 -4
  80. package/dist/_dts/sdk/src/version.d.ts +1 -1
  81. package/dist/_dts/theme-core/src/cards/types.d.ts +8 -8
  82. package/dist/_dts/theme-core/src/data.d.ts +12 -0
  83. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  84. package/dist/_dts/theme-core/src/header/legacyHeaderVariant.d.ts +2 -6
  85. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +6 -807
  86. package/dist/_dts/theme-core/src/schema.d.ts +452 -1278
  87. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +213 -1
  88. package/dist/_dts/theme-core/src/site-styles/headerLayoutCatalog.d.ts +0 -29
  89. package/dist/_dts/theme-core/src/site-styles/headerLayoutStyles.d.ts +10 -0
  90. package/dist/_dts/theme-core/src/site-styles/headerLayoutTypes.d.ts +8 -5
  91. package/dist/_dts/theme-core/src/site-styles/headerOpeningForeground.d.ts +4 -4
  92. package/dist/_dts/theme-core/src/site-styles/headerStyleCompiler.d.ts +16 -2
  93. package/dist/_dts/theme-core/src/site-styles/headerStyleDefaults.d.ts +465 -0
  94. package/dist/_dts/theme-core/src/site-styles/headerStyleRecipe.d.ts +161 -0
  95. package/dist/client/{BookingConsentAgreement-BQqwi8Oa.mjs → BookingConsentAgreement-DCch21a6.mjs} +2 -2
  96. package/dist/client/{DiscountCodeDisclosure-B97aMo0V.mjs → DiscountCodeDisclosure-DIj1T59K.mjs} +1 -1
  97. package/dist/client/{EventCombined.client-Bs2Iw9Q6.mjs → EventCombined.client-BWVNlXTx.mjs} +226 -206
  98. package/dist/client/{EventListing.client-C4QUQdmg.mjs → EventListing.client-DVFCDe3i.mjs} +2 -2
  99. package/dist/client/{LeafletStaticMap-CwWRk69M.mjs → LeafletStaticMap-BY5mIHw9.mjs} +1 -1
  100. package/dist/client/{accordion-BA0j8Mpw.mjs → accordion-CK29E8rG.mjs} +1 -1
  101. package/dist/client/{bookingForm-Br2e41H0.mjs → bookingForm-DFvnet-N.mjs} +5 -5
  102. package/dist/client/bookings.mjs +87 -47
  103. package/dist/client/{carousel-B4dmwnpD.mjs → carousel-BVU5NQlb.mjs} +1 -1
  104. package/dist/client/{cart-B_ckGW4b.mjs → cart-BNItcZVa.mjs} +3 -3
  105. package/dist/client/{checkout-DAyspHdf.mjs → checkout-Bu6iCdkP.mjs} +3 -3
  106. package/dist/client/client.mjs +1985 -1055
  107. package/dist/client/{context-DljQn8L5.mjs → context-BImarOAq.mjs} +12 -0
  108. package/dist/client/{eventCalendar-pJu3FUod.mjs → eventCalendar-DS2h-UXD.mjs} +256 -114
  109. package/dist/client/{eventCombined-B6Kacm9F.mjs → eventCombined-Drt4Oq9p.mjs} +3 -3
  110. package/dist/client/{eventDetails-CaX9z1pv.mjs → eventDetails-Bl2vWgTX.mjs} +4 -3
  111. package/dist/client/{eventListing-B9aXPO-I.mjs → eventListing-CS7PHY7v.mjs} +3 -3
  112. package/dist/client/{eventRegistration-CBSovBkg.mjs → eventRegistration-D-j8eNy2.mjs} +85 -41
  113. package/dist/client/{form-Cm0tu_7o.mjs → form-RMpoLTyr.mjs} +2 -2
  114. package/dist/client/{headerSection-OgRtHeKS.mjs → headerSection-BYE3Lb3k.mjs} +2 -2
  115. package/dist/client/hooks.mjs +2254 -298
  116. package/dist/client/{locationMap-DmjcYqNM.mjs → locationMap-BxSr7Kkh.mjs} +2 -2
  117. package/dist/client/{newsletterForm-D08OZQAC.mjs → newsletterForm-DerbXwFC.mjs} +2 -2
  118. package/dist/client/{productDetail-BqZeu2P4.mjs → productDetail-4SZCLhAf.mjs} +3 -3
  119. package/dist/client/{productList-mNyIF9FG.mjs → productList-D7AP4GNq.mjs} +3 -3
  120. package/dist/client/{propsDecoder-DwHXRm9X.mjs → propsDecoder-pzBeCh14.mjs} +123 -46
  121. package/dist/client/rendering/client.mjs +793 -488
  122. package/dist/client/rendering/islands.mjs +17 -17
  123. package/dist/client/rendering.mjs +2161 -1268
  124. package/dist/client/{scrollToBlock-DtmdM3v-.mjs → scrollToBlock-CduAKf8T.mjs} +1 -1
  125. package/dist/client/{shop-CNjZK16F.mjs → shop-Cp5p_kGe.mjs} +6 -6
  126. package/dist/client/{shop-commerce-DkNNao1J.mjs → shop-commerce-DicXYaYX.mjs} +5 -5
  127. package/dist/client/{shop-commerce-store-9WA--zuW.mjs → shop-commerce-store-CGWnpY4K.mjs} +1 -1
  128. package/dist/client/{shopShared-CHCVfccY.mjs → shopShared-BDf9ljkm.mjs} +3 -3
  129. package/dist/client/{useEventFilters-DvuaB4ZN.mjs → useEventFilters-DeeyGYuk.mjs} +3 -3
  130. package/dist/preview-next/before-render.mjs +7 -0
  131. package/dist/preview-next/client/runtime.mjs +4 -4
  132. package/dist/preview-next/keepAlive.mjs +7 -0
  133. package/dist/preview-next/middleware.mjs +7 -0
  134. package/dist/{previewAuthStore-C7ksxt5b.mjs → previewAuthStore-DbqBol0V.mjs} +7 -0
  135. package/dist/{sdk-runtime-3GhW4knb.mjs → sdk-runtime-19MO27F0.mjs} +2 -2
  136. package/dist/{separator-D3bCWYYb.mjs → separator-DaPLtJ1f.mjs} +1 -1
  137. package/dist/server/components.mjs +1562 -917
  138. package/dist/server/config-validation.mjs +94 -135
  139. package/dist/server/config.mjs +94 -135
  140. package/dist/server/data.mjs +94 -134
  141. package/dist/server/index.mjs +122 -4
  142. package/dist/server/manifest.mjs +0 -1
  143. package/dist/server/next.mjs +1467 -732
  144. package/dist/server/page-converter.mjs +87 -113
  145. package/dist/server/prebuild.mjs +1 -1
  146. package/dist/server/rendering/server.mjs +1717 -939
  147. package/dist/server/rendering.mjs +1729 -1044
  148. package/dist/server/routing.mjs +3229 -1835
  149. package/dist/server/server.mjs +21739 -19801
  150. package/dist/server/theme-bridge.mjs +656 -264
  151. package/dist/server/theme.mjs +2 -17
  152. package/dist/styles/index.css +609 -181
  153. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { i as textColorStyle } from "./colorStyles-CrxJrPjJ.mjs";
2
- import { st as themeButtonClassName, t as defineIslandPropsDecoder } from "./propsDecoder-DwHXRm9X.mjs";
2
+ import { st as themeButtonClassName, t as defineIslandPropsDecoder } from "./propsDecoder-pzBeCh14.mjs";
3
3
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
4
- import { t as LeafletStaticMap } from "./LeafletStaticMap-CwWRk69M.mjs";
4
+ import { t as LeafletStaticMap } from "./LeafletStaticMap-BY5mIHw9.mjs";
5
5
  import "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region ../core/src/location.ts
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { D as clsx } from "./colorStyles-CrxJrPjJ.mjs";
3
- import { At as assertNever, en as assertNever$1, st as themeButtonClassName, t as defineIslandPropsDecoder } from "./propsDecoder-DwHXRm9X.mjs";
4
- import { n as useBlockApi, t as BlockApiProvider } from "./context-DljQn8L5.mjs";
3
+ import { At as assertNever, nn as assertNever$1, st as themeButtonClassName, t as defineIslandPropsDecoder } from "./propsDecoder-pzBeCh14.mjs";
4
+ import { n as useBlockApi, t as BlockApiProvider } from "./context-BImarOAq.mjs";
5
5
  import { n as isSpamProtectionEnabled, r as AltchaWidget, t as getChallengeUrl } from "./src-B833rYRr.mjs";
6
6
  import { t as FeedbackMessage } from "./FeedbackMessage-CtLvvS_d.mjs";
7
7
  import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-AYanWFb-.mjs";
@@ -1,6 +1,6 @@
1
- import { t as defineIslandPropsDecoder } from "./propsDecoder-DwHXRm9X.mjs";
2
- import { r as ProductDetailController } from "./shop-commerce-DkNNao1J.mjs";
3
- import { t as mountShopBlockIsland } from "./shopShared-CHCVfccY.mjs";
1
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-pzBeCh14.mjs";
2
+ import { r as ProductDetailController } from "./shop-commerce-DicXYaYX.mjs";
3
+ import { t as mountShopBlockIsland } from "./shopShared-BDf9ljkm.mjs";
4
4
  import "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region ../blocks/src/system/runtime/nodes/product-detail.client.tsx
@@ -1,6 +1,6 @@
1
- import { t as defineIslandPropsDecoder } from "./propsDecoder-DwHXRm9X.mjs";
2
- import { i as ProductListController } from "./shop-commerce-DkNNao1J.mjs";
3
- import { t as mountShopBlockIsland } from "./shopShared-CHCVfccY.mjs";
1
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-pzBeCh14.mjs";
2
+ import { i as ProductListController } from "./shop-commerce-DicXYaYX.mjs";
3
+ import { t as mountShopBlockIsland } from "./shopShared-BDf9ljkm.mjs";
4
4
  import "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region ../blocks/src/system/runtime/nodes/product-list.client.tsx
@@ -244,6 +244,11 @@ const DEFAULT_BOOKING_DATE_TIME_FORMAT = {
244
244
  hour: "numeric",
245
245
  minute: "2-digit"
246
246
  };
247
+ const START_OF_DAY = {
248
+ hour: 0,
249
+ minute: 0,
250
+ second: 0
251
+ };
247
252
  const LOCAL_DATE_PATTERN = /^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/u;
248
253
  const DATE_TIME_FORMATTER_CACHE_LIMIT = 100;
249
254
  const dateTimeFormatterCache = /* @__PURE__ */ new Map();
@@ -447,6 +452,9 @@ function formatBookingDateParts(input, options) {
447
452
  function getBookingLocalDateKey(input) {
448
453
  return formatDateKey(getLocalScheduleDate(new Date(input.startsAt), input.timeZone));
449
454
  }
455
+ function compareLocalScheduleDates(left, right) {
456
+ return Date.UTC(left.year, left.month - 1, left.day) - Date.UTC(right.year, right.month - 1, right.day);
457
+ }
450
458
  function parseBookingLocalDate(value) {
451
459
  const match = LOCAL_DATE_PATTERN.exec(value.trim());
452
460
  if (match === null || match.groups === void 0) throw new Error(`Invalid booking date format: "${value}" (expected YYYY-MM-DD)`);
@@ -461,6 +469,53 @@ function parseBookingLocalDate(value) {
461
469
  day
462
470
  };
463
471
  }
472
+ function parseBookingUtcDateWindow(input) {
473
+ const timeZone = resolveBookingTimeZoneId(input.timeZone);
474
+ let startLocalDate;
475
+ try {
476
+ startLocalDate = parseBookingLocalDate(input.startDate);
477
+ } catch {
478
+ return {
479
+ ok: false,
480
+ field: "startDate",
481
+ reason: "invalid_date_format",
482
+ value: input.startDate
483
+ };
484
+ }
485
+ let endLocalDate;
486
+ try {
487
+ endLocalDate = parseBookingLocalDate(input.endDate);
488
+ } catch {
489
+ return {
490
+ ok: false,
491
+ field: "endDate",
492
+ reason: "invalid_date_format",
493
+ value: input.endDate
494
+ };
495
+ }
496
+ if (compareLocalScheduleDates(startLocalDate, endLocalDate) > 0) return {
497
+ ok: false,
498
+ field: "endDate",
499
+ reason: "invalid_date_range",
500
+ value: input.endDate
501
+ };
502
+ return {
503
+ ok: true,
504
+ value: {
505
+ timeZone,
506
+ startLocalDate,
507
+ endLocalDate,
508
+ startAt: localScheduleDateTimeToUtcDate(startLocalDate, START_OF_DAY, timeZone),
509
+ endExclusive: localScheduleDateTimeToUtcDate(addLocalScheduleDays(endLocalDate, 1), START_OF_DAY, timeZone)
510
+ }
511
+ };
512
+ }
513
+ function buildBookingUtcDateWindow(input) {
514
+ const result = parseBookingUtcDateWindow(input);
515
+ if (result.ok) return result.value;
516
+ if (result.reason === "invalid_date_range") throw new Error(`Invalid booking date range: startDate "${input.startDate}" must be on or before endDate "${input.endDate}"`);
517
+ throw new Error(`Invalid booking date format: "${result.value}" (expected YYYY-MM-DD)`);
518
+ }
464
519
  function getLocalScheduleDate(date, timeZone) {
465
520
  const parts = getZonedDateTimeParts(date, getSafeTimeZone(timeZone));
466
521
  return {
@@ -480,6 +535,22 @@ function addLocalScheduleDays(date, days) {
480
535
  day: utcDate.getUTCDate()
481
536
  };
482
537
  }
538
+ function localScheduleDateTimeToUtcDate(localDate, localTime, timeZone) {
539
+ const resolvedTimeZone = getSafeTimeZone(timeZone);
540
+ const targetLocalMs = Date.UTC(localDate.year, localDate.month - 1, localDate.day, localTime.hour, localTime.minute, localTime.second, 0);
541
+ let guess = targetLocalMs;
542
+ const seenGuesses = /* @__PURE__ */ new Set();
543
+ for (let iteration = 0; iteration < 4; iteration += 1) {
544
+ seenGuesses.add(guess);
545
+ const actual = getZonedDateTimeParts(new Date(guess), resolvedTimeZone);
546
+ const diff = Date.UTC(actual.year, actual.month - 1, actual.day, actual.hour, actual.minute, actual.second, 0) - targetLocalMs;
547
+ if (diff === 0) return new Date(guess);
548
+ const nextGuess = guess - diff;
549
+ if (seenGuesses.has(nextGuess)) return new Date(Math.max(guess, nextGuess));
550
+ guess = nextGuess;
551
+ }
552
+ return new Date(guess);
553
+ }
483
554
  //#endregion
484
555
  //#region ../core/src/newsletter-signup-destination.ts
485
556
  function parseNewsletterSignupDestinationProvider(value) {
@@ -5084,12 +5155,8 @@ const legacyHeaderVariantValues = Object.keys(legacyHeaderVariants);
5084
5155
  * `@riverbankcms/api` is `z.input<typeof themeSchema>`, so a widened input here
5085
5156
  * would leak straight into a public type.
5086
5157
  *
5087
- * Not every read of a persisted theme goes through the schema:
5088
- * `resolveRuntimeTheme` in
5089
- * `apps/dashboard/src/server/services/sites/runtimeSiteResponse.ts` returns the
5090
- * raw database JSON asserted as `Theme` with no parse, so a theme still
5091
- * carrying a legacy spelling reaches the theme editor un-aliased. That gap
5092
- * predates this alias and is harmless while persisted usage is zero.
5158
+ * Persisted runtime themes are admitted through `parseThemeForPersistence`
5159
+ * before reaching consumers, so legacy spellings normalize at that boundary.
5093
5160
  */
5094
5161
  const headerVariantWithLegacyAliasSchema = z.enum([...headerVariantValues, ...legacyHeaderVariantValues]).transform((value) => value in legacyHeaderVariants ? legacyHeaderVariants[value] : value);
5095
5162
  const BREAKPOINT_LG = 1024;
@@ -5548,7 +5615,6 @@ const navFontWeight = z.enum([
5548
5615
  "bold"
5549
5616
  ]);
5550
5617
  const headerMaxWidth = z.enum(["container", "full"]);
5551
- const headerBarFrame = z.enum(["full-bleed", "inset-shell"]);
5552
5618
  const headerBorderSchema = componentBorderSchema.extend({ position: z.enum([
5553
5619
  "bottom",
5554
5620
  "top",
@@ -5577,12 +5643,6 @@ const headerLogoTextSchema = z.object({
5577
5643
  ]).optional(),
5578
5644
  hideOnShrink: z.boolean().optional()
5579
5645
  }).optional();
5580
- const navEffectsSchema = z.object({
5581
- underlineGradient: z.boolean().default(false),
5582
- glow: z.boolean().default(false),
5583
- glowColor: z.string().optional(),
5584
- neumorphic: z.boolean().default(false)
5585
- }).optional();
5586
5646
  const dropdownStyleSchema = z.object({
5587
5647
  background: themeColorTokenSchema.default("surface"),
5588
5648
  textColor: themeColorTokenSchema.default("text"),
@@ -5674,9 +5734,7 @@ const headerSchema = z.object({
5674
5734
  positioning: headerPositioning,
5675
5735
  shrinkOnScroll: z.boolean(),
5676
5736
  maxWidth: headerMaxWidth,
5677
- barFrame: headerBarFrame.optional(),
5678
5737
  scrollTreatment: headerScrollTreatmentSchema,
5679
- logoOverride: mediaSchema.nullable().optional(),
5680
5738
  background: headerBackgroundSchema.default({
5681
5739
  type: "color",
5682
5740
  color: "surface"
@@ -5688,13 +5746,11 @@ const headerSchema = z.object({
5688
5746
  navFontRole: z.enum(["body", "heading"]).optional(),
5689
5747
  navTextSize: navLinkStyleSchema.shape.textSize,
5690
5748
  interactionPalette: headerInteractionPaletteSchema.optional(),
5691
- navPlacement: z.enum(["end", "center"]).optional(),
5692
5749
  container: headerContainerSchema,
5693
5750
  border: headerBorderSchema,
5694
5751
  shadow: componentShadowSchema.optional(),
5695
5752
  logo: logoStyleSchema,
5696
5753
  logoText: headerLogoTextSchema,
5697
- navEffects: navEffectsSchema,
5698
5754
  navContainer: navContainerSchema,
5699
5755
  navLinkStyle: navLinkStyleSchema.optional(),
5700
5756
  ctaGap: headerCtaGapSchema.optional(),
@@ -6325,6 +6381,7 @@ const publicWholeSeriesPriceDisplaySchema = z.discriminatedUnion("kind", [
6325
6381
  freePriceDisplaySchema,
6326
6382
  exactPriceDisplaySchema,
6327
6383
  fromPriceDisplaySchema,
6384
+ rangePriceDisplaySchema,
6328
6385
  unavailablePriceDisplaySchema
6329
6386
  ]);
6330
6387
  z.discriminatedUnion("kind", [
@@ -7113,10 +7170,10 @@ function formatEventTeacherLine(event) {
7113
7170
  * timezone). Thin domain wrapper over `groupItemsByDate` from the calendar
7114
7171
  * package; preserves the historical `Map<string, PublicEvent[]>` shape.
7115
7172
  */
7116
- function groupEventsByDate(events) {
7173
+ function groupEventsByDate(events, calendarTimeZone) {
7117
7174
  const grouped = groupItemsByDate(events, {
7118
7175
  getStartsAt: (event) => event.startsAt,
7119
- getTimeZone: (event) => event.timeZone ?? "UTC"
7176
+ getTimeZone: () => calendarTimeZone
7120
7177
  });
7121
7178
  const map = /* @__PURE__ */ new Map();
7122
7179
  for (const [dateKey, bucket] of grouped) map.set(dateKey, [...bucket]);
@@ -7391,7 +7448,8 @@ const eventCollectionSourceSchemaShape = {
7391
7448
  buttonVariant: eventButtonVariantSchema.optional(),
7392
7449
  buttonText: z.string().optional(),
7393
7450
  emptyMessage: z.string().optional(),
7394
- className: z.string().optional()
7451
+ className: z.string().optional(),
7452
+ bookingTimeZone: z.string().optional()
7395
7453
  };
7396
7454
  const eventCollectionDisplaySchemaShape = {
7397
7455
  events: z.array(publicEventSchema),
@@ -7426,7 +7484,15 @@ const eventCollectionHydrationSchema = z.object({
7426
7484
  prefetchedEvents: z.boolean(),
7427
7485
  eventSurface: eventSurfaceScopeSchema$1,
7428
7486
  filterEventPresets: z.string().nullable(),
7429
- scheduleScope: eventScheduleScopeSchema$1
7487
+ scheduleScope: eventScheduleScopeSchema$1,
7488
+ calendarContext: z.object({
7489
+ timeZone: z.string().transform(toBookingTimeZone),
7490
+ initialToday: z.object({
7491
+ year: z.number().int(),
7492
+ month: z.number().int().min(1).max(12),
7493
+ day: z.number().int().min(1).max(31)
7494
+ })
7495
+ })
7430
7496
  });
7431
7497
  function buildEventCollectionDisplay(source) {
7432
7498
  return {
@@ -7471,14 +7537,19 @@ function buildEventCollectionPresentationDisplay(source) {
7471
7537
  emptyMessage: source.emptyMessage ?? "No upcoming events scheduled."
7472
7538
  };
7473
7539
  }
7474
- function buildEventCollectionHydration(source) {
7540
+ function buildEventCollectionHydration(source, now = /* @__PURE__ */ new Date()) {
7541
+ const timeZone = toBookingTimeZone(source.bookingTimeZone);
7475
7542
  return {
7476
7543
  siteId: source.siteId,
7477
7544
  stage: source.stage,
7478
7545
  prefetchedEvents: source.events != null,
7479
7546
  eventSurface: normalizeEventSurfaceScope(source.eventSurface),
7480
7547
  filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
7481
- scheduleScope: normalizeEventScheduleScope(source.scheduleScope)
7548
+ scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
7549
+ calendarContext: {
7550
+ timeZone,
7551
+ initialToday: getLocalScheduleDate(now, timeZone)
7552
+ }
7482
7553
  };
7483
7554
  }
7484
7555
  function buildEventCollectionListingDisplay(display, prefetchedEvents, className) {
@@ -10876,13 +10947,16 @@ function buildEventRegistrationShellStepLabels(source) {
10876
10947
  }) : false).map((step) => shellLabelForRegistrationStep(step, scopedEvents));
10877
10948
  }
10878
10949
  function scopeEventRegistrationEvents(source) {
10950
+ return toRegistrationEvents(scopeEventRegistrationSourceEvents(source));
10951
+ }
10952
+ function scopeEventRegistrationSourceEvents(source) {
10879
10953
  const scope = planEventRegistrationScope({
10880
- events: toRegistrationEvents(source.events ?? []),
10954
+ events: source.events ?? [],
10881
10955
  wholeSeriesOffering: source.wholeSeriesOffering,
10882
10956
  occurrenceContext: source.occurrenceContext,
10883
10957
  subject: source.subject
10884
10958
  });
10885
- return scope.kind === "invalidSelectedRun" ? [] : scope.events;
10959
+ return scope.kind === "invalidSelectedRun" ? [] : [...scope.events];
10886
10960
  }
10887
10961
  function shellLabelForRegistrationStep(step, events) {
10888
10962
  switch (step) {
@@ -10914,26 +10988,29 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
10914
10988
  source: createZodCodec(eventRegistrationSourceSchema),
10915
10989
  render: createZodCodec(eventRegistrationRenderSchema)
10916
10990
  },
10917
- buildRender: (source) => ({
10918
- display: buildEventRegistrationDisplay(source),
10919
- hydration: {
10920
- occurrenceContext: source.occurrenceContext ?? null,
10921
- subject: source.subject ?? null,
10922
- events: source.events ?? null,
10923
- wholeSeriesOfferings: source.wholeSeriesOfferings ?? null,
10924
- wholeSeriesOffering: resolveWholeSeriesOffering(source),
10925
- maxTickets: source.maxTickets ?? void 0,
10926
- showVenue: source.showVenue,
10927
- showCapacity: source.showCapacity,
10928
- successMessage: source.successMessage,
10929
- buttonVariant: source.buttonVariant,
10930
- overlayEnabled: source.overlayEnabled,
10931
- spamProtectionEnabled: source.spamProtectionEnabled,
10932
- supportEmail: source.supportEmail,
10933
- sitePasses: source.sitePasses ?? null,
10934
- siteMemberships: source.siteMemberships ?? null
10935
- }
10936
- })
10991
+ buildRender: (source) => {
10992
+ const events = source.events == null ? null : scopeEventRegistrationSourceEvents(source);
10993
+ return {
10994
+ display: buildEventRegistrationDisplay(source),
10995
+ hydration: {
10996
+ occurrenceContext: source.occurrenceContext ?? null,
10997
+ subject: source.subject ?? null,
10998
+ events,
10999
+ wholeSeriesOfferings: source.wholeSeriesOfferings ?? null,
11000
+ wholeSeriesOffering: resolveWholeSeriesOffering(source),
11001
+ maxTickets: source.maxTickets ?? void 0,
11002
+ showVenue: source.showVenue,
11003
+ showCapacity: source.showCapacity,
11004
+ successMessage: source.successMessage,
11005
+ buttonVariant: source.buttonVariant,
11006
+ overlayEnabled: source.overlayEnabled,
11007
+ spamProtectionEnabled: source.spamProtectionEnabled,
11008
+ supportEmail: source.supportEmail,
11009
+ sitePasses: source.sitePasses ?? null,
11010
+ siteMemberships: source.siteMemberships ?? null
11011
+ }
11012
+ };
11013
+ }
10937
11014
  });
10938
11015
  function normalizeEventRegistrationEventInput(value) {
10939
11016
  if (!isRecord(value)) return value;
@@ -12406,4 +12483,4 @@ function defineIslandPropsDecoder(kind) {
12406
12483
  };
12407
12484
  }
12408
12485
  //#endregion
12409
- export { getLocalMinuteOfDay as $, formatCurrencyAmount as $t, isSemanticSpacing as A, assertNever$1 as At, formatEventPrice as B, formatBookingInstant as Bt, getStepNumber as C, toSelectedCollectionOptionKind as Ct, staticHeaderChromeRuntime as D, isBookingRequirementConsentFieldId as Dt, buildEventCalendarListingRender as E, BOOKING_FORM_DATA_RESERVED_KEYS as Et, normalizeCsvString as F, reportWorkflowError as Ft, getContainerClass as G, resolveBookingTimeZoneId as Gt, formatEventTeacherLine as H, formatLocalScheduleDate as Ht, normalizeOptionalId as I, reportWorkflowSuccess as It, resolveEventLinkProps as J, publicEventPricingCurrency as Jt, groupEventsByDate as K, toBookingTimeZone as Kt, formatDate as L, addLocalScheduleDays as Lt, buildEventRuntimeFilters as M, err as Mt, getEventRuntimeFiltersKey as N, ok as Nt, resolveEventRegistrationScopedEvents as O, RichTextDocSchema as Ot, normalizeCsvIds as P, okWith as Pt, getLocalDateKey as Q, publicEventTicketTypes as Qt, formatEventCompactDateRail as R, formatBookingDate as Rt, WIZARD_STEPS as S, resolveDefaultBookingServiceId as St, planEventRegistrationSurface as T, resolveSelectedAppointmentConsent as Tt, formatTime as U, getBookingLocalDateKey as Ut, formatEventPriceDisplay as V, formatBookingTime as Vt, getCardOrientation as W, parseBookingLocalDate as Wt, getEventAvailability as X, publicEventPricingType as Xt, resolveRuntimeEventPricing as Y, publicEventPricingMode as Yt, getEventAvailabilityStatus as Z, publicEventScalarPrice as Zt, findEventByOccurrenceId as _, parseBookingCurrencyInputToCents as _t, buildProductDetailDisplay as a, resolveOnColorForThemeToken as at, resolveEventRequiresPayment as b, resolveBookingPaymentStep as bt, EMPTY_COMMERCE_CART_STATE as c, normalizeCardRole as ct, deriveCommerceCheckoutState as d, formatBookingCentsAsCurrencyInput as dt, assertNever$2 as en, formatWholeSeriesPriceAmount as et, parseStoredCommerceCartState as f, formatBookingSubmissionPreparationError as ft, toWholeSeriesRegistrationEvents as g, isBookingServiceSlidingAmountInRange as gt, toRegistrationEvents as h, getBookingSuccessMessage as ht, buildProductCardDisplay as i, isCssColorLiteral as it, resolveSpacing as j, clearWorkflowFeedback as jt, SEMANTIC_SPACING_VALUES as k, isRecord$5 as kt, buildPassCartItem as l, logger as lt, reduceCommerceCart as m, getBookingServiceSlidingScale as mt, getShopDisplayForItems as n, resolveWholeSeriesPricingState as nt, formatCommercePrice as o, resolveTokenOrCssColorValue as ot, productItemKey as p, getBookingRedirectStateFromLocation as pt, resolveEventCta as q, toScheduledBookingDateTime as qt, buildCartDisplay as r, boxBackgroundSchema as rt, formatInterval as s, themeButtonClassName as st, defineIslandPropsDecoder as t, formatWholeSeriesPriceDisplay as tt, buildProductCartItem as u, deriveBookingFormViewState as ut, findPreSelectedEvent as v, prepareBookingSubmission as vt, getWizardStepsForContext as w, projectSelectedAppointmentConsentIntoForm as wt, resolveRegistrationTarget as x, resolveBookingSiteId as xt, resolveDiscountContext as y, resolveAppointmentCheckoutVerificationState as yt, formatEventDateParts as z, formatBookingDateTime as zt };
12486
+ export { getLocalMinuteOfDay as $, publicEventScalarPrice as $t, isSemanticSpacing as A, assertNever$1 as At, formatEventPrice as B, formatBookingDateTime as Bt, getStepNumber as C, toSelectedCollectionOptionKind as Ct, staticHeaderChromeRuntime as D, isBookingRequirementConsentFieldId as Dt, buildEventCalendarListingRender as E, BOOKING_FORM_DATA_RESERVED_KEYS as Et, normalizeCsvString as F, reportWorkflowError as Ft, getContainerClass as G, getLocalScheduleDate as Gt, formatEventTeacherLine as H, formatBookingTime as Ht, normalizeOptionalId as I, reportWorkflowSuccess as It, resolveEventLinkProps as J, toBookingTimeZone as Jt, groupEventsByDate as K, parseBookingLocalDate as Kt, formatDate as L, addLocalScheduleDays as Lt, buildEventRuntimeFilters as M, err as Mt, getEventRuntimeFiltersKey as N, ok as Nt, resolveEventRegistrationScopedEvents as O, RichTextDocSchema as Ot, normalizeCsvIds as P, okWith as Pt, getLocalDateKey as Q, publicEventPricingType as Qt, formatEventCompactDateRail as R, buildBookingUtcDateWindow as Rt, WIZARD_STEPS as S, resolveDefaultBookingServiceId as St, planEventRegistrationSurface as T, resolveSelectedAppointmentConsent as Tt, formatTime as U, formatLocalScheduleDate as Ut, formatEventPriceDisplay as V, formatBookingInstant as Vt, getCardOrientation as W, getBookingLocalDateKey as Wt, getEventAvailability as X, publicEventPricingCurrency as Xt, resolveRuntimeEventPricing as Y, toScheduledBookingDateTime as Yt, getEventAvailabilityStatus as Z, publicEventPricingMode as Zt, findEventByOccurrenceId as _, parseBookingCurrencyInputToCents as _t, buildProductDetailDisplay as a, resolveOnColorForThemeToken as at, resolveEventRequiresPayment as b, resolveBookingPaymentStep as bt, EMPTY_COMMERCE_CART_STATE as c, normalizeCardRole as ct, deriveCommerceCheckoutState as d, formatBookingCentsAsCurrencyInput as dt, publicEventTicketTypes as en, formatWholeSeriesPriceAmount as et, parseStoredCommerceCartState as f, formatBookingSubmissionPreparationError as ft, toWholeSeriesRegistrationEvents as g, isBookingServiceSlidingAmountInRange as gt, toRegistrationEvents as h, getBookingSuccessMessage as ht, buildProductCardDisplay as i, isCssColorLiteral as it, resolveSpacing as j, clearWorkflowFeedback as jt, SEMANTIC_SPACING_VALUES as k, isRecord$5 as kt, buildPassCartItem as l, logger as lt, reduceCommerceCart as m, getBookingServiceSlidingScale as mt, getShopDisplayForItems as n, assertNever$2 as nn, resolveWholeSeriesPricingState as nt, formatCommercePrice as o, resolveTokenOrCssColorValue as ot, productItemKey as p, getBookingRedirectStateFromLocation as pt, resolveEventCta as q, resolveBookingTimeZoneId as qt, buildCartDisplay as r, boxBackgroundSchema as rt, formatInterval as s, themeButtonClassName as st, defineIslandPropsDecoder as t, formatCurrencyAmount as tn, formatWholeSeriesPriceDisplay as tt, buildProductCartItem as u, deriveBookingFormViewState as ut, findPreSelectedEvent as v, prepareBookingSubmission as vt, getWizardStepsForContext as w, projectSelectedAppointmentConsentIntoForm as wt, resolveRegistrationTarget as x, resolveBookingSiteId as xt, resolveDiscountContext as y, resolveAppointmentCheckoutVerificationState as yt, formatEventDateParts as z, formatBookingDate as zt };