@riverbankcms/sdk 0.170.0 → 0.171.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/_dts/{BlocksIslandsHydrator-B2i5CY_X.d.ts → BlocksIslandsHydrator-xuFmD41p.d.ts} +1 -1
  3. package/dist/_dts/{Page-BSZjbeRK.d.ts → Page-4fzXy8H9.d.ts} +13 -11
  4. package/dist/_dts/{SdkPreviewMode-BZpPBMcu.d.ts → SdkPreviewMode-BlHgMsc8.d.ts} +4 -3
  5. package/dist/_dts/{client-x82SZgwK.d.ts → client-BPoU758C.d.ts} +32 -1
  6. package/dist/_dts/{content-types-CODkxsZy.d.ts → content-types-TnkhoSls.d.ts} +3 -3
  7. package/dist/_dts/{contracts-Lyfhmbjf.d.ts → contracts-7wrMA79U.d.ts} +5 -3
  8. package/dist/_dts/{footerPageOutline-BShG2GAV.d.ts → footerPageOutline-DaOsPQ_Q.d.ts} +6 -6
  9. package/dist/_dts/{generatePageMetadata-DLhUW3xK.d.ts → generatePageMetadata-D9aDEzKK.d.ts} +2 -2
  10. package/dist/_dts/{index-BisbMZTW.d.ts → index-585vn6qb.d.ts} +72 -36
  11. package/dist/_dts/{index-B7Mq5M6P.d.ts → index-CZKSUcDs.d.ts} +4 -4
  12. package/dist/_dts/{index-B82pqQAC.d.ts → index-Cbw0IiY7.d.ts} +2 -2
  13. package/dist/_dts/{index-DXc_ewhR.d.ts → index-ChNbrcgD.d.ts} +1 -1
  14. package/dist/_dts/{index-C3rMEJ5a.d.ts → index-DDKJfaLY.d.ts} +2 -2
  15. package/dist/_dts/{index-CCugONHM.d.ts → index-DNCDENic.d.ts} +1 -1
  16. package/dist/_dts/{index-CstY6ZMa.d.ts → index-W9R3Bnf2.d.ts} +3 -3
  17. package/dist/_dts/{loadContent-BoqtbbhP.d.ts → loadContent-DPyNAJym.d.ts} +7 -7
  18. package/dist/_dts/{request-CJ_ClHLv.d.ts → request-jXTRN1Y4.d.ts} +3554 -1370
  19. package/dist/_dts/{resolveBlockData-DFExYkJ4.d.ts → resolveBlockData-BbvE-gsZ.d.ts} +5 -5
  20. package/dist/_dts/{resolvePageContent-D-WvpC_d.d.ts → resolvePageContent-BBgih00D.d.ts} +2 -2
  21. package/dist/_dts/{runtime-BY8DQBbT.d.ts → runtime-BEoNgYbd.d.ts} +2 -2
  22. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  23. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  24. package/dist/_dts/sdk/src/client.d.ts +7 -7
  25. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  26. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  27. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  28. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  29. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  30. package/dist/_dts/sdk/src/data/types.d.ts +2 -2
  31. package/dist/_dts/sdk/src/index.d.ts +8 -8
  32. package/dist/_dts/sdk/src/manifest/index.d.ts +7 -7
  33. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  34. package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
  35. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  36. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  37. package/dist/_dts/sdk/src/page-converter/index.d.ts +4 -4
  38. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  39. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  40. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  41. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  42. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  43. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  44. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  45. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  46. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
  47. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  48. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  49. package/dist/_dts/sdk/src/rendering/server.d.ts +3 -2
  50. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  51. package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
  52. package/dist/_dts/sdk/src/server.d.ts +5 -5
  53. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  54. package/dist/_dts/sdk/src/theme/index.d.ts +4740 -3
  55. package/dist/_dts/{types-CbjK5ZLy.d.ts → types-BXuVxDYo.d.ts} +2 -2
  56. package/dist/_dts/{types-CpuxuS40.d.ts → types-DEAKoDNi.d.ts} +3 -3
  57. package/dist/_dts/{types-990t4t99.d.ts → types-kWvBwYK6.d.ts} +7 -7
  58. package/dist/_dts/{validation-BN95LiS0.d.ts → validation-BAO0_ntM.d.ts} +17 -17
  59. package/dist/client/{BlocksIslandsHydrator-B1Tkg-ZW.mjs → BlocksIslandsHydrator-DfMsMIej.mjs} +17 -17
  60. package/dist/client/{BookingMailingListNote-Br1VyHkP.mjs → BookingMailingListNote-aaSicywS.mjs} +7 -7
  61. package/dist/client/{StepIndicator-BK0GEDoP.mjs → BookingPanelArrangement-OgftZ9QC.mjs} +16 -4
  62. package/dist/client/{BookingQuestionFields-LLGCWjvU.mjs → BookingQuestionFields-BlaCItmH.mjs} +5 -5
  63. package/dist/client/{CalendarNavigationChevron-CH7z2m47.mjs → CalendarNavigationChevron-iMWrY6Hz.mjs} +7 -7
  64. package/dist/client/{CheckboxChoice-W_uiRgDK.mjs → CheckboxChoice-B65wFjqx.mjs} +1 -1
  65. package/dist/client/{DemoBookingPortalAccess-Cilv5zdS.mjs → DemoBookingPortalAccess-BCumOTLY.mjs} +7 -7
  66. package/dist/client/{EventCalendar.client-LXUHJEi7.mjs → EventCalendar.client-kh7mkYnW.mjs} +9 -9
  67. package/dist/client/{EventCombined.client-DpugEJLB.mjs → EventCombined.client-DXD5i0Ar.mjs} +8 -8
  68. package/dist/client/{EventEmbeddedCheckoutStep-Cf-HRHtb.mjs → EventEmbeddedCheckoutStep-DKKRCuta.mjs} +1 -1
  69. package/dist/client/{EventItem-gFuZn-dE.mjs → EventItem-BnwcoFQN.mjs} +10 -7
  70. package/dist/client/{EventListWeekNavigation-D-kLg1jQ.mjs → EventListWeekNavigation-DuG6z02f.mjs} +1 -1
  71. package/dist/client/{EventListing.client-BNACUaxV.mjs → EventListing.client-18yfHrcr.mjs} +3 -3
  72. package/dist/client/{EventListing.view-CtVfe3VG.mjs → EventListing.view-BM7rTVSL.mjs} +42 -396
  73. package/dist/client/{EventRegistrationPayment-CqH3hE-k.mjs → EventRegistrationPayment-D5J3DR0x.mjs} +13 -13
  74. package/dist/client/{LocationMapActions-BFp2uQQQ.mjs → LocationMapActions-QahdLtdE.mjs} +2 -2
  75. package/dist/client/{MapDrawingSvg-DDWfmgpA.mjs → MapDrawingSvg-Dy6UMuIw.mjs} +1 -1
  76. package/dist/client/{Page-PW4Ojv9r.mjs → Page-DH2sm4Cf.mjs} +2696 -2426
  77. package/dist/client/{ProtectedSubmitButton-C3H26pN9.mjs → ProtectedSubmitButton-AOUzjDK9.mjs} +1 -1
  78. package/dist/client/StepIndicator-CsRlU46Y.mjs +894 -0
  79. package/dist/client/{TabBarFragment-DkVKtK5a.mjs → TabBarFragment-CsAufYwT.mjs} +1 -1
  80. package/dist/client/{ThemedButton-BdnEwA38.mjs → ThemedButton-BMDHwnM6.mjs} +1 -1
  81. package/dist/client/{accessibleSurfaces-_7jkuinl.mjs → accessibleSurfaces-Bbn1-jJ8.mjs} +52 -2
  82. package/dist/client/{accordion-DMItWylU.mjs → accordion-DT4MD3Np.mjs} +1 -1
  83. package/dist/client/{booking-form.client-wd71DG19.mjs → booking-form.client-DdqNQNCa.mjs} +79 -42
  84. package/dist/client/{bookingForm-Cyr2qeS1.mjs → bookingForm-CLN396HU.mjs} +4 -4
  85. package/dist/client/bookings.mjs +6 -6
  86. package/dist/client/boxStyleClassNames-iLF_3KX9.mjs +369 -0
  87. package/dist/client/{carousel-B5-Hzzif.mjs → carousel-DFLomCGm.mjs} +2 -2
  88. package/dist/client/{carousel.client-eSSr1oYA.mjs → carousel.client-YF4mUK5t.mjs} +1 -1
  89. package/dist/client/{cart-wlRXnOjO.mjs → cart-BozMM5NK.mjs} +3 -3
  90. package/dist/client/{cart.client-CfpnxTUZ.mjs → cart.client-CqOOxPbW.mjs} +1 -1
  91. package/dist/client/{checkout-Dnu9W8IA.mjs → checkout-CTWF5nbB.mjs} +3 -3
  92. package/dist/client/{checkout.client-ovtyXyn0.mjs → checkout.client-CpqxN8e0.mjs} +1 -1
  93. package/dist/client/{checkoutUrls-CY8qywXl.mjs → checkoutUrls-Ccg6yfjq.mjs} +1 -1
  94. package/dist/client/client.mjs +640 -218
  95. package/dist/client/{context-Xhf81Q-c.mjs → context-Dzjv2CpA.mjs} +10 -1
  96. package/dist/client/{creditProducts-CMOmhWm2.mjs → creditProducts-BTRX4edc.mjs} +54 -23
  97. package/dist/client/{cta-CfuyGqXL.mjs → cta-pzQkBLgS.mjs} +2 -2
  98. package/dist/client/{dateFormatting-Bv6kjUW3.mjs → dateFormatting-BfurxGwg.mjs} +1 -1
  99. package/dist/client/{demoPortalMagicLink-DQtwf_s2.mjs → demoPortalMagicLink-D0dcPsRE.mjs} +1 -1
  100. package/dist/client/{display-DDNmyb0z.mjs → display-Cl6mgSJa.mjs} +3186 -81
  101. package/dist/client/{enhanceHeaderSection-D7gRy-pL.mjs → enhanceHeaderSection-CJCl0HJC.mjs} +4 -4
  102. package/dist/client/{event-details.client-DZZaoCUc.mjs → event-details.client-Pn9Kxh3I.mjs} +3 -2
  103. package/dist/client/{event-registration.client-CLBdHUfd.mjs → event-registration.client-BAmBdWXE.mjs} +48 -34
  104. package/dist/client/{eventCalendar-B4VbblGN.mjs → eventCalendar-C5Bh2L8L.mjs} +4 -4
  105. package/dist/client/{eventCombined-e2AvbA0u.mjs → eventCombined-dELKxxIe.mjs} +4 -4
  106. package/dist/client/{eventDetails-DIJYMzVg.mjs → eventDetails-Do9D_fJ_.mjs} +2 -2
  107. package/dist/client/{eventListing-C0bpAR1t.mjs → eventListing-B2HTUWLq.mjs} +4 -4
  108. package/dist/client/{eventRegistration-DyseP_sY.mjs → eventRegistration-ByOJnqGc.mjs} +4 -4
  109. package/dist/client/{form-Cfl8d6qc.mjs → form-DX70QG-J.mjs} +3 -3
  110. package/dist/client/{form.client-D3_RF29v.mjs → form.client-CJoqBrS6.mjs} +5 -5
  111. package/dist/client/{form.parts-DWLf_3PF.mjs → form.parts-DTof9pL3.mjs} +3 -3
  112. package/dist/client/{formatDate-BGlhrmhF.mjs → formatDate-Cjouxh4Y.mjs} +1 -1
  113. package/dist/client/gifting/client.mjs +3 -3
  114. package/dist/client/{headerSection-CyNGt23J.mjs → headerSection-CJuPX_1K.mjs} +2 -2
  115. package/dist/client/{newsletter-form.client-IfLup4o0.mjs → newsletter-form.client-CqzNjOft.mjs} +6 -6
  116. package/dist/client/{newsletter-form.parts-DDD-LRyW.mjs → newsletter-form.parts-DjJsFms2.mjs} +2 -2
  117. package/dist/client/{newsletterForm-Bn7HVbuq.mjs → newsletterForm-D1MHoPbh.mjs} +3 -3
  118. package/dist/client/{noop-B_f7RqLD.mjs → noop-poI1m2yW.mjs} +69 -2
  119. package/dist/client/portal/client.mjs +294 -48
  120. package/dist/client/{product-detail.client-BXeLqkCE.mjs → product-detail.client-DOQ7El1d.mjs} +1 -1
  121. package/dist/client/{product-list.client-C627X8DQ.mjs → product-list.client-CmxOZbzL.mjs} +1 -1
  122. package/dist/client/{productDetail-B-K_hd7Y.mjs → productDetail-BN3zv5sa.mjs} +3 -3
  123. package/dist/client/{productList-BNZAsfaP.mjs → productList-GN_Id4bF.mjs} +3 -3
  124. package/dist/client/{propsDecoder-Dc8j5i79.mjs → propsDecoder-BdmzM3D5.mjs} +8 -4
  125. package/dist/client/{registry.server-CBg2M6Uj.mjs → registry.server-BOyra8CA.mjs} +1015 -926
  126. package/dist/client/rendering/client.mjs +57 -32
  127. package/dist/client/rendering/islands.mjs +1 -1
  128. package/dist/client/rendering.mjs +1956 -191
  129. package/dist/client/{richText-coerce-BTurYEao.mjs → richText-coerce-CtoGLZ_e.mjs} +1 -1
  130. package/dist/client/{routeIslandApiConfig-DFjRKvzM.mjs → routeIslandApiConfig-DnaJ8PQc.mjs} +1 -1
  131. package/dist/client/{runtimeResponse-D2LT--Gj.mjs → runtimeResponse-B1-cyLXt.mjs} +1 -1
  132. package/dist/client/{runtimeResponse-BGU8sMZY.mjs → runtimeResponse-BN8PoIVp.mjs} +1 -1
  133. package/dist/client/{shop-PgmiVKSV.mjs → shop-LjBLDBqF.mjs} +3 -3
  134. package/dist/client/{shop-commerce-DkgvZAQS.mjs → shop-commerce-B8aZTdRJ.mjs} +13 -13
  135. package/dist/client/{shop-commerce-store-D9CHihQv.mjs → shop-commerce-store-C1FtHYl7.mjs} +1 -1
  136. package/dist/client/{shop.client-DDFRt6OU.mjs → shop.client-D0qZ3KZp.mjs} +13 -13
  137. package/dist/client/{shop.interactive-BH0xDlMF.mjs → shop.interactive-DAKyWK1B.mjs} +89 -19
  138. package/dist/client/{shopShared-BEfD0e4m.mjs → shopShared-CztcSe9i.mjs} +2 -2
  139. package/dist/client/spam-protection.mjs +1 -1
  140. package/dist/client/{timetableModel-GsDrJxxw.mjs → timetableModel-D1jDTbms.mjs} +11 -11
  141. package/dist/client/{types-5fOsPIpL.mjs → types-B0hJldSt.mjs} +2 -0
  142. package/dist/client/{useAvailableSlots-GP8tnAVW.mjs → useAvailableSlots-ByHedoBi.mjs} +4 -8
  143. package/dist/client/{useDiscountApply-Cq07nTyG.mjs → useDiscountApply-CHGYDxdM.mjs} +2 -2
  144. package/dist/client/{useDiscountCodeUi-CD82QX5i.mjs → useDiscountCodeUi-Dew9UAEy.mjs} +1 -1
  145. package/dist/client/{useEventPagination-DGl4Jeuz.mjs → useEventPagination-BpC7-ksE.mjs} +7 -7
  146. package/dist/client/{view-oToSpu1N.mjs → view-BxeiAL3c.mjs} +121 -28
  147. package/dist/client/{view-CgComegl.mjs → view-ShYH3WXh.mjs} +3 -3
  148. package/dist/preview-next/before-render.mjs +33 -13
  149. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-8-qtHjpb.mjs → EventEmbeddedCheckoutStep-CKe4cjZ4.mjs} +1 -1
  150. package/dist/preview-next/client/{LocationPickerEnvironment-CwxRbAs2.mjs → LocationPickerEnvironment-lW2aLGWd.mjs} +1 -1
  151. package/dist/preview-next/client/{MapLibreEditMap-CKjYUp_E.mjs → MapLibreEditMap-C9InQJpd.mjs} +2 -2
  152. package/dist/preview-next/client/{ArrangementLookControls-DJQrgD5f.mjs → PageSectionToolbar-DsSqwrMS.mjs} +392 -11
  153. package/dist/preview-next/client/{PreviewEditorSidebar-DWU6X6Y-.mjs → PreviewEditorSidebar-BEEWzXnU.mjs} +3264 -3199
  154. package/dist/preview-next/client/{PreviewEditorUI-C-X0ptC3.mjs → PreviewEditorUI-C86Out4V.mjs} +5 -6
  155. package/dist/preview-next/client/{PreviewShell-C1WUNsj9.mjs → PreviewShell-CBWYjBvQ.mjs} +20 -10
  156. package/dist/preview-next/client/{SdkPreviewModeRuntime-Cs2QFT7k.mjs → SdkPreviewModeRuntime-o-mVqWLx.mjs} +88 -394
  157. package/dist/preview-next/client/{SiteChromeCustomizeButton-CcZ_ERvZ.mjs → SiteChromeCustomizeButton-H_ciMNHA.mjs} +1155 -330
  158. package/dist/preview-next/client/{ThemedButton-BQU45t-E.mjs → ThemedButton-CKYjeU_M.mjs} +2 -0
  159. package/dist/preview-next/client/{lucide-react-DbC1o6_9.mjs → lucide-react-DygTyy7K.mjs} +1 -1
  160. package/dist/preview-next/client/{previewAssistantSlot-CSs9S8wr.mjs → previewAssistantSlot-CuOcsG_N.mjs} +3558 -2230
  161. package/dist/preview-next/client/{previewChromeRoot-B2OTurZH.mjs → previewChromeRoot-DPeV7KaP.mjs} +1 -1
  162. package/dist/preview-next/client/runtime.mjs +3 -3
  163. package/dist/preview-next/client/{sdk-runtime-CBIwYDyi.mjs → sdk-runtime-zTTFZ4MM.mjs} +2 -2
  164. package/dist/preview-next/client/{useAutosaveStatus-DoWvGNPA.mjs → useAutosaveStatus-DNA1Q4L1.mjs} +2 -2
  165. package/dist/preview-next/client/{useBlockCustomizeControls-WOs8Atje.mjs → useOpenBlockForSetup-BdnMlHC6.mjs} +28 -3
  166. package/dist/preview-next/container-responsive.css +43 -0
  167. package/dist/preview-next/keepAlive.mjs +1 -1
  168. package/dist/preview-next/middleware.mjs +1 -1
  169. package/dist/preview-next/{route-contract-BLYaenrK.mjs → route-contract-CtSgU8UZ.mjs} +547 -188
  170. package/dist/server/{Block.shared-Dx4j9CJT.mjs → Block.shared-ifgaBglp.mjs} +4 -4
  171. package/dist/server/{ThemeScopeCore-B0IfeNNZ.mjs → ThemeScopeCore-DGDOH6OU.mjs} +3 -3
  172. package/dist/server/{accessibleSurfaces-D0q5tLSW.mjs → accessibleSurfaces-BuPNCWAK.mjs} +52 -2
  173. package/dist/server/bindings-CiYpie1M.mjs +1802 -0
  174. package/dist/server/{block-kinds-CdI7NvAW.mjs → block-kinds-DkzOr19P.mjs} +2 -0
  175. package/dist/server/{client-Djjv-NuA.mjs → client-ngWuFsmN.mjs} +638 -216
  176. package/dist/server/config-template-validation.mjs +30 -4
  177. package/dist/server/config-validation.mjs +1 -1
  178. package/dist/server/config.mjs +3 -34
  179. package/dist/server/data/resolveBlockData.mjs +1 -1
  180. package/dist/server/index.mjs +3 -3
  181. package/dist/server/loadContent-DeLQeJAZ.mjs +2310 -0
  182. package/dist/server/{loadPage-QXSdPSYY.mjs → loadPage-D4J747FQ.mjs} +2 -2
  183. package/dist/server/manifest.mjs +1 -1
  184. package/dist/server/next.mjs +8 -6
  185. package/dist/server/{opaqueSurface-Yltv_u7r.mjs → opaqueSurface-ukEz1BaM.mjs} +2 -2
  186. package/dist/server/{overrideResolution-CMNx5tQg.mjs → overrideResolution-DSuVkpqm.mjs} +3 -2
  187. package/dist/server/page-converter.mjs +3 -3
  188. package/dist/server/pageRegions-BaeEF2MU.mjs +30 -0
  189. package/dist/server/{pageRenderPlan-Bv6NbFeM.mjs → pageRenderPlan-DFv3h4Ib.mjs} +306 -287
  190. package/dist/server/{pageRuntimeSupport-B2laBtff.mjs → pageRuntimeSupport-yHaRNWMj.mjs} +48 -35
  191. package/dist/server/{pageShared-CE9EBNSH.mjs → pageShared-CAZD0LcY.mjs} +848 -315
  192. package/dist/server/parseThemeForPersistence-Dl7LIBJq.mjs +52 -0
  193. package/dist/server/{prebuild-FBA6Y1K7.mjs → prebuild-BKOCND3b.mjs} +1 -1
  194. package/dist/server/prebuild.mjs +1 -1
  195. package/dist/server/{prefetchBlockData-yL2hB2l_.mjs → prefetchBlockData-GIoExi8A.mjs} +4 -3
  196. package/dist/server/{registry-Djrj9gWy.mjs → registry-BogXzcOD.mjs} +4000 -1989
  197. package/dist/server/rendering/components/pageShared.mjs +1 -1
  198. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  199. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  200. package/dist/server/rendering/server.mjs +3 -3
  201. package/dist/server/rendering.mjs +7 -7
  202. package/dist/server/{resolveBlockData-CyeIjmqx.mjs → resolveBlockData-CT4YSBve.mjs} +4 -3
  203. package/dist/server/{resolveButtonColourStates-Cn6j8Ee0.mjs → resolveButtonColourStates-DVISOQD9.mjs} +2 -0
  204. package/dist/server/rich-text-CRcONdyM.mjs +33 -0
  205. package/dist/server/{richTextSchema-DQ2NBP0n.mjs → richTextSchema-QLaQrbII.mjs} +31 -2
  206. package/dist/server/{parseThemeForPersistence-BebSeE17.mjs → schema-C92Q8y0-.mjs} +463 -53
  207. package/dist/server/server.mjs +3 -3
  208. package/dist/server/theme-bridge.mjs +2 -2
  209. package/dist/server/theme.mjs +2 -1
  210. package/dist/server/{three-pass-converter-CQWdnfjV.mjs → three-pass-converter-Bsfdy_ZV.mjs} +11 -8
  211. package/dist/server/{validation-Dh8htd6l.mjs → validation-vSBCWU3w.mjs} +9 -9
  212. package/dist/server/{version-LMwnoksN.mjs → version-Cw5vFmUY.mjs} +1 -1
  213. package/dist/styles/index.css +408 -10
  214. package/package.json +1 -1
  215. package/dist/client/StepIndicator-CR7_0yu4.mjs +0 -432
  216. package/dist/preview-next/client/useOpenBlockForSetup-CipKCK2O.mjs +0 -28
  217. package/dist/server/bindings-C1-MNwwS.mjs +0 -257
  218. package/dist/server/headerVariant-8O5MvxIU.mjs +0 -464
  219. package/dist/server/loadContent-DhraQ_Fi.mjs +0 -578
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { r as __toESM, t as __commonJSMin } from "./rolldown-runtime-CE6sIgz8.mjs";
3
- import { $d as truncateInlineText, Aa as resolveMediaStorageUrl, Am as DialogContent, Ar as getBlockDefinition, B_ as generateUuidV4, C as selectedImageFromMediaValue, Ca as computeMediaTransformStyle, Ch as cva, Cm as DialogDescription$1, Dd as RichTextDocSchema, Dh as useComposedRefs, Ef as getCuratedSiteStyle, Em as DialogTitle$1, F as nextLookTilePin, Ff as getGradientPreset, Gd as inlineTextToPlainText, Gm as __read, Gn as rankBackgroundImagePoolItems, Hd as inlineTextAccentTones, Hm as __awaiter, In as backgroundColorTokens, Jd as normalizeInlineTextMarks, Jm as __spreadArrays, Km as __rest, Ma as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, Mm as DialogOverlay, Nf as gradientToCss, Nm as DialogPortal, Oa as resolveImageUrlWithContext, Oh as cn$2, Pm as DialogTitle, Qd as replaceInlineTextRange, Rn as defaultBackgroundOverrideForMode, S_ as mediaIdentifierSchema, Sh as useControlReadiness, Sm as DialogContent$1, Tm as DialogHeader, Ud as inlineTextEqual, Um as __extends, Vm as __assign, Wd as inlineTextHighlightTones, Wm as __generator, Xd as plainTextToInlineText, Xp as unwrapResponse, Zd as removeInlineTextMarkFromRange, _h as composeEventHandlers, am as SelectTrigger, ay as unsafeAsMediaAssetId, b_ as resolveManagedMediaReference, ba as getRichTextImageSize, bh as Button, bm as Dialog, c_ as isRotationDimensionSwap, cm as usePrevious, d_ as parseAspectRatioValue, f_ as resolveMediaTransformForAspect, gh as createContextScope, im as SelectItem, jm as DialogDescription, k as usePreviewRenderBackgrounds, k_ as asLayoutVariantKey, kd as richTextVariantCapabilities, km as DialogClose, l_ as normalizeRightAngle, m_ as getImageUrl, mh as useControllableState, nm as Select, og as surfaceForegroundValue, oh as useSize, om as SelectValue, op as assertNever$1, oy as unsafeAsPositiveByteCount, p_ as getDirectImageUrlForMediaAsset, qd as normalizeInlineText, qm as __spreadArray, rm as SelectContent, ry as assertNever, u_ as formatAspectRatioToken, vh as Primitive, w as selectedImageFromRenderableAsset, zd as applyInlineTextMarkToRange, zm as usePortalContainer, zt as getDashboardBaseUrl } from "./previewAssistantSlot-CSs9S8wr.mjs";
4
- import { B as ImageUp, C as Palette, F as Link$1, Gt as err, J as FileSpreadsheet, K as File, Kt as ok, L as Italic$1, M as LoaderCircle, N as List, P as ListOrdered, R as Info, St as Archive, W as Highlighter, X as FileHeadphone, Y as FilePlay, Z as FileArchive, a as Upload, b as Pencil, c as Trash2, ft as ChevronRight, ht as Check, n as X, nt as Crop, pt as ChevronLeft, q as FileText, y as Plus, yt as Bold$1, z as Image } from "./lucide-react-DbC1o6_9.mjs";
5
- import { $ as useMediaEditorOptional, D as usePreviewCompiledThemeOptional, Q as useMediaEditor, Yt as Input, cn as classifyKnownMimeType, d as CustomizeBackgroundColorPicker, et as useApiMediaUploader, tt as TransferError, zt as readThemeScopeContext } from "./SiteChromeCustomizeButton-CcZ_ERvZ.mjs";
6
- import { A as TooltipTrigger, D as Tooltip, F as DropdownMenuTrigger, M as DropdownMenuContent, N as DropdownMenuItem, O as TooltipContent, c as arrangementBackgroundControlFor, j as DropdownMenu, k as TooltipProvider, l as arrangementBlockControlsFor } from "./useBlockCustomizeControls-WOs8Atje.mjs";
3
+ import { $_ as generateUuidV4, $d as inlineTextToPlainText, $m as __generator, $t as useEditorUiStore, Bm as DialogDescription, C as selectedImageFromMediaValue, C_ as getImageUrl, Ca as getRichTextImageSize, Ch as useControllableState, Dh as Primitive, Ea as computeMediaTransformStyle, Eh as composeEventHandlers, F as nextLookTilePin, Fa as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, Fd as RichTextDocSchema, Fm as DialogTitle$1, G_ as authoredValuesEqual, Gn as rankBackgroundImagePoolItems, Hm as DialogPortal, Ih as useComposedRefs, In as backgroundColorTokens, Jm as usePortalContainer, Ld as richTextVariantCapabilities, Lh as cn$2, Lv as unsafeAsEditorBlockId, M as lookPositionLabel, Mh as cva, Mm as DialogDescription$1, N as lookTilePosition, Na as resolveMediaStorageUrl, Nr as getBlockDefinition, Pf as getCuratedSiteStyle, Pm as DialogHeader, Qd as inlineTextHighlightTones, Qm as __extends, Rm as DialogClose, Rn as defaultBackgroundOverrideForMode, S_ as getDirectImageUrlForMediaAsset, Th as createContextScope, Uf as getGradientPreset, Um as DialogTitle, Vf as gradientToCss, Vm as DialogOverlay, Xd as inlineTextAccentTones, Xm as __assign, Zd as inlineTextEqual, Zm as __awaiter, __ as isRotationDimensionSwap, _m as usePrevious, af as removeInlineTextMarkFromRange, am as selectedCanvasBlockId, b as pageDesignLookPosition, b_ as parseAspectRatioValue, by as unsafeAsMediaAssetId, dm as Select, eh as __read, en as useEditorUiStoreInstance, fm as SelectContent, gy as assertNever, hg as surfaceForegroundValue, hh as useSize, hm as SelectValue, i as usePreviewSidebarNavigation, if as plainTextToInlineText, im as unwrapResponse, j_ as mediaIdentifierSchema, ja as resolveImageUrlWithContext, jh as useControlReadiness, jm as DialogContent$1, k as usePreviewRenderBackgrounds, k_ as resolveManagedMediaReference, kh as Button, km as Dialog, mm as SelectTrigger, mp as assertNever$1, nf as normalizeInlineTextMarks, nh as __spreadArray, o as usePreviewPageDesignEditorState, of as replaceInlineTextRange, pm as SelectItem, qd as applyInlineTextMarkToRange, rh as __spreadArrays, sf as truncateInlineText, tf as normalizeInlineText, th as __rest, v_ as normalizeRightAngle, w as selectedImageFromRenderableAsset, x_ as resolveMediaTransformForAspect, xy as unsafeAsPositiveByteCount, y as cyclePageDesignBlockLook, y_ as formatAspectRatioToken, z_ as asLayoutVariantKey, zm as DialogContent, zt as getDashboardBaseUrl } from "./previewAssistantSlot-CuOcsG_N.mjs";
4
+ import { B as Image, F as ListOrdered, G as Highlighter, I as Link$1, J as FileText, Jt as ok, N as LoaderCircle, P as List, Q as FileArchive, R as Italic$1, V as ImageUp, X as FilePlay, Y as FileSpreadsheet, Z as FileHeadphone, a as Upload, b as Plus, bt as Bold$1, c as Trash2, gt as Check, mt as ChevronLeft, n as X, pt as ChevronRight, q as File, qt as err, rt as Crop, s as TriangleAlert, w as Palette, wt as Archive, x as Pencil, z as Info } from "./lucide-react-DygTyy7K.mjs";
5
+ import { $ as useMediaEditor, Bt as readThemeScopeContext, D as usePreviewCompiledThemeOptional, F as siteColourCss, Xt as Input, d as CustomizeBackgroundColorPicker, et as useMediaEditorOptional, i as PreviewChromeFloatingControl, l as planBlockToolbarPlacement, ln as classifyKnownMimeType, nt as TransferError, o as readThemeCustomProperties, s as measureSiteTopChromeClearance, tt as useApiMediaUploader } from "./SiteChromeCustomizeButton-H_ciMNHA.mjs";
6
+ import { A as TooltipProvider, I as DropdownMenuTrigger, M as DropdownMenu, N as DropdownMenuContent, O as Tooltip, P as DropdownMenuItem, c as useBlockNeedsSetup, i as NEEDS_SETUP_LABEL, j as TooltipTrigger, k as TooltipContent, l as arrangementBackgroundControlFor, o as needsSetupMessage, r as useBlockCustomizeControls, t as useOpenBlockForSetup, u as arrangementBlockControlsFor } from "./useOpenBlockForSetup-BdnMlHC6.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";
@@ -22205,7 +22205,7 @@ function RichTextToolbar({ editor, buttons, onPickImage, linkItems, onRequestLin
22205
22205
  "data-rb-document-toolbar": richTextDocumentOwner(editor),
22206
22206
  onMouseEnter: () => setIsHovered(true),
22207
22207
  onMouseLeave: () => setIsHovered(false),
22208
- className: cn$1("flex w-full items-center overflow-x-auto px-2.5 py-1.5 text-sm", tone === "light" ? "bg-transparent text-foreground" : "bg-slate-900 text-slate-50 border-b border-white/10"),
22208
+ className: cn$1("flex w-full flex-wrap items-center gap-y-1 px-2.5 py-1.5 text-sm", tone === "light" ? "bg-transparent text-foreground" : "bg-slate-900 text-slate-50 border-b border-white/10"),
22209
22209
  children: /* @__PURE__ */ jsx(TooltipProvider, {
22210
22210
  delayDuration: 200,
22211
22211
  children: buttons.map(renderButton)
@@ -30448,11 +30448,6 @@ function useRichTextImageProjection(fallbackSiteId) {
30448
30448
  function useSiteColourVariables() {
30449
30449
  return usePreviewCompiledThemeOptional()?.colourVariables ?? null;
30450
30450
  }
30451
- /** A token's colour as CSS: the site's value when known, otherwise the variable in scope. */
30452
- function siteColourCss(variables, token) {
30453
- const channels = variables?.[`--tb-${token}`];
30454
- return channels ? `rgb(${channels})` : `rgb(var(--tb-${token}))`;
30455
- }
30456
30451
  //#endregion
30457
30452
  //#region ../preview-next/src/client/blocks/BlockBackgroundChooser.tsx
30458
30453
  function BackgroundChooser({ editingSlot, capability, current, imagePoolStatus, onChoose }) {
@@ -31196,4 +31191,390 @@ function arrangementLookNote(look, styleName) {
31196
31191
  }
31197
31192
  }
31198
31193
  //#endregion
31199
- export { EditorCanvasNameChip as A, useRichTextEditor as C, decideDocumentReplacement as D, InlineTextEditor as E, ScrollableDialogContent as F, ScrollableDialogShell as I, emitMediaCropDebug as L, EditorSelectionFrame as M, Switch as N, resolveSdkFooterMode as O, Badge as P, resolveVideoSelectionIntentForMediaField as R, insertOrReplaceRichTextImage as S, parseRichTextDoc as T, MediaEditor as _, LookCyclePill as a, RichTextEditorSurface as b, BackgroundChooser as c, gradientLabel as d, readBackgroundColorPaletteSnapshot as f, getUnresolvedRichTextImageWarnings as g, useRichTextImageProjection as h, ArrangementOptionsBody as i, EditorInsertionMarker as j, EditorCanvasChipRow as k, BackgroundPreviewSwatch as l, useSiteColourVariables as m, ArrangementLookPill as n, lookIsAutomatic as o, siteColourCss as p, ArrangementModeSwitchPill as r, useArrangementToolbar as s, ArrangementLookNote as t, formatTokenLabel as u, MediaPickerMiniDialog as v, EMPTY_DOC as w, getRichTextImagePositionFromTarget as x, MediaPickerMini as y, isSvgMimeType as z };
31194
+ //#region ../preview-next/src/client/blocks/useBlockSelection.ts
31195
+ const PHONE_VIEWPORT_QUERY = "(max-width: 639px)";
31196
+ /**
31197
+ * Click to select: a click anywhere in the block selects it, so its controls
31198
+ * stay put instead of only showing on hover. A click on an empty placeholder
31199
+ * also opens the side panel on the field that fills it.
31200
+ *
31201
+ * A page section on a full event page is selected the same way, but its
31202
+ * template places it, so it's selected as a page section rather than as one
31203
+ * of the editor's own blocks.
31204
+ */
31205
+ function useBlockSelection(input) {
31206
+ const probeRef = useRef(null);
31207
+ const selection = usePreviewSidebarNavigation();
31208
+ const selectBlock = input.kind === "pageSection" ? selection.selectPageSection : selection.selectBlock;
31209
+ const onOpenFieldRef = useRef(input.onOpenField);
31210
+ onOpenFieldRef.current = input.onOpenField;
31211
+ const phone = useMediaQuery(PHONE_VIEWPORT_QUERY);
31212
+ const [blockElement, setBlockElement] = useState(null);
31213
+ useEffect(() => {
31214
+ const block = probeRef.current?.closest("[data-block-id]") ?? null;
31215
+ setBlockElement(block);
31216
+ if (!block || !selectBlock) return;
31217
+ const handleClick = (event) => {
31218
+ selectBlock(input.blockId);
31219
+ const fieldPath = (event.target instanceof Element ? event.target.closest("[data-placeholder-field]") : null)?.dataset.placeholderField;
31220
+ if (fieldPath) onOpenFieldRef.current(fieldPath);
31221
+ };
31222
+ block.addEventListener("click", handleClick);
31223
+ return () => block.removeEventListener("click", handleClick);
31224
+ }, [input.blockId, selectBlock]);
31225
+ const selectedId = selectedCanvasBlockId(selection.navigation);
31226
+ return {
31227
+ probeRef,
31228
+ selected: selectedId === input.blockId,
31229
+ blockElement,
31230
+ selectedElsewhere: selectedId !== null && selectedId !== input.blockId,
31231
+ phone
31232
+ };
31233
+ }
31234
+ function useMediaQuery(query) {
31235
+ const [matches, setMatches] = useState(false);
31236
+ useEffect(() => {
31237
+ if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
31238
+ const list = window.matchMedia(query);
31239
+ const update = () => setMatches(list.matches);
31240
+ update();
31241
+ list.addEventListener("change", update);
31242
+ return () => list.removeEventListener("change", update);
31243
+ }, [query]);
31244
+ return matches;
31245
+ }
31246
+ //#endregion
31247
+ //#region ../preview-next/src/client/blocks/BlockReadinessNote.tsx
31248
+ /**
31249
+ * The canvas note on a block that isn't set up yet: only editors see it, and
31250
+ * it sits inside the block so it moves with it.
31251
+ */
31252
+ function BlockReadinessNote({ needs, element, blockName, onSetUp }) {
31253
+ if (!needs || !element) return null;
31254
+ return createPortal(/* @__PURE__ */ jsxs("div", {
31255
+ "data-preview-readiness-note": "",
31256
+ role: "note",
31257
+ "aria-label": `${blockName}: ${NEEDS_SETUP_LABEL}`,
31258
+ className: "absolute left-4 top-4 z-20 flex max-w-[22rem] gap-2.5 rounded-xl border border-amber-300 bg-amber-50 p-3 text-left font-sans text-[13px] leading-snug text-slate-900 shadow-md",
31259
+ children: [/* @__PURE__ */ jsx(TriangleAlert, {
31260
+ className: "mt-0.5 h-4 w-4 shrink-0 text-amber-600",
31261
+ "aria-hidden": "true"
31262
+ }), /* @__PURE__ */ jsxs("div", {
31263
+ className: "min-w-0 space-y-1.5",
31264
+ children: [
31265
+ /* @__PURE__ */ jsxs("p", {
31266
+ className: "font-semibold",
31267
+ children: [
31268
+ blockName,
31269
+ " ",
31270
+ /* @__PURE__ */ jsxs("span", {
31271
+ className: "font-normal text-amber-800",
31272
+ children: ["· ", NEEDS_SETUP_LABEL]
31273
+ })
31274
+ ]
31275
+ }),
31276
+ /* @__PURE__ */ jsx("p", { children: needsSetupMessage(needs) }),
31277
+ /* @__PURE__ */ jsx("p", {
31278
+ className: "text-xs text-slate-600",
31279
+ children: "You're seeing this because you're editing."
31280
+ }),
31281
+ /* @__PURE__ */ jsx("button", {
31282
+ type: "button",
31283
+ onClick: onSetUp,
31284
+ className: "rounded-full bg-slate-900 px-3 py-1 text-xs font-semibold text-white hover:bg-slate-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-amber-500",
31285
+ children: "Set this up"
31286
+ })
31287
+ ]
31288
+ })]
31289
+ }), element);
31290
+ }
31291
+ //#endregion
31292
+ //#region ../preview-next/src/client/blocks/insertionEdge.ts
31293
+ /**
31294
+ * A new block at `position` goes above the block now at that index; one at the
31295
+ * end goes below the last block. Every other block shows nothing.
31296
+ */
31297
+ function insertionEdgeFor(input) {
31298
+ const { index, count, position } = input;
31299
+ if (position === null || index < 0) return null;
31300
+ if (position === index) return "top";
31301
+ return position >= count && index === count - 1 ? "bottom" : null;
31302
+ }
31303
+ //#endregion
31304
+ //#region ../preview-next/src/client/blocks/InsertionMarker.tsx
31305
+ /**
31306
+ * The edge this block shows the marker on, if the sidebar is adding a block
31307
+ * next to it in the collection that's mounted. Each block subscribes for
31308
+ * itself, so moving the marker only re-renders the blocks it moves between.
31309
+ */
31310
+ function useInsertionEdge(blockId) {
31311
+ return useEditorUiStore((state) => {
31312
+ const view = state.sidebarNavigation.view;
31313
+ if (view.kind !== "addBlock" && view.kind !== "chooseLook") return null;
31314
+ if (!authoredValuesEqual(view.anchor.owner, state.structure.getOwner())) return null;
31315
+ const blocks = state.structure.getList();
31316
+ return insertionEdgeFor({
31317
+ index: blocks.findIndex((block) => String(block.id) === blockId),
31318
+ count: blocks.length,
31319
+ position: view.anchor.position
31320
+ });
31321
+ });
31322
+ }
31323
+ /**
31324
+ * While the sidebar is adding a block, the canvas shows where it'll go: a
31325
+ * line on the edge of the block it goes next to, brought into view.
31326
+ */
31327
+ function InsertionMarker({ blockId, element }) {
31328
+ const edge = useInsertionEdge(blockId);
31329
+ const ref = useRef(null);
31330
+ useEffect(() => {
31331
+ const marker = ref.current;
31332
+ if (edge && marker) return revealWhenShown(marker);
31333
+ }, [edge, element]);
31334
+ if (!edge || !element) return null;
31335
+ return createPortal(/* @__PURE__ */ jsx(EditorInsertionMarker, {
31336
+ ref,
31337
+ edge
31338
+ }), element);
31339
+ }
31340
+ /**
31341
+ * Scrolls the marker into view once it can be seen. On phones the canvas is a
31342
+ * hidden tab while the sidebar adds a block, so this waits for that tab.
31343
+ */
31344
+ function revealWhenShown(marker) {
31345
+ const reveal = () => marker.scrollIntoView({
31346
+ block: "center",
31347
+ behavior: "smooth"
31348
+ });
31349
+ if (typeof ResizeObserver === "undefined") {
31350
+ reveal();
31351
+ return () => {};
31352
+ }
31353
+ const observer = new ResizeObserver(() => {
31354
+ if (marker.getClientRects().length === 0) return;
31355
+ reveal();
31356
+ observer.disconnect();
31357
+ });
31358
+ observer.observe(marker);
31359
+ return () => observer.disconnect();
31360
+ }
31361
+ //#endregion
31362
+ //#region ../preview-next/src/client/blocks/BlockToolbar.tsx
31363
+ function BlockToolbar(input) {
31364
+ const { selection, controls, toolbar, open, openField, cycleSdk, cycleRecipe } = useBlockToolbar(input);
31365
+ const needs = useBlockNeedsSetup(input.blockId);
31366
+ const name = controls.manifest?.title ?? getBlockDefinition(input.blockKind)?.manifest.title ?? input.blockKind;
31367
+ const row = /* @__PURE__ */ jsxs(EditorCanvasChipRow, {
31368
+ label: `${name} controls`,
31369
+ children: [
31370
+ /* @__PURE__ */ jsx(EditorCanvasNameChip, {
31371
+ name,
31372
+ onOpen: open
31373
+ }),
31374
+ toolbar?.controls.mode ? /* @__PURE__ */ jsx(ArrangementModeSwitchPill, {
31375
+ blockLabel: name,
31376
+ mode: toolbar.controls.mode,
31377
+ onChoose: toolbar.chooseMode
31378
+ }) : null,
31379
+ /* @__PURE__ */ jsx(ToolbarLook, {
31380
+ controls,
31381
+ toolbar,
31382
+ onCycleSdk: cycleSdk,
31383
+ onCycleRecipe: cycleRecipe
31384
+ })
31385
+ ]
31386
+ });
31387
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
31388
+ /* @__PURE__ */ jsx("span", {
31389
+ ref: selection.probeRef,
31390
+ "aria-hidden": "true"
31391
+ }),
31392
+ /* @__PURE__ */ jsx(BlockSelectionFrame, {
31393
+ selected: selection.selected,
31394
+ element: selection.blockElement
31395
+ }),
31396
+ /* @__PURE__ */ jsx(BlockReadinessNote, {
31397
+ needs,
31398
+ element: selection.blockElement,
31399
+ blockName: name,
31400
+ onSetUp: () => needs?.repair.kind === "field" ? openField(needs.repair.path) : open()
31401
+ }),
31402
+ /* @__PURE__ */ jsx(InsertionMarker, {
31403
+ blockId: input.blockId,
31404
+ element: selection.blockElement
31405
+ }),
31406
+ /* @__PURE__ */ jsx(ToolbarPlacement, {
31407
+ blockId: input.blockId,
31408
+ placement: currentBlockToolbarPlacement,
31409
+ selected: selection.selected,
31410
+ phone: selection.phone,
31411
+ children: row
31412
+ })
31413
+ ] });
31414
+ }
31415
+ /** A separate frame preserves the site's own borders, shadows and outlines. */
31416
+ function BlockSelectionFrame({ selected, element }) {
31417
+ return selected && element ? createPortal(/* @__PURE__ */ jsx(EditorSelectionFrame, {}), element) : null;
31418
+ }
31419
+ function useBlockToolbar(input) {
31420
+ const uiStore = useEditorUiStoreInstance();
31421
+ const editorBlockId = useMemo(() => unsafeAsEditorBlockId(input.blockId), [input.blockId]);
31422
+ const values = useEditorUiStore((state) => state.drafts.getCurrentValues(editorBlockId)) ?? input.content;
31423
+ const opener = useOpenBlockForSetup();
31424
+ const open = () => opener.open(editorBlockId);
31425
+ const openField = (fieldPath) => opener.openField(editorBlockId, fieldPath);
31426
+ const selection = useBlockSelection({
31427
+ blockId: editorBlockId,
31428
+ onOpenField: openField
31429
+ });
31430
+ const controls = useBlockCustomizeControls({
31431
+ blockId: editorBlockId,
31432
+ blockKind: input.blockKind,
31433
+ content: values,
31434
+ uiStore,
31435
+ theme: input.theme
31436
+ });
31437
+ const { state, applyAction } = usePreviewPageDesignEditorState();
31438
+ const toolbar = useArrangementToolbar({
31439
+ designBlock: controls.designBlock,
31440
+ content: values,
31441
+ pageDesignState: state,
31442
+ selected: selection.selected,
31443
+ save: (action) => {
31444
+ applyAction(action, { runtimeContent: values });
31445
+ },
31446
+ chooseBackground: open,
31447
+ openField
31448
+ });
31449
+ const cycleSdk = (direction) => cycleSdkLook(controls, direction);
31450
+ const cycleRecipe = (direction) => {
31451
+ if (!controls.designBlock) return;
31452
+ const action = cyclePageDesignBlockLook(controls.designBlock, direction);
31453
+ if (action) applyAction(action, { runtimeContent: values });
31454
+ };
31455
+ return {
31456
+ selection,
31457
+ controls,
31458
+ toolbar,
31459
+ open,
31460
+ openField,
31461
+ cycleSdk,
31462
+ cycleRecipe
31463
+ };
31464
+ }
31465
+ function cycleSdkLook(controls, direction) {
31466
+ const item = controls.lookSource.kind === "sdk" ? controls.lookSource.item : null;
31467
+ if (item?.field.type !== "select" || !controls.backend) return;
31468
+ const options = item.field.options;
31469
+ const current = options.findIndex((option) => option.value === (controls.backend?.getValue(item.path) ?? item.field.defaultValue));
31470
+ const next = options[(Math.max(0, current) + (direction === "next" ? 1 : options.length - 1)) % options.length];
31471
+ if (next) controls.backend.setValue(item.path, next.value);
31472
+ }
31473
+ /** The Look pill shows only while its arrows have somewhere to go. */
31474
+ function ToolbarLook({ controls, toolbar, onCycleSdk, onCycleRecipe }) {
31475
+ if (controls.lookSource.kind === "sdk") {
31476
+ const field = cyclableSdkLookField(controls.lookSource.item);
31477
+ return field && controls.lookSource.item ? /* @__PURE__ */ jsx(SdkToolbarLook, {
31478
+ field,
31479
+ value: controls.backend?.getValue(controls.lookSource.item.path),
31480
+ onCycle: onCycleSdk
31481
+ }) : null;
31482
+ }
31483
+ if (toolbar?.controls.look) return toolbar.controls.tiles.length > 1 ? /* @__PURE__ */ jsx(ArrangementLookPill, {
31484
+ look: toolbar.controls.look,
31485
+ position: lookTilePosition(toolbar.controls.tiles),
31486
+ onCycle: toolbar.cycleLook
31487
+ }) : null;
31488
+ if (!controls.designBlock) return null;
31489
+ const preset = pageDesignLookPosition(controls.designBlock);
31490
+ return preset.canCycle ? /* @__PURE__ */ jsx(LookCyclePill, {
31491
+ lookName: preset.lookName,
31492
+ position: preset.position,
31493
+ onCycle: onCycleRecipe
31494
+ }) : null;
31495
+ }
31496
+ function cyclableSdkLookField(item) {
31497
+ return item?.field.type === "select" && item.field.options.length > 1 ? item.field : null;
31498
+ }
31499
+ function ToolbarPlacement({ blockId, placement, selected, phone, children }) {
31500
+ if (phone && selected && typeof document !== "undefined") return createPortal(/* @__PURE__ */ jsx("div", {
31501
+ "data-preview-block-dock": "",
31502
+ className: "builder-dashboard-chrome-theme fixed inset-x-2 bottom-[calc(var(--builder-editor-chrome-offset,0px)+0.5rem)] rounded-xl border bg-background/95 p-2 text-foreground shadow-xl [body:has([data-state=inactive]_[data-preview-scroll-viewport])_&]:hidden",
31503
+ style: {
31504
+ ...readThemeCustomProperties(document.querySelector(`[data-block-id="${blockId}"]`) ?? document.documentElement),
31505
+ zIndex: 30
31506
+ },
31507
+ children
31508
+ }), document.body);
31509
+ return /* @__PURE__ */ jsx(PreviewChromeFloatingControl, {
31510
+ anchorSelector: `[data-block-id="${blockId}"]`,
31511
+ placement,
31512
+ selected,
31513
+ stayInsideAnchor: true,
31514
+ fallbackClassName: "absolute right-4 top-2",
31515
+ children
31516
+ });
31517
+ }
31518
+ /** The floating chrome owner reads geometry; content rendering never subscribes to it. */
31519
+ function currentBlockToolbarPlacement() {
31520
+ return planBlockToolbarPlacement({ headerClearance: measureSiteTopChromeClearance() });
31521
+ }
31522
+ function SdkToolbarLook({ field, value, onCycle }) {
31523
+ const index = field.options.findIndex((option) => option.value === (value ?? field.defaultValue));
31524
+ return /* @__PURE__ */ jsx(LookCyclePill, {
31525
+ lookName: field.options[index]?.label ?? "Choose a Look",
31526
+ position: lookPositionLabel(index, field.options.length),
31527
+ onCycle
31528
+ });
31529
+ }
31530
+ //#endregion
31531
+ //#region ../preview-next/src/client/blocks/PageSectionToolbar.tsx
31532
+ const PAGE_SECTION_BLOCK_PREFIX = "page-section-";
31533
+ /** The section a page-section block shows, from the id full event pages give it; null for any other block. */
31534
+ function pageSectionIdFromBlockId(blockId) {
31535
+ return blockId.startsWith(PAGE_SECTION_BLOCK_PREFIX) ? blockId.slice(13) || null : null;
31536
+ }
31537
+ /** The heading a section block shows, which is the section's name. */
31538
+ function sectionName(content) {
31539
+ return (typeof content.title === "string" ? content.title : typeof content.heading === "string" ? content.heading : "").trim() || "Page section";
31540
+ }
31541
+ /**
31542
+ * A page section on a full event page (#1703 B4b). It can be selected, and
31543
+ * its chip opens the section's look in the sidebar. Nothing else here: the
31544
+ * section is moved, removed and filled in from the dashboard.
31545
+ */
31546
+ function PageSectionToolbar({ blockId, content }) {
31547
+ const editorBlockId = unsafeAsEditorBlockId(blockId);
31548
+ const { openPageSection } = usePreviewSidebarNavigation();
31549
+ const selection = useBlockSelection({
31550
+ blockId: editorBlockId,
31551
+ onOpenField: () => void 0,
31552
+ kind: "pageSection"
31553
+ });
31554
+ const name = sectionName(content);
31555
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
31556
+ /* @__PURE__ */ jsx("span", {
31557
+ ref: selection.probeRef,
31558
+ "aria-hidden": "true"
31559
+ }),
31560
+ /* @__PURE__ */ jsx(BlockSelectionFrame, {
31561
+ selected: selection.selected,
31562
+ element: selection.blockElement
31563
+ }),
31564
+ /* @__PURE__ */ jsx(ToolbarPlacement, {
31565
+ blockId,
31566
+ placement: currentBlockToolbarPlacement,
31567
+ selected: selection.selected,
31568
+ phone: selection.phone,
31569
+ children: /* @__PURE__ */ jsx(EditorCanvasChipRow, {
31570
+ label: `${name} controls`,
31571
+ children: /* @__PURE__ */ jsx(EditorCanvasNameChip, {
31572
+ name,
31573
+ onOpen: () => openPageSection(editorBlockId)
31574
+ })
31575
+ })
31576
+ })
31577
+ ] });
31578
+ }
31579
+ //#endregion
31580
+ export { ScrollableDialogContent as A, EMPTY_DOC as C, resolveSdkFooterMode as D, decideDocumentReplacement as E, emitMediaCropDebug as M, resolveVideoSelectionIntentForMediaField as N, Switch as O, isSvgMimeType as P, useRichTextEditor as S, InlineTextEditor as T, MediaPickerMiniDialog as _, ArrangementOptionsBody as a, getRichTextImagePositionFromTarget as b, BackgroundChooser as c, gradientLabel as d, readBackgroundColorPaletteSnapshot as f, MediaEditor as g, getUnresolvedRichTextImageWarnings as h, ArrangementLookNote as i, ScrollableDialogShell as j, Badge as k, BackgroundPreviewSwatch as l, useRichTextImageProjection as m, pageSectionIdFromBlockId as n, lookIsAutomatic as o, useSiteColourVariables as p, BlockToolbar as r, useArrangementToolbar as s, PageSectionToolbar as t, formatTokenLabel as u, MediaPickerMini as v, parseRichTextDoc as w, insertOrReplaceRichTextImage as x, RichTextEditorSurface as y };