@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
@@ -1402,6 +1402,14 @@ function rotateNormalizedPoint(point, rotation) {
1402
1402
  }
1403
1403
  }
1404
1404
  //#endregion
1405
+ //#region ../theme-core/src/footer/mode.ts
1406
+ const footerModeSchema = z.enum([
1407
+ "default",
1408
+ "blocks",
1409
+ "default+blocks",
1410
+ "none"
1411
+ ]);
1412
+ //#endregion
1405
1413
  //#region ../theme-core/src/lib/media.ts
1406
1414
  const hotspotSchema = z.object({
1407
1415
  x: z.number().min(0).max(1),
@@ -2487,7 +2495,7 @@ const BUTTON_CONTRAST_POLICY = {
2487
2495
  nonTextMinimumRatio: 3,
2488
2496
  gradientSamplesPerSegment: 20,
2489
2497
  alphaBackgrounds: "reject-without-known-surface",
2490
- disabled: "retain-full-colour-contract"
2498
+ disabled: "validated-colour-pair-with-muted-control-opacity"
2491
2499
  };
2492
2500
  function validateButtonSurfaceContrast(input) {
2493
2501
  const ratio = contrastRatio(input.buttonPaint, input.surfaceHex);
@@ -7444,12 +7452,6 @@ const footerVariant = z.enum([
7444
7452
  "split"
7445
7453
  ]);
7446
7454
  const footerMaxWidth = z.enum(["container", "full"]);
7447
- const footerMode = z.enum([
7448
- "default",
7449
- "blocks",
7450
- "default+blocks",
7451
- "none"
7452
- ]);
7453
7455
  const footerNavLayoutMode = z.enum([
7454
7456
  "stack",
7455
7457
  "inline",
@@ -7538,9 +7540,9 @@ const footerSchema = z.object({
7538
7540
  /**
7539
7541
  * SDK-only footer rendering mode.
7540
7542
  *
7541
- * Backwards compatible: missing/undefined behaves as 'default'.
7543
+ * Historical persisted field; SDK rendering mode now lives in layout.footerMode.
7542
7544
  */
7543
- mode: footerMode.optional(),
7545
+ mode: footerModeSchema.optional(),
7544
7546
  variant: footerVariant,
7545
7547
  maxWidth: footerMaxWidth,
7546
7548
  showLogoText: z.boolean().optional(),
@@ -8131,6 +8133,15 @@ const publicEventBaseSchema = z.object({
8131
8133
  timeZone: z.string(),
8132
8134
  pricing: publicEventPricingSchema,
8133
8135
  paymentTerms: blockBookingPaymentTermsSchema,
8136
+ cancellationPolicy: z.object({ refunds: z.object({
8137
+ mode: z.enum([
8138
+ "never",
8139
+ "always",
8140
+ "cutoff"
8141
+ ]),
8142
+ cutoffHours: z.number(),
8143
+ method: z.enum(["original_payment_method", "site_credit"])
8144
+ }) }),
8134
8145
  consent: blockBookingConsentSchema.nullable(),
8135
8146
  accessRestriction: accessRestrictionSchema,
8136
8147
  allowedCategoryIds: z.array(z.string()),
@@ -8303,6 +8314,7 @@ const calendarWindowQuerySchema = z.object({
8303
8314
  eventSurface: z.enum(eventSurfaceScopeValues).optional(),
8304
8315
  eventPresets: z.string().optional(),
8305
8316
  scheduleScope: z.enum(eventScheduleScopeValues).optional(),
8317
+ seriesIds: z.string().optional(),
8306
8318
  categoryIds: z.string().optional(),
8307
8319
  venueId: z.string().transform(normalizeCalendarFilterId).optional(),
8308
8320
  staffMemberId: z.string().transform(normalizeCalendarFilterId).optional()
@@ -16980,6 +16992,7 @@ function isDisplayMediaKind(kind) {
16980
16992
  }
16981
16993
  const siteOptionSources = [
16982
16994
  "eventCategories",
16995
+ "eventSeries",
16983
16996
  "venues",
16984
16997
  "staffMembers"
16985
16998
  ];
@@ -27851,7 +27864,8 @@ const appointmentServicesBlockDefinition = {
27851
27864
  el("appointment-services", {
27852
27865
  sectionHeading: { $bind: { from: "content.heading" } },
27853
27866
  services: { $bind: { from: "data.services" } },
27854
- pathname: { $bind: { from: "$root.pathname" } }
27867
+ pathname: { $bind: { from: "$root.pathname" } },
27868
+ servicePathPrefix: { $bind: { from: "$root.appointmentServicePathPrefix" } }
27855
27869
  })
27856
27870
  ], { gap: "lg" })
27857
27871
  })]
@@ -29392,6 +29406,35 @@ const eventSpotlightBlockDefinition = {
29392
29406
  } }
29393
29407
  };
29394
29408
  //#endregion
29409
+ //#region ../blocks/src/system/blocks/events/shared/eventSelection.ts
29410
+ /** Invalid saved selections fail closed rather than widening discovery. */
29411
+ function resolveEventSelection(mode, value) {
29412
+ if (mode !== "selected") return { kind: "matching" };
29413
+ const candidates = Array.isArray(value) ? value : typeof value === "string" ? value.split(",").filter(Boolean) : [];
29414
+ const ids = [];
29415
+ for (const candidate of candidates) {
29416
+ if (typeof candidate !== "string") return {
29417
+ kind: "selected",
29418
+ seriesIds: []
29419
+ };
29420
+ const parsed = parseEventSeriesId(candidate.trim());
29421
+ if (!parsed.ok) return {
29422
+ kind: "selected",
29423
+ seriesIds: []
29424
+ };
29425
+ ids.push(parsed.value);
29426
+ }
29427
+ return {
29428
+ kind: "selected",
29429
+ seriesIds: [...new Set(ids)].sort()
29430
+ };
29431
+ }
29432
+ /** Undefined means discovery; an empty string is an explicitly empty selection. */
29433
+ function eventSeriesScopeCsv(value) {
29434
+ if (value == null) return void 0;
29435
+ return typeof value === "string" ? value : value.join(",");
29436
+ }
29437
+ //#endregion
29395
29438
  //#region ../blocks/src/system/runtime/nodes/events/shared/listingLayout.ts
29396
29439
  /**
29397
29440
  * Layout classes for event listing containers and cards. Presentation
@@ -29491,6 +29534,7 @@ const eventCollectionFilterSourceSchemaShape = {
29491
29534
  eventSurface: eventSurfaceScopeSchema$1.nullable().optional(),
29492
29535
  filterEventPresets: z.union([z.string(), z.array(z.string())]).nullable().optional(),
29493
29536
  scheduleScope: eventScheduleScopeSchema$1.nullable().optional(),
29537
+ seriesIds: z.union([z.string(), z.array(z.string())]).nullable().optional(),
29494
29538
  filterCategoryIds: z.union([z.string(), z.array(z.string())]).nullable().optional(),
29495
29539
  filterStaffMemberId: z.string().nullable().optional(),
29496
29540
  filterVenueId: z.string().nullable().optional()
@@ -29537,6 +29581,7 @@ const eventCollectionDisplaySchemaShape = {
29537
29581
  eventSurface: eventSurfaceScopeSchema$1,
29538
29582
  filterEventPresets: z.string().nullable(),
29539
29583
  scheduleScope: eventScheduleScopeSchema$1,
29584
+ seriesIds: z.string().nullable().optional(),
29540
29585
  filterCategoryIds: z.string().nullable(),
29541
29586
  filterStaffMemberId: z.string().nullable(),
29542
29587
  filterVenueId: z.string().nullable(),
@@ -29584,11 +29629,15 @@ function buildEventCollectionDisplay(source) {
29584
29629
  };
29585
29630
  }
29586
29631
  function buildEventCollectionFilterDisplay(source) {
29587
- return {
29588
- showFilters: source.showFilters ?? true,
29589
- showCategoryFilter: source.showCategoryFilter ?? "auto",
29590
- showVenueFilter: source.showVenueFilter ?? false,
29591
- showStaffFilter: source.showStaffFilter ?? true,
29632
+ const selected = source.seriesIds != null;
29633
+ const matchingFilters = selected ? {
29634
+ eventSurface: "all",
29635
+ filterEventPresets: null,
29636
+ scheduleScope: "any",
29637
+ filterCategoryIds: null,
29638
+ filterStaffMemberId: null,
29639
+ filterVenueId: null
29640
+ } : {
29592
29641
  eventSurface: normalizeEventSurfaceScope(source.eventSurface),
29593
29642
  filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
29594
29643
  scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
@@ -29596,6 +29645,14 @@ function buildEventCollectionFilterDisplay(source) {
29596
29645
  filterStaffMemberId: normalizeEventStaffMemberId(source.filterStaffMemberId),
29597
29646
  filterVenueId: normalizeEventVenueId(source.filterVenueId)
29598
29647
  };
29648
+ return {
29649
+ seriesIds: eventSeriesScopeCsv(source.seriesIds),
29650
+ showFilters: selected ? false : source.showFilters ?? true,
29651
+ showCategoryFilter: source.showCategoryFilter ?? "auto",
29652
+ showVenueFilter: source.showVenueFilter ?? false,
29653
+ showStaffFilter: source.showStaffFilter ?? true,
29654
+ ...matchingFilters
29655
+ };
29599
29656
  }
29600
29657
  function buildEventCollectionPresentationDisplay(source) {
29601
29658
  return {
@@ -29610,14 +29667,15 @@ function buildEventCollectionPresentationDisplay(source) {
29610
29667
  }
29611
29668
  function buildEventCollectionHydration(source, now = /* @__PURE__ */ new Date()) {
29612
29669
  const timeZone = source.calendarWindow?.scope.timeZone ?? toBookingTimeZone(source.bookingTimeZone);
29670
+ const selected = source.seriesIds != null;
29613
29671
  return {
29614
29672
  calendarWindow: source.calendarWindow ?? void 0,
29615
29673
  siteId: source.siteId,
29616
29674
  stage: source.stage,
29617
29675
  prefetchedEvents: source.events != null,
29618
- eventSurface: normalizeEventSurfaceScope(source.eventSurface),
29619
- filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
29620
- scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
29676
+ eventSurface: selected ? "all" : normalizeEventSurfaceScope(source.eventSurface),
29677
+ filterEventPresets: selected ? null : normalizeEventSurfacePresetsCsv(source.filterEventPresets),
29678
+ scheduleScope: selected ? "any" : normalizeEventScheduleScope(source.scheduleScope),
29621
29679
  calendarContext: {
29622
29680
  timeZone,
29623
29681
  initialToday: source.calendarWindow?.initialToday ?? getLocalScheduleDate(now, timeZone)
@@ -29683,6 +29741,7 @@ const eventListingHydrationSchema = z.object({
29683
29741
  eventSurface: eventSurfaceScopeSchema,
29684
29742
  filterEventPresets: z.string().nullable(),
29685
29743
  scheduleScope: eventScheduleScopeSchema,
29744
+ seriesIds: z.string().nullable().optional(),
29686
29745
  filterCategoryIds: z.string().nullable().optional(),
29687
29746
  filterStaffMemberId: z.string().nullable().optional(),
29688
29747
  filterVenueId: z.string().nullable().optional(),
@@ -29743,6 +29802,7 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
29743
29802
  eventSurface: normalizeEventSurfaceScope(source.eventSurface),
29744
29803
  filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
29745
29804
  scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
29805
+ seriesIds: eventSeriesScopeCsv(source.seriesIds),
29746
29806
  filterCategoryIds: normalizeEventCategoryIdsCsv(source.filterCategoryIds),
29747
29807
  filterStaffMemberId: normalizeEventStaffMemberId(source.filterStaffMemberId),
29748
29808
  filterVenueId: normalizeEventVenueId(source.filterVenueId),
@@ -30116,6 +30176,65 @@ const eventListingBlockDefinition = {
30116
30176
  } }
30117
30177
  };
30118
30178
  //#endregion
30179
+ //#region ../blocks/src/system/blocks/events/eventSelectionFields.ts
30180
+ const eventSelectionFields = [{
30181
+ id: "eventSelection",
30182
+ type: "select",
30183
+ label: "Events to show",
30184
+ required: false,
30185
+ multiple: false,
30186
+ defaultValue: "matching",
30187
+ options: [{
30188
+ value: "matching",
30189
+ label: "All matching events"
30190
+ }, {
30191
+ value: "selected",
30192
+ label: "Selected events"
30193
+ }],
30194
+ ui: { intent: "behavior" }
30195
+ }, createSiteOptionSelectField({
30196
+ id: "selectedEventSeriesIds",
30197
+ label: "Selected events",
30198
+ description: "Show upcoming dates for these events. Other event filters do not apply.",
30199
+ required: false,
30200
+ multiple: true,
30201
+ defaultValue: [],
30202
+ optionSource: "eventSeries",
30203
+ ui: {
30204
+ intent: "behavior",
30205
+ searchThreshold: 1,
30206
+ visibleWhen: {
30207
+ field: "eventSelection",
30208
+ equals: "selected"
30209
+ }
30210
+ }
30211
+ })];
30212
+ function withEventSelectionVisibility(field) {
30213
+ if (![
30214
+ "eventSurface",
30215
+ "filterEventPresets",
30216
+ "scheduleScope",
30217
+ "filterCategoryIds",
30218
+ "filterStaffMemberId",
30219
+ "filterVenueId",
30220
+ "showFilters",
30221
+ "showCategoryFilter",
30222
+ "showVenueFilter",
30223
+ "showStaffFilter"
30224
+ ].includes(field.id)) return field;
30225
+ const visibleWhen = field.ui?.visibleWhen;
30226
+ return {
30227
+ ...field,
30228
+ ui: {
30229
+ ...field.ui,
30230
+ visibleWhen: { allOf: [{
30231
+ field: "eventSelection",
30232
+ notEquals: "selected"
30233
+ }, ...visibleWhen ? [visibleWhen] : []] }
30234
+ }
30235
+ };
30236
+ }
30237
+ //#endregion
30119
30238
  //#region ../blocks/src/system/runtime/nodes/events/EventCalendar.interactive.ts
30120
30239
  const eventCalendarSourceSchema = z.object({
30121
30240
  ...eventCollectionSourceSchemaShape,
@@ -30198,19 +30317,59 @@ const eventCalendarBlockRuntime = defineProgressiveBlockRuntime({
30198
30317
  //#region ../blocks/src/system/blocks/events/eventCalendarDataLoaders.ts
30199
30318
  const scopeParams = {
30200
30319
  siteId: { $bind: { from: "$root.siteId" } },
30320
+ seriesIds: { $bind: {
30321
+ from: "content",
30322
+ transforms: [{
30323
+ id: "events.calendarSelectionParam",
30324
+ options: { key: "seriesIds" }
30325
+ }]
30326
+ } },
30201
30327
  stage: { $bind: {
30202
30328
  from: "$root.previewStage",
30203
30329
  fallback: "published"
30204
30330
  } },
30205
- eventSurface: { $bind: { from: "content.eventSurface" } },
30331
+ eventSurface: { $bind: {
30332
+ from: "content",
30333
+ transforms: [{
30334
+ id: "events.calendarSelectionParam",
30335
+ options: { key: "eventSurface" }
30336
+ }, { id: "value.csv" }]
30337
+ } },
30206
30338
  eventPresets: { $bind: {
30207
- from: "content.filterEventPresets",
30208
- transforms: [{ id: "value.csv" }]
30339
+ from: "content",
30340
+ transforms: [{
30341
+ id: "events.calendarSelectionParam",
30342
+ options: { key: "filterEventPresets" }
30343
+ }, { id: "value.csv" }]
30209
30344
  } },
30210
- scheduleScope: { $bind: { from: "content.scheduleScope" } },
30211
- categoryIds: { $bind: { from: "content.filterCategoryIds" } },
30212
- staffMemberId: { $bind: { from: "content.filterStaffMemberId" } },
30213
- venueId: { $bind: { from: "content.filterVenueId" } }
30345
+ scheduleScope: { $bind: {
30346
+ from: "content",
30347
+ transforms: [{
30348
+ id: "events.calendarSelectionParam",
30349
+ options: { key: "scheduleScope" }
30350
+ }, { id: "value.csv" }]
30351
+ } },
30352
+ categoryIds: { $bind: {
30353
+ from: "content",
30354
+ transforms: [{
30355
+ id: "events.calendarSelectionParam",
30356
+ options: { key: "filterCategoryIds" }
30357
+ }, { id: "value.csv" }]
30358
+ } },
30359
+ staffMemberId: { $bind: {
30360
+ from: "content",
30361
+ transforms: [{
30362
+ id: "events.calendarSelectionParam",
30363
+ options: { key: "filterStaffMemberId" }
30364
+ }, { id: "value.csv" }]
30365
+ } },
30366
+ venueId: { $bind: {
30367
+ from: "content",
30368
+ transforms: [{
30369
+ id: "events.calendarSelectionParam",
30370
+ options: { key: "filterVenueId" }
30371
+ }, { id: "value.csv" }]
30372
+ } }
30214
30373
  };
30215
30374
  /** Combined renders two jobs; calendar-only variants never pay for the list seed. */
30216
30375
  const eventCalendarDataLoaders = {
@@ -30340,6 +30499,13 @@ const eventCalendarLayout = [styledSection({
30340
30499
  from: "content.defaultCalendarView",
30341
30500
  fallback: "month"
30342
30501
  } },
30502
+ seriesIds: { $bind: {
30503
+ from: "content",
30504
+ transforms: [{
30505
+ id: "events.calendarSelectionParam",
30506
+ options: { key: "seriesIds" }
30507
+ }]
30508
+ } },
30343
30509
  showFilters: { $bind: {
30344
30510
  from: "content.showFilters",
30345
30511
  fallback: true
@@ -30361,17 +30527,47 @@ const eventCalendarLayout = [styledSection({
30361
30527
  fallback: true
30362
30528
  } },
30363
30529
  eventSurface: { $bind: {
30364
- from: "content.eventSurface",
30365
- fallback: "all"
30530
+ from: "content",
30531
+ transforms: [{
30532
+ id: "events.calendarSelectionParam",
30533
+ options: { key: "eventSurface" }
30534
+ }]
30535
+ } },
30536
+ filterEventPresets: { $bind: {
30537
+ from: "content",
30538
+ transforms: [{
30539
+ id: "events.calendarSelectionParam",
30540
+ options: { key: "filterEventPresets" }
30541
+ }]
30366
30542
  } },
30367
- filterEventPresets: { $bind: { from: "content.filterEventPresets" } },
30368
30543
  scheduleScope: { $bind: {
30369
- from: "content.scheduleScope",
30370
- fallback: "any"
30544
+ from: "content",
30545
+ transforms: [{
30546
+ id: "events.calendarSelectionParam",
30547
+ options: { key: "scheduleScope" }
30548
+ }]
30549
+ } },
30550
+ filterCategoryIds: { $bind: {
30551
+ from: "content",
30552
+ transforms: [{
30553
+ id: "events.calendarSelectionParam",
30554
+ options: { key: "filterCategoryIds" }
30555
+ }]
30556
+ } },
30557
+ filterStaffMemberId: { $bind: {
30558
+ from: "content",
30559
+ transforms: [{
30560
+ id: "events.calendarSelectionParam",
30561
+ options: { key: "filterStaffMemberId" }
30562
+ }]
30563
+ } },
30564
+ filterVenueId: { $bind: {
30565
+ from: "content",
30566
+ transforms: [{
30567
+ id: "events.calendarSelectionParam",
30568
+ options: { key: "filterVenueId" }
30569
+ }]
30371
30570
  } },
30372
- filterCategoryIds: { $bind: { from: "content.filterCategoryIds" } },
30373
- filterStaffMemberId: { $bind: { from: "content.filterStaffMemberId" } },
30374
- filterVenueId: { $bind: { from: "content.filterVenueId" } },
30375
30571
  cardRole: { $bind: {
30376
30572
  from: "content._cardStyles.role",
30377
30573
  fallback: "default"
@@ -30875,6 +31071,7 @@ const eventCalendarAdditionalFields = [
30875
31071
  }
30876
31072
  }
30877
31073
  },
31074
+ ...eventSelectionFields,
30878
31075
  {
30879
31076
  id: "eventSurface",
30880
31077
  type: "select",
@@ -31084,7 +31281,7 @@ const eventCalendarBlockDefinition = {
31084
31281
  titleSource: "heading",
31085
31282
  description: "Display events with calendar, list, or combined views with filtering",
31086
31283
  skipSectionStyles: true,
31087
- additionalFields: eventCalendarAdditionalFields,
31284
+ additionalFields: eventCalendarAdditionalFields.map(withEventSelectionVisibility),
31088
31285
  styleTokens: {
31089
31286
  background: "surface",
31090
31287
  typography: "body",
@@ -37729,6 +37926,26 @@ const linksTransforms = [{
37729
37926
  }
37730
37927
  }];
37731
37928
  const defaultTransforms = createTransformRegistry([
37929
+ {
37930
+ id: "events.calendarSelectionParam",
37931
+ kind: "formatter",
37932
+ summary: "Resolve selected events instead of discovery filters",
37933
+ schema: z.object({ key: z.enum([
37934
+ "seriesIds",
37935
+ "eventSurface",
37936
+ "filterEventPresets",
37937
+ "scheduleScope",
37938
+ "filterCategoryIds",
37939
+ "filterStaffMemberId",
37940
+ "filterVenueId"
37941
+ ]) }),
37942
+ run(value, { key }) {
37943
+ const content = asPartialObject(value) ?? {};
37944
+ const selection = resolveEventSelection(content.eventSelection, content.selectedEventSeriesIds);
37945
+ if (selection.kind === "selected") return key === "seriesIds" ? selection.seriesIds : void 0;
37946
+ return key === "seriesIds" ? void 0 : content[key];
37947
+ }
37948
+ },
37732
37949
  {
37733
37950
  id: "events.calendarReadEnabled",
37734
37951
  kind: "formatter",
@@ -38043,12 +38260,12 @@ function normalizeContent(block) {
38043
38260
  }
38044
38261
  /**
38045
38262
  * Normalize params for API calls.
38046
- * Converts all values to strings.
38263
+ * Converts supplied values to strings, preserving absent versus explicitly empty params.
38047
38264
  */
38048
38265
  function normalizeParams(input) {
38049
38266
  if (!input || typeof input !== "object") return {};
38050
38267
  const output = {};
38051
- for (const [key, value] of Object.entries(input)) output[key] = coerceToString(value);
38268
+ for (const [key, value] of Object.entries(input)) if (value !== void 0 && value !== null) output[key] = coerceToString(value);
38052
38269
  return output;
38053
38270
  }
38054
38271
  function isNonArrayObject(value) {
@@ -38112,6 +38329,14 @@ function coercePayload(payload) {
38112
38329
  * - Frontend: provide internal API client
38113
38330
  * - SDK: provide SDK client with endpoint mapping
38114
38331
  */
38332
+ function projectDataLoaders(loaders, shouldLoad, blockId, blockKind) {
38333
+ if (!shouldLoad) return [...loaders];
38334
+ return loaders.filter(({ key }) => shouldLoad({
38335
+ blockId,
38336
+ blockKind,
38337
+ loaderKey: key
38338
+ }));
38339
+ }
38115
38340
  function shouldSkipResolvedLoader(input) {
38116
38341
  if (input.loader.requiredParams?.some((param) => !input.params[param]?.trim())) return true;
38117
38342
  return Boolean(input.isValidEndpoint && !input.isValidEndpoint(input.endpoint));
@@ -38140,7 +38365,7 @@ async function prefetchBlockData$1(page, context, options) {
38140
38365
  return (await prefetchBlockDataWithFailures(page, context, options)).resolvedData;
38141
38366
  }
38142
38367
  async function prefetchBlockDataWithFailures(page, context, options) {
38143
- const { apiClient, isValidEndpoint, onError, getCustomBlockLoaders, getBlockDefinition: getBlockDefinition$1 = getBlockDefinition, resolveParamsBindings: resolveParamsBindings$1 = resolveParamsBindings } = options;
38368
+ const { apiClient, isValidEndpoint, onError, getCustomBlockLoaders, getBlockDefinition: getBlockDefinition$1 = getBlockDefinition, resolveParamsBindings: resolveParamsBindings$1 = resolveParamsBindings, shouldLoad } = options;
38144
38369
  const results = {};
38145
38370
  const loaderFailures = {};
38146
38371
  const tasks = [];
@@ -38157,6 +38382,7 @@ async function prefetchBlockDataWithFailures(page, context, options) {
38157
38382
  loader
38158
38383
  })) : [];
38159
38384
  } else loaders = [];
38385
+ loaders = projectDataLoaders(loaders, shouldLoad, blockId, block.kind);
38160
38386
  if (loaders.length === 0) continue;
38161
38387
  const root = {
38162
38388
  ...context.root ?? {},
@@ -38235,8 +38461,8 @@ function toStringParams(value) {
38235
38461
  for (const [k, v] of Object.entries(value)) if (typeof v === "string") out[k] = v;
38236
38462
  return out;
38237
38463
  }
38238
- function stripEmptyStringValues(params) {
38239
- for (const [key, value] of Object.entries(params)) if (value === "") delete params[key];
38464
+ function stripEmptyStringValues(params, endpoint) {
38465
+ for (const [key, value] of Object.entries(params)) if (value === "" && !(key === "seriesIds" && (endpoint === "listPublicEvents" || endpoint === "listPublicEventCalendarWindow"))) delete params[key];
38240
38466
  }
38241
38467
  function ensureSiteId(params, context) {
38242
38468
  if (!params.siteId && typeof context.siteId === "string" && context.siteId) params.siteId = context.siteId;
@@ -38249,7 +38475,7 @@ function ensureSiteId(params, context) {
38249
38475
  */
38250
38476
  function normalizeLoaderParams(endpoint, params, context) {
38251
38477
  const out = toStringParams(params);
38252
- stripEmptyStringValues(out);
38478
+ stripEmptyStringValues(out, endpoint);
38253
38479
  if (endpoint === "getPublicFormById") {
38254
38480
  ensureSiteId(out, context);
38255
38481
  if (!out.formId && out.formSlug) {
@@ -38466,11 +38692,14 @@ const sdkSiteStyleConfigSchema = z.object({
38466
38692
  sectionOptions: sdkSectionOptionsConfigSchema.optional(),
38467
38693
  containerOptions: sdkContainerOptionsConfigSchema.optional()
38468
38694
  });
38469
- const sdkSiteLayoutConfigSchema = z.object({ footerBlocks: z.array(z.object({
38470
- id: z.string().min(1).optional(),
38471
- kind: z.string().min(1),
38472
- content: z.record(z.string(), z.unknown()).optional()
38473
- })).optional() });
38695
+ const sdkSiteLayoutConfigSchema = z.object({
38696
+ footerMode: footerModeSchema.optional(),
38697
+ footerBlocks: z.array(z.object({
38698
+ id: z.string().min(1).optional(),
38699
+ kind: z.string().min(1),
38700
+ content: z.record(z.string(), z.unknown()).optional()
38701
+ })).optional()
38702
+ });
38474
38703
  const sdkFieldSelectOptionSchema = z.object({
38475
38704
  value: z.string(),
38476
38705
  label: z.string()
@@ -6813,13 +6813,6 @@ const API_ENDPOINTS$1 = {
6813
6813
  auth: "service",
6814
6814
  responseKind: "json"
6815
6815
  },
6816
- sdkCatalogTheme: {
6817
- path: "/sdk/{siteId}/catalog/theme",
6818
- method: "GET",
6819
- errors: ["server:internal_error"],
6820
- auth: "service",
6821
- responseKind: "json"
6822
- },
6823
6816
  sdkCatalogBlocks: {
6824
6817
  path: "/sdk/{siteId}/catalog/blocks",
6825
6818
  method: "GET",
@@ -6880,12 +6873,6 @@ const API_ENDPOINTS$1 = {
6880
6873
  auth: "service",
6881
6874
  responseKind: "json"
6882
6875
  },
6883
- sdkPullTheme: {
6884
- path: "/sdk/{siteId}/pull/theme",
6885
- method: "GET",
6886
- auth: "service",
6887
- responseKind: "json"
6888
- },
6889
6876
  sdkPullFooter: {
6890
6877
  path: "/sdk/{siteId}/pull/footer",
6891
6878
  method: "GET",
@@ -6992,30 +6979,6 @@ const API_ENDPOINTS$1 = {
6992
6979
  auth: "service",
6993
6980
  responseKind: "json"
6994
6981
  },
6995
- sdkUpsertTheme: {
6996
- path: "/sdk/{siteId}/theme",
6997
- method: "POST",
6998
- auth: "service",
6999
- responseKind: "json",
7000
- errors: [
7001
- "validation:invalid_input",
7002
- "resource:not_found",
7003
- "resource:conflict",
7004
- "server:internal_error"
7005
- ]
7006
- },
7007
- sdkApplySiteStyleSelection: {
7008
- path: "/sdk/{siteId}/theme/style-selection/apply",
7009
- method: "POST",
7010
- auth: "service",
7011
- responseKind: "json",
7012
- errors: [
7013
- "validation:invalid_input",
7014
- "resource:not_found",
7015
- "resource:conflict",
7016
- "server:internal_error"
7017
- ]
7018
- },
7019
6982
  sdkUpsertFooter: {
7020
6983
  path: "/sdk/{siteId}/footer",
7021
6984
  method: "POST",
@@ -8280,7 +8243,7 @@ var SimpleCache = class {
8280
8243
  * 1. This constant
8281
8244
  * 2. The "version" field in package.json
8282
8245
  */
8283
- const SDK_VERSION = "0.140.0";
8246
+ const SDK_VERSION = "0.142.0";
8284
8247
  //#endregion
8285
8248
  //#region src/client/error.ts
8286
8249
  let _Symbol$for;