@riverbankcms/sdk 0.183.0 → 0.184.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 (222) hide show
  1. package/README.md +34 -1
  2. package/dist/_dts/{BlocksIslandsHydrator-X1_G96iN.d.ts → BlocksIslandsHydrator-DjBTJYiF.d.ts} +1 -1
  3. package/dist/_dts/{Page-CEqZJZEE.d.ts → Page-BpXEM2ET.d.ts} +7 -7
  4. package/dist/_dts/{SdkPreviewMode-DQejfbXL.d.ts → SdkPreviewMode-Bb3h7KRE.d.ts} +2 -2
  5. package/dist/_dts/{client-B_B_amKD.d.ts → client-DgTRRtl_.d.ts} +13 -1
  6. package/dist/_dts/{content-types-Dhx5Ocvx.d.ts → content-types-DZQJp_ak.d.ts} +2 -2
  7. package/dist/_dts/{contracts-FeOnfoa1.d.ts → contracts-Ww1fmd-c.d.ts} +3 -3
  8. package/dist/_dts/{generatePageMetadata-m70J6tit.d.ts → generatePageMetadata-BGc7dju6.d.ts} +2 -2
  9. package/dist/_dts/{index-liuhlOX7.d.ts → index-BECaUNYs.d.ts} +2 -2
  10. package/dist/_dts/{index-BOpUh8kO.d.ts → index-Cc85KVLW.d.ts} +3 -3
  11. package/dist/_dts/{index-CjAkEWAp.d.ts → index-Cni4jykw.d.ts} +4 -4
  12. package/dist/_dts/{index-Bizdaxji.d.ts → index-DxxTQ_0V.d.ts} +2 -2
  13. package/dist/_dts/{index-BxCmCit0.d.ts → index-W9-7djG3.d.ts} +1 -1
  14. package/dist/_dts/{index-iuFrbIjt.d.ts → index-ukS-Ffem.d.ts} +1 -1
  15. package/dist/_dts/{loadContent-D4wrTIIw.d.ts → loadContent-BlSWTlbD.d.ts} +7 -7
  16. package/dist/_dts/{request-Gn0O1blj.d.ts → request-CZz2BoXJ.d.ts} +74180 -73974
  17. package/dist/_dts/{resolveBlockData-D5duwuqS.d.ts → resolveBlockData-D12HXnS3.d.ts} +5 -5
  18. package/dist/_dts/{resolvePageContent-xzJ3c9Na.d.ts → resolvePageContent-BteMsSGP.d.ts} +1 -1
  19. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  20. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  21. package/dist/_dts/sdk/src/client.d.ts +7 -7
  22. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  23. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  24. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  25. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  26. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  27. package/dist/_dts/sdk/src/data/types.d.ts +2 -2
  28. package/dist/_dts/sdk/src/gifting/client.d.ts +1 -1
  29. package/dist/_dts/sdk/src/index.d.ts +7 -7
  30. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  31. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  32. package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
  33. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  34. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  35. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  36. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  37. package/dist/_dts/sdk/src/portal/index.d.ts +10 -2
  38. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  39. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  40. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  41. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  42. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  43. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  44. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  45. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
  46. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  47. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  48. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  49. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  50. package/dist/_dts/sdk/src/routing/index.d.ts +6 -6
  51. package/dist/_dts/sdk/src/server.d.ts +5 -5
  52. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  53. package/dist/_dts/sdk/src/theme/index.d.ts +36 -1
  54. package/dist/_dts/{serviceBookingOutline-B1gyJon_.d.ts → serviceBookingOutline-aTlOvO3U.d.ts} +15 -7
  55. package/dist/_dts/{types-BoITy0rA.d.ts → types-Bi7R07RX.d.ts} +6 -2
  56. package/dist/_dts/{types-DBNuMtSk.d.ts → types-CCcQlRBi.d.ts} +9 -10
  57. package/dist/_dts/{types-DHMcuoeQ.d.ts → types-Du4aMnWC.d.ts} +13 -15
  58. package/dist/_dts/{validation-BIPO-XlE.d.ts → validation-CjCWVmwe.d.ts} +4 -4
  59. package/dist/client/{BlocksIslandsHydrator-Ct8slgRk.mjs → BlocksIslandsHydrator-CFLWxjxR.mjs} +17 -17
  60. package/dist/client/{BookingMailingListNote-qqTxGGS4.mjs → BookingMailingListNote-C4LcfwyA.mjs} +7 -7
  61. package/dist/client/{BookingQuestionFields-DCh9MUIF.mjs → BookingQuestionFields-DdcmoHqQ.mjs} +1 -1
  62. package/dist/client/{CalendarAction-RcdaStG7.mjs → CalendarAction-DYGewmvh.mjs} +1 -1
  63. package/dist/client/{CalendarNavigationChevron-D7Wt-Oaa.mjs → CalendarNavigationChevron-ZfrUiiiI.mjs} +5 -5
  64. package/dist/client/{CheckboxChoice-BdGxZWeg.mjs → CheckboxChoice-CTMIII37.mjs} +1 -1
  65. package/dist/client/{DemoBookingPortalAccess-HFVkoOac.mjs → DemoBookingPortalAccess-pzkGVkgG.mjs} +7 -5
  66. package/dist/client/{EventCalendar.client-BtkJW8bA.mjs → EventCalendar.client-Ct1B3xI4.mjs} +9 -9
  67. package/dist/client/{EventCombined.client-DxaGjFFS.mjs → EventCombined.client-DgfNtcgW.mjs} +8 -8
  68. package/dist/client/{EventEmbeddedCheckoutStep-B2c5dR49.mjs → EventEmbeddedCheckoutStep-CjoaG1zy.mjs} +1 -1
  69. package/dist/client/{EventItem-Fr2qi2C2.mjs → EventItem-KGKkK19N.mjs} +5 -5
  70. package/dist/client/{EventListWeekNavigation-BRMaq0ky.mjs → EventListWeekNavigation-Ba9ezxuC.mjs} +1 -1
  71. package/dist/client/{EventListing.client-BhGxfbjt.mjs → EventListing.client-xFKRDLwC.mjs} +3 -3
  72. package/dist/client/{EventListing.view-COuEJzbO.mjs → EventListing.view-Dy36vWHi.mjs} +84 -7
  73. package/dist/client/{EventRegistrationPayment-BTLYhVxD.mjs → EventRegistrationPayment-Dth9L00x.mjs} +108 -45
  74. package/dist/client/{Page-CgbQZP5g.mjs → Page-DB5KODiu.mjs} +1735 -501
  75. package/dist/client/{ProtectedSubmitButton-BG7my0Qf.mjs → ProtectedSubmitButton-CY6u5sQa.mjs} +1 -1
  76. package/dist/client/{SiteTermsAgreementField-DQNkfNLA.mjs → SiteTermsAgreementField-BDVP_HeK.mjs} +2 -2
  77. package/dist/client/{StepIndicator-DvPekKeM.mjs → StepIndicator-CLgDVzCs.mjs} +1 -1
  78. package/dist/client/{StepIndicator-DyXoI3ob.mjs → StepIndicator-DRyZ8igu.mjs} +6 -6
  79. package/dist/client/{ThemedButton-Bc9DBbVp.mjs → ThemedButton-C4rCsPCt.mjs} +11 -2
  80. package/dist/client/{accessibleSurfaces-wj4Rloo5.mjs → accessibleSurfaces-CqroimVQ.mjs} +745 -557
  81. package/dist/client/{accordion-BVXfjnh-.mjs → accordion-BQYRP5xV.mjs} +1 -1
  82. package/dist/client/{booking-form.client-DycPGtke.mjs → booking-form.client-B7ckDuOC.mjs} +16 -16
  83. package/dist/client/{bookingForm-DrWSUqL3.mjs → bookingForm-BeD4650p.mjs} +7 -6
  84. package/dist/client/bookings.mjs +4 -4
  85. package/dist/client/{boxStyleClassNames-CduDRcIk.mjs → boxStyleClassNames-CA7FirMH.mjs} +2 -2
  86. package/dist/client/{buttonParts-CJEtVOUy.mjs → buttonParts-C39GC0kz.mjs} +9 -2
  87. package/dist/client/{carousel-DyCLMP8s.mjs → carousel-DJ9Aa1m3.mjs} +2 -2
  88. package/dist/client/{carousel.client-DffP_Nv0.mjs → carousel.client-DKWqVHHh.mjs} +1 -1
  89. package/dist/client/{cart-BuEp_cj4.mjs → cart-DdCenbTy.mjs} +3 -3
  90. package/dist/client/{cart.client-CAO39uDG.mjs → cart.client-BQm06qNw.mjs} +1 -1
  91. package/dist/client/{checkout-BoxzT64s.mjs → checkout-45wPQULN.mjs} +3 -3
  92. package/dist/client/{checkout.client-IGUy7XOx.mjs → checkout.client-bSv4cc5z.mjs} +1 -1
  93. package/dist/client/{checkoutUrls-D0UsiFmm.mjs → checkoutUrls-CwlaMl3W.mjs} +1 -1
  94. package/dist/client/client.mjs +23 -35
  95. package/dist/client/{constants-C_8AxMdm.mjs → constants-DXV4KR7l.mjs} +1 -1
  96. package/dist/client/{context-D1L0pe__.mjs → context-lCPfX-xe.mjs} +13 -3
  97. package/dist/client/{demoPortalMagicLink-BunFTnIq.mjs → demoPortalMagicLink-Ce3Gyin_.mjs} +1 -1
  98. package/dist/client/{enhanceHeaderSection-CtLAG651.mjs → enhanceHeaderSection-CGcDE9aE.mjs} +4 -4
  99. package/dist/client/{event-registration.client-DiSxkBUP.mjs → event-registration.client-DlPfn4YG.mjs} +51 -28
  100. package/dist/client/{eventCalendar-DUnhwZ1o.mjs → eventCalendar-CioAdryV.mjs} +4 -4
  101. package/dist/client/{eventCombined-BvBQo0nF.mjs → eventCombined-Dwt0G6ez.mjs} +4 -4
  102. package/dist/client/{eventListing-aTLifOX7.mjs → eventListing-B3H9ifOC.mjs} +4 -4
  103. package/dist/client/{eventRegistration-DFd7pr09.mjs → eventRegistration-Do7cAhXb.mjs} +7 -6
  104. package/dist/client/{form-Dikmc2AO.mjs → form-CsqzgC6v.mjs} +3 -3
  105. package/dist/client/{form.client-zHaQK5I9.mjs → form.client-DVDB7hY6.mjs} +4 -4
  106. package/dist/client/{form.parts-BLl9n8TH.mjs → form.parts-1q2rzSYt.mjs} +3 -3
  107. package/dist/client/gifting/client.mjs +7 -7
  108. package/dist/client/{gifting-CufPM38H.mjs → gifting-BrXQGX-k.mjs} +4 -4
  109. package/dist/client/{gifting.client--N1GaSY8.mjs → gifting.client--zAjnY5N.mjs} +6 -7
  110. package/dist/client/{gifting.interactive-D9MK4HkV.mjs → gifting.interactive-CrwHpUJG.mjs} +59 -9
  111. package/dist/client/{gifting.parts-CRtiRzo-.mjs → gifting.parts-CcKdDaQq.mjs} +7 -2
  112. package/dist/client/{headerSection-BIaBpmk3.mjs → headerSection-DlcDH4bi.mjs} +2 -2
  113. package/dist/client/{islands-DJDLGQEm.mjs → islands-dMh0Oxli.mjs} +1986 -1170
  114. package/dist/client/{newsletter-form.client-wg_JHTxm.mjs → newsletter-form.client-BxA1PsdS.mjs} +5 -5
  115. package/dist/client/{newsletter-form.interactive-hzpkW9NQ.mjs → newsletter-form.interactive-D0iRg7p2.mjs} +6 -5
  116. package/dist/client/{newsletter-form.parts-CgzpSv9p.mjs → newsletter-form.parts-Dmuklz0r.mjs} +2 -2
  117. package/dist/client/{newsletterForm-CvxLiEBT.mjs → newsletterForm-CBzvgIfg.mjs} +3 -3
  118. package/dist/client/portal/client.mjs +27 -15
  119. package/dist/client/{portalRoutes-DTHlWg_F.mjs → portalRoutes-DiGibcZI.mjs} +9 -2
  120. package/dist/client/portalSession-0XhXyTxT.mjs +41 -0
  121. package/dist/client/{product-detail.client-22Q7zgjN.mjs → product-detail.client-D9MP8hvH.mjs} +1 -1
  122. package/dist/client/{product-list.client-DFWYvK8z.mjs → product-list.client-wCz1qcUY.mjs} +1 -1
  123. package/dist/client/{productDetail-DhZAwo60.mjs → productDetail-D9-fCY6c.mjs} +3 -3
  124. package/dist/client/{productList-BiVpbZK2.mjs → productList-PJyxXSac.mjs} +3 -3
  125. package/dist/client/{propsDecoder-DFYqKnLy.mjs → propsDecoder-B8lrKGPw.mjs} +4 -4
  126. package/dist/client/{registry.server-C3OBRg7x.mjs → registry.server-CI63JVHW.mjs} +689 -569
  127. package/dist/client/rendering/client.mjs +28 -27
  128. package/dist/client/rendering/islands.mjs +1 -1
  129. package/dist/client/rendering.mjs +4 -4
  130. package/dist/client/{richText-coerce-ms477Z08.mjs → richText-coerce-Jt9hDHdh.mjs} +1 -1
  131. package/dist/client/{routeIslandApiConfig-B6nQeqvH.mjs → routeIslandApiConfig-ZSPcJWx1.mjs} +1 -1
  132. package/dist/client/runtimeResponse-DlPBWBd9.mjs +3 -0
  133. package/dist/client/{runtimeResponse-BYqsV1Kb.mjs → runtimeResponse-_iW9oEYc.mjs} +1 -1
  134. package/dist/client/{shop-xt4dQ3HH.mjs → shop-CbdJlWOw.mjs} +3 -3
  135. package/dist/client/{shop-commerce-DVsIcPaI.mjs → shop-commerce-BqLbzUUn.mjs} +44 -26
  136. package/dist/client/{shop-commerce-store-7mO6KY7_.mjs → shop-commerce-store-BT0-zRqN.mjs} +1 -1
  137. package/dist/client/{shop-discount-apply.state-L1Vge8tG.mjs → shop-discount-apply.state-Cws0lnSb.mjs} +1 -1
  138. package/dist/client/{shop.client-DNJfD3VQ.mjs → shop.client-0cNErhJT.mjs} +37 -18
  139. package/dist/client/{shopShared-DS8t6749.mjs → shopShared-COuQ2MhQ.mjs} +2 -2
  140. package/dist/client/spam-protection.mjs +1 -1
  141. package/dist/client/{timetableModel-Dy3nNfTG.mjs → timetableModel-DqI6U1BS.mjs} +6 -6
  142. package/dist/client/{urlParams-C2QHo1Pa.mjs → useAutomaticDiscountPreview-CeVUVzGf.mjs} +44 -1
  143. package/dist/client/{useAvailableSlots-DcjtDpUu.mjs → useAvailableSlots-B0mjVhZr.mjs} +1 -1
  144. package/dist/client/{useDiscountCodeUi-DvdFFWOT.mjs → useDiscountCodeUi-B_hfgdAP.mjs} +6 -2
  145. package/dist/client/{useEventPagination-Cq-7sU5_.mjs → useEventPagination-Ct4A6iR1.mjs} +13 -15
  146. package/dist/client/{view-4gnPcpWJ.mjs → view-Cj151w4m.mjs} +4 -4
  147. package/dist/client/{wizardSteps-DDvL3iza.mjs → wizardSteps-B3gsXNnb.mjs} +212 -68
  148. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-CLqSRUpt.mjs → EventEmbeddedCheckoutStep-CVy9oapv.mjs} +1 -1
  149. package/dist/preview-next/client/{LocationPickerEnvironment-CIdAg-Tm.mjs → LocationPickerEnvironment-DuRUwUrK.mjs} +1 -1
  150. package/dist/preview-next/client/{MapLibreEditMap-Bm85jX35.mjs → MapLibreEditMap-CdSDYBq9.mjs} +2 -2
  151. package/dist/preview-next/client/{PageSectionToolbar-D8srnz9R.mjs → PageSectionToolbar-Dv4CW0AQ.mjs} +582 -195
  152. package/dist/preview-next/client/{PreviewEditorSidebar-DVpk5cqp.mjs → PreviewEditorSidebar-B7WW58uE.mjs} +1095 -282
  153. package/dist/preview-next/client/{PreviewEditorUI-XoTtHSFH.mjs → PreviewEditorUI-BnJ1ughv.mjs} +65 -16
  154. package/dist/preview-next/client/{PreviewShell-VQHsRg2u.mjs → PreviewShell-C7qWzAe4.mjs} +39 -12
  155. package/dist/preview-next/client/{SdkPreviewModeRuntime-CLdF9f6o.mjs → SdkPreviewModeRuntime-CYi4UHtG.mjs} +128 -27
  156. package/dist/preview-next/client/{ThemedButton-ORNN4x-3.mjs → ThemedButton-CRgbU75r.mjs} +18 -2
  157. package/dist/preview-next/client/{lucide-react-eAi3tDAr.mjs → lucide-react-B4c6U3ZU.mjs} +1 -1
  158. package/dist/preview-next/client/{previewAssistantSlot-CqH91EwA.mjs → previewAssistantSlot-DrUoRNu9.mjs} +6239 -2558
  159. package/dist/preview-next/client/{previewChromeRoot-B3ySEu6p.mjs → previewChromeRoot-CEYp90mM.mjs} +1 -1
  160. package/dist/preview-next/client/runtime.mjs +3 -3
  161. package/dist/preview-next/client/{sdk-runtime-CdpSupcr.mjs → sdk-runtime-DnO2_c0A.mjs} +2 -2
  162. package/dist/preview-next/client/{siteStyleAccess-C6eOP6QW.mjs → siteStyleAccess-B3PwHw2z.mjs} +16 -10
  163. package/dist/preview-next/client/{useAutosaveStatus-BhPg4e-r.mjs → useAutosaveStatus-DrdQ4ier.mjs} +3 -3
  164. package/dist/preview-next/client/{useOpenBlockForSetup-BaWUF9D7.mjs → useOpenBlockForSetup-kuGRKaRL.mjs} +4 -3
  165. package/dist/preview-next/container-responsive.css +150 -3
  166. package/dist/preview-next/keepAlive.mjs +1 -1
  167. package/dist/preview-next/middleware.mjs +1 -1
  168. package/dist/preview-next/{route-contract-Ch0X99vE.mjs → route-contract-CwrXkLT3.mjs} +16 -28
  169. package/dist/server/{Block.shared-B2FmczLO.mjs → Block.shared-C5ucphCJ.mjs} +5 -5
  170. package/dist/server/{ThemeScopeCore-DtAyv9qA.mjs → ThemeScopeCore-DvbqYXdK.mjs} +34 -8
  171. package/dist/server/{accessibleSurfaces-BtPqb76u.mjs → accessibleSurfaces-CAcf1lHT.mjs} +317 -148
  172. package/dist/server/{accordions-vzdZ2Wt1.mjs → accordions-DjcsqjCK.mjs} +1 -1
  173. package/dist/server/{bindings-B_9JuU66.mjs → bindings-CFw4M-gZ.mjs} +68 -247
  174. package/dist/server/{client-DC7cjiSw.mjs → client-D0XCgITW.mjs} +26 -34
  175. package/dist/server/config-validation.mjs +1 -1
  176. package/dist/server/config.mjs +2 -2
  177. package/dist/server/{constants-d6nPNJpe.mjs → constants-BZduY8jG.mjs} +9 -2
  178. package/dist/server/data/resolveBlockData.mjs +1 -1
  179. package/dist/server/index.mjs +3 -3
  180. package/dist/server/{loadContent-hb27HYic.mjs → loadContent-C-qyB8Tq.mjs} +4 -4
  181. package/dist/server/{loadPage-JToD8wDD.mjs → loadPage-BpKKmi8E.mjs} +3 -3
  182. package/dist/server/lookMediaFrame-EFws7tAj.mjs +31835 -0
  183. package/dist/server/manifest.mjs +2 -2
  184. package/dist/server/{navigation-B2WhGofA.mjs → navigation-DYkuiNXa.mjs} +1 -1
  185. package/dist/server/navigation.mjs +1 -1
  186. package/dist/server/next.mjs +9 -9
  187. package/dist/server/{overrideResolution-vD5KTClL.mjs → overrideResolution-DmZn4xUE.mjs} +1 -1
  188. package/dist/server/page-converter.mjs +17 -4
  189. package/dist/server/{pageRenderPlan-CdqJ1NQZ.mjs → pageRenderPlan-DRB7cUZ0.mjs} +595 -208
  190. package/dist/server/{pageRuntimeSupport-CAhr4oOf.mjs → pageRuntimeSupport-Uv1xDieJ.mjs} +12 -5
  191. package/dist/server/{pageShared-m80Xu2pd.mjs → pageShared-BdQF875z.mjs} +596 -383
  192. package/dist/server/{parseThemeForPersistence-CRwOZfpa.mjs → parseThemeForPersistence-CwcWZL7u.mjs} +3 -3
  193. package/dist/server/{portal-B2wCQno_.mjs → portal-BQ8qiQnk.mjs} +22 -2
  194. package/dist/server/portal.mjs +3 -3
  195. package/dist/server/{prebuild-BWIkFaXq.mjs → prebuild-B51QZVNe.mjs} +1 -1
  196. package/dist/server/prebuild.mjs +1 -1
  197. package/dist/server/{prefetchBlockData-D1PHU-K9.mjs → prefetchBlockData-CppDAfJW.mjs} +3 -3
  198. package/dist/server/{registry-KtsOsAzY.mjs → registry-Bf4W8Qa7.mjs} +1499 -28631
  199. package/dist/server/rendering/components/pageShared.mjs +1 -1
  200. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  201. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  202. package/dist/server/rendering/server.mjs +4 -4
  203. package/dist/server/rendering.mjs +9 -9
  204. package/dist/server/{resolveBlockData-sjIDJYl7.mjs → resolveBlockData-DMHAZooQ.mjs} +2 -2
  205. package/dist/server/{expandPalette-DxPrNOAB.mjs → resolveButtonColourStates-BMtAAPzp.mjs} +1662 -1430
  206. package/dist/server/{responseMedia-IfH65QAH.mjs → responseMedia-DKYfR518.mjs} +1 -1
  207. package/dist/server/{schema-BBEqquBM.mjs → schema-DGaihVwp.mjs} +261 -6
  208. package/dist/server/server.mjs +3 -3
  209. package/dist/server/{servicePageContent-ChEZDRwU.mjs → servicePageContent-CRvmreX7.mjs} +8 -7
  210. package/dist/server/theme-bridge.mjs +5 -4
  211. package/dist/server/theme.mjs +2 -2
  212. package/dist/server/{three-pass-converter-DKCIBeb1.mjs → three-pass-converter-mcy2E1Yd.mjs} +1 -1
  213. package/dist/server/{titleSourceSchema-DybHErxH.mjs → titleSourceSchema-B2qFOUwZ.mjs} +2 -3
  214. package/dist/server/{types-vyz09w64.mjs → types-C_S0pWbR.mjs} +9 -2
  215. package/dist/server/{validation-Cvi-1TZZ.mjs → validation-CUtNT_EZ.mjs} +5 -5
  216. package/dist/server/{version-B-icAIV1.mjs → version-DebJQ4zn.mjs} +1 -1
  217. package/dist/styles/index.css +495 -50
  218. package/package.json +1 -1
  219. package/dist/client/runtimeResponse-CUX_lldL.mjs +0 -3
  220. package/dist/server/customCss-rtIfEYwQ.mjs +0 -230
  221. package/dist/server/lookMediaFrame-CTsycLLK.mjs +0 -2756
  222. package/dist/server/media-gvfIw3z8.mjs +0 -216
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { G as externalMediaSchema, K as imageMediaSchema, W as assetMediaSchema, X as videoMediaSchema, at as eyebrowTreatmentValues, ct as isArrangementMode, et as accordionIconColorTokenValues, it as eventListTreatmentValues, lt as tileTreatmentValues, nt as accordionIconSetValues, ot as headingDecorationColorTokenValues, q as mediaSchema, rt as arrangementModes, st as headingDecorationOverrideValues, tt as accordionIconMotionValues, ut as visibleHeadingDecorationFamilyValues } from "./src-Do_s2lqH.mjs";
3
- import { F as parseColorTokenParts, I as parseThemeColorToken, L as themeColorTokenSchema, M as paletteColorsFromEntries, N as paletteColorsSchema, O as hexColorSchema, P as paletteModeSchema, _ as buttonEffectApplicationSchema, j as paletteColorEntries, k as isThemeColorToken, p as unsafeAsOpaqueButtonColourToken, v as buttonPressOffsetSchema, w as buttonKeyframesSchema, x as buttonVisualStatesSchema, y as buttonSystemSchema, z as VARIANT_ROLES } from "./buttonParts-CJEtVOUy.mjs";
4
- import { A as defineButtonStyleRecipe, At as paletteValueKey, Bt as featuresFromHex, Ct as resolveOpaqueSurfaceHex, Dt as paletteInkToken, E as ELEVATION_OFFSET, Et as paletteInkRoles, Ft as hexLuminance, It as luminanceInterval, J as compositeHex, Lt as preparePaletteColourIndex, M as mapButtonVisualAppearances, Mt as requirePaletteColorsFromEntries, Q as resolveSurfaceForeground, St as resolveConcreteColorHex, Tt as paletteInk, V as rgbColorValue, X as minimumScrimOpacity, Y as gradientScrimSamples, Z as scrimTone, _t as surfaceInkDeclarations, a as requireResolvedSurface, bt as freezeOwnedThemeValue, c as surfaceButtonRequest, d as toAccessibleColorSurfaceIntent, dt as SURFACE_INK_CSS_VARS, f as contextualButtonSurfaceResetStyles, ft as surfaceForegroundDeclarations, h as BUTTON_CONTRAST_POLICY, ht as surfaceForegroundValue, i as prepareThemeSurfaceRevision, j as mapButtonRoleAppearances, jt as paletteValueKeySchema, o as resolveSurface, ot as contrastThresholdByPolicy, q as expandPalette, t as parseResolvedSurface, u as surfaceTransportContext, ut as SURFACE_FOREGROUND_CSS_VARS, xt as ownedThemeSnapshot } from "./accessibleSurfaces-wj4Rloo5.mjs";
3
+ import { A as isThemeColorToken, B as VARIANT_ROLES, F as paletteModeSchema, I as parseColorTokenParts, L as parseThemeColorToken, M as paletteColorEntries, N as paletteColorsFromEntries, P as paletteColorsSchema, R as themeColorTokenSchema, _ as buttonEffectApplicationSchema, k as hexColorSchema, p as unsafeAsOpaqueButtonColourToken, v as buttonPressOffsetSchema, w as buttonKeyframesSchema, x as buttonVisualStatesSchema, y as buttonSystemSchema } from "./buttonParts-C39GC0kz.mjs";
4
+ import { $ as expandPalette, At as paletteValueKey, Bt as featuresFromHex, D as ELEVATION_OFFSET, Ft as hexLuminance, H as rgbColorValue, Ht as linearToSrgb, Kt as rgbToHex, Lt as preparePaletteColourIndex, M as mapButtonRoleAppearances, Mt as requirePaletteColorsFromEntries, N as mapButtonVisualAppearances, St as resolveConcreteColorHex, Vt as hexToRgb, Wt as oklabToSrgb, _t as surfaceInkDeclarations, a as prepareThemeSurfaceRevision, bt as freezeOwnedThemeValue, ct as contrastThresholdByPolicy, d as surfaceTransportContext, dt as SURFACE_INK_CSS_VARS, f as toAccessibleColorSurfaceIntent, ft as surfaceForegroundDeclarations, g as BUTTON_CONTRAST_POLICY, ht as surfaceForegroundValue, j as defineButtonStyleRecipe, jt as paletteValueKeySchema, l as surfaceButtonRequest, n as parseResolvedSurface, o as requireResolvedSurface, p as contextualButtonSurfaceResetStyles, qt as srgbToOklab, rt as minimumScrimOpacity, s as resolveSurface, ut as SURFACE_FOREGROUND_CSS_VARS, xt as ownedThemeSnapshot } from "./accessibleSurfaces-CqroimVQ.mjs";
5
5
  import { z } from "zod";
6
6
  //#region ../site-contracts/src/identity/designIds.ts
7
7
  function asDesignBlockId(value) {
@@ -1431,7 +1431,9 @@ const footerEdgeIntentValues = [
1431
1431
  "angle-edge",
1432
1432
  "angle-edge-subtle",
1433
1433
  "angle-edge-steep",
1434
- "torn-edge-holes"
1434
+ "torn-edge-holes",
1435
+ "ridge-edge",
1436
+ "hand-drawn-wave-edge"
1435
1437
  ];
1436
1438
  const footerEdgePreferenceSchema = z.discriminatedUnion("kind", [
1437
1439
  z.strictObject({ kind: z.literal("style-default") }),
@@ -2051,7 +2053,33 @@ const accordionIconTreatmentSchema = z.object({
2051
2053
  openColorToken: z.enum(accordionIconColorTokenValues).optional(),
2052
2054
  motion: z.enum(accordionIconMotionValues)
2053
2055
  });
2056
+ const textureFinishSchema = z.enum([
2057
+ "paper-grain",
2058
+ "handmade-paper",
2059
+ "plaster"
2060
+ ]);
2061
+ const toneFinishSchema = z.discriminatedUnion("kind", [
2062
+ z.object({
2063
+ kind: z.literal("shading"),
2064
+ direction: z.enum(["darker-towards-foot", "lighter-from-top"])
2065
+ }).strict(),
2066
+ z.object({
2067
+ kind: z.literal("glow"),
2068
+ colour: themeColorTokenSchema,
2069
+ position: z.enum(["side", "middle"])
2070
+ }).strict(),
2071
+ z.object({
2072
+ kind: z.literal("gradient"),
2073
+ colour: themeColorTokenSchema
2074
+ }).strict()
2075
+ ]);
2076
+ const sectionTreatmentSchema = z.object({
2077
+ texture: z.union([z.enum(["auto", "off"]), textureFinishSchema]),
2078
+ tone: z.union([z.enum(["auto", "off"]), toneFinishSchema])
2079
+ }).strict();
2054
2080
  const sectionStylesOverrideSchema = z.object({
2081
+ ground: z.object({ name: z.string().min(1) }).strict().nullable().optional(),
2082
+ treatment: sectionTreatmentSchema.nullable().optional(),
2055
2083
  background: boxBackgroundSchema.nullable().optional(),
2056
2084
  spacing: semanticSpacingSchema.nullable().optional(),
2057
2085
  minHeight: z.enum([
@@ -2581,6 +2609,8 @@ const cardListBlockParts = {
2581
2609
  };
2582
2610
  const cardListFamilyBlocks = Object.keys(cardListBlockParts);
2583
2611
  const cardListKnobBlocks = [...cardListFamilyBlocks, "block.event-calendar"];
2612
+ /** Blocks with a photo an owner can shape. */
2613
+ const photoShapeKnobBlocks = ["block.intro", "block.media-text"];
2584
2614
  const lookKnobBlocks = {
2585
2615
  actionStyle: cardListKnobBlocks,
2586
2616
  titleSize: "block.hero",
@@ -2589,7 +2619,7 @@ const lookKnobBlocks = {
2589
2619
  "block.intro",
2590
2620
  "block.media-text"
2591
2621
  ],
2592
- imageShape: ["block.intro", "block.media-text"],
2622
+ imageShape: photoShapeKnobBlocks,
2593
2623
  aspectRatio: "block.media-text",
2594
2624
  stickerLine: "block.hero",
2595
2625
  smallCaption: "block.hero",
@@ -2794,36 +2824,6 @@ const arrangementSlotNames = [
2794
2824
  "separator"
2795
2825
  ];
2796
2826
  //#endregion
2797
- //#region ../theme-core/src/surfaces/logoVariant.ts
2798
- /** Concrete hex behind a plain, opaque palette token, or null otherwise. */
2799
- function opaquePaletteHexForToken(expandedPalette, token) {
2800
- if (!token) return null;
2801
- const parts = parseColorTokenParts(token);
2802
- if (parts.kind !== "token" || parts.opacityPercent !== null) return null;
2803
- return expandedPalette[parts.token] ?? null;
2804
- }
2805
- /**
2806
- * Tone of the surface a foreground token was resolved for.
2807
- *
2808
- * A token with opacity has no known underlay to composite against, and a raw
2809
- * or unrecognised token has no palette hex, so both are `unknown` rather than
2810
- * a guess.
2811
- */
2812
- function surfaceToneFromForegroundToken(expandedPalette, foregroundToken) {
2813
- const hex = opaquePaletteHexForToken(expandedPalette, foregroundToken);
2814
- if (!hex) return "unknown";
2815
- return featuresFromHex(hex).Y >= .5 ? "dark" : "light";
2816
- }
2817
- /**
2818
- * The logo to draw on a surface of the given tone. A missing variant falls
2819
- * back to the other one, and an unknown tone uses the light-backgrounds logo,
2820
- * which is what every site rendered before variants existed.
2821
- */
2822
- function selectLogoVariant(tone, variants) {
2823
- const { forLightBackgrounds, forDarkBackgrounds } = variants;
2824
- return tone === "dark" ? forDarkBackgrounds ?? forLightBackgrounds : forLightBackgrounds ?? forDarkBackgrounds;
2825
- }
2826
- //#endregion
2827
2827
  //#region ../theme-core/src/surfaces/opaqueSurface.ts
2828
2828
  function opaqueSurfaceContextFromTheme(theme) {
2829
2829
  const palette = freezeOwnedThemeValue(expandPalette(theme.palette));
@@ -3334,36 +3334,13 @@ function resolveBlockAppearancePresetDesign(preset, layoutProfile = null) {
3334
3334
  }
3335
3335
  //#endregion
3336
3336
  //#region ../theme-core/src/site-styles/lookPhotoFrames.ts
3337
- /** Shape knobs override the skin's ordinary photo frame. Corner choices keep its ratio. */
3338
- const photoShapeFrames = [{
3339
- knob: "imageShape",
3340
- values: {
3341
- square: {
3342
- kind: "corners",
3343
- borderRadius: "0"
3344
- },
3345
- rounded: {
3346
- kind: "corners",
3347
- borderRadius: "var(--rb-media-shape-radius, 1rem)"
3348
- },
3349
- circle: {
3350
- kind: "fixed",
3351
- aspectRatio: "1/1",
3352
- borderRadius: "50%"
3353
- },
3354
- arch: {
3355
- kind: "fixed",
3356
- aspectRatio: "4/5",
3357
- borderRadius: "9999px 9999px 0.125rem 0.125rem"
3358
- }
3359
- }
3360
- }];
3361
3337
  const naturalPhotoFrame = {
3362
3338
  kind: "variable",
3363
3339
  because: "The photo keeps its own proportions.",
3364
3340
  aspectRatio: "auto"
3365
3341
  };
3366
3342
  const introPhotoFrames = {
3343
+ photoKind: "feature",
3367
3344
  default: naturalPhotoFrame,
3368
3345
  bySkin: {
3369
3346
  haven: {
@@ -3377,7 +3354,7 @@ const introPhotoFrames = {
3377
3354
  orbit: {
3378
3355
  kind: "fixed",
3379
3356
  aspectRatio: "1/1",
3380
- borderRadius: "50%"
3357
+ shape: "circle"
3381
3358
  },
3382
3359
  forge: {
3383
3360
  kind: "fixed",
@@ -3387,10 +3364,10 @@ const introPhotoFrames = {
3387
3364
  kind: "fixed",
3388
3365
  aspectRatio: "3/4"
3389
3366
  }
3390
- },
3391
- byKnob: photoShapeFrames
3367
+ }
3392
3368
  };
3393
3369
  const mediaTextPhotoFrames = {
3370
+ photoKind: "feature",
3394
3371
  default: naturalPhotoFrame,
3395
3372
  bySkin: {
3396
3373
  poster: {
@@ -3425,8 +3402,7 @@ const mediaTextPhotoFrames = {
3425
3402
  kind: "fixed",
3426
3403
  aspectRatio: "4/5"
3427
3404
  }
3428
- },
3429
- byKnob: photoShapeFrames
3405
+ }
3430
3406
  };
3431
3407
  //#endregion
3432
3408
  //#region ../theme-core/src/site-styles/blockAppearancePresets.ts
@@ -4443,10 +4419,13 @@ const blockAppearancePresets = [
4443
4419
  styleFallback: [id$1("newsletter-signup-text-beside")]
4444
4420
  }),
4445
4421
  defineArrangementLook("image-gallery-square-tiles", "image-gallery", "Square tiles", "tiles", ["blackAndWhite"], {
4446
- mediaFrame: { default: {
4447
- kind: "fixed",
4448
- aspectRatio: "1/1"
4449
- } },
4422
+ mediaFrame: {
4423
+ photoKind: "gallery",
4424
+ default: {
4425
+ kind: "fixed",
4426
+ aspectRatio: "1/1"
4427
+ }
4428
+ },
4450
4429
  thumbnail: sketch.page([
4451
4430
  sketch.title(.4),
4452
4431
  sketch.across(4, [sketch.photo("short")]),
@@ -4455,6 +4434,7 @@ const blockAppearancePresets = [
4455
4434
  }),
4456
4435
  defineArrangementLook("image-gallery-arched-captions", "image-gallery", "Arched photos with captions", "tiles", ["blackAndWhite"], {
4457
4436
  mediaFrame: {
4437
+ photoKind: "gallery",
4458
4438
  default: {
4459
4439
  kind: "fixed",
4460
4440
  aspectRatio: "1/1"
@@ -4462,41 +4442,41 @@ const blockAppearancePresets = [
4462
4442
  bySkin: { lantern: {
4463
4443
  kind: "fixed",
4464
4444
  aspectRatio: "3/4",
4465
- borderRadius: "9999px 9999px 0 0"
4445
+ shape: "arch"
4466
4446
  } }
4467
4447
  },
4468
4448
  thumbnail: sketch.page([sketch.title(.4), sketch.across(3, [sketch.photo("tall", "arch"), sketch.text(1, .7)])]),
4469
4449
  styleFallback: [id$1("image-gallery-square-tiles")]
4470
4450
  }),
4471
4451
  defineArrangementLook("media-text-circle-beside-text", "media-text", "Circle beside the text", "circle-beside", ["imagePosition"], {
4472
- mediaFrame: { default: {
4473
- kind: "fixed",
4474
- aspectRatio: "1/1",
4475
- borderRadius: "50%"
4476
- } },
4477
- thumbnail: sketch.page([sketch.middle([sketch.photo("medium", "circle")], [sketch.title(.8), sketch.text(3)])]),
4478
- forcedKnobs: {
4479
- imageShape: "circle",
4480
- aspectRatio: "1/1"
4452
+ mediaFrame: {
4453
+ photoKind: "feature",
4454
+ default: {
4455
+ kind: "fixed",
4456
+ aspectRatio: "1/1",
4457
+ shape: "circle"
4458
+ }
4481
4459
  },
4460
+ thumbnail: sketch.page([sketch.middle([sketch.photo("medium", "circle")], [sketch.title(.8), sketch.text(3)])]),
4461
+ forcedKnobs: { aspectRatio: "1/1" },
4482
4462
  styleFallback: [id$1("media-text-photo-beside-text")]
4483
4463
  }),
4484
4464
  defineArrangementLook("media-text-quote-beside-circle", "media-text", "Quote beside a round photo", "circle-beside", ["imagePosition"], {
4485
- mediaFrame: { default: {
4486
- kind: "fixed",
4487
- aspectRatio: "1/1",
4488
- borderRadius: "50%"
4489
- } },
4465
+ mediaFrame: {
4466
+ photoKind: "feature",
4467
+ default: {
4468
+ kind: "fixed",
4469
+ aspectRatio: "1/1",
4470
+ shape: "circle"
4471
+ }
4472
+ },
4490
4473
  thumbnail: sketch.page([sketch.middle([sketch.photo("medium", "circle")], [
4491
4474
  sketch.title(.6),
4492
4475
  sketch.quote("small"),
4493
4476
  sketch.text(2),
4494
4477
  sketch.text(1, .5)
4495
4478
  ])]),
4496
- forcedKnobs: {
4497
- imageShape: "circle",
4498
- aspectRatio: "1/1"
4499
- },
4479
+ forcedKnobs: { aspectRatio: "1/1" },
4500
4480
  styleFallback: [id$1("media-text-circle-beside-text"), id$1("media-text-photo-beside-text")]
4501
4481
  }),
4502
4482
  defineArrangementLook("hero-photo-beside-text", "hero", "Photo beside the text", "split", heroKnobs, {
@@ -4597,12 +4577,18 @@ const blockAppearancePresets = [
4597
4577
  ]),
4598
4578
  styleFallback: [id$1("hero-photo-beside-text")]
4599
4579
  }),
4600
- defineArrangementLook("class-prices-big-figures", "class-prices", "Prices as big figures", "cards", [], { thumbnail: sketch.page([sketch.across(3, [
4601
- sketch.price,
4602
- sketch.title(.7, "small"),
4603
- sketch.text(1)
4604
- ])]) }),
4605
- defineArrangementLook("class-prices-rows", "class-prices", "Prices on the right of each row", "index", [], { thumbnail: sketch.page([sketch.down(3, [sketch.row([sketch.title(.7, "small"), sketch.text(1)], [sketch.price])], { ruled: true })]) }),
4580
+ defineArrangementLook("class-prices-big-figures", "class-prices", "Prices as big figures", "cards", [], {
4581
+ thumbnail: sketch.page([sketch.across(3, [
4582
+ sketch.price,
4583
+ sketch.title(.7, "small"),
4584
+ sketch.text(1)
4585
+ ])]),
4586
+ styleFallback: [id$1("class-prices-rows")]
4587
+ }),
4588
+ defineArrangementLook("class-prices-rows", "class-prices", "Prices on the right of each row", "index", [], {
4589
+ thumbnail: sketch.page([sketch.down(3, [sketch.row([sketch.title(.7, "small"), sketch.text(1)], [sketch.price])], { ruled: true })]),
4590
+ styleFallback: [id$1("class-prices-big-figures")]
4591
+ }),
4606
4592
  defineCardListLook("feature-cards-cards", "Cards", "cards", [
4607
4593
  "media",
4608
4594
  "title",
@@ -4945,6 +4931,7 @@ const blockAppearancePresets = [
4945
4931
  }),
4946
4932
  defineArrangementLook("intro-large-photo-beside-text", "intro", "Large photo beside the text", "media-copy", ["imagePosition"], {
4947
4933
  mediaFrame: {
4934
+ photoKind: "feature",
4948
4935
  default: naturalPhotoFrame,
4949
4936
  bySkin: { vista: {
4950
4937
  kind: "fixed",
@@ -4968,6 +4955,7 @@ const blockAppearancePresets = [
4968
4955
  }),
4969
4956
  defineArrangementLook("media-text-photo-to-edge", "media-text", "Photo to the edge", "default", ["imagePosition"], {
4970
4957
  mediaFrame: {
4958
+ photoKind: "feature",
4971
4959
  default: {
4972
4960
  kind: "variable",
4973
4961
  because: "The photo fills the section height, which depends on the text and viewport.",
@@ -4988,12 +4976,15 @@ const blockAppearancePresets = [
4988
4976
  styleFallback: [id$1("media-text-photo-beside-text")]
4989
4977
  }),
4990
4978
  defineArrangementLook("media-text-wide-photo-above", "media-text", "Wide photo above the text", "default", [], {
4991
- mediaFrame: { default: {
4992
- kind: "variable",
4993
- because: "The photo is a wide band on desktop and a landscape photo on phones.",
4994
- aspectRatio: "21/8",
4995
- mobileAspectRatio: "4/3"
4996
- } },
4979
+ mediaFrame: {
4980
+ photoKind: "feature",
4981
+ default: {
4982
+ kind: "variable",
4983
+ because: "The photo is a wide band on desktop and a landscape photo on phones.",
4984
+ aspectRatio: "21/8",
4985
+ mobileAspectRatio: "4/3"
4986
+ }
4987
+ },
4997
4988
  thumbnail: sketch.page([sketch.photo("short"), sketch.row(sketch.weight(1, [sketch.title(.9, "large")]), sketch.weight(1, [sketch.text(3)]))]),
4998
4989
  styleFallback: [id$1("media-text-photo-beside-text")]
4999
4990
  }),
@@ -5103,6 +5094,7 @@ const blockAppearancePresets = [
5103
5094
  }),
5104
5095
  defineArrangementLook("image-gallery-lead-photo", "image-gallery", "One large photo, then smaller ones", "tiles", ["blackAndWhite"], {
5105
5096
  mediaFrame: {
5097
+ photoKind: "gallery",
5106
5098
  default: {
5107
5099
  kind: "variable",
5108
5100
  because: "The lead fills two rows; on phones the lead and a trailing full-width tile are landscape.",
@@ -5123,6 +5115,7 @@ const blockAppearancePresets = [
5123
5115
  }),
5124
5116
  defineArrangementLook("image-gallery-captions-under", "image-gallery", "Photos with captions underneath", "tiles", ["blackAndWhite"], {
5125
5117
  mediaFrame: {
5118
+ photoKind: "gallery",
5126
5119
  default: {
5127
5120
  kind: "fixed",
5128
5121
  aspectRatio: "4/3"
@@ -5137,6 +5130,7 @@ const blockAppearancePresets = [
5137
5130
  }),
5138
5131
  defineArrangementLook("image-gallery-photo-band", "image-gallery", "One photo across the page", "tiles", ["blackAndWhite"], {
5139
5132
  mediaFrame: {
5133
+ photoKind: "gallery",
5140
5134
  default: {
5141
5135
  kind: "fixed",
5142
5136
  aspectRatio: "1/1"
@@ -5161,6 +5155,7 @@ const blockAppearancePresets = [
5161
5155
  }),
5162
5156
  defineArrangementLook("image-gallery-moving-row", "image-gallery", "A moving row of photos", "moving-row", ["blackAndWhite"], {
5163
5157
  mediaFrame: {
5158
+ photoKind: "gallery",
5164
5159
  default: {
5165
5160
  kind: "fixed",
5166
5161
  aspectRatio: "1/1"
@@ -5168,7 +5163,7 @@ const blockAppearancePresets = [
5168
5163
  bySkin: { orbit: {
5169
5164
  kind: "fixed",
5170
5165
  aspectRatio: "1/1",
5171
- borderRadius: "50%"
5166
+ shape: "circle"
5172
5167
  } }
5173
5168
  },
5174
5169
  thumbnail: sketch.band([sketch.across(5, [sketch.photo("short")], { overflow: true })]),
@@ -5458,379 +5453,429 @@ const blockAppearancePresets = [
5458
5453
  //#region ../theme-core/src/site-styles/appearancePresetCatalog.ts
5459
5454
  const appearancePresets = blockAppearancePresets;
5460
5455
  //#endregion
5461
- //#region ../theme-core/src/site-styles/rawStyleFields.ts
5462
- const themeV2RuntimeStyleFieldNames = [
5463
- "_frameStyles",
5464
- "_sectionStyles",
5465
- "_containerStyles",
5466
- "_cardStyles"
5467
- ];
5468
- const themeV2BlockSpecificRawStyleFieldNames = [
5469
- "_contentCardStyles",
5470
- "_heroLayoutStyles",
5471
- "_textCardStyles"
5472
- ];
5473
- const themeV2NormalEditorRawStyleFieldNames = [
5474
- ...themeV2RuntimeStyleFieldNames,
5475
- ...themeV2BlockSpecificRawStyleFieldNames,
5476
- "styleGroup"
5477
- ];
5478
- new Set(themeV2NormalEditorRawStyleFieldNames);
5479
- const themeV2CompilerOwnedFieldNames = [...themeV2RuntimeStyleFieldNames, ...themeV2BlockSpecificRawStyleFieldNames];
5480
- const staleTransitionStyleGroupPrefix = "site-style-transition-";
5481
- /**
5482
- * A `styleGroup` in the retired `site-style-transition-*` namespace is residue
5483
- * from the old per-block transition path (issue 1422). Any other value is
5484
- * authored and must survive.
5485
- */
5486
- function isStaleTransitionStyleGroup(value) {
5487
- return typeof value === "string" && value.startsWith(staleTransitionStyleGroupPrefix);
5488
- }
5489
- /** Drops a stale transition `styleGroup`, leaving authored values untouched. */
5490
- function stripStaleTransitionStyleGroup(content) {
5491
- if (!isStaleTransitionStyleGroup(content.styleGroup)) return { ...content };
5492
- const { styleGroup: _stale, ...rest } = content;
5493
- return rest;
5494
- }
5495
- //#endregion
5496
- //#region ../theme-core/src/site-styles/imageSurfaceBackground.ts
5497
- /**
5498
- * What a photo surface gets when nothing has chosen a treatment, so text on it
5499
- * stays readable. The one default for generated heroes, the opening-section
5500
- * repair and the resolver's fallback.
5501
- */
5502
- const defaultHeroImageSurfaceTreatment = { kind: "neutral-wash" };
5503
- function withImageSurfaceMotion(background, motion) {
5504
- return motion === "static" ? background : {
5505
- ...background,
5506
- motion
5507
- };
5508
- }
5509
- function compileImageSurfaceTreatmentBackground(background, treatment, foreground) {
5510
- switch (treatment.kind) {
5511
- case "none": return null;
5512
- case "brand-scrim": return withColorOverlay(background, darkenedThemeToken(treatment.token), treatment, "primaryForeground", foreground);
5513
- case "brand-wash": return withColorOverlay(background, lightenedBrandToken(treatment.token), treatment, "text", foreground);
5514
- case "neutral-scrim": return withColorOverlay(background, darkenedThemeToken("text"), treatment, "primaryForeground", foreground);
5515
- case "neutral-wash": return {
5516
- ...background,
5517
- overlay: {
5518
- type: "gradient",
5519
- gradient: "linear-gradient(180deg, rgba(255,255,255,0.38) 0%, rgba(244,241,234,0.62) 90%)",
5520
- opacity: 1
5521
- },
5522
- ...uniformForeground("text"),
5523
- ...foreground
5524
- };
5525
- case "solid-panel": return withColorOverlay(background, "surface", treatment, "text", foreground);
5526
- default: return assertNever(treatment);
5527
- }
5528
- }
5529
- function withColorOverlay(background, color, treatment, foregroundToken, foreground) {
5530
- return {
5531
- ...background,
5532
- overlay: {
5533
- type: "color",
5534
- color,
5535
- opacity: imageSurfaceTreatmentOpacity(treatment.kind, treatment.intensity)
5456
+ //#region ../site-contracts/src/pageDocument/legacyEdgePins.ts
5457
+ /** Frozen pre-1872 variants. Unknown combinations remain unavailable, never silently change shape. */
5458
+ const legacyEdges = [
5459
+ {
5460
+ legacy: {
5461
+ kind: "soft-fade",
5462
+ height: "medium",
5463
+ curve: "soft"
5536
5464
  },
5537
- ...uniformForeground(foregroundToken),
5538
- ...foreground
5539
- };
5540
- }
5541
- /** The brand tint older photo heroes use, shared with the Look photo treatment's brand arm. */
5542
- function brandScrimOverlay(token) {
5543
- return {
5544
- type: "color",
5545
- color: darkenedThemeToken(token),
5546
- opacity: imageSurfaceTreatmentOpacity("brand-scrim", void 0)
5547
- };
5548
- }
5549
- function uniformForeground(token) {
5550
- return {
5551
- textColor: token,
5552
- headingColor: token,
5553
- linkColor: token,
5554
- supportingColor: token
5555
- };
5556
- }
5557
- const opacityByKind = {
5558
- "brand-scrim": {
5559
- soft: .26,
5560
- balanced: .35,
5561
- strong: .52
5465
+ pin: {
5466
+ family: "gradient",
5467
+ variant: "soft",
5468
+ layers: 1,
5469
+ colourPreset: "fade"
5470
+ }
5562
5471
  },
5563
- "brand-wash": {
5564
- soft: .24,
5565
- balanced: .34,
5566
- strong: .46
5472
+ {
5473
+ legacy: {
5474
+ kind: "soft-fade",
5475
+ height: "large",
5476
+ curve: "spacious"
5477
+ },
5478
+ pin: {
5479
+ family: "gradient",
5480
+ variant: "spacious",
5481
+ layers: 1,
5482
+ colourPreset: "fade"
5483
+ }
5567
5484
  },
5568
- "neutral-scrim": {
5569
- soft: .42,
5570
- balanced: .58,
5571
- strong: .72
5485
+ {
5486
+ legacy: {
5487
+ kind: "soft-fade",
5488
+ height: "expansive",
5489
+ curve: "expansive"
5490
+ },
5491
+ pin: {
5492
+ family: "gradient",
5493
+ variant: "expansive",
5494
+ layers: 1,
5495
+ colourPreset: "fade"
5496
+ }
5572
5497
  },
5573
- "neutral-wash": {
5574
- soft: 1,
5575
- balanced: 1,
5576
- strong: 1
5498
+ {
5499
+ legacy: {
5500
+ kind: "wave-edge",
5501
+ height: "medium",
5502
+ amplitude: "balanced",
5503
+ rhythm: "double",
5504
+ symmetry: "symmetrical"
5505
+ },
5506
+ pin: {
5507
+ family: "wave",
5508
+ variant: "balanced",
5509
+ layers: 1,
5510
+ colourPreset: "fade"
5511
+ }
5577
5512
  },
5578
- "solid-panel": {
5579
- soft: .78,
5580
- balanced: .88,
5581
- strong: .94
5513
+ {
5514
+ legacy: {
5515
+ kind: "wave-edge",
5516
+ height: "medium",
5517
+ amplitude: "balanced",
5518
+ rhythm: "double",
5519
+ symmetry: "asymmetrical"
5520
+ },
5521
+ pin: {
5522
+ family: "wave",
5523
+ variant: "classic",
5524
+ layers: 1,
5525
+ colourPreset: "fade"
5526
+ }
5527
+ },
5528
+ {
5529
+ legacy: {
5530
+ kind: "wave-edge",
5531
+ height: "compact",
5532
+ amplitude: "subtle",
5533
+ rhythm: "double",
5534
+ symmetry: "symmetrical",
5535
+ echo: true
5536
+ },
5537
+ pin: {
5538
+ family: "wave",
5539
+ variant: "echo",
5540
+ layers: 2,
5541
+ colourPreset: "fade"
5542
+ }
5543
+ },
5544
+ {
5545
+ legacy: {
5546
+ kind: "wave-edge",
5547
+ height: "compact",
5548
+ amplitude: "subtle",
5549
+ rhythm: "single",
5550
+ symmetry: "symmetrical"
5551
+ },
5552
+ pin: {
5553
+ family: "wave",
5554
+ variant: "gentle",
5555
+ layers: 1,
5556
+ colourPreset: "fade"
5557
+ }
5558
+ },
5559
+ {
5560
+ legacy: {
5561
+ kind: "wave-edge",
5562
+ height: "large",
5563
+ amplitude: "bold",
5564
+ rhythm: "double",
5565
+ symmetry: "symmetrical"
5566
+ },
5567
+ pin: {
5568
+ family: "wave",
5569
+ variant: "bold",
5570
+ layers: 1,
5571
+ colourPreset: "fade"
5572
+ }
5573
+ },
5574
+ {
5575
+ legacy: {
5576
+ kind: "wave-edge",
5577
+ height: "medium",
5578
+ amplitude: "balanced",
5579
+ rhythm: "double",
5580
+ symmetry: "drift"
5581
+ },
5582
+ pin: {
5583
+ family: "wave",
5584
+ variant: "drift",
5585
+ layers: 1,
5586
+ colourPreset: "fade"
5587
+ }
5588
+ },
5589
+ {
5590
+ legacy: {
5591
+ kind: "arc-edge",
5592
+ height: "large",
5593
+ echo: true
5594
+ },
5595
+ pin: {
5596
+ family: "arc",
5597
+ variant: "echo",
5598
+ layers: 1,
5599
+ colourPreset: "fade"
5600
+ }
5601
+ },
5602
+ {
5603
+ legacy: {
5604
+ kind: "arc-edge",
5605
+ height: "large",
5606
+ bulge: true
5607
+ },
5608
+ pin: {
5609
+ family: "arc",
5610
+ variant: "bulge",
5611
+ layers: 1,
5612
+ colourPreset: "fade"
5613
+ }
5614
+ },
5615
+ {
5616
+ legacy: {
5617
+ kind: "angle-edge",
5618
+ height: "compact",
5619
+ slope: "subtle",
5620
+ direction: "forward"
5621
+ },
5622
+ pin: {
5623
+ family: "angle",
5624
+ variant: "subtle",
5625
+ layers: 1,
5626
+ colourPreset: "fade"
5627
+ }
5628
+ },
5629
+ {
5630
+ legacy: {
5631
+ kind: "angle-edge",
5632
+ height: "medium",
5633
+ slope: "balanced",
5634
+ direction: "forward"
5635
+ },
5636
+ pin: {
5637
+ family: "angle",
5638
+ variant: "balanced",
5639
+ layers: 1,
5640
+ colourPreset: "fade"
5641
+ }
5642
+ },
5643
+ {
5644
+ legacy: {
5645
+ kind: "angle-edge",
5646
+ height: "large",
5647
+ slope: "steep",
5648
+ direction: "forward"
5649
+ },
5650
+ pin: {
5651
+ family: "angle",
5652
+ variant: "steep",
5653
+ layers: 1,
5654
+ colourPreset: "fade"
5655
+ }
5656
+ },
5657
+ {
5658
+ legacy: {
5659
+ kind: "angle-edge",
5660
+ height: "large",
5661
+ slope: "steady",
5662
+ direction: "forward"
5663
+ },
5664
+ pin: {
5665
+ family: "angle",
5666
+ variant: "steady",
5667
+ layers: 1,
5668
+ colourPreset: "fade"
5669
+ }
5670
+ },
5671
+ {
5672
+ legacy: {
5673
+ kind: "torn-edge",
5674
+ height: "compact",
5675
+ cut: "holes"
5676
+ },
5677
+ pin: {
5678
+ family: "torn",
5679
+ variant: "holes",
5680
+ layers: 1,
5681
+ colourPreset: "fade"
5682
+ }
5582
5683
  }
5583
- };
5584
- function imageSurfaceTreatmentOpacity(kind, intensity) {
5585
- return opacityByKind[kind][intensity ?? "balanced"];
5586
- }
5587
- function darkenedThemeToken(token) {
5588
- return `color-mix(in oklab, rgb(var(--tb-${token})), black 28%)`;
5589
- }
5590
- function lightenedBrandToken(token) {
5591
- return `color-mix(in oklab, rgb(var(--tb-${token})), white 42%)`;
5592
- }
5593
- //#endregion
5594
- //#region ../theme-core/src/site-styles/runtimeBackgroundResolution.ts
5595
- function parseCanonicalRuntimeBackground(content) {
5596
- const background = readRecord(readRecord(content._sectionStyles)?.background);
5597
- if (!background) return { kind: "none" };
5598
- const parsed = runtimeBoxBackgroundSchema.safeParse(background);
5599
- if (!parsed.success) return { kind: "none" };
5600
- return parsed.data.contentOwner === "page-design-editor" ? {
5601
- kind: "page-design-override",
5602
- background: parsed.data
5603
- } : {
5604
- kind: "block-authored",
5605
- background: parsed.data
5684
+ ];
5685
+ function legacyKey(treatment) {
5686
+ return JSON.stringify(Object.entries(treatment).sort(([left], [right]) => left.localeCompare(right)));
5687
+ }
5688
+ function convertLegacyEdgePin(treatment) {
5689
+ if (treatment.kind === "none") return {
5690
+ family: "none",
5691
+ layers: 1,
5692
+ colourPreset: "fade"
5606
5693
  };
5607
- }
5608
- /** The Look owns photo shading; copy panels keep their independently solved ink. */
5609
- function applyLookPhotoTreatment(background, treatment, palette, tint = "dark", placement = "foot") {
5610
- if (background.type !== "image" || !treatment) return background;
5611
- if (tint === "brand") return brandPhotoTreatment(background, treatment, palette, placement);
5612
- if (treatment === "photo-only") return background;
5613
- return darkPhotoTreatment(background, palette, placement);
5614
- }
5615
- function darkPhotoTreatment(background, palette, placement, brandWash) {
5616
- const ink = photoCopyInk(palette);
5694
+ const entry = legacyEdges.find((candidate) => legacyKey(candidate.legacy) === legacyKey(treatment));
5695
+ if (entry) return entry.pin;
5617
5696
  return {
5618
- ...background,
5619
- overlay: {
5620
- type: "gradient",
5621
- opacity: 1,
5622
- gradient: photoCopyShade(placement, brandWash)
5623
- },
5624
- textColor: ink,
5625
- headingColor: ink,
5626
- linkColor: ink,
5627
- supportingColor: ink
5628
- };
5629
- }
5630
- /**
5631
- * The least black any photo copy band puts behind its text: the centred band's
5632
- * even 60%. The foot band is at least 76% where its copy sits and the foot
5633
- * brand paint 80% (under a wash no lighter than 28% black), so 60% bounds all three.
5634
- */
5635
- const PHOTO_COPY_MIN_SHADE = .6;
5636
- /** Centred copy gets an even 60% band (white text over a white photo stays above 5.5:1) that eases off at the edges; the foot keeps its original paint. */
5637
- function photoCopyShade(placement, brandWash) {
5638
- if (placement === "foot" && brandWash) return `linear-gradient(${brandWash}, ${brandWash}), linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8))`;
5639
- const band = `rgba(0,0,0,${PHOTO_COPY_MIN_SHADE})`;
5640
- return `var(--rb-opening-photo-shade, linear-gradient(transparent, transparent)), ${placement === "centre" ? `linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, ${band} 15%, ${band} 85%, rgba(0,0,0,0.15) 100%)` : "linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.76) 25%, rgba(0,0,0,0.4) 46%, transparent 72%)"}${brandWash ? `, linear-gradient(${brandWash}, ${brandWash})` : ""}`;
5641
- }
5642
- /** Every pixel behind photo copy: anything from black up to the minimum shade over a white photo. */
5643
- const PHOTO_COPY_PAINT = luminanceInterval(0, hexLuminance(compositeHex("#000000", PHOTO_COPY_MIN_SHADE, "#ffffff")));
5644
- /** The palette's own light colour (its background, or its text on a dark palette) when it reads over the copy band, else white. */
5645
- function photoCopyInk(palette) {
5646
- const ink = paletteInk(PHOTO_COPY_PAINT, paletteInkRoles(palette));
5647
- return ink.kind === "unpaintable" ? "#FFFFFF" : paletteInkToken(ink);
5648
- }
5649
- /** A light brand's dark ink cannot sit on unknown pixels: give light ink a dark backing. */
5650
- function brandPhotoTreatment(background, treatment, palette, placement) {
5651
- const brand = brandScrimOverlay("primary");
5652
- if (treatment === "photo-only") return {
5653
- ...background,
5654
- overlay: brand
5655
- };
5656
- if (surfaceToneFromForegroundToken(palette, "primaryForeground") === "dark") return {
5657
- ...background,
5658
- overlay: brand,
5659
- textColor: "primaryForeground",
5660
- headingColor: "primaryForeground",
5661
- linkColor: "primaryForeground",
5662
- supportingColor: "primaryForeground"
5697
+ family: treatment.kind === "soft-fade" ? "gradient" : treatment.kind === "wave-edge" ? "wave" : treatment.kind === "arc-edge" ? "arc" : treatment.kind === "torn-edge" ? "torn" : "angle",
5698
+ variant: `unavailable:${legacyKey(treatment)}`,
5699
+ layers: 1,
5700
+ colourPreset: "fade"
5663
5701
  };
5664
- return darkPhotoTreatment(background, palette, placement, `color-mix(in srgb, ${brand.color} ${brand.opacity * 100}%, transparent)`);
5665
5702
  }
5666
- function resolveSectionBackground(source, lookDefault, rhythm, arrangementHeroPhoto) {
5667
- if (heroPhotoIsContent(source, arrangementHeroPhoto, rhythm !== void 0)) {
5668
- if (rhythm !== void 0) return rhythmBackground(rhythm);
5669
- return {
5670
- kind: "content-media",
5671
- background: source.background,
5672
- ground: {
5673
- type: "color",
5674
- color: arrangementHeroPhoto?.fallbackToken ?? "background",
5675
- textColor: source.background.textColor,
5676
- headingColor: source.background.headingColor,
5677
- linkColor: source.background.linkColor,
5678
- supportingColor: source.background.supportingColor
5679
- }
5680
- };
5681
- }
5682
- if (source.kind === "page-design-override") return {
5683
- kind: "override",
5684
- background: source.background
5685
- };
5686
- if (isAuthoredMedia(source)) return {
5687
- kind: "authored-media",
5688
- background: lookDefault ? mergeLookForegroundWithAuthoredMedia(lookDefault, source.background) : source.background
5689
- };
5690
- if (lookDefault) return {
5691
- kind: "look-surface",
5692
- background: lookDefault
5693
- };
5694
- if (source.kind === "block-authored") return {
5695
- kind: "authored-colour",
5696
- background: source.background
5697
- };
5698
- return rhythmBackground(rhythm);
5699
- }
5700
- function resolveSectionForeground(background, palette) {
5701
- return resolveSurfaceForeground(sectionForegroundBackground(background, palette), palette, {}, { compositeBase: "background" });
5702
- }
5703
- /** Legacy detached photos keep already-legible authored ink and its exact CSS treatment. */
5704
- function sectionForegroundBackground(resolved, palette) {
5705
- if (resolved.kind === "base") return null;
5706
- if (resolved.kind !== "content-media") return resolved.background;
5707
- const original = resolveSurfaceForeground(resolved.background, palette);
5708
- const measured = resolveSurfaceForeground(resolved.ground, palette);
5709
- if (original.kind !== "known" || measured.kind !== "known") return resolved.background;
5710
- return [
5711
- "text",
5712
- "heading",
5713
- "link",
5714
- "supporting"
5715
- ].every((role) => original.roles[role] === measured.roles[role]) ? resolved.background : resolved.ground;
5716
- }
5717
- function mergeLookForegroundWithAuthoredMedia(lookDefault, authored) {
5718
- const paintsBand = lookDefault.type === "color" || lookDefault.type === "gradient";
5719
- const lookScrim = paintsBand ? lookDefault.mediaScrim : void 0;
5720
- if (paintsBand && !lookScrim) return authored;
5721
- const merged = runtimeBoxBackgroundSchema.safeParse({
5722
- ...lookDefault,
5723
- type: authored.type,
5724
- image: authored.image,
5725
- objectFit: authored.objectFit,
5726
- scale: authored.scale,
5727
- position: authored.position,
5728
- ...lookScrim ? { overlay: lookScrim } : {}
5703
+ const pageDesignUserPinnedAppearanceChoiceSchema = z.object({
5704
+ kind: z.literal("user-pinned"),
5705
+ value: z.string().min(1).transform(asAppearancePresetId)
5706
+ }).strict();
5707
+ const legacyBoundaryTreatmentSchema = z.discriminatedUnion("kind", [
5708
+ z.object({ kind: z.literal("none") }).strict(),
5709
+ z.object({
5710
+ kind: z.literal("soft-fade"),
5711
+ height: z.enum([
5712
+ "compact",
5713
+ "medium",
5714
+ "large",
5715
+ "expansive"
5716
+ ]),
5717
+ curve: z.enum([
5718
+ "soft",
5719
+ "spacious",
5720
+ "expansive"
5721
+ ])
5722
+ }).strict(),
5723
+ z.object({
5724
+ kind: z.literal("wave-edge"),
5725
+ height: z.enum([
5726
+ "compact",
5727
+ "medium",
5728
+ "large"
5729
+ ]),
5730
+ amplitude: z.enum([
5731
+ "subtle",
5732
+ "balanced",
5733
+ "bold"
5734
+ ]),
5735
+ rhythm: z.enum(["single", "double"]),
5736
+ symmetry: z.enum([
5737
+ "symmetrical",
5738
+ "asymmetrical",
5739
+ "drift"
5740
+ ]),
5741
+ echo: z.literal(true).optional()
5742
+ }).strict(),
5743
+ z.object({
5744
+ kind: z.literal("arc-edge"),
5745
+ height: z.enum([
5746
+ "compact",
5747
+ "medium",
5748
+ "large"
5749
+ ]),
5750
+ echo: z.literal(true).optional(),
5751
+ bulge: z.literal(true).optional()
5752
+ }).strict(),
5753
+ z.object({
5754
+ kind: z.literal("angle-edge"),
5755
+ height: z.enum([
5756
+ "compact",
5757
+ "medium",
5758
+ "large"
5759
+ ]),
5760
+ slope: z.enum([
5761
+ "subtle",
5762
+ "balanced",
5763
+ "steep",
5764
+ "steady"
5765
+ ]),
5766
+ direction: z.enum(["forward", "reverse"])
5767
+ }).strict(),
5768
+ z.object({
5769
+ kind: z.literal("torn-edge"),
5770
+ height: z.enum(["compact"]),
5771
+ cut: z.enum(["holes"])
5772
+ }).strict()
5773
+ ]);
5774
+ /** The canonical pin, as the editor sends it; stored documents also admit the legacy shapes below. */
5775
+ const sectionBoundaryTreatmentSchema = z.object({
5776
+ family: z.enum([
5777
+ "none",
5778
+ "gradient",
5779
+ "wave",
5780
+ "arc",
5781
+ "angle",
5782
+ "torn",
5783
+ "ridge",
5784
+ "hand-drawn-wave"
5785
+ ]),
5786
+ variant: z.string().min(1).optional(),
5787
+ layers: z.union([
5788
+ z.literal(1),
5789
+ z.literal(2),
5790
+ z.literal(3)
5791
+ ]),
5792
+ colourPreset: z.enum([
5793
+ "fade",
5794
+ "blend",
5795
+ "accent",
5796
+ "main"
5797
+ ])
5798
+ }).strict();
5799
+ const pageDesignBoundaryTreatmentSchema = z.union([sectionBoundaryTreatmentSchema, legacyBoundaryTreatmentSchema.transform(convertLegacyEdgePin)]);
5800
+ const pageDesignUserPinnedBoundaryTreatmentChoiceSchema = z.object({
5801
+ kind: z.literal("user-pinned"),
5802
+ value: pageDesignBoundaryTreatmentSchema
5803
+ }).strict();
5804
+ const pageDesignBlockLookPinSchema = z.object({
5805
+ blockId: z.string().min(1).transform(asDesignBlockId),
5806
+ blockKind: z.string().min(1),
5807
+ choice: pageDesignUserPinnedAppearanceChoiceSchema
5808
+ }).strict();
5809
+ const pageDesignBoundaryPinSchema = z.object({
5810
+ boundaryId: z.string().min(1).startsWith("boundary:", { error: "DesignBoundaryId must start with \"boundary:\"." }).transform(asDesignBoundaryId),
5811
+ previousBlockId: z.string().min(1).transform(asDesignBlockId),
5812
+ nextBlockId: z.string().min(1).transform(asDesignBlockId),
5813
+ choice: pageDesignUserPinnedBoundaryTreatmentChoiceSchema
5814
+ }).strict().superRefine(validateBoundaryPinIdMatchesBlocks);
5815
+ const pageDesignDecisionsV2Schema = z.object({
5816
+ schemaVersion: z.literal(2),
5817
+ pageFlowPresetId: z.string().min(1).transform(asPageFlowPresetId),
5818
+ blockLookPins: z.array(pageDesignBlockLookPinSchema),
5819
+ boundaryPins: z.array(pageDesignBoundaryPinSchema)
5820
+ }).strict().superRefine(validateUniquePageDesignPins);
5821
+ function addDuplicateStringIssues(ctx, input) {
5822
+ const seen = /* @__PURE__ */ new Set();
5823
+ const duplicates = /* @__PURE__ */ new Set();
5824
+ input.values.forEach((value) => {
5825
+ if (seen.has(value)) duplicates.add(value);
5826
+ seen.add(value);
5827
+ });
5828
+ duplicates.forEach((duplicate) => {
5829
+ ctx.addIssue({
5830
+ code: z.ZodIssueCode.custom,
5831
+ path: [...input.path],
5832
+ message: `Duplicate ${input.label}: ${duplicate}.`
5833
+ });
5729
5834
  });
5730
- return merged.success ? merged.data : authored;
5731
- }
5732
- function readRecord(value) {
5733
- return typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
5734
- }
5735
- function heroPhotoIsContent(source, photo, hasArrangementGround) {
5736
- return photo !== void 0 && !photo.paintsGround && source.kind === "block-authored" && source.background.type === "image" && (hasArrangementGround || !source.background.overlay);
5737
5835
  }
5738
- function isAuthoredMedia(source) {
5739
- return source.kind === "block-authored" && (source.background.type === "image" || source.background.type === "video");
5836
+ function validateBoundaryPinIdMatchesBlocks(pin, ctx) {
5837
+ const expectedBoundaryId = makeBoundaryId(pin.previousBlockId, pin.nextBlockId);
5838
+ if (pin.boundaryId !== expectedBoundaryId) ctx.addIssue({
5839
+ code: z.ZodIssueCode.custom,
5840
+ path: ["boundaryId"],
5841
+ message: `Boundary id must match previousBlockId and nextBlockId. Expected ${expectedBoundaryId}.`
5842
+ });
5740
5843
  }
5741
- function rhythmBackground(background) {
5742
- return background ? {
5743
- kind: "rhythm",
5744
- background
5745
- } : { kind: "base" };
5844
+ function validateUniquePageDesignPins(intent, ctx) {
5845
+ addDuplicateStringIssues(ctx, {
5846
+ values: intent.blockLookPins.map((pin) => pin.blockId),
5847
+ path: ["blockLookPins"],
5848
+ label: "block Look pin"
5849
+ });
5850
+ addDuplicateStringIssues(ctx, {
5851
+ values: intent.boundaryPins.map((pin) => makeBoundaryId(pin.previousBlockId, pin.nextBlockId)),
5852
+ path: ["boundaryPins"],
5853
+ label: "boundary pin"
5854
+ });
5746
5855
  }
5747
- /**
5748
- * Semantic section grounds: background/base -> light; muted/surface bands ->
5749
- * band; primary/secondary/accent (including pop) -> brand; text/inverse and
5750
- * numbered deep shades -> deep. Media and gradients use the existing resolved
5751
- * scrim foreground/tone contract: light ink over a dark veil -> deep, dark ink
5752
- * over a light veil -> light. Unclassified/no veil defaults to light.
5753
- * Background ownership (override, authored, Look or rhythm) never changes tone.
5754
- */
5755
- const solidGrounds = {
5756
- background: "light",
5757
- muted: "band",
5758
- surface: "band",
5759
- surfaceAlt: "band",
5760
- primary: "brand",
5761
- secondary: "brand",
5762
- accent: "brand",
5763
- text: "deep"
5764
- };
5765
- function deriveSectionGround(resolved, palette) {
5766
- if (resolved.kind === "base") return "light";
5767
- const background = resolved.kind === "content-media" ? resolved.ground : resolved.background;
5768
- const solid = solidSectionGround(background);
5769
- if (solid) return solid;
5770
- return (scrimTone(sectionScrimSamples(background, palette)) ?? sectionForegroundTone(resolved, palette)) === "dark" ? "deep" : "light";
5771
- }
5772
- /** Content media sits beside the text, so its slots sit on the colour ground, as deriveSectionGround reads it. */
5773
- function sectionSurfaceBase(resolved, palette) {
5774
- if (resolved.kind === "base") return {
5775
- kind: "measured",
5776
- token: "background"
5856
+ //#endregion
5857
+ //#region ../theme-core/src/site-styles/schemaVersionedJson.ts
5858
+ function parseSchemaVersionedJson(input) {
5859
+ if (input.value == null) return { kind: "absent" };
5860
+ if (typeof input.value === "object" && input.value !== null && "schemaVersion" in input.value && input.value.schemaVersion !== input.expectedSchemaVersion) return {
5861
+ kind: "invalid",
5862
+ issue: {
5863
+ kind: "unsupported-schema-version",
5864
+ message: input.unsupportedSchemaVersionMessage
5865
+ }
5777
5866
  };
5778
- const background = resolved.kind === "content-media" ? resolved.ground : resolved.background;
5779
- switch (background.type) {
5780
- case "image":
5781
- case "video": return {
5782
- kind: "unmeasured",
5783
- paint: "media"
5784
- };
5785
- case "gradient": return {
5786
- kind: "unmeasured",
5787
- paint: "gradient"
5788
- };
5789
- case "color": {
5790
- const colour = background.color ?? "background";
5791
- return resolveConcreteColorHex(colour, palette) ? {
5792
- kind: "measured",
5793
- token: colour
5794
- } : {
5795
- kind: "unmeasured",
5796
- paint: "colour"
5797
- };
5867
+ const parsed = z.safeParse(input.schema, input.value);
5868
+ if (!parsed.success) return {
5869
+ kind: "invalid",
5870
+ issue: {
5871
+ kind: "invalid-json-shape",
5872
+ message: parsed.error.issues[0]?.message ?? input.invalidShapeMessage
5798
5873
  }
5799
- }
5800
- }
5801
- function solidSectionGround(background) {
5802
- if (background.type !== "color") return null;
5803
- return solidTokenGround(background.color ?? "background");
5804
- }
5805
- /** Shared classification for section backgrounds and resolved parent surfaces. */
5806
- function solidTokenGround(color) {
5807
- return solidGrounds[color] ?? (/-(?:[7-9]00|950)$/.test(color) ? "deep" : null);
5808
- }
5809
- function sectionForegroundTone(resolved, palette) {
5810
- const foreground = resolveSectionForeground(resolved, palette);
5811
- return foreground.kind === "known" ? surfaceToneFromForegroundToken(palette, foreground.roles.text) : "unknown";
5812
- }
5813
- function sectionVeil(background) {
5814
- switch (background.type) {
5815
- case "color": return null;
5816
- case "image":
5817
- case "video": return background.overlay;
5818
- case "gradient": return {
5819
- type: "gradient",
5820
- gradient: background.gradient,
5821
- opacity: 1
5822
- };
5823
- }
5824
- }
5825
- function sectionScrimSamples(background, palette) {
5826
- const overlay = sectionVeil(background);
5827
- if (overlay?.type === "gradient") return gradientScrimSamples(overlay.gradient ?? "", overlay.opacity ?? 1, palette);
5828
- if (overlay?.type !== "color") return [];
5829
- const hex = resolveConcreteColorHex(overlay.color ?? "", palette);
5830
- return hex ? [{
5831
- hex,
5832
- alpha: overlay.opacity ?? 1
5833
- }] : [];
5874
+ };
5875
+ return {
5876
+ kind: "parsed",
5877
+ value: parsed.data
5878
+ };
5834
5879
  }
5835
5880
  //#endregion
5836
5881
  //#region ../theme-core/src/site-styles/transitionCatalogue.ts
@@ -5858,6 +5903,14 @@ const transitionCatalogueFamilies = [
5858
5903
  {
5859
5904
  id: "torn",
5860
5905
  label: "Torn edge"
5906
+ },
5907
+ {
5908
+ id: "ridge",
5909
+ label: "Ridge"
5910
+ },
5911
+ {
5912
+ id: "hand-drawn-wave",
5913
+ label: "Hand-drawn wave"
5861
5914
  }
5862
5915
  ];
5863
5916
  const mediumHeight = "6rem + 2px";
@@ -5882,9 +5935,10 @@ const transitionCatalogueEntries = defineExactCatalog()([
5882
5935
  label: "Soft",
5883
5936
  variantLabel: "Soft",
5884
5937
  treatment: {
5885
- kind: "soft-fade",
5886
- height: "medium",
5887
- curve: "soft"
5938
+ family: "gradient",
5939
+ variant: "soft",
5940
+ layers: 1,
5941
+ colourPreset: "fade"
5888
5942
  },
5889
5943
  size: "medium",
5890
5944
  heightExpression: mediumHeight,
@@ -5898,9 +5952,10 @@ const transitionCatalogueEntries = defineExactCatalog()([
5898
5952
  label: "Spacious",
5899
5953
  variantLabel: "Spacious",
5900
5954
  treatment: {
5901
- kind: "soft-fade",
5902
- height: "large",
5903
- curve: "spacious"
5955
+ family: "gradient",
5956
+ variant: "spacious",
5957
+ layers: 1,
5958
+ colourPreset: "fade"
5904
5959
  },
5905
5960
  size: "spacious",
5906
5961
  heightExpression: "10rem",
@@ -5914,9 +5969,10 @@ const transitionCatalogueEntries = defineExactCatalog()([
5914
5969
  label: "Expansive",
5915
5970
  variantLabel: "Expansive",
5916
5971
  treatment: {
5917
- kind: "soft-fade",
5918
- height: "expansive",
5919
- curve: "expansive"
5972
+ family: "gradient",
5973
+ variant: "expansive",
5974
+ layers: 1,
5975
+ colourPreset: "fade"
5920
5976
  },
5921
5977
  size: "expansive",
5922
5978
  heightExpression: "14rem",
@@ -5930,11 +5986,10 @@ const transitionCatalogueEntries = defineExactCatalog()([
5930
5986
  label: "Balanced wave",
5931
5987
  variantLabel: "Balanced",
5932
5988
  treatment: {
5933
- kind: "wave-edge",
5934
- height: "medium",
5935
- amplitude: "balanced",
5936
- rhythm: "double",
5937
- symmetry: "symmetrical"
5989
+ family: "wave",
5990
+ variant: "balanced",
5991
+ layers: 1,
5992
+ colourPreset: "fade"
5938
5993
  },
5939
5994
  size: "medium",
5940
5995
  heightExpression: mediumHeight,
@@ -5951,11 +6006,10 @@ const transitionCatalogueEntries = defineExactCatalog()([
5951
6006
  label: "Classic wave",
5952
6007
  variantLabel: "Classic",
5953
6008
  treatment: {
5954
- kind: "wave-edge",
5955
- height: "medium",
5956
- amplitude: "balanced",
5957
- rhythm: "double",
5958
- symmetry: "asymmetrical"
6009
+ family: "wave",
6010
+ variant: "classic",
6011
+ layers: 1,
6012
+ colourPreset: "fade"
5959
6013
  },
5960
6014
  size: "medium",
5961
6015
  heightExpression: mediumHeight,
@@ -5972,12 +6026,10 @@ const transitionCatalogueEntries = defineExactCatalog()([
5972
6026
  label: "Wave with echo",
5973
6027
  variantLabel: "With echo",
5974
6028
  treatment: {
5975
- kind: "wave-edge",
5976
- height: "compact",
5977
- amplitude: "subtle",
5978
- rhythm: "double",
5979
- symmetry: "symmetrical",
5980
- echo: true
6029
+ family: "wave",
6030
+ variant: "echo",
6031
+ layers: 2,
6032
+ colourPreset: "fade"
5981
6033
  },
5982
6034
  size: "compact",
5983
6035
  heightExpression: compactHeight,
@@ -5995,11 +6047,10 @@ const transitionCatalogueEntries = defineExactCatalog()([
5995
6047
  label: "Gentle wave",
5996
6048
  variantLabel: "Gentle",
5997
6049
  treatment: {
5998
- kind: "wave-edge",
5999
- height: "compact",
6000
- amplitude: "subtle",
6001
- rhythm: "single",
6002
- symmetry: "symmetrical"
6050
+ family: "wave",
6051
+ variant: "gentle",
6052
+ layers: 1,
6053
+ colourPreset: "fade"
6003
6054
  },
6004
6055
  size: "compact",
6005
6056
  heightExpression: compactHeight,
@@ -6016,11 +6067,10 @@ const transitionCatalogueEntries = defineExactCatalog()([
6016
6067
  label: "Bold wave",
6017
6068
  variantLabel: "Bold",
6018
6069
  treatment: {
6019
- kind: "wave-edge",
6020
- height: "large",
6021
- amplitude: "bold",
6022
- rhythm: "double",
6023
- symmetry: "symmetrical"
6070
+ family: "wave",
6071
+ variant: "bold",
6072
+ layers: 1,
6073
+ colourPreset: "fade"
6024
6074
  },
6025
6075
  size: "large",
6026
6076
  heightExpression: largeHeight,
@@ -6037,11 +6087,10 @@ const transitionCatalogueEntries = defineExactCatalog()([
6037
6087
  label: "Drift wave",
6038
6088
  variantLabel: "Drift",
6039
6089
  treatment: {
6040
- kind: "wave-edge",
6041
- height: "medium",
6042
- amplitude: "balanced",
6043
- rhythm: "double",
6044
- symmetry: "drift"
6090
+ family: "wave",
6091
+ variant: "drift",
6092
+ layers: 1,
6093
+ colourPreset: "fade"
6045
6094
  },
6046
6095
  size: "medium",
6047
6096
  heightExpression: mediumHeight,
@@ -6058,9 +6107,10 @@ const transitionCatalogueEntries = defineExactCatalog()([
6058
6107
  label: "Arc with echo",
6059
6108
  variantLabel: "With echo",
6060
6109
  treatment: {
6061
- kind: "arc-edge",
6062
- height: "large",
6063
- echo: true
6110
+ family: "arc",
6111
+ variant: "echo",
6112
+ layers: 1,
6113
+ colourPreset: "fade"
6064
6114
  },
6065
6115
  size: "large",
6066
6116
  heightExpression: arcHeight,
@@ -6077,9 +6127,10 @@ const transitionCatalogueEntries = defineExactCatalog()([
6077
6127
  label: "Arc bulging down",
6078
6128
  variantLabel: "Bulging down",
6079
6129
  treatment: {
6080
- kind: "arc-edge",
6081
- height: "large",
6082
- bulge: true
6130
+ family: "arc",
6131
+ variant: "bulge",
6132
+ layers: 1,
6133
+ colourPreset: "fade"
6083
6134
  },
6084
6135
  size: "large",
6085
6136
  heightExpression: arcHeight,
@@ -6096,10 +6147,10 @@ const transitionCatalogueEntries = defineExactCatalog()([
6096
6147
  label: "Subtle angle",
6097
6148
  variantLabel: "Subtle",
6098
6149
  treatment: {
6099
- kind: "angle-edge",
6100
- height: "compact",
6101
- slope: "subtle",
6102
- direction: "forward"
6150
+ family: "angle",
6151
+ variant: "subtle",
6152
+ layers: 1,
6153
+ colourPreset: "fade"
6103
6154
  },
6104
6155
  size: "compact",
6105
6156
  heightExpression: compactHeight,
@@ -6119,10 +6170,10 @@ const transitionCatalogueEntries = defineExactCatalog()([
6119
6170
  label: "Balanced angle",
6120
6171
  variantLabel: "Balanced",
6121
6172
  treatment: {
6122
- kind: "angle-edge",
6123
- height: "medium",
6124
- slope: "balanced",
6125
- direction: "forward"
6173
+ family: "angle",
6174
+ variant: "balanced",
6175
+ layers: 1,
6176
+ colourPreset: "fade"
6126
6177
  },
6127
6178
  size: "medium",
6128
6179
  heightExpression: mediumHeight,
@@ -6142,10 +6193,10 @@ const transitionCatalogueEntries = defineExactCatalog()([
6142
6193
  label: "Steep angle",
6143
6194
  variantLabel: "Steep",
6144
6195
  treatment: {
6145
- kind: "angle-edge",
6146
- height: "large",
6147
- slope: "steep",
6148
- direction: "forward"
6196
+ family: "angle",
6197
+ variant: "steep",
6198
+ layers: 1,
6199
+ colourPreset: "fade"
6149
6200
  },
6150
6201
  size: "large",
6151
6202
  heightExpression: largeHeight,
@@ -6165,10 +6216,10 @@ const transitionCatalogueEntries = defineExactCatalog()([
6165
6216
  label: "Angle that keeps its slope",
6166
6217
  variantLabel: "Keeps its slope",
6167
6218
  treatment: {
6168
- kind: "angle-edge",
6169
- height: "large",
6170
- slope: "steady",
6171
- direction: "forward"
6219
+ family: "angle",
6220
+ variant: "steady",
6221
+ layers: 1,
6222
+ colourPreset: "fade"
6172
6223
  },
6173
6224
  size: "large",
6174
6225
  heightExpression: "7cqi",
@@ -6181,566 +6232,185 @@ const transitionCatalogueEntries = defineExactCatalog()([
6181
6232
  }
6182
6233
  },
6183
6234
  {
6184
- intent: "torn-edge-holes",
6185
- optionId: asBoundaryOptionId("break:torn-holes"),
6186
- family: "torn",
6187
- variantId: "holes",
6188
- label: "Torn along a row of holes",
6189
- variantLabel: "Along a row of holes",
6190
- treatment: {
6191
- kind: "torn-edge",
6192
- height: "compact",
6193
- cut: "holes"
6194
- },
6195
- size: "compact",
6196
- heightExpression: "8px",
6197
- shape: {
6198
- kind: "torn",
6199
- pitchPx: 22,
6200
- holeRadiusPx: 7.5
6201
- }
6202
- }
6203
- ]);
6204
- /** CSS `clip-path` value for an angle shape, as `generateLayoutCss` draws it. */
6205
- function anglePolygonCss(polygon) {
6206
- return `polygon(0 ${polygon.startTopPercent}%, 100% ${polygon.endTopPercent}%, 100% 100%, 0 100%)`;
6207
- }
6208
- //#endregion
6209
- //#region ../theme-core/src/site-styles/sectionTransitions.ts
6210
- function boundaryRuntimeMetrics(family, size, heightExpression) {
6211
- return {
6212
- family,
6213
- size,
6214
- heightCss: heightExpression.includes(" ") ? `calc(${heightExpression})` : heightExpression,
6215
- reserveCss: `calc((${heightExpression}) / 2)`
6216
- };
6217
- }
6218
- new Map(transitionCatalogueEntries.map((entry) => [entry.intent, entry]));
6219
- const metricsByIntent = new Map(transitionCatalogueEntries.map((entry) => [entry.intent, boundaryRuntimeMetrics(entry.family, entry.size, entry.heightExpression)]));
6220
- /**
6221
- * The catalogue's compile-time coverage check guarantees an entry per
6222
- * decorative intent, so a miss here is a broken invariant, not bad input.
6223
- */
6224
- function requireCatalogueValue(values, intent) {
6225
- const value = values.get(intent);
6226
- if (value === void 0) throw new Error(`Transition catalogue has no entry for ${intent}`);
6227
- return value;
6228
- }
6229
- function isDecorativeTransitionIntent(transition) {
6230
- return transition !== "none";
6231
- }
6232
- function boundaryRuntimeMetricsForDecorativeTransition(transition) {
6233
- return requireCatalogueValue(metricsByIntent, transition);
6234
- }
6235
- const noneBoundaryOption = {
6236
- id: asBoundaryOptionId("break:none"),
6237
- label: "None",
6238
- transitionAfter: "none",
6239
- treatment: { kind: "none" }
6240
- };
6241
- const boundaryOptionByIntent = new Map(transitionCatalogueEntries.map((entry) => [entry.intent, {
6242
- id: entry.optionId,
6243
- label: entry.label,
6244
- transitionAfter: entry.intent,
6245
- treatment: entry.treatment
6246
- }]));
6247
- function boundaryOptionForTransitionIntent(intent) {
6248
- return requireCatalogueValue(boundaryOptionByIntent, intent);
6249
- }
6250
- const softBoundaryOption = boundaryOptionForTransitionIntent("soft-fade-short");
6251
- const spaciousBoundaryOption = boundaryOptionForTransitionIntent("soft-fade-long");
6252
- boundaryOptionForTransitionIntent("soft-fade-expansive");
6253
- boundaryOptionForTransitionIntent("wave-edge");
6254
- boundaryOptionForTransitionIntent("wave-edge-balanced");
6255
- boundaryOptionForTransitionIntent("wave-edge-gentle");
6256
- boundaryOptionForTransitionIntent("wave-edge-bold");
6257
- boundaryOptionForTransitionIntent("wave-edge-drift");
6258
- boundaryOptionForTransitionIntent("angle-edge-subtle");
6259
- boundaryOptionForTransitionIntent("angle-edge");
6260
- boundaryOptionForTransitionIntent("angle-edge-steep");
6261
- /**
6262
- * Must remain non-empty; downstream code indexes `[0]` as the documented default.
6263
- */
6264
- const boundaryOptions = [noneBoundaryOption, ...transitionCatalogueEntries.map((entry) => boundaryOptionForTransitionIntent(entry.intent))];
6265
- const noneTransitionVariant = {
6266
- familyId: "none",
6267
- variantId: "none",
6268
- label: "None",
6269
- boundaryOption: noneBoundaryOption
6270
- };
6271
- function transitionVariantForEntry(entry) {
6272
- return {
6273
- familyId: entry.family,
6274
- variantId: entry.variantId,
6275
- label: entry.variantLabel,
6276
- boundaryOption: boundaryOptionForTransitionIntent(entry.intent)
6277
- };
6278
- }
6279
- const sectionTransitionFamilies = [{
6280
- id: "none",
6281
- label: "None",
6282
- variants: [noneTransitionVariant]
6283
- }, ...transitionCatalogueFamilies.map((family) => ({
6284
- id: family.id,
6285
- label: family.label,
6286
- variants: requireNonEmptyReadonlyArray(transitionCatalogueEntries.filter((entry) => entry.family === family.id).map(transitionVariantForEntry), `Transition family ${family.id} has no catalogue entries.`)
6287
- }))];
6288
- const boundaryOptionById = new Map(boundaryOptions.map((option) => [option.id, option]));
6289
- const boundaryOptionByTreatmentKey = new Map(boundaryOptions.map((option) => [stableTreatmentKey(option.treatment), option]));
6290
- new Map(sectionTransitionFamilies.flatMap((family) => family.variants.map((variant) => [variant.boundaryOption.id, variant])));
6291
- new Map(sectionTransitionFamilies.map((family) => [family.id, family]));
6292
- /** Unknown IDs are refused at the lookup boundary and never become stored treatments. */
6293
- function boundaryTreatmentForBoundaryOptionId(boundaryOptionId) {
6294
- return boundaryOptionById.get(boundaryOptionId)?.treatment ?? null;
6295
- }
6296
- function boundaryOptionForTreatment(treatment) {
6297
- return boundaryOptionByTreatmentKey.get(stableTreatmentKey(treatment)) ?? null;
6298
- }
6299
- /**
6300
- * Supported decorative intent for a structured treatment, or null for `none`,
6301
- * structured treatments the catalogue lacks.
6302
- */
6303
- function transitionIntentForTreatment(treatment) {
6304
- const transition = boundaryOptionForTreatment(treatment)?.transitionAfter;
6305
- return transition && isDecorativeTransitionIntent(transition) ? transition : null;
6306
- }
6307
- function stableTreatmentKey(treatment) {
6308
- switch (treatment.kind) {
6309
- case "none": return "none";
6310
- case "soft-fade": return `${treatment.kind}:${treatment.height}:${treatment.curve}`;
6311
- case "wave-edge": return [
6312
- treatment.kind,
6313
- treatment.height,
6314
- treatment.amplitude,
6315
- treatment.rhythm,
6316
- treatment.symmetry,
6317
- ...treatment.echo ? ["echo"] : []
6318
- ].join(":");
6319
- case "arc-edge": return [
6320
- treatment.kind,
6321
- treatment.height,
6322
- ...treatment.echo ? ["echo"] : [],
6323
- ...treatment.bulge ? ["bulge"] : []
6324
- ].join(":");
6325
- case "torn-edge": return [
6326
- treatment.kind,
6327
- treatment.height,
6328
- treatment.cut
6329
- ].join(":");
6330
- case "angle-edge": return [
6331
- treatment.kind,
6332
- treatment.height,
6333
- treatment.slope,
6334
- treatment.direction
6335
- ].join(":");
6336
- }
6337
- }
6338
- //#endregion
6339
- //#region ../theme-core/src/site-styles/sectionShape.ts
6340
- /** The palette tokens whose sections draw as fields: a lookup derived from the declarations. */
6341
- function fieldGroundTokens(surfaces) {
6342
- return Object.values(surfaces).flatMap((surface) => surface.kind === "token" && surface.sectionShape === "field" ? [surface.token] : []);
6343
- }
6344
- /** The one shape decision for a section, from its resolved ground token. */
6345
- function sectionShapeForGround(fieldGrounds, groundToken) {
6346
- return fieldGrounds.includes(groundToken) ? "field" : "edge-to-edge";
6347
- }
6348
- /**
6349
- * A field surface must own its token: a section painted with a token both a
6350
- * field and an edge-to-edge surface declare could not say which it is.
6351
- */
6352
- function validateSectionSurfaces(skin, surfaces) {
6353
- const fields = fieldGroundTokens(surfaces);
6354
- Object.entries(surfaces).forEach(([name, surface]) => {
6355
- if (surface.kind === "token" && surface.sectionShape !== "field" && fields.includes(surface.token)) throw new Error(`Ambiguous section shape for ${skin}: ${name} shares ${surface.token} with a field surface`);
6356
- });
6357
- }
6358
- /** The section hook carrying a field; absent for edge-to-edge sections, so their markup is unchanged. */
6359
- function sectionShapeHook(shape) {
6360
- return shape === "field" ? { "data-shape": "field" } : {};
6361
- }
6362
- /** Reads the decided shape back from final render content; anything else is edge to edge. */
6363
- function sectionShapeFromContent(content) {
6364
- const hooks = content._lookHooks;
6365
- return typeof hooks === "object" && hooks !== null && "data-shape" in hooks && hooks["data-shape"] === "field" ? "field" : "edge-to-edge";
6366
- }
6367
- /** The booking bar paints with a declared token surface; anything else is a catalogue mistake. */
6368
- function validateBookingBarSurface(skin, bookingBar, surfaces) {
6369
- if (bookingBar === void 0) return;
6370
- if (surfaces[bookingBar.surface]?.kind !== "token") throw new Error(`Booking bar for ${skin} needs a declared token surface: ${bookingBar.surface}`);
6371
- }
6372
- //#endregion
6373
- //#region ../theme-core/src/gradients/presets.ts
6374
- /**
6375
- * Curated gradient presets based on theme palette
6376
- */
6377
- const gradientPresetData = {
6378
- "primary-secondary": {
6379
- name: "Primary to Secondary",
6380
- description: "Blend your primary and secondary brand colors",
6381
- type: "linear",
6382
- angle: 135,
6383
- stops: [{
6384
- color: "primary-500",
6385
- position: 0
6386
- }, {
6387
- color: "secondary-500",
6388
- position: 100
6389
- }]
6390
- },
6391
- "primary-accent": {
6392
- name: "Primary to Accent",
6393
- description: "Energetic gradient from primary to accent",
6394
- type: "linear",
6395
- angle: 135,
6396
- stops: [{
6397
- color: "primary-500",
6398
- position: 0
6399
- }, {
6400
- color: "accent-500",
6401
- position: 100
6402
- }]
6403
- },
6404
- "secondary-accent": {
6405
- name: "Secondary to Accent",
6406
- description: "Vibrant secondary to accent blend",
6407
- type: "linear",
6408
- angle: 135,
6409
- stops: [{
6410
- color: "secondary-500",
6411
- position: 0
6412
- }, {
6413
- color: "accent-500",
6414
- position: 100
6415
- }]
6416
- },
6417
- "primary-light-dark": {
6418
- name: "Primary Light to Dark",
6419
- description: "Subtle primary color fade",
6420
- type: "linear",
6421
- angle: 180,
6422
- stops: [{
6423
- color: "primary-500",
6424
- position: 0
6425
- }, {
6426
- color: "primary-900",
6427
- position: 100
6428
- }]
6429
- },
6430
- "primary-dark-light": {
6431
- name: "Primary Dark to Light",
6432
- description: "Reverse primary fade",
6433
- type: "linear",
6434
- angle: 180,
6435
- stops: [{
6436
- color: "primary-900",
6437
- position: 0
6438
- }, {
6439
- color: "primary-50",
6440
- position: 100
6441
- }]
6442
- },
6443
- "secondary-light-dark": {
6444
- name: "Secondary Light to Dark",
6445
- description: "Subtle secondary color fade",
6446
- type: "linear",
6447
- angle: 180,
6448
- stops: [{
6449
- color: "secondary-500",
6450
- position: 0
6451
- }, {
6452
- color: "secondary-900",
6453
- position: 100
6454
- }]
6455
- },
6456
- "accent-light-dark": {
6457
- name: "Accent Light to Dark",
6458
- description: "Accent color depth fade",
6459
- type: "linear",
6460
- angle: 180,
6461
- stops: [{
6462
- color: "accent-500",
6463
- position: 0
6464
- }, {
6465
- color: "accent-900",
6466
- position: 100
6467
- }]
6468
- },
6469
- "background-surface": {
6470
- name: "Background to Surface",
6471
- description: "Subtle depth using base colors",
6472
- type: "linear",
6473
- angle: 180,
6474
- stops: [{
6475
- color: "background",
6476
- position: 0
6477
- }, {
6478
- color: "surface",
6479
- position: 100
6480
- }]
6481
- },
6482
- "neutral-fade": {
6483
- name: "Neutral Gradient",
6484
- description: "Elegant neutral color fade",
6485
- type: "linear",
6486
- angle: 180,
6487
- stops: [{
6488
- color: "neutral-900",
6489
- position: 0
6490
- }, {
6491
- color: "neutral-50",
6492
- position: 100
6493
- }]
6494
- },
6495
- "primary-glow": {
6496
- name: "Primary glow",
6497
- description: "A soft top-centred glow using your primary palette",
6498
- type: "radial",
6499
- shape: "ellipse",
6500
- position: "top center",
6501
- stops: [{
6502
- color: "primary-900",
6503
- position: 0
6504
- }, {
6505
- color: "primary-950",
6506
- position: 100
6507
- }],
6508
- foreground: {
6509
- textColor: "onPrimary900",
6510
- headingColor: "onPrimary900",
6511
- linkColor: "onPrimary900",
6512
- supportingColor: "onPrimary900"
6235
+ intent: "torn-edge-holes",
6236
+ optionId: asBoundaryOptionId("break:torn-holes"),
6237
+ family: "torn",
6238
+ variantId: "holes",
6239
+ label: "Torn along a row of holes",
6240
+ variantLabel: "Along a row of holes",
6241
+ treatment: {
6242
+ family: "torn",
6243
+ variant: "holes",
6244
+ layers: 1,
6245
+ colourPreset: "fade"
6246
+ },
6247
+ size: "compact",
6248
+ heightExpression: "8px",
6249
+ shape: {
6250
+ kind: "torn",
6251
+ pitchPx: 22,
6252
+ holeRadiusPx: 7.5
6513
6253
  }
6514
6254
  },
6515
- "accent-glow": {
6516
- name: "Accent glow",
6517
- description: "A soft top-centred glow using your accent palette",
6518
- type: "radial",
6519
- shape: "ellipse",
6520
- position: "top center",
6521
- stops: [{
6522
- color: "accent-900",
6523
- position: 0
6524
- }, {
6525
- color: "accent-950",
6526
- position: 100
6527
- }],
6528
- foreground: {
6529
- textColor: "onAccent900",
6530
- headingColor: "onAccent900",
6531
- linkColor: "onAccent900",
6532
- supportingColor: "onAccent900"
6533
- }
6255
+ {
6256
+ intent: "ridge-edge",
6257
+ optionId: asBoundaryOptionId("break:ridge"),
6258
+ family: "ridge",
6259
+ variantId: "standard",
6260
+ label: "Ridge",
6261
+ variantLabel: "Standard",
6262
+ treatment: {
6263
+ family: "ridge",
6264
+ variant: "standard",
6265
+ layers: 2,
6266
+ colourPreset: "fade"
6267
+ },
6268
+ size: "medium",
6269
+ heightExpression: mediumHeight,
6270
+ shape: { kind: "generated" }
6534
6271
  },
6535
- "primary-secondary-accent": {
6536
- name: "Brand Trio",
6537
- description: "All three brand colors in harmony",
6538
- type: "linear",
6539
- angle: 135,
6540
- stops: [
6541
- {
6542
- color: "primary-500",
6543
- position: 0
6544
- },
6545
- {
6546
- color: "secondary-500",
6547
- position: 50
6548
- },
6549
- {
6550
- color: "accent-500",
6551
- position: 100
6552
- }
6553
- ]
6272
+ {
6273
+ intent: "hand-drawn-wave-edge",
6274
+ optionId: asBoundaryOptionId("break:hand-drawn-wave"),
6275
+ family: "hand-drawn-wave",
6276
+ variantId: "standard",
6277
+ label: "Hand-drawn wave",
6278
+ variantLabel: "Standard",
6279
+ treatment: {
6280
+ family: "hand-drawn-wave",
6281
+ variant: "standard",
6282
+ layers: 2,
6283
+ colourPreset: "fade"
6284
+ },
6285
+ size: "medium",
6286
+ heightExpression: mediumHeight,
6287
+ shape: { kind: "generated" }
6554
6288
  }
6555
- };
6556
- const presetData = (id) => gradientPresetData[id];
6557
- /**
6558
- * Curated library of gradient presets.
6559
- * All gradients use theme color tokens, so they adapt to the site's palette.
6560
- */
6561
- const GRADIENT_PRESETS = gradientPresetIdValues.flatMap((value) => parseGradientPresetId(value) ?? []).map((id) => ({
6562
- id,
6563
- ...presetData(id)
6564
- }));
6565
- const gradientPresetById = Object.fromEntries(GRADIENT_PRESETS.map((preset) => [preset.id, preset]));
6566
- function getGradientPreset(id) {
6567
- return gradientPresetById[id];
6289
+ ]);
6290
+ /** CSS `clip-path` value for an angle shape, as `generateLayoutCss` draws it. */
6291
+ function anglePolygonCss(polygon) {
6292
+ return `polygon(0 ${polygon.startTopPercent}%, 100% ${polygon.endTopPercent}%, 100% 100%, 0 100%)`;
6568
6293
  }
6569
6294
  //#endregion
6570
- //#region ../theme-core/src/gradients/utils.ts
6295
+ //#region ../theme-core/src/site-styles/sectionTransitions.ts
6296
+ function boundaryRuntimeMetrics(family, size, heightExpression) {
6297
+ return {
6298
+ family,
6299
+ size,
6300
+ heightCss: heightExpression.includes(" ") ? `calc(${heightExpression})` : heightExpression,
6301
+ reserveCss: `calc((${heightExpression}) / 2)`
6302
+ };
6303
+ }
6304
+ const catalogueEntryByIntent = new Map(transitionCatalogueEntries.map((entry) => [entry.intent, entry]));
6305
+ const metricsByIntent = new Map(transitionCatalogueEntries.map((entry) => [entry.intent, boundaryRuntimeMetrics(entry.family, entry.size, entry.heightExpression)]));
6571
6306
  /**
6572
- * Convert a GradientConfig to a CSS gradient string
6573
- *
6574
- * @param config - The gradient configuration using theme tokens
6575
- * @param tokens - Map of theme color tokens to hex values
6576
- * @returns CSS gradient string (e.g., "linear-gradient(180deg, #3b82f6 0%, #f59e0b 100%)")
6307
+ * The catalogue's compile-time coverage check guarantees an entry per
6308
+ * decorative intent, so a miss here is a broken invariant, not bad input.
6577
6309
  */
6578
- function gradientToCss(config, tokens) {
6579
- const stops = config.stops.map((stop) => {
6580
- return `${tokens[stop.color] ?? "#000000"} ${stop.position}%`;
6581
- }).join(", ");
6582
- const type = config.type ?? "linear";
6583
- if (type === "radial") {
6584
- const position = config.position ?? "center";
6585
- return `radial-gradient(${config.shape ?? "circle"} at ${position}, ${stops})`;
6586
- }
6587
- if (type === "conic") {
6588
- const position = config.position ?? "center";
6589
- return `conic-gradient(from ${config.angle ?? 0}deg at ${position}, ${stops})`;
6590
- }
6591
- return `linear-gradient(${config.angle ?? 180}deg, ${stops})`;
6310
+ function requireCatalogueValue(values, intent) {
6311
+ const value = values.get(intent);
6312
+ if (value === void 0) throw new Error(`Transition catalogue has no entry for ${intent}`);
6313
+ return value;
6592
6314
  }
6593
- const pageDesignUserPinnedAppearanceChoiceSchema = z.object({
6594
- kind: z.literal("user-pinned"),
6595
- value: z.string().min(1).transform(asAppearancePresetId)
6596
- }).strict();
6597
- const pageDesignBoundaryTreatmentSchema = z.discriminatedUnion("kind", [
6598
- z.object({ kind: z.literal("none") }).strict(),
6599
- z.object({
6600
- kind: z.literal("soft-fade"),
6601
- height: z.enum([
6602
- "compact",
6603
- "medium",
6604
- "large",
6605
- "expansive"
6606
- ]),
6607
- curve: z.enum([
6608
- "soft",
6609
- "spacious",
6610
- "expansive"
6611
- ])
6612
- }).strict(),
6613
- z.object({
6614
- kind: z.literal("wave-edge"),
6615
- height: z.enum([
6616
- "compact",
6617
- "medium",
6618
- "large"
6619
- ]),
6620
- amplitude: z.enum([
6621
- "subtle",
6622
- "balanced",
6623
- "bold"
6624
- ]),
6625
- rhythm: z.enum(["single", "double"]),
6626
- symmetry: z.enum([
6627
- "symmetrical",
6628
- "asymmetrical",
6629
- "drift"
6630
- ]),
6631
- echo: z.literal(true).optional()
6632
- }).strict(),
6633
- z.object({
6634
- kind: z.literal("arc-edge"),
6635
- height: z.enum([
6636
- "compact",
6637
- "medium",
6638
- "large"
6639
- ]),
6640
- echo: z.literal(true).optional(),
6641
- bulge: z.literal(true).optional()
6642
- }).strict(),
6643
- z.object({
6644
- kind: z.literal("angle-edge"),
6645
- height: z.enum([
6646
- "compact",
6647
- "medium",
6648
- "large"
6649
- ]),
6650
- slope: z.enum([
6651
- "subtle",
6652
- "balanced",
6653
- "steep",
6654
- "steady"
6655
- ]),
6656
- direction: z.enum(["forward", "reverse"])
6657
- }).strict(),
6658
- z.object({
6659
- kind: z.literal("torn-edge"),
6660
- height: z.enum(["compact"]),
6661
- cut: z.enum(["holes"])
6662
- }).strict()
6663
- ]);
6664
- const pageDesignUserPinnedBoundaryTreatmentChoiceSchema = z.object({
6665
- kind: z.literal("user-pinned"),
6666
- value: pageDesignBoundaryTreatmentSchema
6667
- }).strict();
6668
- const pageDesignBlockLookPinSchema = z.object({
6669
- blockId: z.string().min(1).transform(asDesignBlockId),
6670
- blockKind: z.string().min(1),
6671
- choice: pageDesignUserPinnedAppearanceChoiceSchema
6672
- }).strict();
6673
- const pageDesignBoundaryPinSchema = z.object({
6674
- boundaryId: z.string().min(1).startsWith("boundary:", { error: "DesignBoundaryId must start with \"boundary:\"." }).transform(asDesignBoundaryId),
6675
- previousBlockId: z.string().min(1).transform(asDesignBlockId),
6676
- nextBlockId: z.string().min(1).transform(asDesignBlockId),
6677
- choice: pageDesignUserPinnedBoundaryTreatmentChoiceSchema
6678
- }).strict().superRefine(validateBoundaryPinIdMatchesBlocks);
6679
- const pageDesignDecisionsV2Schema = z.object({
6680
- schemaVersion: z.literal(2),
6681
- pageFlowPresetId: z.string().min(1).transform(asPageFlowPresetId),
6682
- blockLookPins: z.array(pageDesignBlockLookPinSchema),
6683
- boundaryPins: z.array(pageDesignBoundaryPinSchema)
6684
- }).strict().superRefine(validateUniquePageDesignPins);
6685
- function addDuplicateStringIssues(ctx, input) {
6686
- const seen = /* @__PURE__ */ new Set();
6687
- const duplicates = /* @__PURE__ */ new Set();
6688
- input.values.forEach((value) => {
6689
- if (seen.has(value)) duplicates.add(value);
6690
- seen.add(value);
6691
- });
6692
- duplicates.forEach((duplicate) => {
6693
- ctx.addIssue({
6694
- code: z.ZodIssueCode.custom,
6695
- path: [...input.path],
6696
- message: `Duplicate ${input.label}: ${duplicate}.`
6697
- });
6698
- });
6315
+ function transitionCatalogueEntryForIntent(intent) {
6316
+ return requireCatalogueValue(catalogueEntryByIntent, intent);
6699
6317
  }
6700
- function validateBoundaryPinIdMatchesBlocks(pin, ctx) {
6701
- const expectedBoundaryId = makeBoundaryId(pin.previousBlockId, pin.nextBlockId);
6702
- if (pin.boundaryId !== expectedBoundaryId) ctx.addIssue({
6703
- code: z.ZodIssueCode.custom,
6704
- path: ["boundaryId"],
6705
- message: `Boundary id must match previousBlockId and nextBlockId. Expected ${expectedBoundaryId}.`
6706
- });
6318
+ function isDecorativeTransitionIntent(transition) {
6319
+ return transition !== "none";
6707
6320
  }
6708
- function validateUniquePageDesignPins(intent, ctx) {
6709
- addDuplicateStringIssues(ctx, {
6710
- values: intent.blockLookPins.map((pin) => pin.blockId),
6711
- path: ["blockLookPins"],
6712
- label: "block Look pin"
6713
- });
6714
- addDuplicateStringIssues(ctx, {
6715
- values: intent.boundaryPins.map((pin) => makeBoundaryId(pin.previousBlockId, pin.nextBlockId)),
6716
- path: ["boundaryPins"],
6717
- label: "boundary pin"
6718
- });
6321
+ function boundaryRuntimeMetricsForDecorativeTransition(transition) {
6322
+ return requireCatalogueValue(metricsByIntent, transition);
6719
6323
  }
6720
- //#endregion
6721
- //#region ../theme-core/src/site-styles/schemaVersionedJson.ts
6722
- function parseSchemaVersionedJson(input) {
6723
- if (input.value == null) return { kind: "absent" };
6724
- if (typeof input.value === "object" && input.value !== null && "schemaVersion" in input.value && input.value.schemaVersion !== input.expectedSchemaVersion) return {
6725
- kind: "invalid",
6726
- issue: {
6727
- kind: "unsupported-schema-version",
6728
- message: input.unsupportedSchemaVersionMessage
6729
- }
6730
- };
6731
- const parsed = z.safeParse(input.schema, input.value);
6732
- if (!parsed.success) return {
6733
- kind: "invalid",
6734
- issue: {
6735
- kind: "invalid-json-shape",
6736
- message: parsed.error.issues[0]?.message ?? input.invalidShapeMessage
6737
- }
6738
- };
6324
+ const noneBoundaryOption = {
6325
+ id: asBoundaryOptionId("break:none"),
6326
+ label: "None",
6327
+ intent: "none",
6328
+ treatment: {
6329
+ family: "none",
6330
+ layers: 1,
6331
+ colourPreset: "fade"
6332
+ }
6333
+ };
6334
+ const boundaryOptionByIntent = new Map(transitionCatalogueEntries.map((entry) => [entry.intent, {
6335
+ id: entry.optionId,
6336
+ label: entry.label,
6337
+ intent: entry.intent,
6338
+ treatment: entry.treatment
6339
+ }]));
6340
+ function boundaryOptionForTransitionIntent(intent) {
6341
+ return requireCatalogueValue(boundaryOptionByIntent, intent);
6342
+ }
6343
+ const softBoundaryOption = boundaryOptionForTransitionIntent("soft-fade-short");
6344
+ const spaciousBoundaryOption = boundaryOptionForTransitionIntent("soft-fade-long");
6345
+ boundaryOptionForTransitionIntent("soft-fade-expansive");
6346
+ boundaryOptionForTransitionIntent("wave-edge");
6347
+ boundaryOptionForTransitionIntent("wave-edge-balanced");
6348
+ boundaryOptionForTransitionIntent("wave-edge-gentle");
6349
+ boundaryOptionForTransitionIntent("wave-edge-bold");
6350
+ boundaryOptionForTransitionIntent("wave-edge-drift");
6351
+ boundaryOptionForTransitionIntent("angle-edge-subtle");
6352
+ boundaryOptionForTransitionIntent("angle-edge");
6353
+ boundaryOptionForTransitionIntent("angle-edge-steep");
6354
+ /**
6355
+ * Must remain non-empty; downstream code indexes `[0]` as the documented default.
6356
+ */
6357
+ const boundaryOptions = [noneBoundaryOption, ...transitionCatalogueEntries.map((entry) => boundaryOptionForTransitionIntent(entry.intent))];
6358
+ const noneTransitionVariant = {
6359
+ familyId: "none",
6360
+ variantId: "none",
6361
+ label: "None",
6362
+ boundaryOption: noneBoundaryOption
6363
+ };
6364
+ function transitionVariantForEntry(entry) {
6739
6365
  return {
6740
- kind: "parsed",
6741
- value: parsed.data
6366
+ familyId: entry.family,
6367
+ variantId: entry.variantId,
6368
+ label: entry.variantLabel,
6369
+ boundaryOption: boundaryOptionForTransitionIntent(entry.intent)
6742
6370
  };
6743
6371
  }
6372
+ const sectionTransitionFamilies = [{
6373
+ id: "none",
6374
+ label: "None",
6375
+ variants: [noneTransitionVariant]
6376
+ }, ...transitionCatalogueFamilies.map((family) => ({
6377
+ id: family.id,
6378
+ label: family.label,
6379
+ variants: requireNonEmptyReadonlyArray(transitionCatalogueEntries.filter((entry) => entry.family === family.id).map(transitionVariantForEntry), `Transition family ${family.id} has no catalogue entries.`)
6380
+ }))];
6381
+ const boundaryOptionById = new Map(boundaryOptions.map((option) => [option.id, option]));
6382
+ new Map(sectionTransitionFamilies.flatMap((family) => family.variants.map((variant) => [variant.boundaryOption.id, variant])));
6383
+ new Map(sectionTransitionFamilies.map((family) => [family.id, family]));
6384
+ /** Unknown IDs are refused at the lookup boundary and never become stored treatments. */
6385
+ function boundaryTreatmentForBoundaryOptionId(boundaryOptionId) {
6386
+ return boundaryOptionById.get(boundaryOptionId)?.treatment ?? null;
6387
+ }
6388
+ function boundaryOptionForTreatment(treatment) {
6389
+ if (treatment.family === "none") return noneBoundaryOption;
6390
+ return boundaryOptions.find((option) => option.treatment.family === treatment.family && (treatment.variant === void 0 || option.treatment.variant === treatment.variant)) ?? null;
6391
+ }
6392
+ function boundaryOptionIdForTreatment(treatment) {
6393
+ return boundaryOptionForTreatment(treatment)?.id ?? null;
6394
+ }
6395
+ /**
6396
+ * Supported decorative intent for a structured treatment, or null for `none`,
6397
+ * structured treatments the catalogue lacks.
6398
+ */
6399
+ function transitionIntentForTreatment(treatment) {
6400
+ const transition = boundaryOptionForTreatment(treatment)?.intent;
6401
+ return transition && isDecorativeTransitionIntent(transition) ? transition : null;
6402
+ }
6403
+ function sectionBoundaryTreatmentsEqual(left, right) {
6404
+ return stableTreatmentKey(left) === stableTreatmentKey(right);
6405
+ }
6406
+ function stableTreatmentKey(treatment) {
6407
+ return JSON.stringify([
6408
+ treatment.family,
6409
+ boundaryOptionForTreatment(treatment)?.treatment.variant ?? treatment.variant,
6410
+ treatment.layers,
6411
+ treatment.colourPreset
6412
+ ]);
6413
+ }
6744
6414
  asBoundaryOptionId("break:unknown");
6745
6415
  /**
6746
6416
  * Site style is site-owned authority. Page design snapshots retain pins and
@@ -6784,6 +6454,241 @@ function resolvePageDesignBlockLookChoice(intent, blockId) {
6784
6454
  function resolvePageDesignBoundaryChoice(intent, previousBlockId, nextBlockId) {
6785
6455
  return intent.boundaryPins.find((pin) => pin.previousBlockId === previousBlockId && pin.nextBlockId === nextBlockId)?.choice ?? autoDesignChoice();
6786
6456
  }
6457
+ //#endregion
6458
+ //#region ../theme-core/src/site-styles/groundTextures.ts
6459
+ /** The SVG matrix fixes RGB in linear light; turbulence only varies alpha in [0, 1]. */
6460
+ const textureInkLinearRgb = [
6461
+ .5,
6462
+ .45,
6463
+ .4
6464
+ ];
6465
+ const textureInkSrgb = textureInkLinearRgb.map(linearToSrgb);
6466
+ const tiles = {
6467
+ "paper-grain": {
6468
+ size: 180,
6469
+ frequency: ".9",
6470
+ octaves: 2,
6471
+ seed: 1
6472
+ },
6473
+ "handmade-paper": {
6474
+ size: 320,
6475
+ frequency: ".0125 .025",
6476
+ octaves: 4,
6477
+ seed: 4
6478
+ },
6479
+ plaster: {
6480
+ size: 512,
6481
+ frequency: ".0078125",
6482
+ octaves: 5,
6483
+ seed: 2
6484
+ }
6485
+ };
6486
+ function groundTextureDataUri(kind) {
6487
+ const tile = tiles[kind];
6488
+ const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${tile.size}" height="${tile.size}"><filter id="n" x="0" y="0" width="100%" height="100%"><feTurbulence type="fractalNoise" baseFrequency="${tile.frequency}" numOctaves="${tile.octaves}" seed="${tile.seed}" stitchTiles="stitch"/><feColorMatrix values="${textureInkLinearRgb.map((channel) => `0 0 0 0 ${channel.toString().replace("0.", ".")}`).join(" ")} 0 0 0 1 0"/></filter><rect width="100%" height="100%" filter="url(#n)"/></svg>`;
6489
+ return `url("data:image/svg+xml,${encodeURIComponent(svg)}")`;
6490
+ }
6491
+ /**
6492
+ * Bound the actual tile colour with its CSS blend and opacity. Alpha spans [0, 1], so the
6493
+ * untinted ground and full-alpha tile bound every noise pixel at every raster scale.
6494
+ * Sampling black and white would invent colours this matrix cannot draw.
6495
+ */
6496
+ function groundTextureSamples(colour, texture) {
6497
+ const { r, g, b } = hexToRgb(colour);
6498
+ const base = [
6499
+ r,
6500
+ g,
6501
+ b
6502
+ ];
6503
+ const sample = (alpha) => base.map((channel, index) => {
6504
+ const ink = textureInkSrgb[index] ?? 0;
6505
+ return channel + ((texture.blend === "multiply" ? channel * ink / 255 : 255 - (255 - channel) * (255 - ink) / 255) - channel) * texture.strength * alpha;
6506
+ });
6507
+ return [colour, ...[.5, 1].map((alpha) => {
6508
+ const [red = r, green = g, blue = b] = sample(alpha);
6509
+ return rgbToHex(red, green, blue);
6510
+ })];
6511
+ }
6512
+ //#endregion
6513
+ //#region ../theme-core/src/site-styles/groundPaint.ts
6514
+ /** Covers every currently admitted edge, including owner pins; stage 4 can narrow it per style. */
6515
+ const groundFlatZone = `max(${[...new Set(transitionCatalogueEntries.map((entry) => boundaryRuntimeMetricsForDecorativeTransition(entry.intent).heightCss))].join(", ")})`;
6516
+ const groundRampStops = `0 min(50%, ${groundFlatZone}),`;
6517
+ const groundRampEnd = `max(50%, calc(100% - ${groundFlatZone})) 100%`;
6518
+ const capped = (strength, cap) => Number.isFinite(strength) ? Math.max(0, Math.min(cap, strength ?? 0)) : 0;
6519
+ /** Palette mixing chooses the stops; CSS interpolation between those stops is sRGB. */
6520
+ function mixGroundColour(from, to, amount) {
6521
+ const a = hexToRgb(from);
6522
+ const b = hexToRgb(to);
6523
+ const x = srgbToOklab(a.r, a.g, a.b);
6524
+ const y = srgbToOklab(b.r, b.g, b.b);
6525
+ const mix = (start, end) => start + (end - start) * amount;
6526
+ const rgb = oklabToSrgb(mix(x.L, y.L), mix(x.a, y.a), mix(x.b, y.b));
6527
+ return rgbToHex(rgb.r, rgb.g, rgb.b);
6528
+ }
6529
+ /** Admit the style's vocabulary and strength; this never reads owner storage. */
6530
+ function resolveGroundPaint(paint, offers, palette) {
6531
+ const base = resolveConcreteColorHex(paint.base, palette);
6532
+ if (!base) return null;
6533
+ const { tone, strength } = offeredGroundTone(paint.tone, offers);
6534
+ const texture = resolveGroundTexture(paint.texture, offers, base);
6535
+ const resolved = resolveTone(base, tone, strength, palette);
6536
+ if (!resolved) return null;
6537
+ const painted = texture ? resolved.samples.flatMap((colour) => groundTextureSamples(colour, texture)) : resolved.samples;
6538
+ const samples = [.../* @__PURE__ */ new Set([...painted, ...continuousPaintBounds(painted)])];
6539
+ return {
6540
+ ...resolved,
6541
+ samples,
6542
+ paint: {
6543
+ base: paint.base,
6544
+ ...tone ? { tone } : {},
6545
+ ...texture ? { texture: texture.kind } : {}
6546
+ },
6547
+ ...texture ? { texture } : {}
6548
+ };
6549
+ }
6550
+ function resolveTone(base, tone, strength, palette) {
6551
+ if (!tone) return {
6552
+ topPaint: base,
6553
+ footPaint: base,
6554
+ samples: [base],
6555
+ background: base
6556
+ };
6557
+ if (tone.kind === "shading") {
6558
+ const lighter = tone.direction === "lighter-from-top";
6559
+ return linearTone(lighter ? mixGroundColour(base, "#ffffff", strength) : base, lighter ? base : mixGroundColour(base, "#000000", strength));
6560
+ }
6561
+ const second = resolveConcreteColorHex(tone.colour, palette);
6562
+ if (!second) return null;
6563
+ const end = mixGroundColour(base, second, strength);
6564
+ if (tone.kind === "gradient") return linearTone(base, end);
6565
+ const position = tone.position === "side" ? "farthest-side at 0% 50%" : "closest-side at 50% 50%";
6566
+ return {
6567
+ topPaint: base,
6568
+ footPaint: base,
6569
+ samples: [
6570
+ base,
6571
+ mixSrgbColour(base, end),
6572
+ end
6573
+ ],
6574
+ background: `radial-gradient(${position}, ${end}, ${base}) 0 min(50%, ${groundFlatZone}) / 100% max(0px, calc(100% - 2 * ${groundFlatZone})) no-repeat, ${base}`
6575
+ };
6576
+ }
6577
+ function linearTone(topPaint, footPaint) {
6578
+ return {
6579
+ topPaint,
6580
+ footPaint,
6581
+ samples: [
6582
+ topPaint,
6583
+ mixSrgbColour(topPaint, footPaint),
6584
+ footPaint
6585
+ ],
6586
+ background: `linear-gradient(to bottom, ${topPaint} ${groundRampStops} ${footPaint} ${groundRampEnd})`
6587
+ };
6588
+ }
6589
+ /** One blend decision for section and edge texture delivery. */
6590
+ function resolveGroundTexture(kind, offers, base) {
6591
+ if (!kind) return void 0;
6592
+ const strength = capped(offers.textures[kind], .5);
6593
+ if (strength === 0) return void 0;
6594
+ return {
6595
+ kind,
6596
+ strength,
6597
+ blend: hexLuminance(base) > .179 ? "multiply" : "screen"
6598
+ };
6599
+ }
6600
+ /** Only the offered tone and its bounded strength reach paint generation. */
6601
+ function offeredGroundTone(tone, offers) {
6602
+ if (!tone) return { strength: 0 };
6603
+ const strength = capped(offers.tones[tone.kind], tone.kind === "gradient" ? 1 : .3);
6604
+ return strength > 0 ? {
6605
+ tone,
6606
+ strength
6607
+ } : { strength: 0 };
6608
+ }
6609
+ function textureChoiceOffered(choice, offers) {
6610
+ return choice === "auto" || choice === "off" || !!offers?.textures[choice];
6611
+ }
6612
+ function toneChoiceOffered(choice, offers) {
6613
+ return choice === "auto" || choice === "off" || !!offers?.tones[choice.kind];
6614
+ }
6615
+ /** Independent settings: an unavailable choice takes the named ground's default. */
6616
+ function resolveSectionTreatment(paint, treatment, offers) {
6617
+ const texture = selectedTexture(paint.texture, treatment?.texture ?? "auto", offers);
6618
+ const tone = selectedTone(paint.tone, treatment?.tone ?? "auto", offers);
6619
+ return {
6620
+ base: paint.base,
6621
+ ...texture ? { texture } : {},
6622
+ ...tone ? { tone } : {}
6623
+ };
6624
+ }
6625
+ function selectedTexture(automatic, choice, offers) {
6626
+ if (choice === "off") return void 0;
6627
+ return choice === "auto" || !textureChoiceOffered(choice, offers) ? automatic : choice;
6628
+ }
6629
+ function selectedTone(automatic, choice, offers) {
6630
+ if (choice === "off") return void 0;
6631
+ return choice === "auto" || !toneChoiceOffered(choice, offers) ? automatic : choice;
6632
+ }
6633
+ /** Match the default CSS interpolation; the middle is useful evidence, not the range proof. */
6634
+ function mixSrgbColour(from, to) {
6635
+ const a = hexToRgb(from);
6636
+ const b = hexToRgb(to);
6637
+ return rgbToHex((a.r + b.r) / 2, (a.g + b.g) / 2, (a.b + b.b) / 2);
6638
+ }
6639
+ /**
6640
+ * sRGB stops are component-wise linear. Multiply/screen with one tile ink is bilinear in
6641
+ * stop position and tile alpha, so all channel extrema occur at sampled corners. These
6642
+ * enclosing colours conservatively bound luminance over the entire tone-plus-texture field.
6643
+ */
6644
+ function continuousPaintBounds(samples) {
6645
+ const colours = samples.map(hexToRgb);
6646
+ const channel = (key, bound) => bound(...colours.map((colour) => colour[key]));
6647
+ return [Math.min, Math.max].map((bound) => rgbToHex(channel("r", bound), channel("g", bound), channel("b", bound)));
6648
+ }
6649
+ //#endregion
6650
+ //#region ../theme-core/src/site-styles/rawStyleFields.ts
6651
+ const themeV2RuntimeStyleFieldNames = [
6652
+ "_frameStyles",
6653
+ "_sectionStyles",
6654
+ "_containerStyles",
6655
+ "_cardStyles"
6656
+ ];
6657
+ const themeV2BlockSpecificRawStyleFieldNames = [
6658
+ "_contentCardStyles",
6659
+ "_heroLayoutStyles",
6660
+ "_textCardStyles"
6661
+ ];
6662
+ const themeV2NormalEditorRawStyleFieldNames = [
6663
+ ...themeV2RuntimeStyleFieldNames,
6664
+ ...themeV2BlockSpecificRawStyleFieldNames,
6665
+ "styleGroup"
6666
+ ];
6667
+ new Set(themeV2NormalEditorRawStyleFieldNames);
6668
+ const themeV2CompilerOwnedFieldNames = [...themeV2RuntimeStyleFieldNames, ...themeV2BlockSpecificRawStyleFieldNames];
6669
+ const staleTransitionStyleGroupPrefix = "site-style-transition-";
6670
+ /**
6671
+ * A `styleGroup` in the retired `site-style-transition-*` namespace is residue
6672
+ * from the old per-block transition path (issue 1422). Any other value is
6673
+ * authored and must survive.
6674
+ */
6675
+ function isStaleTransitionStyleGroup(value) {
6676
+ return typeof value === "string" && value.startsWith(staleTransitionStyleGroupPrefix);
6677
+ }
6678
+ /** Drops a stale transition `styleGroup`, leaving authored values untouched. */
6679
+ function stripStaleTransitionStyleGroup(content) {
6680
+ if (!isStaleTransitionStyleGroup(content.styleGroup)) return { ...content };
6681
+ const { styleGroup: _stale, ...rest } = content;
6682
+ return rest;
6683
+ }
6684
+ /** Owner choices survive replacing transient compiler fields and portable transport. */
6685
+ function sectionOwnerStyleChoices(content) {
6686
+ const parsed = sectionStylesOverrideSchema.pick({
6687
+ ground: true,
6688
+ treatment: true
6689
+ }).safeParse(content._sectionStyles);
6690
+ return parsed.success ? parsed.data : {};
6691
+ }
6787
6692
  const policiesById = {
6788
6693
  "darken-background": "other",
6789
6694
  "lighten-background": "other",
@@ -9061,6 +8966,61 @@ function resolveCardRole(theme, cardSystem, role) {
9061
8966
  }
9062
8967
  }
9063
8968
  //#endregion
8969
+ //#region ../theme-core/src/site-styles/edgeSupport.ts
8970
+ /** The existing editor offer. New families are deliberately absent until a style opts in. */
8971
+ const existingStyleEdges = { supported: [
8972
+ {
8973
+ family: "gradient",
8974
+ tuning: {
8975
+ amplitude: 1,
8976
+ irregularity: 0,
8977
+ rhythm: 1
8978
+ },
8979
+ maxLayers: 1,
8980
+ colourPresets: ["fade"]
8981
+ },
8982
+ {
8983
+ family: "wave",
8984
+ tuning: {
8985
+ amplitude: 1,
8986
+ irregularity: 0,
8987
+ rhythm: 2
8988
+ },
8989
+ maxLayers: 2,
8990
+ colourPresets: ["fade"]
8991
+ },
8992
+ {
8993
+ family: "arc",
8994
+ tuning: {
8995
+ amplitude: 1,
8996
+ irregularity: 0,
8997
+ rhythm: 1
8998
+ },
8999
+ maxLayers: 1,
9000
+ colourPresets: ["fade"]
9001
+ },
9002
+ {
9003
+ family: "angle",
9004
+ tuning: {
9005
+ amplitude: 1,
9006
+ irregularity: 0,
9007
+ rhythm: 1
9008
+ },
9009
+ maxLayers: 1,
9010
+ colourPresets: ["fade"]
9011
+ },
9012
+ {
9013
+ family: "torn",
9014
+ tuning: {
9015
+ amplitude: 1,
9016
+ irregularity: 0,
9017
+ rhythm: 1
9018
+ },
9019
+ maxLayers: 1,
9020
+ colourPresets: ["fade"]
9021
+ }
9022
+ ] };
9023
+ //#endregion
9064
9024
  //#region ../theme-core/src/site-styles/headerDropdownRecipe.ts
9065
9025
  const neutralHeaderDropdown = {
9066
9026
  surface: {
@@ -9997,6 +9957,194 @@ const bookingLookColourSpecs = {
9997
9957
  }
9998
9958
  };
9999
9959
  //#endregion
9960
+ //#region ../theme-core/src/site-styles/photoShapes.ts
9961
+ /**
9962
+ * The one catalogue of photo shapes (#1872 stage 6). A shape owns its geometry; frames name a
9963
+ * shape, `resolveLookMediaFrame` decides which one applies, and the generated
9964
+ * `--rb-look-media-*` variables carry it to the page. `default` means "the style decides", so
9965
+ * stored owner choices keep their meaning.
9966
+ */
9967
+ const imageShapes = [
9968
+ "default",
9969
+ "square",
9970
+ "rounded",
9971
+ "circle",
9972
+ "arch",
9973
+ "pebble",
9974
+ "standing-stone",
9975
+ "hill-top",
9976
+ "torn"
9977
+ ];
9978
+ function isImageShape(value) {
9979
+ return typeof value === "string" && imageShapes.includes(value);
9980
+ }
9981
+ function isDrawnImageShape(value) {
9982
+ return isImageShape(value) && value !== "default";
9983
+ }
9984
+ /**
9985
+ * Seeded torn-paper polygon: fine irregular steps along each edge. Pure and deterministic, so a
9986
+ * seed always draws the same edge on the server, in the editor and in tests.
9987
+ */
9988
+ function tornEdgePolygon(seed, steps = 36, depth = 1.4) {
9989
+ const random = (state) => {
9990
+ const next = state * 1664525 + 1013904223 >>> 0;
9991
+ return [next / 2 ** 32, next];
9992
+ };
9993
+ const jag = (state) => {
9994
+ const [roll, afterRoll] = random(state);
9995
+ if (roll >= .15) return [+(depth * roll).toFixed(2), afterRoll];
9996
+ const [extra, afterExtra] = random(afterRoll);
9997
+ return [+(depth * (1 + extra)).toFixed(2), afterExtra];
9998
+ };
9999
+ const step = (index) => (state) => {
10000
+ const [offset, next] = random(state);
10001
+ return [+(index / steps * 100 + (offset - .5) * (60 / steps)).toFixed(2), next];
10002
+ };
10003
+ /** The first point of each edge sits on a corner, so it draws no along-edge step. */
10004
+ const along = (index, corner) => (state) => index === 0 ? [corner, state] : step(index)(state);
10005
+ const point = (edge, index) => (state) => {
10006
+ switch (edge) {
10007
+ case 0: {
10008
+ const [x, s1] = along(index, 0)(state);
10009
+ const [y, s2] = jag(s1);
10010
+ return [`${x}% ${y}%`, s2];
10011
+ }
10012
+ case 1: {
10013
+ const [x, s1] = jag(state);
10014
+ const [y, s2] = along(index, 0)(s1);
10015
+ return [`${(100 - x).toFixed(2)}% ${y}%`, s2];
10016
+ }
10017
+ case 2: {
10018
+ const [x, s1] = along(index, 0)(state);
10019
+ const [y, s2] = jag(s1);
10020
+ return [`${index === 0 ? 100 : (100 - x).toFixed(2)}% ${(100 - y).toFixed(2)}%`, s2];
10021
+ }
10022
+ default: {
10023
+ const [x, s1] = jag(state);
10024
+ const [y, s2] = along(index, 0)(s1);
10025
+ return [`${x}% ${index === 0 ? 100 : (100 - y).toFixed(2)}%`, s2];
10026
+ }
10027
+ }
10028
+ };
10029
+ const { points } = Array.from({ length: steps * 4 }, (_, position) => ({
10030
+ edge: Math.floor(position / steps),
10031
+ index: position % steps
10032
+ })).reduce((drawn, { edge, index }) => {
10033
+ const [text, state] = point(edge, index)(drawn.state);
10034
+ return {
10035
+ state,
10036
+ points: [...drawn.points, text]
10037
+ };
10038
+ }, {
10039
+ state: seed >>> 0,
10040
+ points: []
10041
+ });
10042
+ return `polygon(${points.join(",")})`;
10043
+ }
10044
+ const imageShapeGeometry = {
10045
+ square: {
10046
+ draws: "corners",
10047
+ variants: [{ radius: "0" }]
10048
+ },
10049
+ rounded: {
10050
+ draws: "corners",
10051
+ variants: [{ radius: "var(--rb-media-shape-radius, 1rem)" }]
10052
+ },
10053
+ circle: {
10054
+ draws: "outline",
10055
+ aspectRatio: "1/1",
10056
+ variants: [{ radius: "50%" }]
10057
+ },
10058
+ arch: {
10059
+ draws: "outline",
10060
+ aspectRatio: "4/5",
10061
+ variants: [{ radius: "9999px 9999px var(--rb-media-shape-arch-base-radius, 0.125rem) var(--rb-media-shape-arch-base-radius, 0.125rem)" }]
10062
+ },
10063
+ pebble: {
10064
+ draws: "outline",
10065
+ suits: ["1/1", "5/4"],
10066
+ variants: [
10067
+ { radius: "42% 58% 38% 62% / 46% 38% 62% 54%" },
10068
+ { radius: "58% 42% 56% 44% / 40% 52% 48% 60%" },
10069
+ { radius: "36% 64% 52% 48% / 54% 42% 58% 46%" }
10070
+ ]
10071
+ },
10072
+ "standing-stone": {
10073
+ draws: "outline",
10074
+ aspectRatio: "3/4",
10075
+ variants: [{ radius: "56% 44% 16% 22% / 32% 24% 9% 12%" }, { radius: "42% 58% 22% 14% / 24% 34% 12% 8%" }]
10076
+ },
10077
+ "hill-top": {
10078
+ draws: "outline",
10079
+ suits: ["4/3", "3/2"],
10080
+ variants: [{ radius: "50% 50% 0.25rem 0.25rem / 26% 26% 0.25rem 0.25rem" }]
10081
+ },
10082
+ torn: {
10083
+ draws: "outline",
10084
+ variants: [{
10085
+ radius: "0",
10086
+ clip: tornEdgePolygon(7)
10087
+ }, {
10088
+ radius: "0",
10089
+ clip: tornEdgePolygon(23)
10090
+ }]
10091
+ }
10092
+ };
10093
+ /** Every kind falls to the style's own skin CSS, which is what each style draws today. */
10094
+ const skinDrawnPhotoShapes = {
10095
+ supported: [
10096
+ "default",
10097
+ "square",
10098
+ "rounded",
10099
+ "circle",
10100
+ "arch"
10101
+ ],
10102
+ defaults: {
10103
+ feature: "default",
10104
+ card: "default",
10105
+ gallery: "default",
10106
+ backdrop: "default"
10107
+ }
10108
+ };
10109
+ /** A shape drawn small, for the editor's Photo shape tiles: its first variant, in its own proportions. */
10110
+ function photoShapeDrawing(shape) {
10111
+ const geometry = imageShapeGeometry[shape];
10112
+ const [variant] = geometry.variants;
10113
+ return {
10114
+ borderRadius: variant.radius,
10115
+ ...variant.clip ? { clipPath: variant.clip } : {},
10116
+ ...geometry.aspectRatio ? { aspectRatio: geometry.aspectRatio.replace("/", " / ") } : {}
10117
+ };
10118
+ }
10119
+ //#endregion
10120
+ //#region ../theme-core/src/site-styles/sectionShape.ts
10121
+ /** Shape follows the declared ground identity, even when two grounds share paint. */
10122
+ function sectionShapeForGround(surfaces, name) {
10123
+ const surface = name === void 0 ? void 0 : surfaces[name];
10124
+ return surface?.kind === "token" && surface.sectionShape === "field" ? "field" : "edge-to-edge";
10125
+ }
10126
+ /** The section hook carrying a field; absent for edge-to-edge sections, so their markup is unchanged. */
10127
+ function sectionShapeHook(shape) {
10128
+ return shape === "field" ? { "data-shape": "field" } : {};
10129
+ }
10130
+ /** Reads the decided shape back from final render content; anything else is edge to edge. */
10131
+ function sectionShapeFromContent(content) {
10132
+ const hooks = content._lookHooks;
10133
+ return typeof hooks === "object" && hooks !== null && "data-shape" in hooks && hooks["data-shape"] === "field" ? "field" : "edge-to-edge";
10134
+ }
10135
+ /** The booking bar paints with a declared token surface; anything else is a catalogue mistake. */
10136
+ function validateBookingBarSurface(skin, bookingBar, surfaces) {
10137
+ if (bookingBar === void 0) return;
10138
+ if (surfaces[bookingBar.surface]?.kind !== "token") throw new Error(`Booking bar for ${skin} needs a declared token surface: ${bookingBar.surface}`);
10139
+ }
10140
+ /** Section metadata never belongs to a slot's paint or its transport contract. */
10141
+ function styleSurfacePaint(surface) {
10142
+ const { ground: _ground, roleOnly: _role, ...spec } = surface;
10143
+ if (spec.kind !== "token") return spec;
10144
+ const { finish: _finish, sectionShape: _shape, ...paint } = spec;
10145
+ return paint;
10146
+ }
10147
+ //#endregion
10000
10148
  //#region ../theme-core/src/site-styles/stubSiteStyle.ts
10001
10149
  /**
10002
10150
  * Stub: tickets and paper. Every card is a piece of printed paper (ticket, tag, index card,
@@ -10072,6 +10220,12 @@ const stubOffers = [
10072
10220
  roleMap: stubRoles,
10073
10221
  itemRoles: { container: "card" }
10074
10222
  },
10223
+ {
10224
+ id: asAppearancePresetId("class-prices-big-figures"),
10225
+ treatment: "price-figures",
10226
+ roleMap: stubRoles,
10227
+ itemRoles: { items: "card" }
10228
+ },
10075
10229
  {
10076
10230
  id: asAppearancePresetId("hero-photo-beside-text"),
10077
10231
  visibleMarks: ["sticker"],
@@ -10382,24 +10536,29 @@ const stubLooks = {
10382
10536
  surfaces: {
10383
10537
  base: {
10384
10538
  kind: "token",
10385
- token: "background"
10539
+ token: "background",
10540
+ ground: "light"
10386
10541
  },
10387
10542
  band: {
10388
10543
  kind: "token",
10389
- token: "surfaceAlt"
10544
+ token: "surfaceAlt",
10545
+ ground: "band"
10390
10546
  },
10391
10547
  brand: {
10392
10548
  kind: "token",
10393
10549
  token: "primary",
10550
+ ground: "brand",
10394
10551
  buttonContext: { primary: unsafeAsOpaqueButtonColourToken("primaryForeground") }
10395
10552
  },
10396
10553
  deep: {
10397
10554
  kind: "token",
10398
- token: "secondary"
10555
+ token: "secondary",
10556
+ ground: "brand"
10399
10557
  },
10400
10558
  sheet: {
10401
10559
  kind: "token",
10402
10560
  token: "surface",
10561
+ ground: "band",
10403
10562
  roleOnly: true
10404
10563
  }
10405
10564
  },
@@ -10541,6 +10700,12 @@ const forgeOffers = [
10541
10700
  treatment: "price-rows",
10542
10701
  roleMap: forgeOpenRoles
10543
10702
  },
10703
+ {
10704
+ id: asAppearancePresetId("class-prices-big-figures"),
10705
+ treatment: "price-figures",
10706
+ roleMap: forgeRoles,
10707
+ itemRoles: { items: "card" }
10708
+ },
10544
10709
  {
10545
10710
  id: asAppearancePresetId("hero-photo-beside-text"),
10546
10711
  visibleMarks: ["sticker"],
@@ -10872,15 +11037,18 @@ const forgeLooks = {
10872
11037
  surfaces: {
10873
11038
  base: {
10874
11039
  kind: "token",
10875
- token: "background"
11040
+ token: "background",
11041
+ ground: "light"
10876
11042
  },
10877
11043
  band: {
10878
11044
  kind: "token",
10879
- token: "surface"
11045
+ token: "surface",
11046
+ ground: "band"
10880
11047
  },
10881
11048
  brand: {
10882
11049
  kind: "token",
10883
11050
  token: "primary",
11051
+ ground: "brand",
10884
11052
  buttonContext: {
10885
11053
  primary: unsafeAsOpaqueButtonColourToken("primaryForeground"),
10886
11054
  primaryText: unsafeAsOpaqueButtonColourToken("primary")
@@ -10889,6 +11057,7 @@ const forgeLooks = {
10889
11057
  inverse: {
10890
11058
  kind: "token",
10891
11059
  token: "text",
11060
+ ground: "deep",
10892
11061
  buttonContext: {
10893
11062
  primary: unsafeAsOpaqueButtonColourToken("background"),
10894
11063
  primaryText: unsafeAsOpaqueButtonColourToken("text")
@@ -10897,6 +11066,7 @@ const forgeLooks = {
10897
11066
  sheet: {
10898
11067
  kind: "token",
10899
11068
  token: "surface",
11069
+ ground: "band",
10900
11070
  roleOnly: true
10901
11071
  }
10902
11072
  },
@@ -11135,6 +11305,12 @@ const pressOffers = [
11135
11305
  treatment: "price-rows",
11136
11306
  roleMap: pressOpenRoles
11137
11307
  },
11308
+ {
11309
+ id: asAppearancePresetId("class-prices-big-figures"),
11310
+ treatment: "price-figures",
11311
+ roleMap: pressRoles,
11312
+ itemRoles: { items: "card" }
11313
+ },
11138
11314
  {
11139
11315
  id: asAppearancePresetId("hero-photo-beside-text"),
11140
11316
  visibleMarks: ["sticker"],
@@ -11453,35 +11629,42 @@ const pressLooks = {
11453
11629
  surfaces: {
11454
11630
  base: {
11455
11631
  kind: "token",
11456
- token: "background"
11632
+ token: "background",
11633
+ ground: "light"
11457
11634
  },
11458
11635
  band: {
11459
11636
  kind: "token",
11460
- token: "surfaceAlt"
11637
+ token: "surfaceAlt",
11638
+ ground: "band"
11461
11639
  },
11462
11640
  pop: {
11463
11641
  kind: "tint",
11464
11642
  base: "background",
11465
11643
  source: "mark",
11466
- opacity: 16
11644
+ opacity: 16,
11645
+ ground: "light"
11467
11646
  },
11468
11647
  brand: {
11469
11648
  kind: "token",
11470
11649
  token: "primary",
11650
+ ground: "brand",
11471
11651
  buttonContext: { primary: unsafeAsOpaqueButtonColourToken("primaryForeground") }
11472
11652
  },
11473
11653
  inverse: {
11474
11654
  kind: "token",
11475
- token: "text"
11655
+ token: "text",
11656
+ ground: "deep"
11476
11657
  },
11477
11658
  sheet: {
11478
11659
  kind: "token",
11479
11660
  token: "surface",
11661
+ ground: "band",
11480
11662
  roleOnly: true
11481
11663
  },
11482
11664
  deep: {
11483
11665
  kind: "token",
11484
11666
  token: "secondary",
11667
+ ground: "brand",
11485
11668
  roleOnly: true
11486
11669
  }
11487
11670
  },
@@ -12551,6 +12734,11 @@ const vistaOffers = [
12551
12734
  treatment: "price-rows",
12552
12735
  roleMap: vistaOpenRoles
12553
12736
  },
12737
+ {
12738
+ id: asAppearancePresetId("class-prices-rows"),
12739
+ treatment: "price-list",
12740
+ roleMap: vistaOpenRoles
12741
+ },
12554
12742
  {
12555
12743
  id: asAppearancePresetId("shop-price-cards-featured"),
12556
12744
  treatment: "price-cards-featured",
@@ -12913,25 +13101,30 @@ const vistaLooks = {
12913
13101
  surfaces: {
12914
13102
  base: {
12915
13103
  kind: "token",
12916
- token: "background"
13104
+ token: "background",
13105
+ ground: "light"
12917
13106
  },
12918
13107
  band: {
12919
13108
  kind: "token",
12920
- token: "surfaceAlt"
13109
+ token: "surfaceAlt",
13110
+ ground: "band"
12921
13111
  },
12922
13112
  sheet: {
12923
13113
  kind: "token",
12924
13114
  token: "surface",
13115
+ ground: "band",
12925
13116
  roleOnly: true
12926
13117
  },
12927
13118
  brand: {
12928
13119
  kind: "token",
12929
13120
  token: "primary",
13121
+ ground: "brand",
12930
13122
  buttonContext: { primary: unsafeAsOpaqueButtonColourToken("primaryForeground") }
12931
13123
  },
12932
13124
  deep: {
12933
13125
  kind: "token",
12934
13126
  token: "secondary",
13127
+ ground: "brand",
12935
13128
  buttonContext: {
12936
13129
  primary: unsafeAsOpaqueButtonColourToken("onSecondary"),
12937
13130
  primaryText: unsafeAsOpaqueButtonColourToken("secondary")
@@ -12940,6 +13133,7 @@ const vistaLooks = {
12940
13133
  inverse: {
12941
13134
  kind: "token",
12942
13135
  token: "text",
13136
+ ground: "deep",
12943
13137
  roleOnly: true,
12944
13138
  buttonContext: { primary: unsafeAsOpaqueButtonColourToken("background") }
12945
13139
  }
@@ -26474,10 +26668,232 @@ function toPageRuntimeJoin(join) {
26474
26668
  return {
26475
26669
  previousBlockId: join.previousBlockId,
26476
26670
  nextBlockId: join.nextBlockId,
26477
- treatment: join.treatment
26671
+ treatment: join.treatment,
26672
+ ...join.edge ? { edge: join.edge } : {}
26478
26673
  };
26479
26674
  }
26480
26675
  //#endregion
26676
+ //#region ../theme-core/src/gradients/presets.ts
26677
+ /**
26678
+ * Curated gradient presets based on theme palette
26679
+ */
26680
+ const gradientPresetData = {
26681
+ "primary-secondary": {
26682
+ name: "Primary to Secondary",
26683
+ description: "Blend your primary and secondary brand colors",
26684
+ type: "linear",
26685
+ angle: 135,
26686
+ stops: [{
26687
+ color: "primary-500",
26688
+ position: 0
26689
+ }, {
26690
+ color: "secondary-500",
26691
+ position: 100
26692
+ }]
26693
+ },
26694
+ "primary-accent": {
26695
+ name: "Primary to Accent",
26696
+ description: "Energetic gradient from primary to accent",
26697
+ type: "linear",
26698
+ angle: 135,
26699
+ stops: [{
26700
+ color: "primary-500",
26701
+ position: 0
26702
+ }, {
26703
+ color: "accent-500",
26704
+ position: 100
26705
+ }]
26706
+ },
26707
+ "secondary-accent": {
26708
+ name: "Secondary to Accent",
26709
+ description: "Vibrant secondary to accent blend",
26710
+ type: "linear",
26711
+ angle: 135,
26712
+ stops: [{
26713
+ color: "secondary-500",
26714
+ position: 0
26715
+ }, {
26716
+ color: "accent-500",
26717
+ position: 100
26718
+ }]
26719
+ },
26720
+ "primary-light-dark": {
26721
+ name: "Primary Light to Dark",
26722
+ description: "Subtle primary color fade",
26723
+ type: "linear",
26724
+ angle: 180,
26725
+ stops: [{
26726
+ color: "primary-500",
26727
+ position: 0
26728
+ }, {
26729
+ color: "primary-900",
26730
+ position: 100
26731
+ }]
26732
+ },
26733
+ "primary-dark-light": {
26734
+ name: "Primary Dark to Light",
26735
+ description: "Reverse primary fade",
26736
+ type: "linear",
26737
+ angle: 180,
26738
+ stops: [{
26739
+ color: "primary-900",
26740
+ position: 0
26741
+ }, {
26742
+ color: "primary-50",
26743
+ position: 100
26744
+ }]
26745
+ },
26746
+ "secondary-light-dark": {
26747
+ name: "Secondary Light to Dark",
26748
+ description: "Subtle secondary color fade",
26749
+ type: "linear",
26750
+ angle: 180,
26751
+ stops: [{
26752
+ color: "secondary-500",
26753
+ position: 0
26754
+ }, {
26755
+ color: "secondary-900",
26756
+ position: 100
26757
+ }]
26758
+ },
26759
+ "accent-light-dark": {
26760
+ name: "Accent Light to Dark",
26761
+ description: "Accent color depth fade",
26762
+ type: "linear",
26763
+ angle: 180,
26764
+ stops: [{
26765
+ color: "accent-500",
26766
+ position: 0
26767
+ }, {
26768
+ color: "accent-900",
26769
+ position: 100
26770
+ }]
26771
+ },
26772
+ "background-surface": {
26773
+ name: "Background to Surface",
26774
+ description: "Subtle depth using base colors",
26775
+ type: "linear",
26776
+ angle: 180,
26777
+ stops: [{
26778
+ color: "background",
26779
+ position: 0
26780
+ }, {
26781
+ color: "surface",
26782
+ position: 100
26783
+ }]
26784
+ },
26785
+ "neutral-fade": {
26786
+ name: "Neutral Gradient",
26787
+ description: "Elegant neutral color fade",
26788
+ type: "linear",
26789
+ angle: 180,
26790
+ stops: [{
26791
+ color: "neutral-900",
26792
+ position: 0
26793
+ }, {
26794
+ color: "neutral-50",
26795
+ position: 100
26796
+ }]
26797
+ },
26798
+ "primary-glow": {
26799
+ name: "Primary glow",
26800
+ description: "A soft top-centred glow using your primary palette",
26801
+ type: "radial",
26802
+ shape: "ellipse",
26803
+ position: "top center",
26804
+ stops: [{
26805
+ color: "primary-900",
26806
+ position: 0
26807
+ }, {
26808
+ color: "primary-950",
26809
+ position: 100
26810
+ }],
26811
+ foreground: {
26812
+ textColor: "onPrimary900",
26813
+ headingColor: "onPrimary900",
26814
+ linkColor: "onPrimary900",
26815
+ supportingColor: "onPrimary900"
26816
+ }
26817
+ },
26818
+ "accent-glow": {
26819
+ name: "Accent glow",
26820
+ description: "A soft top-centred glow using your accent palette",
26821
+ type: "radial",
26822
+ shape: "ellipse",
26823
+ position: "top center",
26824
+ stops: [{
26825
+ color: "accent-900",
26826
+ position: 0
26827
+ }, {
26828
+ color: "accent-950",
26829
+ position: 100
26830
+ }],
26831
+ foreground: {
26832
+ textColor: "onAccent900",
26833
+ headingColor: "onAccent900",
26834
+ linkColor: "onAccent900",
26835
+ supportingColor: "onAccent900"
26836
+ }
26837
+ },
26838
+ "primary-secondary-accent": {
26839
+ name: "Brand Trio",
26840
+ description: "All three brand colors in harmony",
26841
+ type: "linear",
26842
+ angle: 135,
26843
+ stops: [
26844
+ {
26845
+ color: "primary-500",
26846
+ position: 0
26847
+ },
26848
+ {
26849
+ color: "secondary-500",
26850
+ position: 50
26851
+ },
26852
+ {
26853
+ color: "accent-500",
26854
+ position: 100
26855
+ }
26856
+ ]
26857
+ }
26858
+ };
26859
+ const presetData = (id) => gradientPresetData[id];
26860
+ /**
26861
+ * Curated library of gradient presets.
26862
+ * All gradients use theme color tokens, so they adapt to the site's palette.
26863
+ */
26864
+ const GRADIENT_PRESETS = gradientPresetIdValues.flatMap((value) => parseGradientPresetId(value) ?? []).map((id) => ({
26865
+ id,
26866
+ ...presetData(id)
26867
+ }));
26868
+ const gradientPresetById = Object.fromEntries(GRADIENT_PRESETS.map((preset) => [preset.id, preset]));
26869
+ function getGradientPreset(id) {
26870
+ return gradientPresetById[id];
26871
+ }
26872
+ //#endregion
26873
+ //#region ../theme-core/src/gradients/utils.ts
26874
+ /**
26875
+ * Convert a GradientConfig to a CSS gradient string
26876
+ *
26877
+ * @param config - The gradient configuration using theme tokens
26878
+ * @param tokens - Map of theme color tokens to hex values
26879
+ * @returns CSS gradient string (e.g., "linear-gradient(180deg, #3b82f6 0%, #f59e0b 100%)")
26880
+ */
26881
+ function gradientToCss(config, tokens) {
26882
+ const stops = config.stops.map((stop) => {
26883
+ return `${tokens[stop.color] ?? "#000000"} ${stop.position}%`;
26884
+ }).join(", ");
26885
+ const type = config.type ?? "linear";
26886
+ if (type === "radial") {
26887
+ const position = config.position ?? "center";
26888
+ return `radial-gradient(${config.shape ?? "circle"} at ${position}, ${stops})`;
26889
+ }
26890
+ if (type === "conic") {
26891
+ const position = config.position ?? "center";
26892
+ return `conic-gradient(from ${config.angle ?? 0}deg at ${position}, ${stops})`;
26893
+ }
26894
+ return `linear-gradient(${config.angle ?? 180}deg, ${stops})`;
26895
+ }
26896
+ //#endregion
26481
26897
  //#region ../theme-core/src/site-styles/sectionSurfaceBackgrounds.ts
26482
26898
  function compileGradientSectionBackground(background, foreground, palette) {
26483
26899
  const preset = getGradientPreset(background.gradientPresetId);
@@ -26555,7 +26971,7 @@ function admitsRule(rule, admitted) {
26555
26971
  * much of the photo can still show.
26556
26972
  */
26557
26973
  function mediaScrimForColorSurface(backgroundToken, foreground, palette) {
26558
- const scrim = scrimOpacityFor(palette[backgroundToken], foreground, palette);
26974
+ const scrim = scrimOpacityFor(resolveConcreteColorHex(backgroundToken, palette) ?? void 0, foreground, palette);
26559
26975
  return scrim.kind === "legible" ? {
26560
26976
  type: "color",
26561
26977
  color: backgroundToken,
@@ -26570,7 +26986,7 @@ function mediaScrimForColorSurface(backgroundToken, foreground, palette) {
26570
26986
  * keeps its own presentation.
26571
26987
  */
26572
26988
  function gradientMediaScrim(input) {
26573
- const stopScrims = input.stopTokens.map((token) => scrimOpacityFor(input.palette[token], input.foreground, input.palette));
26989
+ const stopScrims = input.stopTokens.map((token) => scrimOpacityFor(resolveConcreteColorHex(token, input.palette) ?? void 0, input.foreground, input.palette));
26574
26990
  return stopScrims.every((scrim) => scrim.kind === "legible") ? {
26575
26991
  type: "gradient",
26576
26992
  gradient: input.gradient,
@@ -26580,7 +26996,7 @@ function gradientMediaScrim(input) {
26580
26996
  function scrimOpacityFor(scrimHex, foreground, palette) {
26581
26997
  if (typeof scrimHex !== "string") return { kind: "unreadable" };
26582
26998
  const foregroundHexes = Object.values(foreground).flatMap((token) => {
26583
- const hex = typeof token === "string" ? palette[token] : void 0;
26999
+ const hex = typeof token === "string" ? resolveConcreteColorHex(token, palette) : null;
26584
27000
  return typeof hex === "string" ? [hex] : [];
26585
27001
  });
26586
27002
  if (foregroundHexes.length === 0) return { kind: "unreadable" };
@@ -26595,6 +27011,104 @@ function scrimOpacityFor(scrimHex, foreground, palette) {
26595
27011
  };
26596
27012
  }
26597
27013
  //#endregion
27014
+ //#region ../theme-core/src/site-styles/imageSurfaceBackground.ts
27015
+ /**
27016
+ * What a photo surface gets when nothing has chosen a treatment, so text on it
27017
+ * stays readable. The one default for generated heroes, the opening-section
27018
+ * repair and the resolver's fallback.
27019
+ */
27020
+ const defaultHeroImageSurfaceTreatment = { kind: "neutral-wash" };
27021
+ function withImageSurfaceMotion(background, motion) {
27022
+ return motion === "static" ? background : {
27023
+ ...background,
27024
+ motion
27025
+ };
27026
+ }
27027
+ function compileImageSurfaceTreatmentBackground(background, treatment, foreground) {
27028
+ switch (treatment.kind) {
27029
+ case "none": return null;
27030
+ case "brand-scrim": return withColorOverlay(background, darkenedThemeToken(treatment.token), treatment, "primaryForeground", foreground);
27031
+ case "brand-wash": return withColorOverlay(background, lightenedBrandToken(treatment.token), treatment, "text", foreground);
27032
+ case "neutral-scrim": return withColorOverlay(background, darkenedThemeToken("text"), treatment, "primaryForeground", foreground);
27033
+ case "neutral-wash": return {
27034
+ ...background,
27035
+ overlay: {
27036
+ type: "gradient",
27037
+ gradient: "linear-gradient(180deg, rgba(255,255,255,0.38) 0%, rgba(244,241,234,0.62) 90%)",
27038
+ opacity: 1
27039
+ },
27040
+ ...uniformForeground("text"),
27041
+ ...foreground
27042
+ };
27043
+ case "solid-panel": return withColorOverlay(background, "surface", treatment, "text", foreground);
27044
+ default: return assertNever(treatment);
27045
+ }
27046
+ }
27047
+ function withColorOverlay(background, color, treatment, foregroundToken, foreground) {
27048
+ return {
27049
+ ...background,
27050
+ overlay: {
27051
+ type: "color",
27052
+ color,
27053
+ opacity: imageSurfaceTreatmentOpacity(treatment.kind, treatment.intensity)
27054
+ },
27055
+ ...uniformForeground(foregroundToken),
27056
+ ...foreground
27057
+ };
27058
+ }
27059
+ /** The brand tint older photo heroes use, shared with the Look photo treatment's brand arm. */
27060
+ function brandScrimOverlay(token) {
27061
+ return {
27062
+ type: "color",
27063
+ color: darkenedThemeToken(token),
27064
+ opacity: imageSurfaceTreatmentOpacity("brand-scrim", void 0)
27065
+ };
27066
+ }
27067
+ function uniformForeground(token) {
27068
+ return {
27069
+ textColor: token,
27070
+ headingColor: token,
27071
+ linkColor: token,
27072
+ supportingColor: token
27073
+ };
27074
+ }
27075
+ const opacityByKind = {
27076
+ "brand-scrim": {
27077
+ soft: .26,
27078
+ balanced: .35,
27079
+ strong: .52
27080
+ },
27081
+ "brand-wash": {
27082
+ soft: .24,
27083
+ balanced: .34,
27084
+ strong: .46
27085
+ },
27086
+ "neutral-scrim": {
27087
+ soft: .42,
27088
+ balanced: .58,
27089
+ strong: .72
27090
+ },
27091
+ "neutral-wash": {
27092
+ soft: 1,
27093
+ balanced: 1,
27094
+ strong: 1
27095
+ },
27096
+ "solid-panel": {
27097
+ soft: .78,
27098
+ balanced: .88,
27099
+ strong: .94
27100
+ }
27101
+ };
27102
+ function imageSurfaceTreatmentOpacity(kind, intensity) {
27103
+ return opacityByKind[kind][intensity ?? "balanced"];
27104
+ }
27105
+ function darkenedThemeToken(token) {
27106
+ return `color-mix(in oklab, rgb(var(--tb-${token})), black 28%)`;
27107
+ }
27108
+ function lightenedBrandToken(token) {
27109
+ return `color-mix(in oklab, rgb(var(--tb-${token})), white 42%)`;
27110
+ }
27111
+ //#endregion
26598
27112
  //#region ../theme-core/src/site-styles/runtimeCompiler.ts
26599
27113
  function isGradientSectionSurfaceRuntimeRule(rule) {
26600
27114
  return rule.background?.type === "gradient";
@@ -26615,7 +27129,12 @@ const compiledRuntimeStyleFieldNames = [
26615
27129
  * An authored `styleGroup` is content and survives.
26616
27130
  */
26617
27131
  function stripCompiledRuntimeStyleFields(content) {
26618
- return Object.fromEntries(Object.entries(stripStaleTransitionStyleGroup(content)).filter(([fieldName]) => !compiledRuntimeStyleFieldNames.includes(fieldName)));
27132
+ const stripped = Object.fromEntries(Object.entries(stripStaleTransitionStyleGroup(content)).filter(([fieldName]) => !compiledRuntimeStyleFieldNames.includes(fieldName)));
27133
+ const owner = sectionOwnerStyleChoices(content);
27134
+ return Object.keys(owner).length > 0 ? {
27135
+ ...stripped,
27136
+ _sectionStyles: owner
27137
+ } : stripped;
26619
27138
  }
26620
27139
  function surfaceResolutionContextFromTheme(theme, declaredSurfaces = [], solvedInks) {
26621
27140
  return prepareThemeSurfaceRevision({
@@ -26926,7 +27445,6 @@ function bookingPageOfferingFor(siteStyleId) {
26926
27445
  const quietBudget = {
26927
27446
  accentDensity: "low",
26928
27447
  panelDensity: "medium",
26929
- transitionMix: "quiet",
26930
27448
  primaryCtaLimit: 2,
26931
27449
  mediaDensity: "medium",
26932
27450
  decorativeRepetition: "low"
@@ -26938,7 +27456,6 @@ const accentLedQuietBudget = {
26938
27456
  const balancedBudget = {
26939
27457
  accentDensity: "medium",
26940
27458
  panelDensity: "medium",
26941
- transitionMix: "balanced",
26942
27459
  primaryCtaLimit: 3,
26943
27460
  mediaDensity: "medium",
26944
27461
  decorativeRepetition: "medium"
@@ -26946,7 +27463,6 @@ const balancedBudget = {
26946
27463
  const expressiveBudget = {
26947
27464
  accentDensity: "high",
26948
27465
  panelDensity: "high",
26949
- transitionMix: "expressive",
26950
27466
  primaryCtaLimit: 3,
26951
27467
  mediaDensity: "high",
26952
27468
  decorativeRepetition: "medium"
@@ -27065,7 +27581,7 @@ function defineCuratedSiteStyle(input) {
27065
27581
  kind: "public",
27066
27582
  generation: { kind: "explicit_only" }
27067
27583
  };
27068
- const recommendedAppearancePresetIds = (input.recommendedAppearancePresetIds ?? []).map(asAppearancePresetId);
27584
+ const photoShapes = input.photoShapes ?? skinDrawnPhotoShapes;
27069
27585
  return {
27070
27586
  id: asSiteStyleId(input.id),
27071
27587
  name: input.name,
@@ -27077,10 +27593,8 @@ function defineCuratedSiteStyle(input) {
27077
27593
  headingDecoration: input.headingDecoration ?? noHeadingDecoration,
27078
27594
  ...authoredSiteStyleOverrides(input),
27079
27595
  componentRuntimeRules: input.componentRuntimeRules ?? componentRuntimeRulesForTokenRecipes(input.tokenRecipes),
27080
- looks: input.looks ?? {
27081
- kind: "recipe",
27082
- recommendedAppearancePresetIds
27083
- },
27596
+ looks: curatedStyleLooks(input, photoShapes),
27597
+ photoShapes,
27084
27598
  headerCuration: headerCurationBySiteStyle[input.id],
27085
27599
  headerStyleRecipes: input.headerStyleRecipes,
27086
27600
  footerLookRecipes: input.footerLookRecipes,
@@ -27122,6 +27636,18 @@ const loomRoles = {
27122
27636
  const loomLooks = {
27123
27637
  kind: "offers",
27124
27638
  skin: "loom",
27639
+ finishes: {
27640
+ textures: {
27641
+ "paper-grain": .16,
27642
+ "handmade-paper": .15,
27643
+ plaster: .14
27644
+ },
27645
+ tones: {
27646
+ shading: .09,
27647
+ glow: .22,
27648
+ gradient: 1
27649
+ }
27650
+ },
27125
27651
  skinTokens: {
27126
27652
  radius: "14px",
27127
27653
  rule: "2px",
@@ -27151,30 +27677,36 @@ const loomLooks = {
27151
27677
  surfaces: {
27152
27678
  base: {
27153
27679
  kind: "token",
27154
- token: "background"
27680
+ token: "background",
27681
+ ground: "light"
27155
27682
  },
27156
27683
  band: {
27157
27684
  kind: "token",
27158
- token: "surfaceAlt"
27685
+ token: "surfaceAlt",
27686
+ ground: "band"
27159
27687
  },
27160
27688
  brand: {
27161
27689
  kind: "token",
27162
27690
  token: "primary",
27691
+ ground: "brand",
27163
27692
  buttonContext: { primary: unsafeAsOpaqueButtonColourToken("primaryForeground") }
27164
27693
  },
27165
27694
  deep: {
27166
27695
  kind: "token",
27167
27696
  token: "secondary",
27697
+ ground: "brand",
27168
27698
  buttonContext: { primary: unsafeAsOpaqueButtonColourToken("primaryForeground") }
27169
27699
  },
27170
27700
  sheet: {
27171
27701
  kind: "token",
27172
27702
  token: "surface",
27703
+ ground: "band",
27173
27704
  roleOnly: true
27174
27705
  },
27175
27706
  inverse: {
27176
27707
  kind: "token",
27177
27708
  token: "text",
27709
+ ground: "deep",
27178
27710
  roleOnly: true,
27179
27711
  buttonContext: { primary: unsafeAsOpaqueButtonColourToken("background") }
27180
27712
  }
@@ -27578,6 +28110,12 @@ const loomLooks = {
27578
28110
  id: id("offerings-type-columns"),
27579
28111
  treatment: "type-columns",
27580
28112
  roleMap: loomRoles
28113
+ },
28114
+ {
28115
+ id: id("class-prices-big-figures"),
28116
+ treatment: "price-figures",
28117
+ itemRoles: { items: "card" },
28118
+ roleMap: loomRoles
27581
28119
  }
27582
28120
  ],
27583
28121
  ownLayoutBlocks
@@ -27936,11 +28474,29 @@ const poiseOffers = [
27936
28474
  id: id("gifting-panel"),
27937
28475
  treatment: "gift-panel",
27938
28476
  roleMap: poiseRoles
28477
+ },
28478
+ {
28479
+ id: id("class-prices-big-figures"),
28480
+ treatment: "price-figures",
28481
+ itemRoles: { items: "card" },
28482
+ roleMap: poiseRoles
27939
28483
  }
27940
28484
  ];
27941
28485
  const poiseLooks = {
27942
28486
  kind: "offers",
27943
28487
  skin: "poise",
28488
+ finishes: {
28489
+ textures: {
28490
+ "paper-grain": .16,
28491
+ "handmade-paper": .15,
28492
+ plaster: .14
28493
+ },
28494
+ tones: {
28495
+ shading: .09,
28496
+ glow: .22,
28497
+ gradient: 1
28498
+ }
28499
+ },
27944
28500
  skinTokens: {
27945
28501
  radius: "24px",
27946
28502
  rule: "1.5px",
@@ -27965,25 +28521,30 @@ const poiseLooks = {
27965
28521
  surfaces: {
27966
28522
  base: {
27967
28523
  kind: "token",
27968
- token: "background"
28524
+ token: "background",
28525
+ ground: "light"
27969
28526
  },
27970
28527
  band: {
27971
28528
  kind: "token",
27972
- token: "surfaceAlt"
28529
+ token: "surfaceAlt",
28530
+ ground: "band"
27973
28531
  },
27974
28532
  sheet: {
27975
28533
  kind: "token",
27976
- token: "surface"
28534
+ token: "surface",
28535
+ ground: "band"
27977
28536
  },
27978
28537
  brand: {
27979
28538
  kind: "token",
27980
28539
  token: "primary",
28540
+ ground: "brand",
27981
28541
  buttonContext: { primary: unsafeAsOpaqueButtonColourToken("primaryForeground") },
27982
28542
  sectionShape: "field"
27983
28543
  },
27984
28544
  inverse: {
27985
28545
  kind: "token",
27986
28546
  token: "text",
28547
+ ground: "deep",
27987
28548
  sectionShape: "field"
27988
28549
  }
27989
28550
  },
@@ -28415,11 +28976,29 @@ const havenOffers = [
28415
28976
  id: id("location-map-entrance-photo"),
28416
28977
  treatment: "map-entrance",
28417
28978
  roleMap: havenRoles
28979
+ },
28980
+ {
28981
+ id: id("class-prices-big-figures"),
28982
+ treatment: "price-figures",
28983
+ itemRoles: { items: "card" },
28984
+ roleMap: havenRoles
28418
28985
  }
28419
28986
  ];
28420
28987
  const havenLooks = {
28421
28988
  kind: "offers",
28422
28989
  skin: "haven",
28990
+ finishes: {
28991
+ textures: {
28992
+ "paper-grain": .16,
28993
+ "handmade-paper": .15,
28994
+ plaster: .14
28995
+ },
28996
+ tones: {
28997
+ shading: .09,
28998
+ glow: .22,
28999
+ gradient: 1
29000
+ }
29001
+ },
28423
29002
  skinTokens: {
28424
29003
  radius: "30px",
28425
29004
  rule: "1.5px",
@@ -28440,24 +29019,29 @@ const havenLooks = {
28440
29019
  surfaces: {
28441
29020
  base: {
28442
29021
  kind: "token",
28443
- token: "background"
29022
+ token: "background",
29023
+ ground: "light"
28444
29024
  },
28445
29025
  sheet: {
28446
29026
  kind: "token",
28447
- token: "surface"
29027
+ token: "surface",
29028
+ ground: "band"
28448
29029
  },
28449
29030
  band: {
28450
29031
  kind: "token",
28451
- token: "surfaceAlt"
29032
+ token: "surfaceAlt",
29033
+ ground: "band"
28452
29034
  },
28453
29035
  deep: {
28454
29036
  kind: "token",
28455
29037
  token: "secondary",
29038
+ ground: "brand",
28456
29039
  roleOnly: true
28457
29040
  },
28458
29041
  brand: {
28459
29042
  kind: "token",
28460
29043
  token: "primary",
29044
+ ground: "brand",
28461
29045
  buttonContext: { primary: unsafeAsOpaqueButtonColourToken("primaryForeground") }
28462
29046
  }
28463
29047
  },
@@ -28983,6 +29567,41 @@ const brookOffers = [
28983
29567
  const brookLooks = {
28984
29568
  kind: "offers",
28985
29569
  skin: "brook",
29570
+ finishes: {
29571
+ textures: { "paper-grain": .16 },
29572
+ tones: {
29573
+ shading: .09,
29574
+ glow: .22
29575
+ }
29576
+ },
29577
+ edges: { supported: [
29578
+ ...existingStyleEdges.supported.map((edge) => ({
29579
+ ...edge,
29580
+ colourPresets: ["fade", "blend"]
29581
+ })),
29582
+ {
29583
+ family: "ridge",
29584
+ tuning: {
29585
+ amplitude: .75,
29586
+ irregularity: .3,
29587
+ rhythm: 2
29588
+ },
29589
+ minLayers: 2,
29590
+ maxLayers: 3,
29591
+ colourPresets: ["fade", "blend"]
29592
+ },
29593
+ {
29594
+ family: "hand-drawn-wave",
29595
+ tuning: {
29596
+ amplitude: .85,
29597
+ irregularity: .35,
29598
+ rhythm: 2
29599
+ },
29600
+ minLayers: 2,
29601
+ maxLayers: 3,
29602
+ colourPresets: ["fade", "blend"]
29603
+ }
29604
+ ] },
28986
29605
  skinTokens: {
28987
29606
  radius: "8px",
28988
29607
  rule: "1px",
@@ -29000,30 +29619,36 @@ const brookLooks = {
29000
29619
  base: {
29001
29620
  kind: "token",
29002
29621
  token: "background",
29622
+ ground: "light",
29003
29623
  foreground: brookLinks
29004
29624
  },
29005
29625
  band: {
29006
29626
  kind: "token",
29007
29627
  token: "surfaceAlt",
29628
+ ground: "band",
29008
29629
  foreground: brookLinks
29009
29630
  },
29010
29631
  sheet: {
29011
29632
  kind: "token",
29012
29633
  token: "surface",
29634
+ ground: "band",
29013
29635
  foreground: brookLinks
29014
29636
  },
29015
29637
  deep: {
29016
29638
  kind: "token",
29017
- token: "secondary"
29639
+ token: "secondary",
29640
+ ground: "brand"
29018
29641
  },
29019
29642
  brand: {
29020
29643
  kind: "token",
29021
29644
  token: "primary",
29645
+ ground: "brand",
29022
29646
  buttonContext: { primary: unsafeAsOpaqueButtonColourToken("primaryForeground") }
29023
29647
  },
29024
29648
  inverse: {
29025
29649
  kind: "token",
29026
- token: "text"
29650
+ token: "text",
29651
+ ground: "deep"
29027
29652
  }
29028
29653
  },
29029
29654
  rhythm: {
@@ -29075,7 +29700,6 @@ const brookLooks = {
29075
29700
  kind: "ground",
29076
29701
  grounds: ["brand", "deep"]
29077
29702
  },
29078
- occurrence: "first",
29079
29703
  join: asBoundaryOptionId("break:wave-gentle")
29080
29704
  }],
29081
29705
  offers: brookOffers,
@@ -29617,6 +30241,18 @@ const orbitBulge = asBoundaryOptionId("break:arc-bulge");
29617
30241
  const orbitLooks = {
29618
30242
  kind: "offers",
29619
30243
  skin: "orbit",
30244
+ finishes: {
30245
+ textures: {
30246
+ "paper-grain": .16,
30247
+ "handmade-paper": .15,
30248
+ plaster: .14
30249
+ },
30250
+ tones: {
30251
+ shading: .09,
30252
+ glow: .22,
30253
+ gradient: 1
30254
+ }
30255
+ },
29620
30256
  skinTokens: {
29621
30257
  radius: "28px",
29622
30258
  rule: "1.5px",
@@ -29641,22 +30277,26 @@ const orbitLooks = {
29641
30277
  base: {
29642
30278
  kind: "token",
29643
30279
  token: "background",
30280
+ ground: "light",
29644
30281
  foreground: orbitInks
29645
30282
  },
29646
30283
  band: {
29647
30284
  kind: "token",
29648
30285
  token: "surfaceAlt",
30286
+ ground: "band",
29649
30287
  foreground: orbitInks
29650
30288
  },
29651
30289
  sheet: {
29652
30290
  kind: "token",
29653
30291
  token: "surface",
30292
+ ground: "band",
29654
30293
  roleOnly: true,
29655
30294
  foreground: orbitInks
29656
30295
  },
29657
30296
  brand: {
29658
30297
  kind: "token",
29659
30298
  token: "primary",
30299
+ ground: "brand",
29660
30300
  foreground: orbitColouredInks.brand,
29661
30301
  buttonContext: {
29662
30302
  primary: unsafeAsOpaqueButtonColourToken("background"),
@@ -29666,6 +30306,7 @@ const orbitLooks = {
29666
30306
  deep: {
29667
30307
  kind: "token",
29668
30308
  token: "secondary",
30309
+ ground: "brand",
29669
30310
  foreground: orbitColouredInks.deep,
29670
30311
  buttonContext: {
29671
30312
  primary: unsafeAsOpaqueButtonColourToken("background"),
@@ -29761,6 +30402,18 @@ const folioLinks = { link: "primary" };
29761
30402
  const folioLooks = {
29762
30403
  kind: "offers",
29763
30404
  skin: "folio",
30405
+ finishes: {
30406
+ textures: {
30407
+ "paper-grain": .16,
30408
+ "handmade-paper": .15,
30409
+ plaster: .14
30410
+ },
30411
+ tones: {
30412
+ shading: .09,
30413
+ glow: .22,
30414
+ gradient: 1
30415
+ }
30416
+ },
29764
30417
  skinTokens: {
29765
30418
  radius: "10px",
29766
30419
  rule: "1px",
@@ -29778,27 +30431,32 @@ const folioLooks = {
29778
30431
  base: {
29779
30432
  kind: "token",
29780
30433
  token: "background",
30434
+ ground: "light",
29781
30435
  foreground: folioLinks
29782
30436
  },
29783
30437
  sheet: {
29784
30438
  kind: "token",
29785
30439
  token: "surface",
30440
+ ground: "band",
29786
30441
  roleOnly: true,
29787
30442
  foreground: folioLinks
29788
30443
  },
29789
30444
  band: {
29790
30445
  kind: "token",
29791
30446
  token: "muted",
30447
+ ground: "band",
29792
30448
  foreground: folioLinks
29793
30449
  },
29794
30450
  brand: {
29795
30451
  kind: "token",
29796
30452
  token: "primary",
30453
+ ground: "brand",
29797
30454
  foreground: folioLinks
29798
30455
  },
29799
30456
  deep: {
29800
30457
  kind: "token",
29801
30458
  token: "primary-800",
30459
+ ground: "deep",
29802
30460
  foreground: folioLinks
29803
30461
  }
29804
30462
  },
@@ -30104,6 +30762,15 @@ const folioLooks = {
30104
30762
  id: id("offerings-type-columns"),
30105
30763
  treatment: "type-columns",
30106
30764
  roleMap: folioRoles
30765
+ },
30766
+ {
30767
+ id: id("class-prices-rows"),
30768
+ treatment: "price-list",
30769
+ itemRoles: { container: "highlight" },
30770
+ roleMap: {
30771
+ ...folioRoles,
30772
+ highlight: "sheet"
30773
+ }
30107
30774
  }
30108
30775
  ],
30109
30776
  ownLayoutBlocks
@@ -30119,6 +30786,18 @@ const fulcrumRoles = {
30119
30786
  };
30120
30787
  const fulcrumLooks = {
30121
30788
  kind: "offers",
30789
+ finishes: {
30790
+ textures: {
30791
+ "paper-grain": .16,
30792
+ "handmade-paper": .15,
30793
+ plaster: .14
30794
+ },
30795
+ tones: {
30796
+ shading: .09,
30797
+ glow: .22,
30798
+ gradient: 1
30799
+ }
30800
+ },
30122
30801
  skin: "fulcrum",
30123
30802
  skinTokens: {
30124
30803
  radius: "3px",
@@ -30139,27 +30818,33 @@ const fulcrumLooks = {
30139
30818
  sheet: {
30140
30819
  kind: "token",
30141
30820
  token: "surface",
30821
+ ground: "band",
30142
30822
  roleOnly: true
30143
30823
  },
30144
30824
  base: {
30145
30825
  kind: "token",
30146
- token: "background"
30826
+ token: "background",
30827
+ ground: "light"
30147
30828
  },
30148
30829
  band: {
30149
30830
  kind: "token",
30150
- token: "muted"
30831
+ token: "muted",
30832
+ ground: "band"
30151
30833
  },
30152
30834
  brand: {
30153
30835
  kind: "token",
30154
- token: "secondary"
30836
+ token: "secondary",
30837
+ ground: "brand"
30155
30838
  },
30156
30839
  deep: {
30157
30840
  kind: "token",
30158
- token: "primary-900"
30841
+ token: "primary-900",
30842
+ ground: "deep"
30159
30843
  },
30160
30844
  inverse: {
30161
30845
  kind: "token",
30162
30846
  token: "text",
30847
+ ground: "deep",
30163
30848
  roleOnly: true
30164
30849
  }
30165
30850
  },
@@ -30493,6 +31178,12 @@ const fulcrumLooks = {
30493
31178
  id: id("offerings-type-columns"),
30494
31179
  treatment: "type-columns",
30495
31180
  roleMap: fulcrumRoles
31181
+ },
31182
+ {
31183
+ id: id("class-prices-big-figures"),
31184
+ treatment: "price-figures",
31185
+ itemRoles: { items: "card" },
31186
+ roleMap: fulcrumRoles
30496
31187
  }
30497
31188
  ],
30498
31189
  ownLayoutBlocks
@@ -30807,10 +31498,31 @@ const posterOffers = [
30807
31498
  id: id("offerings-type-columns"),
30808
31499
  treatment: "type-columns",
30809
31500
  roleMap: posterRoles
31501
+ },
31502
+ {
31503
+ id: id("class-prices-big-figures"),
31504
+ treatment: "price-figures",
31505
+ itemRoles: {
31506
+ items: "card",
31507
+ at: { middle: "statement" }
31508
+ },
31509
+ roleMap: posterRoles
30810
31510
  }
30811
31511
  ];
30812
31512
  const posterLooks = {
30813
31513
  kind: "offers",
31514
+ finishes: {
31515
+ textures: {
31516
+ "paper-grain": .16,
31517
+ "handmade-paper": .15,
31518
+ plaster: .14
31519
+ },
31520
+ tones: {
31521
+ shading: .09,
31522
+ glow: .22,
31523
+ gradient: 1
31524
+ }
31525
+ },
30814
31526
  skin: "poster",
30815
31527
  marksFrom: "primary",
30816
31528
  skinTokens: {
@@ -30836,29 +31548,35 @@ const posterLooks = {
30836
31548
  sheet: {
30837
31549
  kind: "token",
30838
31550
  token: "surface",
31551
+ ground: "band",
30839
31552
  roleOnly: true
30840
31553
  },
30841
31554
  base: {
30842
31555
  kind: "token",
30843
- token: "background"
31556
+ token: "background",
31557
+ ground: "light"
30844
31558
  },
30845
31559
  band: {
30846
31560
  kind: "token",
30847
- token: "muted"
31561
+ token: "muted",
31562
+ ground: "band"
30848
31563
  },
30849
31564
  brand: {
30850
31565
  kind: "token",
30851
31566
  token: "primary",
31567
+ ground: "brand",
30852
31568
  buttonContext: { primary: unsafeAsOpaqueButtonColourToken("accent") }
30853
31569
  },
30854
31570
  pop: {
30855
31571
  kind: "token",
30856
31572
  token: "accent",
31573
+ ground: "brand",
30857
31574
  buttonContext: { primary: unsafeAsOpaqueButtonColourToken("primary") }
30858
31575
  },
30859
31576
  inverse: {
30860
31577
  kind: "token",
30861
- token: "text"
31578
+ token: "text",
31579
+ ground: "deep"
30862
31580
  }
30863
31581
  },
30864
31582
  rhythm: {
@@ -30912,6 +31630,18 @@ const lanternVeilRoles = {
30912
31630
  };
30913
31631
  const lanternLooks = {
30914
31632
  kind: "offers",
31633
+ finishes: {
31634
+ textures: {
31635
+ "paper-grain": .16,
31636
+ "handmade-paper": .15,
31637
+ plaster: .14
31638
+ },
31639
+ tones: {
31640
+ shading: .09,
31641
+ glow: .22,
31642
+ gradient: 1
31643
+ }
31644
+ },
30915
31645
  skin: "lantern",
30916
31646
  skinTokens: {
30917
31647
  radius: "10px",
@@ -30936,27 +31666,33 @@ const lanternLooks = {
30936
31666
  sheet: {
30937
31667
  kind: "token",
30938
31668
  token: "surface",
31669
+ ground: "band",
30939
31670
  roleOnly: true
30940
31671
  },
30941
31672
  base: {
30942
31673
  kind: "token",
30943
- token: "background"
31674
+ token: "background",
31675
+ ground: "light"
30944
31676
  },
30945
31677
  band: {
30946
31678
  kind: "token",
30947
- token: "muted"
31679
+ token: "muted",
31680
+ ground: "band"
30948
31681
  },
30949
31682
  brand: {
30950
31683
  kind: "token",
30951
- token: "secondary"
31684
+ token: "secondary",
31685
+ ground: "brand"
30952
31686
  },
30953
31687
  deep: {
30954
31688
  kind: "token",
30955
- token: "secondary-950"
31689
+ token: "secondary-950",
31690
+ ground: "deep"
30956
31691
  },
30957
31692
  inverse: {
30958
31693
  kind: "token",
30959
- token: "text"
31694
+ token: "text",
31695
+ ground: "deep"
30960
31696
  }
30961
31697
  },
30962
31698
  rhythm: {
@@ -31315,6 +32051,12 @@ const lanternLooks = {
31315
32051
  id: id("offerings-type-columns"),
31316
32052
  treatment: "type-columns",
31317
32053
  roleMap: lanternRoles
32054
+ },
32055
+ {
32056
+ id: id("class-prices-big-figures"),
32057
+ treatment: "price-figures",
32058
+ itemRoles: { items: "card" },
32059
+ roleMap: lanternRoles
31318
32060
  }
31319
32061
  ],
31320
32062
  ownLayoutBlocks
@@ -31334,6 +32076,18 @@ const measureRuledPanelRoles = {
31334
32076
  const measureNoMarkers = { cardMarker: ["none"] };
31335
32077
  const measureLooks = {
31336
32078
  kind: "offers",
32079
+ finishes: {
32080
+ textures: {
32081
+ "paper-grain": .16,
32082
+ "handmade-paper": .15,
32083
+ plaster: .14
32084
+ },
32085
+ tones: {
32086
+ shading: .09,
32087
+ glow: .22,
32088
+ gradient: 1
32089
+ }
32090
+ },
31337
32091
  skin: "measure",
31338
32092
  skinTokens: {
31339
32093
  radius: "0",
@@ -31360,23 +32114,28 @@ const measureLooks = {
31360
32114
  sheet: {
31361
32115
  kind: "token",
31362
32116
  token: "surface",
32117
+ ground: "band",
31363
32118
  roleOnly: true
31364
32119
  },
31365
32120
  base: {
31366
32121
  kind: "token",
31367
- token: "background"
32122
+ token: "background",
32123
+ ground: "light"
31368
32124
  },
31369
32125
  band: {
31370
32126
  kind: "token",
31371
- token: "muted"
32127
+ token: "muted",
32128
+ ground: "band"
31372
32129
  },
31373
32130
  brand: {
31374
32131
  kind: "token",
31375
- token: "secondary"
32132
+ token: "secondary",
32133
+ ground: "brand"
31376
32134
  },
31377
32135
  deep: {
31378
32136
  kind: "token",
31379
- token: "secondary-950"
32137
+ token: "secondary-950",
32138
+ ground: "deep"
31380
32139
  }
31381
32140
  },
31382
32141
  rhythm: {
@@ -31675,6 +32434,11 @@ const measureLooks = {
31675
32434
  id: id("offerings-type-columns"),
31676
32435
  treatment: "type-columns",
31677
32436
  roleMap: measureRoles
32437
+ },
32438
+ {
32439
+ id: id("class-prices-rows"),
32440
+ treatment: "price-list",
32441
+ roleMap: measureRoles
31678
32442
  }
31679
32443
  ],
31680
32444
  ownLayoutBlocks
@@ -32573,6 +33337,23 @@ const curatedSiteStyles = [
32573
33337
  },
32574
33338
  description: "Soft waves where your photos and colour bands meet, hand-drawn squiggles under headings, and calm panels for your classes. For yoga teachers, retreats and wellbeing practices.",
32575
33339
  generationBrief: "Use calm, warm words in sentence case. Say plainly what happens in a class or retreat, who it suits and what to bring, give real times, prices and places, and avoid wellness cliches and health claims.",
33340
+ photoShapes: {
33341
+ supported: [
33342
+ "default",
33343
+ "square",
33344
+ "rounded",
33345
+ "circle",
33346
+ "pebble",
33347
+ "standing-stone",
33348
+ "arch"
33349
+ ],
33350
+ defaults: {
33351
+ feature: "default",
33352
+ card: "default",
33353
+ gallery: "default",
33354
+ backdrop: "default"
33355
+ }
33356
+ },
32576
33357
  headingDecoration: noHeadingDecoration,
32577
33358
  tokenRecipes: {
32578
33359
  palette: "warm-neutral",
@@ -32669,6 +33450,39 @@ const curatedSiteStyles = [
32669
33450
  })
32670
33451
  ];
32671
33452
  const curatedSiteStylesById = new Map(curatedSiteStyles.map((style) => [style.id, style]));
33453
+ function curatedStyleLooks(input, photoShapes) {
33454
+ const looks = input.looks?.kind === "offers" ? withPhotoShapeOffers(input.looks, photoShapes) : input.looks ?? {
33455
+ kind: "recipe",
33456
+ recommendedAppearancePresetIds: (input.recommendedAppearancePresetIds ?? []).map(asAppearancePresetId)
33457
+ };
33458
+ return {
33459
+ ...looks,
33460
+ edges: ("edges" in looks ? looks.edges : void 0) ?? existingStyleEdges
33461
+ };
33462
+ }
33463
+ /** Each arrangement style's photo shapes, by the skin its Looks render under. */
33464
+ const stylePhotoShapesBySkin = new Map(curatedSiteStyles.flatMap((style) => style.looks.kind === "offers" ? [[style.looks.skin, style.photoShapes]] : []));
33465
+ /**
33466
+ * Offered photo shapes are the style's supported list intersected with the Look's, through the
33467
+ * offer's `knobValues` clamp. An offer is left alone when the style supports every shape.
33468
+ */
33469
+ function withPhotoShapeOffers(looks, photoShapes) {
33470
+ return {
33471
+ ...looks,
33472
+ offers: looks.offers.map((offer) => {
33473
+ const look = lookDefinitionForId(offer.id);
33474
+ if (!(look !== null && [...look.structure.knobs, ...offer.addKnobs ?? []].includes("imageShape") && !(offer.removeKnobs ?? []).includes("imageShape"))) return offer;
33475
+ const allowed = (offer.knobValues?.imageShape ?? imageShapes).filter((shape) => photoShapes.supported.some((supported) => supported === shape));
33476
+ return allowed.length === imageShapes.length ? offer : {
33477
+ ...offer,
33478
+ knobValues: {
33479
+ ...offer.knobValues,
33480
+ imageShape: allowed
33481
+ }
33482
+ };
33483
+ })
33484
+ };
33485
+ }
32672
33486
  function getCuratedSiteStyle(id) {
32673
33487
  return curatedSiteStylesById.get(id) ?? null;
32674
33488
  }
@@ -32715,7 +33529,6 @@ curatedSiteStyles.forEach((style) => {
32715
33529
  if (style.looks.kind === "offers") {
32716
33530
  validateLookFallbacks(style.looks);
32717
33531
  validateCalendarModeOffers(style.looks);
32718
- validateSectionSurfaces(style.looks.skin, style.looks.surfaces);
32719
33532
  validateBookingBarSurface(style.looks.skin, style.looks.bookingBar, style.looks.surfaces);
32720
33533
  }
32721
33534
  (/* @__PURE__ */ new Set([...Object.values(style.footerLookRecipes ?? {}), ...style.recommendedFooterLookIds.map((id) => resolveFooterLookRecipe(style, id))])).forEach((recipe) => validateFooterRecipeSurfaces(style, recipe));
@@ -33204,9 +34017,10 @@ function compileArrangementLookRuntime(input) {
33204
34017
  if (!offer) return [];
33205
34018
  const roles = mergeItemRoles(look.structure.itemRoles, offer.itemRoles);
33206
34019
  const slotRoles = mergeSlotRoles(look, offer.slotRoles);
33207
- const [sectionGround] = offer.sectionSurface ? sectionBackgroundFor(offerSectionSurface(input.style, offer.sectionSurface), surfaceContext) : [];
34020
+ const [sectionGround] = offer.sectionSurface ? sectionBackgroundFor(offer.sectionSurface, offerSectionSurface(input.style, offer.sectionSurface), surfaceContext) : [];
34021
+ const { thumbnail: _thumbnail, ...runtimeLook } = look;
33208
34022
  return [{
33209
- look,
34023
+ look: runtimeLook,
33210
34024
  itemRoles: roles,
33211
34025
  slotRoles,
33212
34026
  roleMap: offer.roleMap,
@@ -33224,13 +34038,15 @@ function compileArrangementLookRuntime(input) {
33224
34038
  return {
33225
34039
  available,
33226
34040
  surfaces: input.style.surfaces,
34041
+ ...input.style.finishes ? { finishes: input.style.finishes } : {},
34042
+ grounds: Object.entries(input.style.surfaces).flatMap(([name, spec]) => spec.roleOnly ? [] : sectionBackgroundFor(name, spec, surfaceContext)),
33227
34043
  surfaceContext,
33228
34044
  byMode: Object.fromEntries(Object.entries(selected).flatMap(([mode, look]) => {
33229
34045
  const compiled = available.find((candidate) => candidate.look.id === look.id);
33230
34046
  return compiled ? [[mode, compiled]] : [];
33231
34047
  })),
33232
- fieldGrounds: fieldGroundTokens(input.style.surfaces),
33233
- rhythm: sectionRhythmSurfaces(input.style, input.flowPreset).flatMap((spec) => sectionBackgroundFor(spec, surfaceContext))
34048
+ ...input.style.progression === "deepen" ? { progression: "deepen" } : {},
34049
+ rhythm: sectionRhythmSurfaces(input.style, input.flowPreset).flatMap(({ name, spec }) => sectionBackgroundFor(name, spec, surfaceContext))
33234
34050
  };
33235
34051
  }
33236
34052
  /** Later entry/template binding may supply the content or settings, so retain the finite fallback closure. */
@@ -33298,6 +34114,7 @@ const arrangementLookHooks = [
33298
34114
  "data-one-person",
33299
34115
  "data-team-about",
33300
34116
  "data-shape",
34117
+ "data-ground-tone",
33301
34118
  "data-list-group",
33302
34119
  "data-section-spacing",
33303
34120
  "data-video-provider",
@@ -33343,18 +34160,27 @@ function itemSurfaceSpec(role, ground, style, base) {
33343
34160
  if (typeof name !== "string") {
33344
34161
  if (base.kind === "unmeasured") throw new Error(`A ${role} shade has no paint to shade on a ${base.paint} section`);
33345
34162
  return {
33346
- kind: "tint",
33347
- base: base.token,
33348
- ...name
34163
+ spec: {
34164
+ kind: "tint",
34165
+ base: base.token,
34166
+ ...name
34167
+ },
34168
+ ground
33349
34169
  };
33350
34170
  }
33351
34171
  if (name === "section") return {
33352
- kind: "paint",
33353
- paint: { kind: "transparent" }
34172
+ spec: {
34173
+ kind: "paint",
34174
+ paint: { kind: "transparent" }
34175
+ },
34176
+ ground
33354
34177
  };
33355
34178
  const spec = style.surfaces[name];
33356
34179
  if (!spec) throw new Error(`Undeclared item surface ${name}`);
33357
- return spec;
34180
+ return {
34181
+ spec: styleSurfacePaint(spec),
34182
+ ground: spec.ground
34183
+ };
33358
34184
  }
33359
34185
  function assignedItemRoles(look, overrides, slotRoles) {
33360
34186
  const roles = mergeItemRoles(look.structure.itemRoles, overrides);
@@ -33394,26 +34220,25 @@ function combinedCalendarSelections(style, selected, catalogue) {
33394
34220
  calendar: month
33395
34221
  };
33396
34222
  }
33397
- function sectionBackgroundFor(spec, context) {
33398
- const surface = resolveSurface(spec, context);
34223
+ function sectionBackgroundFor(name, spec, context) {
34224
+ const surface = resolveSurface(styleSurfacePaint(spec), context);
33399
34225
  return surface.kind === "owned" && surface.paint.kind === "solid" ? [{
33400
- type: "color",
33401
- color: surface.paint.token,
33402
- textColor: surface.foreground.text,
33403
- headingColor: surface.foreground.heading,
33404
- linkColor: surface.foreground.link,
33405
- supportingColor: surface.foreground.supporting
34226
+ name,
34227
+ ground: spec.ground,
34228
+ ...spec.kind === "token" && spec.finish ? { groundPaint: {
34229
+ base: surface.paint.token,
34230
+ ...spec.finish
34231
+ } } : {},
34232
+ paint: {
34233
+ type: "color",
34234
+ color: surface.paint.token,
34235
+ textColor: surface.foreground.text,
34236
+ headingColor: surface.foreground.heading,
34237
+ linkColor: surface.foreground.link,
34238
+ supportingColor: surface.foreground.supporting
34239
+ }
33406
34240
  }] : [];
33407
34241
  }
33408
- /**
33409
- * The style's own section ground for a colour token, with that surface's inks, or null when the
33410
- * token is not one of the style's section colours. An owner who paints a section one of these
33411
- * colours gets the foreground the style gives that ground, as if the style had chosen it.
33412
- */
33413
- function styleSectionBackgroundForColour(runtime, token) {
33414
- const spec = Object.values(runtime.surfaces).find((candidate) => candidate.kind === "token" && !candidate.roleOnly && candidate.token === token);
33415
- return spec ? sectionBackgroundFor(spec, runtime.surfaceContext)[0] ?? null : null;
33416
- }
33417
34242
  /** An offer's own section surface must be a declared token surface a section may take. */
33418
34243
  function offerSectionSurface(style, name) {
33419
34244
  const spec = style.surfaces[name];
@@ -33425,7 +34250,10 @@ function sectionRhythmSurfaces(style, flow) {
33425
34250
  return (style.rhythm?.[flow] ?? []).flatMap((name) => {
33426
34251
  const spec = style.surfaces[name];
33427
34252
  if (!spec) throw new Error(`Undeclared rhythm surface ${name}`);
33428
- return [spec];
34253
+ return [{
34254
+ name,
34255
+ spec
34256
+ }];
33429
34257
  });
33430
34258
  }
33431
34259
  //#endregion
@@ -33457,21 +34285,6 @@ function requireArrangementSlotSurface(surface) {
33457
34285
  if (surface.proof === "unproven-media") throw new Error("Arrangement slot surfaces never paint media");
33458
34286
  return surface;
33459
34287
  }
33460
- /** Solid tokens retain section semantics; literals/gradients use the solved ink. */
33461
- function resolvedSurfaceGround(surface, inherited) {
33462
- if (!surface || surface.kind === "inherit") return inherited;
33463
- if (surface.tintBase) return deriveSectionGround({
33464
- kind: "authored-colour",
33465
- background: {
33466
- type: "color",
33467
- color: surface.tintBase
33468
- }
33469
- }, surface.revision.palette);
33470
- const classified = surface.paint.kind === "solid" ? solidTokenGround(surface.paint.token) : null;
33471
- if (classified) return classified;
33472
- const ink = resolveOpaqueSurfaceHex(surface.foreground.text, surface.revision.palette, "background");
33473
- return ink && featuresFromHex(ink).Y >= .5 ? "deep" : "light";
33474
- }
33475
34288
  /** Resolve a parent completely (role, then tint) before deciding its children. */
33476
34289
  function resolveLookSurfacePresentation(input) {
33477
34290
  const roles = slotAssignments(input.look);
@@ -33523,24 +34336,25 @@ function resolveSlot(input, slot, visiting = []) {
33523
34336
  function surfaceBase(surface, inherited) {
33524
34337
  return surface?.kind === "owned" ? {
33525
34338
  kind: "measured",
33526
- token: surface.tintBase ?? surface.paint.token
34339
+ token: surface.tintBase ?? surface.paint.token,
34340
+ ...surface.backdropSamples ? { samples: surface.backdropSamples } : {}
33527
34341
  } : inherited;
33528
34342
  }
33529
34343
  /** Slot tints need a measured paint; shades inherit their enclosing button request and ground. */
33530
34344
  function applySlotTint(input, slot, role, under) {
33531
- const spec = role ? itemSurfaceSpec(role, under.ground, input.style, under.base) : void 0;
34345
+ const declared = role ? itemSurfaceSpec(role, under.ground, input.style, under.base) : {
34346
+ spec: void 0,
34347
+ ground: under.ground
34348
+ };
34349
+ const spec = declared.spec;
33532
34350
  const owned = spec ? resolveSurface(spec, slotContext(spec, under, input.style.context)) : void 0;
33533
34351
  const tint = activeSlotTint(input, slot, spec);
33534
34352
  const base = tint?.source === "shade" ? under.base : surfaceBase(owned, under.base);
33535
34353
  if (!tint || base.kind === "unmeasured") return {
33536
34354
  surface: owned,
33537
- ground: resolvedSurfaceGround(owned, under.ground),
34355
+ ground: declared.ground,
33538
34356
  buttonContext: slotButtonRequest(spec, under, input.style.context)
33539
34357
  };
33540
- const baseSurface = resolveSurface({
33541
- kind: "token",
33542
- token: base.token
33543
- }, input.style.context);
33544
34358
  const tintSpec = {
33545
34359
  kind: "tint",
33546
34360
  base: base.token,
@@ -33551,15 +34365,17 @@ function applySlotTint(input, slot, role, under) {
33551
34365
  return {
33552
34366
  surface: resolveSurface(tintSpec, slotContext(tintSpec, under, input.style.context)),
33553
34367
  buttonContext: slotButtonRequest(tintSpec, under, input.style.context),
33554
- ground: tint.source === "shade" ? under.ground : resolvedSurfaceGround(baseSurface, under.ground)
34368
+ ground: tint.source === "shade" ? under.ground : declared.ground
33555
34369
  };
33556
34370
  }
33557
34371
  /** Only a shade owns paint derived from its ancestor; transparent surfaces keep their canonical inherited decision. */
33558
34372
  function slotContext(spec, under, context) {
33559
- return spec.kind === "tint" && spec.source === "shade" ? {
34373
+ const inherits = spec.kind === "tint" && spec.source === "shade";
34374
+ return {
33560
34375
  ...context,
33561
- buttonContext: under.buttonContext
33562
- } : context;
34376
+ ...under.base.kind === "measured" && under.base.samples && spec.kind === "tint" ? { backdropSamples: under.base.samples } : {},
34377
+ ...inherits ? { buttonContext: under.buttonContext } : {}
34378
+ };
33563
34379
  }
33564
34380
  /** What a slot hands its descendants: the resolver's request, never its already-checked button styles. */
33565
34381
  function slotButtonRequest(spec, under, context) {
@@ -33859,4 +34675,4 @@ function createInteractiveIslandCodec(options) {
33859
34675
  };
33860
34676
  }
33861
34677
  //#endregion
33862
- export { buildTextContrastShadow as $, testimonialsCompositionTreatmentValues as $t, resolveModeArrangement as A, asDesignBlockId as An, deriveSectionGround as At, designRuntimeRulesForSiteStyle as B, resolveEffectiveKnobs as Bt, getCompatibleBlockAppearancePresets as C, openCardRoleValue as Cn, noneBoundaryOption as Ct, arrangementManifestFromVariants as D, asHeaderStyleId as Dn, anglePolygonCss as Dt, styleSectionBackgroundForColour as E, asHeaderLayoutId as En, transitionIntentForTreatment as Et, deriveSiteStyleBlockPolicy as F, defaultHeroImageSurfaceTreatment as Ft, compiledRuntimeStyleFieldNames as G, defineFrameCapability as Gt, getCuratedSiteStyle as H, assertNever as Ht, filterLayoutProfilesForPolicy as I, stripStaleTransitionStyleGroup as It, resolveCardRole as J, featureCardCompositionTreatmentValues as Jt, stripCompiledRuntimeStyleFields as K, defineNoBlockDesignCapability as Kt, filterLookIdsForPolicy as L, themeV2CompilerOwnedFieldNames as Lt, applyBlockContentVariantPolicy as M, asPageFlowPresetId as Mn, resolveSectionBackground as Mt, applySiteStyleBlockPoliciesToPageDesignIntent as N, asSiteStyleId as Nn, sectionForegroundBackground as Nt, readStoredMode as O, siteChromeBackgroundOverrideOwner as On, transitionCatalogueEntries as Ot, buildInitialPolicyPageDesignIntent as P, makeBoundaryId as Pn, sectionSurfaceBase as Pt, getNavLinkPreset as Q, sectionBackgroundPaintValues as Qt, componentRuntimeRulesForSiteStyle as R, appearancePresets as Rt, compileArrangementLookRuntime as S, itemRoleValues as Sn, isDecorativeTransitionIntent as St, resolveLookForBlock as T, parseGradientPresetId as Tn, spaciousBoundaryOption as Tt, requireCuratedSiteStyle as U, defineBlockDesignCapability as Ut, designRuntimeRulesForTheme as V, lookModes as Vt, compilePageRuntimeFields as W, defineExactCatalog as Wt, generateFooterCss as X, offeringsPreviewCompositionTreatmentValues as Xt, generateDefaultCardSystem as Y, introCompositionTreatmentValues as Yt, footerForegroundCandidates as Z, plainFrame as Zt, selectItemSurfacePresentation as _, runtimeBoxBackgroundSchema as _n, sectionShapeHook as _t, defineClientOwnedBlockRuntime as a, arrangementSlotNames as an, navLinkHoverColorCandidate as at, arrangementStyleAvailability as b, cardRoleSchema as bn, boundaryRuntimeMetricsForDecorativeTransition as bt, logger as c, cardListKnobBlocks as cn, parsePageDesignIntent as ct, listLookSlot as d, themeSchema as dn, resolvePageDesignBoundaryChoice as dt, toNonEmptyReadonlyArray as en, generateNavLinkCSS as et, lookListPresentationSchemaShape as f, headerVariantValues as fn, pageDesignDecisionsV2Schema as ft, resolveLookSurfacePresentation as g, boxBackgroundSchema as gn, sectionShapeFromContent as gt, lookPresentationOnPalette as h, boxBackgroundOverlaySchema as hn, sectionShapeForGround as ht, createZodCodec as i, surfaceToneFromForegroundToken as in, generateInteractiveChildInheritanceCSS as it, resolvePublishedLook as j, asLayoutVariantKey as jn, parseCanonicalRuntimeBackground as jt, resolveEffectiveArrangement as k, asAppearancePresetId as kn, applyLookPhotoTreatment as kt, listItemPresentation as l, lookKnobBlocks as ln, rebasePageDesignIntentToSiteStyle as lt, itemRole as m, customCssRuleSchema as mn, getGradientPreset as mt, createInteractiveIslandCodec as n, opaqueSurfaceDeclarations as nn, resolveEffectApplications as nt, defineProgressiveBlockRuntime as o, TokenResolver as on, navLinkOwnsHoverForeground as ot, resolvedItemSurfaceProps as p, blockCustomCssRuleSchema as pn, gradientToCss as pt, surfaceResolutionContextFromTheme as q, designIssueSeverityForPolicy as qt, defineInteractiveIslandMetaKeys as r, selectLogoVariant as rn, resolveEffectPaint as rt, isDecodeSuccess as s, cardListFamilyBlocks as sn, navLinkOwnsUnderline as st, buildInteractiveIslandProps as t, opaqueSurfaceContextFromTheme as tn, generateEffectsCSS as tt, listLookControl as u, sectionStylesOverrideSchema as un, resolvePageDesignBlockLookChoice as ut, arrangementAppearancePresets as v, fontWidthFits as vn, boundaryOptionForTransitionIntent as vt, resolveArrangementLookForBlock as w, surfaceCardRoleValues as wn, softBoundaryOption as wt, automaticArrangementLook as x, cardVariantRoleValues as xn, boundaryTreatmentForBoundaryOptionId as xt, arrangementLookHooks as y, boxlessCardVariantValue as yn, boundaryOptions as yt, componentRuntimeRulesForTheme as z, blockAppearancePresets as zt };
34678
+ export { sectionShapeFromContent as $, defineBlockDesignCapability as $t, resolvePublishedLook as A, boxlessCardVariantValue as An, resolvePageDesignBoundaryChoice as At, designRuntimeRulesForTheme as B, siteChromeBackgroundOverrideOwner as Bn, sectionTransitionFamilies as Bt, getCompatibleBlockAppearancePresets as C, headerVariantValues as Cn, mixGroundColour as Ct, readStoredMode as D, boxBackgroundSchema as Dn, parsePageDesignIntent as Dt, arrangementManifestFromVariants as E, boxBackgroundOverlaySchema as En, groundTextureDataUri as Et, filterLayoutProfilesForPolicy as F, surfaceCardRoleValues as Fn, boundaryRuntimeMetricsForDecorativeTransition as Ft, compiledRuntimeStyleFieldNames as G, asSiteStyleId as Gn, anglePolygonCss as Gt, requireCuratedSiteStyle as H, asDesignBlockId as Hn, spaciousBoundaryOption as Ht, filterLookIdsForPolicy as I, parseGradientPresetId as In, boundaryTreatmentForBoundaryOptionId as It, brandScrimOverlay as J, appearancePresets as Jt, stripCompiledRuntimeStyleFields as K, makeBoundaryId as Kn, transitionCatalogueEntries as Kt, componentRuntimeRulesForSiteStyle as L, asHeaderLayoutId as Ln, isDecorativeTransitionIntent as Lt, applySiteStyleBlockPoliciesToPageDesignIntent as M, cardVariantRoleValues as Mn, boundaryOptionForTreatment as Mt, buildInitialPolicyPageDesignIntent as N, itemRoleValues as Nn, boundaryOptionIdForTreatment as Nt, resolveEffectiveArrangement as O, runtimeBoxBackgroundSchema as On, rebasePageDesignIntentToSiteStyle as Ot, deriveSiteStyleBlockPolicy as P, openCardRoleValue as Pn, boundaryOptions as Pt, sectionShapeForGround as Q, assertNever as Qt, componentRuntimeRulesForTheme as R, asHeaderStyleId as Rn, noneBoundaryOption as Rt, compileArrangementLookRuntime as S, themeSchema as Sn, groundFlatZone as St, resolveLookForBlock as T, customCssRuleSchema as Tn, resolveSectionTreatment as Tt, stylePhotoShapesBySkin as U, asLayoutVariantKey as Un, transitionCatalogueEntryForIntent as Ut, getCuratedSiteStyle as V, asAppearancePresetId as Vn, softBoundaryOption as Vt, compilePageRuntimeFields as W, asPageFlowPresetId as Wn, transitionIntentForTreatment as Wt, gradientToCss as X, resolveEffectiveKnobs as Xt, defaultHeroImageSurfaceTreatment as Y, blockAppearancePresets as Yt, getGradientPreset as Z, lookModes as Zt, selectItemSurfacePresentation as _, cardListKnobBlocks as _n, navLinkOwnsHoverForeground as _t, defineClientOwnedBlockRuntime as a, introCompositionTreatmentValues as an, resolveCardRole as at, arrangementStyleAvailability as b, sectionStylesOverrideSchema as bn, stripStaleTransitionStyleGroup as bt, logger as c, requireNonEmptyReadonlyArray as cn, footerForegroundCandidates as ct, listLookSlot as d, toNonEmptyReadonlyArray as dn, generateNavLinkCSS as dt, defineExactCatalog as en, sectionShapeHook as et, lookListPresentationSchemaShape as f, opaqueSurfaceContextFromTheme as fn, generateEffectsCSS as ft, resolveLookSurfacePresentation as g, cardListFamilyBlocks as gn, navLinkHoverColorCandidate as gt, lookPresentationOnPalette as h, TokenResolver as hn, generateInteractiveChildInheritanceCSS as ht, createZodCodec as i, featureCardCompositionTreatmentValues as in, existingStyleEdges as it, applyBlockContentVariantPolicy as j, cardRoleSchema as jn, boundaryOptionForTransitionIntent as jt, resolveModeArrangement as k, fontWidthFits as kn, resolvePageDesignBlockLookChoice as kt, listItemPresentation as l, sectionBackgroundPaintValues as ln, getNavLinkPreset as lt, itemRole as m, arrangementSlotNames as mn, resolveEffectPaint as mt, createInteractiveIslandCodec as n, defineNoBlockDesignCapability as nn, isDrawnImageShape as nt, defineProgressiveBlockRuntime as o, offeringsPreviewCompositionTreatmentValues as on, generateDefaultCardSystem as ot, resolvedItemSurfaceProps as p, opaqueSurfaceDeclarations as pn, resolveEffectApplications as pt, surfaceResolutionContextFromTheme as q, pageDesignDecisionsV2Schema as qt, defineInteractiveIslandMetaKeys as r, designIssueSeverityForPolicy as rn, photoShapeDrawing as rt, isDecodeSuccess as s, plainFrame as sn, generateFooterCss as st, buildInteractiveIslandProps as t, defineFrameCapability as tn, imageShapeGeometry as tt, listLookControl as u, testimonialsCompositionTreatmentValues as un, buildTextContrastShadow as ut, arrangementAppearancePresets as v, lookKnobBlocks as vn, navLinkOwnsUnderline as vt, resolveArrangementLookForBlock as w, blockCustomCssRuleSchema as wn, resolveGroundPaint as wt, automaticArrangementLook as x, sectionTreatmentSchema as xn, themeV2CompilerOwnedFieldNames as xt, arrangementLookHooks as y, photoShapeKnobBlocks as yn, sectionOwnerStyleChoices as yt, designRuntimeRulesForSiteStyle as z, pageDesignEditorBackgroundOverrideOwner as zn, sectionBoundaryTreatmentsEqual as zt };