@riverbankcms/sdk 0.145.0 → 0.146.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 (159) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{PreviewEditorSidebar-O-V6Pl5a.mjs → PreviewEditorSidebar-kg2r2Fyi.mjs} +4 -4
  3. package/dist/{PreviewEditorUI-1UlX_9cw.mjs → PreviewEditorUI-sWMLp5dT.mjs} +3 -3
  4. package/dist/{PreviewQueryProvider-BxGwdOCV.mjs → PreviewQueryProvider-Cg51xq1w.mjs} +1 -1
  5. package/dist/{SdkPreviewModeRuntime-DYbA_4iv.mjs → SdkPreviewModeRuntime-h2ti3Hch.mjs} +280 -182
  6. package/dist/{SiteChromeCustomizeContext-CNTKQ9nx.mjs → SiteChromeCustomizeContext-DEACFH9m.mjs} +1330 -734
  7. package/dist/_dts/ai/src/contracts/proposals.d.ts +924 -0
  8. package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +84 -0
  9. package/dist/_dts/api/src/bookingConfig.d.ts +8 -1
  10. package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +8 -14
  11. package/dist/_dts/api/src/bookingManagementEventEndpointTypes.d.ts +45 -1
  12. package/dist/_dts/api/src/clientErrorReporting.d.ts +50 -0
  13. package/dist/_dts/api/src/communications.d.ts +20 -4
  14. package/dist/_dts/api/src/contentRuntime.d.ts +3 -7
  15. package/dist/_dts/api/src/endpoints.d.ts +223 -88
  16. package/dist/_dts/api/src/event-visibility.d.ts +20 -0
  17. package/dist/_dts/api/src/eventManagementContracts.d.ts +56 -3
  18. package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +24 -0
  19. package/dist/_dts/api/src/eventPageWords.d.ts +19 -0
  20. package/dist/_dts/api/src/eventSeriesRegistrationEndpointDefinitions.d.ts +14 -0
  21. package/dist/_dts/api/src/index.d.ts +7 -1
  22. package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
  23. package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
  24. package/dist/_dts/api/src/launchReadiness.d.ts +20 -2
  25. package/dist/_dts/api/src/launchRequirementPriority.d.ts +3 -0
  26. package/dist/_dts/api/src/newsletterCampaignCommandEndpoints.d.ts +13 -0
  27. package/dist/_dts/api/src/newsletterEndpointDefinitions.d.ts +42 -0
  28. package/dist/_dts/api/src/occurrenceScheduling.d.ts +10 -0
  29. package/dist/_dts/api/src/pageSurfaceEndpoints.d.ts +44 -0
  30. package/dist/_dts/api/src/participantMessaging.d.ts +11 -1
  31. package/dist/_dts/api/src/sdk-event-upsert.d.ts +40 -1
  32. package/dist/_dts/api/src/sdkContracts.d.ts +3 -42
  33. package/dist/_dts/api/src/sdkCourseBooking.d.ts +30 -0
  34. package/dist/_dts/api/src/sdkEventEndpointDefinitions.d.ts +76 -0
  35. package/dist/_dts/api/src/sdkEventLifecycle.d.ts +37 -0
  36. package/dist/_dts/api/src/sdkManagedEventContracts.d.ts +18 -0
  37. package/dist/_dts/api/src/sdkPageDesign.d.ts +388 -0
  38. package/dist/_dts/api/src/sdkPageDesignEndpointDefinitions.d.ts +22 -0
  39. package/dist/_dts/api/src/sdkPullEventContracts.d.ts +46 -0
  40. package/dist/_dts/api/src/siteAddressEndpoints.d.ts +29 -0
  41. package/dist/_dts/api/src/siteManagementEndpointDefinitions.d.ts +49 -0
  42. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +2 -32
  43. package/dist/_dts/api/src/siteOnboarding.d.ts +75 -9
  44. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -1
  45. package/dist/_dts/api/src/types.d.ts +7 -1
  46. package/dist/_dts/api/src/wholeSeriesRuns.d.ts +14 -0
  47. package/dist/_dts/blocks/src/index.d.ts +2 -0
  48. package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +10 -0
  49. package/dist/_dts/blocks/src/pageRendererContracts.d.ts +3 -1
  50. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +27 -5
  51. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +14 -1
  52. package/dist/_dts/blocks/src/system/icons/social.d.ts +1 -1
  53. package/dist/_dts/blocks/src/system/registry.d.ts +1 -1
  54. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventSourceRecovery.d.ts +1 -0
  55. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +20 -4
  56. package/dist/_dts/blocks/src/system/runtime/nodes/form.fields.d.ts +5 -0
  57. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.block-submission.d.ts +36 -0
  58. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.d.ts +1 -1
  59. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +6 -1
  60. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.parts.d.ts +46 -0
  61. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +2 -1
  62. package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +2 -1
  63. package/dist/_dts/blocks/src/system/runtime/shared/components/CheckboxChoice.d.ts +18 -0
  64. package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +1 -0
  65. package/dist/_dts/content-editor/src/index.d.ts +1 -0
  66. package/dist/_dts/content-editor/src/primitives/previewEditableOutline.d.ts +2 -0
  67. package/dist/_dts/content-editor/src/ui/editorBlockEquality.d.ts +3 -0
  68. package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +3 -5
  69. package/dist/_dts/core/src/block-content-identity.d.ts +5 -0
  70. package/dist/_dts/core/src/editor-state.d.ts +2 -7
  71. package/dist/_dts/core/src/index.d.ts +1 -0
  72. package/dist/_dts/core/src/mailing-list-submission.d.ts +3 -1
  73. package/dist/_dts/core/src/public-event-booking-availability.d.ts +20 -1
  74. package/dist/_dts/core/src/public-profile.d.ts +3 -1
  75. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +49 -2
  76. package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +3 -0
  77. package/dist/_dts/editor-blocks/src/block-editor/EmptyState.d.ts +13 -1
  78. package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +2 -8
  79. package/dist/_dts/editor-blocks/src/index.d.ts +1 -0
  80. package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +3 -4
  81. package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +1 -2
  82. package/dist/_dts/sdk/src/next/renderSdkContent.d.ts +0 -1
  83. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -2
  84. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -2
  85. package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +6 -1
  86. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +5 -2
  87. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +6 -1
  88. package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +2 -0
  89. package/dist/_dts/sdk/src/rendering/hooks/useContent.d.ts +5 -1
  90. package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +5 -1
  91. package/dist/_dts/sdk/src/version.d.ts +1 -1
  92. package/dist/_dts/surfaces/src/index.d.ts +9 -0
  93. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  94. package/dist/_dts/theme-core/src/inputs/checkable.d.ts +42 -0
  95. package/dist/_dts/theme-core/src/inputs/inputGroup.d.ts +19 -0
  96. package/dist/_dts/ui/src/navigation-tabs.d.ts +2 -1
  97. package/dist/client/{BookingConsentAgreement-DlVOmpW4.mjs → BookingConsentAgreement-BQKL045f.mjs} +2 -2
  98. package/dist/client/CheckboxChoice--W2n6yKs.mjs +24 -0
  99. package/dist/client/{DiscountCodeDisclosure-T9q623PQ.mjs → DiscountCodeDisclosure-CsOtjFY7.mjs} +1 -1
  100. package/dist/client/{EventCombined.client-DnsUeONl.mjs → EventCombined.client-BdRjVbhH.mjs} +6 -6
  101. package/dist/client/{EventListing.client-CNBFqJS4.mjs → EventListing.client-DBxC6xOU.mjs} +2 -2
  102. package/dist/client/{LeafletStaticMap-C7higg52.mjs → LeafletStaticMap-mHEJKrTs.mjs} +1 -1
  103. package/dist/client/{ThemedButton-LAJTNrS8.mjs → ThemedButton-CE5KYT6z.mjs} +1 -1
  104. package/dist/client/{accordion-BcNF9TjX.mjs → accordion-BEQNSptH.mjs} +1 -1
  105. package/dist/client/{bookingForm-BUaQ3S03.mjs → bookingForm-AMr-s5vw.mjs} +33 -52
  106. package/dist/client/bookings.mjs +48 -46
  107. package/dist/client/{carousel-CTdF6e0V.mjs → carousel-Bbt_QgJy.mjs} +1 -1
  108. package/dist/client/{cart-pGtyf_XU.mjs → cart-CnWi30zJ.mjs} +3 -3
  109. package/dist/client/{checkout-Da9WSn7Y.mjs → checkout-f3nkWgd4.mjs} +3 -3
  110. package/dist/client/client.mjs +1611 -815
  111. package/dist/client/{context-BFeY_Wbm.mjs → context-Bc8T6pCe.mjs} +1 -1
  112. package/dist/client/{dates-BhwVSxDg.mjs → dates-DUsCEzLb.mjs} +2 -3
  113. package/dist/client/{eventCalendar-BAtdnR4s.mjs → eventCalendar-CKwgXui5.mjs} +9 -9
  114. package/dist/client/{eventCombined-RksA3tRC.mjs → eventCombined-CBAOSTGR.mjs} +4 -4
  115. package/dist/client/{eventDetails-BB9hB4wR.mjs → eventDetails-Dh-_WiBD.mjs} +4 -4
  116. package/dist/client/{eventListing-BpJBkviM.mjs → eventListing-CA3frIH5.mjs} +4 -4
  117. package/dist/client/{eventRegistration-B18jFq_o.mjs → eventRegistration-BHtsgdcg.mjs} +21 -22
  118. package/dist/client/{form-Dodt8Y8t.mjs → form-C2h3YAcg.mjs} +135 -104
  119. package/dist/client/{headerSection-B0qj9ttg.mjs → headerSection-lwMuMTH9.mjs} +3 -3
  120. package/dist/client/hooks.mjs +489 -65
  121. package/dist/client/{locationMap-gn-iMk7a.mjs → locationMap-DJ2bLODV.mjs} +3 -3
  122. package/dist/client/{newsletterForm-oByLdFkr.mjs → newsletterForm-8Pu5K32g.mjs} +203 -101
  123. package/dist/client/{pricing-BOU0_Hai.mjs → pricing-HHx3IgBz.mjs} +1 -1
  124. package/dist/client/{productDetail-D9v1zH2j.mjs → productDetail-C_1odnAf.mjs} +3 -3
  125. package/dist/client/{productList-D-mItx1n.mjs → productList-CtCv-Nmx.mjs} +3 -3
  126. package/dist/client/{propsDecoder-C3TP_z4x.mjs → propsDecoder-Dcgsncxb.mjs} +40 -23
  127. package/dist/client/rendering/client.mjs +490 -457
  128. package/dist/client/rendering/islands.mjs +17 -17
  129. package/dist/client/rendering.mjs +1515 -628
  130. package/dist/client/{routeIslandApiConfig-DzN1W0sq.mjs → routeIslandApiConfig-CWLP7wu3.mjs} +1 -1
  131. package/dist/client/{scrollToBlock-CWs8EIdo.mjs → scrollToBlock-BNgaEUpo.mjs} +1 -1
  132. package/dist/client/{shop-Dufw7N7o.mjs → shop-DQXrQ8kJ.mjs} +7 -7
  133. package/dist/client/{shop-commerce-gklw_hLF.mjs → shop-commerce-B88zmWWo.mjs} +6 -6
  134. package/dist/client/{shop-commerce-store-Sf1eyTaZ.mjs → shop-commerce-store-DtSfkKuX.mjs} +1 -1
  135. package/dist/client/{shopShared-B5nyA41S.mjs → shopShared-cuaONpkJ.mjs} +4 -4
  136. package/dist/client/{useEventFilters-CLL829vy.mjs → useEventFilters-Bukew6Gb.mjs} +6 -6
  137. package/dist/preview-next/before-render.mjs +368 -103
  138. package/dist/preview-next/client/runtime.mjs +4 -4
  139. package/dist/preview-next/editor-base.css +11 -0
  140. package/dist/preview-next/keepAlive.mjs +328 -103
  141. package/dist/preview-next/middleware.mjs +329 -103
  142. package/dist/{previewAuthStore-BxAFlu-j.mjs → previewAuthStore-h5IgbSp4.mjs} +353 -103
  143. package/dist/{sdk-runtime-D0uZFev7.mjs → sdk-runtime-DTc1uIXn.mjs} +2 -2
  144. package/dist/{separator-EvdCAn4V.mjs → separator-BpHS1KZK.mjs} +1 -1
  145. package/dist/server/components.mjs +1376 -331
  146. package/dist/server/config-validation.mjs +405 -27
  147. package/dist/server/config.mjs +405 -27
  148. package/dist/server/data.mjs +405 -27
  149. package/dist/server/index.mjs +370 -104
  150. package/dist/server/next.mjs +1430 -463
  151. package/dist/server/page-converter.mjs +36 -25
  152. package/dist/server/prebuild.mjs +1 -1
  153. package/dist/server/rendering/server.mjs +1374 -331
  154. package/dist/server/rendering.mjs +1436 -364
  155. package/dist/server/routing.mjs +476 -43
  156. package/dist/server/server.mjs +504 -169
  157. package/dist/server/theme-bridge.mjs +467 -111
  158. package/dist/styles/index.css +186 -65
  159. package/package.json +1 -1
@@ -992,6 +992,13 @@ const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions
992
992
  errors: [],
993
993
  responseKind: "blob"
994
994
  },
995
+ exportEventOfferingRegistrationsCsv: {
996
+ path: "/sites/{siteId}/bookings/event-offerings/{eventOfferingId}/registrations/export.csv",
997
+ method: "GET",
998
+ auth: "user",
999
+ errors: [],
1000
+ responseKind: "blob"
1001
+ },
995
1002
  updateEventSeriesRegistration: {
996
1003
  path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}",
997
1004
  method: "PATCH",
@@ -1002,6 +1009,19 @@ const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions
1002
1009
  "resource:not_found",
1003
1010
  "server:internal_error"
1004
1011
  ]
1012
+ },
1013
+ saveEventSeriesRegistrationAnswers: {
1014
+ path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}/answers",
1015
+ method: "PUT",
1016
+ auth: "user",
1017
+ responseKind: "json",
1018
+ errors: [
1019
+ "validation:invalid_input",
1020
+ "auth:forbidden",
1021
+ "resource:not_found",
1022
+ "resource:conflict",
1023
+ "server:internal_error"
1024
+ ]
1005
1025
  }
1006
1026
  });
1007
1027
  //#endregion
@@ -1422,6 +1442,30 @@ const NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
1422
1442
  responseKind: "json",
1423
1443
  demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
1424
1444
  },
1445
+ scheduleNewsletterCampaign: {
1446
+ path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/schedule",
1447
+ method: "POST",
1448
+ tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
1449
+ auth: "user",
1450
+ responseKind: "json",
1451
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
1452
+ },
1453
+ unscheduleNewsletterCampaign: {
1454
+ path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/unschedule",
1455
+ method: "POST",
1456
+ tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
1457
+ auth: "user",
1458
+ responseKind: "json",
1459
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
1460
+ },
1461
+ stopNewsletterCampaign: {
1462
+ path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/stop",
1463
+ method: "POST",
1464
+ tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
1465
+ auth: "user",
1466
+ responseKind: "json",
1467
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
1468
+ },
1425
1469
  testSendNewsletterCampaign: {
1426
1470
  path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/test-send",
1427
1471
  method: "POST",
@@ -1432,6 +1476,154 @@ const NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
1432
1476
  }
1433
1477
  });
1434
1478
  //#endregion
1479
+ //#region ../api/src/sdkEventEndpointDefinitions.ts
1480
+ /**
1481
+ * The SDK's Event graph: the Events themselves and the occurrences of one run.
1482
+ * Extracted from `endpoints.ts` so this family can be read, and added to, on
1483
+ * its own. New entries here must declare `errors`; the
1484
+ * require-api-endpoint-errors lint enforces that here as in endpoints.ts.
1485
+ */
1486
+ const SDK_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
1487
+ sdkListEvents: {
1488
+ path: "/sdk/{siteId}/events",
1489
+ method: "GET",
1490
+ auth: "service",
1491
+ responseKind: "json"
1492
+ },
1493
+ sdkUpsertEvent: {
1494
+ path: "/sdk/{siteId}/events",
1495
+ method: "POST",
1496
+ auth: "service",
1497
+ responseKind: "json",
1498
+ errors: [
1499
+ "validation:invalid_input",
1500
+ "resource:not_found",
1501
+ "resource:conflict",
1502
+ "billing:plan_limit_exceeded",
1503
+ "server:internal_error"
1504
+ ]
1505
+ },
1506
+ sdkGetEvent: {
1507
+ path: "/sdk/{siteId}/events/{identifier}",
1508
+ method: "GET",
1509
+ auth: "service",
1510
+ responseKind: "json"
1511
+ },
1512
+ sdkDeleteEvent: {
1513
+ path: "/sdk/{siteId}/events/{identifier}",
1514
+ method: "DELETE",
1515
+ auth: "service",
1516
+ responseKind: "json",
1517
+ errors: [
1518
+ "resource:not_found",
1519
+ "resource:conflict",
1520
+ "server:internal_error"
1521
+ ]
1522
+ },
1523
+ sdkTakeEventOffline: {
1524
+ path: "/sdk/{siteId}/events/{identifier}/lifecycle",
1525
+ method: "POST",
1526
+ auth: "service",
1527
+ responseKind: "json",
1528
+ errors: [
1529
+ "resource:not_found",
1530
+ "validation:invalid_input",
1531
+ "resource:conflict",
1532
+ "server:internal_error"
1533
+ ]
1534
+ },
1535
+ sdkListEventOccurrences: {
1536
+ path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences",
1537
+ method: "GET",
1538
+ auth: "service",
1539
+ responseKind: "json",
1540
+ errors: [
1541
+ "resource:not_found",
1542
+ "validation:invalid_input",
1543
+ "server:internal_error"
1544
+ ]
1545
+ },
1546
+ sdkAddEventOccurrence: {
1547
+ path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences",
1548
+ method: "POST",
1549
+ auth: "service",
1550
+ responseKind: "json",
1551
+ errors: [
1552
+ "resource:not_found",
1553
+ "validation:invalid_input",
1554
+ "resource:conflict",
1555
+ "server:internal_error"
1556
+ ]
1557
+ },
1558
+ sdkUpdateEventOccurrence: {
1559
+ path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}",
1560
+ method: "PATCH",
1561
+ auth: "service",
1562
+ responseKind: "json",
1563
+ errors: [
1564
+ "resource:not_found",
1565
+ "validation:invalid_input",
1566
+ "resource:conflict",
1567
+ "server:internal_error"
1568
+ ]
1569
+ },
1570
+ sdkCancelEventOccurrence: {
1571
+ path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}/cancel",
1572
+ method: "POST",
1573
+ auth: "service",
1574
+ responseKind: "json",
1575
+ errors: [
1576
+ "resource:not_found",
1577
+ "resource:conflict",
1578
+ "server:internal_error"
1579
+ ]
1580
+ },
1581
+ sdkDeleteEventOccurrence: {
1582
+ path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}",
1583
+ method: "DELETE",
1584
+ auth: "service",
1585
+ responseKind: "json",
1586
+ errors: [
1587
+ "resource:not_found",
1588
+ "resource:conflict",
1589
+ "server:internal_error"
1590
+ ]
1591
+ }
1592
+ });
1593
+ //#endregion
1594
+ //#region ../api/src/sdkPageDesignEndpointDefinitions.ts
1595
+ /**
1596
+ * SDK management endpoints for a page's draft design (issue 1497), spread into
1597
+ * `ENDPOINT_DEFINITIONS` like the other endpoint-definition modules. New
1598
+ * entries here must declare `errors`, which the require-api-endpoint-errors
1599
+ * lint enforces.
1600
+ */
1601
+ const SDK_PAGE_DESIGN_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
1602
+ sdkGetPageDesign: {
1603
+ path: "/sdk/{siteId}/pages/{identifier}/design",
1604
+ method: "GET",
1605
+ auth: "service",
1606
+ responseKind: "json",
1607
+ errors: [
1608
+ "resource:not_found",
1609
+ "validation:invalid_input",
1610
+ "server:internal_error"
1611
+ ]
1612
+ },
1613
+ sdkSavePageDesign: {
1614
+ path: "/sdk/{siteId}/pages/{identifier}/design",
1615
+ method: "POST",
1616
+ auth: "service",
1617
+ responseKind: "json",
1618
+ errors: [
1619
+ "resource:not_found",
1620
+ "validation:invalid_input",
1621
+ "resource:conflict",
1622
+ "server:internal_error"
1623
+ ]
1624
+ }
1625
+ });
1626
+ //#endregion
1435
1627
  //#region ../core/src/result.ts
1436
1628
  function ok$1(value) {
1437
1629
  return {
@@ -2329,15 +2521,6 @@ function parseMailingListContentVersionId(value) {
2329
2521
  const parsed = parseContentVersionId(value);
2330
2522
  return parsed.ok ? parsed.value : null;
2331
2523
  }
2332
- function buildMailingListSignupBlockSourceRef(blockId, contentVersionId) {
2333
- const parsedBlockId = parseMailingListBlockId(blockId);
2334
- const parsedContentVersionId = parseMailingListContentVersionId(contentVersionId);
2335
- return parsedBlockId !== null && parsedContentVersionId !== null ? {
2336
- tag: "block_ref",
2337
- blockId: parsedBlockId,
2338
- contentVersionId: parsedContentVersionId
2339
- } : null;
2340
- }
2341
2524
  //#endregion
2342
2525
  //#region ../core/src/secret.ts
2343
2526
  /**
@@ -2989,6 +3172,45 @@ const SITE_API_KEY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
2989
3172
  }
2990
3173
  });
2991
3174
  //#endregion
3175
+ //#region ../api/src/siteManagementEndpointDefinitions.ts
3176
+ const SITE_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
3177
+ createSite: {
3178
+ path: "/sites/manage",
3179
+ method: "POST",
3180
+ tags: ["site"],
3181
+ auth: "user",
3182
+ responseKind: "json"
3183
+ },
3184
+ updateSite: {
3185
+ path: "/sites/manage",
3186
+ method: "PUT",
3187
+ tags: ["site"],
3188
+ auth: "user",
3189
+ responseKind: "json"
3190
+ },
3191
+ changeSiteAddress: {
3192
+ path: "/sites/{siteId}/address",
3193
+ method: "PUT",
3194
+ auth: "user",
3195
+ responseKind: "json",
3196
+ demoMutation: DEMO_MUTATION_BLOCKED_DISABLED
3197
+ },
3198
+ getSiteAddressAvailability: {
3199
+ path: "/sites/{siteId}/address/availability",
3200
+ method: "GET",
3201
+ auth: "user",
3202
+ responseKind: "json"
3203
+ },
3204
+ deleteSite: {
3205
+ path: "/sites/{siteId}",
3206
+ method: "DELETE",
3207
+ tags: ["site", "site-{siteId}"],
3208
+ auth: "user",
3209
+ responseKind: "json",
3210
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
3211
+ }
3212
+ });
3213
+ //#endregion
2992
3214
  //#region ../api/src/eventManagementEndpointDefinitions.ts
2993
3215
  const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
2994
3216
  listEvents: {
@@ -3036,6 +3258,28 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
3036
3258
  "server:internal_error"
3037
3259
  ]
3038
3260
  },
3261
+ /**
3262
+ * The web address of an event's own page. A course page belongs to the
3263
+ * event itself, so its address is written here rather than through a run.
3264
+ */
3265
+ updateEventAddress: {
3266
+ path: "/sites/{siteId}/bookings/events/{eventId}/address",
3267
+ method: "PATCH",
3268
+ tags: [
3269
+ "site-{siteId}",
3270
+ "event-series-{siteId}",
3271
+ TAG_TEMPLATES.siteRoutableContent,
3272
+ TAG_TEMPLATES.siteRedirects
3273
+ ],
3274
+ auth: "user",
3275
+ responseKind: "json",
3276
+ errors: [
3277
+ "validation:invalid_input",
3278
+ "resource:not_found",
3279
+ "resource:conflict",
3280
+ "server:internal_error"
3281
+ ]
3282
+ },
3039
3283
  createWholeSeriesRun: {
3040
3284
  path: "/sites/{siteId}/bookings/events/{eventId}/runs",
3041
3285
  method: "POST",
@@ -3062,6 +3306,20 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
3062
3306
  "server:internal_error"
3063
3307
  ]
3064
3308
  },
3309
+ updateCourseBookingSettings: {
3310
+ path: "/sites/{siteId}/bookings/events/{eventId}/booking-settings",
3311
+ method: "PATCH",
3312
+ tags: ["site-{siteId}", "event-series-{siteId}"],
3313
+ auth: "user",
3314
+ responseKind: "json",
3315
+ errors: [
3316
+ "validation:invalid_input",
3317
+ "auth:forbidden",
3318
+ "resource:not_found",
3319
+ "resource:conflict",
3320
+ "server:internal_error"
3321
+ ]
3322
+ },
3065
3323
  cancelWholeSeriesRun: {
3066
3324
  path: "/sites/{siteId}/bookings/events/{eventId}/runs/{runId}/cancellation",
3067
3325
  method: "POST",
@@ -3074,6 +3332,28 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
3074
3332
  "resource:conflict",
3075
3333
  "server:internal_error"
3076
3334
  ]
3335
+ },
3336
+ /**
3337
+ * The Content tab's one write: the short introduction, image and
3338
+ * description of an event's page, published without its layout.
3339
+ */
3340
+ saveEventPageWords: {
3341
+ path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/words",
3342
+ method: "PUT",
3343
+ tags: [
3344
+ TAG_TEMPLATES.siteCollection,
3345
+ TAG_TEMPLATES.siteRoutableContent,
3346
+ TAG_TEMPLATES.pageSurfaceById
3347
+ ],
3348
+ auth: "user",
3349
+ responseKind: "json",
3350
+ errors: [
3351
+ "auth:forbidden",
3352
+ "validation:invalid_input",
3353
+ "resource:not_found",
3354
+ "resource:conflict",
3355
+ "server:internal_error"
3356
+ ]
3077
3357
  }
3078
3358
  });
3079
3359
  //#endregion
@@ -3506,7 +3786,43 @@ const BILLING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
3506
3786
  responseKind: "json"
3507
3787
  }
3508
3788
  });
3789
+ //#endregion
3790
+ //#region ../api/src/clientErrorReporting.ts
3791
+ const CLIENT_ERROR_REPORT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ reportClientError: {
3792
+ path: "/client/error-report",
3793
+ method: "POST",
3794
+ auth: "user",
3795
+ errors: [],
3796
+ responseKind: "json"
3797
+ } });
3798
+ const CLIENT_ERROR_REPORT_LIMITS = {
3799
+ pathname: 1024,
3800
+ name: 120,
3801
+ message: 2e3,
3802
+ stack: 8e3,
3803
+ digest: 128,
3804
+ componentStack: 8e3,
3805
+ sourceLocation: 1024
3806
+ };
3807
+ const clientErrorEventSchema = z.enum([
3808
+ "dashboard:route-error",
3809
+ "dashboard:app-error",
3810
+ "client:error-boundary",
3811
+ "client:window-error",
3812
+ "client:unhandled-rejection"
3813
+ ]);
3814
+ z.object({
3815
+ event: clientErrorEventSchema,
3816
+ pathname: z.string().startsWith("/").max(CLIENT_ERROR_REPORT_LIMITS.pathname),
3817
+ name: z.string().max(CLIENT_ERROR_REPORT_LIMITS.name),
3818
+ message: z.string().max(CLIENT_ERROR_REPORT_LIMITS.message),
3819
+ stack: z.string().max(CLIENT_ERROR_REPORT_LIMITS.stack).nullable(),
3820
+ digest: z.string().max(CLIENT_ERROR_REPORT_LIMITS.digest).nullable(),
3821
+ componentStack: z.string().max(CLIENT_ERROR_REPORT_LIMITS.componentStack).nullable(),
3822
+ sourceLocation: z.string().max(CLIENT_ERROR_REPORT_LIMITS.sourceLocation).nullable()
3823
+ }).strict();
3509
3824
  const API_ENDPOINTS$1 = {
3825
+ ...CLIENT_ERROR_REPORT_ENDPOINT_DEFINITIONS,
3510
3826
  ...PUBLIC_NEWSLETTER_ENDPOINT_DEFINITIONS,
3511
3827
  ...ACCOUNT_ENDPOINT_DEFINITIONS,
3512
3828
  ...PUBLIC_ONBOARDING_ATTEMPT_ENDPOINT_DEFINITIONS,
@@ -3514,6 +3830,7 @@ const API_ENDPOINTS$1 = {
3514
3830
  ...GIFTING_ENDPOINT_DEFINITIONS,
3515
3831
  ...PUBLIC_READ_ENDPOINT_DEFINITIONS,
3516
3832
  ...BILLING_ENDPOINT_DEFINITIONS,
3833
+ ...SITE_MANAGEMENT_ENDPOINT_DEFINITIONS,
3517
3834
  aiContentUpdateChat: {
3518
3835
  path: "/ai/content-update-chat",
3519
3836
  method: "POST",
@@ -4040,13 +4357,6 @@ const API_ENDPOINTS$1 = {
4040
4357
  auth: "user",
4041
4358
  responseKind: "json"
4042
4359
  },
4043
- createSite: {
4044
- path: "/sites/manage",
4045
- method: "POST",
4046
- tags: ["site"],
4047
- auth: "user",
4048
- responseKind: "json"
4049
- },
4050
4360
  createSiteManual: {
4051
4361
  path: "/sites/manual",
4052
4362
  method: "POST",
@@ -4054,21 +4364,6 @@ const API_ENDPOINTS$1 = {
4054
4364
  auth: "user",
4055
4365
  responseKind: "json"
4056
4366
  },
4057
- updateSite: {
4058
- path: "/sites/manage",
4059
- method: "PUT",
4060
- tags: ["site"],
4061
- auth: "user",
4062
- responseKind: "json"
4063
- },
4064
- deleteSite: {
4065
- path: "/sites/{siteId}",
4066
- method: "DELETE",
4067
- tags: ["site", "site-{siteId}"],
4068
- auth: "user",
4069
- responseKind: "json",
4070
- demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
4071
- },
4072
4367
  listSiteMembers: {
4073
4368
  path: "/sites/{siteId}/members",
4074
4369
  method: "GET",
@@ -8301,6 +8596,7 @@ const API_ENDPOINTS$1 = {
8301
8596
  auth: "service",
8302
8597
  responseKind: "json"
8303
8598
  },
8599
+ ...SDK_PAGE_DESIGN_ENDPOINT_DEFINITIONS,
8304
8600
  sdkUpsertPageBlock: {
8305
8601
  path: "/sdk/{siteId}/pages/{identifier}/blocks",
8306
8602
  method: "POST",
@@ -8423,87 +8719,7 @@ const API_ENDPOINTS$1 = {
8423
8719
  auth: "service",
8424
8720
  responseKind: "json"
8425
8721
  },
8426
- sdkListEvents: {
8427
- path: "/sdk/{siteId}/events",
8428
- method: "GET",
8429
- auth: "service",
8430
- responseKind: "json"
8431
- },
8432
- sdkUpsertEvent: {
8433
- path: "/sdk/{siteId}/events",
8434
- method: "POST",
8435
- auth: "service",
8436
- responseKind: "json"
8437
- },
8438
- sdkGetEvent: {
8439
- path: "/sdk/{siteId}/events/{identifier}",
8440
- method: "GET",
8441
- auth: "service",
8442
- responseKind: "json"
8443
- },
8444
- sdkDeleteEvent: {
8445
- path: "/sdk/{siteId}/events/{identifier}",
8446
- method: "DELETE",
8447
- auth: "service",
8448
- responseKind: "json"
8449
- },
8450
- sdkListEventOccurrences: {
8451
- path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences",
8452
- method: "GET",
8453
- auth: "service",
8454
- responseKind: "json",
8455
- errors: [
8456
- "resource:not_found",
8457
- "validation:invalid_input",
8458
- "server:internal_error"
8459
- ]
8460
- },
8461
- sdkAddEventOccurrence: {
8462
- path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences",
8463
- method: "POST",
8464
- auth: "service",
8465
- responseKind: "json",
8466
- errors: [
8467
- "resource:not_found",
8468
- "validation:invalid_input",
8469
- "resource:conflict",
8470
- "server:internal_error"
8471
- ]
8472
- },
8473
- sdkUpdateEventOccurrence: {
8474
- path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}",
8475
- method: "PATCH",
8476
- auth: "service",
8477
- responseKind: "json",
8478
- errors: [
8479
- "resource:not_found",
8480
- "validation:invalid_input",
8481
- "resource:conflict",
8482
- "server:internal_error"
8483
- ]
8484
- },
8485
- sdkCancelEventOccurrence: {
8486
- path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}/cancel",
8487
- method: "POST",
8488
- auth: "service",
8489
- responseKind: "json",
8490
- errors: [
8491
- "resource:not_found",
8492
- "resource:conflict",
8493
- "server:internal_error"
8494
- ]
8495
- },
8496
- sdkDeleteEventOccurrence: {
8497
- path: "/sdk/{siteId}/events/{identifier}/runs/{runIdentifier}/occurrences/{occurrenceId}",
8498
- method: "DELETE",
8499
- auth: "service",
8500
- responseKind: "json",
8501
- errors: [
8502
- "resource:not_found",
8503
- "resource:conflict",
8504
- "server:internal_error"
8505
- ]
8506
- },
8722
+ ...SDK_EVENT_ENDPOINT_DEFINITIONS,
8507
8723
  sdkUpsertEntry: {
8508
8724
  path: "/sdk/{siteId}/entries",
8509
8725
  method: "POST",
@@ -8997,6 +9213,46 @@ const API_ENDPOINTS$1 = {
8997
9213
  //#region ../surfaces/src/index.ts
8998
9214
  const SURFACE_IDS = ["core", "macadamia"];
8999
9215
  const DEFAULT_SURFACE_ID = "core";
9216
+ /**
9217
+ * Root hosts for each surface, keyed by deployment tier. The tier-keyed shape
9218
+ * makes it impossible to mis-order entries: callers like
9219
+ * `buildSurfaceAwareDashboardOriginForSurfaceId` look up by tier directly
9220
+ * rather than relying on positional alignment between arrays.
9221
+ */
9222
+ const SURFACE_ROOT_HOSTS = {
9223
+ core: {
9224
+ local: "localhost",
9225
+ prod: "riverbankcms.com"
9226
+ },
9227
+ macadamia: {
9228
+ local: "macadamia.localhost",
9229
+ prod: "macadamia.studio"
9230
+ }
9231
+ };
9232
+ const SURFACE_SITE_ROOT_HOSTS = {
9233
+ core: {
9234
+ local: "localhost",
9235
+ prod: "riverbanksites.com"
9236
+ },
9237
+ macadamia: {
9238
+ local: "macadamia.localhost",
9239
+ prod: "macadamia.studio"
9240
+ }
9241
+ };
9242
+ const SURFACE_SITE_ROOT_HOST_ALIASES = { core: { prod: ["preview.riverbanksites.com"] } };
9243
+ function surfaceHostTableValues(table) {
9244
+ return Object.values(table).flatMap((byTier) => Object.values(byTier).flat());
9245
+ }
9246
+ function siteSlugLabelUnderRoot(host, siteRootHost) {
9247
+ if (!host.endsWith(`.${siteRootHost}`)) return [];
9248
+ return host.slice(0, host.length - siteRootHost.length - 1).split(".").slice(-1);
9249
+ }
9250
+ function deriveSurfaceOwnedSiteSlugs() {
9251
+ const siteRootHosts = [...surfaceHostTableValues(SURFACE_SITE_ROOT_HOSTS), ...surfaceHostTableValues(SURFACE_SITE_ROOT_HOST_ALIASES)];
9252
+ const labels = [...surfaceHostTableValues(SURFACE_ROOT_HOSTS), ...siteRootHosts].flatMap((host) => siteRootHosts.flatMap((root) => siteSlugLabelUnderRoot(host, root)));
9253
+ return [...new Set(labels)].sort();
9254
+ }
9255
+ deriveSurfaceOwnedSiteSlugs();
9000
9256
  [...SURFACE_IDS.filter((surfaceId) => surfaceId !== DEFAULT_SURFACE_ID)];
9001
9257
  //#endregion
9002
9258
  //#region ../api/src/url.ts
@@ -9609,7 +9865,7 @@ var SimpleCache = class {
9609
9865
  * 1. This constant
9610
9866
  * 2. The "version" field in package.json
9611
9867
  */
9612
- const SDK_VERSION = "0.145.0";
9868
+ const SDK_VERSION = "0.146.0";
9613
9869
  //#endregion
9614
9870
  //#region src/client/error.ts
9615
9871
  let _Symbol$for;
@@ -34214,13 +34470,13 @@ const hours = stack({
34214
34470
  as: "p",
34215
34471
  className: "rb-caption rb-opacity-70"
34216
34472
  }, bind("module.timeZone"), when("module.timeZone"))], when("module.kind", { equals: "opening-hours" }));
34217
- const socials = inline({ className: "rb-flex rb-flex-wrap rb-gap-x-5 rb-gap-y-3" }, [link({
34473
+ const socials = inline({ className: "rb-footer-socials" }, [link({
34218
34474
  href: { $bind: { from: "social.href" } },
34219
34475
  target: "_blank",
34220
34476
  rel: "noreferrer noopener",
34221
34477
  "aria-label": { $bind: { from: "social.label" } },
34222
- className: "rb-nav-text transition-theme-standard"
34223
- }, [icon({ className: "rb-h-5 rb-w-5" }, bind("social.icon"), when("social.icon")), text({ as: "span" }, bind("social.label"), when("social.icon", { equals: null }))], repeat("module.socialLinks", "social"))], when("module.kind", { equals: "social-links" }));
34478
+ className: "rb-footer-social-link rb-nav-text transition-theme-standard"
34479
+ }, [icon({ className: "rb-footer-social-icon" }, bind("social.icon"), when("social.icon")), text({ as: "span" }, bind("social.label"), when("social.icon", { equals: null }))], repeat("module.socialLinks", "social"))], when("module.kind", { equals: "social-links" }));
34224
34480
  const authoredCopy = richText({
34225
34481
  className: "rb-prose rb-prose-sm rb-max-w-none",
34226
34482
  style: textColorStyle("text/80")
@@ -36228,6 +36484,7 @@ const publicEventLoaderQuerySchemaShape = {
36228
36484
  seriesSlug: z.string().optional(),
36229
36485
  includeOccurrenceId: z.string().optional(),
36230
36486
  readIntent: z.string().optional(),
36487
+ detailAdmission: z.string().optional(),
36231
36488
  detailLevel: z.string().optional(),
36232
36489
  readProfile: z.string().optional()
36233
36490
  };
@@ -36394,11 +36651,11 @@ const publicEventBookingAvailabilitySchema = z.discriminatedUnion("kind", [z.obj
36394
36651
  "series_archived",
36395
36652
  "parent_archived",
36396
36653
  "parent_inconsistent",
36397
- "not_public",
36398
36654
  "already_started",
36399
36655
  "enrollment_closed"
36400
36656
  ])
36401
36657
  })]);
36658
+ const publicEventBookingClosedDetailSchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("opensSoon") }), z.object({ kind: z.literal("paused") })]);
36402
36659
  const publicRunSessionSchema = z.object({
36403
36660
  occurrenceId: z.string(),
36404
36661
  startsAt: z.string(),
@@ -36443,6 +36700,7 @@ const publicEventBaseSchema = z.object({
36443
36700
  destination: publicEventDestinationSchema,
36444
36701
  requiresRegistration: z.boolean(),
36445
36702
  bookingAvailability: publicEventBookingAvailabilitySchema,
36703
+ bookingClosedDetail: publicEventBookingClosedDetailSchema.optional(),
36446
36704
  deliveryMode: z.enum([
36447
36705
  "in_person",
36448
36706
  "online",
@@ -44330,6 +44588,11 @@ const mailingListContentVersionIdSchema = z.string().transform((value, ctx) => {
44330
44588
  });
44331
44589
  return z.NEVER;
44332
44590
  });
44591
+ const mailingListSignupBlockSourceRefSchema = z.object({
44592
+ tag: z.literal("block_ref"),
44593
+ blockId: mailingListSignupBlockIdSchema,
44594
+ contentVersionId: mailingListContentVersionIdSchema
44595
+ });
44333
44596
  const signedMailingListSourceTokenSchema = z.string().trim().min(1).transform(parseRequiredMailingListSignedSourceToken);
44334
44597
  const newsletterSourceCommonSchema = z.object({
44335
44598
  siteId: z.string().optional(),
@@ -44344,7 +44607,15 @@ const newsletterSourceSchema = z.discriminatedUnion("source", [
44344
44607
  newsletterSourceCommonSchema.extend({
44345
44608
  source: z.literal("block"),
44346
44609
  blockId: z.string().nullable().optional(),
44347
- contentVersionId: z.string().nullable().optional()
44610
+ newsletterBlockSubmission: z.discriminatedUnion("tag", [
44611
+ z.object({
44612
+ tag: z.literal("ready"),
44613
+ sourceRef: mailingListSignupBlockSourceRefSchema
44614
+ }),
44615
+ z.object({ tag: z.literal("unpublished-form") }),
44616
+ z.object({ tag: z.literal("unpublished-settings") }),
44617
+ z.object({ tag: z.literal("unavailable") })
44618
+ ])
44348
44619
  }),
44349
44620
  newsletterSourceCommonSchema.extend({
44350
44621
  source: z.literal("signed-footer"),
@@ -44373,11 +44644,7 @@ const newsletterHydrationSchema = z.object({
44373
44644
  target: z.discriminatedUnion("tag", [
44374
44645
  z.object({
44375
44646
  tag: z.literal("block-source"),
44376
- sourceRef: z.object({
44377
- tag: z.literal("block_ref"),
44378
- blockId: mailingListSignupBlockIdSchema,
44379
- contentVersionId: mailingListContentVersionIdSchema
44380
- }).nullable()
44647
+ sourceRef: mailingListSignupBlockSourceRefSchema.nullable()
44381
44648
  }),
44382
44649
  z.object({
44383
44650
  tag: z.literal("signed-footer-source"),
@@ -44386,7 +44653,11 @@ const newsletterHydrationSchema = z.object({
44386
44653
  token: signedMailingListSourceTokenSchema
44387
44654
  })
44388
44655
  }),
44389
- z.object({ tag: z.literal("preview") })
44656
+ z.object({ tag: z.literal("preview") }),
44657
+ z.object({
44658
+ tag: z.literal("unpublished-preview"),
44659
+ reason: z.enum(["unpublished-form", "unpublished-settings"])
44660
+ })
44390
44661
  ]),
44391
44662
  setupRevision: z.number().int().positive().nullable(),
44392
44663
  choiceProvider: z.enum([
@@ -44455,16 +44726,21 @@ const newsletterFormBlockRuntime = defineProgressiveBlockRuntime({
44455
44726
  });
44456
44727
  function projectNewsletterFormHydrationTarget(source) {
44457
44728
  switch (source.source) {
44458
- case "block": {
44459
- const sourceRef = buildMailingListSignupBlockSourceRef(source.blockId, source.contentVersionId);
44460
- if (sourceRef?.tag === "block_ref") return {
44729
+ case "block": switch (source.newsletterBlockSubmission.tag) {
44730
+ case "unpublished-form":
44731
+ case "unpublished-settings": return {
44732
+ tag: "unpublished-preview",
44733
+ reason: source.newsletterBlockSubmission.tag
44734
+ };
44735
+ case "ready": return {
44461
44736
  tag: "block-source",
44462
- sourceRef
44737
+ sourceRef: source.newsletterBlockSubmission.sourceRef
44463
44738
  };
44464
- return {
44739
+ case "unavailable": return {
44465
44740
  tag: "block-source",
44466
44741
  sourceRef: null
44467
44742
  };
44743
+ default: return assertNever$6(source.newsletterBlockSubmission);
44468
44744
  }
44469
44745
  case "signed-footer": return {
44470
44746
  tag: "signed-footer-source",
@@ -49649,6 +49925,17 @@ const navigationLinkInputSchemaOptions = [
49649
49925
  ];
49650
49926
  z.discriminatedUnion("kind", navigationLinkInputSchemaOptions);
49651
49927
  //#endregion
49928
+ //#region ../blocks/src/pageRenderAdmission.ts
49929
+ /** Pair a published version with the content it authorises at the render boundary. */
49930
+ function readPublishedBlockPlacement(id, content) {
49931
+ if (id == null && content == null) return null;
49932
+ if (id == null || content == null) throw new Error("Published block placement requires both an ID and content");
49933
+ return {
49934
+ id,
49935
+ content
49936
+ };
49937
+ }
49938
+ //#endregion
49652
49939
  //#region ../api/src/sdkConfig/contracts.ts
49653
49940
  /**
49654
49941
  * Canonical SDK config Zod contracts.
@@ -50557,6 +50844,7 @@ function collectText(node) {
50557
50844
  if (node.type === "text") return node.text ?? "";
50558
50845
  return (node.content ?? []).map(collectText).join("");
50559
50846
  }
50847
+ z.enum(["public", "unlisted"], { error: "visibility must be 'public' or 'unlisted'" });
50560
50848
  //#endregion
50561
50849
  //#region ../api/src/bookingPaymentTermSchemas.ts
50562
50850
  const bookingDepositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
@@ -51105,21 +51393,39 @@ function buildSiteRenderSupport(site, mediaAssets) {
51105
51393
  function collectMediaAssetSidecar(mediaAssets) {
51106
51394
  return Array.isArray(mediaAssets) && mediaAssets.length > 0 ? mediaAssets : void 0;
51107
51395
  }
51108
- function convertPageResponseBlock(block) {
51396
+ function readBlockContentId(value, name) {
51397
+ if (value === null || value === void 0) return null;
51398
+ if (typeof value === "string") return value;
51399
+ throw new Error(`Invalid ${name} in page: expected string or null`);
51400
+ }
51401
+ function readTransportedBlockIdentity(block, kind, stage) {
51402
+ return {
51403
+ draftContentId: readBlockContentId(block.draftContentId, "draft content id"),
51404
+ publishedPlacement: stage === "preview" ? readPublishedBlockPlacement(readBlockContentId(block.publishedContentId, "published content id"), sanitizeNullableSdkRuntimeBlockContent(kind, readNestedContentRecord(block.publishedContent))) : null
51405
+ };
51406
+ }
51407
+ function convertPageResponseBlock(block, stage) {
51109
51408
  if (!isRecord$1(block)) throw new Error("Invalid block format in page API response");
51409
+ const header = readTransportedBlockHeader(block);
51410
+ const admission = readInvalidBlockAdmission(block.admission);
51411
+ return {
51412
+ ...header,
51413
+ ...readTransportedBlockIdentity(block, header.kind, stage),
51414
+ content: sanitizeSdkRuntimeBlockContent(header.kind, readContentRecord(block.content) ?? {}),
51415
+ draftContent: sanitizeNullableSdkRuntimeBlockContent(header.kind, readNestedContentRecord(block.draftContent)),
51416
+ ...admission ? { admission } : {}
51417
+ };
51418
+ }
51419
+ function readTransportedBlockHeader(block) {
51110
51420
  if (typeof block.id !== "string" && block.id !== null) throw new Error(`Invalid block id in page: expected string or null, got ${typeof block.id}`);
51111
51421
  if (typeof block.kind !== "string") throw new Error(`Invalid block kind in page: expected string, got ${typeof block.kind}`);
51112
51422
  if (typeof block.purpose !== "string") throw new Error(`Invalid block purpose in page: expected string, got ${typeof block.purpose}`);
51113
51423
  if (block.contentVersionId !== void 0 && block.contentVersionId !== null && typeof block.contentVersionId !== "string") throw new Error(`Invalid content version id in page: expected string or null, got ${typeof block.contentVersionId}`);
51114
- const admission = readInvalidBlockAdmission(block.admission);
51115
51424
  return {
51116
51425
  id: block.id,
51117
51426
  ...block.contentVersionId !== void 0 ? { contentVersionId: block.contentVersionId } : {},
51118
51427
  kind: block.kind,
51119
- purpose: block.purpose,
51120
- content: sanitizeSdkRuntimeBlockContent(block.kind, readContentRecord(block.content) ?? {}),
51121
- draftContent: sanitizeNullableSdkRuntimeBlockContent(block.kind, readNestedContentRecord(block.draftContent)),
51122
- ...admission ? { admission } : {}
51428
+ purpose: block.purpose
51123
51429
  };
51124
51430
  }
51125
51431
  function readInvalidBlockAdmission(value) {
@@ -51132,7 +51438,7 @@ function buildPageOutline(input) {
51132
51438
  name: input.name,
51133
51439
  path: input.path ?? input.fallbackPath,
51134
51440
  purpose: input.purpose,
51135
- blocks: input.blocks.map(convertPageResponseBlock)
51441
+ blocks: input.blocks.map((block) => convertPageResponseBlock(block, input.previewStage))
51136
51442
  };
51137
51443
  }
51138
51444
  function buildRenderablePageOutline(input) {
@@ -51158,6 +51464,8 @@ function projectRenderablePageOutline(page) {
51158
51464
  function admitSdkRuntimePageBlock(block, customBlocks) {
51159
51465
  const base = {
51160
51466
  id: block.id,
51467
+ draftContentId: block.draftContentId,
51468
+ publishedPlacement: block.publishedPlacement,
51161
51469
  ...block.contentVersionId !== void 0 ? { contentVersionId: block.contentVersionId } : {},
51162
51470
  kind: block.kind,
51163
51471
  purpose: block.purpose,
@@ -51305,23 +51613,23 @@ async function loadPageWithDeps(deps, params) {
51305
51613
  if ("pageSurface" in pageResponse) throw new Error("This path resolves to a page surface, not a page. Use loadContent() instead, which handles pages, entries, and page surfaces.");
51306
51614
  const { page: pageData } = pageResponse;
51307
51615
  const support = buildSiteRenderSupport(site, collectMediaAssetSidecar(pageResponse.mediaAssets));
51616
+ const previewStage = preview ? "preview" : "published";
51308
51617
  const pageOutline = buildRenderablePageOutline({
51309
51618
  name: pageData.name,
51310
51619
  path: pageData.path,
51311
51620
  fallbackPath: path,
51312
51621
  purpose: pageData.purpose,
51313
51622
  blocks: pageData.blocks,
51623
+ previewStage,
51314
51624
  customBlocks: support.customBlocks
51315
51625
  });
51316
- const previewStage = preview ? "preview" : "published";
51317
- const renderTarget = {
51318
- kind: "page",
51319
- pageId: pageId ?? pageData.id
51320
- };
51321
51626
  const resolvedData = await resolveBlockDataWithDeps(deps, {
51322
51627
  page: projectRenderablePageOutline(pageOutline),
51323
51628
  siteId,
51324
- renderTarget,
51629
+ renderTarget: {
51630
+ kind: "page",
51631
+ pageId: pageId ?? pageData.id
51632
+ },
51325
51633
  previewStage,
51326
51634
  policy: createBlockDataLoadPolicy(dataLoaderOverrides, normalizeDataLoaderSearchParams(searchParams)),
51327
51635
  client,
@@ -51334,6 +51642,7 @@ async function loadPageWithDeps(deps, params) {
51334
51642
  sdkConfig: support.sdkConfig,
51335
51643
  siteId,
51336
51644
  resolvedData,
51645
+ dataContext: { previewStage },
51337
51646
  bookingOfferingPresets: support.bookingOfferingPresets,
51338
51647
  mailingList: support.mailingList,
51339
51648
  bookingTimeZone: support.bookingTimeZone,
@@ -51727,7 +52036,8 @@ async function processTemplatePage(input) {
51727
52036
  block,
51728
52037
  bindingContext: input.bindingContext,
51729
52038
  slotContent: input.slotContent,
51730
- customBlocks: input.customBlocks
52039
+ customBlocks: input.customBlocks,
52040
+ previewStage: input.previewStage
51731
52041
  }));
51732
52042
  if (blocks.length === 0) return {
51733
52043
  templatePage: null,
@@ -51758,7 +52068,7 @@ function resolveTemplateBlockSequence(input) {
51758
52068
  if (slotKey) return selectBlocksForDeclaredEntrySlot({
51759
52069
  declaredSlotKey: slotKey,
51760
52070
  entrySlots: input.slotContent ?? []
51761
- }).map((slotBlock) => admitEntrySlotBlock(slotBlock, input.customBlocks));
52071
+ }).map((slotBlock) => admitEntrySlotBlock(slotBlock, input.customBlocks, input.previewStage));
51762
52072
  if (block.blockKind === "system.entry-slot") return [];
51763
52073
  return [resolveTemplateBlock(block, input.bindingContext, input.customBlocks)];
51764
52074
  }
@@ -51792,10 +52102,11 @@ function readEntrySlotKey(block) {
51792
52102
  const parsed = parseSlotKey(block.content?.slotKey);
51793
52103
  return parsed.ok ? parsed.value : null;
51794
52104
  }
51795
- function admitEntrySlotBlock(block, customBlocks) {
52105
+ function admitEntrySlotBlock(block, customBlocks, previewStage) {
51796
52106
  const base = {
51797
52107
  id: block.id ?? block.blockId ?? null,
51798
52108
  contentVersionId: block.contentVersionId,
52109
+ ...entrySlotBlockIdentity(block, previewStage),
51799
52110
  kind: block.kind,
51800
52111
  purpose: block.purpose,
51801
52112
  ...isRecord(block.bindings) ? { bindings: block.bindings } : {}
@@ -51816,6 +52127,12 @@ function admitEntrySlotBlock(block, customBlocks) {
51816
52127
  error: renderable.error
51817
52128
  });
51818
52129
  }
52130
+ function entrySlotBlockIdentity(block, previewStage) {
52131
+ return {
52132
+ draftContentId: block.draftContentId ?? null,
52133
+ publishedPlacement: previewStage === "preview" ? readPublishedBlockPlacement(block.publishedContentId, isRecord(block.publishedContent) && isRecord(block.publishedContent.data) ? block.publishedContent.data : null) : null
52134
+ };
52135
+ }
51819
52136
  //#endregion
51820
52137
  //#region src/rendering/helpers/loadContent.ts
51821
52138
  /**
@@ -51987,15 +52304,18 @@ async function loadContentFromContentResponseWithDeps(deps, params) {
51987
52304
  entry,
51988
52305
  templatePage,
51989
52306
  resolvedData,
51990
- dataContext: { contentEntry: {
51991
- ...entry.content ?? {},
51992
- id: entry.id,
51993
- slug: entry.slug,
51994
- contentTypeSlug: entry.type,
51995
- _entryId: entry.id,
51996
- _entrySlug: entry.slug,
51997
- _contentTypeSlug: entry.type
51998
- } },
52307
+ dataContext: {
52308
+ previewStage,
52309
+ contentEntry: {
52310
+ ...entry.content ?? {},
52311
+ id: entry.id,
52312
+ slug: entry.slug,
52313
+ contentTypeSlug: entry.type,
52314
+ _entryId: entry.id,
52315
+ _entrySlug: entry.slug,
52316
+ _contentTypeSlug: entry.type
52317
+ }
52318
+ },
51999
52319
  ...templateContentSupport
52000
52320
  };
52001
52321
  }
@@ -52056,6 +52376,7 @@ async function loadContentFromContentResponseWithDeps(deps, params) {
52056
52376
  templatePage,
52057
52377
  resolvedData,
52058
52378
  dataContext: {
52379
+ previewStage,
52059
52380
  pageSurface: {
52060
52381
  ...pageSurface.content ?? {},
52061
52382
  id: pageSurface.id,
@@ -52072,13 +52393,13 @@ async function loadContentFromContentResponseWithDeps(deps, params) {
52072
52393
  const { page: pageData } = contentResponse;
52073
52394
  const pageRecord = pageData;
52074
52395
  const canonicalPagePath = pageData.path ?? pageRecord.path ?? "/";
52075
- const draftPagePath = pageRecord.draftPath ?? pageRecord.path ?? canonicalPagePath;
52076
52396
  const pageOutline = buildRenderablePageOutline({
52077
52397
  name: pageData.name,
52078
52398
  path: canonicalPagePath,
52079
52399
  fallbackPath: "/",
52080
52400
  purpose: pageData.purpose,
52081
52401
  blocks: pageData.blocks,
52402
+ previewStage,
52082
52403
  customBlocks: support.customBlocks
52083
52404
  });
52084
52405
  const resolvedData = await resolveBlockDataWithDeps(deps, {
@@ -52097,26 +52418,14 @@ async function loadContentFromContentResponseWithDeps(deps, params) {
52097
52418
  type: "page",
52098
52419
  pageId: pageRecord.id,
52099
52420
  routeId: pageRecord.routeId ?? null,
52100
- pageMetadata: {
52101
- draftTitle: pageRecord.draftTitle ?? pageRecord.name ?? pageData.name,
52102
- draftPath: draftPagePath,
52103
- draftStatus: pageRecord.draftStatus ?? pageRecord.status ?? "draft",
52104
- title: pageRecord.name ?? pageData.name,
52105
- path: canonicalPagePath,
52106
- status: pageRecord.status ?? pageRecord.draftStatus ?? "draft",
52107
- publishedAt: pageRecord.publishedAt ?? null,
52108
- draftMetaTitle: pageRecord.draftMetaTitle ?? null,
52109
- draftMetaDescription: pageRecord.draftMetaDescription ?? null,
52110
- publishedMetaTitle: pageRecord.publishedMetaTitle ?? null,
52111
- publishedMetaDescription: pageRecord.publishedMetaDescription ?? null,
52112
- ogImageId: pageRecord.ogImageId ?? null
52113
- },
52421
+ pageMetadata: projectPagePreviewMetadata(pageRecord, pageData.name, canonicalPagePath),
52114
52422
  page: pageOutline,
52115
52423
  runtimeJoins: pageData.runtimeJoins,
52116
52424
  theme: support.theme,
52117
52425
  siteId,
52118
52426
  ...support.customBlocks ? { customBlocks: support.customBlocks } : {},
52119
52427
  resolvedData,
52428
+ dataContext: { previewStage },
52120
52429
  bookingOfferingPresets: support.bookingOfferingPresets,
52121
52430
  mailingList: support.mailingList,
52122
52431
  bookingTimeZone: support.bookingTimeZone,
@@ -52129,6 +52438,32 @@ async function loadContentFromContentResponseWithDeps(deps, params) {
52129
52438
  ...support.mediaAssets ? { mediaAssets: support.mediaAssets } : {}
52130
52439
  };
52131
52440
  }
52441
+ function projectPagePreviewMetadata(page, pageName, canonicalPath) {
52442
+ return {
52443
+ ...projectDraftPageMetadata(page, pageName, canonicalPath),
52444
+ ...projectPublishedPageMetadata(page, pageName, canonicalPath)
52445
+ };
52446
+ }
52447
+ function projectDraftPageMetadata(page, pageName, canonicalPath) {
52448
+ return {
52449
+ draftTitle: page.draftTitle ?? page.name ?? pageName,
52450
+ draftPath: page.draftPath ?? page.path ?? canonicalPath,
52451
+ draftStatus: page.draftStatus ?? page.status ?? "draft",
52452
+ draftMetaTitle: page.draftMetaTitle ?? null,
52453
+ draftMetaDescription: page.draftMetaDescription ?? null
52454
+ };
52455
+ }
52456
+ function projectPublishedPageMetadata(page, pageName, canonicalPath) {
52457
+ return {
52458
+ title: page.name ?? pageName,
52459
+ path: canonicalPath,
52460
+ status: page.status ?? page.draftStatus ?? "draft",
52461
+ publishedAt: page.publishedAt ?? null,
52462
+ publishedMetaTitle: page.publishedMetaTitle ?? null,
52463
+ publishedMetaDescription: page.publishedMetaDescription ?? null,
52464
+ ogImageId: page.ogImageId ?? null
52465
+ };
52466
+ }
52132
52467
  /**
52133
52468
  * Type guard to check if API response is an entry
52134
52469
  */