@riverbankcms/sdk 0.143.0 → 0.144.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/dist/{PreviewEditorSidebar-DROGfMKi.mjs → PreviewEditorSidebar-CQZNnFiM.mjs} +19 -25
  2. package/dist/{PreviewEditorUI-BaRjhFu-.mjs → PreviewEditorUI-DCNxnmI0.mjs} +2 -2
  3. package/dist/{SdkPreviewModeRuntime-OIABYLES.mjs → SdkPreviewModeRuntime-BJolUbr1.mjs} +15 -6
  4. package/dist/{SiteChromeCustomizeContext-ohjTvZbc.mjs → SiteChromeCustomizeContext-CKgEpoxi.mjs} +1915 -1463
  5. package/dist/_dts/api/src/billing.d.ts +1 -1
  6. package/dist/_dts/api/src/billingEndpointTypes.d.ts +8 -2
  7. package/dist/_dts/api/src/bookingConfig.d.ts +3 -1
  8. package/dist/_dts/api/src/index.d.ts +1 -1
  9. package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +4 -4
  10. package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +1 -0
  11. package/dist/_dts/api/src/sdkContracts.d.ts +1 -1
  12. package/dist/_dts/api/src/sdkSettingsContracts.d.ts +8 -0
  13. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +2 -8
  14. package/dist/_dts/api/src/siteSettings.d.ts +17 -7
  15. package/dist/_dts/billing/src/membership/index.d.ts +3 -0
  16. package/dist/_dts/block-form/src/backend/types.d.ts +14 -0
  17. package/dist/_dts/block-form/src/client/index.d.ts +1 -0
  18. package/dist/_dts/block-form/src/context/RepeaterHostActionsContext.d.ts +30 -0
  19. package/dist/_dts/block-form/src/context/index.d.ts +1 -0
  20. package/dist/_dts/block-form/src/index.d.ts +1 -0
  21. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterList.d.ts +4 -1
  22. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRow.d.ts +5 -2
  23. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRowActions.d.ts +11 -1
  24. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/index.d.ts +1 -0
  25. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useEmptyStateFocusAfterRemoval.d.ts +8 -0
  26. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/buildSummary.d.ts +15 -1
  27. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterRowActionsDomain.d.ts +5 -2
  28. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +34 -10
  29. package/dist/_dts/blocks/src/pageRendererContracts.d.ts +3 -0
  30. package/dist/_dts/blocks/src/system/constants/events.d.ts +10 -0
  31. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +5 -0
  32. package/dist/_dts/blocks/src/system/runtime/api/context.d.ts +3 -3
  33. package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +10 -0
  34. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +3 -2
  35. package/dist/_dts/blocks/src/system/runtime/api/readAuthority.d.ts +11 -0
  36. package/dist/_dts/blocks/src/system/runtime/api/types/core.d.ts +9 -0
  37. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +7 -13
  38. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +3 -6
  39. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +9 -4
  40. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +0 -1
  41. package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.d.ts +1 -3
  42. package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +7 -24
  43. package/dist/_dts/blocks/src/system/runtime/nodes/cart.server.d.ts +1 -0
  44. package/dist/_dts/blocks/src/system/runtime/nodes/checkout.server.d.ts +1 -0
  45. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationBookingLayer.d.ts +2 -1
  46. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +2 -1
  47. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardActions.d.ts +2 -1
  48. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +2 -0
  49. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.override.d.ts +2 -1
  50. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +2 -2
  51. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +8 -0
  52. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +4 -5
  53. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +7 -2
  54. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +7 -5
  55. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +5 -6
  56. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +3 -1
  57. package/dist/_dts/blocks/src/system/runtime/nodes/header-control.d.ts +10 -0
  58. package/dist/_dts/blocks/src/system/runtime/nodes/layout.d.ts +6 -21
  59. package/dist/_dts/blocks/src/system/runtime/nodes/product-detail.server.d.ts +1 -0
  60. package/dist/_dts/blocks/src/system/runtime/nodes/product-list.server.d.ts +1 -0
  61. package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +13 -0
  62. package/dist/_dts/blocks/src/system/runtime/nodes/shop.server.d.ts +1 -0
  63. package/dist/_dts/blocks/src/system/runtime/shared/components/ThemedButton.d.ts +58 -0
  64. package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -0
  65. package/dist/_dts/blocks/src/system/transforms/registry/chromeLogo.d.ts +23 -0
  66. package/dist/_dts/blocks/src/system/transforms/registry/index.d.ts +2 -1
  67. package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +3 -1
  68. package/dist/_dts/blocks/src/system/transforms/typed.d.ts +4 -1
  69. package/dist/_dts/core/src/event-catalogue.d.ts +27 -0
  70. package/dist/_dts/core/src/event-preset-vocabulary.d.ts +7 -0
  71. package/dist/_dts/core/src/index.d.ts +2 -0
  72. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +13 -0
  73. package/dist/_dts/db/src/schemas/forms.d.ts +286 -2
  74. package/dist/_dts/editor-blocks/src/block-editor/{BlockCardHeader.d.ts → BlockCardFrame.d.ts} +11 -3
  75. package/dist/_dts/logger/src/console.d.ts +3 -0
  76. package/dist/_dts/sdk/src/client/publicEventReadOperations.d.ts +1 -0
  77. package/dist/_dts/sdk/src/client/types.d.ts +3 -0
  78. package/dist/_dts/sdk/src/navigation/index.d.ts +27 -0
  79. package/dist/_dts/sdk/src/public-api/contracts.d.ts +15 -7
  80. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +1 -0
  81. package/dist/_dts/sdk/src/rendering/client.d.ts +1 -0
  82. package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +1 -0
  83. package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +7 -1
  84. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -0
  85. package/dist/_dts/sdk/src/rendering/islands/enhancers/routeIslandApiConfig.d.ts +3 -2
  86. package/dist/_dts/sdk/src/rendering/islands/enhancers/shopShared.d.ts +2 -0
  87. package/dist/_dts/sdk/src/rendering/overrides.d.ts +1 -0
  88. package/dist/_dts/sdk/src/version.d.ts +1 -1
  89. package/dist/_dts/theme-core/src/buttons/affordanceSuppression.d.ts +1 -1
  90. package/dist/_dts/theme-core/src/buttons/classNames.d.ts +3 -13
  91. package/dist/_dts/theme-core/src/customCss/index.d.ts +1 -1
  92. package/dist/_dts/theme-core/src/customCss/patch.d.ts +0 -5
  93. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  94. package/dist/_dts/theme-core/src/surfaces/index.d.ts +1 -0
  95. package/dist/_dts/theme-core/src/surfaces/logoVariant.d.ts +26 -0
  96. package/dist/_dts/theme-core/src/utils/colorStyles.d.ts +10 -0
  97. package/dist/_dts/ui/src/editor-item-card.d.ts +116 -0
  98. package/dist/_dts/ui/src/index.d.ts +1 -0
  99. package/dist/client/{BookingConsentAgreement-BoCtvzzu.mjs → BookingConsentAgreement-DoAILrkN.mjs} +4 -55
  100. package/dist/client/{DiscountCodeDisclosure-B5S30nZk.mjs → DiscountCodeDisclosure-X528hUTf.mjs} +27 -17
  101. package/dist/client/{EventCombined.client-CeZ2-zSt.mjs → EventCombined.client-DSBVwq5m.mjs} +54 -46
  102. package/dist/client/{EventListing.client-DJN3j8B3.mjs → EventListing.client-DmFAX7Vb.mjs} +3 -4
  103. package/dist/client/{LeafletStaticMap-RjtGzDQT.mjs → LeafletStaticMap-BAqXdfhq.mjs} +1 -1
  104. package/dist/client/ThemedButton-BwNFVwi4.mjs +412 -0
  105. package/dist/client/{accordion-DOmnDoyg.mjs → accordion-DRhMdkbd.mjs} +1 -1
  106. package/dist/client/{bookingForm-C0vk7pgS.mjs → bookingForm-iJ_nCsNF.mjs} +26 -32
  107. package/dist/client/bookings.mjs +201 -118
  108. package/dist/client/{carousel-BZJ7pno3.mjs → carousel-D8zuffZr.mjs} +2 -2
  109. package/dist/client/{carousel.client-DQTjCVQT.mjs → carousel.client-jahpU9Vz.mjs} +1 -1
  110. package/dist/client/{cart-CaeVAHJl.mjs → cart-DeMGJViN.mjs} +3 -3
  111. package/dist/client/{checkout-7wmoNDtG.mjs → checkout-DXc06Km2.mjs} +3 -3
  112. package/dist/client/{checkoutUrls-FL6lRkrt.mjs → checkoutUrls-CW3-78uu.mjs} +1 -1
  113. package/dist/client/client.mjs +2271 -1983
  114. package/dist/client/{colorStyles-3013aRAY.mjs → colorStyles-CuJBiS-1.mjs} +16 -4
  115. package/dist/client/{context-BOimxE3U.mjs → context-CDLCfDep.mjs} +24 -8
  116. package/dist/client/{dates-BnzVksi4.mjs → dates-ClFx7Epy.mjs} +2 -2
  117. package/dist/client/{eventCalendar-l-fpaslC.mjs → eventCalendar-BaGpnOGN.mjs} +39 -50
  118. package/dist/client/{eventCombined-DGGvssK6.mjs → eventCombined-ywONOx2m.mjs} +5 -4
  119. package/dist/client/{eventDetails-DRiCm_hL.mjs → eventDetails-B2LlOTYY.mjs} +4 -4
  120. package/dist/client/{eventListing-dph8loYX.mjs → eventListing-CMgxWpqP.mjs} +5 -4
  121. package/dist/client/{eventRegistration-ClBohmbY.mjs → eventRegistration-BarLDNHR.mjs} +83 -68
  122. package/dist/client/{form-BLVVAnd3.mjs → form-BjqKaBJ7.mjs} +9 -10
  123. package/dist/client/{headerSection-DHy4C8Ix.mjs → headerSection-CP4XDwz1.mjs} +23 -30
  124. package/dist/client/hooks.mjs +257 -63
  125. package/dist/client/{locationMap-6HuS28ck.mjs → locationMap-C5gW-d-w.mjs} +9 -10
  126. package/dist/client/{media-DHpfFwd3.mjs → media-BtJ37tzS.mjs} +1 -1
  127. package/dist/client/{newsletterForm-xOdcOhZP.mjs → newsletterForm-afXlVSA0.mjs} +8 -9
  128. package/dist/client/{pricing-ChinRYFt.mjs → pricing-Bl1CAl28.mjs} +1 -1
  129. package/dist/client/{productDetail-0chA5gbK.mjs → productDetail-CvQ3jWQe.mjs} +3 -3
  130. package/dist/client/{productList-OoINA0h1.mjs → productList-U874PGO7.mjs} +3 -3
  131. package/dist/client/{propsDecoder-CIZ-hbIG.mjs → propsDecoder-DPXtCZWP.mjs} +87 -29
  132. package/dist/client/rendering/client.mjs +1891 -1740
  133. package/dist/client/rendering/islands.mjs +19 -19
  134. package/dist/client/rendering.mjs +2225 -1913
  135. package/dist/client/{routeIslandApiConfig-UNsfPcYq.mjs → routeIslandApiConfig-NGYiUWXu.mjs} +8 -1
  136. package/dist/client/{scrollToBlock-BPZl0gPZ.mjs → scrollToBlock-0-C3DVhK.mjs} +1 -1
  137. package/dist/client/{shop-CLJFqNIq.mjs → shop-BXjXhM9P.mjs} +45 -58
  138. package/dist/client/{shop-commerce-PpANg5wB.mjs → shop-commerce-BZ6UlWJ7.mjs} +42 -55
  139. package/dist/client/{shop-commerce-store-TA_Kz2ku.mjs → shop-commerce-store-DlSBXb3D.mjs} +1 -1
  140. package/dist/client/{shopShared-DzcFcA5g.mjs → shopShared-kkEOiLPA.mjs} +6 -5
  141. package/dist/client/{useEventFilters-CFU21QZo.mjs → useEventFilters-zvnnE1ro.mjs} +66 -355
  142. package/dist/preview-next/client/runtime.mjs +3 -3
  143. package/dist/preview-next/editor-chrome.css +8 -0
  144. package/dist/{sdk-runtime-CDKl0Fr7.mjs → sdk-runtime-DFJlQt3q.mjs} +1 -1
  145. package/dist/{separator-BTp96X32.mjs → separator-o8GHb1xh.mjs} +1 -1
  146. package/dist/server/components.mjs +828 -623
  147. package/dist/server/config-validation.mjs +257 -63
  148. package/dist/server/config.mjs +257 -63
  149. package/dist/server/data.mjs +257 -63
  150. package/dist/server/index.mjs +9 -5
  151. package/dist/server/navigation.mjs +28 -1
  152. package/dist/server/next.mjs +14129 -13947
  153. package/dist/server/page-converter.mjs +110 -59
  154. package/dist/server/prebuild.mjs +1 -1
  155. package/dist/server/rendering/server.mjs +832 -624
  156. package/dist/server/rendering.mjs +830 -624
  157. package/dist/server/routing.mjs +294 -69
  158. package/dist/server/server.mjs +266 -68
  159. package/dist/server/theme-bridge.mjs +40 -1
  160. package/dist/styles/index.css +6 -0
  161. package/package.json +1 -1
@@ -498,16 +498,28 @@ function backgroundColorStyle(token) {
498
498
  return { backgroundColor: rgbColorValue(token) };
499
499
  }
500
500
  /**
501
+ * Converts a text color token to a CSS color value that follows the enclosing
502
+ * surface. The semantic text tokens (`text`, `heading`, `mutedText`) resolve
503
+ * to the surface foreground variables, so text adapts when a section's
504
+ * background changes; any other token is a fixed theme color.
505
+ *
506
+ * @param token - Theme color token
507
+ * @returns CSS color value
508
+ */
509
+ function textColorValue(token) {
510
+ const parsed = parseToken(token);
511
+ const surfaceRole = parsed.raw ? null : surfaceRoleForTextToken(parsed.token);
512
+ if (!surfaceRole) return rgbColorValue(token);
513
+ return parsed.opacityPercent === void 0 ? surfaceForegroundValue(surfaceRole) : surfaceForegroundValueWithOpacity(surfaceRole, parsed.opacityPercent);
514
+ }
515
+ /**
501
516
  * Creates a text color style object from a theme token.
502
517
  *
503
518
  * @param token - Theme color token
504
519
  * @returns CSSProperties with color
505
520
  */
506
521
  function textColorStyle(token) {
507
- const parsed = parseToken(token);
508
- const surfaceRole = parsed.raw ? null : surfaceRoleForTextToken(parsed.token);
509
- if (surfaceRole) return { color: parsed.opacityPercent === void 0 ? surfaceForegroundValue(surfaceRole) : surfaceForegroundValueWithOpacity(surfaceRole, parsed.opacityPercent) };
510
- return { color: rgbColorValue(token) };
522
+ return { color: textColorValue(token) };
511
523
  }
512
524
  /**
513
525
  * Merges multiple CSSProperties objects into a single object.
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { z as calendarWindowPageSchema } from "./propsDecoder-CIZ-hbIG.mjs";
2
+ import { B as calendarWindowPageSchema } from "./propsDecoder-DPXtCZWP.mjs";
3
3
  import { createContext, useContext, useMemo } from "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region ../blocks/src/system/runtime/api/deduplication.ts
@@ -160,15 +160,18 @@ const BOOKINGS = {
160
160
  const EVENTS = {
161
161
  calendarWindow: {
162
162
  path: "/public/sites/{siteId}/events/calendar-window",
163
- method: "GET"
163
+ method: "GET",
164
+ previewRead: true
164
165
  },
165
166
  list: {
166
167
  path: "/public/sites/{siteId}/events",
167
- method: "GET"
168
+ method: "GET",
169
+ previewRead: true
168
170
  },
169
171
  filters: {
170
172
  path: "/public/sites/{siteId}/events/filters",
171
- method: "GET"
173
+ method: "GET",
174
+ previewRead: true
172
175
  },
173
176
  register: {
174
177
  path: "/public/sites/{siteId}/events/register",
@@ -206,7 +209,8 @@ const WHOLE_SERIES = { waitlistClaimResolve: {
206
209
  const SHOP = {
207
210
  listProducts: {
208
211
  path: "/public/sites/{siteId}/products",
209
- method: "GET"
212
+ method: "GET",
213
+ previewRead: true
210
214
  },
211
215
  checkout: {
212
216
  path: "/public/sites/{siteId}/bookings/checkout",
@@ -600,7 +604,11 @@ function publicEventsQuery(params) {
600
604
  return { ...params ?? {} };
601
605
  }
602
606
  function createBlockApi(config) {
603
- const { baseUrl, auth, authOverrides, siteId, isPreview } = config;
607
+ const { baseUrl, authOverrides, siteId, isPreview, readAuthority } = config;
608
+ const auth = readAuthority ? readAuthority.kind === "preview" ? {
609
+ type: "bearer",
610
+ token: readAuthority.token
611
+ } : { type: "none" } : config.auth;
604
612
  const dedup = createDeduplicationCache({ ttl: 100 });
605
613
  const shouldUsePreviewStageForNonPortalRequests = isPreview && auth.type !== "none";
606
614
  function isPortalEndpoint(endpoint) {
@@ -608,17 +616,25 @@ function createBlockApi(config) {
608
616
  }
609
617
  function selectAuth(endpoint) {
610
618
  if (endpoint.authScope === "portal" && authOverrides?.portal) return authOverrides.portal;
619
+ if (readAuthority && !endpoint.previewRead) return { type: "none" };
611
620
  return auth;
612
621
  }
613
622
  /**
614
623
  * Make an API request
615
624
  */
625
+ function bindReadQuery(endpoint, query) {
626
+ const queryParams = { ...query };
627
+ if (readAuthority) {
628
+ if (!endpoint.previewRead) delete queryParams.stage;
629
+ else if (readAuthority.kind === "preview" || queryParams.stage != null) queryParams.stage = readAuthority.kind;
630
+ } else if (shouldUsePreviewStageForNonPortalRequests && !isPortalEndpoint(endpoint) && queryParams.stage == null) queryParams.stage = "preview";
631
+ return queryParams;
632
+ }
616
633
  async function request(endpoint, options) {
617
634
  const { path, body, query, skipDedup = false } = options ?? {};
618
635
  let url = `${baseUrl}${path ?? endpoint.path}`;
619
636
  const selectedAuth = selectAuth(endpoint);
620
- const queryParams = { ...query };
621
- if (shouldUsePreviewStageForNonPortalRequests && !isPortalEndpoint(endpoint) && (queryParams.stage === void 0 || queryParams.stage === null)) queryParams.stage = "preview";
637
+ const queryParams = bindReadQuery(endpoint, query);
622
638
  if (Object.keys(queryParams).length > 0) url = appendQuery(url, queryParams);
623
639
  const headers = {
624
640
  Accept: "application/json",
@@ -1,5 +1,5 @@
1
- import { Kt as formatBookingDate, Xt as formatBookingTime, hn as assertNever, in as toScheduledBookingDateTime, nn as toBookingTimeZone, ot as resolveRuntimeEventDestination, qt as formatBookingDateParts, rn as toScheduledBookingDateRange } from "./propsDecoder-CIZ-hbIG.mjs";
2
- import { a as canJoinEventWaitlistOnAnyMode, p as isEventFull } from "./pricing-ChinRYFt.mjs";
1
+ import { Xt as formatBookingDate, Zt as formatBookingDateParts, cn as toScheduledBookingDateTime, en as formatBookingTime, lt as resolveRuntimeEventDestination, on as toBookingTimeZone, sn as toScheduledBookingDateRange, yn as assertNever } from "./propsDecoder-DPXtCZWP.mjs";
2
+ import { a as canJoinEventWaitlistOnAnyMode, p as isEventFull } from "./pricing-Bl1CAl28.mjs";
3
3
  //#region ../blocks/src/system/runtime/nodes/events/domain/cta.ts
4
4
  /**
5
5
  * Booking call-to-action resolution for events: where an event links to and
@@ -1,14 +1,15 @@
1
1
  "use client";
2
- import { O as clsx } from "./colorStyles-3013aRAY.mjs";
3
- import { $ as formatDateKey, H as buildEventRuntimeFilters, O as buildEventCalendarListingRender, V as resolveCalendarReadProfile, X as addDays, Y as MONTH_NAMES, et as getDayOfWeek, ft as themeButtonClassName, it as isToday, nt as getWeekCalendarDays, rt as isSameCalendarDay, t as defineIslandPropsDecoder, tt as getOrderedDayNames } from "./propsDecoder-CIZ-hbIG.mjs";
4
- import { o as EventFilters, s as formatEventTeacherLine, t as useEventFilters } from "./useEventFilters-CFU21QZo.mjs";
5
- import { d as getEventAvailabilityStatus, o as formatEventRemainingPlaces, p as isEventFull } from "./pricing-ChinRYFt.mjs";
6
- import { a as formatTime, c as getLocalDateKey, d as resolveEventLinkProps, l as getLocalMinuteOfDay, o as groupEventsByDate, s as resolveEventTimeZone } from "./dates-BnzVksi4.mjs";
7
- import { a as WeekAgendaView, c as CalendarDayCell, d as useCalendarEvents, i as useHydrationReady, l as EventModalProvider, o as CalendarNavigationChevron, r as EventModals, s as CalendarDayHeaders, t as EventCombinedClient, u as useEventModal } from "./EventCombined.client-CeZ2-zSt.mjs";
8
- import { t as BlockApiProvider } from "./context-BOimxE3U.mjs";
2
+ import { O as clsx } from "./colorStyles-CuJBiS-1.mjs";
3
+ import { $ as addDays, G as buildEventRuntimeFilters, H as resolveCalendarReadProfile, O as buildEventCalendarListingRender, Q as MONTH_NAMES, at as getWeekCalendarDays, it as getOrderedDayNames, nt as formatDateKey, ot as isSameCalendarDay, rt as getDayOfWeek, st as isToday, t as defineIslandPropsDecoder } from "./propsDecoder-DPXtCZWP.mjs";
4
+ import { o as EventFilters, s as formatEventTeacherLine, t as useEventFilters } from "./useEventFilters-zvnnE1ro.mjs";
5
+ import { d as getEventAvailabilityStatus, o as formatEventRemainingPlaces, p as isEventFull } from "./pricing-Bl1CAl28.mjs";
6
+ import { a as formatTime, c as getLocalDateKey, d as resolveEventLinkProps, l as getLocalMinuteOfDay, o as groupEventsByDate, s as resolveEventTimeZone } from "./dates-ClFx7Epy.mjs";
7
+ import { a as WeekAgendaView, c as CalendarDayCell, d as useCalendarEvents, i as useHydrationReady, l as EventModalProvider, o as CalendarNavigationChevron, r as EventModals, s as CalendarDayHeaders, t as EventCombinedClient, u as useEventModal } from "./EventCombined.client-DSBVwq5m.mjs";
8
+ import { t as BlockApiProvider } from "./context-CDLCfDep.mjs";
9
+ import { n as ThemedButtonLink, t as ThemedButton } from "./ThemedButton-BwNFVwi4.mjs";
9
10
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
10
- import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
11
- import { n as EventListingController } from "./EventListing.client-DJN3j8B3.mjs";
11
+ import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-NGYiUWXu.mjs";
12
+ import { n as EventListingController } from "./EventListing.client-DmFAX7Vb.mjs";
12
13
  import { useEffect, useId, useMemo, useState } from "react";
13
14
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
15
  //#region ../calendar/src/lane-packing.ts
@@ -408,7 +409,7 @@ const WeekBoardCard = ({ event, showCapacity, calendarTimeZone }) => {
408
409
  ]
409
410
  });
410
411
  };
411
- const WeekBoardNavigationControls = ({ navigation, todayClassName }) => {
412
+ const WeekBoardNavigationControls = ({ navigation, buttonVariant }) => {
412
413
  const handlers = navigation.kind === "interactive" ? navigation : {
413
414
  onPrevious: void 0,
414
415
  onNext: void 0,
@@ -441,12 +442,13 @@ const WeekBoardNavigationControls = ({ navigation, todayClassName }) => {
441
442
  onClick: handlers.onNext,
442
443
  children: /* @__PURE__ */ jsx(CalendarNavigationChevron, { direction: "next" })
443
444
  }),
444
- /* @__PURE__ */ jsx("button", {
445
+ /* @__PURE__ */ jsx(ThemedButton, {
445
446
  type: "button",
446
- className: todayClassName,
447
+ variant: buttonVariant,
448
+ size: "sm",
449
+ label: "Today",
447
450
  disabled: navigation.isCurrentWeek,
448
- onClick: handlers.onToday,
449
- children: "Today"
451
+ onClick: handlers.onToday
450
452
  })
451
453
  ]
452
454
  });
@@ -462,16 +464,17 @@ const WeekBoardLegend = () => /* @__PURE__ */ jsx("div", {
462
464
  }), item.label]
463
465
  }, item.status))
464
466
  });
465
- const WeekBoardLoadError = ({ navigation, buttonClassName }) => {
467
+ const WeekBoardLoadError = ({ navigation, buttonVariant }) => {
466
468
  if (navigation.kind !== "interactive" || navigation.loadState.kind !== "error") return null;
467
469
  return /* @__PURE__ */ jsxs("div", {
468
470
  className: "event-week-board-error",
469
471
  role: "status",
470
- children: [/* @__PURE__ */ jsx("p", { children: "Failed to load events" }), /* @__PURE__ */ jsx("button", {
472
+ children: [/* @__PURE__ */ jsx("p", { children: "Failed to load events" }), /* @__PURE__ */ jsx(ThemedButton, {
471
473
  type: "button",
472
- className: buttonClassName,
473
- onClick: navigation.loadState.onRetry,
474
- children: "Try again"
474
+ variant: buttonVariant,
475
+ size: "sm",
476
+ label: "Try again",
477
+ onClick: navigation.loadState.onRetry
475
478
  })]
476
479
  });
477
480
  };
@@ -503,17 +506,18 @@ const WeekBoardGrid = ({ days, eventsByDate, showCapacity, calendarTimeZone, tod
503
506
  }, dateKey);
504
507
  })
505
508
  });
506
- const WeekBoardFooter = ({ note, ctaHref, ctaLabel, ctaClassName }) => {
509
+ const WeekBoardFooter = ({ note, ctaHref, ctaLabel, buttonVariant }) => {
507
510
  if (note === null && ctaHref === null) return null;
508
511
  return /* @__PURE__ */ jsxs("div", {
509
512
  className: "event-week-board-foot",
510
513
  children: [note === null ? null : /* @__PURE__ */ jsx("p", {
511
514
  className: "event-week-board-foot-note",
512
515
  children: note
513
- }), ctaHref === null ? null : /* @__PURE__ */ jsx("a", {
514
- className: ctaClassName,
516
+ }), ctaHref === null ? null : /* @__PURE__ */ jsx(ThemedButtonLink, {
517
+ variant: buttonVariant,
518
+ size: "sm",
515
519
  href: ctaHref,
516
- children: ctaLabel
520
+ label: ctaLabel
517
521
  })]
518
522
  });
519
523
  };
@@ -528,14 +532,6 @@ const WeekBoardFooter = ({ note, ctaHref, ctaLabel, ctaClassName }) => {
528
532
  const WeekBoardView = ({ days, events, navigation, showCapacity, emptyMessage = "No classes scheduled this week", title, footerNote, ctaLabel = "Reserve a place", ctaHref = null, buttonVariant = "outline", elevated = false, banded = false, calendarTimeZone, today }) => {
529
533
  const eventsByDate = groupEventsByDate(events, calendarTimeZone);
530
534
  const hasAnyEvents = days.some((date) => (eventsByDate.get(formatDateKey(date)) ?? []).length > 0);
531
- const ctaClassName = themeButtonClassName({
532
- variant: buttonVariant,
533
- size: "sm"
534
- });
535
- const todayClassName = themeButtonClassName({
536
- variant: buttonVariant,
537
- size: "sm"
538
- });
539
535
  const hasTitle = typeof title === "string" && title.length > 0;
540
536
  const hasFooterNote = typeof footerNote === "string" && footerNote.length > 0;
541
537
  const footerNoteText = hasAnyEvents ? hasFooterNote ? footerNote : null : emptyMessage;
@@ -558,14 +554,14 @@ const WeekBoardView = ({ days, events, navigation, showCapacity, emptyMessage =
558
554
  }) : null,
559
555
  /* @__PURE__ */ jsx(WeekBoardNavigationControls, {
560
556
  navigation,
561
- todayClassName
557
+ buttonVariant
562
558
  }),
563
559
  /* @__PURE__ */ jsx(WeekBoardLegend, {})
564
560
  ]
565
561
  }),
566
562
  /* @__PURE__ */ jsx(WeekBoardLoadError, {
567
563
  navigation,
568
- buttonClassName: todayClassName
564
+ buttonVariant
569
565
  }),
570
566
  /* @__PURE__ */ jsx(WeekBoardGrid, {
571
567
  days,
@@ -578,7 +574,7 @@ const WeekBoardView = ({ days, events, navigation, showCapacity, emptyMessage =
578
574
  note: footerNoteText,
579
575
  ctaHref: resolvedCtaHref,
580
576
  ctaLabel,
581
- ctaClassName
577
+ buttonVariant
582
578
  })
583
579
  ]
584
580
  })
@@ -817,7 +813,6 @@ const EventCalendarClient = ({ render }) => {
817
813
  if (display.displayMode === "combined") return /* @__PURE__ */ jsx(EventCombinedClient, {
818
814
  events: hydration.prefetchedEvents ? [...display.events] : void 0,
819
815
  siteId: hydration.siteId,
820
- stage: hydration.stage,
821
816
  listLayout: display.listLayout,
822
817
  listColumns: display.listColumns,
823
818
  eventsPerPage: display.eventsPerPage,
@@ -870,7 +865,6 @@ const EventCalendarWeekBoardClient = ({ render }) => {
870
865
  startOfWeek: display.startOfWeek,
871
866
  preloadMonths: 1,
872
867
  filters,
873
- stage: hydration.stage,
874
868
  calendarContext: hydration.calendarContext,
875
869
  calendarWindow: hydration.calendarWindow
876
870
  });
@@ -902,7 +896,6 @@ const EventCalendarTimetableClient = ({ render }) => {
902
896
  startOfWeek: display.startOfWeek,
903
897
  preloadMonths: 1,
904
898
  filters: listFilters,
905
- stage: hydration.stage,
906
899
  calendarContext: hydration.calendarContext,
907
900
  calendarWindow: hydration.calendarWindow
908
901
  });
@@ -946,7 +939,6 @@ const EventCalendarGridClient = ({ render }) => {
946
939
  startOfWeek: display.startOfWeek,
947
940
  preloadMonths: 1,
948
941
  filters: listFilters,
949
- stage: hydration.stage,
950
942
  calendarContext: hydration.calendarContext,
951
943
  calendarWindow: hydration.calendarWindow
952
944
  });
@@ -1094,14 +1086,12 @@ const EventCalendarChrome = ({ children, display, calendarView, className, loadS
1094
1086
  children: /* @__PURE__ */ jsx(CalendarNavigationChevron, { direction: "next" })
1095
1087
  })
1096
1088
  ]
1097
- }), /* @__PURE__ */ jsx("button", {
1089
+ }), /* @__PURE__ */ jsx(ThemedButton, {
1098
1090
  type: "button",
1099
1091
  onClick: onToday,
1100
- className: themeButtonClassName({
1101
- variant: display.buttonVariant,
1102
- size: "sm"
1103
- }),
1104
- children: "Today"
1092
+ variant: display.buttonVariant,
1093
+ size: "sm",
1094
+ label: "Today"
1105
1095
  })]
1106
1096
  }),
1107
1097
  children,
@@ -1110,14 +1100,12 @@ const EventCalendarChrome = ({ children, display, calendarView, className, loadS
1110
1100
  children: [/* @__PURE__ */ jsx("p", {
1111
1101
  className: "status-error rb-caption rb-mb-2",
1112
1102
  children: "Failed to load events"
1113
- }), /* @__PURE__ */ jsx("button", {
1103
+ }), /* @__PURE__ */ jsx(ThemedButton, {
1114
1104
  type: "button",
1115
1105
  onClick: onRetry,
1116
- className: themeButtonClassName({
1117
- variant: display.buttonVariant,
1118
- size: "sm"
1119
- }),
1120
- children: "Try again"
1106
+ variant: display.buttonVariant,
1107
+ size: "sm",
1108
+ label: "Try again"
1121
1109
  })]
1122
1110
  }) : null
1123
1111
  ]
@@ -1130,6 +1118,7 @@ const enhance = (root, props) => {
1130
1118
  if (!siteId) throw new Error("[sdk:islands] event-calendar requires siteId");
1131
1119
  if (!apiBaseUrl) throw new Error("[sdk:islands] event-calendar requires apiBaseUrl");
1132
1120
  const apiConfig = buildRouteIslandApiConfig({
1121
+ readAuthority: props.readAuthority,
1133
1122
  apiBaseUrl,
1134
1123
  siteId,
1135
1124
  stage
@@ -1,8 +1,8 @@
1
- import { t as defineIslandPropsDecoder } from "./propsDecoder-CIZ-hbIG.mjs";
2
- import { n as EventCombinedIslandClient } from "./EventCombined.client-CeZ2-zSt.mjs";
3
- import { t as BlockApiProvider } from "./context-BOimxE3U.mjs";
1
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-DPXtCZWP.mjs";
2
+ import { n as EventCombinedIslandClient } from "./EventCombined.client-DSBVwq5m.mjs";
3
+ import { t as BlockApiProvider } from "./context-CDLCfDep.mjs";
4
4
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
5
- import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
5
+ import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-NGYiUWXu.mjs";
6
6
  import "react";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  //#region src/rendering/islands/enhancers/eventCombined.tsx
@@ -11,6 +11,7 @@ const enhance = (root, props) => {
11
11
  const { siteId, apiBaseUrl, stage } = props;
12
12
  if (!apiBaseUrl) throw new Error("[sdk:islands] event-combined requires apiBaseUrl");
13
13
  const apiConfig = buildRouteIslandApiConfig({
14
+ readAuthority: props.readAuthority,
14
15
  apiBaseUrl,
15
16
  siteId,
16
17
  stage
@@ -1,8 +1,8 @@
1
- import { A as resolveEventRegistrationScopedEvents, Ht as CANCELLED_SESSION_STATUS, Qt as getBookingLocalDateKey, Ut as resolveWholeSeriesBookingPhase, an as formatBookingPriceDisplay, cn as publicEventPricingCurrency, fn as publicEventPricingType, in as toScheduledBookingDateTime, ln as publicEventPricingDisplay, nn as toBookingTimeZone, pn as formatCurrencyAmount, sn as isPublicEventPricingOptionDisplayable, t as defineIslandPropsDecoder } from "./propsDecoder-CIZ-hbIG.mjs";
2
- import { l as formatTotalCapacity, n as formatEventPriceAmount, t as formatEventPrice } from "./pricing-ChinRYFt.mjs";
3
- import { d as resolveEventLinkProps, r as formatEventDateParts } from "./dates-BnzVksi4.mjs";
1
+ import { A as resolveEventRegistrationScopedEvents, Kt as CANCELLED_SESSION_STATUS, _n as formatCurrencyAmount, cn as toScheduledBookingDateTime, dn as isPublicEventPricingOptionDisplayable, fn as publicEventPricingCurrency, gn as publicEventPricingType, ln as formatBookingPriceDisplay, nn as getBookingLocalDateKey, on as toBookingTimeZone, pn as publicEventPricingDisplay, qt as resolveWholeSeriesBookingPhase, t as defineIslandPropsDecoder } from "./propsDecoder-DPXtCZWP.mjs";
2
+ import { l as formatTotalCapacity, n as formatEventPriceAmount, t as formatEventPrice } from "./pricing-Bl1CAl28.mjs";
3
+ import { d as resolveEventLinkProps, r as formatEventDateParts } from "./dates-ClFx7Epy.mjs";
4
4
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
5
- import { t as LeafletStaticMap } from "./LeafletStaticMap-RjtGzDQT.mjs";
5
+ import { t as LeafletStaticMap } from "./LeafletStaticMap-BAqXdfhq.mjs";
6
6
  import "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region ../blocks/src/system/runtime/nodes/events/shared/eventProductEligibility.ts
@@ -1,8 +1,8 @@
1
- import { t as defineIslandPropsDecoder } from "./propsDecoder-CIZ-hbIG.mjs";
2
- import { t as BlockApiProvider } from "./context-BOimxE3U.mjs";
1
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-DPXtCZWP.mjs";
2
+ import { t as BlockApiProvider } from "./context-CDLCfDep.mjs";
3
3
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
4
- import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
5
- import { t as EventListingClient } from "./EventListing.client-DJN3j8B3.mjs";
4
+ import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-NGYiUWXu.mjs";
5
+ import { t as EventListingClient } from "./EventListing.client-DmFAX7Vb.mjs";
6
6
  import "react";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  //#region src/rendering/islands/enhancers/eventListing.tsx
@@ -12,6 +12,7 @@ const enhance = (root, props) => {
12
12
  if (!siteId) throw new Error("[sdk:islands] event-listing requires siteId");
13
13
  if (!apiBaseUrl) throw new Error("[sdk:islands] event-listing requires apiBaseUrl");
14
14
  const apiConfig = buildRouteIslandApiConfig({
15
+ readAuthority: props.readAuthority,
15
16
  apiBaseUrl,
16
17
  siteId,
17
18
  stage