@riverbankcms/sdk 0.135.1 → 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 (152) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +4 -8
  3. package/dist/{PreviewEditorSidebar-D4p_5TdY.mjs → PreviewEditorSidebar-BU5ZlhQR.mjs} +4 -4
  4. package/dist/{PreviewEditorUI-D0cRoTX1.mjs → PreviewEditorUI-9XkHL-bC.mjs} +3 -3
  5. package/dist/{PreviewQueryProvider-DcgaESkm.mjs → PreviewQueryProvider-wbEpXryy.mjs} +1 -1
  6. package/dist/{SdkPreviewModeRuntime-BKLtM3Nz.mjs → SdkPreviewModeRuntime-CnWmj-2B.mjs} +50 -99
  7. package/dist/{SiteChromeCustomizeContext-61X2m7QV.mjs → SiteChromeCustomizeContext-B6d5zkog.mjs} +2299 -1149
  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/data/index.d.ts +2 -0
  26. package/dist/_dts/blocks/src/system/data/publicLoaderCachePolicy.d.ts +78 -0
  27. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +2 -18
  28. package/dist/_dts/blocks/src/system/manifest/validation.d.ts +103 -16
  29. package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
  30. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -1
  31. package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
  32. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
  33. package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +19 -0
  34. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +52 -0
  35. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -0
  36. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +44 -18
  37. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +20 -3
  38. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/VerifyingTimeoutStep.d.ts +3 -1
  39. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +1 -0
  40. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.client.d.ts +2 -2
  41. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +40 -0
  42. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -0
  43. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +43 -0
  44. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarDayCell.d.ts +3 -1
  45. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarNavigationChevron.d.ts +4 -0
  46. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/DayEventsModal.d.ts +2 -1
  47. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModalContext.d.ts +3 -2
  48. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +3 -0
  49. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +31 -3
  50. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekTimetableView.d.ts +3 -1
  51. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +9 -1
  52. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/timetableModel.d.ts +4 -3
  53. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +3 -3
  54. package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +0 -1
  55. package/dist/_dts/calendar/src/grid.d.ts +24 -66
  56. package/dist/_dts/calendar/src/index.d.ts +2 -2
  57. package/dist/_dts/calendar/src/timetable.d.ts +5 -9
  58. package/dist/_dts/commerce/src/purchase/allocation.d.ts +11 -0
  59. package/dist/_dts/commerce/src/purchase/index.d.ts +2 -0
  60. package/dist/_dts/commerce/src/purchase/settlement.d.ts +33 -0
  61. package/dist/_dts/commerce/src/purchase/stripeCheckoutReturnUrl.d.ts +8 -0
  62. package/dist/_dts/content-model/src/templates/defaults.d.ts +6 -0
  63. package/dist/_dts/core/src/slug.d.ts +20 -5
  64. package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +1 -1
  65. package/dist/_dts/preview-next/src/client/preview/headerInteractionPaletteSurfaceState.d.ts +2 -1
  66. package/dist/_dts/sdk/src/client/publicLoaderCacheAccess.d.ts +6 -0
  67. package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -1
  68. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +10 -6
  69. package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +0 -1
  70. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +4 -4
  71. package/dist/_dts/sdk/src/rendering/helpers/footerPageOutline.d.ts +3 -0
  72. package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +3 -0
  73. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  74. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +17 -0
  75. package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +9 -3
  76. package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +1 -1
  77. package/dist/_dts/sdk/src/rendering/index.d.ts +2 -2
  78. package/dist/_dts/sdk/src/rendering/overrideResolution.d.ts +7 -4
  79. package/dist/_dts/sdk/src/version.d.ts +1 -1
  80. package/dist/_dts/theme-core/src/cards/types.d.ts +8 -8
  81. package/dist/_dts/theme-core/src/data.d.ts +12 -0
  82. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  83. package/dist/_dts/theme-core/src/header/legacyHeaderVariant.d.ts +2 -6
  84. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +6 -807
  85. package/dist/_dts/theme-core/src/schema.d.ts +452 -1278
  86. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +213 -1
  87. package/dist/_dts/theme-core/src/site-styles/headerLayoutCatalog.d.ts +0 -29
  88. package/dist/_dts/theme-core/src/site-styles/headerLayoutStyles.d.ts +10 -0
  89. package/dist/_dts/theme-core/src/site-styles/headerLayoutTypes.d.ts +8 -5
  90. package/dist/_dts/theme-core/src/site-styles/headerOpeningForeground.d.ts +4 -4
  91. package/dist/_dts/theme-core/src/site-styles/headerStyleCompiler.d.ts +16 -2
  92. package/dist/_dts/theme-core/src/site-styles/headerStyleDefaults.d.ts +465 -0
  93. package/dist/_dts/theme-core/src/site-styles/headerStyleRecipe.d.ts +161 -0
  94. package/dist/client/{BookingConsentAgreement-Bz9znbpn.mjs → BookingConsentAgreement-DCch21a6.mjs} +2 -2
  95. package/dist/client/{DiscountCodeDisclosure-35Ru8yB9.mjs → DiscountCodeDisclosure-DIj1T59K.mjs} +1 -1
  96. package/dist/client/{EventCombined.client-BKB0ZxRR.mjs → EventCombined.client-BWVNlXTx.mjs} +226 -206
  97. package/dist/client/{EventListing.client-Dx8I21ok.mjs → EventListing.client-DVFCDe3i.mjs} +2 -2
  98. package/dist/client/{LeafletStaticMap-CEWx-Bhe.mjs → LeafletStaticMap-BY5mIHw9.mjs} +1 -1
  99. package/dist/client/{accordion-KIDsKTwS.mjs → accordion-CK29E8rG.mjs} +1 -1
  100. package/dist/client/{bookingForm-D96Rmp-5.mjs → bookingForm-DFvnet-N.mjs} +5 -5
  101. package/dist/client/bookings.mjs +86 -47
  102. package/dist/client/{carousel-YwUgyL66.mjs → carousel-BVU5NQlb.mjs} +1 -1
  103. package/dist/client/{cart-BbwuNrUT.mjs → cart-BNItcZVa.mjs} +3 -3
  104. package/dist/client/{checkout-hp1ucmEY.mjs → checkout-Bu6iCdkP.mjs} +3 -3
  105. package/dist/client/client.mjs +1950 -1031
  106. package/dist/client/{context-DljQn8L5.mjs → context-BImarOAq.mjs} +12 -0
  107. package/dist/client/{eventCalendar-DU4iNLpo.mjs → eventCalendar-DS2h-UXD.mjs} +256 -114
  108. package/dist/client/{eventCombined-CZuupW8m.mjs → eventCombined-Drt4Oq9p.mjs} +3 -3
  109. package/dist/client/{eventDetails-DPQWwCIi.mjs → eventDetails-Bl2vWgTX.mjs} +4 -3
  110. package/dist/client/{eventListing-C7oMidwS.mjs → eventListing-CS7PHY7v.mjs} +3 -3
  111. package/dist/client/{eventRegistration-zEiunlUs.mjs → eventRegistration-D-j8eNy2.mjs} +85 -41
  112. package/dist/client/{form-D2KIyCVJ.mjs → form-RMpoLTyr.mjs} +2 -2
  113. package/dist/client/{headerSection-CK5uChUK.mjs → headerSection-BYE3Lb3k.mjs} +2 -2
  114. package/dist/client/hooks.mjs +2225 -276
  115. package/dist/client/{locationMap-DLQNH1ln.mjs → locationMap-BxSr7Kkh.mjs} +2 -2
  116. package/dist/client/{newsletterForm-ZuhIG7fZ.mjs → newsletterForm-DerbXwFC.mjs} +2 -2
  117. package/dist/client/{productDetail-7hIcGeae.mjs → productDetail-4SZCLhAf.mjs} +3 -3
  118. package/dist/client/{productList-T4Cii1ot.mjs → productList-D7AP4GNq.mjs} +3 -3
  119. package/dist/client/{propsDecoder-mB0aC_Fi.mjs → propsDecoder-pzBeCh14.mjs} +94 -24
  120. package/dist/client/rendering/client.mjs +758 -464
  121. package/dist/client/rendering/islands.mjs +17 -17
  122. package/dist/client/rendering.mjs +2126 -1244
  123. package/dist/client/{scrollToBlock-Du5mHgvL.mjs → scrollToBlock-CduAKf8T.mjs} +1 -1
  124. package/dist/client/{shop-B5zAcKZn.mjs → shop-Cp5p_kGe.mjs} +6 -6
  125. package/dist/client/{shop-commerce-BKBZB6l5.mjs → shop-commerce-DicXYaYX.mjs} +5 -5
  126. package/dist/client/{shop-commerce-store-Cq4qlNtQ.mjs → shop-commerce-store-CGWnpY4K.mjs} +1 -1
  127. package/dist/client/{shopShared-DYGzEs9D.mjs → shopShared-BDf9ljkm.mjs} +3 -3
  128. package/dist/client/{useEventFilters-Bphkda8m.mjs → useEventFilters-DeeyGYuk.mjs} +3 -3
  129. package/dist/preview-next/before-render.mjs +7 -0
  130. package/dist/preview-next/client/runtime.mjs +4 -4
  131. package/dist/preview-next/keepAlive.mjs +7 -0
  132. package/dist/preview-next/middleware.mjs +7 -0
  133. package/dist/{previewAuthStore-C7ksxt5b.mjs → previewAuthStore-DbqBol0V.mjs} +7 -0
  134. package/dist/{sdk-runtime-BbIC8G4J.mjs → sdk-runtime-19MO27F0.mjs} +2 -2
  135. package/dist/{separator-CadhAtI7.mjs → separator-DaPLtJ1f.mjs} +1 -1
  136. package/dist/server/components.mjs +1527 -893
  137. package/dist/server/config-validation.mjs +65 -113
  138. package/dist/server/config.mjs +65 -113
  139. package/dist/server/data.mjs +65 -112
  140. package/dist/server/index.mjs +122 -4
  141. package/dist/server/manifest.mjs +0 -1
  142. package/dist/server/next.mjs +1432 -708
  143. package/dist/server/page-converter.mjs +58 -91
  144. package/dist/server/prebuild.mjs +1 -1
  145. package/dist/server/rendering/server.mjs +1682 -915
  146. package/dist/server/rendering.mjs +1694 -1020
  147. package/dist/server/routing.mjs +3230 -1843
  148. package/dist/server/server.mjs +21710 -19779
  149. package/dist/server/theme-bridge.mjs +656 -264
  150. package/dist/server/theme.mjs +2 -17
  151. package/dist/styles/index.css +609 -181
  152. package/package.json +1 -1
@@ -638,6 +638,14 @@ export declare const runtimeBackedBlockClientEntries: {
638
638
  eventSurface: import("../..").EventSurfaceScope;
639
639
  filterEventPresets: string | null;
640
640
  scheduleScope: import("../..").EventScheduleScope;
641
+ calendarContext: Readonly<{
642
+ timeZone: import("../../../../../core/src/index").BookingTimeZone;
643
+ initialToday: Readonly<{
644
+ year: number;
645
+ month: number;
646
+ day: number;
647
+ }>;
648
+ }>;
641
649
  }>;
642
650
  }>;
643
651
  contracts: Readonly<{
@@ -655,6 +663,14 @@ export declare const runtimeBackedBlockClientEntries: {
655
663
  eventSurface: import("../..").EventSurfaceScope;
656
664
  filterEventPresets: string | null;
657
665
  scheduleScope: import("../..").EventScheduleScope;
666
+ calendarContext: Readonly<{
667
+ timeZone: import("../../../../../core/src/index").BookingTimeZone;
668
+ initialToday: Readonly<{
669
+ year: number;
670
+ month: number;
671
+ day: number;
672
+ }>;
673
+ }>;
658
674
  }>;
659
675
  }>) => unknown;
660
676
  decode: (input: unknown) => import("../../../contracts").DecodeResult<Readonly<{
@@ -666,6 +682,14 @@ export declare const runtimeBackedBlockClientEntries: {
666
682
  eventSurface: import("../..").EventSurfaceScope;
667
683
  filterEventPresets: string | null;
668
684
  scheduleScope: import("../..").EventScheduleScope;
685
+ calendarContext: Readonly<{
686
+ timeZone: import("../../../../../core/src/index").BookingTimeZone;
687
+ initialToday: Readonly<{
688
+ year: number;
689
+ month: number;
690
+ day: number;
691
+ }>;
692
+ }>;
669
693
  }>;
670
694
  }>>;
671
695
  }>;
@@ -685,6 +709,14 @@ export declare const runtimeBackedBlockClientEntries: {
685
709
  eventSurface: import("../..").EventSurfaceScope;
686
710
  filterEventPresets: string | null;
687
711
  scheduleScope: import("../..").EventScheduleScope;
712
+ calendarContext: Readonly<{
713
+ timeZone: import("../../../../../core/src/index").BookingTimeZone;
714
+ initialToday: Readonly<{
715
+ year: number;
716
+ month: number;
717
+ day: number;
718
+ }>;
719
+ }>;
688
720
  }>;
689
721
  }>;
690
722
  contracts: Readonly<{
@@ -702,6 +734,14 @@ export declare const runtimeBackedBlockClientEntries: {
702
734
  eventSurface: import("../..").EventSurfaceScope;
703
735
  filterEventPresets: string | null;
704
736
  scheduleScope: import("../..").EventScheduleScope;
737
+ calendarContext: Readonly<{
738
+ timeZone: import("../../../../../core/src/index").BookingTimeZone;
739
+ initialToday: Readonly<{
740
+ year: number;
741
+ month: number;
742
+ day: number;
743
+ }>;
744
+ }>;
705
745
  }>;
706
746
  }>) => unknown;
707
747
  decode: (input: unknown) => import("../../../contracts").DecodeResult<Readonly<{
@@ -713,6 +753,14 @@ export declare const runtimeBackedBlockClientEntries: {
713
753
  eventSurface: import("../..").EventSurfaceScope;
714
754
  filterEventPresets: string | null;
715
755
  scheduleScope: import("../..").EventScheduleScope;
756
+ calendarContext: Readonly<{
757
+ timeZone: import("../../../../../core/src/index").BookingTimeZone;
758
+ initialToday: Readonly<{
759
+ year: number;
760
+ month: number;
761
+ day: number;
762
+ }>;
763
+ }>;
716
764
  }>;
717
765
  }>>;
718
766
  }>;
@@ -2237,6 +2285,10 @@ export declare const clientComponentRegistryEntries: {
2237
2285
  eventSurface: import("../..").EventSurfaceScope;
2238
2286
  filterEventPresets: string | null;
2239
2287
  scheduleScope: import("../..").EventScheduleScope;
2288
+ calendarContext: Readonly<{
2289
+ timeZone: import("../../../../../core/src/index").BookingTimeZone;
2290
+ initialToday: import("../../../../../calendar/src/index").CalendarDate;
2291
+ }>;
2240
2292
  }>;
2241
2293
  }>>;
2242
2294
  }>>;
@@ -327,6 +327,14 @@ export declare const runtimeBackedBlockServerEntries: {
327
327
  eventSurface: import("../..").EventSurfaceScope;
328
328
  filterEventPresets: string | null;
329
329
  scheduleScope: import("../..").EventScheduleScope;
330
+ calendarContext: Readonly<{
331
+ timeZone: import("../../../../../core/src/index").BookingTimeZone;
332
+ initialToday: Readonly<{
333
+ year: number;
334
+ month: number;
335
+ day: number;
336
+ }>;
337
+ }>;
330
338
  }>;
331
339
  }>;
332
340
  contracts: Readonly<{
@@ -344,6 +352,14 @@ export declare const runtimeBackedBlockServerEntries: {
344
352
  eventSurface: import("../..").EventSurfaceScope;
345
353
  filterEventPresets: string | null;
346
354
  scheduleScope: import("../..").EventScheduleScope;
355
+ calendarContext: Readonly<{
356
+ timeZone: import("../../../../../core/src/index").BookingTimeZone;
357
+ initialToday: Readonly<{
358
+ year: number;
359
+ month: number;
360
+ day: number;
361
+ }>;
362
+ }>;
347
363
  }>;
348
364
  }>) => unknown;
349
365
  decode: (input: unknown) => import("../../../contracts").DecodeResult<Readonly<{
@@ -355,6 +371,14 @@ export declare const runtimeBackedBlockServerEntries: {
355
371
  eventSurface: import("../..").EventSurfaceScope;
356
372
  filterEventPresets: string | null;
357
373
  scheduleScope: import("../..").EventScheduleScope;
374
+ calendarContext: Readonly<{
375
+ timeZone: import("../../../../../core/src/index").BookingTimeZone;
376
+ initialToday: Readonly<{
377
+ year: number;
378
+ month: number;
379
+ day: number;
380
+ }>;
381
+ }>;
358
382
  }>;
359
383
  }>>;
360
384
  }>;
@@ -1,6 +1,13 @@
1
1
  import type { PublicEvent } from '../../blocks/events/shared/types';
2
+ import { type BookingTimeZone } from '../../../../../core/src/index';
3
+ import type { CalendarDate } from '../../../../../calendar/src/index';
2
4
  import { type CalendarViewport, type CalendarViewportKind, type WeekStart } from '../nodes/events/shared/utils';
3
5
  import { type EventRuntimeFilters } from '../nodes/events/shared/listOptions';
6
+ import { type CalendarViewLoadState } from './useCalendarEvents.state';
7
+ export type { CalendarViewLoadState } from './useCalendarEvents.state';
8
+ type CalendarViewportFor<Kind extends CalendarViewportKind> = Extract<CalendarViewport, Readonly<{
9
+ kind: Kind;
10
+ }>>;
4
11
  type UseCalendarEventsOptions = {
5
12
  /** @deprecated Site ID is now provided by BlockApiProvider context */
6
13
  siteId?: string;
@@ -16,59 +23,72 @@ type UseCalendarEventsOptions = {
16
23
  filters?: EventRuntimeFilters;
17
24
  /** Fetch stage (preview vs published) */
18
25
  stage?: 'preview' | 'published';
26
+ calendarContext: Readonly<{
27
+ timeZone: BookingTimeZone;
28
+ initialToday: CalendarDate;
29
+ }>;
19
30
  };
20
- type CalendarEventsState = {
31
+ export type CalendarEventsState<Kind extends CalendarViewportKind> = {
21
32
  /** Events visible in the current view */
22
33
  events: PublicEvent[];
23
34
  /** Current view date (anchor of the calendar viewport) */
24
- viewDate: Date;
35
+ viewDate: CalendarDate;
25
36
  /** Derived calendar viewport for the current view date */
26
- viewport: CalendarViewport;
37
+ viewport: CalendarViewportFor<Kind>;
27
38
  /** Whether events are being loaded */
28
- loading: boolean;
29
- /** Error from last fetch */
30
- error: Error | null;
39
+ loadState: CalendarViewLoadState;
31
40
  /** Set the view date */
32
- setViewDate: (date: Date) => void;
41
+ setViewDate: (date: CalendarDate) => void;
33
42
  /** Navigate to previous viewport period */
34
43
  goToPrevious: () => void;
35
44
  /** Navigate to next viewport period */
36
45
  goToNext: () => void;
37
46
  /** Navigate to today */
38
47
  goToToday: () => void;
48
+ /** Retry loading the currently selected viewport without changing its date */
49
+ retryCurrentView: () => void;
39
50
  };
40
51
  type UseCalendarViewportOptions = Readonly<{
41
52
  view?: CalendarViewportKind;
42
53
  startOfWeek?: WeekStart;
43
- initialDate?: Date;
54
+ initialDate: CalendarDate;
44
55
  }>;
45
56
  /**
46
57
  * Owns calendar viewport state only: selected anchor date, derived visible
47
58
  * period, and navigation by the natural unit for the active view.
48
59
  */
49
- export declare function useCalendarViewport({ view, startOfWeek, initialDate, }?: UseCalendarViewportOptions): Readonly<{
50
- viewDate: Date;
51
- viewport: CalendarViewport;
52
- goToDate: (date: Date) => void;
60
+ type CalendarViewportState<Kind extends CalendarViewportKind> = Readonly<{
61
+ viewDate: CalendarDate;
62
+ viewport: CalendarViewportFor<Kind>;
63
+ goToDate: (date: CalendarDate) => void;
53
64
  goToPrevious: () => void;
54
65
  goToNext: () => void;
55
66
  goToToday: () => void;
56
67
  }>;
68
+ type ExplicitCalendarViewportOptions<Kind extends CalendarViewportKind> = Omit<UseCalendarViewportOptions, 'view'> & Readonly<{
69
+ view: Kind;
70
+ }>;
71
+ type DefaultCalendarViewportOptions = Omit<UseCalendarViewportOptions, 'view'> & Readonly<{
72
+ view?: undefined;
73
+ }>;
74
+ export declare function useCalendarViewport(options: DefaultCalendarViewportOptions): CalendarViewportState<'month'>;
75
+ export declare function useCalendarViewport<Kind extends CalendarViewportKind>(options: ExplicitCalendarViewportOptions<Kind>): CalendarViewportState<Kind>;
57
76
  type UseCalendarEventCacheOptions = Readonly<{
58
- viewDate: Date;
77
+ viewDate: CalendarDate;
59
78
  initialEvents?: PublicEvent[];
60
79
  preloadMonths?: number;
61
80
  filters?: EventRuntimeFilters;
62
81
  stage?: 'preview' | 'published';
82
+ timeZone: BookingTimeZone;
63
83
  }>;
64
84
  /**
65
85
  * Owns event loading and month-window caching for a supplied viewport anchor.
66
86
  * It does not decide navigation semantics or visible calendar days.
67
87
  */
68
- export declare function useCalendarEventCache({ viewDate, initialEvents, preloadMonths, filters, stage, }: UseCalendarEventCacheOptions): Readonly<{
88
+ export declare function useCalendarEventCache({ viewDate, initialEvents, preloadMonths, filters, stage, timeZone, }: UseCalendarEventCacheOptions): Readonly<{
69
89
  events: PublicEvent[];
70
- loading: boolean;
71
- error: Error | null;
90
+ loadState: CalendarViewLoadState;
91
+ retryCurrentView: () => void;
72
92
  }>;
73
93
  /**
74
94
  * Hook for calendar event management with month-based caching.
@@ -84,6 +104,12 @@ export declare function useCalendarEventCache({ viewDate, initialEvents, preload
84
104
  * });
85
105
  * ```
86
106
  */
87
- export declare function useCalendarEvents({ siteId: _siteId, // Deprecated: siteId now comes from BlockApiProvider context
88
- initialEvents, view, startOfWeek, preloadMonths, filters, stage, }: UseCalendarEventsOptions): CalendarEventsState;
107
+ type ExplicitCalendarEventsOptions<Kind extends CalendarViewportKind> = Omit<UseCalendarEventsOptions, 'view'> & Readonly<{
108
+ view: Kind;
109
+ }>;
110
+ type DefaultCalendarEventsOptions = Omit<UseCalendarEventsOptions, 'view'> & Readonly<{
111
+ view?: undefined;
112
+ }>;
113
+ export declare function useCalendarEvents(options: DefaultCalendarEventsOptions): CalendarEventsState<'month'>;
114
+ export declare function useCalendarEvents<Kind extends CalendarViewportKind>(options: ExplicitCalendarEventsOptions<Kind>): CalendarEventsState<Kind>;
89
115
  export default useCalendarEvents;
@@ -1,20 +1,37 @@
1
+ import type { CalendarDate } from '../../../../../calendar/src/index';
2
+ export type CalendarLoadScope = Readonly<{
3
+ anchorDate: CalendarDate;
4
+ filtersKey: string;
5
+ }>;
1
6
  export type CalendarEventCacheLoadState = Readonly<{
2
7
  kind: 'idle';
3
8
  }> | Readonly<{
4
9
  kind: 'loading';
10
+ scope: CalendarLoadScope;
5
11
  }> | Readonly<{
6
12
  kind: 'error';
13
+ scope: CalendarLoadScope;
7
14
  error: Error;
8
15
  }>;
9
16
  export type CalendarEventCacheLoadAction = Readonly<{
10
17
  type: 'started';
18
+ scope: CalendarLoadScope;
11
19
  }> | Readonly<{
12
20
  type: 'succeeded';
21
+ scope: CalendarLoadScope;
13
22
  }> | Readonly<{
14
23
  type: 'failed';
24
+ scope: CalendarLoadScope;
25
+ error: Error;
26
+ }>;
27
+ export type CalendarViewLoadState = Readonly<{
28
+ kind: 'idle';
29
+ }> | Readonly<{
30
+ kind: 'loading';
31
+ }> | Readonly<{
32
+ kind: 'error';
15
33
  error: Error;
16
34
  }>;
17
- export declare function calendarEventCacheLoadReducer(_state: CalendarEventCacheLoadState, action: CalendarEventCacheLoadAction): CalendarEventCacheLoadState;
35
+ export declare function calendarEventCacheLoadReducer(state: CalendarEventCacheLoadState, action: CalendarEventCacheLoadAction): CalendarEventCacheLoadState;
36
+ export declare function projectCalendarLoadState(state: CalendarEventCacheLoadState, scope: CalendarLoadScope): CalendarViewLoadState;
18
37
  export declare function toCalendarEventCacheLoadError(error: unknown): Error;
19
- export declare function isCalendarEventCacheLoading(state: CalendarEventCacheLoadState): boolean;
20
- export declare function getCalendarEventCacheError(state: CalendarEventCacheLoadState): Error | null;
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
2
  type VerifyingTimeoutStepProps = {
3
- onCheckAgain: () => void;
3
+ onCheckAgain?: () => void;
4
4
  supportEmail?: string;
5
+ title?: string;
6
+ message?: string;
5
7
  };
6
8
  /**
7
9
  * Verifying Timeout Step
@@ -26,6 +26,7 @@ export type EventRegistrationStripeReturnDeps = Readonly<{
26
26
  consumeReturnParams: () => Readonly<{
27
27
  registration: string | null;
28
28
  registration_attempt: string | null;
29
+ session_id: string | null;
29
30
  }>;
30
31
  scrollToBlock: typeof scrollToBlock;
31
32
  cleanupStaleRegistrations: typeof cleanupStaleRegistrations;
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { type EventCalendarInteractiveIslandProps } from "./EventCalendar.interactive";
1
+ import React from 'react';
2
+ import { type EventCalendarInteractiveIslandProps } from './EventCalendar.interactive';
3
3
  export type EventCalendarClientProps = EventCalendarInteractiveIslandProps;
4
4
  export declare const EventCalendarClient: React.FC<EventCalendarClientProps>;
5
5
  export default EventCalendarClient;
@@ -56,6 +56,14 @@ export declare const eventCalendarBlockRuntime: Readonly<{
56
56
  eventSurface: import("../../..").EventSurfaceScope;
57
57
  filterEventPresets: string | null;
58
58
  scheduleScope: import("../../..").EventScheduleScope;
59
+ calendarContext: Readonly<{
60
+ timeZone: import("../../../../../../core/src/index").BookingTimeZone;
61
+ initialToday: Readonly<{
62
+ year: number;
63
+ month: number;
64
+ day: number;
65
+ }>;
66
+ }>;
59
67
  }>;
60
68
  }>;
61
69
  contracts: Readonly<{
@@ -73,6 +81,14 @@ export declare const eventCalendarBlockRuntime: Readonly<{
73
81
  eventSurface: import("../../..").EventSurfaceScope;
74
82
  filterEventPresets: string | null;
75
83
  scheduleScope: import("../../..").EventScheduleScope;
84
+ calendarContext: Readonly<{
85
+ timeZone: import("../../../../../../core/src/index").BookingTimeZone;
86
+ initialToday: Readonly<{
87
+ year: number;
88
+ month: number;
89
+ day: number;
90
+ }>;
91
+ }>;
76
92
  }>;
77
93
  }>) => unknown;
78
94
  decode: (input: unknown) => import("../../../../contracts").DecodeResult<Readonly<{
@@ -84,6 +100,14 @@ export declare const eventCalendarBlockRuntime: Readonly<{
84
100
  eventSurface: import("../../..").EventSurfaceScope;
85
101
  filterEventPresets: string | null;
86
102
  scheduleScope: import("../../..").EventScheduleScope;
103
+ calendarContext: Readonly<{
104
+ timeZone: import("../../../../../../core/src/index").BookingTimeZone;
105
+ initialToday: Readonly<{
106
+ year: number;
107
+ month: number;
108
+ day: number;
109
+ }>;
110
+ }>;
87
111
  }>;
88
112
  }>>;
89
113
  }>;
@@ -107,6 +131,14 @@ export declare const eventCalendarInteractiveIslandPropsCodec: Readonly<{
107
131
  eventSurface: import("../../..").EventSurfaceScope;
108
132
  filterEventPresets: string | null;
109
133
  scheduleScope: import("../../..").EventScheduleScope;
134
+ calendarContext: Readonly<{
135
+ timeZone: import("../../../../../../core/src/index").BookingTimeZone;
136
+ initialToday: Readonly<{
137
+ year: number;
138
+ month: number;
139
+ day: number;
140
+ }>;
141
+ }>;
110
142
  }>;
111
143
  }>>;
112
144
  }>) => unknown;
@@ -127,6 +159,14 @@ export declare const eventCalendarInteractiveIslandPropsCodec: Readonly<{
127
159
  eventSurface: import("../../..").EventSurfaceScope;
128
160
  filterEventPresets: string | null;
129
161
  scheduleScope: import("../../..").EventScheduleScope;
162
+ calendarContext: Readonly<{
163
+ timeZone: import("../../../../../../core/src/index").BookingTimeZone;
164
+ initialToday: Readonly<{
165
+ year: number;
166
+ month: number;
167
+ day: number;
168
+ }>;
169
+ }>;
130
170
  }>;
131
171
  }>>;
132
172
  }>>;
@@ -2,6 +2,7 @@ import React from "react";
2
2
  import type { PublicEvent, ButtonVariant, EventLayout, ColumnOption, WeekStart, CalendarTabViews, FilterAutoShow, CalendarView, EventScheduleScope, EventSurfaceScope } from "../../../blocks/events/shared/types";
3
3
  import type { CardRole } from "../../../../../../theme-core/src/cards/index";
4
4
  import type { EventCombinedInteractiveIslandProps } from "./EventCombined.interactive";
5
+ import type { EventCollectionHydration } from './shared/eventCollectionContract';
5
6
  import { type EventListPaginationAction, type EventPageSize } from "./shared/listOptions";
6
7
  export type EventCombinedClientProps = Readonly<{
7
8
  events?: PublicEvent[] | null;
@@ -32,6 +33,7 @@ export type EventCombinedClientProps = Readonly<{
32
33
  buttonText?: string;
33
34
  emptyMessage?: string;
34
35
  className?: string;
36
+ calendarContext: EventCollectionHydration['calendarContext'];
35
37
  }>;
36
38
  export type EventCombinedIslandClientProps = EventCombinedInteractiveIslandProps;
37
39
  /**
@@ -52,6 +52,7 @@ export declare const eventCombinedBlockRuntime: Readonly<{
52
52
  buttonText?: string;
53
53
  emptyMessage?: string;
54
54
  className?: string;
55
+ bookingTimeZone?: string;
55
56
  }>) => Readonly<{
56
57
  display: EventCombinedDisplay;
57
58
  hydration: Readonly<{
@@ -61,6 +62,14 @@ export declare const eventCombinedBlockRuntime: Readonly<{
61
62
  eventSurface: import("../../..").EventSurfaceScope;
62
63
  filterEventPresets: string | null;
63
64
  scheduleScope: import("../../..").EventScheduleScope;
65
+ calendarContext: Readonly<{
66
+ timeZone: import("../../../../../../core/src/index").BookingTimeZone;
67
+ initialToday: Readonly<{
68
+ year: number;
69
+ month: number;
70
+ day: number;
71
+ }>;
72
+ }>;
64
73
  }>;
65
74
  }>;
66
75
  contracts: Readonly<{
@@ -97,6 +106,7 @@ export declare const eventCombinedBlockRuntime: Readonly<{
97
106
  buttonText?: string;
98
107
  emptyMessage?: string;
99
108
  className?: string;
109
+ bookingTimeZone?: string;
100
110
  }>) => unknown;
101
111
  decode: (input: unknown) => import("../../../../contracts").DecodeResult<Readonly<{
102
112
  events?: import("../event-registration").PublicEvent[] | null;
@@ -130,6 +140,7 @@ export declare const eventCombinedBlockRuntime: Readonly<{
130
140
  buttonText?: string;
131
141
  emptyMessage?: string;
132
142
  className?: string;
143
+ bookingTimeZone?: string;
133
144
  }>>;
134
145
  }>;
135
146
  render: Readonly<{
@@ -142,6 +153,14 @@ export declare const eventCombinedBlockRuntime: Readonly<{
142
153
  eventSurface: import("../../..").EventSurfaceScope;
143
154
  filterEventPresets: string | null;
144
155
  scheduleScope: import("../../..").EventScheduleScope;
156
+ calendarContext: Readonly<{
157
+ timeZone: import("../../../../../../core/src/index").BookingTimeZone;
158
+ initialToday: Readonly<{
159
+ year: number;
160
+ month: number;
161
+ day: number;
162
+ }>;
163
+ }>;
145
164
  }>;
146
165
  }>) => unknown;
147
166
  decode: (input: unknown) => import("../../../../contracts").DecodeResult<Readonly<{
@@ -153,6 +172,14 @@ export declare const eventCombinedBlockRuntime: Readonly<{
153
172
  eventSurface: import("../../..").EventSurfaceScope;
154
173
  filterEventPresets: string | null;
155
174
  scheduleScope: import("../../..").EventScheduleScope;
175
+ calendarContext: Readonly<{
176
+ timeZone: import("../../../../../../core/src/index").BookingTimeZone;
177
+ initialToday: Readonly<{
178
+ year: number;
179
+ month: number;
180
+ day: number;
181
+ }>;
182
+ }>;
156
183
  }>;
157
184
  }>>;
158
185
  }>;
@@ -176,6 +203,14 @@ export declare const eventCombinedInteractiveIslandPropsCodec: Readonly<{
176
203
  eventSurface: import("../../..").EventSurfaceScope;
177
204
  filterEventPresets: string | null;
178
205
  scheduleScope: import("../../..").EventScheduleScope;
206
+ calendarContext: Readonly<{
207
+ timeZone: import("../../../../../../core/src/index").BookingTimeZone;
208
+ initialToday: Readonly<{
209
+ year: number;
210
+ month: number;
211
+ day: number;
212
+ }>;
213
+ }>;
179
214
  }>;
180
215
  }>>;
181
216
  }>) => unknown;
@@ -196,6 +231,14 @@ export declare const eventCombinedInteractiveIslandPropsCodec: Readonly<{
196
231
  eventSurface: import("../../..").EventSurfaceScope;
197
232
  filterEventPresets: string | null;
198
233
  scheduleScope: import("../../..").EventScheduleScope;
234
+ calendarContext: Readonly<{
235
+ timeZone: import("../../../../../../core/src/index").BookingTimeZone;
236
+ initialToday: Readonly<{
237
+ year: number;
238
+ month: number;
239
+ day: number;
240
+ }>;
241
+ }>;
199
242
  }>;
200
243
  }>>;
201
244
  }>>;
@@ -1,12 +1,14 @@
1
1
  import * as React from 'react';
2
+ import type { CalendarDate } from '../../../../../../../calendar/src/index';
2
3
  import type { PublicEvent } from '../../../../blocks/events/shared/types';
3
4
  export type CalendarDayCellProps = {
4
5
  /** The date this cell represents */
5
- date: Date;
6
+ date: CalendarDate;
6
7
  /** Events occurring on this date */
7
8
  events: PublicEvent[];
8
9
  /** Whether this date is in the currently viewed month */
9
10
  isCurrentMonth: boolean;
11
+ today: CalendarDate;
10
12
  };
11
13
  /**
12
14
  * CalendarDayCell - Renders a single day in the calendar grid
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare function CalendarNavigationChevron({ direction, }: Readonly<{
3
+ direction: 'previous' | 'next';
4
+ }>): React.ReactElement;
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
+ import type { CalendarDate } from '../../../../../../../calendar/src/index';
2
3
  import type { PublicEvent } from '../../../../blocks/events/shared/types';
3
4
  type DayEventsModalProps = {
4
- date: Date;
5
+ date: CalendarDate;
5
6
  events: PublicEvent[];
6
7
  showCapacity: boolean;
7
8
  onClose: () => void;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { PublicEvent } from '../../../../blocks/events/shared/types';
3
+ import type { CalendarDate } from '../../../../../../../calendar/src/index';
3
4
  /**
4
5
  * Modal state - either closed, showing a single event, or showing all events for a day
5
6
  */
@@ -10,13 +11,13 @@ type ModalState = {
10
11
  event: PublicEvent;
11
12
  } | {
12
13
  type: 'day';
13
- date: Date;
14
+ date: CalendarDate;
14
15
  events: PublicEvent[];
15
16
  };
16
17
  interface EventModalContextValue {
17
18
  modalState: ModalState;
18
19
  openEventModal: (event: PublicEvent) => void;
19
- openDayModal: (date: Date, events: PublicEvent[]) => void;
20
+ openDayModal: (date: CalendarDate, events: PublicEvent[]) => void;
20
21
  closeModal: () => void;
21
22
  }
22
23
  type EventModalProviderProps = {
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { type CalendarDate } from '../../../../../../../calendar/src/index';
2
3
  import type { PublicEvent } from '../../../../blocks/events/shared/types';
3
4
  import { type WeekCalendarDays } from './utils';
4
5
  type WeekAgendaViewProps = {
@@ -6,6 +7,8 @@ type WeekAgendaViewProps = {
6
7
  events: PublicEvent[];
7
8
  showCapacity: boolean;
8
9
  emptyMessage?: string;
10
+ calendarTimeZone: string;
11
+ today: CalendarDate;
9
12
  };
10
13
  /**
11
14
  * WeekAgendaView Component
@@ -1,9 +1,33 @@
1
1
  import React from 'react';
2
2
  import type { ButtonVariant, PublicEvent } from '../../../../blocks/events/shared/types';
3
- import { type WeekCalendarDays } from './utils';
4
- type WeekBoardViewProps = {
3
+ import { type CalendarDate } from '../../../../../../../calendar/src/index';
4
+ import { type WeekCalendarDays, type WeekCalendarViewport } from './utils';
5
+ export type WeekBoardNavigationState = Readonly<{
6
+ rangeLabel: string;
7
+ isCurrentWeek: boolean;
8
+ }>;
9
+ export type WeekBoardLoadState = Readonly<{
10
+ kind: 'idle';
11
+ }> | Readonly<{
12
+ kind: 'loading';
13
+ }> | Readonly<{
14
+ kind: 'error';
15
+ onRetry: () => void;
16
+ }>;
17
+ export type WeekBoardNavigation = WeekBoardNavigationState & (Readonly<{
18
+ kind: 'static';
19
+ }> | Readonly<{
20
+ kind: 'interactive';
21
+ loadState: WeekBoardLoadState;
22
+ onPrevious: () => void;
23
+ onNext: () => void;
24
+ onToday: () => void;
25
+ }>);
26
+ export declare function buildWeekBoardNavigationState(viewport: Pick<WeekCalendarViewport, 'days' | 'title'>, today: CalendarDate): WeekBoardNavigationState;
27
+ export type WeekBoardViewProps = {
5
28
  days: WeekCalendarDays;
6
29
  events: PublicEvent[];
30
+ navigation: WeekBoardNavigation;
7
31
  showCapacity: boolean;
8
32
  emptyMessage?: string;
9
33
  /** Optional board title shown in the top bar. Hidden when empty. */
@@ -19,6 +43,8 @@ type WeekBoardViewProps = {
19
43
  elevated?: boolean;
20
44
  /** Opt-in section band. Generic default is bandless. */
21
45
  banded?: boolean;
46
+ calendarTimeZone: string;
47
+ today: CalendarDate;
22
48
  };
23
49
  type WeekBoardDisplay = Readonly<{
24
50
  events: readonly PublicEvent[];
@@ -32,8 +58,10 @@ type WeekBoardDisplay = Readonly<{
32
58
  buttonVariant?: ButtonVariant;
33
59
  elevated?: boolean;
34
60
  banded?: boolean;
61
+ calendarTimeZone: string;
62
+ today: CalendarDate;
35
63
  }>;
36
- export declare function buildWeekBoardViewProps(display: WeekBoardDisplay, days: WeekCalendarDays): WeekBoardViewProps;
64
+ export declare function buildWeekBoardViewProps(display: WeekBoardDisplay, days: WeekCalendarDays, navigation: WeekBoardNavigation, events?: readonly PublicEvent[]): WeekBoardViewProps;
37
65
  /**
38
66
  * WeekBoardView
39
67
  *