@riverbankcms/sdk 0.159.0 → 0.161.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 (218) hide show
  1. package/README.md +4 -4
  2. package/dist/_dts/{BlocksIslandsHydrator-Cj1i1Yhh.d.ts → BlocksIslandsHydrator-Bx4kLiTA.d.ts} +1 -1
  3. package/dist/_dts/{Page-Cgzbv22M.d.ts → Page-Dm7_P13o.d.ts} +217 -8
  4. package/dist/_dts/{SdkPreviewMode-BC_FGc6b.d.ts → SdkPreviewMode-D7HdWWwF.d.ts} +55 -127
  5. package/dist/_dts/{auth-contract-FPg0-2MC.d.ts → auth-contract-CgJ5nMaH.d.ts} +2 -0
  6. package/dist/_dts/{client-BOK-YHVJ.d.ts → client-Ep0jI9eE.d.ts} +1 -1
  7. package/dist/_dts/{content-types-CsrYWxq_.d.ts → content-types-BgAzCrBc.d.ts} +18 -18
  8. package/dist/_dts/{contracts-ClgMD-9g.d.ts → contracts-DUiOnj9e.d.ts} +10 -6
  9. package/dist/_dts/{footerPageOutline-C_IDuELl.d.ts → footerPageOutline-B-uXamTG.d.ts} +6 -6
  10. package/dist/_dts/{generatePageMetadata-B7bhYSWx.d.ts → generatePageMetadata-BDkZYEcS.d.ts} +2 -2
  11. package/dist/_dts/index-BQDBQvdu.d.ts +13 -0
  12. package/dist/_dts/index-BVkP8f70.d.ts +66 -0
  13. package/dist/_dts/{index-Dt3XSGzY.d.ts → index-CF6Cjs7b.d.ts} +2 -2
  14. package/dist/_dts/{index-Ci1PEk82.d.ts → index-CSsfq6KG.d.ts} +3 -17
  15. package/dist/_dts/{index-BZ4fb2zz.d.ts → index-D_8uz4OP.d.ts} +3 -3
  16. package/dist/_dts/{index-CcaG6O13.d.ts → index-DvKQA6AZ.d.ts} +4 -4
  17. package/dist/_dts/{index-DMOfW1A7.d.ts → index-KPrWM0KF.d.ts} +2 -2
  18. package/dist/_dts/{index-DzUdUaJ-.d.ts → index-ylivB7Jj.d.ts} +2 -2
  19. package/dist/_dts/{loadContent-C1JI2pG0.d.ts → loadContent-DTjKOO-T.d.ts} +19 -10
  20. package/dist/_dts/{resolvePageContent-BtRUtrJa.d.ts → resolvePageContent-C1vA5c5w.d.ts} +2 -2
  21. package/dist/_dts/{constants-DkcKHMX-.d.ts → runtime-BY8DQBbT.d.ts} +10 -16
  22. package/dist/_dts/{hosted-booking-appearance-ChGCQYdQ.d.ts → schema-BHu0PYWl.d.ts} +25911 -23567
  23. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  24. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  25. package/dist/_dts/sdk/src/client.d.ts +13 -7
  26. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  27. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  28. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  29. package/dist/_dts/sdk/src/index.d.ts +8 -8
  30. package/dist/_dts/sdk/src/manifest/index.d.ts +6 -6
  31. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  32. package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
  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 +10 -28
  36. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  37. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  38. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  39. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  40. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  41. package/dist/_dts/sdk/src/preview-next/keep-alive.d.ts +1 -1
  42. package/dist/_dts/sdk/src/preview-next/session.d.ts +2 -2
  43. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  44. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  45. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  46. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  47. package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
  48. package/dist/_dts/sdk/src/server.d.ts +5 -5
  49. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  50. package/dist/_dts/{session-Ba2CsnK5.d.ts → session-C_gtSFyZ.d.ts} +2 -1
  51. package/dist/_dts/{navigation-BnV_hOZy.d.ts → types-BR1Yboa9.d.ts} +15530 -16017
  52. package/dist/_dts/{types-CMFIZGUI.d.ts → types-CJXTCF_F.d.ts} +10 -13
  53. package/dist/_dts/{types-CI9dYWJ8.d.ts → types-D02ngcUH.d.ts} +4 -2
  54. package/dist/_dts/{types--oWXIfyz.d.ts → types-ZGUiHpDE.d.ts} +7 -7
  55. package/dist/_dts/{validation-Ct-GL0eA.d.ts → validation-BaV565gb.d.ts} +4 -4
  56. package/dist/client/{BlocksIslandsHydrator-DKS8Ba30.mjs → BlocksIslandsHydrator-DTExCJsb.mjs} +22 -21
  57. package/dist/client/{BookingMailingListNote-Cg9v6d7Y.mjs → BookingMailingListNote-BDpxmn1p.mjs} +2 -2
  58. package/dist/client/{CalendarNavigationChevron-BoVCTUXy.mjs → CalendarNavigationChevron-PeCiL82X.mjs} +6 -6
  59. package/dist/client/{CheckboxChoice-BF9eCNno.mjs → CheckboxChoice-DWexRLf6.mjs} +1 -1
  60. package/dist/client/{DemoBookingPortalAccess-BxRVCJG3.mjs → DemoBookingPortalAccess-3zmIqakW.mjs} +6 -6
  61. package/dist/client/{DemoPortalSignInLink-DHxYgkT6.mjs → DemoPortalSignInLink-GHi-8BW5.mjs} +1 -1
  62. package/dist/client/{EventCalendar.client-BI-kvwXf.mjs → EventCalendar.client-BxQLY5cX.mjs} +10 -9
  63. package/dist/client/{EventCombined.client-DIvnoN5l.mjs → EventCombined.client-B5bmQ03b.mjs} +8 -8
  64. package/dist/client/{EventEmbeddedCheckoutStep-B3XUyNY9.mjs → EventEmbeddedCheckoutStep-CgMZ9TeU.mjs} +1 -1
  65. package/dist/client/{EventItem-BRMtEaa6.mjs → EventItem-BEx-qiDE.mjs} +11 -6
  66. package/dist/client/{EventListWeekNavigation-B8DzAUDa.mjs → EventListWeekNavigation-CyH5tA6Y.mjs} +1 -1
  67. package/dist/client/{EventListing.client-Bo4qzQi0.mjs → EventListing.client-D3uySdGP.mjs} +3 -3
  68. package/dist/client/{EventListing.view-D2vemnCx.mjs → EventListing.view-9RFrBejr.mjs} +31 -15
  69. package/dist/client/{EventRegistrationPayment-e5XWtygG.mjs → EventRegistrationPayment-CG2tQx8K.mjs} +92 -99
  70. package/dist/client/LocationMapActions-Wsr83Q7q.mjs +268 -0
  71. package/dist/client/{Page-Dqpv9Ggi.mjs → Page-Bf2nPACI.mjs} +2673 -2290
  72. package/dist/client/{StepIndicator-BrvKa_8H.mjs → StepIndicator-CZweb1vs.mjs} +3 -3
  73. package/dist/client/{TabBarFragment-DvzIV75f.mjs → TabBarFragment-Bkgz67gt.mjs} +1 -1
  74. package/dist/client/ThemedButton-CnyL3s1A.mjs +2243 -0
  75. package/dist/client/{accordion-ByLpb4Dz.mjs → accordion-TcimLLRQ.mjs} +1 -1
  76. package/dist/client/{booking-form.client-BLndwxpx.mjs → booking-form.client-q-RpJ4aF.mjs} +13 -13
  77. package/dist/client/{bookingForm-CTxTEgHX.mjs → bookingForm-DjGfk3Wj.mjs} +4 -4
  78. package/dist/client/bookings.mjs +6 -6
  79. package/dist/client/{carousel-C8ef0vnT.mjs → carousel-CGAk6j0m.mjs} +2 -2
  80. package/dist/client/{carousel.client-BJGoJVtg.mjs → carousel.client-ArlGmYWV.mjs} +1 -1
  81. package/dist/client/{cart-BpH6jkUO.mjs → cart-D_h3rAZ2.mjs} +3 -3
  82. package/dist/client/{cart.client-DV78Td13.mjs → cart.client-DHOxZbJ7.mjs} +1 -1
  83. package/dist/client/{checkout-BJVb2RpL.mjs → checkout-tC-3CzuM.mjs} +3 -3
  84. package/dist/client/{checkout.client-CqGPXPSm.mjs → checkout.client-DsBb2Pkm.mjs} +1 -1
  85. package/dist/client/client.mjs +28 -15
  86. package/dist/client/{context-BRgBWthI.mjs → context-9ZfMb6GA.mjs} +1 -1
  87. package/dist/client/{cta-D8ucLsvX.mjs → cta-D-ZqL7-e.mjs} +2 -1
  88. package/dist/client/{dateFormatting-LeKNQ-iX.mjs → dateFormatting-BCwLqYpW.mjs} +1 -1
  89. package/dist/client/{demoPortalMagicLink-CjstiFPh.mjs → demoPortalMagicLink-BxkSS9fx.mjs} +1 -1
  90. package/dist/client/{enhanceHeaderSection-BaQJyI9x.mjs → enhanceHeaderSection-xg6to91E.mjs} +3 -3
  91. package/dist/client/{event-details.client-CYNQYOsP.mjs → event-details.client-C670TgRd.mjs} +2 -17
  92. package/dist/client/{event-registration.client-DDqSpN36.mjs → event-registration.client-C6GApWTB.mjs} +17 -17
  93. package/dist/client/{eventCalendar-3vQtuC9X.mjs → eventCalendar-CWc0dg9i.mjs} +4 -4
  94. package/dist/client/{eventCombined-CEJFMjqV.mjs → eventCombined-D4DbOrvQ.mjs} +4 -4
  95. package/dist/client/{eventDetails-nGh47jef.mjs → eventDetails-C2DfmbC0.mjs} +2 -2
  96. package/dist/client/{eventListing-BL3Ptb83.mjs → eventListing-C_yXmHyz.mjs} +4 -4
  97. package/dist/client/{eventRegistration-DDSO6KB2.mjs → eventRegistration-DJuaCB-O.mjs} +4 -4
  98. package/dist/client/{form-DjNLfy2Z.mjs → form-QZhtdFHA.mjs} +3 -3
  99. package/dist/client/{form.client-Cj0By6ot.mjs → form.client-CgvPACwG.mjs} +5 -5
  100. package/dist/client/{form.parts-DyA9C5Hy.mjs → form.parts-2uI0-5N-.mjs} +3 -3
  101. package/dist/client/{formatDate-CZo0MPTA.mjs → formatDate-Danr0Nk4.mjs} +1 -1
  102. package/dist/client/gifting/client.mjs +3 -3
  103. package/dist/client/{headerSection-JjSq6Mzp.mjs → headerSection-DJdlLdvZ.mjs} +2 -2
  104. package/dist/client/{mediaAssets-BOj-Co0B.mjs → mediaAssets-BvjcAZpS.mjs} +1 -1
  105. package/dist/client/mediaContext-jPeJ2PmJ.mjs +10801 -0
  106. package/dist/client/{newsletter-form.client-C2EgEBP1.mjs → newsletter-form.client-Cbepz2KU.mjs} +8 -8
  107. package/dist/client/{newsletter-form.parts-CaldoFmi.mjs → newsletter-form.parts-DN8oMCQ0.mjs} +2 -2
  108. package/dist/client/{newsletterForm-hm7L17LM.mjs → newsletterForm-wjLtW-wq.mjs} +3 -3
  109. package/dist/client/{noop-M8FTSgm2.mjs → noop-B7H6gCbj.mjs} +306 -5
  110. package/dist/client/portal/client.mjs +4560 -115
  111. package/dist/client/{product-detail.client-y86uwzEI.mjs → product-detail.client-CYTR165c.mjs} +1 -1
  112. package/dist/client/{product-list.client-_JBndYZT.mjs → product-list.client-B4vTvag8.mjs} +1 -1
  113. package/dist/client/{productDetail-D-9fb2cW.mjs → productDetail-k8LEMSWn.mjs} +3 -3
  114. package/dist/client/{productList-BSRlnwBW.mjs → productList-DEo8Bqoe.mjs} +3 -3
  115. package/dist/client/{propsDecoder-DhbGL302.mjs → propsDecoder-G0j0HXBO.mjs} +3 -28
  116. package/dist/client/{registry.server-BaX0hxf5.mjs → registry.server-BTmSXE3D.mjs} +1154 -997
  117. package/dist/client/rendering/client.mjs +28 -28
  118. package/dist/client/rendering/islands.mjs +1 -1
  119. package/dist/client/rendering.mjs +57 -32
  120. package/dist/client/{richText-coerce-Cny2Ukb6.mjs → richText-coerce-B19taoH6.mjs} +1 -1
  121. package/dist/client/{routeIslandApiConfig-96er7pIx.mjs → routeIslandApiConfig-Chu5BHra.mjs} +1 -1
  122. package/dist/client/{ThemedButton-DVBC_pS9.mjs → schema-C-m8XHuW.mjs} +1123 -2362
  123. package/dist/client/{shop-CnIJfdZA.mjs → shop-RGWa43H7.mjs} +3 -3
  124. package/dist/client/{shop-commerce-CsLwzq5O.mjs → shop-commerce-TJYCBO_H.mjs} +12 -12
  125. package/dist/client/{shop-commerce-store--O8GRBwr.mjs → shop-commerce-store-CjCcUB_o.mjs} +1 -1
  126. package/dist/client/{shop.client-BcaJ-acA.mjs → shop.client-tsKfZw1W.mjs} +15 -15
  127. package/dist/client/{shop.interactive-BxL_bshW.mjs → shop.interactive-CVqLAU53.mjs} +370 -189
  128. package/dist/client/{shopShared-VZjPOfCX.mjs → shopShared-C3lHMz_R.mjs} +2 -2
  129. package/dist/client/{src-7cXhT0G_.mjs → src-VIsPY-kw.mjs} +6 -1
  130. package/dist/client/timetableModel-V2ifvGGy.mjs +1100 -0
  131. package/dist/client/{useAvailableSlots-pTXuY3jV.mjs → useAvailableSlots-D1X69-pN.mjs} +4 -4
  132. package/dist/client/{useBookingNowIso-D14J-EhJ.mjs → useBookingNowIso-Ch30jino.mjs} +1 -1
  133. package/dist/client/{useDiscountApply-o5sIVZ2u.mjs → useDiscountApply-Bwzr1RjV.mjs} +3 -3
  134. package/dist/client/{useDiscountCodeUi-DJhFP_rg.mjs → useDiscountCodeUi-BimJbFC7.mjs} +1 -1
  135. package/dist/client/{useEventPagination-DMmNf2FP.mjs → useEventPagination-CLAS0upd.mjs} +12 -24
  136. package/dist/client/uuid-BETKW8rS.mjs +12 -0
  137. package/dist/client/{view-BgPql2yH2.mjs → view-BUh4LnLS.mjs} +4 -4
  138. package/dist/client/{view-D1R3Lk05.mjs → view-Dj_FZHmg.mjs} +19 -15
  139. package/dist/client/wizardSteps-BkZc-hKH.mjs +6598 -0
  140. package/dist/preview-next/before-render.mjs +5 -4
  141. package/dist/preview-next/chrome.css +2 -0
  142. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-BFlBqSu4.mjs → EventEmbeddedCheckoutStep-CwerMfzn.mjs} +2 -1
  143. package/dist/preview-next/client/LocationPickerEnvironment-QtSG2Bl-.mjs +138 -0
  144. package/dist/preview-next/client/MapLibreEditMap-B-rohNcG.mjs +488 -0
  145. package/dist/preview-next/client/{PreviewEditorSidebar-DADCj_ET.mjs → PreviewEditorSidebar-Dvq-RW9-.mjs} +1328 -171
  146. package/dist/preview-next/client/{PreviewEditorUI-La40Dmmh.mjs → PreviewEditorUI-BdFjS39R.mjs} +53 -79
  147. package/dist/preview-next/client/{SdkPreviewModeRuntime-406Hw9zY.mjs → SdkPreviewModeRuntime-BEfHln1E.mjs} +1249 -2551
  148. package/dist/preview-next/client/{SdkPreviewModeRuntime-CWN44I_B.mjs → SdkPreviewModeRuntime-CjkGh1IG.mjs} +1 -1
  149. package/dist/preview-next/client/{SiteChromeCustomizeContext-BdwEZoo9.mjs → SiteChromeCustomizeContext-CDbxk_qZ.mjs} +117481 -162497
  150. package/dist/preview-next/client/{ThemedButton-BEOPss9H.mjs → ThemedButton-b14Bv03E.mjs} +1253 -403
  151. package/dist/preview-next/client/lucide-react-CA9cpo0P.mjs +51984 -0
  152. package/dist/preview-next/client/maplibre-gl-DykfOYYn.mjs +34208 -0
  153. package/dist/preview-next/client/{previewChromeSurface-BVUKIYG0.mjs → previewChromeSurface-Dd1_mNIg.mjs} +3 -8
  154. package/dist/preview-next/client/result-BjJUoxUF.mjs +16 -0
  155. package/dist/preview-next/client/rolldown-runtime-CE6sIgz8.mjs +34 -0
  156. package/dist/preview-next/client/runtime.mjs +3 -3
  157. package/dist/preview-next/client/{sdk-runtime-Cy9AKPy5.mjs → sdk-runtime-B-CXyGVb.mjs} +1 -1
  158. package/dist/preview-next/client/siteStyleAccess-Kqk0j0dE.mjs +5812 -0
  159. package/dist/preview-next/client/{spinner-Bhpzz2vO.mjs → spinner-CGxS8Ns-.mjs} +2 -1
  160. package/dist/preview-next/{constants-D8Ya7bO4.mjs → constants-Bf-vqdKH.mjs} +2 -1
  161. package/dist/preview-next/editor-base.css +64 -2
  162. package/dist/preview-next/editor-chrome.css +85 -0
  163. package/dist/preview-next/keepAlive.mjs +2 -2
  164. package/dist/preview-next/middleware.mjs +7 -3
  165. package/dist/preview-next/{route-contract-DM22uOXM.mjs → route-contract-hLg-yjQN.mjs} +190 -116
  166. package/dist/preview-next/{session-BgkrPqu0.mjs → session-P1R_ajT7.mjs} +12 -2
  167. package/dist/preview-next/session.mjs +1 -1
  168. package/dist/server/{Block.shared-DB6fb1pR.mjs → Block.shared-CeTd2saO.mjs} +6 -6
  169. package/dist/server/{bindings-z2daXp-2.mjs → bindings-C5YpKuKt.mjs} +3 -2
  170. package/dist/server/{client-Cv-osXoU.mjs → client-Cv26lZQ4.mjs} +14 -10
  171. package/dist/server/config-template-validation.mjs +50 -10
  172. package/dist/server/config-validation.mjs +1 -1
  173. package/dist/server/config.mjs +2 -2
  174. package/dist/server/{siteChromeOverlayClearance-BangtD8A.mjs → effectiveNavLinkStyle-CGvGr3yD.mjs} +572 -1078
  175. package/dist/server/index.mjs +3 -3
  176. package/dist/server/{loadContent-BNMDYCm8.mjs → loadContent-C8a0b-cC.mjs} +40 -21
  177. package/dist/server/loadPage--DXBwI8V.mjs +2 -0
  178. package/dist/server/{loadPage-CjA_F_AF.mjs → loadPage-BW7dklu3.mjs} +9 -5
  179. package/dist/server/manifest.mjs +1 -1
  180. package/dist/server/next.mjs +9 -9
  181. package/dist/server/{overrideResolution-CGodrtqi.mjs → overrideResolution-tIuqmJB3.mjs} +1 -1
  182. package/dist/server/{overrides-DxRC724a.mjs → overrides-D1fiPOKF.mjs} +1158 -754
  183. package/dist/server/page-converter.mjs +8 -10
  184. package/dist/server/{prebuild-C6bhjRKT.mjs → prebuild--fO0E2tr.mjs} +1 -1
  185. package/dist/server/prebuild.mjs +1 -1
  186. package/dist/server/{prefetchBlockData-DZ5Fq_-r.mjs → prefetchBlockData-CqJnokWJ.mjs} +968 -968
  187. package/dist/server/{publicProducts-C3meXS2o.mjs → publicProducts-CvvZ4JIe.mjs} +207 -132
  188. package/dist/server/{blocks-BaG8Qpaa.mjs → registry-BVfCqaCq.mjs} +2853 -2799
  189. package/dist/server/rendering/server.mjs +4 -4
  190. package/dist/server/rendering.mjs +8 -8
  191. package/dist/server/{resolveBlockData-CbGDakvp.mjs → resolveBlockData-DPNvhXEz.mjs} +6 -3
  192. package/dist/server/routing.mjs +1 -1
  193. package/dist/server/{schema-Bs735S27.mjs → schema-CD4peO7m.mjs} +2441 -1401
  194. package/dist/server/server.mjs +3 -3
  195. package/dist/server/site-styles-H-EvTJiW.mjs +787 -0
  196. package/dist/server/siteChromeOverlayClearance-DNC2k1U0.mjs +750 -0
  197. package/dist/server/{src-B935_bzN.mjs → src-ILxc6pid.mjs} +427 -190
  198. package/dist/server/theme-bridge.mjs +1 -1
  199. package/dist/server/theme.mjs +1 -1
  200. package/dist/server/{themeAdmission-DK2YBNqy.mjs → themeAdmission-BNHIXiUj.mjs} +117 -26
  201. package/dist/server/{three-pass-converter-CmmchOFC.mjs → three-pass-converter-Chnb1XD-.mjs} +2 -58
  202. package/dist/server/{validation-BtHE2S_D.mjs → validation-B1ieVemg.mjs} +22 -63
  203. package/dist/server/{version-CNCdL6id.mjs → version-BQK44wFg.mjs} +1 -1
  204. package/dist/styles/index.css +235 -0
  205. package/package.json +8 -3
  206. package/dist/_dts/index-CXsnaCGe.d.ts +0 -10
  207. package/dist/_dts/index-cnymEAZY.d.ts +0 -1
  208. package/dist/client/LeafletStaticMap-dlapZ6mi.mjs +0 -135
  209. package/dist/client/location-map.client-DRN1JePj.mjs +0 -28
  210. package/dist/client/location-map.view-CuCvQdvp.mjs +0 -282
  211. package/dist/client/locationMap-B9srHHzZ.mjs +0 -15
  212. package/dist/client/mediaContext-DThoeEBU.mjs +0 -136
  213. package/dist/client/renderableMediaAssetAdmission-DGjBr_e-.mjs +0 -152
  214. package/dist/client/timetableModel-D09jPdue.mjs +0 -480
  215. package/dist/client/wizardSteps-C0TsNqJc.mjs +0 -17049
  216. package/dist/preview-next/client/siteStyleAccess-CFMmoMZb.mjs +0 -1326
  217. package/dist/server/loadPage-jade28Xh.mjs +0 -2
  218. package/dist/server/media-CcHwZkdJ.mjs +0 -243
@@ -0,0 +1,787 @@
1
+ import { B as headerInteractionPaletteValues, Et as cardRoleSchema, H as brandDisplayModeValues, Ht as assertNever, In as surfaceToneFromForegroundToken, It as asDesignEntryId, Lt as asDesignPageId, Mt as asBlockOrderIndex, Pt as asDesignBlockId, Qn as resolveConcreteColorHex, U as logoSizePolicyValues, Vt as asSiteStyleId, Xn as gradientScrimSamples, Zn as scrimTone, dr as themeColorShadeSteps, jt as asBlockContentVersionId, kt as normalizeCardRole, n as headerPositioningValues, nn as plainFrame, ot as runtimeBoxBackgroundSchema, pn as resolveSurfaceForeground, ur as parseThemeColorToken, zt as asLayoutVariantKey } from "./schema-CD4peO7m.mjs";
2
+ import { D as generatedDesignOptionCatalog, F as pageDesignIntentV2Schema, L as boundaryRuntimeMetricsForDecorativeTransition, M as normalizeLegacyPageDesignIntent, N as pageDesignDecisionsV2Schema, P as pageDesignIntentV1Schema, c as headerNavTypographyPreferenceValues, o as defaultHeaderNavPreferences, s as headerNavFontSizePreferenceValues, x as curatedSiteStyleIdValues } from "./effectiveNavLinkStyle-CGvGr3yD.mjs";
3
+ import { z } from "zod";
4
+ //#region ../theme-core/src/site-styles/blockFlow.ts
5
+ function defineBlockDesignMetadata(input) {
6
+ const layoutProfiles = (input.layoutProfiles ?? []).map((profile) => ({
7
+ ...profile,
8
+ variantKey: asLayoutVariantKey(profile.variantKey)
9
+ }));
10
+ assertUniqueLayoutProfileKeys(layoutProfiles);
11
+ return {
12
+ flow: input.flow,
13
+ layoutProfiles
14
+ };
15
+ }
16
+ function assertUniqueLayoutProfileKeys(profiles) {
17
+ const seen = /* @__PURE__ */ new Set();
18
+ const duplicates = profiles.flatMap((profile) => {
19
+ if (seen.has(profile.variantKey)) return [profile.variantKey];
20
+ seen.add(profile.variantKey);
21
+ return [];
22
+ });
23
+ if (duplicates.length > 0) throw new Error(`Duplicate block layout design profiles: ${duplicates.join(", ")}`);
24
+ }
25
+ //#endregion
26
+ //#region ../theme-core/src/site-styles/backgroundAppearance.ts
27
+ const backgroundAppearanceQuickColorTokenNames = [
28
+ "background",
29
+ "surface",
30
+ "muted",
31
+ "primary",
32
+ "secondary",
33
+ "accent"
34
+ ];
35
+ const backgroundAppearanceBaseColorTokenNames = [
36
+ "background",
37
+ "surface",
38
+ "surfaceAlt",
39
+ "muted",
40
+ "primary",
41
+ "secondary",
42
+ "accent",
43
+ "neutral"
44
+ ];
45
+ const backgroundAppearanceShadeableColorTokenNames = [
46
+ "primary",
47
+ "secondary",
48
+ "accent",
49
+ "neutral"
50
+ ];
51
+ const backgroundAppearanceColorTokenNames = uniqueStrings([...backgroundAppearanceBaseColorTokenNames, ...backgroundAppearanceShadeableColorTokenNames.flatMap((name) => themeColorShadeSteps.map((shade) => `${name}-${shade}`))]);
52
+ backgroundAppearanceColorTokenNames.filter((tokenName) => !backgroundAppearanceQuickColorTokenNames.includes(tokenName));
53
+ const backgroundAppearanceColorTokenNameSet = new Set(backgroundAppearanceColorTokenNames);
54
+ function parseBackgroundAppearanceColorToken(value) {
55
+ if (typeof value !== "string") return null;
56
+ const normalized = value.trim();
57
+ if (!backgroundAppearanceColorTokenNameSet.has(normalized)) return null;
58
+ return parseThemeColorToken(normalized);
59
+ }
60
+ function uniqueStrings(values) {
61
+ return Array.from(new Set(values));
62
+ }
63
+ //#endregion
64
+ //#region ../theme-core/src/site-styles/cardRoleVocabulary.ts
65
+ /**
66
+ * The legacy `itemSurface` treatment vocabulary, and how it reads as a card
67
+ * role.
68
+ *
69
+ * `itemSurface` named a *treatment* ("raised", "inset"); a role names *which
70
+ * card* a Look wants and defers the appearance to the site style. Phase 3
71
+ * deleted the treatment vocabulary and the recipe table it fed, so this map is
72
+ * no longer a migration coexistence device — it is the one parse boundary where
73
+ * persisted design plans written before the cutover still load, normalizing to
74
+ * the role they meant.
75
+ *
76
+ * Per-value rationale is recorded in
77
+ * `.project/plans/1297-card-role-contract-site-styles-own-card-surfaces/mapping-table.md`.
78
+ */
79
+ const legacyItemSurfaceCardRoles = {
80
+ none: "none",
81
+ flat: "default",
82
+ default: "default",
83
+ outlined: "default",
84
+ raised: "default",
85
+ inset: "alternative",
86
+ editorial: "open",
87
+ "color-blocked": "alternative"
88
+ };
89
+ Object.keys(legacyItemSurfaceCardRoles);
90
+ /**
91
+ * The parse boundary for card roles reaching design intents and persisted
92
+ * design plans: roles pass through, legacy `itemSurface` values normalize to
93
+ * the role they meant, everything else fails the parse.
94
+ */
95
+ const cardRoleWithLegacyAliasSchema = z.preprocess((value) => normalizeCardRole(value) ?? (typeof value === "string" && Object.prototype.hasOwnProperty.call(legacyItemSurfaceCardRoles, value) ? legacyItemSurfaceCardRoles[value] : value), cardRoleSchema);
96
+ //#endregion
97
+ //#region ../theme-core/src/site-styles/runtimeBackgroundResolution.ts
98
+ function parseCanonicalRuntimeBackground(content) {
99
+ const background = readRecord(readRecord(content._sectionStyles)?.background);
100
+ if (!background) return { kind: "none" };
101
+ const parsed = runtimeBoxBackgroundSchema.safeParse(background);
102
+ if (!parsed.success) return { kind: "none" };
103
+ return parsed.data.contentOwner === "page-design-editor" ? {
104
+ kind: "page-design-override",
105
+ background: parsed.data
106
+ } : {
107
+ kind: "block-authored",
108
+ background: parsed.data
109
+ };
110
+ }
111
+ function resolveSectionBackground(source, lookDefault, rhythm, arrangementHeroPhoto) {
112
+ if (heroPhotoIsContent(source, arrangementHeroPhoto, rhythm !== void 0)) {
113
+ if (rhythm !== void 0) return rhythmBackground(rhythm);
114
+ return {
115
+ kind: "content-media",
116
+ background: source.background,
117
+ ground: {
118
+ type: "color",
119
+ color: arrangementHeroPhoto?.fallbackToken ?? "background",
120
+ textColor: source.background.textColor,
121
+ headingColor: source.background.headingColor,
122
+ linkColor: source.background.linkColor,
123
+ supportingColor: source.background.supportingColor
124
+ }
125
+ };
126
+ }
127
+ if (source.kind === "page-design-override") return {
128
+ kind: "override",
129
+ background: source.background
130
+ };
131
+ if (isAuthoredMedia(source)) return {
132
+ kind: "authored-media",
133
+ background: lookDefault ? mergeLookForegroundWithAuthoredMedia(lookDefault, source.background) : source.background
134
+ };
135
+ if (lookDefault) return {
136
+ kind: "look-surface",
137
+ background: lookDefault
138
+ };
139
+ if (source.kind === "block-authored") return {
140
+ kind: "authored-colour",
141
+ background: source.background
142
+ };
143
+ return rhythmBackground(rhythm);
144
+ }
145
+ function resolveSectionForeground(background, palette) {
146
+ return resolveSurfaceForeground(sectionForegroundBackground(background, palette), palette, {}, { compositeBase: "background" });
147
+ }
148
+ /** Legacy detached photos keep already-legible authored ink and its exact CSS treatment. */
149
+ function sectionForegroundBackground(resolved, palette) {
150
+ if (resolved.kind === "base") return null;
151
+ if (resolved.kind !== "content-media") return resolved.background;
152
+ const original = resolveSurfaceForeground(resolved.background, palette);
153
+ const measured = resolveSurfaceForeground(resolved.ground, palette);
154
+ if (original.kind === "unknown" || measured.kind === "unknown") return resolved.background;
155
+ return [
156
+ "text",
157
+ "heading",
158
+ "link",
159
+ "supporting"
160
+ ].every((role) => original.roles[role] === measured.roles[role]) ? resolved.background : resolved.ground;
161
+ }
162
+ /** One photo-placement decision for legacy and arrangement hero renderers. */
163
+ function heroPhotoPaintsGround(variant) {
164
+ return ![
165
+ "split",
166
+ "splitReverse",
167
+ "headline-row",
168
+ "copy-over-gallery",
169
+ "page-head"
170
+ ].includes(variant ?? "classic");
171
+ }
172
+ function mergeLookForegroundWithAuthoredMedia(lookDefault, authored) {
173
+ const paintsBand = lookDefault.type === "color" || lookDefault.type === "gradient";
174
+ const lookScrim = paintsBand ? lookDefault.mediaScrim : void 0;
175
+ if (paintsBand && !lookScrim) return authored;
176
+ const merged = runtimeBoxBackgroundSchema.safeParse({
177
+ ...lookDefault,
178
+ type: authored.type,
179
+ image: authored.image,
180
+ objectFit: authored.objectFit,
181
+ scale: authored.scale,
182
+ position: authored.position,
183
+ ...lookScrim ? { overlay: lookScrim } : {}
184
+ });
185
+ return merged.success ? merged.data : authored;
186
+ }
187
+ function readRecord(value) {
188
+ return typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
189
+ }
190
+ function heroPhotoIsContent(source, photo, hasArrangementGround) {
191
+ return photo !== void 0 && !photo.paintsGround && source.kind === "block-authored" && source.background.type === "image" && (hasArrangementGround || !source.background.overlay);
192
+ }
193
+ function isAuthoredMedia(source) {
194
+ return source.kind === "block-authored" && (source.background.type === "image" || source.background.type === "video");
195
+ }
196
+ function rhythmBackground(background) {
197
+ return background ? {
198
+ kind: "rhythm",
199
+ background
200
+ } : { kind: "base" };
201
+ }
202
+ /**
203
+ * Semantic section grounds: background/base -> light; muted/surface bands ->
204
+ * band; primary/secondary/accent (including pop) -> brand; text/inverse and
205
+ * numbered deep shades -> deep. Media and gradients use the existing resolved
206
+ * scrim foreground/tone contract: light ink over a dark veil -> deep, dark ink
207
+ * over a light veil -> light. Unclassified/no veil defaults to light.
208
+ * Background ownership (override, authored, Look or rhythm) never changes tone.
209
+ */
210
+ const solidGrounds = {
211
+ background: "light",
212
+ muted: "band",
213
+ surface: "band",
214
+ primary: "brand",
215
+ secondary: "brand",
216
+ accent: "brand",
217
+ text: "deep"
218
+ };
219
+ function deriveSectionGround(resolved, palette) {
220
+ if (resolved.kind === "base") return "light";
221
+ const background = resolved.kind === "content-media" ? resolved.ground : resolved.background;
222
+ const solid = solidSectionGround(background);
223
+ if (solid) return solid;
224
+ return (scrimTone(sectionScrimSamples(background, palette)) ?? sectionForegroundTone(resolved, palette)) === "dark" ? "deep" : "light";
225
+ }
226
+ function solidSectionGround(background) {
227
+ if (background.type !== "color") return null;
228
+ const color = background.color ?? "background";
229
+ return solidGrounds[color] ?? (/-(?:[7-9]00|950)$/.test(color) ? "deep" : null);
230
+ }
231
+ function sectionForegroundTone(resolved, palette) {
232
+ const foreground = resolveSectionForeground(resolved, palette);
233
+ return foreground.kind === "known" ? surfaceToneFromForegroundToken(palette, foreground.roles.text) : "unknown";
234
+ }
235
+ function sectionVeil(background) {
236
+ switch (background.type) {
237
+ case "color": return null;
238
+ case "image":
239
+ case "video": return background.overlay;
240
+ case "gradient": return {
241
+ type: "gradient",
242
+ gradient: background.gradient,
243
+ opacity: 1
244
+ };
245
+ }
246
+ }
247
+ function sectionScrimSamples(background, palette) {
248
+ const overlay = sectionVeil(background);
249
+ if (overlay?.type === "gradient") return gradientScrimSamples(overlay.gradient ?? "", overlay.opacity ?? 1, palette);
250
+ if (overlay?.type !== "color") return [];
251
+ const hex = resolveConcreteColorHex(overlay.color ?? "", palette);
252
+ return hex ? [{
253
+ hex,
254
+ alpha: overlay.opacity ?? 1
255
+ }] : [];
256
+ }
257
+ //#endregion
258
+ //#region ../theme-core/src/site-styles/sectionBoundaryComposition.ts
259
+ const backgroundToken = requireThemeColorToken("background");
260
+ /**
261
+ * Classifies a section from its final render content. `_sectionStyles`
262
+ * already holds the effective background (Look default, page-design override
263
+ * and block-authored media merged by `resolveSectionBackground`), so this only
264
+ * reads it and never re-decides precedence. A missing or unparseable
265
+ * background is the page background, as it is for the renderer.
266
+ */
267
+ function boundaryEndpointForSectionContent(content) {
268
+ const background = parseCanonicalRuntimeBackground(content);
269
+ if (background.kind === "none") return {
270
+ kind: "paint",
271
+ token: backgroundToken
272
+ };
273
+ const effective = background.background;
274
+ switch (effective.type) {
275
+ case "color": {
276
+ if (effective.color === null || effective.color === void 0) return {
277
+ kind: "paint",
278
+ token: backgroundToken
279
+ };
280
+ const token = parseThemeColorToken(effective.color);
281
+ return token ? {
282
+ kind: "paint",
283
+ token
284
+ } : {
285
+ kind: "unpainted",
286
+ reason: "literal-color"
287
+ };
288
+ }
289
+ case "gradient": return {
290
+ kind: "unpainted",
291
+ reason: "gradient"
292
+ };
293
+ case "image":
294
+ case "video": return {
295
+ kind: "unpainted",
296
+ reason: "media"
297
+ };
298
+ default: return assertNever(effective, "Unhandled section background type");
299
+ }
300
+ }
301
+ /**
302
+ * Reads both facts from final render content in one place. `_frameStyles` is
303
+ * the compiled frame; content without one (no page design, an SDK block)
304
+ * draws a plain frame.
305
+ */
306
+ function sectionFactsForContent(content) {
307
+ return {
308
+ endpoint: boundaryEndpointForSectionContent(content),
309
+ frame: frameKindForContent(content)
310
+ };
311
+ }
312
+ function frameKindForContent(content) {
313
+ const frameStyles = content._frameStyles;
314
+ const kind = typeof frameStyles === "object" && frameStyles !== null && "kind" in frameStyles ? frameStyles.kind : null;
315
+ return kind === "panel" || kind === "flush-panel" ? kind : "plain";
316
+ }
317
+ /**
318
+ * The frame rule: a flush panel owns the edge it runs to, so no break is
319
+ * drawn next to one. The single home for this rule; the generated
320
+ * pipeline's budget and the site-style lab ask it with their plan frames.
321
+ */
322
+ function frameNotShownReason(previous, next) {
323
+ return previous === "flush-panel" || next === "flush-panel" ? "flush-panel" : null;
324
+ }
325
+ /**
326
+ * Decides whether and how a join draws. The frame rule wins before paint is
327
+ * considered; two unpainted sides show nothing.
328
+ */
329
+ function composeBoundary(previous, next) {
330
+ const frameReason = frameNotShownReason(previous.frame, next.frame);
331
+ if (frameReason) return {
332
+ kind: "not-shown",
333
+ reason: frameReason
334
+ };
335
+ const from = previous.endpoint;
336
+ const to = next.endpoint;
337
+ if (from.kind === "paint") return {
338
+ kind: "shown",
339
+ composition: to.kind === "paint" ? {
340
+ kind: "paint-to-paint",
341
+ from: from.token,
342
+ to: to.token
343
+ } : {
344
+ kind: "paint-to-unpainted",
345
+ from: from.token
346
+ }
347
+ };
348
+ return to.kind === "paint" ? {
349
+ kind: "shown",
350
+ composition: {
351
+ kind: "unpainted-to-paint",
352
+ to: to.token
353
+ }
354
+ } : {
355
+ kind: "not-shown",
356
+ reason: "both-unpainted"
357
+ };
358
+ }
359
+ /**
360
+ * Placement, reserves and paint for a shown boundary, derived from the
361
+ * composition and the catalogue's metrics for the treatment.
362
+ */
363
+ function boundaryLayout(intent, composition) {
364
+ const metrics = boundaryRuntimeMetricsForDecorativeTransition(intent);
365
+ switch (composition.kind) {
366
+ case "paint-to-paint": return {
367
+ placement: "centred",
368
+ reserves: {
369
+ before: metrics.reserveCss,
370
+ after: metrics.reserveCss
371
+ },
372
+ paint: {
373
+ band: composition.from,
374
+ shape: composition.to
375
+ }
376
+ };
377
+ case "unpainted-to-paint": return {
378
+ placement: "previous",
379
+ reserves: {
380
+ before: metrics.heightCss,
381
+ after: null
382
+ },
383
+ paint: {
384
+ band: null,
385
+ shape: composition.to
386
+ }
387
+ };
388
+ case "paint-to-unpainted": return {
389
+ placement: "next",
390
+ reserves: {
391
+ before: null,
392
+ after: metrics.heightCss
393
+ },
394
+ paint: {
395
+ band: null,
396
+ shape: composition.from
397
+ }
398
+ };
399
+ default: return assertNever(composition, "Unhandled boundary composition");
400
+ }
401
+ }
402
+ function requireThemeColorToken(value) {
403
+ const token = parseThemeColorToken(value);
404
+ if (!token) throw new Error(`Expected a theme color token. Received: ${value}`);
405
+ return token;
406
+ }
407
+ //#endregion
408
+ //#region ../theme-core/src/site-styles/siteChromeBackgrounds.ts
409
+ const siteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceColorTokenNames);
410
+ const quickSiteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceQuickColorTokenNames);
411
+ siteChromeBackgroundColorTokens.filter((token) => !quickSiteChromeBackgroundColorTokens.includes(token));
412
+ function parseSiteChromeBackgroundColorToken(value) {
413
+ const token = parseBackgroundAppearanceColorToken(value);
414
+ return token ? token : null;
415
+ }
416
+ function toSiteChromeBackgroundColorTokens(tokenNames) {
417
+ return tokenNames.flatMap((name) => {
418
+ const token = parseSiteChromeBackgroundColorToken(name);
419
+ return token ? [token] : [];
420
+ });
421
+ }
422
+ const backgroundColorTokenSchema = z.unknown().transform((value, ctx) => {
423
+ const token = parseSiteChromeBackgroundColorToken(value);
424
+ if (token === null) {
425
+ ctx.addIssue({
426
+ code: "custom",
427
+ message: "Unknown site chrome background colour token"
428
+ });
429
+ return z.NEVER;
430
+ }
431
+ return token;
432
+ });
433
+ const siteChromeBackgroundOverrideSchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("default") }).strict(), z.object({
434
+ kind: z.literal("color"),
435
+ token: backgroundColorTokenSchema
436
+ }).strict()]);
437
+ z.object({
438
+ background: siteChromeBackgroundOverrideSchema,
439
+ navigationLayout: z.enum(["inline-wrap", "stack"])
440
+ }).strict();
441
+ z.object({ background: siteChromeBackgroundOverrideSchema }).strict();
442
+ //#endregion
443
+ //#region ../theme-core/src/site-styles/compilationPlan.ts
444
+ const defaultHeaderBrandPreferences = {
445
+ brandDisplay: "auto",
446
+ logoSize: "auto"
447
+ };
448
+ //#endregion
449
+ //#region ../theme-core/src/site-styles/resolver.ts
450
+ const blockDesignFallback = {
451
+ sectionSurface: "base",
452
+ contentFrame: plainFrame,
453
+ sectionHeight: "default",
454
+ heroLegibility: "none",
455
+ imageSurfaceTreatment: { kind: "none" },
456
+ imageSurfaceMotion: "static",
457
+ tileTreatment: "default",
458
+ eventListTreatment: "plain",
459
+ eyebrowTreatment: "plain",
460
+ accordionIconTreatment: null,
461
+ composition: null
462
+ };
463
+ blockDesignFallback.sectionSurface, blockDesignFallback.contentFrame, blockDesignFallback.sectionHeight, blockDesignFallback.heroLegibility, blockDesignFallback.imageSurfaceTreatment, blockDesignFallback.imageSurfaceMotion, blockDesignFallback.tileTreatment, blockDesignFallback.eventListTreatment, blockDesignFallback.eyebrowTreatment, blockDesignFallback.accordionIconTreatment, blockDesignFallback.composition;
464
+ //#endregion
465
+ //#region ../theme-core/src/site-styles/headerBrandPresentation.ts
466
+ /**
467
+ * Whether the header wears a brand presentation at all (#1318 Phase 4c).
468
+ *
469
+ * `applyHeaderBrandPresentation` is unconditional today: given a logo context
470
+ * it always writes a `logo` object carrying a resolved display, size and
471
+ * accommodation. That makes "this header has no brand presentation block" —
472
+ * which is what several live sites persist, including one whose site *does*
473
+ * have a logo asset — a state the preference record could not express, so a
474
+ * recompile would silently give the site a logo treatment it has never
475
+ * rendered.
476
+ *
477
+ * This is the third field in this phase with that shape, after the interaction
478
+ * palette and the nav text size: the persisted bytes carry intent the reader
479
+ * cannot say, so the recompile "corrects" it. The fix is the same one — widen
480
+ * the closed vocabulary with a named member and derive it by baseline
481
+ * comparison — and it is a *widening*, not a restyle: `'recommended'` is the
482
+ * default and reproduces today's behaviour exactly, so no row whose bytes carry
483
+ * a presentation compiles differently for `'plain'` existing.
484
+ *
485
+ * `'plain'` is deliberately not "preserve whatever bytes are there". It is a
486
+ * constructive instruction — *write no presentation block* — so Phase 4e's
487
+ * compiler, which builds the header from nothing, can produce it.
488
+ */
489
+ const headerBrandPresentationValues = ["recommended", "plain"];
490
+ defaultHeaderBrandPreferences.brandDisplay, defaultHeaderBrandPreferences.logoSize, defaultHeaderNavPreferences.typography, defaultHeaderNavPreferences.fontSize, defaultHeaderNavPreferences.interactionPalette;
491
+ //#endregion
492
+ //#region ../theme-core/src/site-styles/generatedSchemas.ts
493
+ function uniqueNonEmpty(values) {
494
+ const uniqueValues = [...new Set(values)];
495
+ const firstValue = uniqueValues[0];
496
+ if (!firstValue) throw new Error("Expected at least one generated schema option.");
497
+ return [firstValue, ...uniqueValues.slice(1)];
498
+ }
499
+ const generatedPanelTreatments = uniqueNonEmpty(generatedDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "panel").map((frame) => frame.treatment));
500
+ const generatedFlushTreatments = uniqueNonEmpty(generatedDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.treatment));
501
+ const generatedFlushBleeds = uniqueNonEmpty(generatedDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.bleed));
502
+ const generatedPanelFrameSchema = z.object({
503
+ kind: z.literal("panel"),
504
+ treatment: z.enum(generatedPanelTreatments)
505
+ }).strict();
506
+ const generatedFlushPanelFrameSchema = z.object({
507
+ kind: z.literal("flush-panel"),
508
+ treatment: z.enum(generatedFlushTreatments),
509
+ bleed: z.enum(generatedFlushBleeds)
510
+ }).strict();
511
+ const generatedContentFrameIntentSchema = z.discriminatedUnion("kind", [
512
+ z.object({ kind: z.literal("plain") }).strict(),
513
+ generatedPanelFrameSchema,
514
+ generatedFlushPanelFrameSchema
515
+ ]);
516
+ const generatedSiteStyleIdSchema = z.enum(curatedSiteStyleIdValues).transform(asSiteStyleId);
517
+ function generatedChoiceSchema(valueSchema) {
518
+ return z.discriminatedUnion("kind", [z.object({
519
+ source: z.literal("generated"),
520
+ kind: z.literal("auto")
521
+ }).strict(), z.object({
522
+ source: z.literal("generated"),
523
+ kind: z.literal("explicit"),
524
+ value: valueSchema
525
+ }).strict()]);
526
+ }
527
+ const generatedBlockDesignIntentSchema = z.object({
528
+ sectionSurface: generatedChoiceSchema(z.enum(generatedDesignOptionCatalog.sectionSurfaces)),
529
+ contentFrame: generatedChoiceSchema(generatedContentFrameIntentSchema),
530
+ cardRole: generatedChoiceSchema(cardRoleWithLegacyAliasSchema),
531
+ transitionAfter: generatedChoiceSchema(z.enum(generatedDesignOptionCatalog.transitions)),
532
+ emphasis: generatedChoiceSchema(z.enum(generatedDesignOptionCatalog.emphases))
533
+ }).strict();
534
+ const generatedMediaCompositionIntentSchema = z.enum([
535
+ "none",
536
+ "supporting",
537
+ "dominant"
538
+ ]);
539
+ const generatedDecorativeCompositionIntentSchema = z.enum(["none", "supporting"]);
540
+ const generatedHeroLegibilityStrategySchema = z.enum(["none", "scrim-gradient"]);
541
+ const generatedBlockMediaIntentSchema = z.object({
542
+ media: generatedMediaCompositionIntentSchema,
543
+ decorative: generatedDecorativeCompositionIntentSchema,
544
+ heroLegibility: generatedChoiceSchema(generatedHeroLegibilityStrategySchema)
545
+ }).strict();
546
+ const generatedBoundaryIntentSchema = z.object({ transitionAfter: generatedChoiceSchema(z.enum(generatedDesignOptionCatalog.transitions)) }).strict();
547
+ const generatedPageDesignBlockIntentSchema = z.object({
548
+ blockId: z.string().min(1),
549
+ blockKind: z.string().min(1),
550
+ purpose: z.string().min(1),
551
+ design: generatedBlockDesignIntentSchema,
552
+ mediaIntent: generatedBlockMediaIntentSchema,
553
+ boundaryIntent: generatedBoundaryIntentSchema
554
+ }).strict();
555
+ z.object({
556
+ siteStyleId: generatedSiteStyleIdSchema,
557
+ blocks: z.array(generatedPageDesignBlockIntentSchema)
558
+ }).strict();
559
+ //#endregion
560
+ //#region ../theme-core/src/site-styles/headerPreferencesPersistence.ts
561
+ const logoTextIntentSchema = z.object({
562
+ mobileMaxWidth: z.enum([
563
+ "xs",
564
+ "sm",
565
+ "md"
566
+ ]).optional(),
567
+ mobileWrapLines: z.union([z.literal(1), z.literal(2)]).optional(),
568
+ hideOnShrink: z.boolean().optional()
569
+ }).strict();
570
+ const structureSchema = z.object({
571
+ positioning: z.union([z.literal("inherit"), z.enum(headerPositioningValues)]),
572
+ shrinkOnScroll: z.union([z.literal("inherit"), z.boolean()]),
573
+ logoText: z.union([
574
+ z.literal("inherit"),
575
+ z.literal("none"),
576
+ logoTextIntentSchema
577
+ ])
578
+ }).strict();
579
+ const headerPreferencesShape = {
580
+ brandPresentation: z.enum(headerBrandPresentationValues),
581
+ brandDisplay: z.enum(brandDisplayModeValues),
582
+ logoSize: z.enum(logoSizePolicyValues),
583
+ navFontRole: z.enum(headerNavTypographyPreferenceValues),
584
+ navTextSize: z.enum(headerNavFontSizePreferenceValues),
585
+ interactionPalette: z.union([z.literal("recommended"), z.enum(headerInteractionPaletteValues)]),
586
+ background: siteChromeBackgroundOverrideSchema,
587
+ structure: structureSchema
588
+ };
589
+ z.object(headerPreferencesShape).strict();
590
+ z.object(headerPreferencesShape).omit({
591
+ brandPresentation: true,
592
+ structure: true
593
+ }).strict();
594
+ //#endregion
595
+ //#region ../theme-core/src/site-styles/pageDesignAuthority.ts
596
+ const nonEmptyStringSchema = z.string().min(1);
597
+ const blockContentVersionIdSchema = nonEmptyStringSchema.transform(asBlockContentVersionId);
598
+ const designBlockIdSchema = nonEmptyStringSchema.transform(asDesignBlockId);
599
+ const designPageIdSchema = nonEmptyStringSchema.transform(asDesignPageId);
600
+ const designEntryIdSchema = nonEmptyStringSchema.transform(asDesignEntryId);
601
+ const blockOrderIndexSchema = z.number().int().nonnegative().transform(asBlockOrderIndex);
602
+ const publishedPageBlockSnapshotSchema = z.object({
603
+ kind: z.literal("published-block-content"),
604
+ blockId: designBlockIdSchema,
605
+ contentVersionId: blockContentVersionIdSchema,
606
+ identifier: z.string().nullable(),
607
+ blockKind: nonEmptyStringSchema,
608
+ orderIndex: blockOrderIndexSchema
609
+ }).strict();
610
+ const draftPageBlockSnapshotSchema = z.object({
611
+ kind: z.literal("draft-block-content"),
612
+ blockId: designBlockIdSchema,
613
+ contentVersionId: blockContentVersionIdSchema.nullable(),
614
+ identifier: z.string().nullable(),
615
+ blockKind: nonEmptyStringSchema,
616
+ orderIndex: blockOrderIndexSchema
617
+ }).strict();
618
+ const missingPageBlockSnapshotSchema = z.object({
619
+ kind: z.literal("missing-block-content"),
620
+ blockId: designBlockIdSchema,
621
+ identifier: z.string().nullable(),
622
+ blockKind: nonEmptyStringSchema,
623
+ orderIndex: blockOrderIndexSchema,
624
+ reason: z.enum([
625
+ "new-block",
626
+ "deleted-content-version",
627
+ "unpublished-block"
628
+ ])
629
+ }).strict();
630
+ const pageBlockSnapshotSchema = z.discriminatedUnion("kind", [
631
+ publishedPageBlockSnapshotSchema,
632
+ draftPageBlockSnapshotSchema,
633
+ missingPageBlockSnapshotSchema
634
+ ]);
635
+ const publishedPageBlockSequenceSchema = z.array(publishedPageBlockSnapshotSchema).superRefine(validateBlockSequence);
636
+ const draftPageBlockSequenceSchema = z.array(pageBlockSnapshotSchema).superRefine(validateBlockSequence);
637
+ const publishedPageDesignVersionDataV1Schema = z.object({
638
+ schemaVersion: z.literal(1),
639
+ stage: z.literal("published"),
640
+ pageId: designPageIdSchema,
641
+ blockSequence: publishedPageBlockSequenceSchema
642
+ }).strict();
643
+ const draftPageDesignVersionDataV1Schema = z.object({
644
+ schemaVersion: z.literal(1),
645
+ stage: z.literal("draft"),
646
+ pageId: designPageIdSchema,
647
+ blockSequence: draftPageBlockSequenceSchema
648
+ }).strict();
649
+ z.discriminatedUnion("stage", [publishedPageDesignVersionDataV1Schema, draftPageDesignVersionDataV1Schema]);
650
+ z.discriminatedUnion("kind", [
651
+ z.object({
652
+ kind: z.literal("block"),
653
+ blockId: designBlockIdSchema
654
+ }).strict(),
655
+ z.object({
656
+ kind: z.literal("entry"),
657
+ entryId: designEntryIdSchema
658
+ }).strict(),
659
+ z.object({
660
+ kind: z.literal("page"),
661
+ pageId: designPageIdSchema
662
+ }).strict()
663
+ ]);
664
+ function validateBlockSequence(snapshots, ctx) {
665
+ for (const issue of collectBlockSequenceIssues(snapshots)) ctx.addIssue(issue);
666
+ }
667
+ function collectBlockSequenceIssues(snapshots) {
668
+ const issues = [];
669
+ const seenBlockIds = /* @__PURE__ */ new Set();
670
+ const seenOrderIndexes = /* @__PURE__ */ new Set();
671
+ let previousOrderIndex = null;
672
+ snapshots.forEach((snapshot, index) => {
673
+ if (seenBlockIds.has(snapshot.blockId)) issues.push({
674
+ code: z.ZodIssueCode.custom,
675
+ message: `Duplicate blockId in page design blockSequence: ${snapshot.blockId}`,
676
+ path: [index, "blockId"]
677
+ });
678
+ seenBlockIds.add(snapshot.blockId);
679
+ const orderIndex = snapshot.orderIndex;
680
+ if (seenOrderIndexes.has(orderIndex)) issues.push({
681
+ code: z.ZodIssueCode.custom,
682
+ message: `Duplicate orderIndex in page design blockSequence: ${String(orderIndex)}`,
683
+ path: [index, "orderIndex"]
684
+ });
685
+ seenOrderIndexes.add(orderIndex);
686
+ if (previousOrderIndex !== null && orderIndex <= previousOrderIndex) issues.push({
687
+ code: z.ZodIssueCode.custom,
688
+ message: `Expected orderIndex greater than ${String(previousOrderIndex)} for blockSequence position ${String(index)}; received ${String(orderIndex)}.`,
689
+ path: [index, "orderIndex"]
690
+ });
691
+ previousOrderIndex = orderIndex;
692
+ });
693
+ return issues;
694
+ }
695
+ //#endregion
696
+ //#region ../theme-core/src/site-styles/tokenRecipes.ts
697
+ const themeTokenRecipeOptions = {
698
+ palette: [
699
+ "brand-led",
700
+ "warm-neutral",
701
+ "high-contrast",
702
+ "soft-natural"
703
+ ],
704
+ contrast: [
705
+ "standard",
706
+ "strong",
707
+ "maximum"
708
+ ],
709
+ radius: [
710
+ "square",
711
+ "soft",
712
+ "rounded",
713
+ "pill"
714
+ ],
715
+ shadow: [
716
+ "none",
717
+ "subtle",
718
+ "layered"
719
+ ],
720
+ typography: [
721
+ "serif-editorial",
722
+ "clean-sans",
723
+ "classic-serif",
724
+ "friendly-sans"
725
+ ],
726
+ spacing: [
727
+ "compact",
728
+ "regular",
729
+ "airy"
730
+ ],
731
+ motion: [
732
+ "none",
733
+ "subtle",
734
+ "expressive"
735
+ ]
736
+ };
737
+ z.object({
738
+ palette: z.enum(themeTokenRecipeOptions.palette),
739
+ contrast: z.enum(themeTokenRecipeOptions.contrast),
740
+ radius: z.enum(themeTokenRecipeOptions.radius),
741
+ shadow: z.enum(themeTokenRecipeOptions.shadow),
742
+ typography: z.enum(themeTokenRecipeOptions.typography),
743
+ spacing: z.enum(themeTokenRecipeOptions.spacing),
744
+ motion: z.enum(themeTokenRecipeOptions.motion)
745
+ });
746
+ z.number().int().nonnegative().brand();
747
+ z.discriminatedUnion("kind", [
748
+ z.object({
749
+ kind: z.literal("legacy"),
750
+ pauseAnnouncedAt: z.string().datetime({ offset: true }).optional()
751
+ }).strict(),
752
+ z.object({
753
+ kind: z.literal("paused"),
754
+ authority: z.enum(["legacy", "document"]),
755
+ checkpointId: z.string().uuid(),
756
+ pausedAt: z.string().datetime({ offset: true })
757
+ }).strict(),
758
+ z.object({
759
+ kind: z.literal("document"),
760
+ checkpointId: z.string().uuid(),
761
+ activatedAt: z.string().datetime({ offset: true })
762
+ }).strict()
763
+ ]);
764
+ //#endregion
765
+ //#region ../theme-core/src/site-styles/pageDesignVersionIntent.ts
766
+ function taggedStyledIntent(intent) {
767
+ const { siteStyleId, ...decisions } = intent;
768
+ return {
769
+ kind: "legacy-styled",
770
+ siteStyleId,
771
+ decisions
772
+ };
773
+ }
774
+ z.union([
775
+ z.nullish(z.never()).transform(() => ({ kind: "automatic" })),
776
+ pageDesignDecisionsV2Schema.transform((decisions) => ({
777
+ kind: "decisions",
778
+ decisions
779
+ })),
780
+ pageDesignIntentV2Schema.transform(taggedStyledIntent),
781
+ pageDesignIntentV1Schema.transform((intent) => taggedStyledIntent(normalizeLegacyPageDesignIntent(intent)))
782
+ ], { error: (issue) => {
783
+ const value = issue.input;
784
+ return typeof value === "object" && value !== null && "schemaVersion" in value && value.schemaVersion !== 1 && value.schemaVersion !== 2 ? "Unsupported Theme V2 page design intent schemaVersion." : "Invalid Theme V2 page design intent shape.";
785
+ } });
786
+ //#endregion
787
+ export { heroPhotoPaintsGround as a, sectionForegroundBackground as c, deriveSectionGround as i, defineBlockDesignMetadata as l, composeBoundary as n, parseCanonicalRuntimeBackground as o, sectionFactsForContent as r, resolveSectionBackground as s, boundaryLayout as t };