@riverbankcms/sdk 0.140.0 → 0.142.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 (145) hide show
  1. package/dist/{PreviewEditorSidebar-CUyTzd5z.mjs → PreviewEditorSidebar-Dk6Dt11f.mjs} +24 -15
  2. package/dist/{PreviewEditorUI-Agkw4v5i.mjs → PreviewEditorUI-D6EQTsCA.mjs} +3 -3
  3. package/dist/{PreviewQueryProvider-CN0ewic5.mjs → PreviewQueryProvider-CC-EPkyQ.mjs} +1 -1
  4. package/dist/{SdkPreviewModeRuntime-DdbeAdS8.mjs → SdkPreviewModeRuntime-DH1n4ytY.mjs} +85 -54
  5. package/dist/{SiteChromeCustomizeContext-CqGOz-Kv.mjs → SiteChromeCustomizeContext-DunIzY0K.mjs} +797 -216
  6. package/dist/_dts/api/src/billing.d.ts +6 -1
  7. package/dist/_dts/api/src/bookingConfig.d.ts +1 -1
  8. package/dist/_dts/api/src/commercePortalEndpoints.d.ts +2 -2
  9. package/dist/_dts/api/src/contentRuntime.d.ts +12 -31
  10. package/dist/_dts/api/src/domainConnection.d.ts +4 -0
  11. package/dist/_dts/api/src/endpoints.d.ts +0 -27
  12. package/dist/_dts/api/src/footerCompositionContracts.d.ts +25 -0
  13. package/dist/_dts/api/src/index.d.ts +2 -2
  14. package/dist/_dts/api/src/launchReadiness.d.ts +1 -0
  15. package/dist/_dts/api/src/navigation/dashboardSiteNav.d.ts +2 -1
  16. package/dist/_dts/api/src/publicBookingService.d.ts +1 -0
  17. package/dist/_dts/api/src/sdkConfig/layout.d.ts +13 -0
  18. package/dist/_dts/api/src/sdkContracts.d.ts +3 -8
  19. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +3 -26
  20. package/dist/_dts/api/src/siteOnboarding.d.ts +7 -0
  21. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -31
  22. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +6 -1
  23. package/dist/_dts/billing/src/site-arrangements.d.ts +18 -5
  24. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -0
  25. package/dist/_dts/blocks/src/pageRendererContracts.d.ts +2 -0
  26. package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +2 -0
  27. package/dist/_dts/blocks/src/system/blocks/events/eventSelectionFields.d.ts +122 -0
  28. package/dist/_dts/blocks/src/system/blocks/events/shared/calendarWindow.d.ts +2 -1
  29. package/dist/_dts/blocks/src/system/blocks/events/shared/eventSelection.d.ts +11 -0
  30. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +56 -0
  31. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +8 -0
  32. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +2 -2
  33. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +47 -47
  34. package/dist/_dts/blocks/src/system/data/prefetchBlockData.d.ts +5 -0
  35. package/dist/_dts/blocks/src/system/data/utils.d.ts +1 -1
  36. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +27 -1
  37. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +12 -180
  38. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +6 -90
  39. package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.d.ts +2 -1
  40. package/dist/_dts/blocks/src/system/runtime/nodes/appointment-services.d.ts +5 -1
  41. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +4 -0
  42. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.state.d.ts +5 -0
  43. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.d.ts +3 -0
  44. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.d.ts +10 -3
  45. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventCheckoutHandoffRestore.d.ts +9 -0
  46. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +4 -5
  47. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useSettledCommerceView.d.ts +37 -0
  48. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +4 -3
  49. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +3 -0
  50. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +11 -101
  51. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +63 -2
  52. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/listOptions.d.ts +2 -0
  53. package/dist/_dts/blocks/src/system/transforms/registry/eventCalendar.d.ts +12 -0
  54. package/dist/_dts/commerce/src/purchase/bookingInstalmentSchedule.d.ts +4 -0
  55. package/dist/_dts/commerce/src/purchase/stripeCommissionMetadata.d.ts +1 -2
  56. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +3102 -3122
  57. package/dist/_dts/editor-blocks/src/block-editor/ColourFieldOptionsProvider.d.ts +7 -0
  58. package/dist/_dts/editor-blocks/src/block-editor/colourFieldVisibility.d.ts +7 -0
  59. package/dist/_dts/editor-blocks/src/block-editor/preparedManifest.d.ts +2 -0
  60. package/dist/_dts/editor-blocks/src/index.d.ts +1 -0
  61. package/dist/_dts/editor-blocks/src/widgets/site-option-picker/loaders.d.ts +27 -1
  62. package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +2 -2
  63. package/dist/_dts/preview-next/src/client/preview/PreviewFooterEditorPanel.d.ts +3 -6
  64. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -2
  65. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -2
  66. package/dist/_dts/preview-next/src/client/preview/footerInspection.d.ts +16 -0
  67. package/dist/_dts/preview-next/src/client/preview/sdkConfig.d.ts +6 -0
  68. package/dist/_dts/sdk/src/config/types.d.ts +2 -18
  69. package/dist/_dts/sdk/src/config/validation.d.ts +6 -0
  70. package/dist/_dts/sdk/src/public-api/contracts.d.ts +4 -1
  71. package/dist/_dts/sdk/src/version.d.ts +1 -1
  72. package/dist/_dts/theme-core/src/ThemeFontLoader.d.ts +17 -1
  73. package/dist/_dts/theme-core/src/buttons/affordanceSuppression.d.ts +17 -0
  74. package/dist/_dts/theme-core/src/buttons/buttonColourContract.d.ts +1 -1
  75. package/dist/_dts/theme-core/src/buttons/classNames.d.ts +16 -0
  76. package/dist/_dts/theme-core/src/buttons/generateButtonCss.d.ts +0 -6
  77. package/dist/_dts/theme-core/src/buttons/resolvedButtonCss.d.ts +4 -4
  78. package/dist/_dts/theme-core/src/footer/mode.d.ts +10 -1
  79. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  80. package/dist/_dts/theme-core/src/hosted-booking-appearance.d.ts +54 -12
  81. package/dist/_dts/theme-core/src/index.d.ts +1 -1
  82. package/dist/_dts/theme-core/src/schema.d.ts +1 -7
  83. package/dist/_dts/theme-core/src/site-styles/effectivePageDesign.d.ts +32 -0
  84. package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
  85. package/dist/client/{BookingConsentAgreement-CuKa82V4.mjs → BookingConsentAgreement-CnJeq3_r.mjs} +2 -2
  86. package/dist/client/{DiscountCodeDisclosure-BbYieKWB.mjs → DiscountCodeDisclosure-BINEO6J9.mjs} +1 -1
  87. package/dist/client/{EventCombined.client-LTfR1Aby.mjs → EventCombined.client-srxNQ6sZ.mjs} +11 -15
  88. package/dist/client/{EventListing.client-DUHpYSuo.mjs → EventListing.client-DbyVyGkX.mjs} +4 -17
  89. package/dist/client/{LeafletStaticMap-CHRupL6m.mjs → LeafletStaticMap-B-wpijzL.mjs} +1 -1
  90. package/dist/client/{accordion-6HiIFxNL.mjs → accordion-B-iUXU7n.mjs} +1 -1
  91. package/dist/client/{bookingForm-Dlmid43H.mjs → bookingForm-BXYPke5q.mjs} +5 -5
  92. package/dist/client/bookings.mjs +194 -102
  93. package/dist/client/{carousel-DmkZRRq_.mjs → carousel-Cr4aj63H.mjs} +1 -1
  94. package/dist/client/{cart-CIC24330.mjs → cart-DibP9WWa.mjs} +3 -3
  95. package/dist/client/{checkout-D1Zw9imo.mjs → checkout-CrSBVnL8.mjs} +3 -3
  96. package/dist/client/client.mjs +643 -192
  97. package/dist/client/{context-Cy1OayHx.mjs → context-Ces-AgdR.mjs} +1 -1
  98. package/dist/client/{dates-aDcfoLHr.mjs → dates-BXyNeNhB.mjs} +2 -2
  99. package/dist/client/{eventCalendar-FQxMPAjf.mjs → eventCalendar-HwpPeqrH.mjs} +11 -7
  100. package/dist/client/{eventCombined-Dr3ac6Hb.mjs → eventCombined-BpFUkuEI.mjs} +3 -3
  101. package/dist/client/{eventDetails-D-AzUHFQ.mjs → eventDetails-DK_agiWy.mjs} +4 -4
  102. package/dist/client/{eventListing-B3XxBf3i.mjs → eventListing-DhzHqP1c.mjs} +3 -3
  103. package/dist/client/{eventRegistration-I6EaokFD.mjs → eventRegistration-BdQ_Dn2d.mjs} +124 -32
  104. package/dist/client/{form-BbWckVWY.mjs → form-B1frcuzy.mjs} +2 -2
  105. package/dist/client/{headerSection-C9qU4Y7x.mjs → headerSection-CT5z460s.mjs} +2 -2
  106. package/dist/client/hooks.mjs +274 -45
  107. package/dist/client/{locationMap-CLCShvlG.mjs → locationMap-CIQXB9i2.mjs} +2 -2
  108. package/dist/client/{newsletterForm-Briukxzi.mjs → newsletterForm-BYNYZSes.mjs} +23 -10
  109. package/dist/client/{pricing-Copadu-2.mjs → pricing-CbTlAsmt.mjs} +1 -1
  110. package/dist/client/{productDetail-oujlRd-r.mjs → productDetail-CR7Z3yjS.mjs} +3 -3
  111. package/dist/client/{productList-BRiIRUcd.mjs → productList-DXj00vzR.mjs} +3 -3
  112. package/dist/client/{propsDecoder-CB2KS_ko.mjs → propsDecoder-DiLiBdek.mjs} +57 -16
  113. package/dist/client/rendering/client.mjs +476 -132
  114. package/dist/client/rendering/islands.mjs +17 -17
  115. package/dist/client/rendering.mjs +686 -195
  116. package/dist/client/{scrollToBlock-B1IS1_ua.mjs → scrollToBlock-CrcbBf0h.mjs} +28 -11
  117. package/dist/client/{shop-Vn6yNFED.mjs → shop-DgqiB_1b.mjs} +6 -6
  118. package/dist/client/{shop-commerce-BVTqipYp.mjs → shop-commerce-D_J781in.mjs} +5 -5
  119. package/dist/client/{shop-commerce-store-BVnJVy7v.mjs → shop-commerce-store-PGUbDwqe.mjs} +1 -1
  120. package/dist/client/{shopShared-COIeK77T.mjs → shopShared-C_Bb2zwG.mjs} +3 -3
  121. package/dist/client/{useEventFilters-DzIUcS9n.mjs → useEventFilters-CM17Xpr1.mjs} +17 -11
  122. package/dist/preview-next/before-render.mjs +0 -37
  123. package/dist/preview-next/client/runtime.mjs +4 -4
  124. package/dist/preview-next/editor-chrome.css +4 -8
  125. package/dist/preview-next/keepAlive.mjs +0 -37
  126. package/dist/preview-next/middleware.mjs +0 -37
  127. package/dist/{previewAuthStore-Gjb6r6vz.mjs → previewAuthStore-oVttoRDO.mjs} +0 -37
  128. package/dist/{sdk-runtime-CnCLvZRv.mjs → sdk-runtime-DhmuRhIX.mjs} +2 -2
  129. package/dist/{separator-DKDRJ1oH.mjs → separator-C3hlg9LH.mjs} +1 -1
  130. package/dist/server/components.mjs +452 -111
  131. package/dist/server/config-validation.mjs +263 -40
  132. package/dist/server/config.mjs +263 -40
  133. package/dist/server/data.mjs +274 -45
  134. package/dist/server/index.mjs +1 -38
  135. package/dist/server/next.mjs +427 -119
  136. package/dist/server/page-converter.mjs +208 -33
  137. package/dist/server/prebuild.mjs +1 -1
  138. package/dist/server/rendering/server.mjs +467 -119
  139. package/dist/server/rendering.mjs +467 -117
  140. package/dist/server/routing.mjs +301 -50
  141. package/dist/server/server.mjs +275 -83
  142. package/dist/server/theme-bridge.mjs +57 -23
  143. package/dist/server/theme.mjs +11 -9
  144. package/dist/styles/index.css +28 -2
  145. package/package.json +1 -1
@@ -8098,13 +8098,6 @@ const API_ENDPOINTS$1 = {
8098
8098
  auth: "service",
8099
8099
  responseKind: "json"
8100
8100
  },
8101
- sdkCatalogTheme: {
8102
- path: "/sdk/{siteId}/catalog/theme",
8103
- method: "GET",
8104
- errors: ["server:internal_error"],
8105
- auth: "service",
8106
- responseKind: "json"
8107
- },
8108
8101
  sdkCatalogBlocks: {
8109
8102
  path: "/sdk/{siteId}/catalog/blocks",
8110
8103
  method: "GET",
@@ -8165,12 +8158,6 @@ const API_ENDPOINTS$1 = {
8165
8158
  auth: "service",
8166
8159
  responseKind: "json"
8167
8160
  },
8168
- sdkPullTheme: {
8169
- path: "/sdk/{siteId}/pull/theme",
8170
- method: "GET",
8171
- auth: "service",
8172
- responseKind: "json"
8173
- },
8174
8161
  sdkPullFooter: {
8175
8162
  path: "/sdk/{siteId}/pull/footer",
8176
8163
  method: "GET",
@@ -8277,30 +8264,6 @@ const API_ENDPOINTS$1 = {
8277
8264
  auth: "service",
8278
8265
  responseKind: "json"
8279
8266
  },
8280
- sdkUpsertTheme: {
8281
- path: "/sdk/{siteId}/theme",
8282
- method: "POST",
8283
- auth: "service",
8284
- responseKind: "json",
8285
- errors: [
8286
- "validation:invalid_input",
8287
- "resource:not_found",
8288
- "resource:conflict",
8289
- "server:internal_error"
8290
- ]
8291
- },
8292
- sdkApplySiteStyleSelection: {
8293
- path: "/sdk/{siteId}/theme/style-selection/apply",
8294
- method: "POST",
8295
- auth: "service",
8296
- responseKind: "json",
8297
- errors: [
8298
- "validation:invalid_input",
8299
- "resource:not_found",
8300
- "resource:conflict",
8301
- "server:internal_error"
8302
- ]
8303
- },
8304
8267
  sdkUpsertFooter: {
8305
8268
  path: "/sdk/{siteId}/footer",
8306
8269
  method: "POST",
@@ -9565,7 +9528,7 @@ var SimpleCache = class {
9565
9528
  * 1. This constant
9566
9529
  * 2. The "version" field in package.json
9567
9530
  */
9568
- const SDK_VERSION = "0.140.0";
9531
+ const SDK_VERSION = "0.142.0";
9569
9532
  //#endregion
9570
9533
  //#region src/client/error.ts
9571
9534
  let _Symbol$for;
@@ -9814,6 +9777,14 @@ function formatKeyAsLabel(key) {
9814
9777
  return key.replace(/([A-Z])/g, " $1").replace(/[-_]/g, " ").trim().split(" ").map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
9815
9778
  }
9816
9779
  //#endregion
9780
+ //#region ../theme-core/src/footer/mode.ts
9781
+ const footerModeSchema = z.enum([
9782
+ "default",
9783
+ "blocks",
9784
+ "default+blocks",
9785
+ "none"
9786
+ ]);
9787
+ //#endregion
9817
9788
  //#region ../theme-core/src/lib/media.ts
9818
9789
  const hotspotSchema = z.object({
9819
9790
  x: z.number().min(0).max(1),
@@ -10899,7 +10870,7 @@ const BUTTON_CONTRAST_POLICY = {
10899
10870
  nonTextMinimumRatio: 3,
10900
10871
  gradientSamplesPerSegment: 20,
10901
10872
  alphaBackgrounds: "reject-without-known-surface",
10902
- disabled: "retain-full-colour-contract"
10873
+ disabled: "validated-colour-pair-with-muted-control-opacity"
10903
10874
  };
10904
10875
  function validateButtonSurfaceContrast(input) {
10905
10876
  const ratio = contrastRatio(input.buttonPaint, input.surfaceHex);
@@ -15856,12 +15827,6 @@ const footerVariant = z.enum([
15856
15827
  "split"
15857
15828
  ]);
15858
15829
  const footerMaxWidth = z.enum(["container", "full"]);
15859
- const footerMode = z.enum([
15860
- "default",
15861
- "blocks",
15862
- "default+blocks",
15863
- "none"
15864
- ]);
15865
15830
  const footerNavLayoutMode = z.enum([
15866
15831
  "stack",
15867
15832
  "inline",
@@ -15950,9 +15915,9 @@ const footerSchema = z.object({
15950
15915
  /**
15951
15916
  * SDK-only footer rendering mode.
15952
15917
  *
15953
- * Backwards compatible: missing/undefined behaves as 'default'.
15918
+ * Historical persisted field; SDK rendering mode now lives in layout.footerMode.
15954
15919
  */
15955
- mode: footerMode.optional(),
15920
+ mode: footerModeSchema.optional(),
15956
15921
  variant: footerVariant,
15957
15922
  maxWidth: footerMaxWidth,
15958
15923
  showLogoText: z.boolean().optional(),
@@ -16457,6 +16422,7 @@ function isDisplayMediaKind(kind) {
16457
16422
  }
16458
16423
  const siteOptionSources = [
16459
16424
  "eventCategories",
16425
+ "eventSeries",
16460
16426
  "venues",
16461
16427
  "staffMembers"
16462
16428
  ];
@@ -35383,7 +35349,8 @@ const appointmentServicesBlockDefinition = {
35383
35349
  el("appointment-services", {
35384
35350
  sectionHeading: { $bind: { from: "content.heading" } },
35385
35351
  services: { $bind: { from: "data.services" } },
35386
- pathname: { $bind: { from: "$root.pathname" } }
35352
+ pathname: { $bind: { from: "$root.pathname" } },
35353
+ servicePathPrefix: { $bind: { from: "$root.appointmentServicePathPrefix" } }
35387
35354
  })
35388
35355
  ], { gap: "lg" })
35389
35356
  })]
@@ -35944,6 +35911,15 @@ const publicEventBaseSchema = z.object({
35944
35911
  timeZone: z.string(),
35945
35912
  pricing: publicEventPricingSchema,
35946
35913
  paymentTerms: blockBookingPaymentTermsSchema,
35914
+ cancellationPolicy: z.object({ refunds: z.object({
35915
+ mode: z.enum([
35916
+ "never",
35917
+ "always",
35918
+ "cutoff"
35919
+ ]),
35920
+ cutoffHours: z.number(),
35921
+ method: z.enum(["original_payment_method", "site_credit"])
35922
+ }) }),
35947
35923
  consent: blockBookingConsentSchema.nullable(),
35948
35924
  accessRestriction: accessRestrictionSchema,
35949
35925
  allowedCategoryIds: z.array(z.string()),
@@ -37395,6 +37371,35 @@ const eventSpotlightBlockDefinition = {
37395
37371
  } }
37396
37372
  };
37397
37373
  //#endregion
37374
+ //#region ../blocks/src/system/blocks/events/shared/eventSelection.ts
37375
+ /** Invalid saved selections fail closed rather than widening discovery. */
37376
+ function resolveEventSelection(mode, value) {
37377
+ if (mode !== "selected") return { kind: "matching" };
37378
+ const candidates = Array.isArray(value) ? value : typeof value === "string" ? value.split(",").filter(Boolean) : [];
37379
+ const ids = [];
37380
+ for (const candidate of candidates) {
37381
+ if (typeof candidate !== "string") return {
37382
+ kind: "selected",
37383
+ seriesIds: []
37384
+ };
37385
+ const parsed = parseEventSeriesId(candidate.trim());
37386
+ if (!parsed.ok) return {
37387
+ kind: "selected",
37388
+ seriesIds: []
37389
+ };
37390
+ ids.push(parsed.value);
37391
+ }
37392
+ return {
37393
+ kind: "selected",
37394
+ seriesIds: [...new Set(ids)].sort()
37395
+ };
37396
+ }
37397
+ /** Undefined means discovery; an empty string is an explicitly empty selection. */
37398
+ function eventSeriesScopeCsv(value) {
37399
+ if (value == null) return void 0;
37400
+ return typeof value === "string" ? value : value.join(",");
37401
+ }
37402
+ //#endregion
37398
37403
  //#region ../blocks/src/system/runtime/nodes/events/shared/listingLayout.ts
37399
37404
  /**
37400
37405
  * Layout classes for event listing containers and cards. Presentation
@@ -37523,6 +37528,7 @@ const calendarWindowQuerySchema = z.object({
37523
37528
  eventSurface: z.enum(eventSurfaceScopeValues).optional(),
37524
37529
  eventPresets: z.string().optional(),
37525
37530
  scheduleScope: z.enum(eventScheduleScopeValues).optional(),
37531
+ seriesIds: z.string().optional(),
37526
37532
  categoryIds: z.string().optional(),
37527
37533
  venueId: z.string().transform(normalizeCalendarFilterId).optional(),
37528
37534
  staffMemberId: z.string().transform(normalizeCalendarFilterId).optional()
@@ -37585,6 +37591,7 @@ const eventCollectionFilterSourceSchemaShape = {
37585
37591
  eventSurface: eventSurfaceScopeSchema$1.nullable().optional(),
37586
37592
  filterEventPresets: z.union([z.string(), z.array(z.string())]).nullable().optional(),
37587
37593
  scheduleScope: eventScheduleScopeSchema$1.nullable().optional(),
37594
+ seriesIds: z.union([z.string(), z.array(z.string())]).nullable().optional(),
37588
37595
  filterCategoryIds: z.union([z.string(), z.array(z.string())]).nullable().optional(),
37589
37596
  filterStaffMemberId: z.string().nullable().optional(),
37590
37597
  filterVenueId: z.string().nullable().optional()
@@ -37631,6 +37638,7 @@ const eventCollectionDisplaySchemaShape = {
37631
37638
  eventSurface: eventSurfaceScopeSchema$1,
37632
37639
  filterEventPresets: z.string().nullable(),
37633
37640
  scheduleScope: eventScheduleScopeSchema$1,
37641
+ seriesIds: z.string().nullable().optional(),
37634
37642
  filterCategoryIds: z.string().nullable(),
37635
37643
  filterStaffMemberId: z.string().nullable(),
37636
37644
  filterVenueId: z.string().nullable(),
@@ -37678,11 +37686,15 @@ function buildEventCollectionDisplay(source) {
37678
37686
  };
37679
37687
  }
37680
37688
  function buildEventCollectionFilterDisplay(source) {
37681
- return {
37682
- showFilters: source.showFilters ?? true,
37683
- showCategoryFilter: source.showCategoryFilter ?? "auto",
37684
- showVenueFilter: source.showVenueFilter ?? false,
37685
- showStaffFilter: source.showStaffFilter ?? true,
37689
+ const selected = source.seriesIds != null;
37690
+ const matchingFilters = selected ? {
37691
+ eventSurface: "all",
37692
+ filterEventPresets: null,
37693
+ scheduleScope: "any",
37694
+ filterCategoryIds: null,
37695
+ filterStaffMemberId: null,
37696
+ filterVenueId: null
37697
+ } : {
37686
37698
  eventSurface: normalizeEventSurfaceScope(source.eventSurface),
37687
37699
  filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
37688
37700
  scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
@@ -37690,6 +37702,14 @@ function buildEventCollectionFilterDisplay(source) {
37690
37702
  filterStaffMemberId: normalizeEventStaffMemberId(source.filterStaffMemberId),
37691
37703
  filterVenueId: normalizeEventVenueId(source.filterVenueId)
37692
37704
  };
37705
+ return {
37706
+ seriesIds: eventSeriesScopeCsv(source.seriesIds),
37707
+ showFilters: selected ? false : source.showFilters ?? true,
37708
+ showCategoryFilter: source.showCategoryFilter ?? "auto",
37709
+ showVenueFilter: source.showVenueFilter ?? false,
37710
+ showStaffFilter: source.showStaffFilter ?? true,
37711
+ ...matchingFilters
37712
+ };
37693
37713
  }
37694
37714
  function buildEventCollectionPresentationDisplay(source) {
37695
37715
  return {
@@ -37704,14 +37724,15 @@ function buildEventCollectionPresentationDisplay(source) {
37704
37724
  }
37705
37725
  function buildEventCollectionHydration(source, now = /* @__PURE__ */ new Date()) {
37706
37726
  const timeZone = source.calendarWindow?.scope.timeZone ?? toBookingTimeZone(source.bookingTimeZone);
37727
+ const selected = source.seriesIds != null;
37707
37728
  return {
37708
37729
  calendarWindow: source.calendarWindow ?? void 0,
37709
37730
  siteId: source.siteId,
37710
37731
  stage: source.stage,
37711
37732
  prefetchedEvents: source.events != null,
37712
- eventSurface: normalizeEventSurfaceScope(source.eventSurface),
37713
- filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
37714
- scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
37733
+ eventSurface: selected ? "all" : normalizeEventSurfaceScope(source.eventSurface),
37734
+ filterEventPresets: selected ? null : normalizeEventSurfacePresetsCsv(source.filterEventPresets),
37735
+ scheduleScope: selected ? "any" : normalizeEventScheduleScope(source.scheduleScope),
37715
37736
  calendarContext: {
37716
37737
  timeZone,
37717
37738
  initialToday: source.calendarWindow?.initialToday ?? getLocalScheduleDate(now, timeZone)
@@ -37777,6 +37798,7 @@ const eventListingHydrationSchema = z.object({
37777
37798
  eventSurface: eventSurfaceScopeSchema,
37778
37799
  filterEventPresets: z.string().nullable(),
37779
37800
  scheduleScope: eventScheduleScopeSchema,
37801
+ seriesIds: z.string().nullable().optional(),
37780
37802
  filterCategoryIds: z.string().nullable().optional(),
37781
37803
  filterStaffMemberId: z.string().nullable().optional(),
37782
37804
  filterVenueId: z.string().nullable().optional(),
@@ -37837,6 +37859,7 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
37837
37859
  eventSurface: normalizeEventSurfaceScope(source.eventSurface),
37838
37860
  filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
37839
37861
  scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
37862
+ seriesIds: eventSeriesScopeCsv(source.seriesIds),
37840
37863
  filterCategoryIds: normalizeEventCategoryIdsCsv(source.filterCategoryIds),
37841
37864
  filterStaffMemberId: normalizeEventStaffMemberId(source.filterStaffMemberId),
37842
37865
  filterVenueId: normalizeEventVenueId(source.filterVenueId),
@@ -38210,6 +38233,65 @@ const eventListingBlockDefinition = {
38210
38233
  } }
38211
38234
  };
38212
38235
  //#endregion
38236
+ //#region ../blocks/src/system/blocks/events/eventSelectionFields.ts
38237
+ const eventSelectionFields = [{
38238
+ id: "eventSelection",
38239
+ type: "select",
38240
+ label: "Events to show",
38241
+ required: false,
38242
+ multiple: false,
38243
+ defaultValue: "matching",
38244
+ options: [{
38245
+ value: "matching",
38246
+ label: "All matching events"
38247
+ }, {
38248
+ value: "selected",
38249
+ label: "Selected events"
38250
+ }],
38251
+ ui: { intent: "behavior" }
38252
+ }, createSiteOptionSelectField({
38253
+ id: "selectedEventSeriesIds",
38254
+ label: "Selected events",
38255
+ description: "Show upcoming dates for these events. Other event filters do not apply.",
38256
+ required: false,
38257
+ multiple: true,
38258
+ defaultValue: [],
38259
+ optionSource: "eventSeries",
38260
+ ui: {
38261
+ intent: "behavior",
38262
+ searchThreshold: 1,
38263
+ visibleWhen: {
38264
+ field: "eventSelection",
38265
+ equals: "selected"
38266
+ }
38267
+ }
38268
+ })];
38269
+ function withEventSelectionVisibility(field) {
38270
+ if (![
38271
+ "eventSurface",
38272
+ "filterEventPresets",
38273
+ "scheduleScope",
38274
+ "filterCategoryIds",
38275
+ "filterStaffMemberId",
38276
+ "filterVenueId",
38277
+ "showFilters",
38278
+ "showCategoryFilter",
38279
+ "showVenueFilter",
38280
+ "showStaffFilter"
38281
+ ].includes(field.id)) return field;
38282
+ const visibleWhen = field.ui?.visibleWhen;
38283
+ return {
38284
+ ...field,
38285
+ ui: {
38286
+ ...field.ui,
38287
+ visibleWhen: { allOf: [{
38288
+ field: "eventSelection",
38289
+ notEquals: "selected"
38290
+ }, ...visibleWhen ? [visibleWhen] : []] }
38291
+ }
38292
+ };
38293
+ }
38294
+ //#endregion
38213
38295
  //#region ../blocks/src/system/runtime/nodes/events/EventCalendar.interactive.ts
38214
38296
  const eventCalendarSourceSchema = z.object({
38215
38297
  ...eventCollectionSourceSchemaShape,
@@ -38292,19 +38374,59 @@ const eventCalendarBlockRuntime = defineProgressiveBlockRuntime({
38292
38374
  //#region ../blocks/src/system/blocks/events/eventCalendarDataLoaders.ts
38293
38375
  const scopeParams = {
38294
38376
  siteId: { $bind: { from: "$root.siteId" } },
38377
+ seriesIds: { $bind: {
38378
+ from: "content",
38379
+ transforms: [{
38380
+ id: "events.calendarSelectionParam",
38381
+ options: { key: "seriesIds" }
38382
+ }]
38383
+ } },
38295
38384
  stage: { $bind: {
38296
38385
  from: "$root.previewStage",
38297
38386
  fallback: "published"
38298
38387
  } },
38299
- eventSurface: { $bind: { from: "content.eventSurface" } },
38388
+ eventSurface: { $bind: {
38389
+ from: "content",
38390
+ transforms: [{
38391
+ id: "events.calendarSelectionParam",
38392
+ options: { key: "eventSurface" }
38393
+ }, { id: "value.csv" }]
38394
+ } },
38300
38395
  eventPresets: { $bind: {
38301
- from: "content.filterEventPresets",
38302
- transforms: [{ id: "value.csv" }]
38396
+ from: "content",
38397
+ transforms: [{
38398
+ id: "events.calendarSelectionParam",
38399
+ options: { key: "filterEventPresets" }
38400
+ }, { id: "value.csv" }]
38303
38401
  } },
38304
- scheduleScope: { $bind: { from: "content.scheduleScope" } },
38305
- categoryIds: { $bind: { from: "content.filterCategoryIds" } },
38306
- staffMemberId: { $bind: { from: "content.filterStaffMemberId" } },
38307
- venueId: { $bind: { from: "content.filterVenueId" } }
38402
+ scheduleScope: { $bind: {
38403
+ from: "content",
38404
+ transforms: [{
38405
+ id: "events.calendarSelectionParam",
38406
+ options: { key: "scheduleScope" }
38407
+ }, { id: "value.csv" }]
38408
+ } },
38409
+ categoryIds: { $bind: {
38410
+ from: "content",
38411
+ transforms: [{
38412
+ id: "events.calendarSelectionParam",
38413
+ options: { key: "filterCategoryIds" }
38414
+ }, { id: "value.csv" }]
38415
+ } },
38416
+ staffMemberId: { $bind: {
38417
+ from: "content",
38418
+ transforms: [{
38419
+ id: "events.calendarSelectionParam",
38420
+ options: { key: "filterStaffMemberId" }
38421
+ }, { id: "value.csv" }]
38422
+ } },
38423
+ venueId: { $bind: {
38424
+ from: "content",
38425
+ transforms: [{
38426
+ id: "events.calendarSelectionParam",
38427
+ options: { key: "filterVenueId" }
38428
+ }, { id: "value.csv" }]
38429
+ } }
38308
38430
  };
38309
38431
  /** Combined renders two jobs; calendar-only variants never pay for the list seed. */
38310
38432
  const eventCalendarDataLoaders = {
@@ -38434,6 +38556,13 @@ const eventCalendarLayout = [styledSection({
38434
38556
  from: "content.defaultCalendarView",
38435
38557
  fallback: "month"
38436
38558
  } },
38559
+ seriesIds: { $bind: {
38560
+ from: "content",
38561
+ transforms: [{
38562
+ id: "events.calendarSelectionParam",
38563
+ options: { key: "seriesIds" }
38564
+ }]
38565
+ } },
38437
38566
  showFilters: { $bind: {
38438
38567
  from: "content.showFilters",
38439
38568
  fallback: true
@@ -38455,17 +38584,47 @@ const eventCalendarLayout = [styledSection({
38455
38584
  fallback: true
38456
38585
  } },
38457
38586
  eventSurface: { $bind: {
38458
- from: "content.eventSurface",
38459
- fallback: "all"
38587
+ from: "content",
38588
+ transforms: [{
38589
+ id: "events.calendarSelectionParam",
38590
+ options: { key: "eventSurface" }
38591
+ }]
38592
+ } },
38593
+ filterEventPresets: { $bind: {
38594
+ from: "content",
38595
+ transforms: [{
38596
+ id: "events.calendarSelectionParam",
38597
+ options: { key: "filterEventPresets" }
38598
+ }]
38460
38599
  } },
38461
- filterEventPresets: { $bind: { from: "content.filterEventPresets" } },
38462
38600
  scheduleScope: { $bind: {
38463
- from: "content.scheduleScope",
38464
- fallback: "any"
38601
+ from: "content",
38602
+ transforms: [{
38603
+ id: "events.calendarSelectionParam",
38604
+ options: { key: "scheduleScope" }
38605
+ }]
38606
+ } },
38607
+ filterCategoryIds: { $bind: {
38608
+ from: "content",
38609
+ transforms: [{
38610
+ id: "events.calendarSelectionParam",
38611
+ options: { key: "filterCategoryIds" }
38612
+ }]
38613
+ } },
38614
+ filterStaffMemberId: { $bind: {
38615
+ from: "content",
38616
+ transforms: [{
38617
+ id: "events.calendarSelectionParam",
38618
+ options: { key: "filterStaffMemberId" }
38619
+ }]
38620
+ } },
38621
+ filterVenueId: { $bind: {
38622
+ from: "content",
38623
+ transforms: [{
38624
+ id: "events.calendarSelectionParam",
38625
+ options: { key: "filterVenueId" }
38626
+ }]
38465
38627
  } },
38466
- filterCategoryIds: { $bind: { from: "content.filterCategoryIds" } },
38467
- filterStaffMemberId: { $bind: { from: "content.filterStaffMemberId" } },
38468
- filterVenueId: { $bind: { from: "content.filterVenueId" } },
38469
38628
  cardRole: { $bind: {
38470
38629
  from: "content._cardStyles.role",
38471
38630
  fallback: "default"
@@ -38969,6 +39128,7 @@ const eventCalendarAdditionalFields = [
38969
39128
  }
38970
39129
  }
38971
39130
  },
39131
+ ...eventSelectionFields,
38972
39132
  {
38973
39133
  id: "eventSurface",
38974
39134
  type: "select",
@@ -39178,7 +39338,7 @@ const eventCalendarBlockDefinition = {
39178
39338
  titleSource: "heading",
39179
39339
  description: "Display events with calendar, list, or combined views with filtering",
39180
39340
  skipSectionStyles: true,
39181
- additionalFields: eventCalendarAdditionalFields,
39341
+ additionalFields: eventCalendarAdditionalFields.map(withEventSelectionVisibility),
39182
39342
  styleTokens: {
39183
39343
  background: "surface",
39184
39344
  typography: "body",
@@ -45837,6 +45997,26 @@ const linksTransforms = [{
45837
45997
  }
45838
45998
  }];
45839
45999
  const defaultTransforms = createTransformRegistry([
46000
+ {
46001
+ id: "events.calendarSelectionParam",
46002
+ kind: "formatter",
46003
+ summary: "Resolve selected events instead of discovery filters",
46004
+ schema: z.object({ key: z.enum([
46005
+ "seriesIds",
46006
+ "eventSurface",
46007
+ "filterEventPresets",
46008
+ "scheduleScope",
46009
+ "filterCategoryIds",
46010
+ "filterStaffMemberId",
46011
+ "filterVenueId"
46012
+ ]) }),
46013
+ run(value, { key }) {
46014
+ const content = asPartialObject(value) ?? {};
46015
+ const selection = resolveEventSelection(content.eventSelection, content.selectedEventSeriesIds);
46016
+ if (selection.kind === "selected") return key === "seriesIds" ? selection.seriesIds : void 0;
46017
+ return key === "seriesIds" ? void 0 : content[key];
46018
+ }
46019
+ },
45840
46020
  {
45841
46021
  id: "events.calendarReadEnabled",
45842
46022
  kind: "formatter",
@@ -46151,12 +46331,12 @@ function normalizeContent(block) {
46151
46331
  }
46152
46332
  /**
46153
46333
  * Normalize params for API calls.
46154
- * Converts all values to strings.
46334
+ * Converts supplied values to strings, preserving absent versus explicitly empty params.
46155
46335
  */
46156
46336
  function normalizeParams(input) {
46157
46337
  if (!input || typeof input !== "object") return {};
46158
46338
  const output = {};
46159
- for (const [key, value] of Object.entries(input)) output[key] = coerceToString(value);
46339
+ for (const [key, value] of Object.entries(input)) if (value !== void 0 && value !== null) output[key] = coerceToString(value);
46160
46340
  return output;
46161
46341
  }
46162
46342
  function isNonArrayObject(value) {
@@ -46220,6 +46400,14 @@ function coercePayload(payload) {
46220
46400
  * - Frontend: provide internal API client
46221
46401
  * - SDK: provide SDK client with endpoint mapping
46222
46402
  */
46403
+ function projectDataLoaders(loaders, shouldLoad, blockId, blockKind) {
46404
+ if (!shouldLoad) return [...loaders];
46405
+ return loaders.filter(({ key }) => shouldLoad({
46406
+ blockId,
46407
+ blockKind,
46408
+ loaderKey: key
46409
+ }));
46410
+ }
46223
46411
  function shouldSkipResolvedLoader(input) {
46224
46412
  if (input.loader.requiredParams?.some((param) => !input.params[param]?.trim())) return true;
46225
46413
  return Boolean(input.isValidEndpoint && !input.isValidEndpoint(input.endpoint));
@@ -46248,7 +46436,7 @@ async function prefetchBlockData$1(page, context, options) {
46248
46436
  return (await prefetchBlockDataWithFailures(page, context, options)).resolvedData;
46249
46437
  }
46250
46438
  async function prefetchBlockDataWithFailures(page, context, options) {
46251
- const { apiClient, isValidEndpoint, onError, getCustomBlockLoaders, getBlockDefinition: getBlockDefinition$1 = getBlockDefinition, resolveParamsBindings: resolveParamsBindings$1 = resolveParamsBindings } = options;
46439
+ const { apiClient, isValidEndpoint, onError, getCustomBlockLoaders, getBlockDefinition: getBlockDefinition$1 = getBlockDefinition, resolveParamsBindings: resolveParamsBindings$1 = resolveParamsBindings, shouldLoad } = options;
46252
46440
  const results = {};
46253
46441
  const loaderFailures = {};
46254
46442
  const tasks = [];
@@ -46265,6 +46453,7 @@ async function prefetchBlockDataWithFailures(page, context, options) {
46265
46453
  loader
46266
46454
  })) : [];
46267
46455
  } else loaders = [];
46456
+ loaders = projectDataLoaders(loaders, shouldLoad, blockId, block.kind);
46268
46457
  if (loaders.length === 0) continue;
46269
46458
  const root = {
46270
46459
  ...context.root ?? {},
@@ -46346,8 +46535,8 @@ function toStringParams(value) {
46346
46535
  for (const [k, v] of Object.entries(value)) if (typeof v === "string") out[k] = v;
46347
46536
  return out;
46348
46537
  }
46349
- function stripEmptyStringValues(params) {
46350
- for (const [key, value] of Object.entries(params)) if (value === "") delete params[key];
46538
+ function stripEmptyStringValues(params, endpoint) {
46539
+ for (const [key, value] of Object.entries(params)) if (value === "" && !(key === "seriesIds" && (endpoint === "listPublicEvents" || endpoint === "listPublicEventCalendarWindow"))) delete params[key];
46351
46540
  }
46352
46541
  function ensureSiteId(params, context) {
46353
46542
  if (!params.siteId && typeof context.siteId === "string" && context.siteId) params.siteId = context.siteId;
@@ -46360,7 +46549,7 @@ function ensureSiteId(params, context) {
46360
46549
  */
46361
46550
  function normalizeLoaderParams(endpoint, params, context) {
46362
46551
  const out = toStringParams(params);
46363
- stripEmptyStringValues(out);
46552
+ stripEmptyStringValues(out, endpoint);
46364
46553
  if (endpoint === "getPublicFormById") {
46365
46554
  ensureSiteId(out, context);
46366
46555
  if (!out.formId && out.formSlug) {
@@ -49011,11 +49200,14 @@ const sdkSiteStyleConfigSchema = z.object({
49011
49200
  sectionOptions: sdkSectionOptionsConfigSchema.optional(),
49012
49201
  containerOptions: sdkContainerOptionsConfigSchema.optional()
49013
49202
  });
49014
- const sdkSiteLayoutConfigSchema = z.object({ footerBlocks: z.array(z.object({
49015
- id: z.string().min(1).optional(),
49016
- kind: z.string().min(1),
49017
- content: z.record(z.string(), z.unknown()).optional()
49018
- })).optional() });
49203
+ const sdkSiteLayoutConfigSchema = z.object({
49204
+ footerMode: footerModeSchema.optional(),
49205
+ footerBlocks: z.array(z.object({
49206
+ id: z.string().min(1).optional(),
49207
+ kind: z.string().min(1),
49208
+ content: z.record(z.string(), z.unknown()).optional()
49209
+ })).optional()
49210
+ });
49019
49211
  const sdkFieldSelectOptionSchema = z.object({
49020
49212
  value: z.string(),
49021
49213
  label: z.string()