@riverbankcms/sdk 0.183.0 → 0.185.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 (236) hide show
  1. package/README.md +34 -1
  2. package/dist/_dts/{BlocksIslandsHydrator-X1_G96iN.d.ts → BlocksIslandsHydrator-Bu0O7l4p.d.ts} +1 -1
  3. package/dist/_dts/{Page-CEqZJZEE.d.ts → Page-DYoL0IWL.d.ts} +7 -7
  4. package/dist/_dts/{SdkPreviewMode-DQejfbXL.d.ts → SdkPreviewMode-DgFAiR8r.d.ts} +2 -2
  5. package/dist/_dts/{client-B_B_amKD.d.ts → client-BKdjJ7A0.d.ts} +35 -4
  6. package/dist/_dts/{content-types-Dhx5Ocvx.d.ts → content-types-6K7zlJuF.d.ts} +2 -2
  7. package/dist/_dts/{contracts-FeOnfoa1.d.ts → contracts-CUR8ccnX.d.ts} +3 -3
  8. package/dist/_dts/{generatePageMetadata-m70J6tit.d.ts → generatePageMetadata-CveWSMew.d.ts} +2 -2
  9. package/dist/_dts/{index-CjAkEWAp.d.ts → index-6WypKfbu.d.ts} +4 -4
  10. package/dist/_dts/{index-iuFrbIjt.d.ts → index-BMwrFX_K.d.ts} +1 -1
  11. package/dist/_dts/{index-BxCmCit0.d.ts → index-Bp5lk6I8.d.ts} +1 -1
  12. package/dist/_dts/{index-BOpUh8kO.d.ts → index-DTKn1H8g.d.ts} +3 -3
  13. package/dist/_dts/{index-Bizdaxji.d.ts → index-DX-Xe54X.d.ts} +2 -2
  14. package/dist/_dts/{index-liuhlOX7.d.ts → index-SD1fTP_7.d.ts} +2 -2
  15. package/dist/_dts/{loadContent-D4wrTIIw.d.ts → loadContent-BN8GtRsL.d.ts} +7 -7
  16. package/dist/_dts/{request-Gn0O1blj.d.ts → request-BwYvMqLf.d.ts} +78461 -77905
  17. package/dist/_dts/{resolveBlockData-D5duwuqS.d.ts → resolveBlockData-CYy0VlSK.d.ts} +5 -5
  18. package/dist/_dts/{resolvePageContent-xzJ3c9Na.d.ts → resolvePageContent-BwUDLi_W.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-CMNev0gz.d.ts} +19 -8
  55. package/dist/_dts/{types-DBNuMtSk.d.ts → types-BBazdRQf.d.ts} +9 -10
  56. package/dist/_dts/{types-DHMcuoeQ.d.ts → types-BwngWRQ8.d.ts} +13 -15
  57. package/dist/_dts/{types-BoITy0rA.d.ts → types-C9_amrul.d.ts} +6 -2
  58. package/dist/_dts/{validation-BIPO-XlE.d.ts → validation-B58kUTuV.d.ts} +4 -4
  59. package/dist/client/{BlocksIslandsHydrator-Ct8slgRk.mjs → BlocksIslandsHydrator-CooOPhs3.mjs} +17 -17
  60. package/dist/client/{BookingMailingListNote-qqTxGGS4.mjs → BookingMailingListNote-D_khdttF.mjs} +61 -62
  61. package/dist/client/{BookingQuestionFields-DCh9MUIF.mjs → BookingQuestionFields-Bia1E7Cj.mjs} +49 -36
  62. package/dist/client/{CalendarAction-RcdaStG7.mjs → CalendarAction-C-AbMmct.mjs} +2 -2
  63. package/dist/client/{CalendarNavigationChevron-D7Wt-Oaa.mjs → CalendarNavigationChevron-oaHxRbUO.mjs} +7 -7
  64. package/dist/client/{CheckboxChoice-BdGxZWeg.mjs → CheckboxChoice-CTMIII37.mjs} +1 -1
  65. package/dist/client/{DemoBookingPortalAccess-HFVkoOac.mjs → DemoBookingPortalAccess-M2xKYQjX.mjs} +7 -5
  66. package/dist/client/{EventCalendar.client-BtkJW8bA.mjs → EventCalendar.client-By7e9nyF.mjs} +11 -11
  67. package/dist/client/{EventCombined.client-DxaGjFFS.mjs → EventCombined.client-BdRZXB14.mjs} +10 -10
  68. package/dist/client/EventEmbeddedCheckoutStep-CJoxbx2Y.mjs +147 -0
  69. package/dist/client/{EventItem-Fr2qi2C2.mjs → EventItem-CDMa9zOX.mjs} +5 -5
  70. package/dist/client/{EventListWeekNavigation-BRMaq0ky.mjs → EventListWeekNavigation-B8WKaCrN.mjs} +1 -1
  71. package/dist/client/{EventListing.client-BhGxfbjt.mjs → EventListing.client-BEGiiFnO.mjs} +3 -3
  72. package/dist/client/{EventListing.view-COuEJzbO.mjs → EventListing.view-B6LOK-z4.mjs} +84 -7
  73. package/dist/client/{EventRegistrationPayment-BTLYhVxD.mjs → EventRegistrationPayment-CARdr15t.mjs} +140 -68
  74. package/dist/client/{Page-CgbQZP5g.mjs → Page-uP7AKSyp.mjs} +1762 -521
  75. package/dist/client/{ProtectedSubmitButton-BG7my0Qf.mjs → ProtectedSubmitButton-CY6u5sQa.mjs} +1 -1
  76. package/dist/client/SiteChoiceGroup-BZ5I0Vhy.mjs +96 -0
  77. package/dist/client/{SiteTermsAgreementField-DQNkfNLA.mjs → SiteTermsAgreementField-BDqRo2C5.mjs} +3 -3
  78. package/dist/client/{StepIndicator-DvPekKeM.mjs → StepIndicator-BWrXAKvs.mjs} +1 -1
  79. package/dist/client/{StepIndicator-DyXoI3ob.mjs → StepIndicator-Cb3NMw-Y.mjs} +30 -18
  80. package/dist/client/{ThemedButton-Bc9DBbVp.mjs → ThemedButton-C4rCsPCt.mjs} +11 -2
  81. package/dist/client/{accessibleSurfaces-wj4Rloo5.mjs → accessibleSurfaces-q-dDOwsW.mjs} +750 -560
  82. package/dist/client/{accordion-BVXfjnh-.mjs → accordion-BYW2YSUN.mjs} +1 -1
  83. package/dist/client/{booking-form.client-DycPGtke.mjs → booking-form.client-DAlWWWjV.mjs} +110 -72
  84. package/dist/client/{bookingCalendar--aWnqFDn.mjs → bookingCalendar-9nFa_do4.mjs} +6 -2
  85. package/dist/client/{bookingForm-DrWSUqL3.mjs → bookingForm-DtVk9p5l.mjs} +7 -6
  86. package/dist/client/bookings.mjs +5 -5
  87. package/dist/client/{boxStyleClassNames-CduDRcIk.mjs → boxStyleClassNames-CaSq3-r-.mjs} +2 -2
  88. package/dist/client/{EventEmbeddedCheckoutStep-B2c5dR49.mjs → browserStripe-Dh-LcDoW.mjs} +36 -142
  89. package/dist/client/{buttonParts-CJEtVOUy.mjs → buttonParts-C39GC0kz.mjs} +9 -2
  90. package/dist/client/{carousel-DyCLMP8s.mjs → carousel-msur7fxW.mjs} +2 -2
  91. package/dist/client/{carousel.client-DffP_Nv0.mjs → carousel.client-DKWqVHHh.mjs} +1 -1
  92. package/dist/client/{cart-BuEp_cj4.mjs → cart-Bx-JuY2n.mjs} +3 -3
  93. package/dist/client/{cart.client-CAO39uDG.mjs → cart.client-hB_9MimN.mjs} +1 -1
  94. package/dist/client/{checkout-BoxzT64s.mjs → checkout-BVWZn5Qu.mjs} +3 -3
  95. package/dist/client/{checkout.client-IGUy7XOx.mjs → checkout.client-Bt_GtHW9.mjs} +1 -1
  96. package/dist/client/{checkoutUrls-D0UsiFmm.mjs → checkoutUrls-CP-rQOZV.mjs} +1 -1
  97. package/dist/client/client.mjs +61 -48
  98. package/dist/client/{constants-C_8AxMdm.mjs → constants-yA1RJGXD.mjs} +1 -1
  99. package/dist/client/{context-D1L0pe__.mjs → context-CG77Keax.mjs} +43 -6
  100. package/dist/client/{dateFormatting-HvfmS_cH.mjs → dateFormatting-DIRIgfYr.mjs} +1 -1
  101. package/dist/client/{demoPortalMagicLink-BunFTnIq.mjs → demoPortalMagicLink-CgzNiOQ0.mjs} +1 -1
  102. package/dist/client/{enhanceHeaderSection-CtLAG651.mjs → enhanceHeaderSection-DgzZNM2M.mjs} +4 -4
  103. package/dist/client/{event-registration.client-DiSxkBUP.mjs → event-registration.client-Ckb4aDE9.mjs} +118 -74
  104. package/dist/client/{eventCalendar-DUnhwZ1o.mjs → eventCalendar-lqqQSzBQ.mjs} +4 -4
  105. package/dist/client/{eventCombined-BvBQo0nF.mjs → eventCombined-BIMyHrd-.mjs} +4 -4
  106. package/dist/client/{eventListing-aTLifOX7.mjs → eventListing-CBYxfvNf.mjs} +4 -4
  107. package/dist/client/{eventRegistration-DFd7pr09.mjs → eventRegistration-BhAqvkCb.mjs} +7 -6
  108. package/dist/client/{form-Dikmc2AO.mjs → form-CkOfk-Eb.mjs} +3 -3
  109. package/dist/client/{form.client-zHaQK5I9.mjs → form.client-Whi43oio.mjs} +5 -5
  110. package/dist/client/{form.parts-BLl9n8TH.mjs → form.parts-BgsWo2Me.mjs} +3 -3
  111. package/dist/client/gifting/client.mjs +8 -8
  112. package/dist/client/{gifting-CufPM38H.mjs → gifting-XtNpLcFI.mjs} +4 -4
  113. package/dist/client/{gifting.client--N1GaSY8.mjs → gifting.client-CraWj4I4.mjs} +174 -73
  114. package/dist/client/{gifting.interactive-D9MK4HkV.mjs → gifting.interactive-DiPDObN0.mjs} +61 -10
  115. package/dist/client/{gifting.parts-CRtiRzo-.mjs → gifting.parts-_mgGOcbA.mjs} +17 -43
  116. package/dist/client/{headerSection-BIaBpmk3.mjs → headerSection-CPIN3VSU.mjs} +2 -2
  117. package/dist/client/{islands-DJDLGQEm.mjs → islands-C95FyxUF.mjs} +1996 -1178
  118. package/dist/client/{newsletter-form.client-wg_JHTxm.mjs → newsletter-form.client-BgVJdKVe.mjs} +7 -7
  119. package/dist/client/{newsletter-form.interactive-hzpkW9NQ.mjs → newsletter-form.interactive-DpcfRbI_.mjs} +39 -18
  120. package/dist/client/{newsletter-form.parts-CgzpSv9p.mjs → newsletter-form.parts-poPgHrUh.mjs} +2 -2
  121. package/dist/client/{newsletterForm-CvxLiEBT.mjs → newsletterForm-Dt6wFjTe.mjs} +3 -3
  122. package/dist/client/portal/client.mjs +999 -81
  123. package/dist/client/{portalOrders-tCxS04g0.mjs → portalOrders-CAfjTyV9.mjs} +1 -1
  124. package/dist/client/{portalRoutes-DTHlWg_F.mjs → portalRoutes-D3Ttfv5x.mjs} +54 -12
  125. package/dist/client/portalSession-0XhXyTxT.mjs +41 -0
  126. package/dist/client/presentation-CudSUZ6Q.mjs +169 -0
  127. package/dist/client/{product-detail.client-22Q7zgjN.mjs → product-detail.client-BrBNT7Mq.mjs} +1 -1
  128. package/dist/client/{product-list.client-DFWYvK8z.mjs → product-list.client-CftTl7n6.mjs} +1 -1
  129. package/dist/client/{productDetail-DhZAwo60.mjs → productDetail-b1tpt585.mjs} +3 -3
  130. package/dist/client/{productList-BiVpbZK2.mjs → productList-DRT5sabi.mjs} +3 -3
  131. package/dist/client/{propsDecoder-DFYqKnLy.mjs → propsDecoder-Co1VXFaW.mjs} +4 -4
  132. package/dist/client/{registry.server-C3OBRg7x.mjs → registry.server-0UDNY7dO.mjs} +796 -715
  133. package/dist/client/rendering/client.mjs +28 -27
  134. package/dist/client/rendering/islands.mjs +1 -1
  135. package/dist/client/rendering.mjs +5 -5
  136. package/dist/client/{richText-coerce-ms477Z08.mjs → richText-coerce-BFDEPZZA.mjs} +2 -2
  137. package/dist/client/{routeIslandApiConfig-B6nQeqvH.mjs → routeIslandApiConfig-DtqRutuX.mjs} +1 -1
  138. package/dist/client/{runtimeResponse-BYqsV1Kb.mjs → runtimeResponse-DBVXbcuz.mjs} +1 -1
  139. package/dist/client/runtimeResponse-LQnQdtNI.mjs +3 -0
  140. package/dist/client/{shop-xt4dQ3HH.mjs → shop-DL3CYR7i.mjs} +3 -3
  141. package/dist/client/{shop-commerce-DVsIcPaI.mjs → shop-commerce-CDth2_qq.mjs} +45 -27
  142. package/dist/client/{shop-commerce-store-7mO6KY7_.mjs → shop-commerce-store-CE0aaSHJ.mjs} +1 -1
  143. package/dist/client/{shop-discount-apply.state-L1Vge8tG.mjs → shop-discount-apply.state-p4aXtVsF.mjs} +2 -2
  144. package/dist/client/{shop.client-DNJfD3VQ.mjs → shop.client-BI2iw6Z3.mjs} +83 -29
  145. package/dist/client/{shopShared-DS8t6749.mjs → shopShared-BNWzgWAC.mjs} +2 -2
  146. package/dist/client/spam-protection.mjs +1 -1
  147. package/dist/client/{src-Do_s2lqH.mjs → src-CJf3u16T.mjs} +1 -1
  148. package/dist/{preview-next/client/src-lX6heoDA.mjs → client/src-CMuv8vSO.mjs} +5 -1
  149. package/dist/client/src-CXOxpNtj.mjs +3 -0
  150. package/dist/client/{timetableModel-Dy3nNfTG.mjs → timetableModel-DZzGD6rS.mjs} +9 -9
  151. package/dist/client/{urlParams-C2QHo1Pa.mjs → useAutomaticDiscountPreview-CJDylOUe.mjs} +44 -1
  152. package/dist/client/{useAvailableSlots-DcjtDpUu.mjs → useAvailableSlots-nD6nuvSW.mjs} +2 -2
  153. package/dist/client/{useDiscountCodeUi-DvdFFWOT.mjs → useDiscountCodeUi-DMtTHqex.mjs} +6 -2
  154. package/dist/client/{useEventPagination-Cq-7sU5_.mjs → useEventPagination-CM-DCokc.mjs} +14 -16
  155. package/dist/client/{view-4gnPcpWJ.mjs → view-CHOhliHv.mjs} +4 -4
  156. package/dist/client/{wizardSteps-DDvL3iza.mjs → wizardSteps-BbroaNkT.mjs} +277 -87
  157. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-CLqSRUpt.mjs → EventEmbeddedCheckoutStep-CVy9oapv.mjs} +1 -1
  158. package/dist/preview-next/client/{LocationPickerEnvironment-CIdAg-Tm.mjs → LocationPickerEnvironment-DuRUwUrK.mjs} +1 -1
  159. package/dist/preview-next/client/{MapLibreEditMap-Bm85jX35.mjs → MapLibreEditMap-CdSDYBq9.mjs} +2 -2
  160. package/dist/preview-next/client/{PageSectionToolbar-D8srnz9R.mjs → PageSectionToolbar-CR99z8BL.mjs} +582 -195
  161. package/dist/preview-next/client/{PreviewEditorSidebar-DVpk5cqp.mjs → PreviewEditorSidebar-BaKS6H8F.mjs} +1096 -283
  162. package/dist/preview-next/client/{PreviewEditorUI-XoTtHSFH.mjs → PreviewEditorUI-D6IG119o.mjs} +65 -16
  163. package/dist/preview-next/client/{PreviewShell-VQHsRg2u.mjs → PreviewShell-CKjkFOZS.mjs} +39 -12
  164. package/dist/preview-next/client/{SdkPreviewModeRuntime-CLdF9f6o.mjs → SdkPreviewModeRuntime-BexDQWGj.mjs} +128 -27
  165. package/dist/preview-next/client/{ThemedButton-ORNN4x-3.mjs → ThemedButton-CRgbU75r.mjs} +18 -2
  166. package/dist/preview-next/client/{lucide-react-eAi3tDAr.mjs → lucide-react-B4c6U3ZU.mjs} +1 -1
  167. package/dist/preview-next/client/{previewAssistantSlot-CqH91EwA.mjs → previewAssistantSlot-DcEwU9l_.mjs} +7192 -3039
  168. package/dist/preview-next/client/{previewChromeRoot-B3ySEu6p.mjs → previewChromeRoot-VqseF0yf.mjs} +1 -1
  169. package/dist/preview-next/client/runtime.mjs +3 -3
  170. package/dist/preview-next/client/{sdk-runtime-CdpSupcr.mjs → sdk-runtime-DcoVpKUf.mjs} +2 -2
  171. package/dist/preview-next/client/{siteStyleAccess-C6eOP6QW.mjs → siteStyleAccess-BL1fZnUD.mjs} +16 -10
  172. package/dist/{client/src-uwCpbHXG.mjs → preview-next/client/src-B5x3r4cg.mjs} +5 -1
  173. package/dist/preview-next/client/src-CrT7h--V.mjs +3 -0
  174. package/dist/preview-next/client/{useAutosaveStatus-BhPg4e-r.mjs → useAutosaveStatus-CdFnzKac.mjs} +3 -3
  175. package/dist/preview-next/client/{useOpenBlockForSetup-BaWUF9D7.mjs → useOpenBlockForSetup-B62h7dhR.mjs} +4 -3
  176. package/dist/preview-next/container-responsive.css +158 -3
  177. package/dist/preview-next/keepAlive.mjs +1 -1
  178. package/dist/preview-next/middleware.mjs +1 -1
  179. package/dist/preview-next/{route-contract-Ch0X99vE.mjs → route-contract-CQfEvfbg.mjs} +54 -41
  180. package/dist/server/{Block.shared-B2FmczLO.mjs → Block.shared-CbGnxkWX.mjs} +5 -5
  181. package/dist/server/{ThemeScopeCore-DtAyv9qA.mjs → ThemeScopeCore-BjxlpVaV.mjs} +34 -8
  182. package/dist/server/{accessibleSurfaces-BtPqb76u.mjs → accessibleSurfaces-CZ7pLuJ7.mjs} +317 -148
  183. package/dist/server/{accordions-vzdZ2Wt1.mjs → accordions-C_C52VkS.mjs} +1 -1
  184. package/dist/server/{bindings-B_9JuU66.mjs → bindings-D-n66Oqc.mjs} +68 -247
  185. package/dist/server/{client-DC7cjiSw.mjs → client-BGGlrkft.mjs} +64 -47
  186. package/dist/server/config-validation.mjs +1 -1
  187. package/dist/server/config.mjs +2 -2
  188. package/dist/server/{constants-d6nPNJpe.mjs → constants-TkO9Uxma.mjs} +51 -9
  189. package/dist/server/data/resolveBlockData.mjs +1 -1
  190. package/dist/server/index.mjs +3 -3
  191. package/dist/server/{loadContent-hb27HYic.mjs → loadContent-8H1hHdXo.mjs} +4 -4
  192. package/dist/server/{loadPage-JToD8wDD.mjs → loadPage-BZyqF_g3.mjs} +3 -3
  193. package/dist/server/lookMediaFrame-Dw6R9B0L.mjs +31837 -0
  194. package/dist/server/manifest.mjs +2 -2
  195. package/dist/server/{navigation-B2WhGofA.mjs → navigation-9TOyY5Zf.mjs} +1 -1
  196. package/dist/server/navigation.mjs +1 -1
  197. package/dist/server/next.mjs +9 -9
  198. package/dist/server/{overrideResolution-vD5KTClL.mjs → overrideResolution-CuduOS6V.mjs} +1 -1
  199. package/dist/server/page-converter.mjs +17 -4
  200. package/dist/server/{pageRenderPlan-CdqJ1NQZ.mjs → pageRenderPlan-DmP0HVMu.mjs} +618 -209
  201. package/dist/server/{pageRuntimeSupport-CAhr4oOf.mjs → pageRuntimeSupport-BQ1dWs1V.mjs} +12 -5
  202. package/dist/server/{pageShared-m80Xu2pd.mjs → pageShared-ALu7y5Dq.mjs} +836 -516
  203. package/dist/server/{parseThemeForPersistence-CRwOZfpa.mjs → parseThemeForPersistence-D_8I28BB.mjs} +3 -3
  204. package/dist/server/{portal-B2wCQno_.mjs → portal-P4oHSRho.mjs} +23 -2
  205. package/dist/server/portal.mjs +3 -3
  206. package/dist/server/{prebuild-BWIkFaXq.mjs → prebuild-BLL6RhjS.mjs} +1 -1
  207. package/dist/server/prebuild.mjs +1 -1
  208. package/dist/server/{prefetchBlockData-D1PHU-K9.mjs → prefetchBlockData-aR5W1dVF.mjs} +3 -3
  209. package/dist/server/{registry-KtsOsAzY.mjs → registry-DD_s7l3Y.mjs} +1575 -28658
  210. package/dist/server/rendering/components/pageShared.mjs +1 -1
  211. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  212. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  213. package/dist/server/rendering/server.mjs +4 -4
  214. package/dist/server/rendering.mjs +9 -9
  215. package/dist/server/{resolveBlockData-sjIDJYl7.mjs → resolveBlockData-DnQ2N0lI.mjs} +2 -2
  216. package/dist/server/{expandPalette-DxPrNOAB.mjs → resolveButtonColourStates-ChlP4NJ9.mjs} +1662 -1430
  217. package/dist/server/{responseMedia-IfH65QAH.mjs → responseMedia-D6F1tvIm.mjs} +1 -1
  218. package/dist/server/{schema-BBEqquBM.mjs → schema-ClDfFtz2.mjs} +261 -6
  219. package/dist/server/server.mjs +3 -3
  220. package/dist/server/{servicePageContent-ChEZDRwU.mjs → servicePageContent-CsUerbJ1.mjs} +15 -12
  221. package/dist/server/theme-bridge.mjs +5 -4
  222. package/dist/server/theme.mjs +2 -2
  223. package/dist/server/{three-pass-converter-DKCIBeb1.mjs → three-pass-converter-CLJrZb7s.mjs} +1 -1
  224. package/dist/server/{titleSourceSchema-DybHErxH.mjs → titleSourceSchema-DA_iErtG.mjs} +2 -3
  225. package/dist/server/{types-vyz09w64.mjs → types-CcKy8_tj.mjs} +14 -5
  226. package/dist/server/{validation-Cvi-1TZZ.mjs → validation-BbImAsVs.mjs} +5 -5
  227. package/dist/server/{version-B-icAIV1.mjs → version-BY48jPoe.mjs} +1 -1
  228. package/dist/styles/index.css +684 -181
  229. package/package.json +1 -1
  230. package/dist/client/appointment-service-categories-Cl2pqw-z.mjs +0 -70
  231. package/dist/client/runtimeResponse-CUX_lldL.mjs +0 -3
  232. package/dist/client/src-DqMbCjI1.mjs +0 -3
  233. package/dist/preview-next/client/src-EO5QoRlU.mjs +0 -3
  234. package/dist/server/customCss-rtIfEYwQ.mjs +0 -230
  235. package/dist/server/lookMediaFrame-CTsycLLK.mjs +0 -2756
  236. package/dist/server/media-gvfIw3z8.mjs +0 -216
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { r as __toESM, t as __commonJSMin } from "./rolldown-runtime-CE6sIgz8.mjs";
3
- import { Ai as resolveMediaStorageUrl, Ao as replaceInlineTextRange, Bc as __awaiter, Bo as decideSectionPhoto, C as selectedImageFromMediaValue, Cd as unsafeAsEditorBlockId, Co as inlineTextToPlainText, Dc as DialogOverlay, Di as computeMediaTransformStyle, Ec as DialogDescription, Ei as getRichTextImageSize, El as cn$2, Eo as normalizeInlineTextMarks, Eu as mediaIdentifierSchema, F as nextLookTilePin, Fi as resolveArrangementKnobs, Fu as generateUuidV4, Gc as __spreadArray, Go as sectionPhotoPresence, Hc as __generator, Id as unsafeAsMediaAssetId, Jo as resolveEditorArrangementLook, Kc as __spreadArrays, Lc as usePortalContainer, Ld as unsafeAsPositiveByteCount, Li as isSystemCustomizeFacetId, M as lookPositionLabel, Mu as asLayoutVariantKey, N as lookTilePosition, Oc as DialogPortal, Oo as plainTextToInlineText, Os as lookModes, P as lookTilesFor, Pd as assertNever, Pi as arrangementKnobChoices, Pu as authoredValuesEqual, Sc as overlayScrimClass, So as inlineTextHighlightTones, Tc as DialogContent, Tl as useComposedRefs, To as normalizeInlineText, Uc as __read, Vc as __extends, Vi as systemCustomizeFacetStoredValue, Wc as __rest, _c as DialogDescription$1, _o as applyInlineTextMarkToRange, _u as getDirectImageUrlForMediaAsset, ai as getBlockDefinition, ar as parseBackgroundColorToken, b as pageDesignLookPosition, bc as DialogTitle$1, bl as useControlReadiness, bn as useEditorUiStore, bo as inlineTextAccentTones, bs as getGradientPreset, co as RichTextDocSchema, er as backgroundColorTokens, fl as useControllableState, fu as isRotationDimensionSwap, gc as DialogContent$1, gl as Primitive, gu as resolveMediaTransformForAspect, hl as composeEventHandlers, hu as parseAspectRatioValue, i as usePreviewSidebarNavigation, ic as isAddingBlockView, il as useSize, ji as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, jo as truncateInlineText, k as usePreviewRenderBackgrounds, kc as DialogTitle, ki as resolveImageUrlWithContext, ko as removeInlineTextMarkFromRange, kr as EDITOR_PART_ATTRIBUTE, ks as assertNever$1, lr as rankBackgroundImagePoolItems, mc as Dialog, ml as createContextScope, mu as formatAspectRatioToken, nr as defaultBackgroundOverrideForMode, o as usePreviewPageDesignEditorState, oc as selectedCanvasBlockId, os as getCuratedSiteStyle, pc as Spinner, pu as normalizeRightAngle, ra as readThemeScopeContext, rc as unwrapResponse, rn as getDashboardBaseUrl, ru as surfaceForegroundValue, sr as parseCanonicalSectionBackground, ts as lookDefinitionForId, uc as Callout, uo as richTextVariantCapabilities, vl as Button, vs as gradientToCss, vu as getImageUrl, w as selectedImageFromRenderableAsset, wc as DialogClose, wu as resolveManagedMediaReference, xl as cva, xn as useEditorUiStoreInstance, xo as inlineTextEqual, y as cyclePageDesignBlockLook, yc as DialogHeader, zc as __assign, zi as systemCustomizeFacetDefinitionForBlock } from "./previewAssistantSlot-CqH91EwA.mjs";
4
- import { A as List, Ct as Archive, F as Info, G as FileSpreadsheet, I as Image, J as FileArchive, K as FilePlay, L as ImageUp, M as Link$1, P as Italic$1, S as Palette, U as File, V as Highlighter, W as FileText, X as EyeOff, Xt as ok, Yt as err, _t as Bold$1, a as Upload, c as Trash2, et as Crop, j as ListOrdered, n as X, pt as Check, q as FileHeadphone, s as TriangleAlert, y as Pencil } from "./lucide-react-eAi3tDAr.mjs";
5
- import { Bt as classifyKnownMimeType, Ct as usePrevious, E as usePreviewCompiledThemeOptional, G as TransferError, H as useMediaEditor, L as siteColourCss, Ot as Input, S as planBlockToolbarPlacement, St as SelectValue, U as useMediaEditorOptional, W as useApiMediaUploader, _ as PreviewChromeFloatingControl, b as measureSiteTopChromeClearance, bt as SelectItem, ct as EditorCanvasChoiceChip, dt as EditorInsertionMarker, ft as EditorPartFrame, h as CustomizeBackgroundColorPicker, jt as useFieldDescribedBy, lt as EditorCanvasCycleChip, mt as CHOSEN_OPTION_CLASS, pt as EditorSelectionFrame, st as EditorCanvasChipRow, ut as EditorCanvasNameChip, vt as Select, xt as SelectTrigger, y as readThemeCustomProperties, yt as SelectContent } from "./siteStyleAccess-C6eOP6QW.mjs";
6
- import { A as arrangementBlockMode, J as resolvePromotedFields, P as placedFields, _t as DropdownMenuTrigger, a as blockNoticeAction, at as Tooltip, ct as TooltipTrigger, dt as DropdownMenuContent, ft as DropdownMenuItem, lt as Badge, o as blockNoticeLabel, ot as TooltipContent, r as useBlockCustomizeControls, s as blockNoticeMessage, st as TooltipProvider, t as useOpenBlockForSetup, u as useBlockNotice, ut as DropdownMenu } from "./useOpenBlockForSetup-BaWUF9D7.mjs";
3
+ import { $d as unsafeAsEditorBlockId, $o as sectionColourRequestUnchanged, Ai as resolveMediaStorageUrl, Ao as removeInlineTextMarkFromRange, As as lookDefinitionForId, Bc as Callout, C as selectedImageFromMediaValue, Co as inlineTextHighlightTones, Di as computeMediaTransformStyle, Do as normalizeInlineTextMarks, Ei as getRichTextImageSize, Eo as normalizeInlineText, F as lookTilesFor, Fc as selectedCanvasBlockId, Fi as resolveArrangementKnobs, Fs as getCuratedSiteStyle, Gl as composeEventHandlers, Gu as parseAspectRatioValue, Hl as useControllableState, Hu as isRotationDimensionSwap, I as nextLookTilePin, Jl as Button, Ju as getImageUrl, Kc as DialogContent, Kl as Primitive, Ku as resolveMediaTransformForAspect, Li as isSystemCustomizeFacetId, Mc as isAddingBlockView, Mo as truncateInlineText, N as lookPositionLabel, Nu as surfaceForegroundValue, P as lookTilePosition, Pi as arrangementKnobChoices, Pl as useSize, Qc as overlayScrimClass, Qo as sectionColourChoice, Qs as sectionOwnerStyleChoices, Sl as __spreadArrays, Sn as useEditorUiStoreInstance, So as inlineTextEqual, Uc as Spinner, Us as getGradientPreset, Uu as normalizeRightAngle, Vi as systemCustomizeFacetStoredValue, Vo as styleDefaultPhotoShape, Vs as gradientToCss, Wc as Dialog, Wl as createContextScope, Wu as formatAspectRatioToken, Xc as DialogTitle, Xl as useControlReadiness, Xo as recommendedBackgrounds, Xs as photoShapeDrawing, Yc as DialogHeader, Ys as isDrawnImageShape, Zl as cva, _l as __extends, _s as sectionPhotoPresence, ai as getBlockDefinition, al as DialogTitle$1, b as pageDesignLookPosition, bl as __rest, bs as resolveEditorArrangementLook, cd as asLayoutVariantKey, dd as generateUuidV4, do as richTextVariantCapabilities, ds as decideSectionPhoto, ed as resolveManagedMediaReference, el as DialogClose, ff as unsafeAsMediaAssetId, fs as sectionKeepsPhotoBesideText, gl as __awaiter, hl as __assign, i as usePreviewSidebarNavigation, il as DialogPortal, in as getDashboardBaseUrl, jc as unwrapResponse, ji as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, jo as replaceInlineTextRange, ki as resolveImageUrlWithContext, ko as plainTextToInlineText, kr as EDITOR_PART_ATTRIBUTE, lo as RichTextDocSchema, lr as rankBackgroundImagePoolItems, nc as assertNever$1, nd as mediaIdentifierSchema, nl as DialogDescription$1, nu as cn$2, o as usePreviewPageDesignEditorState, pf as unsafeAsPositiveByteCount, pl as usePortalContainer, qc as DialogDescription, qu as getDirectImageUrlForMediaAsset, ra as readThemeScopeContext, rl as DialogOverlay, rr as defaultBackgroundOverrideForMode, sr as parseCanonicalSectionBackground, tc as lookModes, tl as DialogContent$1, tr as backgroundColorTokens, tu as useComposedRefs, ud as authoredValuesEqual, uf as assertNever, ur as resolveBackgroundCapability, vl as __generator, vo as applyInlineTextMarkToRange, w as selectedImageFromRenderableAsset, wo as inlineTextToPlainText, xl as __spreadArray, xn as useEditorUiStore, xo as inlineTextAccentTones, y as cyclePageDesignBlockLook, yl as __read, zi as systemCustomizeFacetDefinitionForBlock } from "./previewAssistantSlot-DcEwU9l_.mjs";
4
+ import { C as Palette, G as File, I as Italic$1, J as FilePlay, K as FileText, L as Info, M as List, N as ListOrdered, P as Link$1, Q as EyeOff, Qt as ok, R as Image, Tt as Archive, U as Highlighter, X as FileArchive, Y as FileHeadphone, Zt as err, b as Pencil, c as TriangleAlert, ft as ChevronRight, ht as Check, l as Trash2, n as X, nt as Crop, o as Upload, pt as ChevronLeft, q as FileSpreadsheet, yt as Bold$1, z as ImageUp } from "./lucide-react-B4c6U3ZU.mjs";
5
+ import { At as Input, Ct as SelectTrigger, G as TransferError, H as useMediaEditor, Ht as classifyKnownMimeType, Nt as useFieldDescribedBy, S as planBlockToolbarPlacement, St as SelectItem, Tt as usePrevious, U as useMediaEditorOptional, W as useApiMediaUploader, _ as PreviewChromeFloatingControl, _t as RadioGroupItem, b as measureSiteTopChromeClearance, bt as Select, ct as EditorCanvasChoiceChip, dt as EditorInsertionMarker, ft as EditorPartFrame, gt as RadioGroup, h as CustomizeBackgroundColorPicker, lt as EditorCanvasCycleChip, mt as CHOSEN_OPTION_CLASS, pt as EditorSelectionFrame, st as EditorCanvasChipRow, ut as EditorCanvasNameChip, wt as SelectValue, xt as SelectContent, y as readThemeCustomProperties } from "./siteStyleAccess-BL1fZnUD.mjs";
6
+ import { A as arrangementBlockMode, J as resolvePromotedFields, P as placedFields, _t as DropdownMenuTrigger, a as blockNoticeAction, at as Tooltip, ct as TooltipTrigger, dt as DropdownMenuContent, ft as DropdownMenuItem, lt as Badge, o as blockNoticeLabel, ot as TooltipContent, r as useBlockCustomizeControls, s as blockNoticeMessage, st as TooltipProvider, t as useOpenBlockForSetup, u as useBlockNotice, ut as DropdownMenu } from "./useOpenBlockForSetup-B62h7dhR.mjs";
7
7
  import * as React$1 from "react";
8
8
  import React, { Component, createContext, createRef, forwardRef, useCallback, useContext, useDebugValue, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
9
9
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -217,67 +217,333 @@ function Surface({ className, variant, radius, padding, ...props }) {
217
217
  });
218
218
  }
219
219
  //#endregion
220
+ //#region ../ui/src/editor-view-header.tsx
221
+ /**
222
+ * The top of every sidebar view: an optional way back, the view's icon and
223
+ * name, a line saying what it is, and the view's own actions.
224
+ * Full-screen phone dialogs can use just the back link, above their existing title.
225
+ */
226
+ function EditorViewHeader({ back, icon, title, subtitle, actions, children, bareIcon = false, wrapTitle = false, backClassName }) {
227
+ return /* @__PURE__ */ jsxs("header", {
228
+ className: "shrink-0 border-b bg-editor-chrome-surface px-4 pb-3 pt-3.5",
229
+ "data-testid": "preview-sidebar-view-header",
230
+ children: [
231
+ back ? /* @__PURE__ */ jsxs("button", {
232
+ type: "button",
233
+ onClick: back.onBack,
234
+ className: `mb-1.5 inline-flex max-w-full items-center gap-1 rounded-md text-[13px] font-medium text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${backClassName ?? ""}`,
235
+ "data-testid": "preview-sidebar-back",
236
+ children: [/* @__PURE__ */ jsx(ChevronLeft, {
237
+ className: "h-3.5 w-3.5 shrink-0",
238
+ "aria-hidden": "true"
239
+ }), /* @__PURE__ */ jsx("span", {
240
+ className: "truncate",
241
+ children: back.label
242
+ })]
243
+ }) : null,
244
+ /* @__PURE__ */ jsx(EditorViewTitle, {
245
+ icon,
246
+ title,
247
+ subtitle,
248
+ actions,
249
+ bareIcon,
250
+ wrapTitle
251
+ }),
252
+ children
253
+ ]
254
+ });
255
+ }
256
+ /**
257
+ * A row that opens another sidebar view, such as Site style or Page settings
258
+ * on the page view, or a section's break. The icon can be a small drawing.
259
+ */
260
+ function EditorNavRow({ icon, title, description, onSelect, testId, wrapDescription = false }) {
261
+ return /* @__PURE__ */ jsxs("button", {
262
+ type: "button",
263
+ onClick: onSelect,
264
+ "data-testid": testId,
265
+ className: "flex w-full items-center gap-3 rounded-xl border bg-card px-3.5 py-3 text-left transition-colors hover:border-foreground/25 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&>svg:first-child]:h-[18px] [&>svg:first-child]:w-[18px]",
266
+ children: [
267
+ icon,
268
+ /* @__PURE__ */ jsxs("span", {
269
+ className: "min-w-0 flex-1",
270
+ children: [/* @__PURE__ */ jsx("span", {
271
+ className: "block text-sm font-semibold",
272
+ children: title
273
+ }), /* @__PURE__ */ jsx("span", {
274
+ className: cn$2("block text-[12.5px] text-muted-foreground", wrapDescription ? "leading-snug" : "truncate"),
275
+ children: description
276
+ })]
277
+ }),
278
+ /* @__PURE__ */ jsx(ChevronRight, {
279
+ className: "h-4 w-4 shrink-0 text-muted-foreground",
280
+ "aria-hidden": "true"
281
+ })
282
+ ]
283
+ });
284
+ }
285
+ function EditorViewTitle({ icon, title, subtitle, actions, bareIcon, wrapTitle }) {
286
+ return title ? /* @__PURE__ */ jsxs("div", {
287
+ className: "flex items-start gap-2.5",
288
+ children: [
289
+ icon ? /* @__PURE__ */ jsx("span", {
290
+ className: `flex h-[34px] w-[34px] shrink-0 items-center justify-center text-foreground ${bareIcon ? "" : "rounded-[10px] bg-muted [&_svg]:h-4 [&_svg]:w-4"}`,
291
+ "aria-hidden": "true",
292
+ children: icon
293
+ }) : null,
294
+ /* @__PURE__ */ jsxs("div", {
295
+ className: "flex min-h-[34px] min-w-0 flex-1 flex-col justify-center",
296
+ children: [/* @__PURE__ */ jsx("div", {
297
+ role: "heading",
298
+ "aria-level": 2,
299
+ className: `${wrapTitle ? "break-words" : "truncate"} text-base font-bold leading-5 tracking-[-0.005em]`,
300
+ children: title
301
+ }), subtitle ? /* @__PURE__ */ jsx("div", {
302
+ className: "mt-0.5 text-[12.5px] text-muted-foreground",
303
+ children: subtitle
304
+ }) : null]
305
+ }),
306
+ actions ? /* @__PURE__ */ jsx("div", {
307
+ className: "ml-auto flex shrink-0 items-center gap-0.5",
308
+ children: actions
309
+ }) : null
310
+ ]
311
+ }) : null;
312
+ }
313
+ //#endregion
314
+ //#region ../ui/src/mobile-dialog-changes.ts
315
+ function needsDiscardConfirmation(changes, observed) {
316
+ switch (changes.kind) {
317
+ case "read-only": return false;
318
+ case "unavailable": return observed.fieldChanged;
319
+ case "draft": return observed.initialDraft !== void 0 && observed.initialDraft !== JSON.stringify(changes.value);
320
+ }
321
+ }
322
+ /**
323
+ * Capture before the first edit, so loading defaults isn't mistaken for a person's change.
324
+ * `fieldChanged` is only for dialogs that can't share a draft: an untouched one closes without asking.
325
+ */
326
+ function useMobileDialogChanges(changes) {
327
+ const observed = React$1.useRef({
328
+ initialDraft: void 0,
329
+ fieldChanged: false
330
+ });
331
+ const capture = () => {
332
+ if (observed.current.initialDraft === void 0 && changes?.kind === "draft") observed.current.initialDraft = JSON.stringify(changes.value);
333
+ };
334
+ const fieldChanged = () => {
335
+ capture();
336
+ observed.current.fieldChanged = true;
337
+ };
338
+ const reset = () => {
339
+ observed.current = {
340
+ initialDraft: void 0,
341
+ fieldChanged: false
342
+ };
343
+ };
344
+ const needsConfirmation = () => changes ? needsDiscardConfirmation(changes, observed.current) : false;
345
+ return {
346
+ capture,
347
+ fieldChanged,
348
+ reset,
349
+ needsConfirmation
350
+ };
351
+ }
352
+ //#endregion
220
353
  //#region ../ui/src/scrollable-dialog-shell.tsx
221
- function ScrollableDialogShell({ header, footer, children, mobileFullscreen = false, desktopMaxWidth = "sm:max-w-3xl", desktopHeight = "sm:h-[80vh]", maxWidth = "max-w-3xl", height = "h-[80vh]", disableMotion = false, showCloseButton = true, className, headerClassName, bodyClassName, footerClassName, wrapContent, ...props }) {
222
- const portalContainer = usePortalContainer();
223
- const inner = /* @__PURE__ */ jsxs(Fragment$1, { children: [
354
+ function useDialogNavigation(props) {
355
+ const closeRef = React$1.useRef(null);
356
+ const [confirmDiscard, setConfirmDiscard] = React$1.useState(false);
357
+ const changes = useMobileDialogChanges(props.mobileChanges);
358
+ const leave = () => {
359
+ if (changes.needsConfirmation()) setConfirmDiscard(true);
360
+ else closeRef.current?.click();
361
+ };
362
+ const guardEscape = (event) => {
363
+ props.onEscapeKeyDown?.(event);
364
+ if (!event.defaultPrevented && props.mobileFullscreen) {
365
+ event.preventDefault();
366
+ leave();
367
+ }
368
+ };
369
+ const guardPointerOutside = (event) => {
370
+ props.onPointerDownOutside?.(event);
371
+ if (!event.defaultPrevented && changes.needsConfirmation()) {
372
+ event.preventDefault();
373
+ setConfirmDiscard(true);
374
+ }
375
+ };
376
+ const guardFocusOutside = (event) => {
377
+ props.onFocusOutside?.(event);
378
+ if (changes.needsConfirmation()) event.preventDefault();
379
+ };
380
+ return {
381
+ closeRef,
382
+ confirmDiscard,
383
+ setConfirmDiscard,
384
+ changes,
385
+ leave,
386
+ guardEscape,
387
+ guardPointerOutside,
388
+ guardFocusOutside
389
+ };
390
+ }
391
+ function DiscardDialog({ navigation }) {
392
+ if (!navigation.confirmDiscard) return null;
393
+ return /* @__PURE__ */ jsx(Dialog, {
394
+ open: true,
395
+ onOpenChange: navigation.setConfirmDiscard,
396
+ children: /* @__PURE__ */ jsxs(DialogContent, {
397
+ showCloseButton: false,
398
+ children: [
399
+ /* @__PURE__ */ jsx(DialogTitle, { children: "Discard these changes?" }),
400
+ /* @__PURE__ */ jsx(DialogDescription, { children: "Your changes won’t be saved." }),
401
+ /* @__PURE__ */ jsxs("div", {
402
+ className: "flex flex-col gap-2 sm:flex-row sm:justify-end",
403
+ children: [/* @__PURE__ */ jsx(Button, {
404
+ variant: "secondary",
405
+ onClick: () => navigation.setConfirmDiscard(false),
406
+ children: "Keep editing"
407
+ }), /* @__PURE__ */ jsx(Button, {
408
+ variant: "destructive",
409
+ onClick: () => {
410
+ navigation.setConfirmDiscard(false);
411
+ navigation.closeRef.current?.click();
412
+ },
413
+ children: "Discard changes"
414
+ })]
415
+ })
416
+ ]
417
+ })
418
+ });
419
+ }
420
+ function DialogFooter({ footer, mobileFullscreen, footerClassName }) {
421
+ if (!footer) return null;
422
+ return /* @__PURE__ */ jsx("div", {
423
+ "data-slot": "scrollable-dialog-footer",
424
+ className: cn$2("flex-shrink-0 border-t px-4 py-3 sm:px-6 sm:py-4", mobileFullscreen && "max-sm:pb-[max(0.75rem,env(safe-area-inset-bottom))] max-sm:[&_button]:w-full max-sm:[&_[data-dialog-dismiss]]:hidden", footerClassName),
425
+ children: /* @__PURE__ */ jsx("div", {
426
+ className: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
427
+ children: footer
428
+ })
429
+ });
430
+ }
431
+ const closeButtonClass = "ring-offset-background focus:ring-ring rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
432
+ function CloseButton({ options, navigation }) {
433
+ const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(X, {}), /* @__PURE__ */ jsx("span", {
434
+ className: "sr-only",
435
+ children: "Close"
436
+ })] });
437
+ if (!options.mobileFullscreen) return /* @__PURE__ */ jsx(DialogClose, {
438
+ "data-slot": "dialog-close",
439
+ className: closeButtonClass,
440
+ children: content
441
+ });
442
+ return /* @__PURE__ */ jsx("button", {
443
+ type: "button",
444
+ "data-slot": "dialog-close",
445
+ onClick: navigation.leave,
446
+ className: cn$2("hidden sm:inline-flex", closeButtonClass),
447
+ children: content
448
+ });
449
+ }
450
+ function DialogSections({ options, navigation }) {
451
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
452
+ options.mobileFullscreen ? /* @__PURE__ */ jsx("div", {
453
+ className: "shrink-0 sm:hidden",
454
+ children: /* @__PURE__ */ jsx(EditorViewHeader, { back: {
455
+ label: options.backLabel,
456
+ onBack: navigation.leave
457
+ } })
458
+ }) : null,
459
+ /* @__PURE__ */ jsx(DialogClose, {
460
+ ref: navigation.closeRef,
461
+ className: "hidden",
462
+ "aria-hidden": "true",
463
+ tabIndex: -1
464
+ }),
224
465
  /* @__PURE__ */ jsx("div", {
225
466
  "data-slot": "scrollable-dialog-header",
226
- className: cn$2("flex-shrink-0 border-b px-4 py-3 sm:px-6 sm:py-4", headerClassName),
467
+ className: cn$2("flex-shrink-0 border-b px-4 py-3 sm:px-6 sm:py-4", options.headerClassName),
227
468
  children: /* @__PURE__ */ jsxs("div", {
228
469
  className: "flex items-start justify-between gap-4",
229
- children: [header, showCloseButton && /* @__PURE__ */ jsxs(DialogClose, {
230
- "data-slot": "dialog-close",
231
- className: "ring-offset-background focus:ring-ring rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
232
- children: [/* @__PURE__ */ jsx(X, {}), /* @__PURE__ */ jsx("span", {
233
- className: "sr-only",
234
- children: "Close"
235
- })]
236
- })]
470
+ children: [options.header, options.showCloseButton !== false ? /* @__PURE__ */ jsx(CloseButton, {
471
+ options,
472
+ navigation
473
+ }) : null]
237
474
  })
238
475
  }),
239
476
  /* @__PURE__ */ jsx("div", {
240
477
  "data-slot": "scrollable-dialog-body",
241
- className: cn$2("flex-1 overflow-y-auto px-4 py-4 sm:px-6", bodyClassName),
242
- children
478
+ className: cn$2("min-h-0 flex-1 overflow-y-auto px-4 py-4 sm:px-6", options.bodyClassName),
479
+ children: options.children
243
480
  }),
244
- footer ? /* @__PURE__ */ jsx("div", {
245
- "data-slot": "scrollable-dialog-footer",
246
- className: cn$2("flex-shrink-0 border-t px-4 py-3 sm:px-6 sm:py-4", footerClassName),
247
- children: /* @__PURE__ */ jsx("div", {
248
- className: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
249
- children: footer
250
- })
251
- }) : null
481
+ /* @__PURE__ */ jsx(DialogFooter, { ...options }),
482
+ /* @__PURE__ */ jsx(DiscardDialog, { navigation })
252
483
  ] });
484
+ }
485
+ function shellClasses(options) {
486
+ return cn$2("bg-background flex flex-col", !options.disableMotion && "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 duration-200", options.mobileFullscreen ? cn$2("fixed inset-0 left-0 top-0 z-50 translate-x-0 translate-y-0 h-dvh w-full max-w-full rounded-none border-0 shadow-lg", "sm:inset-auto sm:top-[50%] sm:left-[50%] sm:w-full sm:max-w-[calc(100%-2rem)] sm:translate-x-[-50%] sm:translate-y-[-50%] sm:rounded-lg sm:border", options.desktopMaxWidth ?? "sm:max-w-3xl", options.desktopHeight ?? "sm:h-[80vh]") : cn$2("fixed top-[50%] left-[50%] z-50 translate-x-[-50%] translate-y-[-50%] w-full max-w-[calc(100%-2rem)] rounded-lg border shadow-lg", options.maxWidth ?? "max-w-3xl", options.height ?? "h-[80vh]"), options.className);
487
+ }
488
+ function ScrollableDialogShell(options) {
489
+ const portalContainer = usePortalContainer();
490
+ const navigation = useDialogNavigation(options);
491
+ const { header: _header, footer: _footer, children: _children, mobileFullscreen: _mobileFullscreen, backLabel: _backLabel, mobileChanges: _mobileChanges, desktopMaxWidth: _desktopMaxWidth, desktopHeight: _desktopHeight, maxWidth: _maxWidth, height: _height, disableMotion: _disableMotion, showCloseButton: _showCloseButton, className: _className, headerClassName: _headerClassName, bodyClassName: _bodyClassName, footerClassName: _footerClassName, wrapContent, ...props } = options;
492
+ const sections = /* @__PURE__ */ jsx(DialogSections, {
493
+ options,
494
+ navigation
495
+ });
253
496
  return /* @__PURE__ */ jsxs(DialogPortal, {
254
497
  "data-slot": "dialog-portal",
255
498
  container: portalContainer,
256
499
  children: [/* @__PURE__ */ jsx(DialogOverlay, {
257
500
  "data-slot": "dialog-overlay",
258
501
  className: overlayScrimClass
259
- }), /* @__PURE__ */ jsx(DialogContent, {
502
+ }), /* @__PURE__ */ jsx(DialogContent$1, {
260
503
  "data-slot": "scrollable-dialog-shell",
261
- className: cn$2("bg-background", !disableMotion && "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", mobileFullscreen ? cn$2("fixed inset-0 left-0 top-0 z-50 translate-x-0 translate-y-0", "h-svh w-full max-w-full rounded-none border-0 shadow-lg", !disableMotion && "duration-200", "sm:inset-auto sm:top-[50%] sm:left-[50%] sm:w-full sm:max-w-[calc(100%-2rem)] sm:translate-x-[-50%] sm:translate-y-[-50%] sm:rounded-lg sm:border", desktopMaxWidth, desktopHeight) : cn$2("fixed top-[50%] left-[50%] z-50 translate-x-[-50%] translate-y-[-50%]", "w-full max-w-[calc(100%-2rem)] rounded-lg border shadow-lg", !disableMotion && "duration-200", maxWidth, height), "flex flex-col", className),
262
504
  ...props,
263
- children: wrapContent ? wrapContent(inner) : inner
505
+ className: shellClasses(options),
506
+ onPointerDownCapture: (event) => {
507
+ navigation.changes.capture();
508
+ props.onPointerDownCapture?.(event);
509
+ },
510
+ onKeyDownCapture: (event) => {
511
+ navigation.changes.capture();
512
+ props.onKeyDownCapture?.(event);
513
+ },
514
+ onChangeCapture: (event) => {
515
+ navigation.changes.fieldChanged();
516
+ props.onChangeCapture?.(event);
517
+ },
518
+ onInputCapture: (event) => {
519
+ navigation.changes.fieldChanged();
520
+ props.onInputCapture?.(event);
521
+ },
522
+ onOpenAutoFocus: (event) => {
523
+ navigation.changes.reset();
524
+ props.onOpenAutoFocus?.(event);
525
+ },
526
+ onEscapeKeyDown: navigation.guardEscape,
527
+ onPointerDownOutside: navigation.guardPointerOutside,
528
+ onFocusOutside: navigation.guardFocusOutside,
529
+ children: wrapContent ? wrapContent(sections) : sections
264
530
  })]
265
531
  });
266
532
  }
267
533
  //#endregion
268
534
  //#region ../ui/src/scrollable-dialog.tsx
269
- function ScrollableDialogContent({ title, description, footer, children, mobileFullscreen, desktopMaxWidth, desktopHeight, maxWidth, height, disableMotion, showCloseButton, className, headerClassName, bodyClassName, footerClassName, ["aria-describedby"]: ariaDescribedBy, ...props }) {
535
+ function ScrollableDialogContent({ title, description, footer, children, desktopMaxWidth, desktopHeight, maxWidth, height, disableMotion, showCloseButton, className, headerClassName, bodyClassName, footerClassName, ["aria-describedby"]: ariaDescribedBy, ...props }) {
270
536
  const descriptionId = React$1.useId();
271
537
  return /* @__PURE__ */ jsx(ScrollableDialogShell, {
272
538
  "data-slot": "scrollable-dialog-content",
273
539
  "aria-describedby": ariaDescribedBy ?? (description ? descriptionId : void 0),
274
540
  header: /* @__PURE__ */ jsxs("div", {
275
541
  className: "flex flex-col gap-1.5",
276
- children: [/* @__PURE__ */ jsx(DialogTitle, {
542
+ children: [/* @__PURE__ */ jsx(DialogTitle$1, {
277
543
  "data-slot": "dialog-title",
278
544
  className: "text-lg leading-none font-semibold",
279
545
  children: title
280
- }), description ? /* @__PURE__ */ jsx(DialogDescription, {
546
+ }), description ? /* @__PURE__ */ jsx(DialogDescription$1, {
281
547
  id: descriptionId,
282
548
  "data-slot": "dialog-description",
283
549
  className: "text-muted-foreground text-sm",
@@ -285,7 +551,6 @@ function ScrollableDialogContent({ title, description, footer, children, mobileF
285
551
  }) : null]
286
552
  }),
287
553
  footer,
288
- mobileFullscreen,
289
554
  desktopMaxWidth,
290
555
  desktopHeight,
291
556
  maxWidth,
@@ -561,6 +826,62 @@ function progressPercentage(value, max) {
561
826
  return Math.min(Math.max(max > 0 ? value / max * 100 : 0, 0), 100);
562
827
  }
563
828
  //#endregion
829
+ //#region ../ui/src/preview-tile-group.tsx
830
+ const COLUMNS = {
831
+ 2: "grid-cols-2",
832
+ 4: "grid-cols-4",
833
+ 5: "grid-cols-5",
834
+ 6: "grid-cols-6",
835
+ 7: "grid-cols-7"
836
+ };
837
+ const DRAWING = {
838
+ swatch: "aspect-square",
839
+ tile: "aspect-square",
840
+ wide: "aspect-[3/1]"
841
+ };
842
+ const TILE_CLASS = [
843
+ "flex min-w-0 cursor-pointer flex-col items-stretch gap-1 rounded-md border border-border bg-background p-1 text-left transition-colors hover:bg-muted",
844
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
845
+ "disabled:cursor-not-allowed disabled:opacity-50"
846
+ ].join(" ");
847
+ const defaultColumns = (size) => size === "swatch" ? 6 : size === "wide" ? 2 : 4;
848
+ /**
849
+ * A single choice between things the owner has to see rather than read: a
850
+ * background, a section break in the site's colours, a photo shape. Each tile
851
+ * holds the caller's drawing, with its name under it or kept for screen
852
+ * readers only. Every tile in a row is the same height, however its name
853
+ * wraps. The chosen tile carries CHOSEN_OPTION_CLASS. It's a radio group:
854
+ * Tab reaches the chosen tile and the arrow keys move between tiles.
855
+ */
856
+ function PreviewTileGroup({ label, options, value, onValueChange, size = "tile", labels = size === "swatch" ? "hidden" : "visible", columns = defaultColumns(size), describedBy, className }) {
857
+ const hidden = labels === "hidden";
858
+ return /* @__PURE__ */ jsx(RadioGroup, {
859
+ "aria-label": label,
860
+ "aria-describedby": describedBy,
861
+ value: value ?? "",
862
+ onValueChange: (next) => {
863
+ const chosen = options.find((option) => option.value === next);
864
+ if (chosen) onValueChange(chosen.value);
865
+ },
866
+ className: cn$2("grid auto-rows-fr gap-1.5", COLUMNS[columns], className),
867
+ children: options.map((option) => /* @__PURE__ */ jsxs(RadioGroupItem, {
868
+ value: option.value,
869
+ disabled: option.disabled,
870
+ "aria-label": hidden ? option.label : void 0,
871
+ title: hidden ? option.label : void 0,
872
+ className: cn$2(TILE_CLASS, option.value === value && "border-primary bg-primary/5 ring-1 ring-primary hover:bg-primary/10"),
873
+ children: [/* @__PURE__ */ jsx("span", {
874
+ "aria-hidden": "true",
875
+ className: cn$2("block w-full overflow-hidden rounded-[5px] border border-black/10 [&>svg]:block [&>svg]:size-full", DRAWING[size]),
876
+ children: option.preview
877
+ }), hidden ? null : /* @__PURE__ */ jsx("span", {
878
+ className: "px-0.5 pb-0.5 text-xs font-medium leading-4 text-foreground",
879
+ children: option.label
880
+ })]
881
+ }, option.value))
882
+ });
883
+ }
884
+ //#endregion
564
885
  //#region ../theme-core/src/footer/mode.ts
565
886
  /** Reads only SDK footer intent; unrelated config and theme fields are not authorities. */
566
887
  function resolveSdkFooterMode(config) {
@@ -21885,10 +22206,10 @@ function LinkPopover({ editor, tone = "dark", initialItems, loadItems }) {
21885
22206
  }), /* @__PURE__ */ jsx(Dialog, {
21886
22207
  open,
21887
22208
  onOpenChange: setOpen,
21888
- children: /* @__PURE__ */ jsxs(DialogContent$1, {
22209
+ children: /* @__PURE__ */ jsxs(DialogContent, {
21889
22210
  "data-rb-document-toolbar": richTextDocumentOwner(editor),
21890
22211
  className: "max-h-[85vh] w-[calc(100vw-2rem)] max-w-2xl overflow-hidden overflow-y-auto",
21891
- children: [/* @__PURE__ */ jsxs(DialogHeader, { children: [/* @__PURE__ */ jsx(DialogTitle$1, { children: "Choose link" }), /* @__PURE__ */ jsx(DialogDescription$1, { children: "Select an internal page, an external URL, or a custom path." })] }), /* @__PURE__ */ jsxs("div", {
22212
+ children: [/* @__PURE__ */ jsxs(DialogHeader, { children: [/* @__PURE__ */ jsx(DialogTitle, { children: "Choose link" }), /* @__PURE__ */ jsx(DialogDescription, { children: "Select an internal page, an external URL, or a custom path." })] }), /* @__PURE__ */ jsxs("div", {
21892
22213
  className: "min-w-0 space-y-3",
21893
22214
  onKeyDown: applyOnEnter,
21894
22215
  children: [
@@ -30365,7 +30686,7 @@ function arrangementBlockControlsFor(input) {
30365
30686
  shownLookId: effective?.id ?? null
30366
30687
  }),
30367
30688
  mode: modeSwitch(input.block, selection.available, mode),
30368
- knobs: knobState ? knobControls(input.block.blockKind, knobState.exposure, knobState.knobs, input.content, effective?.structure.knobDescriptions) : [],
30689
+ knobs: knobState ? knobControls(input.block.blockKind, knobState.exposure, knobState.knobs, input.content, effective?.structure.knobDescriptions).map((control) => photoShapeControl(control, effective ? styleDefaultPhotoShape(effective.structure.mediaFrame, selection.style.skin) : null)) : [],
30369
30690
  headlineHint: knobState ? headlineHint(knobState.knobs, knobState.length) : null
30370
30691
  };
30371
30692
  }
@@ -30501,17 +30822,24 @@ function knobPresentation(facet, choices) {
30501
30822
  if (facet.target.kind === "content-field" && facet.target.boolean === true && choices.length === 2 && choices.includes("true") && choices.includes("false")) return "switch";
30502
30823
  return choices.length <= 3 ? "segments" : "menu";
30503
30824
  }
30825
+ /** The photo shape knob is drawn, so it carries the shape the style gives while the owner leaves it alone. */
30826
+ function photoShapeControl(control, styleShape) {
30827
+ if (control.kind !== "choice" || control.facetId !== "imageShape") return control;
30828
+ const { presentation: _presentation, options, ...rest } = control;
30829
+ return {
30830
+ ...rest,
30831
+ kind: "photo-shape",
30832
+ styleShape,
30833
+ options: options.flatMap((option) => isDrawnImageShape(option.value) ? [{
30834
+ value: option.value,
30835
+ label: option.label
30836
+ }] : [])
30837
+ };
30838
+ }
30504
30839
  function headlineHint(knobs, length) {
30505
30840
  const headline = knobs.titleSize;
30506
30841
  return headline?.kind === "clamped" && headline.reason === "length" && length !== null && length !== "short" ? { length } : null;
30507
30842
  }
30508
- /**
30509
- * Section backgrounds for an arrangement-Look style: the style's own surfaces
30510
- * by plain name, plus the page rhythm. A background is never a Look. A Look
30511
- * that paints its photo behind the text has no Background row, because the
30512
- * photo is the background. Any other Look offers the surfaces until the
30513
- * section has a photo, which replaces the colour choice.
30514
- */
30515
30843
  function arrangementBackgroundControlFor(input) {
30516
30844
  const selection = input.block.arrangementLookSelection;
30517
30845
  if (!selection || input.block.backgroundSupport.kind === "unsupported") return null;
@@ -30521,77 +30849,65 @@ function arrangementBackgroundControlFor(input) {
30521
30849
  draftPhoto: sectionPhotoPresence(input.content)
30522
30850
  });
30523
30851
  if (photo.kind === "arrangement" && photo.use === "behind") return null;
30524
- if (photo.kind === "arrangement" && photo.photo === "present") return {
30525
- kind: "held-by-photo",
30526
- photo: "section-photo"
30527
- };
30528
- const options = arrangementSurfaceOptions(selection.style);
30529
- const stored = storedSurfaceChoice(parseCanonicalSectionBackground({ ...input.content }), options);
30530
- return stored.kind === "held-by-photo" ? stored : {
30531
- kind: "surfaces",
30532
- selected: stored.selected,
30533
- options,
30534
- rhythm: options.find((option) => option.token === input.decidedBackground) ?? null
30535
- };
30536
- }
30537
- function arrangementSurfaceOptions(style) {
30538
- return Object.entries(style.surfaces).flatMap(([name, spec]) => {
30539
- const token = spec.kind === "token" && !spec.roleOnly ? parseBackgroundColorToken(spec.token) : null;
30540
- return token ? [{
30541
- name,
30542
- label: arrangementSurfaceLabel(name),
30543
- token
30544
- }] : [];
30852
+ const keepsPhoto = sectionKeepsPhotoBesideText(photo);
30853
+ const stored = storedSectionColour({ ...input.content });
30854
+ if (stored.kind === "photo" && !keepsPhoto) return { kind: "held-by-photo" };
30855
+ return groundsControl({
30856
+ block: input.block,
30857
+ style: selection.style,
30858
+ content: input.content,
30859
+ stored,
30860
+ keepsPhoto
30545
30861
  });
30546
30862
  }
30547
- /** Which surface the stored background shows as chosen, once the section has no photo of its own. */
30548
- function storedSurfaceChoice(stored, options) {
30863
+ function groundsControl(input) {
30864
+ const grounds = recommendedBackgrounds(input.style);
30865
+ const choices = sectionOwnerStyleChoices(input.content);
30866
+ return {
30867
+ kind: "grounds",
30868
+ grounds,
30869
+ keepsPhoto: input.keepsPhoto,
30870
+ colour: sectionColourChoice({
30871
+ groundName: storedGroundName(choices.ground),
30872
+ background: input.stored.kind === "colour" || input.stored.kind === "gradient" ? input.stored : null
30873
+ }, grounds),
30874
+ treatment: choices.treatment ?? null,
30875
+ finishes: input.style.finishes ?? null,
30876
+ colourTokens: resolveBackgroundCapability({
30877
+ block: input.block,
30878
+ imagePool: []
30879
+ }).colorTokens ?? []
30880
+ };
30881
+ }
30882
+ /** The owner's ground as stored: a name, null for a palette colour, undefined when nothing was stored. */
30883
+ function storedGroundName(ground) {
30884
+ return ground === void 0 ? void 0 : ground?.name ?? null;
30885
+ }
30886
+ /** The colour or photo a section's stored background paints. */
30887
+ function storedSectionColour(content) {
30888
+ const stored = parseCanonicalSectionBackground(content);
30549
30889
  switch (stored.kind) {
30550
- case "none": return {
30551
- kind: "surface",
30552
- selected: null
30553
- };
30554
- case "block-authored":
30555
- if (stored.background.type === "image" || stored.background.type === "video") return {
30556
- kind: "held-by-photo",
30557
- photo: "older-style-photo"
30558
- };
30559
- return {
30560
- kind: "surface",
30561
- selected: stored.background.type === "color" ? surfaceForToken(options, stored.background.color) : null
30562
- };
30563
- case "page-design-override": {
30564
- const override = stored.parsed.kind === "supported" ? stored.parsed.override : null;
30565
- return {
30566
- kind: "surface",
30567
- selected: override?.kind === "color" ? surfaceForToken(options, override.token) : null
30568
- };
30569
- }
30570
- }
30571
- }
30572
- const arrangementSurfaceLabels = {
30573
- base: "Page ground",
30574
- band: "Quiet band",
30575
- brand: "Brand colour",
30576
- deep: "Deepest tone",
30577
- inverse: "Opposite ground",
30578
- pop: "Pop colour"
30579
- };
30580
- function arrangementSurfaceLabel(name) {
30581
- return arrangementSurfaceLabels[name] ?? name.charAt(0).toUpperCase() + name.slice(1).replace(/[-_]+/g, " ");
30582
- }
30583
- function surfaceForToken(options, token) {
30584
- return options.find((option) => option.token === token)?.name ?? null;
30585
- }
30586
- //#endregion
30587
- //#region ../preview-next/src/client/preview/siteColourVariables.ts
30588
- /**
30589
- * The colour variables the site canvas paints with, for preview controls that
30590
- * sit outside it (the sidebar, popovers) and show the site's colours. They
30591
- * follow the theme the preview shows, so a palette change is reflected too.
30592
- */
30593
- function useSiteColourVariables() {
30594
- return usePreviewCompiledThemeOptional()?.colourVariables ?? null;
30890
+ case "none": return { kind: "none" };
30891
+ case "block-authored": return blockAuthoredPaint(stored.background);
30892
+ case "page-design-override": return overridePaint(stored);
30893
+ }
30894
+ }
30895
+ function blockAuthoredPaint(background) {
30896
+ if (background.type === "image" || background.type === "video") return { kind: "photo" };
30897
+ if (background.type === "gradient") return { kind: "gradient" };
30898
+ return background.type === "color" && background.color ? {
30899
+ kind: "colour",
30900
+ token: background.color
30901
+ } : { kind: "none" };
30902
+ }
30903
+ function overridePaint(stored) {
30904
+ const override = stored.parsed.kind === "supported" ? stored.parsed.override : null;
30905
+ if (override?.kind === "image") return { kind: "photo" };
30906
+ if (override?.kind === "gradient") return { kind: "gradient" };
30907
+ return override?.kind === "color" ? {
30908
+ kind: "colour",
30909
+ token: override.token
30910
+ } : { kind: "none" };
30595
30911
  }
30596
30912
  //#endregion
30597
30913
  //#region ../preview-next/src/client/blocks/BlockBackgroundChooser.tsx
@@ -30955,20 +31271,19 @@ function readBackgroundColorPaletteSnapshot() {
30955
31271
  /**
30956
31272
  * The block toolbar's state and actions on a style built from arrangement
30957
31273
  * Looks. Every change goes through the customise history the legacy controls
30958
- * use: Looks as set-look, modes as set-layout, knobs as set-block-facet and
30959
- * backgrounds as set-background. Null on a legacy style.
31274
+ * use: Looks as set-look, modes as set-layout, knobs as set-block-facet,
31275
+ * backgrounds as set-background and finishes as set-treatment. Null on a
31276
+ * legacy style.
30960
31277
  */
30961
31278
  function useArrangementToolbar(input) {
30962
31279
  const { designBlock, content } = input;
30963
- const backgrounds = usePreviewRenderBackgrounds();
30964
31280
  const controls = useMemo(() => designBlock ? arrangementBlockControlsFor({
30965
31281
  block: designBlock,
30966
31282
  content
30967
31283
  }) : null, [content, designBlock]);
30968
31284
  const background = designBlock ? arrangementBackgroundControlFor({
30969
31285
  block: designBlock,
30970
- content,
30971
- decidedBackground: backgrounds?.get(designBlock.blockId) ?? null
31286
+ content
30972
31287
  }) : null;
30973
31288
  const [modeNotice, setModeNotice] = useState(null);
30974
31289
  if (!designBlock || !controls) return null;
@@ -31007,12 +31322,43 @@ function useArrangementToolbar(input) {
31007
31322
  baseContentId
31008
31323
  });
31009
31324
  },
31010
- chooseSurface: (surfaceName) => {
31011
- const option = background?.kind === "surfaces" ? background.options.find((candidate) => candidate.name === surfaceName) : void 0;
31012
- if (surfaceName === null) input.chooseBackground({ kind: "default" });
31013
- else if (option) input.chooseBackground({
31014
- kind: "color",
31015
- token: option.token
31325
+ chooseGround: (name) => {
31326
+ if (background?.kind !== "grounds" || sectionColourRequestUnchanged(background.colour, name === null ? { kind: "style" } : {
31327
+ kind: "ground",
31328
+ name
31329
+ })) return;
31330
+ input.save({
31331
+ kind: "set-background",
31332
+ blockId: designBlock.blockId,
31333
+ override: name === null ? { kind: "default" } : {
31334
+ kind: "ground",
31335
+ name
31336
+ },
31337
+ baseContentId
31338
+ });
31339
+ },
31340
+ chooseColour: (token) => {
31341
+ if (background?.kind !== "grounds" || sectionColourRequestUnchanged(background.colour, {
31342
+ kind: "colour",
31343
+ token
31344
+ })) return;
31345
+ const offered = background.colourTokens.find((candidate) => candidate === token);
31346
+ if (offered) input.save({
31347
+ kind: "set-background",
31348
+ blockId: designBlock.blockId,
31349
+ override: {
31350
+ kind: "color",
31351
+ token: offered
31352
+ },
31353
+ baseContentId
31354
+ });
31355
+ },
31356
+ chooseTreatment: (treatment) => {
31357
+ input.save({
31358
+ kind: "set-treatment",
31359
+ blockId: designBlock.blockId,
31360
+ treatment,
31361
+ baseContentId
31016
31362
  });
31017
31363
  },
31018
31364
  editHeadline: () => input.openField(headlineFieldPath(designBlock.blockKind))
@@ -31076,7 +31422,8 @@ function ArrangementLookNote({ look, styleName }) {
31076
31422
  }), /* @__PURE__ */ jsx("span", { children: message })]
31077
31423
  });
31078
31424
  }
31079
- function ArrangementOptionsBody({ controls, styleName, background, onChooseKnob, onChooseSurface, onEditHeadline }) {
31425
+ function ArrangementOptionsBody({ controls, styleName, background, onChooseKnob, onEditHeadline }) {
31426
+ const shapes = controls.knobs.filter((control) => control.kind === "photo-shape");
31080
31427
  const choices = controls.knobs.filter((control) => control.kind === "choice");
31081
31428
  const flourishes = controls.knobs.filter((control) => control.kind === "text");
31082
31429
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
@@ -31084,17 +31431,20 @@ function ArrangementOptionsBody({ controls, styleName, background, onChooseKnob,
31084
31431
  length: controls.headlineHint.length,
31085
31432
  onEdit: onEditHeadline
31086
31433
  }) : null,
31087
- choices.length > 0 || background ? /* @__PURE__ */ jsxs("div", {
31434
+ shapes.map((control) => /* @__PURE__ */ jsx(PhotoShapeChoice, {
31435
+ control,
31436
+ styleName,
31437
+ onChoose: onChooseKnob
31438
+ }, control.facetId)),
31439
+ choices.length > 0 ? /* @__PURE__ */ jsx("div", {
31088
31440
  className: "space-y-3",
31089
- children: [choices.map((control) => /* @__PURE__ */ jsx(KnobChoice, {
31441
+ children: choices.map((control) => /* @__PURE__ */ jsx(KnobChoice, {
31090
31442
  control,
31091
31443
  styleName,
31092
31444
  onChoose: onChooseKnob
31093
- }, control.facetId)), background ? /* @__PURE__ */ jsx(SectionBackgroundChoice, {
31094
- background,
31095
- onChoose: onChooseSurface
31096
- }) : null]
31445
+ }, control.facetId))
31097
31446
  }) : null,
31447
+ background,
31098
31448
  flourishes.length > 0 ? /* @__PURE__ */ jsxs("div", {
31099
31449
  className: "space-y-3",
31100
31450
  children: [/* @__PURE__ */ jsx("p", {
@@ -31107,6 +31457,108 @@ function ArrangementOptionsBody({ controls, styleName, background, onChooseKnob,
31107
31457
  }) : null
31108
31458
  ] });
31109
31459
  }
31460
+ /**
31461
+ * "Photo shape": eight drawn tiles in two rows. While the style picks, its
31462
+ * shape shows chosen; a shape chosen here offers the way back to the default.
31463
+ */
31464
+ function PhotoShapeChoice({ control, styleName, onChoose }) {
31465
+ const styleDefault = control.value === "default";
31466
+ const shown = styleDefault ? control.styleShape : control.options.find((option) => option.value === control.value)?.value ?? null;
31467
+ return /* @__PURE__ */ jsxs("div", {
31468
+ className: "space-y-2",
31469
+ "data-photo-shape": "",
31470
+ children: [
31471
+ /* @__PURE__ */ jsx("div", {
31472
+ className: "text-sm font-semibold leading-5 text-foreground",
31473
+ children: control.label
31474
+ }),
31475
+ /* @__PURE__ */ jsx(PreviewTileGroup, {
31476
+ label: control.label,
31477
+ size: "tile",
31478
+ columns: 4,
31479
+ value: shown,
31480
+ onValueChange: (shape) => {
31481
+ if (shape !== control.value) onChoose(control, shape);
31482
+ },
31483
+ options: control.options.map((option) => ({
31484
+ value: option.value,
31485
+ label: option.label,
31486
+ preview: /* @__PURE__ */ jsx(PhotoShapeDrawing, { shape: option.value })
31487
+ }))
31488
+ }),
31489
+ styleDefault ? /* @__PURE__ */ jsx("p", {
31490
+ className: "text-[12.5px] text-muted-foreground",
31491
+ children: "Your site style picks this shape."
31492
+ }) : /* @__PURE__ */ jsxs("p", {
31493
+ className: "text-[12.5px] leading-snug text-muted-foreground",
31494
+ children: [
31495
+ "Chosen for this section.",
31496
+ " ",
31497
+ /* @__PURE__ */ jsx(Button, {
31498
+ variant: "link",
31499
+ size: "sm",
31500
+ className: "h-auto p-0 text-[12.5px]",
31501
+ onClick: () => onChoose(control, "default"),
31502
+ children: "Use default shape"
31503
+ })
31504
+ ]
31505
+ }),
31506
+ control.notOffered ? /* @__PURE__ */ jsxs("p", {
31507
+ className: "text-[11px] text-muted-foreground",
31508
+ children: [
31509
+ control.notOffered.by === "style" ? styleName : "This Look",
31510
+ " doesn’t offer ",
31511
+ control.notOffered.choice,
31512
+ ", so it shows ",
31513
+ control.notOffered.shows,
31514
+ "."
31515
+ ]
31516
+ }) : null
31517
+ ]
31518
+ });
31519
+ }
31520
+ /** A plain hillside photo cut to a shape, as the catalogue draws it. */
31521
+ function PhotoShapeDrawing({ shape }) {
31522
+ const { aspectRatio, ...cut } = photoShapeDrawing(shape);
31523
+ return /* @__PURE__ */ jsx("span", {
31524
+ className: "flex h-full w-full items-center justify-center bg-muted/40 p-[12%]",
31525
+ children: /* @__PURE__ */ jsx("span", {
31526
+ className: "block max-h-full overflow-hidden",
31527
+ style: {
31528
+ ...cut,
31529
+ aspectRatio: aspectRatio ?? "1 / 1",
31530
+ height: "100%"
31531
+ },
31532
+ children: /* @__PURE__ */ jsxs("svg", {
31533
+ viewBox: "0 0 100 100",
31534
+ preserveAspectRatio: "xMidYMid slice",
31535
+ className: "block h-full w-full",
31536
+ children: [
31537
+ /* @__PURE__ */ jsx("rect", {
31538
+ width: "100",
31539
+ height: "100",
31540
+ fill: "#e9d9bf"
31541
+ }),
31542
+ /* @__PURE__ */ jsx("circle", {
31543
+ cx: "68",
31544
+ cy: "34",
31545
+ r: "10",
31546
+ fill: "#e8b886"
31547
+ }),
31548
+ /* @__PURE__ */ jsx("path", {
31549
+ d: "M0 70 C20 54 40 52 60 62 S90 66 100 58 V100 H0 Z",
31550
+ fill: "#72765c",
31551
+ opacity: "0.75"
31552
+ }),
31553
+ /* @__PURE__ */ jsx("path", {
31554
+ d: "M0 82 C24 72 48 74 70 82 S94 86 100 80 V100 H0 Z",
31555
+ fill: "#5b5f48"
31556
+ })
31557
+ ]
31558
+ })
31559
+ })
31560
+ });
31561
+ }
31110
31562
  function HeadlineHint({ length, onEdit }) {
31111
31563
  return /* @__PURE__ */ jsxs("p", {
31112
31564
  className: "flex gap-1.5 rounded-md bg-muted/60 p-2 text-xs leading-4",
@@ -31255,70 +31707,6 @@ function KnobText({ control, onChange }) {
31255
31707
  })
31256
31708
  ] });
31257
31709
  }
31258
- const STYLE_BACKGROUND_VALUE = "style";
31259
- const surfaceValue = (name) => `surface:${name}`;
31260
- /**
31261
- * The section background as one menu row. Each choice shows the colour it
31262
- * paints in this site's palette; the style's own choice shows the colour the
31263
- * page rhythm gives this section.
31264
- */
31265
- function SectionBackgroundChoice({ background, onChoose }) {
31266
- const id = React.useId();
31267
- const colours = useSiteColourVariables();
31268
- if (background.kind === "held-by-photo") return /* @__PURE__ */ jsx(LookControlRow, {
31269
- label: "Background",
31270
- labelId: `${id}-label`,
31271
- description: null,
31272
- children: /* @__PURE__ */ jsx("span", {
31273
- className: "text-right text-xs text-muted-foreground",
31274
- children: background.photo === "section-photo" ? "Uses your style’s background while the section has a photo" : "Uses the section’s photo"
31275
- })
31276
- });
31277
- const rhythmColour = background.rhythm ? siteColourCss(colours, background.rhythm.token) : null;
31278
- return /* @__PURE__ */ jsx(LookControlRow, {
31279
- label: "Background",
31280
- labelId: `${id}-label`,
31281
- description: null,
31282
- children: /* @__PURE__ */ jsxs(Select, {
31283
- value: background.selected === null ? STYLE_BACKGROUND_VALUE : surfaceValue(background.selected),
31284
- onValueChange: (value) => onChoose(value === STYLE_BACKGROUND_VALUE ? null : value.slice(surfaceValue("").length)),
31285
- children: [/* @__PURE__ */ jsx(SelectTrigger, {
31286
- size: "sm",
31287
- "aria-labelledby": `${id}-label`,
31288
- className: lookMenuTriggerClass,
31289
- children: /* @__PURE__ */ jsx(SelectValue, {})
31290
- }), /* @__PURE__ */ jsxs(SelectContent, {
31291
- align: "end",
31292
- children: [/* @__PURE__ */ jsxs(SelectItem, {
31293
- value: STYLE_BACKGROUND_VALUE,
31294
- children: [/* @__PURE__ */ jsx(BackgroundSwatch, {
31295
- colour: rhythmColour,
31296
- fallback: `linear-gradient(135deg, ${siteColourCss(colours, "background")} 50%, ${siteColourCss(colours, "muted")} 50%)`
31297
- }), /* @__PURE__ */ jsx("span", {
31298
- className: "min-w-0 truncate",
31299
- children: "Chosen by your site style"
31300
- })]
31301
- }), background.options.map((option) => /* @__PURE__ */ jsxs(SelectItem, {
31302
- value: surfaceValue(option.name),
31303
- children: [/* @__PURE__ */ jsx(BackgroundSwatch, {
31304
- colour: siteColourCss(colours, option.token),
31305
- fallback: null
31306
- }), /* @__PURE__ */ jsx("span", {
31307
- className: "min-w-0 truncate",
31308
- children: option.label
31309
- })]
31310
- }, option.name))]
31311
- })]
31312
- })
31313
- });
31314
- }
31315
- function BackgroundSwatch({ colour, fallback }) {
31316
- return /* @__PURE__ */ jsx("span", {
31317
- "aria-hidden": "true",
31318
- className: "size-4 shrink-0 rounded-[5px] border border-border",
31319
- style: colour ? { backgroundColor: colour } : fallback ? { backgroundImage: fallback } : void 0
31320
- });
31321
- }
31322
31710
  /** Matches the sidebar's field labels, so Look controls read as part of the form. */
31323
31711
  const lookControlLabelClass = "mb-1.5 text-sm font-semibold leading-5 text-foreground";
31324
31712
  /** The chosen value truncates rather than overflowing a narrow sidebar. */
@@ -31756,7 +32144,6 @@ function useBlockToolbar(input) {
31756
32144
  save: (action) => {
31757
32145
  applyAction(action, { runtimeContent: values });
31758
32146
  },
31759
- chooseBackground: open,
31760
32147
  openField
31761
32148
  });
31762
32149
  const cycleSdk = (direction) => cycleSdkLook(controls, direction);
@@ -31893,4 +32280,4 @@ function PageSectionToolbar({ blockId, content }) {
31893
32280
  ] });
31894
32281
  }
31895
32282
  //#endregion
31896
- export { Switch as A, insertOrReplaceRichTextImage as C, InlineTextEditor as D, parseRichTextDoc as E, Surface as F, surfaceVariants as I, emitMediaCropDebug as L, SegmentedControl as M, ScrollableDialogContent as N, decideDocumentReplacement as O, ScrollableDialogShell as P, resolveVideoSelectionIntentForMediaField as R, getRichTextImagePositionFromTarget as S, EMPTY_DOC as T, getUnresolvedRichTextImageWarnings as _, ArrangementOptionsBody as a, MediaPickerMini as b, BackgroundChooser as c, gradientLabel as d, readBackgroundColorPaletteSnapshot as f, useRichTextImageProjection as g, arrangementLookNameFor as h, ArrangementLookNote as i, ContentSpinner as j, resolveSdkFooterMode as k, BackgroundPreviewSwatch as l, arrangementBlockControlsFor as m, pageSectionIdFromBlockId as n, lookIsAutomatic as o, useSiteColourVariables as p, BlockToolbar as r, useArrangementToolbar as s, PageSectionToolbar as t, formatTokenLabel as u, MediaEditor as v, useRichTextEditor as w, RichTextEditorSurface as x, MediaPickerMiniDialog as y, isSvgMimeType as z };
32283
+ export { Switch as A, resolveVideoSelectionIntentForMediaField as B, useRichTextEditor as C, decideDocumentReplacement as D, InlineTextEditor as E, EditorNavRow as F, EditorViewHeader as I, Surface as L, SegmentedControl as M, ScrollableDialogContent as N, resolveSdkFooterMode as O, ScrollableDialogShell as P, surfaceVariants as R, insertOrReplaceRichTextImage as S, parseRichTextDoc as T, isSvgMimeType as V, MediaEditor as _, ArrangementOptionsBody as a, RichTextEditorSurface as b, BackgroundChooser as c, gradientLabel as d, readBackgroundColorPaletteSnapshot as f, getUnresolvedRichTextImageWarnings as g, useRichTextImageProjection as h, ArrangementLookNote as i, ContentSpinner as j, PreviewTileGroup as k, BackgroundPreviewSwatch as l, arrangementLookNameFor as m, pageSectionIdFromBlockId as n, lookIsAutomatic as o, arrangementBlockControlsFor as p, BlockToolbar as r, useArrangementToolbar as s, PageSectionToolbar as t, formatTokenLabel as u, MediaPickerMiniDialog as v, EMPTY_DOC as w, getRichTextImagePositionFromTarget as x, MediaPickerMini as y, emitMediaCropDebug as z };