@riverbankcms/sdk 0.170.0 → 0.171.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 (219) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/_dts/{BlocksIslandsHydrator-B2i5CY_X.d.ts → BlocksIslandsHydrator-xuFmD41p.d.ts} +1 -1
  3. package/dist/_dts/{Page-BSZjbeRK.d.ts → Page-4fzXy8H9.d.ts} +13 -11
  4. package/dist/_dts/{SdkPreviewMode-BZpPBMcu.d.ts → SdkPreviewMode-BlHgMsc8.d.ts} +4 -3
  5. package/dist/_dts/{client-x82SZgwK.d.ts → client-BPoU758C.d.ts} +32 -1
  6. package/dist/_dts/{content-types-CODkxsZy.d.ts → content-types-TnkhoSls.d.ts} +3 -3
  7. package/dist/_dts/{contracts-Lyfhmbjf.d.ts → contracts-7wrMA79U.d.ts} +5 -3
  8. package/dist/_dts/{footerPageOutline-BShG2GAV.d.ts → footerPageOutline-DaOsPQ_Q.d.ts} +6 -6
  9. package/dist/_dts/{generatePageMetadata-DLhUW3xK.d.ts → generatePageMetadata-D9aDEzKK.d.ts} +2 -2
  10. package/dist/_dts/{index-BisbMZTW.d.ts → index-585vn6qb.d.ts} +72 -36
  11. package/dist/_dts/{index-B7Mq5M6P.d.ts → index-CZKSUcDs.d.ts} +4 -4
  12. package/dist/_dts/{index-B82pqQAC.d.ts → index-Cbw0IiY7.d.ts} +2 -2
  13. package/dist/_dts/{index-DXc_ewhR.d.ts → index-ChNbrcgD.d.ts} +1 -1
  14. package/dist/_dts/{index-C3rMEJ5a.d.ts → index-DDKJfaLY.d.ts} +2 -2
  15. package/dist/_dts/{index-CCugONHM.d.ts → index-DNCDENic.d.ts} +1 -1
  16. package/dist/_dts/{index-CstY6ZMa.d.ts → index-W9R3Bnf2.d.ts} +3 -3
  17. package/dist/_dts/{loadContent-BoqtbbhP.d.ts → loadContent-DPyNAJym.d.ts} +7 -7
  18. package/dist/_dts/{request-CJ_ClHLv.d.ts → request-jXTRN1Y4.d.ts} +3554 -1370
  19. package/dist/_dts/{resolveBlockData-DFExYkJ4.d.ts → resolveBlockData-BbvE-gsZ.d.ts} +5 -5
  20. package/dist/_dts/{resolvePageContent-D-WvpC_d.d.ts → resolvePageContent-BBgih00D.d.ts} +2 -2
  21. package/dist/_dts/{runtime-BY8DQBbT.d.ts → runtime-BEoNgYbd.d.ts} +2 -2
  22. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  23. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  24. package/dist/_dts/sdk/src/client.d.ts +7 -7
  25. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  26. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  27. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  28. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  29. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  30. package/dist/_dts/sdk/src/data/types.d.ts +2 -2
  31. package/dist/_dts/sdk/src/index.d.ts +8 -8
  32. package/dist/_dts/sdk/src/manifest/index.d.ts +7 -7
  33. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  34. package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
  35. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  36. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  37. package/dist/_dts/sdk/src/page-converter/index.d.ts +4 -4
  38. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  39. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  40. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  41. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  42. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  43. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  44. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  45. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  46. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
  47. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  48. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  49. package/dist/_dts/sdk/src/rendering/server.d.ts +3 -2
  50. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  51. package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
  52. package/dist/_dts/sdk/src/server.d.ts +5 -5
  53. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  54. package/dist/_dts/sdk/src/theme/index.d.ts +4740 -3
  55. package/dist/_dts/{types-CbjK5ZLy.d.ts → types-BXuVxDYo.d.ts} +2 -2
  56. package/dist/_dts/{types-CpuxuS40.d.ts → types-DEAKoDNi.d.ts} +3 -3
  57. package/dist/_dts/{types-990t4t99.d.ts → types-kWvBwYK6.d.ts} +7 -7
  58. package/dist/_dts/{validation-BN95LiS0.d.ts → validation-BAO0_ntM.d.ts} +17 -17
  59. package/dist/client/{BlocksIslandsHydrator-B1Tkg-ZW.mjs → BlocksIslandsHydrator-DfMsMIej.mjs} +17 -17
  60. package/dist/client/{BookingMailingListNote-Br1VyHkP.mjs → BookingMailingListNote-aaSicywS.mjs} +7 -7
  61. package/dist/client/{StepIndicator-BK0GEDoP.mjs → BookingPanelArrangement-OgftZ9QC.mjs} +16 -4
  62. package/dist/client/{BookingQuestionFields-LLGCWjvU.mjs → BookingQuestionFields-BlaCItmH.mjs} +5 -5
  63. package/dist/client/{CalendarNavigationChevron-CH7z2m47.mjs → CalendarNavigationChevron-iMWrY6Hz.mjs} +7 -7
  64. package/dist/client/{CheckboxChoice-W_uiRgDK.mjs → CheckboxChoice-B65wFjqx.mjs} +1 -1
  65. package/dist/client/{DemoBookingPortalAccess-Cilv5zdS.mjs → DemoBookingPortalAccess-BCumOTLY.mjs} +7 -7
  66. package/dist/client/{EventCalendar.client-LXUHJEi7.mjs → EventCalendar.client-kh7mkYnW.mjs} +9 -9
  67. package/dist/client/{EventCombined.client-DpugEJLB.mjs → EventCombined.client-DXD5i0Ar.mjs} +8 -8
  68. package/dist/client/{EventEmbeddedCheckoutStep-Cf-HRHtb.mjs → EventEmbeddedCheckoutStep-DKKRCuta.mjs} +1 -1
  69. package/dist/client/{EventItem-gFuZn-dE.mjs → EventItem-BnwcoFQN.mjs} +10 -7
  70. package/dist/client/{EventListWeekNavigation-D-kLg1jQ.mjs → EventListWeekNavigation-DuG6z02f.mjs} +1 -1
  71. package/dist/client/{EventListing.client-BNACUaxV.mjs → EventListing.client-18yfHrcr.mjs} +3 -3
  72. package/dist/client/{EventListing.view-CtVfe3VG.mjs → EventListing.view-BM7rTVSL.mjs} +42 -396
  73. package/dist/client/{EventRegistrationPayment-CqH3hE-k.mjs → EventRegistrationPayment-D5J3DR0x.mjs} +13 -13
  74. package/dist/client/{LocationMapActions-BFp2uQQQ.mjs → LocationMapActions-QahdLtdE.mjs} +2 -2
  75. package/dist/client/{MapDrawingSvg-DDWfmgpA.mjs → MapDrawingSvg-Dy6UMuIw.mjs} +1 -1
  76. package/dist/client/{Page-PW4Ojv9r.mjs → Page-DH2sm4Cf.mjs} +2696 -2426
  77. package/dist/client/{ProtectedSubmitButton-C3H26pN9.mjs → ProtectedSubmitButton-AOUzjDK9.mjs} +1 -1
  78. package/dist/client/StepIndicator-CsRlU46Y.mjs +894 -0
  79. package/dist/client/{TabBarFragment-DkVKtK5a.mjs → TabBarFragment-CsAufYwT.mjs} +1 -1
  80. package/dist/client/{ThemedButton-BdnEwA38.mjs → ThemedButton-BMDHwnM6.mjs} +1 -1
  81. package/dist/client/{accessibleSurfaces-_7jkuinl.mjs → accessibleSurfaces-Bbn1-jJ8.mjs} +52 -2
  82. package/dist/client/{accordion-DMItWylU.mjs → accordion-DT4MD3Np.mjs} +1 -1
  83. package/dist/client/{booking-form.client-wd71DG19.mjs → booking-form.client-DdqNQNCa.mjs} +79 -42
  84. package/dist/client/{bookingForm-Cyr2qeS1.mjs → bookingForm-CLN396HU.mjs} +4 -4
  85. package/dist/client/bookings.mjs +6 -6
  86. package/dist/client/boxStyleClassNames-iLF_3KX9.mjs +369 -0
  87. package/dist/client/{carousel-B5-Hzzif.mjs → carousel-DFLomCGm.mjs} +2 -2
  88. package/dist/client/{carousel.client-eSSr1oYA.mjs → carousel.client-YF4mUK5t.mjs} +1 -1
  89. package/dist/client/{cart-wlRXnOjO.mjs → cart-BozMM5NK.mjs} +3 -3
  90. package/dist/client/{cart.client-CfpnxTUZ.mjs → cart.client-CqOOxPbW.mjs} +1 -1
  91. package/dist/client/{checkout-Dnu9W8IA.mjs → checkout-CTWF5nbB.mjs} +3 -3
  92. package/dist/client/{checkout.client-ovtyXyn0.mjs → checkout.client-CpqxN8e0.mjs} +1 -1
  93. package/dist/client/{checkoutUrls-CY8qywXl.mjs → checkoutUrls-Ccg6yfjq.mjs} +1 -1
  94. package/dist/client/client.mjs +640 -218
  95. package/dist/client/{context-Xhf81Q-c.mjs → context-Dzjv2CpA.mjs} +10 -1
  96. package/dist/client/{creditProducts-CMOmhWm2.mjs → creditProducts-BTRX4edc.mjs} +54 -23
  97. package/dist/client/{cta-CfuyGqXL.mjs → cta-pzQkBLgS.mjs} +2 -2
  98. package/dist/client/{dateFormatting-Bv6kjUW3.mjs → dateFormatting-BfurxGwg.mjs} +1 -1
  99. package/dist/client/{demoPortalMagicLink-DQtwf_s2.mjs → demoPortalMagicLink-D0dcPsRE.mjs} +1 -1
  100. package/dist/client/{display-DDNmyb0z.mjs → display-Cl6mgSJa.mjs} +3186 -81
  101. package/dist/client/{enhanceHeaderSection-D7gRy-pL.mjs → enhanceHeaderSection-CJCl0HJC.mjs} +4 -4
  102. package/dist/client/{event-details.client-DZZaoCUc.mjs → event-details.client-Pn9Kxh3I.mjs} +3 -2
  103. package/dist/client/{event-registration.client-CLBdHUfd.mjs → event-registration.client-BAmBdWXE.mjs} +48 -34
  104. package/dist/client/{eventCalendar-B4VbblGN.mjs → eventCalendar-C5Bh2L8L.mjs} +4 -4
  105. package/dist/client/{eventCombined-e2AvbA0u.mjs → eventCombined-dELKxxIe.mjs} +4 -4
  106. package/dist/client/{eventDetails-DIJYMzVg.mjs → eventDetails-Do9D_fJ_.mjs} +2 -2
  107. package/dist/client/{eventListing-C0bpAR1t.mjs → eventListing-B2HTUWLq.mjs} +4 -4
  108. package/dist/client/{eventRegistration-DyseP_sY.mjs → eventRegistration-ByOJnqGc.mjs} +4 -4
  109. package/dist/client/{form-Cfl8d6qc.mjs → form-DX70QG-J.mjs} +3 -3
  110. package/dist/client/{form.client-D3_RF29v.mjs → form.client-CJoqBrS6.mjs} +5 -5
  111. package/dist/client/{form.parts-DWLf_3PF.mjs → form.parts-DTof9pL3.mjs} +3 -3
  112. package/dist/client/{formatDate-BGlhrmhF.mjs → formatDate-Cjouxh4Y.mjs} +1 -1
  113. package/dist/client/gifting/client.mjs +3 -3
  114. package/dist/client/{headerSection-CyNGt23J.mjs → headerSection-CJuPX_1K.mjs} +2 -2
  115. package/dist/client/{newsletter-form.client-IfLup4o0.mjs → newsletter-form.client-CqzNjOft.mjs} +6 -6
  116. package/dist/client/{newsletter-form.parts-DDD-LRyW.mjs → newsletter-form.parts-DjJsFms2.mjs} +2 -2
  117. package/dist/client/{newsletterForm-Bn7HVbuq.mjs → newsletterForm-D1MHoPbh.mjs} +3 -3
  118. package/dist/client/{noop-B_f7RqLD.mjs → noop-poI1m2yW.mjs} +69 -2
  119. package/dist/client/portal/client.mjs +294 -48
  120. package/dist/client/{product-detail.client-BXeLqkCE.mjs → product-detail.client-DOQ7El1d.mjs} +1 -1
  121. package/dist/client/{product-list.client-C627X8DQ.mjs → product-list.client-CmxOZbzL.mjs} +1 -1
  122. package/dist/client/{productDetail-B-K_hd7Y.mjs → productDetail-BN3zv5sa.mjs} +3 -3
  123. package/dist/client/{productList-BNZAsfaP.mjs → productList-GN_Id4bF.mjs} +3 -3
  124. package/dist/client/{propsDecoder-Dc8j5i79.mjs → propsDecoder-BdmzM3D5.mjs} +8 -4
  125. package/dist/client/{registry.server-CBg2M6Uj.mjs → registry.server-BOyra8CA.mjs} +1015 -926
  126. package/dist/client/rendering/client.mjs +57 -32
  127. package/dist/client/rendering/islands.mjs +1 -1
  128. package/dist/client/rendering.mjs +1956 -191
  129. package/dist/client/{richText-coerce-BTurYEao.mjs → richText-coerce-CtoGLZ_e.mjs} +1 -1
  130. package/dist/client/{routeIslandApiConfig-DFjRKvzM.mjs → routeIslandApiConfig-DnaJ8PQc.mjs} +1 -1
  131. package/dist/client/{runtimeResponse-D2LT--Gj.mjs → runtimeResponse-B1-cyLXt.mjs} +1 -1
  132. package/dist/client/{runtimeResponse-BGU8sMZY.mjs → runtimeResponse-BN8PoIVp.mjs} +1 -1
  133. package/dist/client/{shop-PgmiVKSV.mjs → shop-LjBLDBqF.mjs} +3 -3
  134. package/dist/client/{shop-commerce-DkgvZAQS.mjs → shop-commerce-B8aZTdRJ.mjs} +13 -13
  135. package/dist/client/{shop-commerce-store-D9CHihQv.mjs → shop-commerce-store-C1FtHYl7.mjs} +1 -1
  136. package/dist/client/{shop.client-DDFRt6OU.mjs → shop.client-D0qZ3KZp.mjs} +13 -13
  137. package/dist/client/{shop.interactive-BH0xDlMF.mjs → shop.interactive-DAKyWK1B.mjs} +89 -19
  138. package/dist/client/{shopShared-BEfD0e4m.mjs → shopShared-CztcSe9i.mjs} +2 -2
  139. package/dist/client/spam-protection.mjs +1 -1
  140. package/dist/client/{timetableModel-GsDrJxxw.mjs → timetableModel-D1jDTbms.mjs} +11 -11
  141. package/dist/client/{types-5fOsPIpL.mjs → types-B0hJldSt.mjs} +2 -0
  142. package/dist/client/{useAvailableSlots-GP8tnAVW.mjs → useAvailableSlots-ByHedoBi.mjs} +4 -8
  143. package/dist/client/{useDiscountApply-Cq07nTyG.mjs → useDiscountApply-CHGYDxdM.mjs} +2 -2
  144. package/dist/client/{useDiscountCodeUi-CD82QX5i.mjs → useDiscountCodeUi-Dew9UAEy.mjs} +1 -1
  145. package/dist/client/{useEventPagination-DGl4Jeuz.mjs → useEventPagination-BpC7-ksE.mjs} +7 -7
  146. package/dist/client/{view-oToSpu1N.mjs → view-BxeiAL3c.mjs} +121 -28
  147. package/dist/client/{view-CgComegl.mjs → view-ShYH3WXh.mjs} +3 -3
  148. package/dist/preview-next/before-render.mjs +33 -13
  149. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-8-qtHjpb.mjs → EventEmbeddedCheckoutStep-CKe4cjZ4.mjs} +1 -1
  150. package/dist/preview-next/client/{LocationPickerEnvironment-CwxRbAs2.mjs → LocationPickerEnvironment-lW2aLGWd.mjs} +1 -1
  151. package/dist/preview-next/client/{MapLibreEditMap-CKjYUp_E.mjs → MapLibreEditMap-C9InQJpd.mjs} +2 -2
  152. package/dist/preview-next/client/{ArrangementLookControls-DJQrgD5f.mjs → PageSectionToolbar-DsSqwrMS.mjs} +392 -11
  153. package/dist/preview-next/client/{PreviewEditorSidebar-DWU6X6Y-.mjs → PreviewEditorSidebar-BEEWzXnU.mjs} +3264 -3199
  154. package/dist/preview-next/client/{PreviewEditorUI-C-X0ptC3.mjs → PreviewEditorUI-C86Out4V.mjs} +5 -6
  155. package/dist/preview-next/client/{PreviewShell-C1WUNsj9.mjs → PreviewShell-CBWYjBvQ.mjs} +20 -10
  156. package/dist/preview-next/client/{SdkPreviewModeRuntime-Cs2QFT7k.mjs → SdkPreviewModeRuntime-o-mVqWLx.mjs} +88 -394
  157. package/dist/preview-next/client/{SiteChromeCustomizeButton-CcZ_ERvZ.mjs → SiteChromeCustomizeButton-H_ciMNHA.mjs} +1155 -330
  158. package/dist/preview-next/client/{ThemedButton-BQU45t-E.mjs → ThemedButton-CKYjeU_M.mjs} +2 -0
  159. package/dist/preview-next/client/{lucide-react-DbC1o6_9.mjs → lucide-react-DygTyy7K.mjs} +1 -1
  160. package/dist/preview-next/client/{previewAssistantSlot-CSs9S8wr.mjs → previewAssistantSlot-CuOcsG_N.mjs} +3558 -2230
  161. package/dist/preview-next/client/{previewChromeRoot-B2OTurZH.mjs → previewChromeRoot-DPeV7KaP.mjs} +1 -1
  162. package/dist/preview-next/client/runtime.mjs +3 -3
  163. package/dist/preview-next/client/{sdk-runtime-CBIwYDyi.mjs → sdk-runtime-zTTFZ4MM.mjs} +2 -2
  164. package/dist/preview-next/client/{useAutosaveStatus-DoWvGNPA.mjs → useAutosaveStatus-DNA1Q4L1.mjs} +2 -2
  165. package/dist/preview-next/client/{useBlockCustomizeControls-WOs8Atje.mjs → useOpenBlockForSetup-BdnMlHC6.mjs} +28 -3
  166. package/dist/preview-next/container-responsive.css +43 -0
  167. package/dist/preview-next/keepAlive.mjs +1 -1
  168. package/dist/preview-next/middleware.mjs +1 -1
  169. package/dist/preview-next/{route-contract-BLYaenrK.mjs → route-contract-CtSgU8UZ.mjs} +547 -188
  170. package/dist/server/{Block.shared-Dx4j9CJT.mjs → Block.shared-ifgaBglp.mjs} +4 -4
  171. package/dist/server/{ThemeScopeCore-B0IfeNNZ.mjs → ThemeScopeCore-DGDOH6OU.mjs} +3 -3
  172. package/dist/server/{accessibleSurfaces-D0q5tLSW.mjs → accessibleSurfaces-BuPNCWAK.mjs} +52 -2
  173. package/dist/server/bindings-CiYpie1M.mjs +1802 -0
  174. package/dist/server/{block-kinds-CdI7NvAW.mjs → block-kinds-DkzOr19P.mjs} +2 -0
  175. package/dist/server/{client-Djjv-NuA.mjs → client-ngWuFsmN.mjs} +638 -216
  176. package/dist/server/config-template-validation.mjs +30 -4
  177. package/dist/server/config-validation.mjs +1 -1
  178. package/dist/server/config.mjs +3 -34
  179. package/dist/server/data/resolveBlockData.mjs +1 -1
  180. package/dist/server/index.mjs +3 -3
  181. package/dist/server/loadContent-DeLQeJAZ.mjs +2310 -0
  182. package/dist/server/{loadPage-QXSdPSYY.mjs → loadPage-D4J747FQ.mjs} +2 -2
  183. package/dist/server/manifest.mjs +1 -1
  184. package/dist/server/next.mjs +8 -6
  185. package/dist/server/{opaqueSurface-Yltv_u7r.mjs → opaqueSurface-ukEz1BaM.mjs} +2 -2
  186. package/dist/server/{overrideResolution-CMNx5tQg.mjs → overrideResolution-DSuVkpqm.mjs} +3 -2
  187. package/dist/server/page-converter.mjs +3 -3
  188. package/dist/server/pageRegions-BaeEF2MU.mjs +30 -0
  189. package/dist/server/{pageRenderPlan-Bv6NbFeM.mjs → pageRenderPlan-DFv3h4Ib.mjs} +306 -287
  190. package/dist/server/{pageRuntimeSupport-B2laBtff.mjs → pageRuntimeSupport-yHaRNWMj.mjs} +48 -35
  191. package/dist/server/{pageShared-CE9EBNSH.mjs → pageShared-CAZD0LcY.mjs} +848 -315
  192. package/dist/server/parseThemeForPersistence-Dl7LIBJq.mjs +52 -0
  193. package/dist/server/{prebuild-FBA6Y1K7.mjs → prebuild-BKOCND3b.mjs} +1 -1
  194. package/dist/server/prebuild.mjs +1 -1
  195. package/dist/server/{prefetchBlockData-yL2hB2l_.mjs → prefetchBlockData-GIoExi8A.mjs} +4 -3
  196. package/dist/server/{registry-Djrj9gWy.mjs → registry-BogXzcOD.mjs} +4000 -1989
  197. package/dist/server/rendering/components/pageShared.mjs +1 -1
  198. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  199. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  200. package/dist/server/rendering/server.mjs +3 -3
  201. package/dist/server/rendering.mjs +7 -7
  202. package/dist/server/{resolveBlockData-CyeIjmqx.mjs → resolveBlockData-CT4YSBve.mjs} +4 -3
  203. package/dist/server/{resolveButtonColourStates-Cn6j8Ee0.mjs → resolveButtonColourStates-DVISOQD9.mjs} +2 -0
  204. package/dist/server/rich-text-CRcONdyM.mjs +33 -0
  205. package/dist/server/{richTextSchema-DQ2NBP0n.mjs → richTextSchema-QLaQrbII.mjs} +31 -2
  206. package/dist/server/{parseThemeForPersistence-BebSeE17.mjs → schema-C92Q8y0-.mjs} +463 -53
  207. package/dist/server/server.mjs +3 -3
  208. package/dist/server/theme-bridge.mjs +2 -2
  209. package/dist/server/theme.mjs +2 -1
  210. package/dist/server/{three-pass-converter-CQWdnfjV.mjs → three-pass-converter-Bsfdy_ZV.mjs} +11 -8
  211. package/dist/server/{validation-Dh8htd6l.mjs → validation-vSBCWU3w.mjs} +9 -9
  212. package/dist/server/{version-LMwnoksN.mjs → version-Cw5vFmUY.mjs} +1 -1
  213. package/dist/styles/index.css +408 -10
  214. package/package.json +1 -1
  215. package/dist/client/StepIndicator-CR7_0yu4.mjs +0 -432
  216. package/dist/preview-next/client/useOpenBlockForSetup-CipKCK2O.mjs +0 -28
  217. package/dist/server/bindings-C1-MNwwS.mjs +0 -257
  218. package/dist/server/headerVariant-8O5MvxIU.mjs +0 -464
  219. package/dist/server/loadContent-DhraQ_Fi.mjs +0 -578
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { c as unsafeAsMediaAssetId, d as parseUuidBrand, f as err, i as resolveManagedMediaReference, l as unsafeAsStorageBucketName, o as parseCanonicalMediaIdentifier, p as ok$1, u as unsafeAsStoragePath } from "./renderableMediaAssetAdmission-BlfqYLJW.mjs";
3
- import { $t as toBookingTimeZone, B as blockBookingPaymentTermsSchema, Bt as resolveBookingDisplayContext, Ft as formatDateTimeRange, G as beforeBookingQuestionsPresentationSchema, Gt as compareLocalScheduleDates, Ht as toScheduledBookingDateTime, It as formatTime$2, Jt as getLocalScheduleDate, K as bookingQuestionsAnswerValueSchema, Lt as formatTimeRange, Mt as formatDate$2, N as isArrangementMode, Nt as formatDateRange, O as arrangementModes, Pt as formatDateTime, Qt as resolveBookingTimeZoneId, V as blockBookingConsentSchema, W as toBookingRequirementConsentField, X as externalMediaSchema, Xt as parseLocalScheduleTime, Y as assetMediaSchema, Z as imageMediaSchema, Zt as resolveBookingBusinessTimeZone, an as toNonNegativeCents, at as normalizeCurrencyCode, en as parseUtcIsoDateTimeString, et as runtimeMediaSchema, lt as eventCalendarListLayoutValues, n as blockSiteTermsSchema, nn as validateBookingPaymentOptionKinds, on as formatCurrencyAmount, ot as eventCalendarDefaultViewValues, qt as getBookingLocalDateKey, st as eventCalendarDisplayModeValues, tn as toUtcIsoDateTimeString, tt as videoMediaSchema, zt as inferSiteDateLocale } from "./noop-B_f7RqLD.mjs";
4
- import { A as resolveFlexibleBalanceInitialPaymentCents, C as clampConfiguredAmount, D as omitZeroAmountFutureRows, E as getBookingInstalmentPlanIntervalCount, M as assertNever$2, O as splitAmountWithRemainderInFirst, S as addIntervalPreservingMonthAnchor, T as getBookingInstalmentDepositRefundability, d as initialBookingQuestionsAnswerMode, f as initialBookingQuestionsValues, h as assertNever$3, k as resolveFlexibleBalanceDueAt, n as getCreditProductCreditUnit, p as resolveBookingQuestionsAnswerMode, s as buildBookingQuestionsSubmission, t as deriveCreditProductLabels } from "./creditProducts-CMOmhWm2.mjs";
5
- import { A as defineButtonStyleRecipe, B as mergeStyles, E as ELEVATION_OFFSET, G as resolveSurfaceForeground, L as backgroundColorStyle, M as mapButtonVisualAppearances, St as preparePaletteColourIndex, U as textColorStyle, V as rgbColorValue, _t as resolveOpaqueSurfaceHex, a as resolveSurface, at as SURFACE_FOREGROUND_CSS_VARS, bt as requirePaletteColorsFromEntries, d as scrimTone, ft as surfaceInkDeclarations, gt as resolveConcreteColorHex, h as BUTTON_CONTRAST_POLICY, ht as ownedThemeSnapshot, i as requireResolvedSurface, j as mapButtonRoleAppearances, k as PUBLIC_BUTTON_ROLES, mt as freezeOwnedThemeValue, ot as SURFACE_INK_CSS_VARS, p as contextualButtonSurfaceResetStyles, s as surfaceButtonRequest, st as surfaceForegroundDeclarations, t as parseResolvedSurface, tt as expandPalette, u as gradientScrimSamples, ut as surfaceForegroundValue, vt as paletteValueKey, wt as featuresFromHex, yt as paletteValueKeySchema } from "./accessibleSurfaces-_7jkuinl.mjs";
3
+ import { $ as imageMediaSchema, $t as parseLocalScheduleTime, A as eyebrowTreatmentValues, B as blockBookingPaymentTermsSchema, Bt as formatTimeRange, D as accordionIconSetValues, E as accordionIconMotionValues, F as visibleHeadingDecorationFamilyValues, Ft as formatDate$2, G as beforeBookingQuestionsPresentationSchema, Gt as toScheduledBookingDateTime, Ht as inferSiteDateLocale, It as formatDateRange, Jt as compareLocalScheduleDates, K as bookingQuestionsAnswerValueSchema, Lt as formatDateTime, M as headingDecorationOverrideValues, N as isArrangementMode, O as arrangementModes, P as tileTreatmentValues, Q as externalMediaSchema, Rt as formatDateTimeRange, T as accordionIconColorTokenValues, Ut as resolveBookingDisplayContext, V as blockBookingConsentSchema, W as toBookingRequirementConsentField, Xt as getBookingLocalDateKey, Z as assetMediaSchema, Zt as getLocalScheduleDate, an as validateBookingPaymentOptionKinds, cn as toNonNegativeCents, ct as eventCalendarDefaultViewValues, dt as eventCalendarListLayoutValues, en as resolveBookingBusinessTimeZone, et as mediaSchema, in as toUtcIsoDateTimeString, j as headingDecorationColorTokenValues, k as eventListTreatmentValues, ln as formatCurrencyAmount, lt as eventCalendarDisplayModeValues, n as blockSiteTermsSchema, nn as toBookingTimeZone, nt as runtimeMediaSchema, rn as parseUtcIsoDateTimeString, rt as videoMediaSchema, st as normalizeCurrencyCode, tn as resolveBookingTimeZoneId, zt as formatTime$2 } from "./noop-poI1m2yW.mjs";
4
+ import { A as resolveFlexibleBalanceDueAt, C as addIntervalPreservingMonthAnchor, D as getBookingInstalmentPlanIntervalCount, E as getBookingInstalmentDepositRefundability, N as assertNever$2, O as omitZeroAmountFutureRows, P as parseAppointmentServiceId, S as formatCreditProductUnits, a as buildBookingQuestionsSubmission, b as creditProductUnitNoun, d as resolveBookingQuestionsAnswerMode, j as resolveFlexibleBalanceInitialPaymentCents, k as splitAmountWithRemainderInFirst, l as initialBookingQuestionsAnswerMode, p as assertNever$3, t as deriveCreditProductLabels, u as initialBookingQuestionsValues, w as clampConfiguredAmount } from "./creditProducts-BTRX4edc.mjs";
5
+ import { A as ELEVATION_OFFSET, Ct as paletteValueKeySchema, Et as preparePaletteColourIndex, F as mapButtonRoleAppearances, G as rgbColorValue, I as mapButtonVisualAppearances, N as PUBLIC_BUTTON_ROLES, Ot as featuresFromHex, P as defineButtonStyleRecipe, St as paletteValueKey, V as backgroundColorStyle, W as mergeStyles, Y as resolveSurfaceForeground, _ as contextualButtonSurfaceResetStyles, a as requireResolvedSurface, at as expandPalette, bt as resolveConcreteColorHex, c as surfaceButtonRequest, d as toAccessibleColorSurfaceIntent, dt as surfaceForegroundDeclarations, gt as surfaceInkDeclarations, h as scrimTone, i as prepareThemeSurfaceRevision, lt as SURFACE_FOREGROUND_CSS_VARS, m as minimumScrimOpacity, mt as surfaceForegroundValue, o as resolveSurface, p as gradientScrimSamples, q as textColorStyle, rt as contrastThresholdByPolicy, t as parseResolvedSurface, u as surfaceTransportContext, ut as SURFACE_INK_CSS_VARS, vt as freezeOwnedThemeValue, wt as requirePaletteColorsFromEntries, xt as resolveOpaqueSurfaceHex, y as BUTTON_CONTRAST_POLICY, yt as ownedThemeSnapshot } from "./accessibleSurfaces-Bbn1-jJ8.mjs";
6
6
  import { l as buildCalendarViewport$1, n as calendarLinks, r as groupItemsByDate } from "./src-xrjaKaCj.mjs";
7
- import { D as parseThemeColorToken, E as parseColorTokenParts, O as themeColorTokenSchema, T as paletteModeSchema, c as buttonEffectApplicationSchema, f as buttonVisualStatesSchema, g as VARIANT_ROLES, l as buttonPressOffsetSchema, s as unsafeAsOpaqueButtonColourToken, w as paletteColorsSchema, y as hexColorSchema } from "./types-5fOsPIpL.mjs";
8
- import { S as clsx } from "./ThemedButton-BdnEwA38.mjs";
7
+ import { C as paletteColorsFromEntries, D as parseThemeColorToken, E as parseColorTokenParts, O as themeColorTokenSchema, S as paletteColorEntries, T as paletteModeSchema, b as isThemeColorToken, c as buttonEffectApplicationSchema, f as buttonVisualStatesSchema, g as VARIANT_ROLES, l as buttonPressOffsetSchema, s as unsafeAsOpaqueButtonColourToken, u as buttonSystemSchema, w as paletteColorsSchema, y as hexColorSchema } from "./types-B0hJldSt.mjs";
8
+ import { S as clsx } from "./ThemedButton-BMDHwnM6.mjs";
9
9
  import { a as getSupabaseUrl, i as getSiteId, n as getCurrentResolveImageUrlContext, r as getMediaAssetIndex } from "./mediaContext-Fusweriw.mjs";
10
10
  import React from "react";
11
11
  import { Fragment, jsx } from "react/jsx-runtime";
@@ -13,6 +13,7 @@ import { z } from "zod";
13
13
  //#region ../core/src/branded/events.ts
14
14
  const unsafeAsEventOfferingId = (id) => id;
15
15
  const unsafeAsEventSeriesId = (id) => id;
16
+ const unsafeAsEventCategoryId = (id) => id;
16
17
  const parseEventOfferingId = (value) => parseUuidBrand(value, unsafeAsEventOfferingId);
17
18
  const parseEventSeriesId = (value) => parseUuidBrand(value, unsafeAsEventSeriesId);
18
19
  //#endregion
@@ -321,6 +322,28 @@ function isRecord$7(value) {
321
322
  return typeof value === "object" && value !== null && !Array.isArray(value);
322
323
  }
323
324
  //#endregion
325
+ //#region ../core/src/page-surface-subject.ts
326
+ function parsePageSurfaceSubject(value) {
327
+ if (typeof value !== "object" || value === null || !("kind" in value) || value.kind !== "appointmentService") return parseEventPageSurfaceSubject(value);
328
+ const id = parseAppointmentServiceId("appointmentServiceId" in value ? value.appointmentServiceId : void 0);
329
+ if (!id.ok) return err({
330
+ kind: "invalidAppointmentServiceId",
331
+ error: id.error
332
+ });
333
+ return ok$1({
334
+ kind: "appointmentService",
335
+ appointmentServiceId: id.value,
336
+ ...servicePageDestination(value),
337
+ ..."noindex" in value && value.noindex === true ? { noindex: true } : {}
338
+ });
339
+ }
340
+ /** Parse the renderer choice once at the wire boundary. */
341
+ function servicePageDestination(value) {
342
+ if (!("serviceDestinationMode" in value)) return {};
343
+ const mode = value.serviceDestinationMode;
344
+ return mode === "cms-managed" || mode === "system-managed" ? { serviceDestinationMode: mode } : {};
345
+ }
346
+ //#endregion
324
347
  //#region ../core/src/ticket-quantity.ts
325
348
  function toPositiveTicketQuantity(value) {
326
349
  if (!Number.isFinite(value) || !Number.isInteger(value) || value <= 0) return err("invalid_quantity");
@@ -1408,6 +1431,28 @@ function asHeaderStyleId(value) {
1408
1431
  const pageDesignEditorBackgroundOverrideOwner = "page-design-editor";
1409
1432
  const siteChromeBackgroundOverrideOwner = "site-chrome-editor";
1410
1433
  //#endregion
1434
+ //#region ../site-contracts/src/identity/gradientPresets.ts
1435
+ const gradientPresetIdValues = [
1436
+ "primary-secondary",
1437
+ "primary-accent",
1438
+ "secondary-accent",
1439
+ "primary-light-dark",
1440
+ "primary-dark-light",
1441
+ "secondary-light-dark",
1442
+ "accent-light-dark",
1443
+ "background-surface",
1444
+ "neutral-fade",
1445
+ "primary-glow",
1446
+ "accent-glow",
1447
+ "primary-secondary-accent"
1448
+ ];
1449
+ const gradientPresetIdSet = new Set(gradientPresetIdValues);
1450
+ function parseGradientPresetId(value) {
1451
+ if (typeof value !== "string") return null;
1452
+ const normalized = value.trim();
1453
+ return gradientPresetIdSet.has(normalized) ? normalized : null;
1454
+ }
1455
+ //#endregion
1411
1456
  //#region ../site-contracts/src/theme/buttonSelection.ts
1412
1457
  const BUTTON_STYLE_IDS = [
1413
1458
  "soft-pill",
@@ -1673,6 +1718,652 @@ function validateUniqueCardVariantRoles(system, ctx) {
1673
1718
  }
1674
1719
  const cardSystemSchema = z.object({ variants: z.array(cardVariantSchema).min(1).max(3) }).superRefine(validateUniqueCardVariantRoles);
1675
1720
  //#endregion
1721
+ //#region ../site-contracts/src/theme/accordions.ts
1722
+ /**
1723
+ * Accordion icon styles for expand/collapse indicators
1724
+ */
1725
+ const accordionIconSchema = z.enum([
1726
+ "plus-minus",
1727
+ "chevron",
1728
+ "caret",
1729
+ "arrow",
1730
+ "circle-plus-minus"
1731
+ ]);
1732
+ /**
1733
+ * Accordion configuration for a theme
1734
+ * Single style per theme (no variants needed)
1735
+ */
1736
+ const accordionSystemSchema = z.object({
1737
+ background: z.object({
1738
+ type: z.literal("solid"),
1739
+ colorToken: themeColorTokenSchema
1740
+ }).nullable(),
1741
+ spacing: z.enum([
1742
+ "none",
1743
+ "compact",
1744
+ "cozy",
1745
+ "medium",
1746
+ "comfortable",
1747
+ "spacious"
1748
+ ]),
1749
+ corners: z.enum([
1750
+ "square",
1751
+ "soft",
1752
+ "rounded",
1753
+ "pill"
1754
+ ]).nullable(),
1755
+ border: z.object({
1756
+ widthClass: z.string(),
1757
+ colorToken: themeColorTokenSchema
1758
+ }).nullable(),
1759
+ shadow: z.object({
1760
+ elevation: z.enum([
1761
+ "none",
1762
+ "low",
1763
+ "medium",
1764
+ "high"
1765
+ ]),
1766
+ softness: z.enum([
1767
+ "soft",
1768
+ "crisp",
1769
+ "hard"
1770
+ ]).nullable(),
1771
+ position: z.enum(["bottom", "bottom-right"])
1772
+ }).nullable(),
1773
+ icon: z.object({
1774
+ style: accordionIconSchema,
1775
+ position: z.enum(["left", "right"]),
1776
+ size: z.enum([
1777
+ "sm",
1778
+ "md",
1779
+ "lg"
1780
+ ]),
1781
+ colorToken: themeColorTokenSchema.optional()
1782
+ }),
1783
+ trigger: z.object({
1784
+ textColorToken: themeColorTokenSchema,
1785
+ fontWeight: z.enum([
1786
+ "regular",
1787
+ "medium",
1788
+ "semibold",
1789
+ "bold"
1790
+ ]).nullable(),
1791
+ fontFamily: z.enum(["body", "heading"]).optional(),
1792
+ fontScale: z.enum([
1793
+ "body",
1794
+ "md",
1795
+ "lg"
1796
+ ]).optional(),
1797
+ letterSpacing: z.enum([
1798
+ "normal",
1799
+ "tight",
1800
+ "wide"
1801
+ ]).optional(),
1802
+ textTransform: z.enum(["none", "uppercase"]).optional()
1803
+ }),
1804
+ hover: z.object({
1805
+ backgroundColorToken: themeColorTokenSchema.optional(),
1806
+ textColorToken: themeColorTokenSchema.optional(),
1807
+ borderColorToken: themeColorTokenSchema.optional()
1808
+ }),
1809
+ openState: z.object({
1810
+ backgroundColorToken: themeColorTokenSchema.optional(),
1811
+ triggerColorToken: themeColorTokenSchema.optional(),
1812
+ accent: z.object({
1813
+ edge: z.enum([
1814
+ "left",
1815
+ "top",
1816
+ "bottom"
1817
+ ]),
1818
+ colorToken: themeColorTokenSchema,
1819
+ thickness: z.enum([
1820
+ "thin",
1821
+ "medium",
1822
+ "thick"
1823
+ ])
1824
+ }).optional()
1825
+ }).optional(),
1826
+ content: z.object({ textColorToken: themeColorTokenSchema })
1827
+ });
1828
+ //#endregion
1829
+ //#region ../site-contracts/src/theme/inputs.ts
1830
+ /**
1831
+ * Input styling configuration for a theme
1832
+ *
1833
+ * Provides comprehensive control over form input appearance including:
1834
+ * - Base styling (background, borders, spacing)
1835
+ * - Label styling
1836
+ * - Focus, error, and disabled states
1837
+ *
1838
+ * Single configuration per theme (no variants needed for inputs)
1839
+ */
1840
+ const inputSystemSchema = z.object({
1841
+ base: z.object({
1842
+ background: z.union([z.object({
1843
+ type: z.literal("solid"),
1844
+ colorToken: themeColorTokenSchema
1845
+ }), z.object({ type: z.literal("transparent") })]),
1846
+ textColorToken: themeColorTokenSchema,
1847
+ border: z.object({
1848
+ widthClass: z.string(),
1849
+ colorToken: themeColorTokenSchema,
1850
+ style: z.enum(["all", "underline"]).optional()
1851
+ }),
1852
+ corners: z.enum([
1853
+ "square",
1854
+ "soft",
1855
+ "rounded",
1856
+ "pill"
1857
+ ]).nullable(),
1858
+ shadow: z.object({
1859
+ elevation: z.enum([
1860
+ "none",
1861
+ "low",
1862
+ "medium"
1863
+ ]),
1864
+ softness: z.enum([
1865
+ "soft",
1866
+ "crisp",
1867
+ "hard"
1868
+ ]).nullable()
1869
+ }).nullable(),
1870
+ spacing: z.enum([
1871
+ "compact",
1872
+ "cozy",
1873
+ "medium",
1874
+ "comfortable"
1875
+ ]),
1876
+ fontSize: z.enum([
1877
+ "sm",
1878
+ "base",
1879
+ "lg"
1880
+ ])
1881
+ }),
1882
+ label: z.object({
1883
+ textColorToken: themeColorTokenSchema,
1884
+ fontWeight: z.enum([
1885
+ "regular",
1886
+ "medium",
1887
+ "semibold",
1888
+ "bold",
1889
+ "black"
1890
+ ]),
1891
+ fontSize: z.enum([
1892
+ "2xs",
1893
+ "xs",
1894
+ "sm",
1895
+ "base"
1896
+ ]),
1897
+ textTransform: z.enum([
1898
+ "none",
1899
+ "uppercase",
1900
+ "lowercase",
1901
+ "capitalize"
1902
+ ]).optional(),
1903
+ letterSpacing: z.enum([
1904
+ "normal",
1905
+ "wide",
1906
+ "wider",
1907
+ "widest"
1908
+ ]).optional(),
1909
+ opacity: z.number().min(.2).max(1).optional()
1910
+ }),
1911
+ focus: z.object({
1912
+ ringColorToken: themeColorTokenSchema,
1913
+ ringWidth: z.enum([
1914
+ "0",
1915
+ "1",
1916
+ "2",
1917
+ "3"
1918
+ ]),
1919
+ borderColorToken: themeColorTokenSchema.optional()
1920
+ }),
1921
+ error: z.object({
1922
+ borderColorToken: themeColorTokenSchema,
1923
+ textColorToken: themeColorTokenSchema
1924
+ }),
1925
+ disabled: z.object({
1926
+ backgroundColorToken: themeColorTokenSchema,
1927
+ textColorToken: themeColorTokenSchema,
1928
+ opacity: z.number().min(.3).max(.7)
1929
+ })
1930
+ });
1931
+ //#endregion
1932
+ //#region ../site-contracts/src/theme/interactive.ts
1933
+ /**
1934
+ * Typography settings shared by buttons and nav links
1935
+ */
1936
+ const interactiveTypographySchema = z.object({
1937
+ /** Font family source */
1938
+ typography: z.enum(["body", "heading"]).default("body"),
1939
+ /** Font weight */
1940
+ fontWeight: z.enum([
1941
+ "regular",
1942
+ "medium",
1943
+ "semibold",
1944
+ "bold"
1945
+ ]).default("medium"),
1946
+ /** Text transform */
1947
+ textTransform: z.enum([
1948
+ "none",
1949
+ "uppercase",
1950
+ "capitalize"
1951
+ ]).default("none"),
1952
+ /** Italic style */
1953
+ italic: z.boolean().default(false)
1954
+ });
1955
+ /**
1956
+ * Effect application reference (shared between buttons and nav)
1957
+ */
1958
+ const effectApplicationSchema = z.object({
1959
+ /** Effect preset ID */
1960
+ effectId: z.string(),
1961
+ /** User-provided customization options */
1962
+ options: z.record(z.string(), z.any()).optional()
1963
+ });
1964
+ /**
1965
+ * Effect composition by state (shared pattern)
1966
+ */
1967
+ const effectCompositionSchema = z.object({
1968
+ /** Effects always applied */
1969
+ base: z.array(effectApplicationSchema).optional(),
1970
+ /** Effects applied on hover */
1971
+ hover: z.array(effectApplicationSchema).optional(),
1972
+ /** Effects applied on active/pressed */
1973
+ active: z.array(effectApplicationSchema).optional(),
1974
+ /** Effects applied on focus */
1975
+ focus: z.array(effectApplicationSchema).optional()
1976
+ });
1977
+ //#endregion
1978
+ //#region ../site-contracts/src/theme/navigation.ts
1979
+ /**
1980
+ * Padding preset options for nav links
1981
+ */
1982
+ const navLinkPaddingSchema = z.enum([
1983
+ "none",
1984
+ "compact",
1985
+ "default"
1986
+ ]);
1987
+ /**
1988
+ * Horizontal padding override for nav links.
1989
+ * When set, overrides only the horizontal component of the `padding` preset.
1990
+ */
1991
+ const navLinkPaddingXSchema = z.enum([
1992
+ "none",
1993
+ "tight",
1994
+ "compact",
1995
+ "default",
1996
+ "relaxed",
1997
+ "spacious"
1998
+ ]);
1999
+ /**
2000
+ * Border radius options for nav links
2001
+ */
2002
+ const navLinkBorderRadiusSchema = z.enum([
2003
+ "none",
2004
+ "sm",
2005
+ "md",
2006
+ "full"
2007
+ ]);
2008
+ /**
2009
+ * Typography size options for nav links.
2010
+ */
2011
+ const navLinkTextSizeSchema = z.enum([
2012
+ "xs",
2013
+ "sm",
2014
+ "base",
2015
+ "lg",
2016
+ "xl"
2017
+ ]);
2018
+ /**
2019
+ * Letter spacing options for nav links.
2020
+ */
2021
+ const navLinkLetterSpacingSchema = z.enum([
2022
+ "normal",
2023
+ "wide",
2024
+ "wider",
2025
+ "widest"
2026
+ ]);
2027
+ /**
2028
+ * Optional legibility aid for nav text that floats over uncertain imagery or color.
2029
+ */
2030
+ const navLinkContrastTreatmentSchema = z.enum(["none", "soft-glow"]);
2031
+ /**
2032
+ * Nav link style schema
2033
+ *
2034
+ * Extends interactive typography base with nav-specific settings.
2035
+ */
2036
+ const navLinkStyleSchema = z.object({
2037
+ /** Display name for the style */
2038
+ name: z.string().min(1).max(30).optional(),
2039
+ /** Typography settings (inherited from interactive base) */
2040
+ ...interactiveTypographySchema.shape,
2041
+ /** Text color token */
2042
+ colorToken: themeColorTokenSchema.default("text"),
2043
+ /** Optional text size override */
2044
+ textSize: navLinkTextSizeSchema.optional(),
2045
+ /** Optional letter spacing override */
2046
+ letterSpacing: navLinkLetterSpacingSchema.optional(),
2047
+ /** Optional text-only contrast treatment for transparent/overlay navigation */
2048
+ contrastTreatment: navLinkContrastTreatmentSchema.optional(),
2049
+ /** Hover/active color token (for color-change effects) */
2050
+ hoverColorToken: themeColorTokenSchema.nullable().optional(),
2051
+ /** Padding preset */
2052
+ padding: navLinkPaddingSchema.default("compact"),
2053
+ /** Horizontal padding override (overrides horizontal component of padding preset) */
2054
+ paddingX: navLinkPaddingXSchema.optional(),
2055
+ /** Border radius (for capsule/pill styles) */
2056
+ borderRadius: navLinkBorderRadiusSchema.default("none"),
2057
+ /** Composable effects */
2058
+ effects: effectCompositionSchema.optional()
2059
+ });
2060
+ //#endregion
2061
+ //#region ../site-contracts/src/theme/gradients.ts
2062
+ /**
2063
+ * Gradient color stop
2064
+ */
2065
+ const gradientStopSchema = z.object({
2066
+ color: themeColorTokenSchema,
2067
+ position: z.number().min(0).max(100)
2068
+ });
2069
+ /**
2070
+ * Radial gradient shape. Optional; defaults to `circle` (the historical shape)
2071
+ * so existing radial gradients are byte-identical.
2072
+ *
2073
+ * Named `RadialGradientShape` to avoid clashing with `styles/gradients.ts`'s
2074
+ * `GradientShape` (which names the gradient *kind*: linear/radial/conic).
2075
+ */
2076
+ const radialGradientShapeSchema = z.enum(["circle", "ellipse"]);
2077
+ /**
2078
+ * Gradient configuration.
2079
+ *
2080
+ * `type` is optional and defaults to `'linear'` so gradients persisted without a
2081
+ * type (or with an explicit `'linear'`) render exactly as before. `'radial'` and
2082
+ * `'conic'` are additive kinds:
2083
+ * - linear: `angle` (degrees)
2084
+ * - radial: optional `shape` (circle/ellipse) + `position`
2085
+ * - conic: optional `angle` (from-angle, degrees) + `position`
2086
+ */
2087
+ const gradientConfigSchema = z.object({
2088
+ type: z.enum([
2089
+ "linear",
2090
+ "radial",
2091
+ "conic"
2092
+ ]).default("linear"),
2093
+ angle: z.number().min(0).max(360).optional(),
2094
+ shape: radialGradientShapeSchema.optional(),
2095
+ position: z.string().optional(),
2096
+ stops: z.array(gradientStopSchema).min(2)
2097
+ });
2098
+ const gradientsSchema = z.object({
2099
+ button: z.string().min(1).nullable().optional(),
2100
+ hero: z.string().min(1).nullable().optional(),
2101
+ background: z.string().min(1).nullable().optional()
2102
+ });
2103
+ //#endregion
2104
+ //#region ../site-contracts/src/theme/fonts.ts
2105
+ const fontWeightListSchema = z.array(z.number().int().min(100).max(900));
2106
+ const fontLoadingSchema = z.object({
2107
+ extraBodyFontWeights: fontWeightListSchema.optional(),
2108
+ extraHeadingFontWeights: fontWeightListSchema.optional(),
2109
+ italicBodyFontWeights: fontWeightListSchema.optional(),
2110
+ italicHeadingFontWeights: fontWeightListSchema.optional()
2111
+ });
2112
+ const fontWidthSchema = z.number().finite().positive();
2113
+ /** Curated variable families with a registered width axis, in percentages. */
2114
+ const curatedFontWidths = {
2115
+ Archivo: {
2116
+ min: 62,
2117
+ max: 125
2118
+ },
2119
+ "Instrument Sans": {
2120
+ min: 75,
2121
+ max: 100
2122
+ }
2123
+ };
2124
+ function getFontWidthRange(family) {
2125
+ return curatedFontWidths[(family.split(",")[0] ?? "").trim().replace(/^["']|["']$/g, "")];
2126
+ }
2127
+ //#endregion
2128
+ //#region ../site-contracts/src/theme/typography.ts
2129
+ const typographyStyleSchema = z.object({
2130
+ width: fontWidthSchema.optional(),
2131
+ family: z.string().min(1),
2132
+ weight: z.enum([
2133
+ "light",
2134
+ "regular",
2135
+ "medium",
2136
+ "semibold",
2137
+ "bold"
2138
+ ]),
2139
+ letterSpacing: z.enum([
2140
+ "tight",
2141
+ "normal",
2142
+ "loose"
2143
+ ]),
2144
+ lineHeight: z.enum([
2145
+ "normal",
2146
+ "relaxed",
2147
+ "loose"
2148
+ ])
2149
+ });
2150
+ const bodyTypographyStyleSchema = typographyStyleSchema.extend({ size: z.enum([
2151
+ "md",
2152
+ "lg",
2153
+ "xl"
2154
+ ]) });
2155
+ const headingSizeSchema = z.enum([
2156
+ "xs",
2157
+ "sm",
2158
+ "md",
2159
+ "lg",
2160
+ "xl",
2161
+ "2xl"
2162
+ ]);
2163
+ const headingTypographyOverridesSchema = z.object({
2164
+ width: fontWidthSchema.nullable().optional(),
2165
+ weight: z.enum([
2166
+ "light",
2167
+ "regular",
2168
+ "medium",
2169
+ "semibold",
2170
+ "bold"
2171
+ ]).nullable().optional(),
2172
+ letterSpacing: z.enum([
2173
+ "tight",
2174
+ "normal",
2175
+ "loose"
2176
+ ]).nullable().optional(),
2177
+ size: headingSizeSchema.nullable().optional(),
2178
+ lineHeight: z.enum([
2179
+ "tight",
2180
+ "snug",
2181
+ "normal",
2182
+ "relaxed",
2183
+ "loose"
2184
+ ]).nullable().optional(),
2185
+ italic: z.boolean().nullable().optional(),
2186
+ colorToken: themeColorTokenSchema.nullable().optional()
2187
+ });
2188
+ const headingTypographyStyleSchema = typographyStyleSchema.extend({
2189
+ case: z.enum([
2190
+ "uppercase",
2191
+ "normal",
2192
+ "smallCaps"
2193
+ ]).nullable(),
2194
+ italic: z.boolean().nullable(),
2195
+ colorToken: themeColorTokenSchema.nullable().optional()
2196
+ });
2197
+ const proseLinkUnderlineStyleSchema = z.enum([
2198
+ "solid",
2199
+ "dotted",
2200
+ "dashed"
2201
+ ]);
2202
+ const proseLinkUnderlineThicknessSchema = z.enum([
2203
+ "auto",
2204
+ "fromFont",
2205
+ "thin",
2206
+ "medium",
2207
+ "thick"
2208
+ ]);
2209
+ const proseLinkUnderlineOffsetSchema = z.enum([
2210
+ "auto",
2211
+ "tight",
2212
+ "normal",
2213
+ "loose"
2214
+ ]);
2215
+ const proseLinkStyleSchema = z.object({
2216
+ colorToken: themeColorTokenSchema.optional(),
2217
+ hoverColorToken: themeColorTokenSchema.optional(),
2218
+ underline: z.boolean().optional(),
2219
+ decorationColorToken: themeColorTokenSchema.optional(),
2220
+ hoverDecorationColorToken: themeColorTokenSchema.optional(),
2221
+ underlineStyle: proseLinkUnderlineStyleSchema.optional(),
2222
+ underlineThickness: proseLinkUnderlineThicknessSchema.optional(),
2223
+ underlineOffset: proseLinkUnderlineOffsetSchema.optional()
2224
+ });
2225
+ const typographyScaleSchema = z.enum([
2226
+ "compact",
2227
+ "balanced",
2228
+ "spacious",
2229
+ "minorThird",
2230
+ "majorThird",
2231
+ "perfectFourth"
2232
+ ]);
2233
+ const eyebrowTypographyStyleSchema = z.object({
2234
+ width: fontWidthSchema.optional(),
2235
+ family: z.string().min(1),
2236
+ size: z.enum([
2237
+ "sm",
2238
+ "md",
2239
+ "lg"
2240
+ ]).optional(),
2241
+ weight: z.enum([
2242
+ "light",
2243
+ "regular",
2244
+ "medium",
2245
+ "semibold",
2246
+ "bold"
2247
+ ]).optional(),
2248
+ letterSpacing: z.enum([
2249
+ "tight",
2250
+ "normal",
2251
+ "loose",
2252
+ "wide"
2253
+ ]).optional(),
2254
+ case: z.enum(["uppercase", "normal"]).optional()
2255
+ });
2256
+ const typographySchema = z.object({
2257
+ body: bodyTypographyStyleSchema,
2258
+ smallHeading: z.object({
2259
+ family: z.string().min(1),
2260
+ weight: z.enum([
2261
+ "regular",
2262
+ "medium",
2263
+ "semibold",
2264
+ "bold"
2265
+ ])
2266
+ }).optional(),
2267
+ headings: z.object({
2268
+ default: headingTypographyStyleSchema,
2269
+ h1: headingTypographyOverridesSchema,
2270
+ h2: headingTypographyOverridesSchema,
2271
+ h3: headingTypographyOverridesSchema,
2272
+ h4: headingTypographyOverridesSchema.optional(),
2273
+ h5: headingTypographyOverridesSchema.optional(),
2274
+ h6: headingTypographyOverridesSchema.optional()
2275
+ }),
2276
+ scale: typographyScaleSchema,
2277
+ proseLinkStyle: proseLinkStyleSchema.optional(),
2278
+ eyebrow: eyebrowTypographyStyleSchema.optional()
2279
+ }).superRefine((typography, ctx) => {
2280
+ [
2281
+ {
2282
+ style: typography.body,
2283
+ family: typography.body.family,
2284
+ path: ["body", "width"]
2285
+ },
2286
+ {
2287
+ style: typography.headings.default,
2288
+ family: typography.headings.default.family,
2289
+ path: [
2290
+ "headings",
2291
+ "default",
2292
+ "width"
2293
+ ]
2294
+ },
2295
+ ...[
2296
+ "h1",
2297
+ "h2",
2298
+ "h3",
2299
+ "h4",
2300
+ "h5",
2301
+ "h6"
2302
+ ].map((level) => ({
2303
+ style: typography.headings[level],
2304
+ family: typography.headings.default.family,
2305
+ path: [
2306
+ "headings",
2307
+ level,
2308
+ "width"
2309
+ ]
2310
+ })),
2311
+ {
2312
+ style: typography.eyebrow,
2313
+ family: typography.eyebrow?.family ?? "",
2314
+ path: ["eyebrow", "width"]
2315
+ }
2316
+ ].forEach(({ style, family, path }) => {
2317
+ if (style?.width == null) return;
2318
+ const range = getFontWidthRange(family);
2319
+ if (!range || style.width < range.min || style.width > range.max) ctx.addIssue({
2320
+ code: "custom",
2321
+ path,
2322
+ message: range ? `Font width must be between ${range.min}% and ${range.max}% for ${family}.` : `Font width is not declared for ${family}.`
2323
+ });
2324
+ });
2325
+ });
2326
+ //#endregion
2327
+ //#region ../site-contracts/src/theme/componentStyles.ts
2328
+ /**
2329
+ * Shared Component Style Schemas
2330
+ *
2331
+ * Reusable schemas for border and shadow styling that can be shared across
2332
+ * themed components (header, buttons, cards, accordions, inputs).
2333
+ *
2334
+ * Design decisions:
2335
+ * - Shadow elevation uses CSS-aligned names (none/sm/md/lg/xl/2xl)
2336
+ * - Shadow softness is controlled globally, not per-component
2337
+ * - Border position is component-specific, not in shared schema
2338
+ */
2339
+ /**
2340
+ * Shared border schema for themed components.
2341
+ * Position is excluded - each component determines its own border position.
2342
+ */
2343
+ const componentBorderSchema = z.object({
2344
+ width: z.enum([
2345
+ "none",
2346
+ "hairline",
2347
+ "thin",
2348
+ "medium",
2349
+ "thick"
2350
+ ]).default("none"),
2351
+ style: z.enum(["solid", "dashed"]).default("solid"),
2352
+ colorToken: themeColorTokenSchema.optional()
2353
+ });
2354
+ /**
2355
+ * Shared shadow schema for themed components.
2356
+ * Softness is inherited from global theme, not configurable per-component.
2357
+ */
2358
+ const componentShadowSchema = z.object({ elevation: z.enum([
2359
+ "none",
2360
+ "sm",
2361
+ "md",
2362
+ "lg",
2363
+ "xl",
2364
+ "2xl"
2365
+ ]).default("sm") });
2366
+ //#endregion
1676
2367
  //#region ../site-contracts/src/theme/tokenOrColor.ts
1677
2368
  /**
1678
2369
  * Runtime color-reference fields intentionally accept any string, including
@@ -1761,19 +2452,986 @@ const runtimeBoxBackgroundSchema = z.discriminatedUnion("type", [
1761
2452
  assetMediaSchema.extend({ type: z.literal("video") })
1762
2453
  ]).nullable().optional() })
1763
2454
  ]);
1764
- function normalizeAuthoringOpacity(value) {
1765
- if (!isRecord$3(value)) return value;
1766
- return {
1767
- ...value,
1768
- opacity: normalizeOpacity(value.opacity)
1769
- };
1770
- }
1771
- function normalizeOpacity(value) {
1772
- return typeof value === "number" && value > 1 && value <= 100 ? value / 100 : value;
1773
- }
1774
- function isRecord$3(value) {
1775
- return typeof value === "object" && value !== null && !Array.isArray(value);
1776
- }
2455
+ function normalizeAuthoringOpacity(value) {
2456
+ if (!isRecord$3(value)) return value;
2457
+ return {
2458
+ ...value,
2459
+ opacity: normalizeOpacity(value.opacity)
2460
+ };
2461
+ }
2462
+ function normalizeOpacity(value) {
2463
+ return typeof value === "number" && value > 1 && value <= 100 ? value / 100 : value;
2464
+ }
2465
+ function isRecord$3(value) {
2466
+ return typeof value === "object" && value !== null && !Array.isArray(value);
2467
+ }
2468
+ //#endregion
2469
+ //#region ../site-contracts/src/theme/customCss.ts
2470
+ /** Global selectors that could affect elements outside theme scope */
2471
+ const FORBIDDEN_SELECTORS = [
2472
+ ":root",
2473
+ "html",
2474
+ "body"
2475
+ ];
2476
+ /** Universal selector - forbidden because it affects everything */
2477
+ const UNIVERSAL_SELECTOR = "*";
2478
+ /** Pattern to detect remote URL references (http://, https://, //) */
2479
+ const REMOTE_URL_PATTERN = /url\s*\(\s*['"]?(https?:|\/\/)/i;
2480
+ /** Pattern to detect javascript: URLs */
2481
+ const JAVASCRIPT_URL_PATTERN = /javascript\s*:/i;
2482
+ /**
2483
+ * Check if a single selector part (no commas) is forbidden.
2484
+ */
2485
+ function isForbiddenSelectorPart(part) {
2486
+ const normalized = part.toLowerCase().trim();
2487
+ if (!normalized) return true;
2488
+ if (normalized === UNIVERSAL_SELECTOR || normalized.startsWith("* ") || normalized.endsWith(" *") || normalized.includes(" * ")) return true;
2489
+ return FORBIDDEN_SELECTORS.some((forbidden) => normalized === forbidden || [
2490
+ " ",
2491
+ ">",
2492
+ "+",
2493
+ "~",
2494
+ ".",
2495
+ "#",
2496
+ "["
2497
+ ].some((suffix) => normalized.startsWith(forbidden + suffix)) || normalized.startsWith(forbidden + ":") && !normalized.startsWith(forbidden + "::"));
2498
+ }
2499
+ /**
2500
+ * Check if a selector uses sibling combinators with & that could escape scope.
2501
+ * Patterns like "& ~ .outside" or "& + .sibling" can select elements outside the scope.
2502
+ */
2503
+ function hasScopeEscapingSiblingCombinator(selector) {
2504
+ const normalized = selector.trim();
2505
+ return /&\s*[+~]/.test(normalized);
2506
+ }
2507
+ /**
2508
+ * Check if a selector contains forbidden global selectors.
2509
+ * Handles selectors like ":root", "html body", "body.class", "body, .x", etc.
2510
+ */
2511
+ function containsForbiddenSelector(selector) {
2512
+ const normalized = selector.toLowerCase().trim();
2513
+ if (!normalized) return true;
2514
+ if (hasScopeEscapingSiblingCombinator(selector)) return true;
2515
+ return normalized.split(",").some(isForbiddenSelectorPart);
2516
+ }
2517
+ /**
2518
+ * Validates a CSS selector for safety.
2519
+ */
2520
+ const selectorSchema = z.string().min(1, "Selector cannot be empty").max(200, "Selector too long (max 200 characters)").refine((s) => !containsForbiddenSelector(s), { message: "Global selectors (:root, html, body, *) are not allowed" });
2521
+ /**
2522
+ * Check if a CSS value contains a remote URL.
2523
+ */
2524
+ function containsRemoteUrl(value) {
2525
+ return REMOTE_URL_PATTERN.test(value);
2526
+ }
2527
+ /**
2528
+ * Check if a CSS value contains a javascript: URL.
2529
+ */
2530
+ function containsJavascriptUrl(value) {
2531
+ return JAVASCRIPT_URL_PATTERN.test(value);
2532
+ }
2533
+ /**
2534
+ * Validates a CSS declaration value for safety.
2535
+ * Allows: url(#id), url(data:...), url(/path), var(--)
2536
+ * Forbids: url(http...), url(//...), javascript:
2537
+ */
2538
+ const declarationValueSchema = z.string().max(500, "Declaration value too long (max 500 characters)").refine((v) => !containsRemoteUrl(v), { message: "Remote url() references are not allowed. Use local paths, data URIs, or fragment IDs." }).refine((v) => !containsJavascriptUrl(v), { message: "javascript: URLs are not allowed" });
2539
+ /**
2540
+ * Schema for CSS declarations object (property -> value map).
2541
+ */
2542
+ const declarationsSchema = z.record(z.string().min(1).max(100), declarationValueSchema);
2543
+ /**
2544
+ * Schema for a single custom CSS rule.
2545
+ */
2546
+ const customCssRuleSchema = z.object({
2547
+ id: z.string().min(1, "Rule ID is required").max(50, "Rule ID too long"),
2548
+ selector: selectorSchema,
2549
+ declarations: declarationsSchema
2550
+ });
2551
+ /**
2552
+ * Schema for block-specific CSS rule.
2553
+ */
2554
+ const blockCustomCssRuleSchema = customCssRuleSchema.extend({ blockKind: z.string().min(1, "Block kind is required").max(50, "Block kind too long") });
2555
+ /**
2556
+ * Array of custom CSS rules for theme-level styling.
2557
+ */
2558
+ const customCssRulesSchema = z.array(customCssRuleSchema).optional();
2559
+ /**
2560
+ * Array of block-specific CSS rules.
2561
+ */
2562
+ const blockCustomCssRulesSchema = z.array(blockCustomCssRuleSchema).optional();
2563
+ //#endregion
2564
+ //#region ../site-contracts/src/theme/customCssAtRules.ts
2565
+ /** Valid keyframe offset values - requires % for numeric values */
2566
+ const KEYFRAME_OFFSET_PATTERN = /^(from|to|\d{1,3}%)$/i;
2567
+ /** Valid animation name (CSS identifier) */
2568
+ const ANIMATION_NAME_PATTERN = /^[a-zA-Z_-][a-zA-Z0-9_-]*$/;
2569
+ /** Blocked at-rules in raw CSS */
2570
+ const BLOCKED_AT_RULES = ["@import", "@charset"];
2571
+ /** Pattern to detect blocked at-rules */
2572
+ const BLOCKED_AT_RULE_PATTERN = /@(?:import|charset)\b/i;
2573
+ /** Rule ID schema - reused from main validation */
2574
+ const ruleIdSchema = z.string().min(1, "Rule ID is required").max(50, "Rule ID too long");
2575
+ /** Nested rule schema for @media and @supports */
2576
+ const nestedRuleSchema = z.object({
2577
+ selector: selectorSchema,
2578
+ declarations: declarationsSchema
2579
+ });
2580
+ /**
2581
+ * Validate keyframe offset is in valid range (0-100%).
2582
+ * Returns true for 'from', 'to', or numeric values 0-100.
2583
+ */
2584
+ function isValidKeyframeOffset(offset) {
2585
+ const trimmed = offset.trim().toLowerCase();
2586
+ if (trimmed === "from" || trimmed === "to") return true;
2587
+ const match = trimmed.match(/^(\d{1,3})%$/);
2588
+ if (!match || match[1] === void 0) return false;
2589
+ const value = parseInt(match[1], 10);
2590
+ return value >= 0 && value <= 100;
2591
+ }
2592
+ /** Keyframe offset validation (0%, 50%, 100%, from, to) */
2593
+ const keyframeOffsetSchema = z.string().transform((offset) => offset.trim()).refine((offset) => KEYFRAME_OFFSET_PATTERN.test(offset), { message: "Invalid keyframe offset. Use percentages (0%, 50%, 100%) or \"from\"/\"to\"" }).refine(isValidKeyframeOffset, { message: "Keyframe offset must be between 0% and 100%" });
2594
+ /** Animation name validation (CSS identifier) */
2595
+ const animationNameSchema = z.string().min(1, "Animation name is required").max(50, "Animation name too long").refine((name) => ANIMATION_NAME_PATTERN.test(name), { message: "Invalid animation name. Use letters, numbers, dashes, underscores (start with letter, dash, or underscore)" });
2596
+ /** Single keyframe (offset + declarations) */
2597
+ const keyframeSchema = z.object({
2598
+ offset: keyframeOffsetSchema,
2599
+ declarations: declarationsSchema
2600
+ });
2601
+ /** @keyframes rule schema */
2602
+ const keyframesAtRuleSchema = z.object({
2603
+ id: ruleIdSchema,
2604
+ type: z.literal("keyframes"),
2605
+ name: animationNameSchema,
2606
+ frames: z.array(keyframeSchema).min(1, "At least one keyframe is required")
2607
+ });
2608
+ /** Font-face declarations - uses standard declarations but with font-specific validation */
2609
+ const fontFaceDeclarationsSchema = z.record(z.string().min(1).max(100), declarationValueSchema).refine((decls) => "fontFamily" in decls || "font-family" in decls, { message: "font-family is required in @font-face" });
2610
+ /** @font-face rule schema */
2611
+ const fontFaceAtRuleSchema = z.object({
2612
+ id: ruleIdSchema,
2613
+ type: z.literal("font-face"),
2614
+ declarations: fontFaceDeclarationsSchema
2615
+ });
2616
+ /** Media query string validation */
2617
+ const mediaQuerySchema = z.string().min(1, "Media query is required").max(200, "Media query too long");
2618
+ /** @media rule schema */
2619
+ const mediaAtRuleSchema = z.object({
2620
+ id: ruleIdSchema,
2621
+ type: z.literal("media"),
2622
+ query: mediaQuerySchema,
2623
+ rules: z.array(nestedRuleSchema).min(1, "At least one rule is required")
2624
+ });
2625
+ /** Supports condition string validation */
2626
+ const supportsConditionSchema = z.string().min(1, "Supports condition is required").max(200, "Supports condition too long");
2627
+ /** @supports rule schema */
2628
+ const supportsAtRuleSchema = z.object({
2629
+ id: ruleIdSchema,
2630
+ type: z.literal("supports"),
2631
+ condition: supportsConditionSchema,
2632
+ rules: z.array(nestedRuleSchema).min(1, "At least one rule is required")
2633
+ });
2634
+ /**
2635
+ * Check if raw CSS contains blocked at-rules.
2636
+ */
2637
+ function containsBlockedAtRule(css) {
2638
+ return BLOCKED_AT_RULE_PATTERN.test(css);
2639
+ }
2640
+ /** Raw CSS validation - blocks @import, @charset, must start with @ */
2641
+ const rawCssSchema = z.string().min(1, "CSS is required").max(5e3, "Raw CSS too long (max 5000 characters)").refine((css) => css.trim().startsWith("@"), { message: "Raw at-rule must start with @" }).refine((css) => !containsBlockedAtRule(css), { message: `Blocked at-rules: ${BLOCKED_AT_RULES.join(", ")}. Use typed at-rules or local assets instead.` });
2642
+ /** Raw at-rule schema */
2643
+ const rawAtRuleSchema = z.object({
2644
+ id: ruleIdSchema,
2645
+ type: z.literal("raw"),
2646
+ css: rawCssSchema
2647
+ });
2648
+ /**
2649
+ * Discriminated union schema for all at-rule types.
2650
+ */
2651
+ const customCssAtRuleSchema = z.discriminatedUnion("type", [
2652
+ keyframesAtRuleSchema,
2653
+ fontFaceAtRuleSchema,
2654
+ mediaAtRuleSchema,
2655
+ supportsAtRuleSchema,
2656
+ rawAtRuleSchema
2657
+ ]);
2658
+ /**
2659
+ * Array of at-rules for theme-level styling.
2660
+ */
2661
+ const customCssAtRulesSchema = z.array(customCssAtRuleSchema).optional();
2662
+ //#endregion
2663
+ //#region ../site-contracts/src/theme/headerContainer.ts
2664
+ const headerContainerSchema = z.object({
2665
+ rounded: z.enum([
2666
+ "none",
2667
+ "sm",
2668
+ "md",
2669
+ "lg",
2670
+ "xl",
2671
+ "2xl"
2672
+ ]).default("xl"),
2673
+ border: z.boolean().default(true),
2674
+ shadow: z.boolean().default(true),
2675
+ padding: z.enum([
2676
+ "sm",
2677
+ "md",
2678
+ "lg"
2679
+ ]).default("md"),
2680
+ tint: z.string().nullable().optional(),
2681
+ mobileSheet: z.literal("inset").optional(),
2682
+ opacity: z.number().min(0).max(1).default(.12)
2683
+ }).optional();
2684
+ //#endregion
2685
+ //#region ../site-contracts/src/theme/headerInteraction.ts
2686
+ /**
2687
+ * The palettes that fill the nav link with a colour on hover and focus. Each
2688
+ * one names a background/foreground token pair.
2689
+ */
2690
+ const headerInteractionPillPaletteValues = [
2691
+ "primary",
2692
+ "secondary",
2693
+ "accent"
2694
+ ];
2695
+ /**
2696
+ * "No pill": a colour change on hover rather than a filled background.
2697
+ *
2698
+ * The palette step writes nothing (#1318 Phase 4c decision 2), but on a
2699
+ * foreground-adaptive style that is not the end of the story: the hover colour
2700
+ * is derived from the resolved opening foreground at render time, paired with
2701
+ * the resting colour, so `quiet` resolves to a definite colour rather than to
2702
+ * whatever brand token the recipe happened to name. See
2703
+ * `applyOpeningForeground`.
2704
+ *
2705
+ * It exists because "a colour change on hover, no filled background" was not
2706
+ * expressible in the vocabulary, and it is what
2707
+ * `anna-raven-therapy-and-yoga` and `kirtan-lucy` have rendered since before
2708
+ * the palette existed. Without it those two rows can only be classified as a
2709
+ * conscious visual change.
2710
+ */
2711
+ const headerInteractionQuietPalette = "quiet";
2712
+ const headerInteractionPaletteValues = [...headerInteractionPillPaletteValues, headerInteractionQuietPalette];
2713
+ const headerInteractionPaletteSchema = z.enum(headerInteractionPaletteValues);
2714
+ //#endregion
2715
+ //#region ../site-contracts/src/theme/headerScroll.ts
2716
+ const headerScrollTreatmentSchema = z.discriminatedUnion("kind", [z.object({
2717
+ kind: z.literal("contrast-glass"),
2718
+ backgroundTone: z.enum(["light", "dark"])
2719
+ })]).optional();
2720
+ //#endregion
2721
+ //#region ../site-contracts/src/theme/headerVariant.ts
2722
+ /**
2723
+ * The header variants the system actually renders.
2724
+ *
2725
+ * Each one has a layout row in the site-header block and a paint target in
2726
+ * `paintTargets.ts`. This is the canonical list: the block transform's variant
2727
+ * class allowlist and the AI theme generator's enum both derive from it, so
2728
+ * they cannot drift.
2729
+ */
2730
+ const headerVariantValues = [
2731
+ "classic",
2732
+ "centered",
2733
+ "floating"
2734
+ ];
2735
+ z.enum(headerVariantValues);
2736
+ /**
2737
+ * Header variant spellings that were once authorable but no longer name a
2738
+ * layout of their own, and the variant they read as now.
2739
+ *
2740
+ * `transparent` was an overlay header with no CSS of its own: everything it
2741
+ * did (transparent root background, overlay content flow) is what `floating`
2742
+ * already does, and it had zero persisted usage in production or locally when
2743
+ * it was retired. It survives here as a one-boundary alias so a theme authored
2744
+ * against the old vocabulary still parses.
2745
+ *
2746
+ * This matters because the theme schema is strict and has no per-field
2747
+ * `.catch()`: an out-of-enum variant fails `themeSchema.safeParse` for the
2748
+ * *whole* theme, which silently swaps the site's theme for
2749
+ * `modernMinimalTheme`. Aliasing here keeps that from happening.
2750
+ */
2751
+ const legacyHeaderVariants = { transparent: "floating" };
2752
+ const legacyHeaderVariantValues = Object.keys(legacyHeaderVariants);
2753
+ /**
2754
+ * The header variant boundary for themes that go through `themeSchema`:
2755
+ * canonical variants pass through, legacy spellings normalize to the variant
2756
+ * they meant, everything else fails the parse.
2757
+ *
2758
+ * Deliberately an enum plus a transform rather than a `z.preprocess`, so the
2759
+ * schema's *input* type stays an accurate union (the legacy spelling is still
2760
+ * accepted on the wire) instead of widening to `unknown`. `SdkThemeWire` in
2761
+ * `@riverbankcms/api` is `z.input<typeof themeSchema>`, so a widened input here
2762
+ * would leak straight into a public type.
2763
+ *
2764
+ * Persisted runtime themes are admitted through `parseThemeForPersistence`
2765
+ * before reaching consumers, so legacy spellings normalize at that boundary.
2766
+ */
2767
+ const headerVariantWithLegacyAliasSchema = z.enum([...headerVariantValues, ...legacyHeaderVariantValues]).transform((value) => value in legacyHeaderVariants ? legacyHeaderVariants[value] : value);
2768
+ //#endregion
2769
+ //#region ../site-contracts/src/theme/logoFacts.ts
2770
+ const brandDisplayModeValues = [
2771
+ "auto",
2772
+ "logo-only",
2773
+ "logo-plus-title",
2774
+ "title-only"
2775
+ ];
2776
+ const logoAccommodationPatternValues = [
2777
+ "title-only",
2778
+ "inline-logo-only",
2779
+ "inline-wordmark",
2780
+ "inline-mark-with-title",
2781
+ "logo-plate",
2782
+ "centered-badge",
2783
+ "popout-badge",
2784
+ "centered-masthead",
2785
+ "hero-badge"
2786
+ ];
2787
+ const logoSizePolicyValues = [
2788
+ "auto",
2789
+ "compact",
2790
+ "standard",
2791
+ "generous",
2792
+ "display"
2793
+ ];
2794
+ //#endregion
2795
+ //#region ../site-contracts/src/theme/colourSeeds.ts
2796
+ /** Owner colours in priority order, validated once at the input boundary. */
2797
+ const colourSeedsSchema = z.union([z.tuple([hexColorSchema]), z.tuple([hexColorSchema, hexColorSchema])]).refine((seeds) => seeds.length === 1 || seeds[0] !== seeds[1], { message: "Choose distinct colours" });
2798
+ //#endregion
2799
+ //#region ../site-contracts/src/theme/palette.ts
2800
+ const colourHexString = z.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
2801
+ const paletteColorSchema = z.object({
2802
+ name: z.string().min(1),
2803
+ hex: colourHexString
2804
+ });
2805
+ const paletteMetaSchema = z.object({
2806
+ mode: z.enum(["light", "dark"]),
2807
+ seeds: colourSeedsSchema.optional()
2808
+ });
2809
+ const paletteSchema = z.object({
2810
+ colors: z.array(paletteColorSchema),
2811
+ meta: paletteMetaSchema
2812
+ }).transform((palette, ctx) => {
2813
+ const colors = paletteColorsFromEntries(palette.colors);
2814
+ if (!colors.ok) {
2815
+ ctx.addIssue({
2816
+ code: "custom",
2817
+ message: `Invalid complete palette: ${colors.error.kind}`
2818
+ });
2819
+ return z.NEVER;
2820
+ }
2821
+ return {
2822
+ colors: paletteColorEntries(colors.colors).map(({ name, hex }) => ({
2823
+ name: String(name),
2824
+ hex: String(hex)
2825
+ })),
2826
+ meta: palette.meta
2827
+ };
2828
+ });
2829
+ const skinTokensSchema = z.partialRecord(z.enum([
2830
+ "radius",
2831
+ "rule",
2832
+ "mark-length",
2833
+ "mark-weight",
2834
+ "plate",
2835
+ "gutter",
2836
+ "copy-gap",
2837
+ "stack-gap",
2838
+ "shadow-offset",
2839
+ "rotation",
2840
+ "wrap",
2841
+ "margin",
2842
+ "rail",
2843
+ "main"
2844
+ ]), z.string()).superRefine((tokens, context) => {
2845
+ Object.entries(tokens).forEach(([name, value]) => {
2846
+ if (!(name === "rail" || name === "main" ? /^(?:[1-9]|1[0-2])$/.test(value) : /^-?(?:0|\d+(?:\.\d+)?(?:px|rem|em|deg|%))$/.test(value))) context.addIssue({
2847
+ code: "custom",
2848
+ path: [name],
2849
+ message: "Invalid skin measurement"
2850
+ });
2851
+ });
2852
+ });
2853
+ const skinMarksSchema = z.enum(["primary"]);
2854
+ /** The booking bar's paint and shape as applied from an arrangement style (issue 1659); the plain bar when absent. */
2855
+ const skinBookingBarSchema = z.object({
2856
+ token: z.string().refine((value) => {
2857
+ const parts = parseColorTokenParts(value);
2858
+ return parts.kind === "token" && parts.opacityPercent === null && parts.token === value && isThemeColorToken(value);
2859
+ }, "Expected a plain Theme V2 colour token, without spaces or opacity"),
2860
+ shape: z.enum(["edge-to-edge", "field"])
2861
+ });
2862
+ const themeLookMetadataSchema = z.object({
2863
+ name: z.string().min(1).max(30),
2864
+ description: z.string().min(1).max(400),
2865
+ rationale: z.string().min(1).max(400),
2866
+ siteStyleId: z.string().min(1).transform(asSiteStyleId).optional(),
2867
+ skin: z.string().min(1).optional(),
2868
+ skinTokens: skinTokensSchema.optional(),
2869
+ fontLoading: fontLoadingSchema.optional(),
2870
+ /** Which palette colour an arrangement style derives its graphic marks from (D9); accent when absent. */
2871
+ skinMarks: skinMarksSchema.optional(),
2872
+ skinBookingBar: skinBookingBarSchema.optional()
2873
+ });
2874
+ //#endregion
2875
+ //#region ../site-contracts/src/theme/schema.ts
2876
+ const axesSchema = z.object({
2877
+ tone: z.enum([
2878
+ "minimal",
2879
+ "classic",
2880
+ "bold"
2881
+ ]),
2882
+ energy: z.enum(["calm", "vibrant"]),
2883
+ density: z.enum([
2884
+ "airy",
2885
+ "regular",
2886
+ "compact"
2887
+ ]),
2888
+ mediaBias: z.enum([
2889
+ "text",
2890
+ "media",
2891
+ "mixed"
2892
+ ]),
2893
+ conversionBias: z.enum([
2894
+ "low",
2895
+ "med",
2896
+ "high"
2897
+ ]),
2898
+ motion: z.enum([
2899
+ "subtle",
2900
+ "standard",
2901
+ "expressive"
2902
+ ])
2903
+ });
2904
+ const semanticSpacingSchema = z.enum([
2905
+ "none",
2906
+ "compact",
2907
+ "cozy",
2908
+ "medium",
2909
+ "comfortable",
2910
+ "spacious"
2911
+ ]);
2912
+ const boxRoundedSchema = z.enum([
2913
+ "none",
2914
+ "sm",
2915
+ "md",
2916
+ "lg",
2917
+ "xl",
2918
+ "2xl",
2919
+ "full"
2920
+ ]);
2921
+ const noHeadingDecorationSchema = z.strictObject({ family: z.literal("none") });
2922
+ const visibleHeadingDecorationSchema = z.strictObject({
2923
+ family: z.enum(visibleHeadingDecorationFamilyValues),
2924
+ colorToken: z.enum(headingDecorationColorTokenValues).optional()
2925
+ });
2926
+ const headingDecorationSchema = z.union([noHeadingDecorationSchema, visibleHeadingDecorationSchema]);
2927
+ const headingDecorationOverrideSchema = z.enum(headingDecorationOverrideValues);
2928
+ const accordionIconTreatmentSchema = z.object({
2929
+ iconSet: z.enum(accordionIconSetValues),
2930
+ colorToken: z.enum(accordionIconColorTokenValues),
2931
+ openColorToken: z.enum(accordionIconColorTokenValues).optional(),
2932
+ motion: z.enum(accordionIconMotionValues)
2933
+ });
2934
+ const sectionStylesOverrideSchema = z.object({
2935
+ background: boxBackgroundSchema.nullable().optional(),
2936
+ spacing: semanticSpacingSchema.nullable().optional(),
2937
+ minHeight: z.enum([
2938
+ "none",
2939
+ "banner",
2940
+ "hero",
2941
+ "immersive"
2942
+ ]).nullable().optional(),
2943
+ tileTreatment: z.enum(tileTreatmentValues).nullable().optional(),
2944
+ eventListTreatment: z.enum(eventListTreatmentValues).nullable().optional(),
2945
+ eyebrowTreatment: z.enum(eyebrowTreatmentValues).nullable().optional(),
2946
+ headingDecoration: headingDecorationSchema.nullable().optional(),
2947
+ headingDecorationOverride: headingDecorationOverrideSchema.nullable().optional(),
2948
+ accordionIconTreatment: accordionIconTreatmentSchema.nullable().optional()
2949
+ });
2950
+ const containerStylesOverrideSchema = z.object({
2951
+ background: boxBackgroundSchema.nullable().optional(),
2952
+ spacing: semanticSpacingSchema.nullable().optional(),
2953
+ raised: z.boolean().nullable().optional(),
2954
+ rounded: boxRoundedSchema.nullable().optional(),
2955
+ fullWidth: z.boolean().nullable().optional()
2956
+ });
2957
+ const cardBorderOverrideSchema = z.object({
2958
+ enabled: z.boolean().nullable().optional(),
2959
+ width: z.enum([
2960
+ "none",
2961
+ "1",
2962
+ "2",
2963
+ "3"
2964
+ ]).nullable().optional(),
2965
+ colorToken: themeColorTokenSchema.nullable().optional()
2966
+ });
2967
+ const cardStylesOverrideSchema = z.object({
2968
+ background: boxBackgroundSchema.nullable().optional(),
2969
+ border: cardBorderOverrideSchema.nullable().optional(),
2970
+ spacing: semanticSpacingSchema.nullable().optional(),
2971
+ raised: z.boolean().nullable().optional(),
2972
+ rounded: boxRoundedSchema.nullable().optional(),
2973
+ role: cardRoleSchema.nullable().optional()
2974
+ });
2975
+ const blockStyleOverridesSchema = z.object({
2976
+ sectionStyles: sectionStylesOverrideSchema.nullable().optional(),
2977
+ containerStyles: containerStylesOverrideSchema.nullable().optional(),
2978
+ cardStyles: cardStylesOverrideSchema.nullable().optional()
2979
+ });
2980
+ const blockThemeOverrideSchema = z.object({
2981
+ typography: z.object({ proseLinkStyle: proseLinkStyleSchema.optional() }).optional(),
2982
+ styles: blockStyleOverridesSchema.optional()
2983
+ });
2984
+ const spaceSchema = z.enum([
2985
+ "comfortable",
2986
+ "standard",
2987
+ "dense"
2988
+ ]);
2989
+ const corners = z.enum([
2990
+ "square",
2991
+ "soft",
2992
+ "rounded",
2993
+ "pill"
2994
+ ]);
2995
+ const shadow = z.object({
2996
+ elevation: z.enum([
2997
+ "none",
2998
+ "low",
2999
+ "medium",
3000
+ "high"
3001
+ ]),
3002
+ softness: z.enum([
3003
+ "crisp",
3004
+ "soft",
3005
+ "hard"
3006
+ ]).nullable(),
3007
+ position: z.enum(["bottom", "bottom-right"]).default("bottom"),
3008
+ colorToken: themeColorTokenSchema.optional()
3009
+ });
3010
+ const border = z.object({
3011
+ width: z.enum([
3012
+ "none",
3013
+ "hairline",
3014
+ "thin",
3015
+ "thick"
3016
+ ]),
3017
+ style: z.enum(["solid", "dashed"])
3018
+ });
3019
+ const motion = z.object({
3020
+ level: z.enum([
3021
+ "off",
3022
+ "low",
3023
+ "medium",
3024
+ "high"
3025
+ ]),
3026
+ easing: z.enum([
3027
+ "standard",
3028
+ "snappy",
3029
+ "gentle"
3030
+ ]).nullable()
3031
+ });
3032
+ z.object({ shape: corners });
3033
+ const inputStyle = z.object({
3034
+ shape: corners,
3035
+ border: z.enum([
3036
+ "subtle",
3037
+ "defined",
3038
+ "underline"
3039
+ ]),
3040
+ focus: z.enum([
3041
+ "glow",
3042
+ "ring",
3043
+ "underline"
3044
+ ]),
3045
+ label: z.enum(["inside", "above"])
3046
+ });
3047
+ const headerPositioning = z.enum([
3048
+ "static",
3049
+ "sticky",
3050
+ "fixed"
3051
+ ]);
3052
+ const headerNavStyle = z.enum([
3053
+ "minimal",
3054
+ "underline",
3055
+ "underline-grow",
3056
+ "capsule",
3057
+ "scale",
3058
+ "frosted",
3059
+ "solid"
3060
+ ]);
3061
+ const navFontWeight = z.enum([
3062
+ "regular",
3063
+ "medium",
3064
+ "semibold",
3065
+ "bold"
3066
+ ]);
3067
+ const headerMaxWidth = z.enum(["container", "full"]);
3068
+ const headerBorderSchema = componentBorderSchema.extend({ position: z.enum([
3069
+ "bottom",
3070
+ "top",
3071
+ "both",
3072
+ "none"
3073
+ ]).default("bottom") }).optional();
3074
+ const logoStyleSchema = z.object({
3075
+ fontFamily: z.enum(["heading", "body"]).default("heading"),
3076
+ letterSpacing: z.enum([
3077
+ "normal",
3078
+ "wide",
3079
+ "wider",
3080
+ "widest"
3081
+ ]).default("normal"),
3082
+ gradient: z.boolean().default(false),
3083
+ brandDisplay: z.enum(brandDisplayModeValues).optional(),
3084
+ size: z.enum(logoSizePolicyValues).optional(),
3085
+ accommodation: z.enum(logoAccommodationPatternValues).optional()
3086
+ }).optional();
3087
+ const headerLogoTextSchema = z.object({
3088
+ mobileWrapLines: z.union([z.literal(1), z.literal(2)]).optional(),
3089
+ mobileMaxWidth: z.enum([
3090
+ "xs",
3091
+ "sm",
3092
+ "md"
3093
+ ]).optional(),
3094
+ hideOnShrink: z.boolean().optional()
3095
+ }).optional();
3096
+ const dropdownStyleSchema = z.object({
3097
+ background: themeColorTokenSchema.default("surface"),
3098
+ textColor: themeColorTokenSchema.default("text"),
3099
+ borderColor: themeColorTokenSchema.nullable().default("border"),
3100
+ shadow: z.enum([
3101
+ "none",
3102
+ "sm",
3103
+ "md",
3104
+ "lg"
3105
+ ]).default("md"),
3106
+ borderRadius: z.enum([
3107
+ "none",
3108
+ "sm",
3109
+ "md",
3110
+ "lg"
3111
+ ]).default("md"),
3112
+ surfaceTreatment: z.discriminatedUnion("kind", [z.object({ kind: z.literal("solid") }), z.object({
3113
+ kind: z.literal("frosted"),
3114
+ tone: z.enum(["fixed", "opening"]),
3115
+ opacity: z.number().min(0).max(1),
3116
+ blur: z.enum(["sm", "md"])
3117
+ })]).optional(),
3118
+ hoverBackground: themeColorTokenSchema.nullable().optional(),
3119
+ hoverTextColor: themeColorTokenSchema.nullable().optional(),
3120
+ textTransform: z.enum([
3121
+ "none",
3122
+ "uppercase",
3123
+ "capitalize"
3124
+ ]).default("none"),
3125
+ letterSpacing: z.enum([
3126
+ "normal",
3127
+ "wide",
3128
+ "wider"
3129
+ ]).default("normal"),
3130
+ fontWeight: z.enum([
3131
+ "regular",
3132
+ "medium",
3133
+ "semibold",
3134
+ "bold"
3135
+ ]).optional(),
3136
+ textSize: z.enum([
3137
+ "xs",
3138
+ "sm",
3139
+ "base",
3140
+ "lg"
3141
+ ]).optional()
3142
+ }).optional();
3143
+ /**
3144
+ * CTA button gap (left margin) for desktop header.
3145
+ * Controls the spacing between nav links and the CTA button.
3146
+ */
3147
+ const headerCtaGapSchema = z.enum([
3148
+ "none",
3149
+ "tight",
3150
+ "compact",
3151
+ "default",
3152
+ "relaxed",
3153
+ "spacious"
3154
+ ]);
3155
+ const headerCtaTreatmentSchema = z.enum([
3156
+ "default",
3157
+ "primary",
3158
+ "secondary",
3159
+ "inverted",
3160
+ "outline",
3161
+ "ghost"
3162
+ ]);
3163
+ const navContainerSchema = z.object({
3164
+ type: z.enum([
3165
+ "none",
3166
+ "pill",
3167
+ "glass"
3168
+ ]).default("none"),
3169
+ tint: z.string().nullable().optional(),
3170
+ opacity: z.number().min(0).max(1).default(.15)
3171
+ }).default({
3172
+ type: "none",
3173
+ tint: null,
3174
+ opacity: .15
3175
+ });
3176
+ const headerBackgroundSchema = z.object({
3177
+ type: z.enum([
3178
+ "color",
3179
+ "gradient",
3180
+ "image"
3181
+ ]),
3182
+ contentOwner: z.literal(siteChromeBackgroundOverrideOwner).optional(),
3183
+ color: tokenOrCssColorValueSchema.nullable().optional(),
3184
+ gradient: gradientConfigSchema.nullable().optional(),
3185
+ image: mediaSchema.nullable().optional(),
3186
+ textColor: tokenOrCssColorValueSchema.nullable().optional()
3187
+ });
3188
+ const headerSchema = z.object({
3189
+ variant: headerVariantWithLegacyAliasSchema,
3190
+ positioning: headerPositioning,
3191
+ shrinkOnScroll: z.boolean(),
3192
+ maxWidth: headerMaxWidth.default("container"),
3193
+ scrollTreatment: headerScrollTreatmentSchema,
3194
+ background: headerBackgroundSchema.default({
3195
+ type: "color",
3196
+ color: "surface"
3197
+ }),
3198
+ textColor: themeColorTokenSchema.nullable().optional(),
3199
+ navStyle: headerNavStyle,
3200
+ navColor: themeColorTokenSchema.nullable().optional(),
3201
+ navWeight: navFontWeight.default("medium"),
3202
+ navFontRole: z.enum(["body", "heading"]).optional(),
3203
+ navTextSize: navLinkStyleSchema.shape.textSize,
3204
+ interactionPalette: headerInteractionPaletteSchema.optional(),
3205
+ container: headerContainerSchema,
3206
+ border: headerBorderSchema,
3207
+ shadow: componentShadowSchema.optional(),
3208
+ logo: logoStyleSchema,
3209
+ logoText: headerLogoTextSchema,
3210
+ navContainer: navContainerSchema,
3211
+ navLinkStyle: navLinkStyleSchema.optional(),
3212
+ ctaGap: headerCtaGapSchema.optional(),
3213
+ ctaTreatment: headerCtaTreatmentSchema.optional(),
3214
+ ctaVariant: z.string().min(1).optional(),
3215
+ dropdownStyle: dropdownStyleSchema
3216
+ });
3217
+ const footerVariant = z.enum([
3218
+ "simple",
3219
+ "columns",
3220
+ "split",
3221
+ "centred"
3222
+ ]).transform((value) => value === "columns" ? "simple" : value);
3223
+ const footerMaxWidth = z.enum(["container", "full"]);
3224
+ const footerNavLayoutMode = z.enum([
3225
+ "stack",
3226
+ "inline",
3227
+ "inline-wrap"
3228
+ ]);
3229
+ const footerSpacing = z.enum([
3230
+ "none",
3231
+ "tight",
3232
+ "compact",
3233
+ "default",
3234
+ "relaxed",
3235
+ "spacious"
3236
+ ]);
3237
+ const footerLogoSize = z.enum([
3238
+ "sm",
3239
+ "md",
3240
+ "lg",
3241
+ "xl"
3242
+ ]);
3243
+ const footerLogoMaxHeight = z.enum([
3244
+ "sm",
3245
+ "md",
3246
+ "lg",
3247
+ "xl"
3248
+ ]);
3249
+ const footerBottomTextLinkStyleSchema = z.object({
3250
+ colorToken: themeColorTokenSchema.optional(),
3251
+ hoverColorToken: themeColorTokenSchema.nullable().optional(),
3252
+ decorationColorToken: themeColorTokenSchema.nullable().optional(),
3253
+ underline: z.boolean().optional()
3254
+ });
3255
+ const footerBottomBarSchema = z.object({
3256
+ enabled: z.boolean().optional(),
3257
+ fullBleed: z.boolean().optional(),
3258
+ background: headerBackgroundSchema.optional(),
3259
+ textColor: themeColorTokenSchema.nullable().optional(),
3260
+ textAlign: z.enum([
3261
+ "left",
3262
+ "center",
3263
+ "right"
3264
+ ]).optional(),
3265
+ paddingY: footerSpacing.optional(),
3266
+ paddingX: footerSpacing.optional(),
3267
+ borderTop: z.object({
3268
+ colorToken: themeColorTokenSchema.nullable().optional(),
3269
+ width: z.enum([
3270
+ "none",
3271
+ "thin",
3272
+ "medium",
3273
+ "thick"
3274
+ ]).optional()
3275
+ }).optional()
3276
+ });
3277
+ const footerNavLayoutSchema = z.object({ layout: footerNavLayoutMode.optional() });
3278
+ const footerLogoSchema = z.object({
3279
+ size: footerLogoSize.optional(),
3280
+ maxHeight: footerLogoMaxHeight.optional(),
3281
+ align: z.enum([
3282
+ "start",
3283
+ "center",
3284
+ "end"
3285
+ ]).optional()
3286
+ });
3287
+ const footerSchema = z.object({
3288
+ variant: footerVariant,
3289
+ maxWidth: footerMaxWidth,
3290
+ background: headerBackgroundSchema.default({
3291
+ type: "color",
3292
+ color: "surface"
3293
+ }),
3294
+ navStyle: headerNavStyle.default("minimal"),
3295
+ navColor: themeColorTokenSchema.nullable().optional(),
3296
+ navWeight: navFontWeight.default("medium"),
3297
+ navLinkStyle: navLinkStyleSchema.optional(),
3298
+ bottomTextLinkStyle: footerBottomTextLinkStyleSchema.optional(),
3299
+ navLayout: footerNavLayoutSchema.optional(),
3300
+ logo: footerLogoSchema.optional(),
3301
+ bottomBar: footerBottomBarSchema.optional()
3302
+ });
3303
+ const containerPaddingPresetSchema = z.enum([
3304
+ "tight",
3305
+ "compact",
3306
+ "default",
3307
+ "relaxed"
3308
+ ]);
3309
+ const layoutSchema = z.object({ containerPadding: z.object({
3310
+ mobile: containerPaddingPresetSchema.optional(),
3311
+ tablet: containerPaddingPresetSchema.optional(),
3312
+ desktop: containerPaddingPresetSchema.optional()
3313
+ }).optional() }).optional();
3314
+ const heroTypographySizeSchema = z.enum([
3315
+ "sm",
3316
+ "base",
3317
+ "lg",
3318
+ "xl",
3319
+ "2xl",
3320
+ "3xl",
3321
+ "4xl",
3322
+ "5xl",
3323
+ "6xl",
3324
+ "editorial"
3325
+ ]);
3326
+ const heroTypographyLineHeightSchema = z.enum([
3327
+ "tight",
3328
+ "snug",
3329
+ "normal",
3330
+ "relaxed"
3331
+ ]);
3332
+ const heroResponsiveTypographySchema = z.object({
3333
+ headlineSize: heroTypographySizeSchema.optional(),
3334
+ headlineLineHeight: heroTypographyLineHeightSchema.optional(),
3335
+ subheadlineSize: heroTypographySizeSchema.optional(),
3336
+ subheadlineLineHeight: heroTypographyLineHeightSchema.optional()
3337
+ });
3338
+ const heroTypographySchema = z.object({
3339
+ headlineSize: heroTypographySizeSchema.optional(),
3340
+ headlineLineHeight: heroTypographyLineHeightSchema.optional(),
3341
+ subheadlineSize: heroTypographySizeSchema.optional(),
3342
+ subheadlineLineHeight: heroTypographyLineHeightSchema.optional(),
3343
+ microHeadlineSize: heroTypographySizeSchema.optional(),
3344
+ microHeadlineLineHeight: heroTypographyLineHeightSchema.optional(),
3345
+ microSubheadlineSize: heroTypographySizeSchema.optional(),
3346
+ microSubheadlineLineHeight: heroTypographyLineHeightSchema.optional(),
3347
+ responsive: z.object({
3348
+ tablet: heroResponsiveTypographySchema.optional(),
3349
+ mobile: heroResponsiveTypographySchema.optional()
3350
+ }).optional()
3351
+ });
3352
+ const heroSchema = z.object({ typography: heroTypographySchema.optional() }).optional();
3353
+ const bodyTextIntroTypographySizeSchema = z.enum(["default", "editorial"]);
3354
+ const bodyTextSchema = z.object({ intro: z.object({
3355
+ paragraphSize: bodyTextIntroTypographySizeSchema.optional(),
3356
+ headingSize: bodyTextIntroTypographySizeSchema.optional()
3357
+ }).optional() }).optional();
3358
+ /**
3359
+ * Testimonial quote-mark treatment, owned by the site style (analogous to the
3360
+ * accordion icon). `style` is the coarse selector; the optional fields fine-tune
3361
+ * it. `none` hides the mark. The block renders the mark; the site style decides
3362
+ * its character; a look may still hide it.
3363
+ */
3364
+ const testimonialQuoteTreatmentSchema = z.object({
3365
+ style: z.enum([
3366
+ "serif-display",
3367
+ "accent-glyph",
3368
+ "none"
3369
+ ]),
3370
+ fontFamily: z.enum(["heading", "body"]).optional(),
3371
+ scale: z.enum([
3372
+ "sm",
3373
+ "md",
3374
+ "lg",
3375
+ "xl"
3376
+ ]).optional(),
3377
+ colorToken: themeColorTokenSchema.optional(),
3378
+ opacity: z.number().min(0).max(1).optional()
3379
+ });
3380
+ const themeSchema = z.object({
3381
+ ...themeLookMetadataSchema.shape,
3382
+ axes: axesSchema,
3383
+ palette: paletteSchema,
3384
+ typography: typographySchema,
3385
+ space: spaceSchema,
3386
+ border,
3387
+ shadow,
3388
+ motion,
3389
+ corners,
3390
+ gradients: gradientsSchema.optional(),
3391
+ layout: layoutSchema,
3392
+ hero: heroSchema,
3393
+ bodyText: bodyTextSchema,
3394
+ header: headerSchema,
3395
+ footer: footerSchema,
3396
+ buttons: buttonSystemSchema.optional(),
3397
+ cards: cardSystemSchema.optional(),
3398
+ accordions: accordionSystemSchema.optional(),
3399
+ testimonialQuote: testimonialQuoteTreatmentSchema.optional(),
3400
+ inputs: inputSystemSchema.optional(),
3401
+ inputStyle: inputStyle.optional(),
3402
+ blockCustomVars: z.record(z.string(), z.record(z.string(), z.string())).optional(),
3403
+ blockOverrides: z.record(z.string(), blockThemeOverrideSchema).optional(),
3404
+ headingDecoration: headingDecorationSchema.optional(),
3405
+ customCssRules: customCssRulesSchema,
3406
+ blockCustomCssRules: blockCustomCssRulesSchema,
3407
+ customCssAtRules: customCssAtRulesSchema,
3408
+ /**
3409
+ * Style groups define named visual presets that content authors can apply to blocks.
3410
+ *
3411
+ * Unlike variants (which change block structure/layout), style groups only affect
3412
+ * CSS styling. The selected style group is rendered as a `data-style-group` attribute
3413
+ * on the block wrapper, which can be targeted in `blockCustomCssRules`.
3414
+ *
3415
+ * @example
3416
+ * ```typescript
3417
+ * {
3418
+ * styleGroups: {
3419
+ * hero: ['bold', 'minimal', 'featured'],
3420
+ * 'body-text': ['intro', 'compact'],
3421
+ * },
3422
+ * blockCustomCssRules: [
3423
+ * {
3424
+ * id: 'hero-bold-headline',
3425
+ * blockKind: 'hero',
3426
+ * selector: '&[data-style-group="bold"] .hero-headline',
3427
+ * declarations: { fontWeight: '800', fontSize: '3rem' }
3428
+ * }
3429
+ * ]
3430
+ * }
3431
+ * ```
3432
+ */
3433
+ styleGroups: z.record(z.string(), z.array(z.string())).optional()
3434
+ });
1777
3435
  //#endregion
1778
3436
  //#region ../theme-core/src/tokens/resolver.ts
1779
3437
  /**
@@ -1926,6 +3584,7 @@ const arrangementSlotNames = [
1926
3584
  "places-full",
1927
3585
  "action",
1928
3586
  "panel",
3587
+ "booking-panel",
1929
3588
  "panel-heading",
1930
3589
  "more",
1931
3590
  "quote",
@@ -1933,7 +3592,8 @@ const arrangementSlotNames = [
1933
3592
  "outcome",
1934
3593
  "controls",
1935
3594
  "control",
1936
- "counter"
3595
+ "counter",
3596
+ "point"
1937
3597
  ];
1938
3598
  //#endregion
1939
3599
  //#region ../theme-core/src/surfaces/logoVariant.ts
@@ -2117,6 +3777,14 @@ function requireNonEmptyReadonlyArray(values, message = "Expected a non-empty ar
2117
3777
  function assertNever(value, message = "Unhandled Theme V2 variant") {
2118
3778
  throw new Error(`${message}: ${String(value)}`);
2119
3779
  }
3780
+ function designIssueSeverityForPolicy(policy) {
3781
+ switch (policy) {
3782
+ case "generated": return "repairable";
3783
+ case "user":
3784
+ case "admin":
3785
+ case "sdk": return "advisory";
3786
+ }
3787
+ }
2120
3788
  /**
2121
3789
  * What a block's own section background field admits, read from its manifest.
2122
3790
  * A site style's surface rule may paint a gradient or a photo; a block whose
@@ -2186,6 +3854,12 @@ function defineBlockDesignCapability(capability) {
2186
3854
  function admittedSectionBackgroundPaints(paints) {
2187
3855
  return paints ?? sectionBackgroundPaintValues;
2188
3856
  }
3857
+ function defineNoBlockDesignCapability(reason) {
3858
+ return {
3859
+ kind: "not-designed",
3860
+ reason
3861
+ };
3862
+ }
2189
3863
  //#endregion
2190
3864
  //#region ../theme-core/src/site-styles/appearancePresetTypes.ts
2191
3865
  /** Facts about how the owner set the block up, rather than what they filled in. */
@@ -2193,6 +3867,9 @@ const lookSettingFacts = ["listed-by-week"];
2193
3867
  function isLookSettingFact(fact) {
2194
3868
  return lookSettingFacts.includes(fact);
2195
3869
  }
3870
+ function isRecipeAppearancePreset(preset) {
3871
+ return preset.structure.kind === "recipe";
3872
+ }
2196
3873
  function isArrangementAppearancePreset(preset) {
2197
3874
  return preset.structure.kind === "arrangement";
2198
3875
  }
@@ -2231,7 +3908,8 @@ const arrangementLookTargets = {
2231
3908
  "body-text": "body-text",
2232
3909
  faq: "faq",
2233
3910
  "cta-full": "cta",
2234
- "location-map": "location"
3911
+ "location-map": "location",
3912
+ list: "list"
2235
3913
  };
2236
3914
  function defineArrangementLook(id, block, name, arrangement, knobs, input) {
2237
3915
  const mode = block === "event-calendar" ? "list" : null;
@@ -2393,6 +4071,23 @@ function defineLookOptionGroup(group) {
2393
4071
  defaultOption(group);
2394
4072
  return group;
2395
4073
  }
4074
+ function resolveLookOption(group, requestedOptionId) {
4075
+ const fallback = defaultOption(group);
4076
+ if (requestedOptionId === null || requestedOptionId === void 0) return {
4077
+ kind: "defaulted",
4078
+ option: fallback
4079
+ };
4080
+ const selected = group.options.find((option) => option.id === requestedOptionId);
4081
+ return selected ? {
4082
+ kind: "selected",
4083
+ option: selected
4084
+ } : {
4085
+ kind: "repaired",
4086
+ requestedOptionId,
4087
+ option: fallback,
4088
+ reason: "unsupported-option"
4089
+ };
4090
+ }
2396
4091
  function defaultOption(group) {
2397
4092
  const option = group.options.find((candidate) => candidate.id === group.defaultOptionId);
2398
4093
  if (option) return option;
@@ -2474,6 +4169,9 @@ function assertValidOptionGroups(preset) {
2474
4169
  defineLookOptionGroup(group);
2475
4170
  });
2476
4171
  }
4172
+ function selectedOptionForGroup(group) {
4173
+ return resolveLookOption(group, void 0).option;
4174
+ }
2477
4175
  /**
2478
4176
  * Every Look carries a card role. A Look that says nothing about cards renders
2479
4177
  * none, which is the overwhelming majority of them; the card-bearing ones name
@@ -2489,6 +4187,25 @@ function defineBlockAppearancePreset(preset) {
2489
4187
  }
2490
4188
  };
2491
4189
  }
4190
+ function layoutProfileSupportsConstraints(profile, constraints) {
4191
+ const supportsFamily = constraints.layoutFamilies ? constraints.layoutFamilies.includes(profile.layoutFamily) : true;
4192
+ const supportsVariant = constraints.layoutVariantKeys ? constraints.layoutVariantKeys.includes(profile.variantKey) : true;
4193
+ return supportsFamily && supportsVariant;
4194
+ }
4195
+ function resolveBlockAppearancePresetDesign(preset, layoutProfile = null) {
4196
+ const designWithOptions = (preset.optionGroups ?? []).reduce((design, group) => ({
4197
+ ...design,
4198
+ ...selectedOptionForGroup(group).designPatch
4199
+ }), {
4200
+ ...preset.design,
4201
+ ...preset.structure.composition ? { composition: preset.structure.composition } : {}
4202
+ });
4203
+ if (!layoutProfile) return designWithOptions;
4204
+ return (preset.layoutPatches ?? []).reduce((design, patch) => layoutProfileSupportsConstraints(layoutProfile, patch.constraints) ? {
4205
+ ...design,
4206
+ ...patch.designPatch
4207
+ } : design, designWithOptions);
4208
+ }
2492
4209
  //#endregion
2493
4210
  //#region ../theme-core/src/site-styles/blockAppearancePresets.ts
2494
4211
  /**
@@ -3981,6 +5698,16 @@ const appearancePresets = [
3981
5698
  thumbnail: sketch.band([sketch.across(5, [sketch.photo("short")], { overflow: true })]),
3982
5699
  styleFallback: [id$1("image-gallery-square-tiles")]
3983
5700
  }),
5701
+ defineArrangementLook("list-ticked-points", "list", "Ticked points", "list-ticks", [], { thumbnail: sketch.page([sketch.row(sketch.weight(2, [sketch.rule, sketch.title(.9)]), sketch.weight(3, [sketch.down(3, [sketch.row(sketch.weight(1, [sketch.number]), sketch.weight(7, [sketch.text(1, .8)]))])]))]) }),
5702
+ defineArrangementLook("list-two-columns", "list", "Points in two columns", "list-columns", [], {
5703
+ thumbnail: sketch.page([sketch.title(.4), sketch.row([sketch.down(3, [sketch.text(1, .8)])], [sketch.down(3, [sketch.text(1, .8)])])]),
5704
+ styleFallback: [id$1("list-ticked-points")]
5705
+ }),
5706
+ defineArrangementLook("list-headed-cards", "list", "Headed cards", "list-cards", [], {
5707
+ thumbnail: sketch.page([sketch.title(.4), sketch.across(2, [sketch.card([sketch.title(.5, "small"), sketch.down(3, [sketch.text(1, .8)])])])], { align: "center" }),
5708
+ itemRoles: { items: "card" },
5709
+ styleFallback: [id$1("list-two-columns")]
5710
+ }),
3984
5711
  defineArrangementLook("cta-centred", "cta-full", "Centred, buttons below", "default", [], { thumbnail: sketch.band([
3985
5712
  sketch.title(.6),
3986
5713
  sketch.text(1, .5),
@@ -4215,6 +5942,44 @@ function stripStaleTransitionStyleGroup(content) {
4215
5942
  }
4216
5943
  //#endregion
4217
5944
  //#region ../theme-core/src/site-styles/imageSurfaceBackground.ts
5945
+ function withImageSurfaceMotion(background, motion) {
5946
+ return motion === "static" ? background : {
5947
+ ...background,
5948
+ motion
5949
+ };
5950
+ }
5951
+ function compileImageSurfaceTreatmentBackground(background, treatment, foreground) {
5952
+ switch (treatment.kind) {
5953
+ case "none": return null;
5954
+ case "brand-scrim": return withColorOverlay(background, darkenedThemeToken(treatment.token), treatment, "primaryForeground", foreground);
5955
+ case "brand-wash": return withColorOverlay(background, lightenedBrandToken(treatment.token), treatment, "text", foreground);
5956
+ case "neutral-scrim": return withColorOverlay(background, darkenedThemeToken("text"), treatment, "primaryForeground", foreground);
5957
+ case "neutral-wash": return {
5958
+ ...background,
5959
+ overlay: {
5960
+ type: "gradient",
5961
+ gradient: "linear-gradient(180deg, rgba(255,255,255,0.38) 0%, rgba(244,241,234,0.62) 90%)",
5962
+ opacity: 1
5963
+ },
5964
+ ...uniformForeground("text"),
5965
+ ...foreground
5966
+ };
5967
+ case "solid-panel": return withColorOverlay(background, "surface", treatment, "text", foreground);
5968
+ default: return assertNever(treatment);
5969
+ }
5970
+ }
5971
+ function withColorOverlay(background, color, treatment, foregroundToken, foreground) {
5972
+ return {
5973
+ ...background,
5974
+ overlay: {
5975
+ type: "color",
5976
+ color,
5977
+ opacity: imageSurfaceTreatmentOpacity(treatment.kind, treatment.intensity)
5978
+ },
5979
+ ...uniformForeground(foregroundToken),
5980
+ ...foreground
5981
+ };
5982
+ }
4218
5983
  /** The brand tint older photo heroes use, shared with the Look photo treatment's brand arm. */
4219
5984
  function brandScrimOverlay(token) {
4220
5985
  return {
@@ -4223,6 +5988,14 @@ function brandScrimOverlay(token) {
4223
5988
  opacity: imageSurfaceTreatmentOpacity("brand-scrim", void 0)
4224
5989
  };
4225
5990
  }
5991
+ function uniformForeground(token) {
5992
+ return {
5993
+ textColor: token,
5994
+ headingColor: token,
5995
+ linkColor: token,
5996
+ supportingColor: token
5997
+ };
5998
+ }
4226
5999
  const opacityByKind = {
4227
6000
  "brand-scrim": {
4228
6001
  soft: .26,
@@ -4256,6 +6029,9 @@ function imageSurfaceTreatmentOpacity(kind, intensity) {
4256
6029
  function darkenedThemeToken(token) {
4257
6030
  return `color-mix(in oklab, rgb(var(--tb-${token})), black 28%)`;
4258
6031
  }
6032
+ function lightenedBrandToken(token) {
6033
+ return `color-mix(in oklab, rgb(var(--tb-${token})), white 42%)`;
6034
+ }
4259
6035
  //#endregion
4260
6036
  //#region ../theme-core/src/site-styles/runtimeBackgroundResolution.ts
4261
6037
  function parseCanonicalRuntimeBackground(content) {
@@ -4791,6 +6567,9 @@ function requireCatalogueValue(values, intent) {
4791
6567
  if (value === void 0) throw new Error(`Transition catalogue has no entry for ${intent}`);
4792
6568
  return value;
4793
6569
  }
6570
+ function isDecorativeTransitionIntent(transition) {
6571
+ return transition !== "none";
6572
+ }
4794
6573
  function boundaryRuntimeMetricsForDecorativeTransition(transition) {
4795
6574
  return requireCatalogueValue(metricsByIntent, transition);
4796
6575
  }
@@ -4809,8 +6588,8 @@ const boundaryOptionByIntent = new Map(transitionCatalogueEntries.map((entry) =>
4809
6588
  function boundaryOptionForTransitionIntent(intent) {
4810
6589
  return requireCatalogueValue(boundaryOptionByIntent, intent);
4811
6590
  }
4812
- boundaryOptionForTransitionIntent("soft-fade-short");
4813
- boundaryOptionForTransitionIntent("soft-fade-long");
6591
+ const softBoundaryOption = boundaryOptionForTransitionIntent("soft-fade-short");
6592
+ const spaciousBoundaryOption = boundaryOptionForTransitionIntent("soft-fade-long");
4814
6593
  boundaryOptionForTransitionIntent("soft-fade-expansive");
4815
6594
  boundaryOptionForTransitionIntent("wave-edge");
4816
6595
  boundaryOptionForTransitionIntent("wave-edge-balanced");
@@ -4847,10 +6626,25 @@ const sectionTransitionFamilies = [{
4847
6626
  label: family.label,
4848
6627
  variants: requireNonEmptyReadonlyArray(transitionCatalogueEntries.filter((entry) => entry.family === family.id).map(transitionVariantForEntry), `Transition family ${family.id} has no catalogue entries.`)
4849
6628
  }))];
4850
- new Map(boundaryOptions.map((option) => [option.id, option]));
4851
- new Map(boundaryOptions.map((option) => [stableTreatmentKey(option.treatment), option]));
6629
+ const boundaryOptionById = new Map(boundaryOptions.map((option) => [option.id, option]));
6630
+ const boundaryOptionByTreatmentKey = new Map(boundaryOptions.map((option) => [stableTreatmentKey(option.treatment), option]));
4852
6631
  new Map(sectionTransitionFamilies.flatMap((family) => family.variants.map((variant) => [variant.boundaryOption.id, variant])));
4853
6632
  new Map(sectionTransitionFamilies.map((family) => [family.id, family]));
6633
+ /** Unknown IDs are refused at the lookup boundary and never become stored treatments. */
6634
+ function boundaryTreatmentForBoundaryOptionId(boundaryOptionId) {
6635
+ return boundaryOptionById.get(boundaryOptionId)?.treatment ?? null;
6636
+ }
6637
+ function boundaryOptionForTreatment(treatment) {
6638
+ return boundaryOptionByTreatmentKey.get(stableTreatmentKey(treatment)) ?? null;
6639
+ }
6640
+ /**
6641
+ * Supported decorative intent for a structured treatment, or null for `none`,
6642
+ * structured treatments the catalogue lacks.
6643
+ */
6644
+ function transitionIntentForTreatment(treatment) {
6645
+ const transition = boundaryOptionForTreatment(treatment)?.transitionAfter;
6646
+ return transition && isDecorativeTransitionIntent(transition) ? transition : null;
6647
+ }
4854
6648
  function stableTreatmentKey(treatment) {
4855
6649
  switch (treatment.kind) {
4856
6650
  case "none": return "none";
@@ -4905,6 +6699,174 @@ function validateBookingBarSurface(skin, bookingBar, surfaces) {
4905
6699
  if (bookingBar === void 0) return;
4906
6700
  if (surfaces[bookingBar.surface]?.kind !== "token") throw new Error(`Booking bar for ${skin} needs a declared token surface: ${bookingBar.surface}`);
4907
6701
  }
6702
+ const pageDesignUserPinnedAppearanceChoiceSchema = z.object({
6703
+ kind: z.literal("user-pinned"),
6704
+ value: z.string().min(1).transform(asAppearancePresetId)
6705
+ }).strict();
6706
+ const pageDesignBoundaryTreatmentSchema = z.discriminatedUnion("kind", [
6707
+ z.object({ kind: z.literal("none") }).strict(),
6708
+ z.object({
6709
+ kind: z.literal("soft-fade"),
6710
+ height: z.enum([
6711
+ "compact",
6712
+ "medium",
6713
+ "large",
6714
+ "expansive"
6715
+ ]),
6716
+ curve: z.enum([
6717
+ "soft",
6718
+ "spacious",
6719
+ "expansive"
6720
+ ])
6721
+ }).strict(),
6722
+ z.object({
6723
+ kind: z.literal("wave-edge"),
6724
+ height: z.enum([
6725
+ "compact",
6726
+ "medium",
6727
+ "large"
6728
+ ]),
6729
+ amplitude: z.enum([
6730
+ "subtle",
6731
+ "balanced",
6732
+ "bold"
6733
+ ]),
6734
+ rhythm: z.enum(["single", "double"]),
6735
+ symmetry: z.enum([
6736
+ "symmetrical",
6737
+ "asymmetrical",
6738
+ "drift"
6739
+ ]),
6740
+ echo: z.literal(true).optional()
6741
+ }).strict(),
6742
+ z.object({
6743
+ kind: z.literal("angle-edge"),
6744
+ height: z.enum([
6745
+ "compact",
6746
+ "medium",
6747
+ "large"
6748
+ ]),
6749
+ slope: z.enum([
6750
+ "subtle",
6751
+ "balanced",
6752
+ "steep"
6753
+ ]),
6754
+ direction: z.enum(["forward", "reverse"])
6755
+ }).strict()
6756
+ ]);
6757
+ const pageDesignUserPinnedBoundaryTreatmentChoiceSchema = z.object({
6758
+ kind: z.literal("user-pinned"),
6759
+ value: pageDesignBoundaryTreatmentSchema
6760
+ }).strict();
6761
+ const pageDesignBlockLookPinSchema = z.object({
6762
+ blockId: z.string().min(1).transform(asDesignBlockId),
6763
+ blockKind: z.string().min(1),
6764
+ choice: pageDesignUserPinnedAppearanceChoiceSchema
6765
+ }).strict();
6766
+ const pageDesignBoundaryPinSchema = z.object({
6767
+ boundaryId: z.string().min(1).startsWith("boundary:", { error: "DesignBoundaryId must start with \"boundary:\"." }).transform(asDesignBoundaryId),
6768
+ previousBlockId: z.string().min(1).transform(asDesignBlockId),
6769
+ nextBlockId: z.string().min(1).transform(asDesignBlockId),
6770
+ choice: pageDesignUserPinnedBoundaryTreatmentChoiceSchema
6771
+ }).strict().superRefine(validateBoundaryPinIdMatchesBlocks);
6772
+ const pageDesignDecisionsV2Schema = z.object({
6773
+ schemaVersion: z.literal(2),
6774
+ pageFlowPresetId: z.string().min(1).transform(asPageFlowPresetId),
6775
+ blockLookPins: z.array(pageDesignBlockLookPinSchema),
6776
+ boundaryPins: z.array(pageDesignBoundaryPinSchema)
6777
+ }).strict().superRefine(validateUniquePageDesignPins);
6778
+ function addDuplicateStringIssues(ctx, input) {
6779
+ const seen = /* @__PURE__ */ new Set();
6780
+ const duplicates = /* @__PURE__ */ new Set();
6781
+ input.values.forEach((value) => {
6782
+ if (seen.has(value)) duplicates.add(value);
6783
+ seen.add(value);
6784
+ });
6785
+ duplicates.forEach((duplicate) => {
6786
+ ctx.addIssue({
6787
+ code: z.ZodIssueCode.custom,
6788
+ path: [...input.path],
6789
+ message: `Duplicate ${input.label}: ${duplicate}.`
6790
+ });
6791
+ });
6792
+ }
6793
+ function validateBoundaryPinIdMatchesBlocks(pin, ctx) {
6794
+ const expectedBoundaryId = makeBoundaryId(pin.previousBlockId, pin.nextBlockId);
6795
+ if (pin.boundaryId !== expectedBoundaryId) ctx.addIssue({
6796
+ code: z.ZodIssueCode.custom,
6797
+ path: ["boundaryId"],
6798
+ message: `Boundary id must match previousBlockId and nextBlockId. Expected ${expectedBoundaryId}.`
6799
+ });
6800
+ }
6801
+ function validateUniquePageDesignPins(intent, ctx) {
6802
+ addDuplicateStringIssues(ctx, {
6803
+ values: intent.blockLookPins.map((pin) => pin.blockId),
6804
+ path: ["blockLookPins"],
6805
+ label: "block Look pin"
6806
+ });
6807
+ addDuplicateStringIssues(ctx, {
6808
+ values: intent.boundaryPins.map((pin) => makeBoundaryId(pin.previousBlockId, pin.nextBlockId)),
6809
+ path: ["boundaryPins"],
6810
+ label: "boundary pin"
6811
+ });
6812
+ }
6813
+ //#endregion
6814
+ //#region ../theme-core/src/site-styles/schemaVersionedJson.ts
6815
+ function parseSchemaVersionedJson(input) {
6816
+ if (input.value == null) return { kind: "absent" };
6817
+ if (typeof input.value === "object" && input.value !== null && "schemaVersion" in input.value && input.value.schemaVersion !== input.expectedSchemaVersion) return {
6818
+ kind: "invalid",
6819
+ issue: {
6820
+ kind: "unsupported-schema-version",
6821
+ message: input.unsupportedSchemaVersionMessage
6822
+ }
6823
+ };
6824
+ const parsed = z.safeParse(input.schema, input.value);
6825
+ if (!parsed.success) return {
6826
+ kind: "invalid",
6827
+ issue: {
6828
+ kind: "invalid-json-shape",
6829
+ message: parsed.error.issues[0]?.message ?? input.invalidShapeMessage
6830
+ }
6831
+ };
6832
+ return {
6833
+ kind: "parsed",
6834
+ value: parsed.data
6835
+ };
6836
+ }
6837
+ asBoundaryOptionId("break:unknown");
6838
+ z.object({
6839
+ kind: z.literal("user-pinned"),
6840
+ value: z.string().min(1).transform(asBoundaryOptionId)
6841
+ }).strict();
6842
+ const pageDesignIntentV2Schema = pageDesignDecisionsV2Schema.safeExtend({ siteStyleId: z.string().min(1).startsWith("site-style:", { error: "SiteStyleId must start with \"site-style:\"." }).transform(asSiteStyleId) });
6843
+ function parsePageDesignIntent(value, options = {}) {
6844
+ const parsed = parseSchemaVersionedJson({
6845
+ value,
6846
+ schema: pageDesignIntentV2Schema,
6847
+ expectedSchemaVersion: 2,
6848
+ unsupportedSchemaVersionMessage: options.unsupportedSchemaVersionMessage ?? "Unsupported Theme V2 page design intent schemaVersion.",
6849
+ invalidShapeMessage: options.invalidShapeMessage ?? "Invalid Theme V2 page design intent shape."
6850
+ });
6851
+ switch (parsed.kind) {
6852
+ case "absent": return parsed;
6853
+ case "parsed": return {
6854
+ kind: "parsed",
6855
+ intent: parsed.value
6856
+ };
6857
+ case "invalid": return parsed;
6858
+ default: return assertNever(parsed, "Unhandled page design intent JSON parse result");
6859
+ }
6860
+ }
6861
+ function autoDesignChoice() {
6862
+ return { kind: "auto" };
6863
+ }
6864
+ function resolvePageDesignBlockLookChoice(intent, blockId) {
6865
+ return intent.blockLookPins.find((pin) => pin.blockId === blockId)?.choice ?? autoDesignChoice();
6866
+ }
6867
+ function resolvePageDesignBoundaryChoice(intent, previousBlockId, nextBlockId) {
6868
+ return intent.boundaryPins.find((pin) => pin.previousBlockId === previousBlockId && pin.nextBlockId === nextBlockId)?.choice ?? autoDesignChoice();
6869
+ }
4908
6870
  const policiesById = {
4909
6871
  "darken-background": "other",
4910
6872
  "lighten-background": "other",
@@ -7048,6 +9010,25 @@ function baselineSurface(requestedRole, resolvedRole, theme) {
7048
9010
  };
7049
9011
  }
7050
9012
  /**
9013
+ * Whether a card system gives `role` a surface of its own, rather than one
9014
+ * borrowed through the fallback chain below.
9015
+ *
9016
+ * `none` asks for no surface and `default` is every card system's everyday
9017
+ * card (the generated baseline stands in for it by design), so both always
9018
+ * hold. `alternative` and `open` hold only when the site style declares an
9019
+ * enabled variant for them: otherwise `alternative` quietly renders the
9020
+ * default card and `open` the generated baseline, and a Look asking for either
9021
+ * would look like some other Look. Look availability is derived from this.
9022
+ */
9023
+ function cardSystemDefinesRole(cardSystem, role) {
9024
+ switch (role) {
9025
+ case "none":
9026
+ case "default": return true;
9027
+ case "alternative":
9028
+ case "open": return findEnabledVariantForRole(cardSystem, role) !== null;
9029
+ }
9030
+ }
9031
+ /**
7051
9032
  * Resolve a card role against a site style's card system.
7052
9033
  *
7053
9034
  * - `none` — terminal, no surface.
@@ -17087,7 +19068,358 @@ const loomFontPairings = [{
17087
19068
  body: "\"Work Sans\", system-ui, sans-serif"
17088
19069
  }];
17089
19070
  //#endregion
19071
+ //#region ../theme-core/src/site-styles/pageRuntimeJoin.ts
19072
+ /** Narrows any join (a resolved intent included) to its public, intent-only form. */
19073
+ function toPageRuntimeJoin(join) {
19074
+ return {
19075
+ previousBlockId: join.previousBlockId,
19076
+ nextBlockId: join.nextBlockId,
19077
+ treatment: join.treatment
19078
+ };
19079
+ }
19080
+ //#endregion
19081
+ //#region ../theme-core/src/gradients/presets.ts
19082
+ /**
19083
+ * Curated gradient presets based on theme palette
19084
+ */
19085
+ const gradientPresetData = {
19086
+ "primary-secondary": {
19087
+ name: "Primary to Secondary",
19088
+ description: "Blend your primary and secondary brand colors",
19089
+ type: "linear",
19090
+ angle: 135,
19091
+ stops: [{
19092
+ color: "primary-500",
19093
+ position: 0
19094
+ }, {
19095
+ color: "secondary-500",
19096
+ position: 100
19097
+ }]
19098
+ },
19099
+ "primary-accent": {
19100
+ name: "Primary to Accent",
19101
+ description: "Energetic gradient from primary to accent",
19102
+ type: "linear",
19103
+ angle: 135,
19104
+ stops: [{
19105
+ color: "primary-500",
19106
+ position: 0
19107
+ }, {
19108
+ color: "accent-500",
19109
+ position: 100
19110
+ }]
19111
+ },
19112
+ "secondary-accent": {
19113
+ name: "Secondary to Accent",
19114
+ description: "Vibrant secondary to accent blend",
19115
+ type: "linear",
19116
+ angle: 135,
19117
+ stops: [{
19118
+ color: "secondary-500",
19119
+ position: 0
19120
+ }, {
19121
+ color: "accent-500",
19122
+ position: 100
19123
+ }]
19124
+ },
19125
+ "primary-light-dark": {
19126
+ name: "Primary Light to Dark",
19127
+ description: "Subtle primary color fade",
19128
+ type: "linear",
19129
+ angle: 180,
19130
+ stops: [{
19131
+ color: "primary-500",
19132
+ position: 0
19133
+ }, {
19134
+ color: "primary-900",
19135
+ position: 100
19136
+ }]
19137
+ },
19138
+ "primary-dark-light": {
19139
+ name: "Primary Dark to Light",
19140
+ description: "Reverse primary fade",
19141
+ type: "linear",
19142
+ angle: 180,
19143
+ stops: [{
19144
+ color: "primary-900",
19145
+ position: 0
19146
+ }, {
19147
+ color: "primary-50",
19148
+ position: 100
19149
+ }]
19150
+ },
19151
+ "secondary-light-dark": {
19152
+ name: "Secondary Light to Dark",
19153
+ description: "Subtle secondary color fade",
19154
+ type: "linear",
19155
+ angle: 180,
19156
+ stops: [{
19157
+ color: "secondary-500",
19158
+ position: 0
19159
+ }, {
19160
+ color: "secondary-900",
19161
+ position: 100
19162
+ }]
19163
+ },
19164
+ "accent-light-dark": {
19165
+ name: "Accent Light to Dark",
19166
+ description: "Accent color depth fade",
19167
+ type: "linear",
19168
+ angle: 180,
19169
+ stops: [{
19170
+ color: "accent-500",
19171
+ position: 0
19172
+ }, {
19173
+ color: "accent-900",
19174
+ position: 100
19175
+ }]
19176
+ },
19177
+ "background-surface": {
19178
+ name: "Background to Surface",
19179
+ description: "Subtle depth using base colors",
19180
+ type: "linear",
19181
+ angle: 180,
19182
+ stops: [{
19183
+ color: "background",
19184
+ position: 0
19185
+ }, {
19186
+ color: "surface",
19187
+ position: 100
19188
+ }]
19189
+ },
19190
+ "neutral-fade": {
19191
+ name: "Neutral Gradient",
19192
+ description: "Elegant neutral color fade",
19193
+ type: "linear",
19194
+ angle: 180,
19195
+ stops: [{
19196
+ color: "neutral-900",
19197
+ position: 0
19198
+ }, {
19199
+ color: "neutral-50",
19200
+ position: 100
19201
+ }]
19202
+ },
19203
+ "primary-glow": {
19204
+ name: "Primary glow",
19205
+ description: "A soft top-centred glow using your primary palette",
19206
+ type: "radial",
19207
+ shape: "ellipse",
19208
+ position: "top center",
19209
+ stops: [{
19210
+ color: "primary-900",
19211
+ position: 0
19212
+ }, {
19213
+ color: "primary-950",
19214
+ position: 100
19215
+ }],
19216
+ foreground: {
19217
+ textColor: "onPrimary900",
19218
+ headingColor: "onPrimary900",
19219
+ linkColor: "onPrimary900",
19220
+ supportingColor: "onPrimary900"
19221
+ }
19222
+ },
19223
+ "accent-glow": {
19224
+ name: "Accent glow",
19225
+ description: "A soft top-centred glow using your accent palette",
19226
+ type: "radial",
19227
+ shape: "ellipse",
19228
+ position: "top center",
19229
+ stops: [{
19230
+ color: "accent-900",
19231
+ position: 0
19232
+ }, {
19233
+ color: "accent-950",
19234
+ position: 100
19235
+ }],
19236
+ foreground: {
19237
+ textColor: "onAccent900",
19238
+ headingColor: "onAccent900",
19239
+ linkColor: "onAccent900",
19240
+ supportingColor: "onAccent900"
19241
+ }
19242
+ },
19243
+ "primary-secondary-accent": {
19244
+ name: "Brand Trio",
19245
+ description: "All three brand colors in harmony",
19246
+ type: "linear",
19247
+ angle: 135,
19248
+ stops: [
19249
+ {
19250
+ color: "primary-500",
19251
+ position: 0
19252
+ },
19253
+ {
19254
+ color: "secondary-500",
19255
+ position: 50
19256
+ },
19257
+ {
19258
+ color: "accent-500",
19259
+ position: 100
19260
+ }
19261
+ ]
19262
+ }
19263
+ };
19264
+ const presetData = (id) => gradientPresetData[id];
19265
+ /**
19266
+ * Curated library of gradient presets.
19267
+ * All gradients use theme color tokens, so they adapt to the site's palette.
19268
+ */
19269
+ const GRADIENT_PRESETS = gradientPresetIdValues.flatMap((value) => parseGradientPresetId(value) ?? []).map((id) => ({
19270
+ id,
19271
+ ...presetData(id)
19272
+ }));
19273
+ const gradientPresetById = Object.fromEntries(GRADIENT_PRESETS.map((preset) => [preset.id, preset]));
19274
+ function getGradientPreset(id) {
19275
+ return gradientPresetById[id];
19276
+ }
19277
+ //#endregion
19278
+ //#region ../theme-core/src/gradients/utils.ts
19279
+ /**
19280
+ * Convert a GradientConfig to a CSS gradient string
19281
+ *
19282
+ * @param config - The gradient configuration using theme tokens
19283
+ * @param tokens - Map of theme color tokens to hex values
19284
+ * @returns CSS gradient string (e.g., "linear-gradient(180deg, #3b82f6 0%, #f59e0b 100%)")
19285
+ */
19286
+ function gradientToCss(config, tokens) {
19287
+ const stops = config.stops.map((stop) => {
19288
+ return `${tokens[stop.color] ?? "#000000"} ${stop.position}%`;
19289
+ }).join(", ");
19290
+ const type = config.type ?? "linear";
19291
+ if (type === "radial") {
19292
+ const position = config.position ?? "center";
19293
+ return `radial-gradient(${config.shape ?? "circle"} at ${position}, ${stops})`;
19294
+ }
19295
+ if (type === "conic") {
19296
+ const position = config.position ?? "center";
19297
+ return `conic-gradient(from ${config.angle ?? 0}deg at ${position}, ${stops})`;
19298
+ }
19299
+ return `linear-gradient(${config.angle ?? 180}deg, ${stops})`;
19300
+ }
19301
+ //#endregion
19302
+ //#region ../theme-core/src/site-styles/sectionSurfaceBackgrounds.ts
19303
+ function compileGradientSectionBackground(background, foreground, palette) {
19304
+ const preset = getGradientPreset(background.gradientPresetId);
19305
+ const gradient = gradientToCss(preset, Object.fromEntries(preset.stops.map((stop) => [stop.color, `rgb(var(--tb-${stop.color}))`])));
19306
+ const mediaScrim = gradientMediaScrim({
19307
+ gradient,
19308
+ stopTokens: preset.stops.map((stop) => stop.color),
19309
+ foreground,
19310
+ palette
19311
+ });
19312
+ return {
19313
+ ...background,
19314
+ gradient,
19315
+ ...foreground,
19316
+ ...mediaScrim ? { mediaScrim } : {}
19317
+ };
19318
+ }
19319
+ function compileColorSectionBackground(surface, background, foreground, surfaceResolutionContext) {
19320
+ if (!background || background.type !== "color") return background;
19321
+ const accessibleSurface = toAccessibleColorSurfaceIntent(surface);
19322
+ if (!accessibleSurface) return background;
19323
+ const resolved = resolveSurface({
19324
+ kind: "recipe",
19325
+ intent: accessibleSurface
19326
+ }, {
19327
+ palette: surfaceResolutionContext.palette,
19328
+ buttonSystem: void 0,
19329
+ foreground: sectionForegroundCandidates(foreground)
19330
+ });
19331
+ if (resolved.kind === "inherit") return;
19332
+ const compiledForeground = {
19333
+ textColor: resolved.foreground.text,
19334
+ headingColor: resolved.foreground.heading,
19335
+ linkColor: resolved.foreground.link,
19336
+ supportingColor: resolved.foreground.supporting
19337
+ };
19338
+ const mediaScrim = mediaScrimForColorSurface(resolved.paint.token, compiledForeground, surfaceResolutionContext.palette);
19339
+ return {
19340
+ ...background,
19341
+ color: resolved.paint.token,
19342
+ ...compiledForeground,
19343
+ ...mediaScrim ? { mediaScrim } : {}
19344
+ };
19345
+ }
19346
+ function sectionForegroundCandidates(foreground) {
19347
+ return {
19348
+ text: foreground?.textColor,
19349
+ heading: foreground?.headingColor,
19350
+ link: foreground?.linkColor,
19351
+ supporting: foreground?.supportingColor
19352
+ };
19353
+ }
19354
+ /**
19355
+ * The surface rule the block can actually paint. A site style may dress a
19356
+ * surface in a gradient or a photo, but a block whose own section background
19357
+ * field refuses that paint would be dropped at render admission, so it gets
19358
+ * the surface's plain colour rule instead: the same band, resolved through
19359
+ * the accessible-surface contract. A surface with no admissible paint at all
19360
+ * compiles no background and inherits the page's.
19361
+ */
19362
+ function admissibleSurfaceRule(input) {
19363
+ const styled = input.rules.sectionSurfaces[input.surface];
19364
+ if (admitsRule(styled, input.admitted)) return styled;
19365
+ const plain = input.plainRules.sectionSurfaces[input.surface];
19366
+ return admitsRule(plain, input.admitted) ? plain : {};
19367
+ }
19368
+ function admitsRule(rule, admitted) {
19369
+ return rule.background === void 0 || admitted.includes(rule.background.type);
19370
+ }
19371
+ /**
19372
+ * The scrim a colour surface needs when authored media replaces it: the
19373
+ * surface colour itself, at the smallest opacity that keeps every foreground
19374
+ * role at body-text AA over any pixel. The surface's text is legible on the
19375
+ * band colour, so an opaque scrim always passes; the solver only finds how
19376
+ * much of the photo can still show.
19377
+ */
19378
+ function mediaScrimForColorSurface(backgroundToken, foreground, palette) {
19379
+ const scrim = scrimOpacityFor(palette[backgroundToken], foreground, palette);
19380
+ return scrim.kind === "legible" ? {
19381
+ type: "color",
19382
+ color: backgroundToken,
19383
+ opacity: scrim.opacity
19384
+ } : null;
19385
+ }
19386
+ /**
19387
+ * Over media a gradient band is its own scrim, at the opacity its weakest stop
19388
+ * needs to keep the foreground legible over any pixel. When any stop has no
19389
+ * legible scrim (the foreground clashes with that stop even fully opaque) the
19390
+ * band cannot back the foreground, so there is no scrim and authored media
19391
+ * keeps its own presentation.
19392
+ */
19393
+ function gradientMediaScrim(input) {
19394
+ const stopScrims = input.stopTokens.map((token) => scrimOpacityFor(input.palette[token], input.foreground, input.palette));
19395
+ return stopScrims.every((scrim) => scrim.kind === "legible") ? {
19396
+ type: "gradient",
19397
+ gradient: input.gradient,
19398
+ opacity: Math.max(...stopScrims.map((scrim) => scrim.opacity))
19399
+ } : null;
19400
+ }
19401
+ function scrimOpacityFor(scrimHex, foreground, palette) {
19402
+ if (typeof scrimHex !== "string") return { kind: "unreadable" };
19403
+ const foregroundHexes = Object.values(foreground).flatMap((token) => {
19404
+ const hex = typeof token === "string" ? palette[token] : void 0;
19405
+ return typeof hex === "string" ? [hex] : [];
19406
+ });
19407
+ if (foregroundHexes.length === 0) return { kind: "unreadable" };
19408
+ const opacity = minimumScrimOpacity({
19409
+ scrimHex,
19410
+ foregroundHexes,
19411
+ threshold: contrastThresholdByPolicy["body-aa"]
19412
+ });
19413
+ return opacity === null ? { kind: "illegible" } : {
19414
+ kind: "legible",
19415
+ opacity
19416
+ };
19417
+ }
19418
+ //#endregion
17090
19419
  //#region ../theme-core/src/site-styles/runtimeCompiler.ts
19420
+ function isGradientSectionSurfaceRuntimeRule(rule) {
19421
+ return rule.background?.type === "gradient";
19422
+ }
17091
19423
  const compiledRuntimeStyleFieldNames = [
17092
19424
  "_frameStyles",
17093
19425
  "_sectionStyles",
@@ -17099,10 +19431,66 @@ const compiledRuntimeStyleFieldNames = [
17099
19431
  "blockLook",
17100
19432
  "blockComposition"
17101
19433
  ];
19434
+ /**
19435
+ * Removes every compiler-owned field, plus a stale transition `styleGroup`.
19436
+ * An authored `styleGroup` is content and survives.
19437
+ */
19438
+ function stripCompiledRuntimeStyleFields(content) {
19439
+ return Object.fromEntries(Object.entries(stripStaleTransitionStyleGroup(content)).filter(([fieldName]) => !compiledRuntimeStyleFieldNames.includes(fieldName)));
19440
+ }
19441
+ function surfaceResolutionContextFromTheme(theme, declaredSurfaces = [], solvedInks) {
19442
+ return prepareThemeSurfaceRevision({
19443
+ palette: theme.palette,
19444
+ buttons: theme.buttons,
19445
+ skin: theme.skin,
19446
+ skinMarks: theme.skinMarks
19447
+ }, () => declaredSurfaces, solvedInks).context;
19448
+ }
19449
+ function defineDesignRuntimeRules(rules) {
19450
+ return rules;
19451
+ }
17102
19452
  function defineComponentRuntimeRules(rules) {
17103
19453
  return rules;
17104
19454
  }
17105
- ({ ...uniformSectionForeground("text") });
19455
+ /**
19456
+ * Default design rules translate semantic page-level choices into the current
19457
+ * runtime's section background vocabulary.
19458
+ */
19459
+ const defaultDesignRuntimeRules = defineDesignRuntimeRules({
19460
+ sectionSurfaces: {
19461
+ base: {},
19462
+ "muted-band": { background: {
19463
+ type: "color",
19464
+ color: "muted"
19465
+ } },
19466
+ "accent-band": { background: {
19467
+ type: "color",
19468
+ color: "accent"
19469
+ } },
19470
+ "brand-depth-band": { background: {
19471
+ type: "color",
19472
+ color: "primary-800"
19473
+ } },
19474
+ "hero-image": { background: {
19475
+ type: "image",
19476
+ opacity: 1,
19477
+ position: "center center",
19478
+ ...uniformSectionForeground("text")
19479
+ } }
19480
+ },
19481
+ heroLegibility: {
19482
+ "scrim-gradient": {
19483
+ type: "gradient",
19484
+ gradient: "linear-gradient(180deg, rgba(255,255,255,0.38) 0%, rgba(244,241,234,0.62) 90%)",
19485
+ opacity: 1
19486
+ },
19487
+ "solid-panel": {
19488
+ type: "color",
19489
+ color: "surface",
19490
+ opacity: .88
19491
+ }
19492
+ }
19493
+ });
17106
19494
  /**
17107
19495
  * Default component rules translate frame and item-surface semantics into the
17108
19496
  * current block override fields consumed by legacy renderers.
@@ -17147,6 +19535,65 @@ const defaultComponentRuntimeRules = defineComponentRuntimeRules({
17147
19535
  raised: false
17148
19536
  } }
17149
19537
  });
19538
+ function resolveVisualSectionSurfaceForBlock(block) {
19539
+ return resolveVisualSectionSurface(block.appliedSectionSurface, block.appliedContentFrame);
19540
+ }
19541
+ function resolveVisualSectionSurface(requestedSurface, contentFrame) {
19542
+ return contentFrame.kind === "flush-panel" && requestedSurface === "base" ? "muted-band" : requestedSurface;
19543
+ }
19544
+ function compileSectionStyles(input) {
19545
+ const rule = admissibleSurfaceRule({
19546
+ surface: input.surface,
19547
+ rules: input.rules,
19548
+ plainRules: defaultDesignRuntimeRules,
19549
+ admitted: input.sectionBackgroundPaints
19550
+ });
19551
+ const background = compileSectionBackground({
19552
+ surface: input.surface,
19553
+ rule,
19554
+ surfaceResolutionContext: input.surfaceResolutionContext,
19555
+ heroLegibility: input.heroLegibility,
19556
+ imageSurfaceTreatment: input.imageSurfaceTreatment,
19557
+ imageSurfaceMotion: input.imageSurfaceMotion,
19558
+ rules: input.rules
19559
+ });
19560
+ return sectionStylesOverrideSchema.parse({
19561
+ spacing: input.spacing,
19562
+ ...background ? { background } : {},
19563
+ ...sectionMinHeightForIntent(input.sectionHeight, input.surface),
19564
+ ...tileTreatmentForSection(input.tileTreatment),
19565
+ ...eventListTreatmentForSection(input.eventListTreatment),
19566
+ ...eyebrowTreatmentForSection(input.eyebrowTreatment),
19567
+ ...accordionIconTreatmentForSection(input.accordionIconTreatment)
19568
+ });
19569
+ }
19570
+ function tileTreatmentForSection(tileTreatment) {
19571
+ return tileTreatment === "default" ? {} : { tileTreatment };
19572
+ }
19573
+ function eventListTreatmentForSection(eventListTreatment) {
19574
+ return eventListTreatment === "plain" ? {} : { eventListTreatment };
19575
+ }
19576
+ function eyebrowTreatmentForSection(eyebrowTreatment) {
19577
+ return eyebrowTreatment === "plain" ? {} : { eyebrowTreatment };
19578
+ }
19579
+ function accordionIconTreatmentForSection(accordionIconTreatment) {
19580
+ return accordionIconTreatment === null ? {} : { accordionIconTreatment };
19581
+ }
19582
+ function sectionMinHeightForIntent(sectionHeight, surface) {
19583
+ if (sectionHeight === "default") return surface === "hero-image" ? { minHeight: "hero" } : {};
19584
+ return { minHeight: sectionHeight };
19585
+ }
19586
+ function compileSectionBackground(input) {
19587
+ if (isGradientSectionSurfaceRuntimeRule(input.rule)) return compileGradientSectionBackground(input.rule.background, input.rule.foreground, input.surfaceResolutionContext.palette);
19588
+ if (!input.rule.background || input.rule.background.type !== "image") return compileColorSectionBackground(input.surface, input.rule.background, input.rule.foreground, input.surfaceResolutionContext);
19589
+ const treatmentBackground = compileImageSurfaceTreatmentBackground(input.rule.background, input.imageSurfaceTreatment, input.rule.foreground);
19590
+ if (treatmentBackground) return withImageSurfaceMotion(treatmentBackground, input.imageSurfaceMotion);
19591
+ return withImageSurfaceMotion({
19592
+ ...input.rule.background,
19593
+ overlay: input.heroLegibility === "none" ? null : input.rules.heroLegibility[input.heroLegibility],
19594
+ ...input.rule.foreground
19595
+ }, input.imageSurfaceMotion);
19596
+ }
17150
19597
  function uniformSectionForeground(token) {
17151
19598
  return {
17152
19599
  textColor: token,
@@ -17155,6 +19602,145 @@ function uniformSectionForeground(token) {
17155
19602
  supportingColor: token
17156
19603
  };
17157
19604
  }
19605
+ function compileContainerStyles(contentFrame, rules) {
19606
+ switch (contentFrame.kind) {
19607
+ case "plain": return { sectionPaddingX: "normal" };
19608
+ case "panel": return {
19609
+ sectionPaddingX: "normal",
19610
+ containerStyles: containerStylesOverrideSchema.parse({
19611
+ ...rules.panelFrames[contentFrame.treatment],
19612
+ fullWidth: false
19613
+ })
19614
+ };
19615
+ case "flush-panel": return {
19616
+ sectionPaddingX: "none",
19617
+ containerStyles: containerStylesOverrideSchema.parse({
19618
+ ...rules.flushFrames[contentFrame.treatment],
19619
+ fullWidth: true,
19620
+ spacing: "none",
19621
+ rounded: "none"
19622
+ })
19623
+ };
19624
+ default: return assertNever(contentFrame);
19625
+ }
19626
+ }
19627
+ function shouldMoveFrameToHeroContentCard(block) {
19628
+ return block.blockKind === "block.hero" && block.heroComposition === "bottom-left" && block.appliedContentFrame.kind === "panel";
19629
+ }
19630
+ function compileHeroCompositionFields(composition) {
19631
+ switch (composition) {
19632
+ case void 0: return {};
19633
+ case "center": return {
19634
+ contentAlignment: "center",
19635
+ verticalAlignment: "center",
19636
+ contentMaxWidth: "wide"
19637
+ };
19638
+ case "bottom-left": return {
19639
+ contentAlignment: "left",
19640
+ verticalAlignment: "bottom",
19641
+ contentMaxWidth: "medium"
19642
+ };
19643
+ default: return assertNever(composition);
19644
+ }
19645
+ }
19646
+ function compileHeroRuntimeFields(input) {
19647
+ if (input.block.blockKind !== "block.hero") return {};
19648
+ const contentCardStyles = shouldMoveFrameToHeroContentCard(input.block) ? containerStylesOverrideSchema.parse({
19649
+ ...input.rules.panelFrames[input.block.appliedContentFrame.treatment],
19650
+ fullWidth: false
19651
+ }) : void 0;
19652
+ const heroLayoutStyles = {
19653
+ ...compileHeroCompositionFields(input.block.heroComposition),
19654
+ ...input.block.heroTypographyScale ? { typographyScale: input.block.heroTypographyScale } : {}
19655
+ };
19656
+ return {
19657
+ ...Object.keys(heroLayoutStyles).length > 0 ? { _heroLayoutStyles: heroLayoutStyles } : {},
19658
+ ...contentCardStyles ? { _contentCardStyles: contentCardStyles } : {}
19659
+ };
19660
+ }
19661
+ /**
19662
+ * The compiled card surface: the role a Look asked for, stored as-is.
19663
+ *
19664
+ * The renderer addresses the theme's `.card-role-*` alias, so no variant is
19665
+ * resolved here and the content survives a site-style swap. `none` is the
19666
+ * absence of a card surface, which is already what "no card styles" means —
19667
+ * emitting it would only give the renderer a way to suppress a surface another
19668
+ * field asked for.
19669
+ */
19670
+ function compileCardStyles(input) {
19671
+ const role = input.cardRole === "none" ? null : input.cardRole ?? null;
19672
+ if (!role) return void 0;
19673
+ return cardStylesOverrideSchema.parse({ role });
19674
+ }
19675
+ function resolveEyebrowTreatmentForRuntime(block, rules) {
19676
+ return block.eyebrowTreatment ?? rules.defaultEyebrowTreatment ?? block.appliedEyebrowTreatment;
19677
+ }
19678
+ /** Compiles one resolved semantic block plan into legacy block runtime fields. */
19679
+ function compileBlockRuntimeFields(input) {
19680
+ const designRules = input.designRules ?? defaultDesignRuntimeRules;
19681
+ const componentRules = input.componentRules ?? defaultComponentRuntimeRules;
19682
+ const sectionSpacing = input.sectionSpacing ?? "comfortable";
19683
+ const visualSectionSurface = resolveVisualSectionSurfaceForBlock(input.block);
19684
+ const eyebrowTreatment = resolveEyebrowTreatmentForRuntime(input.block, designRules);
19685
+ const { containerStyles, sectionPaddingX } = compileContainerStyles(input.block.appliedContentFrame, componentRules);
19686
+ const heroRuntimeFields = compileHeroRuntimeFields({
19687
+ block: input.block,
19688
+ rules: componentRules
19689
+ });
19690
+ const shouldSuppressContainerFrame = shouldMoveFrameToHeroContentCard(input.block);
19691
+ const cardStyles = compileCardStyles({ cardRole: input.block.appliedCardRole });
19692
+ return {
19693
+ blockId: input.block.blockId,
19694
+ visualSectionSurface,
19695
+ sectionPaddingX,
19696
+ fields: {
19697
+ _frameStyles: input.block.appliedContentFrame,
19698
+ _sectionStyles: compileSectionStyles({
19699
+ surface: visualSectionSurface,
19700
+ spacing: sectionSpacing,
19701
+ surfaceResolutionContext: input.surfaceResolutionContext,
19702
+ rules: designRules,
19703
+ sectionBackgroundPaints: input.block.appliedSectionBackgroundPaints,
19704
+ sectionHeight: input.block.appliedSectionHeight,
19705
+ heroLegibility: input.block.appliedHeroLegibility,
19706
+ imageSurfaceTreatment: input.block.appliedImageSurfaceTreatment,
19707
+ imageSurfaceMotion: input.block.appliedImageSurfaceMotion,
19708
+ tileTreatment: input.block.appliedTileTreatment,
19709
+ eventListTreatment: input.block.appliedEventListTreatment,
19710
+ eyebrowTreatment,
19711
+ accordionIconTreatment: input.block.appliedAccordionIconTreatment
19712
+ }),
19713
+ ...containerStyles && !shouldSuppressContainerFrame ? { _containerStyles: containerStyles } : {},
19714
+ ...cardStyles ? { _cardStyles: cardStyles } : {},
19715
+ ...heroRuntimeFields,
19716
+ ...input.block.appearancePresetId ? { blockLook: input.block.appearancePresetId } : {},
19717
+ ...input.block.appliedComposition ? { blockComposition: input.block.appliedComposition } : {}
19718
+ }
19719
+ };
19720
+ }
19721
+ /**
19722
+ * Compiles a resolved page plan into legacy runtime fields for each resolved
19723
+ * block, plus the public runtime joins between them.
19724
+ *
19725
+ * Joins come from `resolveJoinTreatment`; plans no longer carry a treatment.
19726
+ * Only joins whose two blocks were compiled are kept, and they leave as intent
19727
+ * only: the blocks renderer composes each one from final content after
19728
+ * omission, including whether it draws at all (issue 1422).
19729
+ */
19730
+ function compilePageRuntimeFields(input) {
19731
+ const blocks = input.resolved.blocks.map((block) => compileBlockRuntimeFields({
19732
+ block,
19733
+ surfaceResolutionContext: input.surfaceResolutionContext,
19734
+ designRules: input.designRules,
19735
+ componentRules: input.componentRules,
19736
+ sectionSpacing: input.sectionSpacing
19737
+ }));
19738
+ const compiledIds = new Set(blocks.map((block) => block.blockId));
19739
+ return {
19740
+ blocks,
19741
+ joins: input.joins.filter((join) => compiledIds.has(join.previousBlockId) && compiledIds.has(join.nextBlockId)).map(toPageRuntimeJoin)
19742
+ };
19743
+ }
17158
19744
  //#endregion
17159
19745
  //#region ../theme-core/src/site-styles/curatedSiteStyles.ts
17160
19746
  /** Keyed by the offered looks, so adding a look without its hero Look doesn't compile. */
@@ -17860,6 +20446,21 @@ const loomLooks = {
17860
20446
  treatment: "faq-beside",
17861
20447
  roleMap: loomRoles
17862
20448
  },
20449
+ {
20450
+ id: id("list-ticked-points"),
20451
+ treatment: "list-ticks",
20452
+ roleMap: loomRoles
20453
+ },
20454
+ {
20455
+ id: id("list-two-columns"),
20456
+ treatment: "list-columns",
20457
+ roleMap: loomRoles
20458
+ },
20459
+ {
20460
+ id: id("list-headed-cards"),
20461
+ treatment: "list-cards",
20462
+ roleMap: loomRoles
20463
+ },
17863
20464
  {
17864
20465
  id: id("faq-questions-two-columns"),
17865
20466
  treatment: "faq-columns",
@@ -18153,6 +20754,21 @@ const poiseOffers = [
18153
20754
  itemRoles: { items: "card" },
18154
20755
  roleMap: poiseRoles
18155
20756
  },
20757
+ {
20758
+ id: id("list-ticked-points"),
20759
+ treatment: "list-ticks",
20760
+ roleMap: poiseRoles
20761
+ },
20762
+ {
20763
+ id: id("list-two-columns"),
20764
+ treatment: "list-columns",
20765
+ roleMap: poiseRoles
20766
+ },
20767
+ {
20768
+ id: id("list-headed-cards"),
20769
+ treatment: "list-cards",
20770
+ roleMap: poiseRoles
20771
+ },
18156
20772
  {
18157
20773
  id: id("faq-questions-under-title"),
18158
20774
  treatment: "faq-under",
@@ -18606,6 +21222,21 @@ const havenOffers = [
18606
21222
  itemRoles: { items: "card" },
18607
21223
  roleMap: havenRoles
18608
21224
  },
21225
+ {
21226
+ id: id("list-ticked-points"),
21227
+ treatment: "list-ticks",
21228
+ roleMap: havenRoles
21229
+ },
21230
+ {
21231
+ id: id("list-two-columns"),
21232
+ treatment: "list-columns",
21233
+ roleMap: havenRoles
21234
+ },
21235
+ {
21236
+ id: id("list-headed-cards"),
21237
+ treatment: "list-cards",
21238
+ roleMap: havenRoles
21239
+ },
18609
21240
  {
18610
21241
  id: id("faq-questions-under-title"),
18611
21242
  treatment: "faq-under",
@@ -19098,6 +21729,21 @@ const brookOffers = [
19098
21729
  treatment: "faq-beside",
19099
21730
  roleMap: brookRoles
19100
21731
  },
21732
+ {
21733
+ id: id("list-ticked-points"),
21734
+ treatment: "list-ticks",
21735
+ roleMap: brookRoles
21736
+ },
21737
+ {
21738
+ id: id("list-two-columns"),
21739
+ treatment: "list-columns",
21740
+ roleMap: brookRoles
21741
+ },
21742
+ {
21743
+ id: id("list-headed-cards"),
21744
+ treatment: "list-cards",
21745
+ roleMap: brookRoles
21746
+ },
19101
21747
  {
19102
21748
  id: id("faq-questions-two-columns"),
19103
21749
  treatment: "faq-columns",
@@ -19571,6 +22217,21 @@ const folioLooks = {
19571
22217
  itemRoles: { items: "card" },
19572
22218
  roleMap: folioRoles
19573
22219
  },
22220
+ {
22221
+ id: id("list-ticked-points"),
22222
+ treatment: "list-ticks",
22223
+ roleMap: folioRoles
22224
+ },
22225
+ {
22226
+ id: id("list-two-columns"),
22227
+ treatment: "list-columns",
22228
+ roleMap: folioRoles
22229
+ },
22230
+ {
22231
+ id: id("list-headed-cards"),
22232
+ treatment: "list-cards",
22233
+ roleMap: folioRoles
22234
+ },
19574
22235
  {
19575
22236
  id: id("faq-questions-two-columns"),
19576
22237
  treatment: "faq-columns",
@@ -19940,6 +22601,21 @@ const fulcrumLooks = {
19940
22601
  treatment: "faq-beside",
19941
22602
  roleMap: fulcrumRoles
19942
22603
  },
22604
+ {
22605
+ id: id("list-ticked-points"),
22606
+ treatment: "list-ticks",
22607
+ roleMap: fulcrumRoles
22608
+ },
22609
+ {
22610
+ id: id("list-two-columns"),
22611
+ treatment: "list-columns",
22612
+ roleMap: fulcrumRoles
22613
+ },
22614
+ {
22615
+ id: id("list-headed-cards"),
22616
+ treatment: "list-cards",
22617
+ roleMap: fulcrumRoles
22618
+ },
19943
22619
  {
19944
22620
  id: id("faq-questions-two-columns"),
19945
22621
  treatment: "faq-columns",
@@ -20233,6 +22909,21 @@ const posterOffers = [
20233
22909
  treatment: "faq-beside",
20234
22910
  roleMap: posterRoles
20235
22911
  },
22912
+ {
22913
+ id: id("list-ticked-points"),
22914
+ treatment: "list-ticks",
22915
+ roleMap: posterRoles
22916
+ },
22917
+ {
22918
+ id: id("list-two-columns"),
22919
+ treatment: "list-columns",
22920
+ roleMap: posterRoles
22921
+ },
22922
+ {
22923
+ id: id("list-headed-cards"),
22924
+ treatment: "list-cards",
22925
+ roleMap: posterRoles
22926
+ },
20236
22927
  {
20237
22928
  id: id("faq-questions-two-columns"),
20238
22929
  treatment: "faq-columns",
@@ -20728,6 +23419,21 @@ const lanternLooks = {
20728
23419
  itemRoles: { items: "card" },
20729
23420
  roleMap: lanternRoles
20730
23421
  },
23422
+ {
23423
+ id: id("list-ticked-points"),
23424
+ treatment: "list-ticks",
23425
+ roleMap: lanternRoles
23426
+ },
23427
+ {
23428
+ id: id("list-two-columns"),
23429
+ treatment: "list-columns",
23430
+ roleMap: lanternRoles
23431
+ },
23432
+ {
23433
+ id: id("list-headed-cards"),
23434
+ treatment: "list-cards",
23435
+ roleMap: lanternRoles
23436
+ },
20731
23437
  {
20732
23438
  id: id("faq-questions-two-columns"),
20733
23439
  treatment: "faq-columns",
@@ -21053,6 +23759,21 @@ const measureLooks = {
21053
23759
  treatment: "faq-beside",
21054
23760
  roleMap: measureRoles
21055
23761
  },
23762
+ {
23763
+ id: id("list-two-columns"),
23764
+ treatment: "list-columns",
23765
+ roleMap: measureRoles
23766
+ },
23767
+ {
23768
+ id: id("list-ticked-points"),
23769
+ treatment: "list-ticks",
23770
+ roleMap: measureRoles
23771
+ },
23772
+ {
23773
+ id: id("list-headed-cards"),
23774
+ treatment: "list-cards",
23775
+ roleMap: measureRoles
23776
+ },
21056
23777
  {
21057
23778
  id: id("faq-questions-under-title"),
21058
23779
  treatment: "faq-under",
@@ -21898,6 +24619,12 @@ function requireCuratedSiteStyle(id) {
21898
24619
  if (!style) throw new UnavailableSiteStyleError(id);
21899
24620
  return style;
21900
24621
  }
24622
+ function designRuntimeRulesForSiteStyle(siteStyle) {
24623
+ return siteStyle?.designRuntimeRules ?? defaultDesignRuntimeRules;
24624
+ }
24625
+ function componentRuntimeRulesForSiteStyle(siteStyle) {
24626
+ return siteStyle?.componentRuntimeRules ?? defaultComponentRuntimeRules;
24627
+ }
21901
24628
  function curatedStyleTemplate(input) {
21902
24629
  return {
21903
24630
  id: asDesignSystemTemplateId(`template:${input.id.replace("site-style:", "")}`),
@@ -21965,7 +24692,9 @@ function withPriceLooks(looks, roleMap, featuredRoleMap = roleMap) {
21965
24692
  ]
21966
24693
  };
21967
24694
  }
21968
- asPageFlowPresetId("generated-default");
24695
+ //#endregion
24696
+ //#region ../theme-core/src/site-styles/siteStyleBlockPolicies.ts
24697
+ const defaultPolicyPageFlowPresetId = asPageFlowPresetId("generated-default");
21969
24698
  const southWestTwerkSchoolSiteStyleId = asSiteStyleId("site-style:south-west-twerk-school");
21970
24699
  const heroBrandScrimFixedFrameLookId = asAppearancePresetId("hero-brand-scrim-fixed-frame");
21971
24700
  const classicHeroLayoutVariantKey = asLayoutVariantKey("classic");
@@ -21981,6 +24710,15 @@ const registeredSiteStyleBlockPolicies = [{
21981
24710
  hideDisallowedLayouts: true
21982
24711
  }
21983
24712
  }];
24713
+ function buildInitialPolicyPageDesignIntent(siteStyleId) {
24714
+ return {
24715
+ schemaVersion: 2,
24716
+ siteStyleId,
24717
+ pageFlowPresetId: defaultPolicyPageFlowPresetId,
24718
+ blockLookPins: [],
24719
+ boundaryPins: []
24720
+ };
24721
+ }
21984
24722
  function deriveSiteStyleBlockPolicy(input) {
21985
24723
  return registeredSiteStyleBlockPolicies.find((policy) => policy.siteStyleId === input.siteStyleId && policy.blockKind === input.blockKind) ?? { kind: "open" };
21986
24724
  }
@@ -21998,6 +24736,20 @@ function normalizeLayoutVariantForPolicy(policy, layoutVariantKey) {
21998
24736
  default: return assertNever(policy, "Unhandled site style block policy");
21999
24737
  }
22000
24738
  }
24739
+ function filterLayoutProfilesForPolicy(policy, layoutProfiles) {
24740
+ switch (policy.kind) {
24741
+ case "open": return layoutProfiles;
24742
+ case "locked-look-and-layouts": return layoutProfiles.filter((profile) => isLayoutVariantAllowedByPolicy(policy, profile.variantKey));
24743
+ default: return assertNever(policy, "Unhandled site style block policy");
24744
+ }
24745
+ }
24746
+ function filterLookIdsForPolicy(policy, looks) {
24747
+ switch (policy.kind) {
24748
+ case "open": return looks;
24749
+ case "locked-look-and-layouts": return looks.filter((look) => look.id === policy.lookId);
24750
+ default: return assertNever(policy, "Unhandled site style block policy");
24751
+ }
24752
+ }
22001
24753
  //#endregion
22002
24754
  //#region ../theme-core/src/site-styles/effectiveArrangement.ts
22003
24755
  /** Content stage: legacy Looks leave arrangement to stored intent and defaults. */
@@ -22090,6 +24842,218 @@ function lookFactHolds(fact, facts, audience) {
22090
24842
  }
22091
24843
  //#endregion
22092
24844
  //#region ../theme-core/src/site-styles/lookResolution.ts
24845
+ function blockAppearancePresetSupportsBlockKind(preset, blockKind) {
24846
+ return preset.blockKinds.some((candidate) => candidate === blockKind);
24847
+ }
24848
+ function preferredAppearanceTargetForBlockKind(blockKind) {
24849
+ switch (blockKind) {
24850
+ case "block.event-calendar":
24851
+ case "block.event-listing": return "events";
24852
+ default: return null;
24853
+ }
24854
+ }
24855
+ function sortCompatibleBlockAppearancePresets(blockKind, options) {
24856
+ const preferredTarget = preferredAppearanceTargetForBlockKind(blockKind);
24857
+ if (!preferredTarget) return options;
24858
+ return [...options].sort((left, right) => {
24859
+ const leftPreset = appearancePresets.find((preset) => preset.id === left.id);
24860
+ const rightPreset = appearancePresets.find((preset) => preset.id === right.id);
24861
+ const leftPreferred = leftPreset?.target === preferredTarget;
24862
+ if (leftPreferred === (rightPreset?.target === preferredTarget)) return 0;
24863
+ return leftPreferred ? -1 : 1;
24864
+ });
24865
+ }
24866
+ function blockAppearancePresetSupportsLayoutProfile(preset, profile, input = {}) {
24867
+ const constraints = isRecipeAppearancePreset(preset) ? preset.structure.constraints : void 0;
24868
+ if (!constraints || !constraints.layoutFamilies && !constraints.layoutVariantKeys) return true;
24869
+ if (!profile) return input.allowLayoutConstrainedPresetWithoutProfile ?? true;
24870
+ return layoutProfileSupportsConstraints(profile, constraints);
24871
+ }
24872
+ function resolveBlockAppearancePreset(preset, layoutProfile = null) {
24873
+ return {
24874
+ id: asAppearancePresetId(preset.id),
24875
+ label: preset.label,
24876
+ design: resolveBlockAppearancePresetDesign(preset, layoutProfile)
24877
+ };
24878
+ }
24879
+ function siteStyleSupportsLookDesign(siteStyle, preset, capabilities) {
24880
+ if (isRecipeAppearancePreset(preset)) return cardSystemDefinesRole(siteStyle.themeOverrides?.cards ?? null, preset.design.cardRole ?? "none") ? { kind: "available" } : {
24881
+ kind: "unavailable",
24882
+ reason: "card-role-not-supported"
24883
+ };
24884
+ return arrangementStyleAvailability(siteStyle.looks, preset, capabilities);
24885
+ }
24886
+ function getCompatibleBlockAppearancePresets(input) {
24887
+ const options = appearancePresets.flatMap((preset) => {
24888
+ if (!isRecipeAppearancePreset(preset) || !blockAppearancePresetSupportsBlockKind(preset, input.blockKind) || !blockAppearancePresetSupportsLayoutProfile(preset, input.layoutProfile ?? null, { allowLayoutConstrainedPresetWithoutProfile: input.allowLayoutConstrainedPresetWithoutProfile })) return [];
24889
+ const resolved = resolveBlockAppearancePreset(preset, input.layoutProfile ?? null);
24890
+ return input.siteStyle && siteStyleSupportsLookDesign(input.siteStyle, {
24891
+ ...preset,
24892
+ design: resolved.design
24893
+ }).kind === "unavailable" ? [] : [resolved];
24894
+ });
24895
+ const sortedOptions = sortCompatibleBlockAppearancePresets(input.blockKind, options);
24896
+ const recommendedIds = input.siteStyle?.looks.kind === "recipe" ? input.siteStyle.looks.recommendedAppearancePresetIds : [];
24897
+ if (recommendedIds.length === 0) return sortedOptions;
24898
+ const recommended = recommendedIds.flatMap((presetId) => sortedOptions.find((option) => option.id === presetId) ?? []);
24899
+ const alreadyIncludedIds = new Set(recommended.map((option) => option.id));
24900
+ return [...recommended, ...sortedOptions.filter((option) => !alreadyIncludedIds.has(option.id))];
24901
+ }
24902
+ function lookCapabilitiesMatch(input) {
24903
+ const arrangement = input.look.structure.byMode[input.mode ?? "default"];
24904
+ return cardListPartsMatch(input) && input.look.blockKinds.some((kind) => kind === input.blockKind) && lookModes(input.look).includes(input.mode) && arrangement !== void 0 && input.arrangementKeys.includes(arrangement) && assignedItemRoles(input.look, input.itemRoles, input.slotRoles).every((role) => input.mappedRoles.includes(role)) && [...input.look.structure.knobs, ...Object.keys(input.look.structure.forcedKnobs ?? {})].every((knob) => input.knobBuffet.includes(knob) || input.look.structure.family !== void 0 && !knobAppliesToBlock(knob, input.blockKind));
24905
+ }
24906
+ /** Family Looks expose only the knobs owned by each supplying block. */
24907
+ function knobAppliesToBlock(knob, blockKind) {
24908
+ const entry = Object.entries(lookKnobBlocks).find(([id]) => id === knob);
24909
+ if (!entry) return true;
24910
+ const blocks = entry[1];
24911
+ return typeof blocks === "string" ? blocks === blockKind : blocks.some((block) => block === blockKind);
24912
+ }
24913
+ function cardListPartsMatch(input) {
24914
+ const supplied = input.itemParts ?? Object.entries(cardListBlockParts).find(([kind]) => kind === input.blockKind)?.[1] ?? [];
24915
+ return input.look.structure.family?.requires.every((part) => supplied.includes(part)) ?? true;
24916
+ }
24917
+ /** Shared design-stage pin resolution. */
24918
+ function resolveLookForBlock(input) {
24919
+ if (input.style?.looks.kind === "offers") return resolveArrangementLookForBlock({
24920
+ ...input,
24921
+ looks: input.style.looks
24922
+ });
24923
+ const options = input.recipeOptions ?? getCompatibleBlockAppearancePresets({
24924
+ blockKind: input.blockKind,
24925
+ layoutProfile: input.layoutProfile,
24926
+ siteStyle: input.style
24927
+ });
24928
+ const pinned = input.pin ? options.find((look) => look.id === input.pin) : null;
24929
+ if (pinned) return {
24930
+ kind: "recipe",
24931
+ look: pinned,
24932
+ source: "pinned"
24933
+ };
24934
+ const autoId = catalogueAutoLookId(input.style, options);
24935
+ const automatic = options.find((look) => look.id === autoId);
24936
+ return automatic ? {
24937
+ kind: "recipe",
24938
+ look: automatic,
24939
+ source: "auto"
24940
+ } : {
24941
+ kind: "none",
24942
+ reason: options.length ? "no-auto-look" : "block-has-no-looks"
24943
+ };
24944
+ }
24945
+ function catalogueAutoLookId(style, options) {
24946
+ if (style?.looks.kind !== "recipe") return null;
24947
+ return style.looks.recommendedAppearancePresetIds.find((id) => options.some((look) => look.id === id)) ?? null;
24948
+ }
24949
+ function resolveArrangementLookForBlock(input) {
24950
+ const catalogue = input.catalogue ?? appearancePresets.filter(isArrangementAppearancePreset);
24951
+ const available = (look) => arrangementStyleAvailability(input.looks, look, input.capabilities).kind === "available";
24952
+ const options = input.looks.offers.flatMap((offer) => {
24953
+ const entry = lookDefinitionForId(offer.id, catalogue);
24954
+ return entry !== null && entry.blockKinds.some((kind) => kind === input.blockKind) && lookModes(entry).includes(input.mode) && available(entry) ? [entry] : [];
24955
+ });
24956
+ const automatic = options[0];
24957
+ if (!automatic) return {
24958
+ kind: "none",
24959
+ reason: "no-auto-look"
24960
+ };
24961
+ const requested = input.pin === null ? null : lookDefinitionForId(input.pin, catalogue);
24962
+ if (requested === null || !requested.blockKinds.some((kind) => kind === input.blockKind)) return {
24963
+ kind: "offered",
24964
+ look: automatic,
24965
+ source: "auto"
24966
+ };
24967
+ if (!lookModes(requested).includes(input.mode)) return {
24968
+ kind: "mode-mismatch",
24969
+ requested: requested.id,
24970
+ look: automatic
24971
+ };
24972
+ if (options.some((option) => option.id === requested.id)) return {
24973
+ kind: "offered",
24974
+ look: requested,
24975
+ source: "pinned"
24976
+ };
24977
+ const fallback = followStyleFallback(requested, options, catalogue, input.mode, [], /* @__PURE__ */ new Set());
24978
+ return fallback === null ? {
24979
+ kind: "offered",
24980
+ look: automatic,
24981
+ source: "auto"
24982
+ } : {
24983
+ kind: "style-fallback",
24984
+ requested: requested.id,
24985
+ ...fallback
24986
+ };
24987
+ }
24988
+ function followStyleFallback(look, options, catalogue, mode, chain, visited) {
24989
+ if (visited.has(look.id) || !lookModes(look).includes(mode)) return null;
24990
+ const nextChain = [...chain, look.id];
24991
+ if (options.some((option) => option.id === look.id)) return {
24992
+ look,
24993
+ chain: nextChain
24994
+ };
24995
+ const nextVisited = /* @__PURE__ */ new Set([...visited, look.id]);
24996
+ return look.structure.styleFallback.map((lookId) => lookDefinitionForId(lookId, catalogue)).filter((next) => next !== null && next.blockKinds.some((kind) => look.blockKinds.includes(kind))).map((next) => followStyleFallback(next, options, catalogue, mode, nextChain, nextVisited)).find((result) => result !== null) ?? null;
24997
+ }
24998
+ function compileArrangementLookRuntime(input) {
24999
+ const selections = combinedCalendarSelections(input.style, input.selected, input.looks);
25000
+ const selected = Object.fromEntries(Object.entries(selections).map(([mode, look]) => [mode, input.purpose?.kind === "published" ? resolvePublishedLook({
25001
+ look,
25002
+ facts: input.purpose.facts,
25003
+ audience: "public",
25004
+ catalogue: input.looks
25005
+ }) : look]));
25006
+ const required = Object.values(selected).flatMap((look) => input.purpose?.kind === "published" ? [look] : lookContentFallbacks(look, input.looks));
25007
+ const looks = input.purpose?.kind === "catalogue" ? [...new Map([...input.looks, ...Object.values(selected)].map((look) => [look.id, look])).values()] : [...new Map(required.map((look) => [look.id, look])).values()];
25008
+ const surfaceContext = surfaceTransportContext(input.context);
25009
+ const available = looks.flatMap((look) => {
25010
+ const offer = input.style.offers.find((candidate) => candidate.id === look.id);
25011
+ if (!offer) return [];
25012
+ return [{
25013
+ look,
25014
+ itemRoles: mergeItemRoles(look.structure.itemRoles, offer.itemRoles),
25015
+ slotRoles: mergeSlotRoles(look, offer.slotRoles),
25016
+ roleMap: offer.roleMap,
25017
+ treatment: offer.treatment,
25018
+ skin: input.style.skin,
25019
+ removeKnobs: offer.removeKnobs ?? [],
25020
+ addKnobs: offer.addKnobs ?? [],
25021
+ knobValues: offer.knobValues ?? {},
25022
+ ...offer.surfaceTints ? { surfaceTints: offer.surfaceTints } : {},
25023
+ ...offer.photoCopyPlacement ? { photoCopyPlacement: offer.photoCopyPlacement } : {}
25024
+ }];
25025
+ });
25026
+ return {
25027
+ available,
25028
+ surfaces: input.style.surfaces,
25029
+ surfaceContext,
25030
+ byMode: Object.fromEntries(Object.entries(selected).flatMap(([mode, look]) => {
25031
+ const compiled = available.find((candidate) => candidate.look.id === look.id);
25032
+ return compiled ? [[mode, compiled]] : [];
25033
+ })),
25034
+ fieldGrounds: fieldGroundTokens(input.style.surfaces),
25035
+ rhythm: sectionRhythmSurfaces(input.style, input.flowPreset).flatMap((spec) => {
25036
+ const surface = resolveSurface(spec, surfaceContext);
25037
+ return surface.kind === "owned" && surface.paint.kind === "solid" ? [{
25038
+ type: "color",
25039
+ color: surface.paint.token,
25040
+ textColor: surface.foreground.text,
25041
+ headingColor: surface.foreground.heading,
25042
+ linkColor: surface.foreground.link,
25043
+ supportingColor: surface.foreground.supporting
25044
+ }] : [];
25045
+ })
25046
+ };
25047
+ }
25048
+ /** Later entry/template binding may supply the content or settings, so retain the finite fallback closure. */
25049
+ function lookContentFallbacks(look, catalogue, visited = /* @__PURE__ */ new Set()) {
25050
+ if (visited.has(look.id)) return [];
25051
+ const nextVisited = /* @__PURE__ */ new Set([...visited, look.id]);
25052
+ return [look, ...look.structure.whenMissing.flatMap((rule) => {
25053
+ const fallback = catalogue.find((entry) => entry.id === rule.look && entry.blockKinds.some((kind) => look.blockKinds.includes(kind)));
25054
+ return fallback ? lookContentFallbacks(fallback, catalogue, nextVisited) : [];
25055
+ })];
25056
+ }
22093
25057
  function lookDefinitionForId(lookId, catalogue = appearancePresets.filter(isArrangementAppearancePreset)) {
22094
25058
  return catalogue.find((entry) => entry.id === lookId) ?? null;
22095
25059
  }
@@ -22144,6 +25108,23 @@ const arrangementLookHooks = [
22144
25108
  "data-list-group"
22145
25109
  ];
22146
25110
  const arrangementAppearancePresets = appearancePresets.filter(isArrangementAppearancePreset);
25111
+ function arrangementStyleAvailability(style, preset, capabilities) {
25112
+ if (style.kind !== "offers" || capabilities === void 0) return {
25113
+ kind: "unavailable",
25114
+ reason: "arrangement-not-supported"
25115
+ };
25116
+ const offer = style.offers.find((candidate) => candidate.id === preset.id);
25117
+ const surfacesDeclared = Object.keys(style.surfaces).every((surface) => capabilities.declaredSurfaces.includes(surface));
25118
+ return offer && surfacesDeclared && lookCapabilitiesMatch({
25119
+ ...capabilities,
25120
+ look: preset,
25121
+ itemRoles: offer.itemRoles,
25122
+ slotRoles: offer.slotRoles
25123
+ }) ? { kind: "available" } : {
25124
+ kind: "unavailable",
25125
+ reason: "arrangement-not-supported"
25126
+ };
25127
+ }
22147
25128
  /** A style cannot add a detail from another block that would silently do nothing. */
22148
25129
  function validateOfferKnobs(style, catalogue) {
22149
25130
  style.offers.forEach((offer) => {
@@ -22179,6 +25160,52 @@ function itemSurfaceSpec(role, ground, style, base) {
22179
25160
  if (!spec) throw new Error(`Undeclared item surface ${name}`);
22180
25161
  return spec;
22181
25162
  }
25163
+ function assignedItemRoles(look, overrides, slotRoles) {
25164
+ const roles = mergeItemRoles(look.structure.itemRoles, overrides);
25165
+ return [
25166
+ ...Object.values(mergeSlotRoles(look, slotRoles)),
25167
+ ...roles.container ? [roles.container] : [],
25168
+ ...roles.items ? [roles.items] : [],
25169
+ ...roles.featured ? [roles.featured] : [],
25170
+ ...Object.values(roles.at ?? {})
25171
+ ];
25172
+ }
25173
+ /** An offer's slot roles extend the Look's, as its item roles do. */
25174
+ function mergeSlotRoles(look, overrides = {}) {
25175
+ return {
25176
+ ...look.structure.slotRoles,
25177
+ ...overrides
25178
+ };
25179
+ }
25180
+ /** A style offer extends the shared assignment without replacing its other positions. */
25181
+ function mergeItemRoles(defaults, overrides = {}) {
25182
+ return {
25183
+ ...defaults,
25184
+ ...overrides,
25185
+ at: {
25186
+ ...defaults.at,
25187
+ ...overrides.at
25188
+ }
25189
+ };
25190
+ }
25191
+ /** A combined selection always carries its month view: the style's automatic month Look unless one was chosen. */
25192
+ function combinedCalendarSelections(style, selected, catalogue) {
25193
+ if (!selected.combined || selected.calendar) return selected;
25194
+ const month = style.offers.map((offer) => lookDefinitionForId(offer.id, catalogue)).find((look) => look !== null && look.blockKinds.includes("block.event-calendar") && lookModes(look).includes("calendar"));
25195
+ if (!month) throw new Error("Combined calendar needs an offered month Look");
25196
+ return {
25197
+ ...selected,
25198
+ calendar: month
25199
+ };
25200
+ }
25201
+ /** The same admitted rhythm supplies editor facts and compiled section paint. */
25202
+ function sectionRhythmSurfaces(style, flow) {
25203
+ return (style.rhythm?.[flow] ?? []).flatMap((name) => {
25204
+ const spec = style.surfaces[name];
25205
+ if (!spec) throw new Error(`Undeclared rhythm surface ${name}`);
25206
+ return [spec];
25207
+ });
25208
+ }
22182
25209
  //#endregion
22183
25210
  //#region ../theme-core/src/site-styles/lookSurfacePresentation.ts
22184
25211
  /** Selection is the only per-item operation; all paint has already been decided. */
@@ -22490,7 +25517,7 @@ function createZodCodec(schema) {
22490
25517
  return {
22491
25518
  encode: (value) => value,
22492
25519
  decode: (input) => {
22493
- const parsed = schema.safeParse(input);
25520
+ const parsed = z.safeParse(schema, input);
22494
25521
  if (parsed.success) return decodeSuccess(parsed.data);
22495
25522
  return decodeFailure(parsed.error.issues.map((issue) => ({
22496
25523
  path: zodIssuePath(issue.path),
@@ -22509,6 +25536,7 @@ const unsupportedEventRegistrationPageSurfaceSubjectSchema = z.object({
22509
25536
  kind: z.literal("unsupported"),
22510
25537
  reason: z.enum([
22511
25538
  "unsupportedSubject",
25539
+ "invalidAppointmentServiceId",
22512
25540
  "invalidEventSeriesId",
22513
25541
  "invalidEventSeriesBookingScope",
22514
25542
  "invalidEventOfferingId",
@@ -22517,10 +25545,13 @@ const unsupportedEventRegistrationPageSurfaceSubjectSchema = z.object({
22517
25545
  ])
22518
25546
  });
22519
25547
  const eventRegistrationPageSurfaceSubjectSchema = z.unknown().transform((value, ctx) => {
22520
- const unsupported = unsupportedEventRegistrationPageSurfaceSubjectSchema.safeParse(value);
25548
+ const unsupported = z.safeParse(unsupportedEventRegistrationPageSurfaceSubjectSchema, value);
22521
25549
  if (unsupported.success) return unsupported.data;
22522
- const parsed = parseEventPageSurfaceSubject(value);
22523
- if (parsed.ok) return parsed.value;
25550
+ const parsed = parsePageSurfaceSubject(value);
25551
+ if (parsed.ok) return parsed.value.kind === "appointmentService" ? {
25552
+ kind: "unsupported",
25553
+ reason: "unsupportedSubject"
25554
+ } : parsed.value;
22524
25555
  ctx.addIssue({
22525
25556
  code: z.ZodIssueCode.custom,
22526
25557
  message: `Invalid event page-surface subject (${parsed.error.kind})`
@@ -22528,13 +25559,22 @@ const eventRegistrationPageSurfaceSubjectSchema = z.unknown().transform((value,
22528
25559
  return z.NEVER;
22529
25560
  });
22530
25561
  function parseEventRegistrationPageSurfaceSubject(value) {
22531
- return parseEventPageSurfaceSubject(value);
25562
+ const parsed = parsePageSurfaceSubject(value);
25563
+ if (!parsed.ok) return parsed;
25564
+ return parsed.value.kind === "appointmentService" ? err({
25565
+ kind: "unsupportedSubject",
25566
+ subjectKind: parsed.value.kind
25567
+ }) : ok$1(parsed.value);
22532
25568
  }
22533
25569
  function normalizeEventRegistrationPageSurfaceSubject(value) {
22534
25570
  const parsed = parseEventRegistrationPageSurfaceSubject(value);
22535
25571
  if (parsed.ok) return parsed.value;
22536
25572
  switch (parsed.error.kind) {
22537
25573
  case "notObject": return null;
25574
+ case "invalidAppointmentServiceId": return {
25575
+ kind: "unsupported",
25576
+ reason: "invalidAppointmentServiceId"
25577
+ };
22538
25578
  case "unsupportedSubject": return {
22539
25579
  kind: "unsupported",
22540
25580
  reason: "unsupportedSubject"
@@ -22567,20 +25607,23 @@ function resolveEventRegistrationScope(context) {
22567
25607
  kind: "occurrenceSeries",
22568
25608
  seriesId: occurrenceSeriesId
22569
25609
  };
22570
- if (context.subject?.kind === "eventSeries") return {
22571
- kind: "pageSurfaceSeries",
22572
- seriesId: context.subject.eventSeriesId
22573
- };
22574
- if (context.subject?.kind === "eventOffering") return {
22575
- kind: "pageSurfaceOffering",
22576
- offeringId: context.subject.eventOfferingId,
22577
- seriesIds: context.subject.catalogueEventSeriesIds
22578
- };
22579
- if (context.subject?.kind === "unsupported") return {
22580
- kind: "unsupportedPageSurfaceSubject",
22581
- reason: context.subject.reason
22582
- };
22583
- return { kind: "unscoped" };
25610
+ const subject = context.subject;
25611
+ switch (subject?.kind) {
25612
+ case "eventSeries": return {
25613
+ kind: "pageSurfaceSeries",
25614
+ seriesId: subject.eventSeriesId
25615
+ };
25616
+ case "eventOffering": return {
25617
+ kind: "pageSurfaceOffering",
25618
+ offeringId: subject.eventOfferingId,
25619
+ seriesIds: subject.catalogueEventSeriesIds
25620
+ };
25621
+ case "unsupported": return {
25622
+ kind: "unsupportedPageSurfaceSubject",
25623
+ reason: subject.reason
25624
+ };
25625
+ case void 0: return { kind: "unscoped" };
25626
+ }
22584
25627
  }
22585
25628
  function resolveEventRegistrationScopedEvents(events, context) {
22586
25629
  const scope = resolveEventRegistrationScope(context);
@@ -22684,6 +25727,9 @@ function createInteractiveIslandCodec(options) {
22684
25727
  };
22685
25728
  }
22686
25729
  //#endregion
25730
+ //#region ../blocks/src/system/blocks/shared/bookingPageKind.ts
25731
+ const bookingPageKindSchema = z.enum(["fullPage", "bookingPage"]);
25732
+ //#endregion
22687
25733
  //#region ../blocks/src/system/runtime/shared/navigation/pageNavigation.ts
22688
25734
  const pageNavigationSchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("page") }), z.object({
22689
25735
  kind: z.literal("embed"),
@@ -23220,6 +26266,37 @@ function projectSelectedAppointmentConsentIntoForm(form, selectedConsent) {
23220
26266
  };
23221
26267
  }
23222
26268
  //#endregion
26269
+ //#region ../blocks/src/system/runtime/shared/utils/formatting.ts
26270
+ /**
26271
+ * Shared Formatting Utilities
26272
+ *
26273
+ * Currency and date formatting helpers for registration blocks.
26274
+ */
26275
+ /**
26276
+ * Format a price in cents to a localized currency string.
26277
+ *
26278
+ * @param cents - Price in cents
26279
+ * @param currency - ISO 4217 currency code (e.g., 'USD', 'GBP')
26280
+ * @param locale - Optional locale override (defaults to the currency's locale)
26281
+ * Whole amounts drop the pence ("£245"); fractional ones keep two places ("£8.50").
26282
+ *
26283
+ * @returns Formatted price string (e.g., "£100" or "£8.50")
26284
+ */
26285
+ function formatPrice(cents, currency = "GBP", locale) {
26286
+ return formatCurrencyAmount(cents, currency, {
26287
+ decimals: "auto",
26288
+ locale
26289
+ });
26290
+ }
26291
+ /**
26292
+ * Format minor units as a plain amount for a number input, following the same
26293
+ * rule as `formatPrice`: whole amounts drop the pence ("8"), fractional ones
26294
+ * keep two places ("8.50").
26295
+ */
26296
+ function formatCentsAsCurrencyInput(amount) {
26297
+ return amount % 100 === 0 ? String(amount / 100) : (amount / 100).toFixed(2);
26298
+ }
26299
+ //#endregion
23223
26300
  //#region ../blocks/src/system/runtime/nodes/booking-form.state.ts
23224
26301
  function toTrimmedString(value) {
23225
26302
  const trimmed = value?.trim();
@@ -23468,9 +26545,6 @@ function parseBookingCurrencyInputToCents(value) {
23468
26545
  if (!Number.isFinite(parsed) || parsed < 0) return null;
23469
26546
  return Math.round(parsed * 100);
23470
26547
  }
23471
- function formatBookingCentsAsCurrencyInput(amount) {
23472
- return amount % 100 === 0 ? String(amount / 100) : (amount / 100).toFixed(2);
23473
- }
23474
26548
  function isBookingServiceSlidingAmountInRange(slidingScale, selectedAmount) {
23475
26549
  return selectedAmount !== null && selectedAmount >= slidingScale.minAmount && selectedAmount <= slidingScale.maxAmount;
23476
26550
  }
@@ -23953,6 +27027,7 @@ const bookingDateContextSchema = z.object({
23953
27027
  timeZone: z.string().transform(resolveBookingBusinessTimeZone)
23954
27028
  });
23955
27029
  const bookingSourceSchema = z.object({
27030
+ pageKind: bookingPageKindSchema.optional(),
23956
27031
  dateContext: bookingDateContextSchema,
23957
27032
  now: bookingNowSchema,
23958
27033
  demoEmailSuppressed: z.boolean().optional(),
@@ -23989,6 +27064,7 @@ const bookingDisplaySchema = z.object({
23989
27064
  });
23990
27065
  const bookingHydrationSchema = z.object({
23991
27066
  now: bookingNowSchema,
27067
+ pageKind: bookingPageKindSchema.optional(),
23992
27068
  dateContext: bookingDateContextSchema,
23993
27069
  demoEmailSuppressed: z.boolean().optional(),
23994
27070
  mailingList: bookingMailingListContextSchema.optional(),
@@ -24041,6 +27117,7 @@ const bookingFormBlockRuntime = defineClientOwnedBlockRuntime({
24041
27117
  return {
24042
27118
  display: buildBookingFormDisplay(source, form),
24043
27119
  hydration: {
27120
+ pageKind: source.pageKind,
24044
27121
  now: source.now,
24045
27122
  dateContext: source.dateContext,
24046
27123
  demoEmailSuppressed: source.demoEmailSuppressed,
@@ -24481,6 +27558,19 @@ function formatEventDateParts(args) {
24481
27558
  timeRange: formatEventTimeRange(args, args)
24482
27559
  };
24483
27560
  }
27561
+ /** A course run's first to last session date, such as `8–22 Sept 2026`. */
27562
+ function formatEventRunDates(first, last, options) {
27563
+ return formatDateRange({
27564
+ kind: "instant",
27565
+ value: toUtcIsoDateTimeString(first.startsAt)
27566
+ }, {
27567
+ kind: "instant",
27568
+ value: toUtcIsoDateTimeString(last.startsAt)
27569
+ }, options, {
27570
+ date: "short",
27571
+ order: "session"
27572
+ });
27573
+ }
24484
27574
  /** Civil calendar headings never acquire an instant's timezone shift. */
24485
27575
  function formatCalendarTitle(viewDate, view, days, timeZone) {
24486
27576
  const context = eventDateOptions({
@@ -25870,6 +28960,43 @@ function ticketPlacesLabel(remaining, display) {
25870
28960
  return formatTicketTypeRemaining(remaining);
25871
28961
  }
25872
28962
  //#endregion
28963
+ //#region ../blocks/src/system/runtime/shared/bookingPresentation.ts
28964
+ /**
28965
+ * In place, the booking panel is a skin-styled card: its slot and surface let
28966
+ * skin card rules match it, and they key on a `[data-arrangement]` ancestor,
28967
+ * so the block wraps the panel in one (`booking-panel`, which no layout rule
28968
+ * targets). In an overlay the panel carries neither.
28969
+ */
28970
+ const inPlacePanelAttributes = {
28971
+ "data-slot": "booking-panel",
28972
+ "data-surface": "surface"
28973
+ };
28974
+ const inPlaceArrangementAttributes = { "data-arrangement": "booking-panel" };
28975
+ /** One presentation decision shared by the shell, island and panel. */
28976
+ function bookingPresentation(pageKind = "fullPage") {
28977
+ return pageKind === "bookingPage" ? {
28978
+ panelAttributes: inPlacePanelAttributes,
28979
+ arrangementAttributes: inPlaceArrangementAttributes,
28980
+ host: "inPlace",
28981
+ rootClass: "event-registration--embedded",
28982
+ wrapInCard: true,
28983
+ showShellHeading: false,
28984
+ showSelectedServiceSummary: false,
28985
+ promptAsHeading: false,
28986
+ stepLabelAs: "h2"
28987
+ } : {
28988
+ panelAttributes: void 0,
28989
+ arrangementAttributes: void 0,
28990
+ host: "overlay",
28991
+ rootClass: "",
28992
+ wrapInCard: false,
28993
+ showShellHeading: true,
28994
+ showSelectedServiceSummary: true,
28995
+ promptAsHeading: true,
28996
+ stepLabelAs: "span"
28997
+ };
28998
+ }
28999
+ //#endregion
25873
29000
  //#region ../blocks/src/system/runtime/shared/signInReturnDrafts.ts
25874
29001
  /** The return address's query parameter that names the sign-in attempt. */
25875
29002
  const BOOKING_SIGN_IN_RETURN_PARAM = "rb_booking_sign_in";
@@ -25931,12 +29058,12 @@ function createSignInReturnDraftStore(draftSchema) {
25931
29058
  const stored = window.localStorage.getItem(key);
25932
29059
  if (stored === null) return { kind: "missing" };
25933
29060
  window.localStorage.removeItem(key);
25934
- const envelope = envelopeSchema.safeParse(JSON.parse(stored));
29061
+ const envelope = z.safeParse(envelopeSchema, JSON.parse(stored));
25935
29062
  if (!envelope.success || now - envelope.data.savedAt > DRAFT_LIFETIME_MS) return {
25936
29063
  kind: "taken",
25937
29064
  draft: null
25938
29065
  };
25939
- const draft = draftSchema.safeParse(envelope.data.draft);
29066
+ const draft = z.safeParse(draftSchema, envelope.data.draft);
25940
29067
  return {
25941
29068
  kind: "taken",
25942
29069
  draft: draft.success && draft.data.nonce === nonce ? draft.data : null
@@ -25958,7 +29085,7 @@ function clearSignInReturnDrafts(target) {
25958
29085
  }
25959
29086
  function savedAt(stored) {
25960
29087
  try {
25961
- const parsed = envelopeSchema.safeParse(JSON.parse(stored ?? "null"));
29088
+ const parsed = z.safeParse(envelopeSchema, JSON.parse(stored ?? "null"));
25962
29089
  return parsed.success ? parsed.data.savedAt : null;
25963
29090
  } catch {
25964
29091
  return null;
@@ -26379,24 +29506,6 @@ function getHeldPlacesBySelection(current, held) {
26379
29506
  return held?.selectionId === current.selectionId && held?.attendanceMode === current.attendanceMode ? held.lines : [];
26380
29507
  }
26381
29508
  //#endregion
26382
- //#region ../blocks/src/system/runtime/shared/utils/formatting.ts
26383
- /**
26384
- * Shared Formatting Utilities
26385
- *
26386
- * Currency and date formatting helpers for registration blocks.
26387
- */
26388
- /**
26389
- * Format a price in cents to a localized currency string.
26390
- *
26391
- * @param cents - Price in cents
26392
- * @param currency - ISO 4217 currency code (e.g., 'USD', 'GBP')
26393
- * @param locale - Optional locale override (defaults to the currency's locale)
26394
- * @returns Formatted price string (e.g., "£100.00")
26395
- */
26396
- function formatPrice(cents, currency = "GBP", locale) {
26397
- return formatCurrencyAmount(cents, currency, { locale });
26398
- }
26399
- //#endregion
26400
29509
  //#region ../blocks/src/system/runtime/nodes/event-registration/utils.ts
26401
29510
  function getPortalSubjectEmail(profile) {
26402
29511
  return profile?.email ?? null;
@@ -26585,9 +29694,9 @@ function areEntitlementsDisabledForTicketCount(ticketsCount) {
26585
29694
  * @param creditsRemaining - Credits on the pass before this booking, if known
26586
29695
  */
26587
29696
  function formatPassCreditUsageLabel(creditsRemaining) {
26588
- if (typeof creditsRemaining !== "number" || creditsRemaining <= 0) return "Uses 1 pass credit";
26589
- if (creditsRemaining === 1) return "Uses your last credit";
26590
- return `Uses 1 of ${creditsRemaining} credits`;
29697
+ if (typeof creditsRemaining !== "number" || creditsRemaining <= 0) return `Uses ${formatCreditProductUnits("event_pass", 1)} from your pass`;
29698
+ if (creditsRemaining === 1) return `Uses your last ${creditProductUnitNoun("event_pass", 1)}`;
29699
+ return `Uses 1 of your ${formatCreditProductUnits("event_pass", creditsRemaining)}`;
26591
29700
  }
26592
29701
  function transformRegistrationOptionsResponse(response) {
26593
29702
  const eligiblePasses = response.entitlements.passes.map((pass) => ({
@@ -26922,10 +30031,6 @@ function parseCurrencyInputToCents(value) {
26922
30031
  const amount = Number(trimmed);
26923
30032
  return Number.isFinite(amount) && amount >= 0 ? Math.round(amount * 100) : null;
26924
30033
  }
26925
- function formatCentsAsCurrencyInput(amount) {
26926
- const major = amount / 100;
26927
- return Number.isInteger(major) ? String(major) : major.toFixed(2);
26928
- }
26929
30034
  function getSlidingScaleForEvent(event) {
26930
30035
  const pricing = event?.pricing ?? null;
26931
30036
  return pricing?.kind === "sliding_scale" ? {
@@ -29022,7 +32127,7 @@ function buildProductDetailDisplay(product, options, selectedVariantId) {
29022
32127
  };
29023
32128
  }
29024
32129
  function passCardDisplay(pass, options) {
29025
- const creditUnit = getCreditProductCreditUnit(pass.productUseCase);
32130
+ const unitSingular = creditProductUnitNoun(pass.productUseCase, 1);
29026
32131
  return {
29027
32132
  id: pass.id,
29028
32133
  title: pass.name,
@@ -29030,10 +32135,10 @@ function passCardDisplay(pass, options) {
29030
32135
  priceLabel: formatCommercePrice(pass.price, pass.currency),
29031
32136
  ...options.cardList ? {
29032
32137
  priceAmountLabel: formatCurrencyAmount(pass.price, pass.currency, { decimals: "auto" }),
29033
- perCreditAmountLabel: options.showPricePerCredit ? `${formatCurrencyAmount(pass.pricePerCredit, pass.currency, { decimals: "auto" })} a ${creditUnit.perCreditSuffix}` : null
32138
+ perCreditAmountLabel: options.showPricePerCredit ? `${formatCurrencyAmount(pass.pricePerCredit, pass.currency, { decimals: "auto" })} a ${unitSingular}` : null
29034
32139
  } : {},
29035
- creditsLabel: `${pass.creditsTotal} ${pass.creditsTotal === 1 ? creditUnit.singular : creditUnit.plural}`,
29036
- perCreditLabel: options.showPricePerCredit ? `${formatCommercePrice(pass.pricePerCredit, pass.currency)}/${creditUnit.perCreditSuffix}` : null,
32140
+ creditsLabel: formatCreditProductUnits(pass.productUseCase, pass.creditsTotal),
32141
+ perCreditLabel: options.showPricePerCredit ? `${formatCommercePrice(pass.pricePerCredit, pass.currency)}/${unitSingular}` : null,
29037
32142
  validityLabel: options.showValidityPeriod && pass.validDays ? formatValidity(pass.validDays) : null,
29038
32143
  action: pass.purchaseAvailability === "purchasable" ? {
29039
32144
  kind: "purchase",
@@ -29193,4 +32298,4 @@ function membershipCardListContent(display) {
29193
32298
  };
29194
32299
  }
29195
32300
  //#endregion
29196
- export { resolveHeadlessEventRegistrationStatus as $, runtimeBoxBackgroundSchema as $a, arrangementLookHooks as $i, canJoinEventWaitlistOnAnyMode as $n, bookingRequiresResourceSelection as $r, getTicketTypeLineMax as $t, createInitialRegistrationFlowState as A, sectionForegroundBackground as Aa, leavePage as Ai, resolveImageSourceSetWithContext as An, formatEventPricing as Ao, selectedBookingCollectionOptionKind as Ar, confirmationPaymentRows as At, placeCountCeiling as B, offeringsPreviewCompositionTreatmentValues as Ba, defineClientOwnedBlockRuntime as Bi, formatCalendarTitle as Bn, parseEventSeriesId as Bo, bookingQuestionsAnswerDraftSchema as Br, formatTime as Bt, panelShouldOpen as C, boundaryRuntimeMetricsForDecorativeTransition as Ca, readRuntimeNow as Ci, RichText as Cn, DEFAULT_MAILING_LIST_PRIVACY_NOTE as Co, parseBookingCurrencyInputToCents as Cr, getTicketSelectionRemainingPlaces as Ct, registrationStepLabel as D, deriveSectionGround as Da, getBlockApiReadStage as Di, mediaImageHostProps as Dn, parseMailchimpInterestId as Do, resolveBookingSelectedService as Dr, withRegistrationAvailability as Dt, registrationRoute as E, applyLookPhotoTreatment as Ea, createHostedBlockApiConfig as Ei, computeMediaTransformStyle as En, parseMailchimpAudienceId as Eo, resolveBookingPaymentStep as Er, shouldLoadRegistrationOptions as Et, buildEventRegistrationPaymentOptionsViewModel as F, assertNever as Fa, defineInteractiveIslandMetaKeys as Fi, buildCalendarViewport as Fn, publicEventPricingType as Fo, applyAppointmentBookingQuestionsEvent as Fr, formatBookingWhen as Ft, resolveRegistrationAvailabilityBlocker as G, opaqueSurfaceContextFromTheme as Ga, listLookSlot as Gi, formatEventHourLabel as Gn, restoreBookingQuestionsAnswers as Gr, occurrenceTitleOverride as Gt, planRegistrationDetailsContinuation as H, toNonEmptyReadonlyArray as Ha, isDecodeSuccess as Hi, formatEventClockLabel as Hn, decideBookingQuestionsRestoration as Hr, getPortalSubjectEmail as Ht, decideEventRegistrationPayment as I, defineBlockDesignCapability as Ia, eventRegistrationPageSurfaceSubjectSchema as Ii, eventCalendarWeekStart as In, resolveExactOrFreePriceDisplay as Io, appointmentQuestionsRefusal as Ir, formatDate as It, visitorHoldsOwnPlace as J, surfaceToneFromForegroundToken as Ja, itemRole as Ji, formatTime$1 as Jn, BOOKING_FORM_DATA_RESERVED_KEYS as Jr, formatPrice as Jt, resolveRegistrationTicketContinuation as K, opaqueSurfaceDeclarations as Ka, lookListPresentationSchemaShape as Ki, formatEventNextDateFact as Kn, toBookingQuestionsAnswerDraft as Kr, transformRegistrationOptionsResponse as Kt, shouldPromptForLogin as L, defineFrameCapability as La, normalizeEventRegistrationPageSurfaceSubject as Li, eventDateLocale as Ln, resolvePricingOptionsPriceDisplay as Lo, deriveAppointmentBookingQuestions as Lr, formatEventDateTime as Lt, getDeclinedPass as M, stripStaleTransitionStyleGroup as Ma, requestSignIn as Mi, resolveImageUrlWithContext as Mn, publicEventPricingCurrency as Mo, projectSelectedAppointmentConsentIntoForm as Mr, ENTITLEMENT_SINGLE_TICKET_TOOLTIP as Mt, isRegistrationLocked as N, themeV2CompilerOwnedFieldNames as Na, buildInteractiveIslandProps as Ni, resolveMediaNodeResponsiveImage as Nn, publicEventPricingDisplay as No, resolveSelectedAppointmentConsent as Nr, areEntitlementsDisabledForTicketCount as Nt, registrationStepLabelContext as O, parseCanonicalRuntimeBackground as Oa, PAGE_NAVIGATION as Oi, renderAudio as On, parseNewsletterListId as Oo, resolveBookingSiteId as Or, registrationQuestionsMessage as Ot, registrationFlowReducer as P, resolveEffectiveKnobs as Pa, createInteractiveIslandCodec as Pi, resolvePublicMediaUrl as Pn, publicEventPricingStrategy as Po, EMPTY_APPOINTMENT_BOOKING_QUESTIONS as Pr, findSelectedTicketType as Pt, resolveEventRegistrationSubmitPlan as Q, boxBackgroundSchema as Qa, arrangementAppearancePresets as Qi, canJoinEventWaitlist as Qn, bookingPackageRequestKey as Qr, getTicketSelectionTotal as Qt, fullyBookedLabel as R, featureCardCompositionTreatmentValues as Ra, resolveEventRegistrationScopedEvents as Ri, eventDateOptions as Rn, parseSiteId as Ro, isAppointmentBookingQuestionsEvent as Rr, formatPassCreditUsageLabel as Rt, getEventSelectionMode as S, sectionShapeHook as Sa, isBlockButtonRole as Si, shownVenue as Sn, resolveBookingSignupOffer as So, normalizeBookingServices as Sr, getSlidingScaleSelectionMessage as St, registrationPresentation as T, transitionCatalogueEntries as Ta, browserReadAuthoritySchema as Ti, MediaPlaceholder as Tn, parseBrevoListId as To, resolveAppointmentCheckoutVerificationState as Tr, resolveHeldTicketPlaces as Tt, resolveGuestNextStepCheck as U, cardListFamilyBlocks as Ua, listItemPresentation as Ui, formatEventCompactDateRail as Un, deriveBookingQuestions as Ur, getTicketTypeAvailabilityLabel as Ut, planRegistrationDetailsCheck as V, testimonialsCompositionTreatmentValues as Va, defineProgressiveBlockRuntime as Vi, formatDate$1 as Vn, bookingQuestionsPaymentSnapshotSchema as Vr, getImplicitSingleTicketType as Vt, resolveRegistrationAdmission as W, cardListKnobBlocks as Wa, listLookControl as Wi, formatEventDateParts as Wn, needsBookingQuestionsRefresh as Wr, getVisibleTicketTypes as Wt, isEventRegistrationAvailable as X, TokenResolver as Xa, resolveLookSurfacePresentation as Xi, resolveEventTimeZone as Xn, applyBookingPaymentAdmission as Xr, getSingleSelectedPricingOptionId as Xt, deriveEventRegistrationSteps as Y, arrangementSlotNames as Ya, lookPresentationOnPalette as Yi, groupEventsByDate as Yn, BOOKING_FORM_DATA_RESERVED_KEY_VALUES as Yr, canRequestTicketOption as Yt, normalizeEventRegistrationMaxTickets as Z, boxBackgroundOverlaySchema as Za, selectItemSurfacePresentation as Zi, resolveRuntimeEventDestination as Zn, bookingHasPackagePaymentChoices as Zr, getTicketLineQuantity as Zt, parseStoredCommerceCartState as _, navLinkHoverColorCandidate as _a, previewStageSchema as _i, signInReturnPath as _n, nextLiveRunSessionStartMs as _o, getBookingSuccessCopy as _r, formatCentsAsCurrencyInput as _t, buildProductDetailDisplay as a, deriveSiteStyleBlockPolicy as aa, resolveBookingPaymentMode as ai, toWholeSeriesRegistrationEvent as an, itemRoleValues as ao, getRemainingPlaces as ar, buildReviewedBookingPaymentViewModel as at, resolveSelectedProduct as b, sectionShapeForGround as ba, BLOCK_BUTTON_ROLE_OPTIONS as bi, registrationDisplaySchema as bn, resolveWholeSeriesRunLifecycle as bo, isBookingServiceSlidingAmountInRange as br, getRegistrationOccurrenceId as bt, formatInterval as c, resolveCardRole as ca, getBookingServiceSlidingScale as ci, eventSignInDraftStore as cn, siteChromeBackgroundOverrideOwner as co, selectMostOpenCapacitySource as cr, findPreSelectedEvent as ct, membershipClassesLabel as d, footerForegroundCandidates as da, columnOptionSchema as di, toEventSignInDraft as dn, asSiteStyleId as do, buildBookingFormInteractiveIslandProps as dr, resolveRegistrationTarget as dt, arrangementManifestFromVariants as ea, reconcileBookingPackagePurchase as ei, hasValidPricingOptionSelection as en, tokenOrCssColorValueSchema as eo, formatEventRemainingPlaces as er, resolveHeadlessEventRegistrationView as et, passCardListContent as f, getNavLinkPreset as fa, eventButtonVariantSchema as fi, clearSignInReturnDrafts as fn, makeBoundaryId as fo, readOverrideServiceCategories as fr, resolveRouteRequiresPayment as ft, deriveCommerceCheckoutState as g, generateInteractiveChildInheritanceCSS as ga, filterAutoShowSchema as gi, readSignInReturn as gn, CANCELLED_SESSION_STATUS as go, getBookingRedirectStateFromLocation as gr, invitationSubmission as gt, buildProductCartItem as h, generateEffectsCSS as ha, eventLayoutSchema as hi, nextSignInReturnExpiry as hn, isRecord$4 as ho, formatBookingSubmissionPreparationError as hr, createRegistrationDraftData as ht, buildProductCardDisplay as i, resolvePublishedLook as ia, resolveBookingPaymentChoice as ii, toRegistrationEvents as in, cardVariantRoleValues as io, getEventAvailabilityStatus as ir, buildBookingPaymentSelectionViewModel as it, decideEventChoice as j, sectionSurfaceBase as ja, pageNavigationSchema as ji, resolveImageUrl as jn, isPublicEventPricingOptionDisplayable as jo, toSelectedCollectionOptionKind as jr, resolveFinishedPresentation as jt, areEventRegistrationPaymentSelectionsEqual as k, resolveSectionBackground as ka, canonicalUrl as ki, renderVideo as kn, formatBookingPriceDisplay as ko, resolveDefaultBookingServiceId as kr, validateFormData as kt, formatValidity as l, generateDefaultCardSystem as la, bookingNowSchema as li, eventSignInEnds as ln, asDesignBlockId as lo, groupPublicEventsByRun as lr, resolveDiscountContext as lt, buildPassCartItem as m, generateNavLinkCSS as ma, eventCalendarDisplayModeSchema as mi, decideSignInReturn as mn, parseAspectRatioValue as mo, formatBookingCentsAsCurrencyInput as mr, beginWaitlistInvitation as mt, buildCheckoutDisplay as n, resolveEffectiveArrangement as na, resolveBookingPackageSources as ni, setTicketLineQuantity as nn, cardRoleSchema as no, formatTotalCapacity as nr, toInternalPaymentSelection as nt, buildProductListDisplay as o, requireCuratedSiteStyle as oa, resolveBookingPurchasablePackages as oi, toWholeSeriesRegistrationEvents as on, openCardRoleValue as oo, isEventFull as or, paymentChoiceDetails as ot, EMPTY_COMMERCE_CART_STATE as p, buildTextContrastShadow as pa, eventCalendarDefaultViewSchema as pi, createSignInReturnDraftStore as pn, sanitizeHref as po, deriveBookingFormViewState as pr, toRegistrationRequestSubject as pt, settledRemainingPlaces as q, selectLogoVariant as qa, resolvedItemSurfaceProps as qi, formatEventTimeRange as qn, toBookingQuestionsPaymentSnapshot as qr, withOccurrenceTitle as qt, buildPassesMembershipsDisplay as r, resolveModeArrangement as ra, resolveBookingPaymentAvailability as ri, getRegistrationStartAt as rn, cardSystemSchema as ro, getEventAvailability as rr, calculateEventRegistrationPreviewTotal as rt, formatCommercePrice as s, compiledRuntimeStyleFieldNames as sa, toBookingPurchasablePackages as si, EVENT_SIGN_IN_FORM_ID as sn, surfaceCardRoleValues as so, selectEventCapacitySource as sr, paymentChoicePrice as st, buildCartDisplay as t, readStoredMode as ta, resolveBookingPackagePaymentSelection as ti, normalizeTicketSelectionLines as tn, boxlessCardVariantValue as to, formatRemainingPlaces as tr, toHeadlessPaymentSelection as tt, membershipCardListContent as u, generateFooterCss as ua, calendarTabViewsSchema as ui, eventSignInRestoration as un, asLayoutVariantKey as uo, bookingFormInteractiveIslandPropsCodec as ur, resolveEventRequiresPayment as ut, productItemKey as v, navLinkOwnsHoverForeground as va, registrationButtonVariantSchema as vi, sweepExpiredSignInReturnDrafts as vn, orderedLiveRunSessions as vo, getRegistrationSuccessCopy as vr, getCurrentTicketSelection as vt, registrationPaymentRoute as w, anglePolygonCss as wa, resolveDateRuntimeContext as wi, ImagePresets as wn, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as wo, prepareBookingSubmission as wr, parseCurrencyInputToCents as wt, REGISTRATION_STEP_LABELS as x, sectionShapeFromContent as xa, blockButtonRoleSchema as xi, resolveRegistrationDisplay as xn, parseMailingListRuntimeContext as xo, normalizeBookingFormConfig as xr, getSlidingScaleForEvent as xt, reduceCommerceCart as y, navLinkOwnsUnderline as ya, weekStartSchema as yi, placesLeftLabel as yn, resolveWholeSeriesBookingPhase as yo, getShopSuccessCopy as yr, getEligibilityFlowFlags as yt, getTicketSelectionPurpose as z, introCompositionTreatmentValues as za, createZodCodec as zi, eventLocalDateKey as zn, unsafeAsSiteId as zo, needsAppointmentQuestionsRefresh as zr, formatRegistrationSchedule as zt };
32301
+ export { resolveHeadlessEventRegistrationStatus as $, anglePolygonCss as $a, selectItemSurfacePresentation as $i, canJoinEventWaitlistOnAnyMode as $n, sanitizeHref as $o, bookingPackageRequestKey as $r, normalizeTicketSelectionLines as $t, createInitialRegistrationFlowState as A, getNavLinkPreset as Aa, canonicalUrl as Ai, resolveImageUrl as An, arrangementSlotNames as Ao, toSelectedCollectionOptionKind as Ar, resolveFinishedPresentation as At, placeCountCeiling as B, resolvePageDesignBoundaryChoice as Ba, resolveEventRegistrationScopedEvents as Bi, formatDate$1 as Bn, cardRoleSchema as Bo, needsAppointmentQuestionsRefresh as Br, getImplicitSingleTicketType as Bt, panelShouldOpen as C, surfaceResolutionContextFromTheme as Ca, isBlockButtonRole as Ci, ImagePresets as Cn, toNonEmptyReadonlyArray as Co, prepareBookingSubmission as Cr, resolveExactOrFreePriceDisplay as Cs, parseCurrencyInputToCents as Ct, registrationStepLabel as D, generateDefaultCardSystem as Da, createHostedBlockApiConfig as Di, renderAudio as Dn, opaqueSurfaceDeclarations as Do, resolveBookingSiteId as Dr, parseEventSeriesId as Ds, registrationQuestionsMessage as Dt, registrationRoute as E, resolveCardRole as Ea, browserReadAuthoritySchema as Ei, mediaImageHostProps as En, opaqueSurfaceContextFromTheme as Eo, resolveBookingSelectedService as Er, unsafeAsSiteId as Es, withRegistrationAvailability as Et, buildEventRegistrationPaymentOptionsViewModel as F, navLinkHoverColorCandidate as Fa, buildInteractiveIslandProps as Fi, eventCalendarWeekStart as Fn, customCssRuleSchema as Fo, EMPTY_APPOINTMENT_BOOKING_QUESTIONS as Fr, formatDate as Ft, resolveRegistrationAvailabilityBlocker as G, boundaryOptions as Ga, listItemPresentation as Gi, formatEventNextDateFact as Gn, parseGradientPresetId as Go, needsBookingQuestionsRefresh as Gr, transformRegistrationOptionsResponse as Gt, planRegistrationDetailsContinuation as H, sectionShapeFromContent as Ha, defineClientOwnedBlockRuntime as Hi, formatEventCompactDateRail as Hn, itemRoleValues as Ho, bookingQuestionsPaymentSnapshotSchema as Hr, getTicketTypeAvailabilityLabel as Ht, decideEventRegistrationPayment as I, navLinkOwnsHoverForeground as Ia, createInteractiveIslandCodec as Ii, eventDateLocale as In, boxBackgroundOverlaySchema as Io, applyAppointmentBookingQuestionsEvent as Ir, formatEventDateTime as It, visitorHoldsOwnPlace as J, isDecorativeTransitionIntent as Ja, lookListPresentationSchemaShape as Ji, formatTime$1 as Jn, asDesignBlockId as Jo, toBookingQuestionsPaymentSnapshot as Jr, getSingleSelectedPricingOptionId as Jt, resolveRegistrationTicketContinuation as K, boundaryRuntimeMetricsForDecorativeTransition as Ka, listLookControl as Ki, formatEventRunDates as Kn, siteChromeBackgroundOverrideOwner as Ko, restoreBookingQuestionsAnswers as Kr, withOccurrenceTitle as Kt, shouldPromptForLogin as L, navLinkOwnsUnderline as La, defineInteractiveIslandMetaKeys as Li, eventDateOptions as Ln, boxBackgroundSchema as Lo, appointmentQuestionsRefusal as Lr, formatPassCreditUsageLabel as Lt, getDeclinedPass as M, generateNavLinkCSS as Ma, pageNavigationSchema as Mi, resolveMediaNodeResponsiveImage as Mn, themeSchema as Mo, formatPrice as Mr, areEntitlementsDisabledForTicketCount as Mt, isRegistrationLocked as N, generateEffectsCSS as Na, requestSignIn as Ni, resolvePublicMediaUrl as Nn, headerVariantValues as No, projectSelectedAppointmentConsentIntoForm as Nr, findSelectedTicketType as Nt, registrationStepLabelContext as O, generateFooterCss as Oa, getBlockApiReadStage as Oi, renderVideo as On, selectLogoVariant as Oo, resolveDefaultBookingServiceId as Or, unsafeAsEventCategoryId as Os, validateFormData as Ot, registrationFlowReducer as P, generateInteractiveChildInheritanceCSS as Pa, bookingPageKindSchema as Pi, buildCalendarViewport as Pn, blockCustomCssRuleSchema as Po, resolveSelectedAppointmentConsent as Pr, formatBookingWhen as Pt, resolveEventRegistrationSubmitPlan as Q, transitionIntentForTreatment as Qa, resolveLookSurfacePresentation as Qi, canJoinEventWaitlist as Qn, makeBoundaryId as Qo, bookingHasPackagePaymentChoices as Qr, hasValidPricingOptionSelection as Qt, fullyBookedLabel as R, parsePageDesignIntent as Ra, eventRegistrationPageSurfaceSubjectSchema as Ri, eventLocalDateKey as Rn, runtimeBoxBackgroundSchema as Ro, deriveAppointmentBookingQuestions as Rr, formatRegistrationSchedule as Rt, getEventSelectionMode as S, stripCompiledRuntimeStyleFields as Sa, blockButtonRoleSchema as Si, RichText as Sn, testimonialsCompositionTreatmentValues as So, parseBookingCurrencyInputToCents as Sr, publicEventPricingType as Ss, getTicketSelectionRemainingPlaces as St, registrationPresentation as T, getGradientPreset as Ta, resolveDateRuntimeContext as Ti, computeMediaTransformStyle as Tn, cardListKnobBlocks as To, resolveBookingPaymentStep as Tr, parseSiteId as Ts, shouldLoadRegistrationOptions as Tt, resolveGuestNextStepCheck as U, sectionShapeHook as Ua, defineProgressiveBlockRuntime as Ui, formatEventDateParts as Un, openCardRoleValue as Uo, decideBookingQuestionsRestoration as Ur, getVisibleTicketTypes as Ut, planRegistrationDetailsCheck as V, sectionShapeForGround as Va, createZodCodec as Vi, formatEventClockLabel as Vn, cardVariantRoleValues as Vo, bookingQuestionsAnswerDraftSchema as Vr, getPortalSubjectEmail as Vt, resolveRegistrationAdmission as W, boundaryOptionForTransitionIntent as Wa, isDecodeSuccess as Wi, formatEventHourLabel as Wn, surfaceCardRoleValues as Wo, deriveBookingQuestions as Wr, occurrenceTitleOverride as Wt, isEventRegistrationAvailable as X, softBoundaryOption as Xa, itemRole as Xi, resolveEventTimeZone as Xn, asPageFlowPresetId as Xo, BOOKING_FORM_DATA_RESERVED_KEY_VALUES as Xr, getTicketSelectionTotal as Xt, deriveEventRegistrationSteps as Y, noneBoundaryOption as Ya, resolvedItemSurfaceProps as Yi, groupEventsByDate as Yn, asLayoutVariantKey as Yo, BOOKING_FORM_DATA_RESERVED_KEYS as Yr, getTicketLineQuantity as Yt, normalizeEventRegistrationMaxTickets as Z, spaciousBoundaryOption as Za, lookPresentationOnPalette as Zi, resolveRuntimeEventDestination as Zn, asSiteStyleId as Zo, applyBookingPaymentAdmission as Zr, getTicketTypeLineMax as Zt, parseStoredCommerceCartState as _, designRuntimeRulesForSiteStyle as _a, filterAutoShowSchema as _i, bookingPresentation as _n, featureCardCompositionTreatmentValues as _o, getRegistrationSuccessCopy as _r, formatEventPricing as _s, getCurrentTicketSelection as _t, buildProductDetailDisplay as a, resolveArrangementLookForBlock as aa, resolveBookingPaymentChoice as ai, EVENT_SIGN_IN_FORM_ID as an, sectionForegroundBackground as ao, getRemainingPlaces as ar, orderedLiveRunSessions as as, buildReviewedBookingPaymentViewModel as at, resolveSelectedProduct as b, compilePageRuntimeFields as ba, weekStartSchema as bi, resolveRegistrationDisplay as bn, plainFrame as bo, normalizeBookingFormConfig as br, publicEventPricingDisplay as bs, getSlidingScaleForEvent as bt, formatInterval as c, readStoredMode as ca, toBookingPurchasablePackages as ci, eventSignInRestoration as cn, themeV2CompilerOwnedFieldNames as co, selectMostOpenCapacitySource as cr, parseMailingListRuntimeContext as cs, findPreSelectedEvent as ct, membershipClassesLabel as d, resolvePublishedLook as da, calendarTabViewsSchema as di, createSignInReturnDraftStore as dn, lookModes as do, buildBookingFormInteractiveIslandProps as dr, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as ds, resolveRegistrationTarget as dt, arrangementAppearancePresets as ea, bookingRequiresResourceSelection as ei, setTicketLineQuantity as en, transitionCatalogueEntries as eo, formatEventRemainingPlaces as er, parseAspectRatioValue as es, resolveHeadlessEventRegistrationView as et, passCardListContent as f, buildInitialPolicyPageDesignIntent as fa, columnOptionSchema as fi, decideSignInReturn as fn, assertNever as fo, readOverrideServiceCategories as fr, parseBrevoListId as fs, resolveRouteRequiresPayment as ft, deriveCommerceCheckoutState as g, componentRuntimeRulesForSiteStyle as ga, eventLayoutSchema as gi, sweepExpiredSignInReturnDrafts as gn, designIssueSeverityForPolicy as go, getBookingSuccessCopy as gr, formatBookingPriceDisplay as gs, invitationSubmission as gt, buildProductCartItem as h, filterLookIdsForPolicy as ha, eventCalendarDisplayModeSchema as hi, signInReturnPath as hn, defineNoBlockDesignCapability as ho, getBookingRedirectStateFromLocation as hr, parseNewsletterListId as hs, createRegistrationDraftData as ht, buildProductCardDisplay as i, getCompatibleBlockAppearancePresets as ia, resolveBookingPaymentAvailability as ii, toWholeSeriesRegistrationEvents as in, resolveSectionBackground as io, getEventAvailabilityStatus as ir, nextLiveRunSessionStartMs as is, buildBookingPaymentSelectionViewModel as it, decideEventChoice as j, buildTextContrastShadow as ja, leavePage as ji, resolveImageUrlWithContext as jn, TokenResolver as jo, formatCentsAsCurrencyInput as jr, ENTITLEMENT_SINGLE_TICKET_TOOLTIP as jt, areEventRegistrationPaymentSelectionsEqual as k, footerForegroundCandidates as ka, PAGE_NAVIGATION as ki, resolveImageSourceSetWithContext as kn, surfaceToneFromForegroundToken as ko, selectedBookingCollectionOptionKind as kr, confirmationPaymentRows as kt, formatValidity as l, resolveEffectiveArrangement as la, getBookingServiceSlidingScale as li, toEventSignInDraft as ln, appearancePresets as lo, groupPublicEventsByRun as lr, resolveBookingSignupOffer as ls, resolveDiscountContext as lt, buildPassCartItem as m, filterLayoutProfilesForPolicy as ma, eventCalendarDefaultViewSchema as mi, readSignInReturn as mn, defineFrameCapability as mo, formatBookingSubmissionPreparationError as mr, parseMailchimpInterestId as ms, beginWaitlistInvitation as mt, buildCheckoutDisplay as n, arrangementStyleAvailability as na, resolveBookingPackagePaymentSelection as ni, toRegistrationEvents as nn, deriveSectionGround as no, formatTotalCapacity as nr, CANCELLED_SESSION_STATUS as ns, toInternalPaymentSelection as nt, buildProductListDisplay as o, resolveLookForBlock as oa, resolveBookingPaymentMode as oi, eventSignInDraftStore as on, sectionSurfaceBase as oo, isEventFull as or, resolveWholeSeriesBookingPhase as os, paymentChoiceDetails as ot, EMPTY_COMMERCE_CART_STATE as p, deriveSiteStyleBlockPolicy as pa, eventButtonVariantSchema as pi, nextSignInReturnExpiry as pn, defineBlockDesignCapability as po, deriveBookingFormViewState as pr, parseMailchimpAudienceId as ps, toRegistrationRequestSubject as pt, settledRemainingPlaces as q, boundaryTreatmentForBoundaryOptionId as qa, listLookSlot as qi, formatEventTimeRange as qn, asAppearancePresetId as qo, toBookingQuestionsAnswerDraft as qr, canRequestTicketOption as qt, buildPassesMembershipsDisplay as r, compileArrangementLookRuntime as ra, resolveBookingPackageSources as ri, toWholeSeriesRegistrationEvent as rn, parseCanonicalRuntimeBackground as ro, getEventAvailability as rr, firstLiveRunSessionStartMs as rs, calculateEventRegistrationPreviewTotal as rt, formatCommercePrice as s, arrangementManifestFromVariants as sa, resolveBookingPurchasablePackages as si, eventSignInEnds as sn, stripStaleTransitionStyleGroup as so, selectEventCapacitySource as sr, resolveWholeSeriesRunLifecycle as ss, paymentChoicePrice as st, buildCartDisplay as t, arrangementLookHooks as ta, reconcileBookingPackagePurchase as ti, getRegistrationStartAt as tn, applyLookPhotoTreatment as to, formatRemainingPlaces as tr, isRecord$4 as ts, toHeadlessPaymentSelection as tt, membershipCardListContent as u, resolveModeArrangement as ua, bookingNowSchema as ui, clearSignInReturnDrafts as un, resolveEffectiveKnobs as uo, bookingFormInteractiveIslandPropsCodec as ur, DEFAULT_MAILING_LIST_PRIVACY_NOTE as us, resolveEventRequiresPayment as ut, productItemKey as v, getCuratedSiteStyle as va, previewStageSchema as vi, placesLeftLabel as vn, introCompositionTreatmentValues as vo, getShopSuccessCopy as vr, isPublicEventPricingOptionDisplayable as vs, getEligibilityFlowFlags as vt, registrationPaymentRoute as w, gradientToCss as wa, readRuntimeNow as wi, MediaPlaceholder as wn, cardListFamilyBlocks as wo, resolveAppointmentCheckoutVerificationState as wr, resolvePricingOptionsPriceDisplay as ws, resolveHeldTicketPlaces as wt, REGISTRATION_STEP_LABELS as x, compiledRuntimeStyleFieldNames as xa, BLOCK_BUTTON_ROLE_OPTIONS as xi, shownVenue as xn, sectionBackgroundPaintValues as xo, normalizeBookingServices as xr, publicEventPricingStrategy as xs, getSlidingScaleSelectionMessage as xt, reduceCommerceCart as y, requireCuratedSiteStyle as ya, registrationButtonVariantSchema as yi, registrationDisplaySchema as yn, offeringsPreviewCompositionTreatmentValues as yo, isBookingServiceSlidingAmountInRange as yr, publicEventPricingCurrency as ys, getRegistrationOccurrenceId as yt, getTicketSelectionPurpose as z, resolvePageDesignBlockLookChoice as za, normalizeEventRegistrationPageSurfaceSubject as zi, formatCalendarTitle as zn, boxlessCardVariantValue as zo, isAppointmentBookingQuestionsEvent as zr, formatTime as zt };