@riverbankcms/sdk 0.169.1 → 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 (227) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/_dts/{BlocksIslandsHydrator-DEhlJEwj.d.ts → BlocksIslandsHydrator-xuFmD41p.d.ts} +1 -1
  3. package/dist/_dts/{Page-BhCfStX1.d.ts → Page-4fzXy8H9.d.ts} +13 -11
  4. package/dist/_dts/{SdkPreviewMode-DSYdsdmJ.d.ts → SdkPreviewMode-BlHgMsc8.d.ts} +4 -3
  5. package/dist/_dts/{client-BZMn4Y99.d.ts → client-BPoU758C.d.ts} +32 -1
  6. package/dist/_dts/{content-types-EMK-E_r9.d.ts → content-types-TnkhoSls.d.ts} +3 -3
  7. package/dist/_dts/{contracts-DjYsGY3B.d.ts → contracts-7wrMA79U.d.ts} +5 -3
  8. package/dist/_dts/{footerPageOutline-BtYUi-m0.d.ts → footerPageOutline-DaOsPQ_Q.d.ts} +6 -6
  9. package/dist/_dts/{generatePageMetadata-D_fNTi5r.d.ts → generatePageMetadata-D9aDEzKK.d.ts} +2 -2
  10. package/dist/_dts/{index-NaRauKDR.d.ts → index-585vn6qb.d.ts} +72 -36
  11. package/dist/_dts/{index-BR0i0c3G.d.ts → index-CZKSUcDs.d.ts} +4 -4
  12. package/dist/_dts/{index-BV-qVnt7.d.ts → index-Cbw0IiY7.d.ts} +2 -2
  13. package/dist/_dts/{index-DgEwZ5WQ.d.ts → index-ChNbrcgD.d.ts} +1 -1
  14. package/dist/_dts/{index-QIbYMeI7.d.ts → index-DDKJfaLY.d.ts} +2 -2
  15. package/dist/_dts/{index-BzguBJzR.d.ts → index-DNCDENic.d.ts} +1 -1
  16. package/dist/_dts/{index-BYYhTQ_b.d.ts → index-W9R3Bnf2.d.ts} +3 -3
  17. package/dist/_dts/{loadContent-BmGH6NKl.d.ts → loadContent-DPyNAJym.d.ts} +7 -7
  18. package/dist/_dts/{request-DssgRQSm.d.ts → request-jXTRN1Y4.d.ts} +45927 -42247
  19. package/dist/_dts/{resolveBlockData-5BqNxwL8.d.ts → resolveBlockData-BbvE-gsZ.d.ts} +5 -5
  20. package/dist/_dts/{resolvePageContent-DIuwuFA7.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-cObpvZGF.d.ts → types-BXuVxDYo.d.ts} +2 -2
  56. package/dist/_dts/{types-DrAWDtqR.d.ts → types-DEAKoDNi.d.ts} +3 -3
  57. package/dist/_dts/{types-Z388-GR1.d.ts → types-kWvBwYK6.d.ts} +7 -7
  58. package/dist/_dts/{validation-hLr8zVrc.d.ts → validation-BAO0_ntM.d.ts} +17 -17
  59. package/dist/client/{BlocksIslandsHydrator-CN2GyuuA.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-DSnSBNeq.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-ucgdMS35.mjs → EventCalendar.client-kh7mkYnW.mjs} +9 -9
  67. package/dist/client/{EventCombined.client-BEdfJGpx.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-OpLehMpT.mjs → EventItem-BnwcoFQN.mjs} +13 -9
  70. package/dist/client/{EventListWeekNavigation-DTsVU6gc.mjs → EventListWeekNavigation-DuG6z02f.mjs} +2 -1
  71. package/dist/client/{EventListing.client-8MFGI9BA.mjs → EventListing.client-18yfHrcr.mjs} +3 -3
  72. package/dist/client/{EventListing.view-BCvRqU86.mjs → EventListing.view-BM7rTVSL.mjs} +42 -397
  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-DH2sm4Cf.mjs +30247 -0
  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-B-M5l__W.mjs → cart-BozMM5NK.mjs} +3 -3
  90. package/dist/client/{cart.client-COAP4CEy.mjs → cart.client-CqOOxPbW.mjs} +1 -1
  91. package/dist/client/{checkout-ZHc8GfaG.mjs → checkout-CTWF5nbB.mjs} +3 -3
  92. package/dist/client/{checkout.client-DRralR3e.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 -226
  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-BY3AfYkK.mjs → eventCalendar-C5Bh2L8L.mjs} +4 -4
  105. package/dist/client/{eventCombined-86P2vQCb.mjs → eventCombined-dELKxxIe.mjs} +4 -4
  106. package/dist/client/{eventDetails-DIJYMzVg.mjs → eventDetails-Do9D_fJ_.mjs} +2 -2
  107. package/dist/client/{eventListing-8jS0qGGC.mjs → eventListing-B2HTUWLq.mjs} +4 -4
  108. package/dist/client/{eventRegistration-DyseP_sY.mjs → eventRegistration-ByOJnqGc.mjs} +4 -4
  109. package/dist/client/form-DX70QG-J.mjs +27 -0
  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/formSnapshot-Cy4abc0T.mjs +73 -0
  113. package/dist/client/{formatDate-BGlhrmhF.mjs → formatDate-Cjouxh4Y.mjs} +1 -1
  114. package/dist/client/gifting/client.mjs +3 -3
  115. package/dist/client/{headerSection-CyNGt23J.mjs → headerSection-CJuPX_1K.mjs} +2 -2
  116. package/dist/client/{newsletter-form.client-IfLup4o0.mjs → newsletter-form.client-CqzNjOft.mjs} +6 -6
  117. package/dist/client/{newsletter-form.parts-DDD-LRyW.mjs → newsletter-form.parts-DjJsFms2.mjs} +2 -2
  118. package/dist/client/{newsletterForm-o5wFBVHv.mjs → newsletterForm-D1MHoPbh.mjs} +5 -26
  119. package/dist/client/{noop-B_f7RqLD.mjs → noop-poI1m2yW.mjs} +69 -2
  120. package/dist/client/portal/client.mjs +294 -48
  121. package/dist/client/{product-detail.client-5hNA8aKU.mjs → product-detail.client-DOQ7El1d.mjs} +1 -1
  122. package/dist/client/{product-list.client-c-777ohj.mjs → product-list.client-CmxOZbzL.mjs} +1 -1
  123. package/dist/client/{productDetail-hXttfQhE.mjs → productDetail-BN3zv5sa.mjs} +3 -3
  124. package/dist/client/{productList-BPsYP_jA.mjs → productList-GN_Id4bF.mjs} +3 -3
  125. package/dist/client/{propsDecoder-Dc8j5i79.mjs → propsDecoder-BdmzM3D5.mjs} +8 -4
  126. package/dist/client/{registry.server-CMrdUGGv.mjs → registry.server-BOyra8CA.mjs} +1032 -925
  127. package/dist/client/rendering/client.mjs +57 -32
  128. package/dist/client/rendering/islandDelivery.flight.mjs +43 -10
  129. package/dist/client/rendering/islands.mjs +1 -1
  130. package/dist/client/rendering.mjs +1956 -191
  131. package/dist/client/{richText-coerce-BTurYEao.mjs → richText-coerce-CtoGLZ_e.mjs} +1 -1
  132. package/dist/client/{routeIslandApiConfig-DFjRKvzM.mjs → routeIslandApiConfig-DnaJ8PQc.mjs} +1 -1
  133. package/dist/client/{runtimeResponse-D2LT--Gj.mjs → runtimeResponse-B1-cyLXt.mjs} +1 -1
  134. package/dist/client/{runtimeResponse-BGU8sMZY.mjs → runtimeResponse-BN8PoIVp.mjs} +1 -1
  135. package/dist/client/{shop-Ds47onRS.mjs → shop-LjBLDBqF.mjs} +3 -3
  136. package/dist/client/{shop-commerce-B3PyRHaN.mjs → shop-commerce-B8aZTdRJ.mjs} +13 -13
  137. package/dist/client/{shop-commerce-store-D9CHihQv.mjs → shop-commerce-store-C1FtHYl7.mjs} +1 -1
  138. package/dist/client/{shop.client-RljK0qPB.mjs → shop.client-D0qZ3KZp.mjs} +13 -13
  139. package/dist/client/{shop.interactive-BH0xDlMF.mjs → shop.interactive-DAKyWK1B.mjs} +89 -19
  140. package/dist/client/{shopShared-BEfD0e4m.mjs → shopShared-CztcSe9i.mjs} +2 -2
  141. package/dist/client/spam-protection.mjs +1 -1
  142. package/dist/client/{timetableModel-BG7Ejxdr.mjs → timetableModel-D1jDTbms.mjs} +11 -11
  143. package/dist/client/{types-5fOsPIpL.mjs → types-B0hJldSt.mjs} +2 -0
  144. package/dist/client/{useAvailableSlots-GP8tnAVW.mjs → useAvailableSlots-ByHedoBi.mjs} +4 -8
  145. package/dist/client/{useDiscountApply-Cq07nTyG.mjs → useDiscountApply-CHGYDxdM.mjs} +2 -2
  146. package/dist/client/{useDiscountCodeUi-CD82QX5i.mjs → useDiscountCodeUi-Dew9UAEy.mjs} +1 -1
  147. package/dist/client/{useEventPagination-spj7sGQP.mjs → useEventPagination-BpC7-ksE.mjs} +7 -7
  148. package/dist/client/{view-oToSpu1N.mjs → view-BxeiAL3c.mjs} +121 -28
  149. package/dist/client/{view-aAP2WbCR.mjs → view-ShYH3WXh.mjs} +3 -3
  150. package/dist/preview-next/before-render.mjs +33 -13
  151. package/dist/preview-next/chrome.css +4 -0
  152. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-8-qtHjpb.mjs → EventEmbeddedCheckoutStep-CKe4cjZ4.mjs} +1 -1
  153. package/dist/preview-next/client/{LocationPickerEnvironment-CwxRbAs2.mjs → LocationPickerEnvironment-lW2aLGWd.mjs} +1 -1
  154. package/dist/preview-next/client/{MapLibreEditMap-CKjYUp_E.mjs → MapLibreEditMap-C9InQJpd.mjs} +2 -2
  155. package/dist/preview-next/client/{ArrangementLookControls-CoWdilcI.mjs → PageSectionToolbar-DsSqwrMS.mjs} +397 -23
  156. package/dist/preview-next/client/{PreviewEditorSidebar-BNCrO6PQ.mjs → PreviewEditorSidebar-BEEWzXnU.mjs} +3266 -3215
  157. package/dist/preview-next/client/{PreviewEditorUI-inVZkLCd.mjs → PreviewEditorUI-C86Out4V.mjs} +6 -39
  158. package/dist/preview-next/client/{PreviewShell-CFQlAHTe.mjs → PreviewShell-CBWYjBvQ.mjs} +50 -41
  159. package/dist/preview-next/client/{SdkPreviewModeRuntime-Dgl7ktO4.mjs → SdkPreviewModeRuntime-o-mVqWLx.mjs} +88 -394
  160. package/dist/preview-next/client/{SiteChromeCustomizeButton-DgDYHwkG.mjs → SiteChromeCustomizeButton-H_ciMNHA.mjs} +1249 -22697
  161. package/dist/preview-next/client/{ThemedButton-BQU45t-E.mjs → ThemedButton-CKYjeU_M.mjs} +2 -0
  162. package/dist/preview-next/client/{lucide-react-DbC1o6_9.mjs → lucide-react-DygTyy7K.mjs} +1 -1
  163. package/dist/preview-next/client/{previewAssistantSlot-DRDu7Ndv.mjs → previewAssistantSlot-CuOcsG_N.mjs} +3481 -2113
  164. package/dist/preview-next/client/{previewChromeSurface-K6Q5uEMC.mjs → previewChromeRoot-DPeV7KaP.mjs} +52 -14
  165. package/dist/preview-next/client/runtime.mjs +3 -3
  166. package/dist/preview-next/client/{sdk-runtime-AGypzhcO.mjs → sdk-runtime-zTTFZ4MM.mjs} +2 -2
  167. package/dist/preview-next/client/{useAutosaveStatus-B2mn_l6c.mjs → useAutosaveStatus-DNA1Q4L1.mjs} +2 -2
  168. package/dist/preview-next/client/{useBlockCustomizeControls-CBXHo6ph.mjs → useOpenBlockForSetup-BdnMlHC6.mjs} +40 -21
  169. package/dist/preview-next/container-responsive.css +3093 -0
  170. package/dist/preview-next/editor-base.css +90 -178
  171. package/dist/preview-next/editor-chrome.css +25 -8
  172. package/dist/preview-next/keepAlive.mjs +1 -1
  173. package/dist/preview-next/middleware.mjs +1 -1
  174. package/dist/preview-next/{route-contract-jc2Bug-h.mjs → route-contract-CtSgU8UZ.mjs} +547 -196
  175. package/dist/server/{Block.shared-BHgQjX16.mjs → Block.shared-ifgaBglp.mjs} +4 -4
  176. package/dist/server/ThemeScopeCore-DGDOH6OU.mjs +1983 -0
  177. package/dist/server/{accessibleSurfaces-D0q5tLSW.mjs → accessibleSurfaces-BuPNCWAK.mjs} +52 -2
  178. package/dist/server/bindings-CiYpie1M.mjs +1802 -0
  179. package/dist/server/{block-kinds-CdI7NvAW.mjs → block-kinds-DkzOr19P.mjs} +2 -0
  180. package/dist/server/{client-C-asG6Cf.mjs → client-ngWuFsmN.mjs} +638 -224
  181. package/dist/server/config-template-validation.mjs +30 -4
  182. package/dist/server/config-validation.mjs +1 -1
  183. package/dist/server/config.mjs +3 -34
  184. package/dist/server/data/resolveBlockData.mjs +1 -1
  185. package/dist/server/index.mjs +3 -3
  186. package/dist/server/loadContent-DeLQeJAZ.mjs +2310 -0
  187. package/dist/server/{loadPage-XgtQR90Z.mjs → loadPage-D4J747FQ.mjs} +2 -2
  188. package/dist/server/manifest.mjs +1 -1
  189. package/dist/server/next.mjs +8 -6
  190. package/dist/server/{opaqueSurface-Yltv_u7r.mjs → opaqueSurface-ukEz1BaM.mjs} +2 -2
  191. package/dist/server/{overrideResolution-Z5pwH-kz.mjs → overrideResolution-DSuVkpqm.mjs} +3 -2
  192. package/dist/server/page-converter.mjs +3 -3
  193. package/dist/server/pageRegions-BaeEF2MU.mjs +30 -0
  194. package/dist/server/{pageRenderPlan-DQAo35og.mjs → pageRenderPlan-DFv3h4Ib.mjs} +309 -289
  195. package/dist/server/{pageRuntimeSupport-g-K-FCHa.mjs → pageRuntimeSupport-yHaRNWMj.mjs} +48 -35
  196. package/dist/server/{pageShared-7mPhqqXX.mjs → pageShared-CAZD0LcY.mjs} +875 -328
  197. package/dist/server/parseThemeForPersistence-Dl7LIBJq.mjs +52 -0
  198. package/dist/server/{prebuild-C0m4KOT9.mjs → prebuild-BKOCND3b.mjs} +1 -1
  199. package/dist/server/prebuild.mjs +1 -1
  200. package/dist/server/{prefetchBlockData-DcLKHfHG.mjs → prefetchBlockData-GIoExi8A.mjs} +4 -3
  201. package/dist/server/{registry-7_0_lUrh.mjs → registry-BogXzcOD.mjs} +4015 -2009
  202. package/dist/server/rendering/components/pageShared.mjs +1 -1
  203. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  204. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  205. package/dist/server/rendering/server.mjs +3 -3
  206. package/dist/server/rendering.mjs +7 -7
  207. package/dist/server/{resolveBlockData-q3WnpvyZ.mjs → resolveBlockData-CT4YSBve.mjs} +4 -3
  208. package/dist/server/{resolveButtonColourStates-Cn6j8Ee0.mjs → resolveButtonColourStates-DVISOQD9.mjs} +2 -0
  209. package/dist/server/rich-text-CRcONdyM.mjs +33 -0
  210. package/dist/server/{richTextSchema-DQ2NBP0n.mjs → richTextSchema-QLaQrbII.mjs} +31 -2
  211. package/dist/server/{parseThemeForPersistence-BebSeE17.mjs → schema-C92Q8y0-.mjs} +463 -53
  212. package/dist/server/server.mjs +3 -3
  213. package/dist/server/theme-bridge.mjs +2 -2
  214. package/dist/server/theme.mjs +2 -1
  215. package/dist/server/{three-pass-converter-CQWdnfjV.mjs → three-pass-converter-Bsfdy_ZV.mjs} +11 -8
  216. package/dist/server/{validation-CSMS6XmP.mjs → validation-vSBCWU3w.mjs} +9 -9
  217. package/dist/server/{version-DWeqmTXc.mjs → version-Cw5vFmUY.mjs} +1 -1
  218. package/dist/styles/index.css +521 -59
  219. package/package.json +1 -1
  220. package/dist/client/Page-Bu5TJU3L.mjs +0 -52239
  221. package/dist/client/StepIndicator-CR7_0yu4.mjs +0 -432
  222. package/dist/client/form-RTqunrpz.mjs +0 -85
  223. package/dist/preview-next/client/useOpenBlockForSetup-BpZnBznt.mjs +0 -28
  224. package/dist/server/ThemeScopeCore-Ck0dhZA6.mjs +0 -24236
  225. package/dist/server/bindings-CAbTvrCZ.mjs +0 -257
  226. package/dist/server/headerVariant-8O5MvxIU.mjs +0 -464
  227. package/dist/server/loadContent-DKerbSnI.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 replaceInlineTextRange, Ad as richTextVariantCapabilities, Am as DialogClose, Bd as applyInlineTextMarkToRange, Bm as __assign, C as selectedImageFromMediaValue, Cm as DialogContent$1, Df as getCuratedSiteStyle, Dh as cn$2, Dm as DialogTitle$1, Eh as useComposedRefs, Em as DialogHeader, F as nextLookTilePin, Fm as DialogTitle, Gd as inlineTextHighlightTones, Gm as __rest, Hm as __extends, If as getGradientPreset, Jd as normalizeInlineText, Kd as inlineTextToPlainText, Km as __spreadArray, Kn as rankBackgroundImagePoolItems, Ln as backgroundColorTokens, Mm as DialogDescription, Na as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, Nm as DialogOverlay, O_ as asLayoutVariantKey, Od as RichTextDocSchema, Pf as gradientToCss, Pm as DialogPortal, Qd as removeInlineTextMarkFromRange, Sh as cva, Ud as inlineTextAccentTones, Um as __generator, Vm as __awaiter, Wd as inlineTextEqual, Wm as __read, Yd as normalizeInlineTextMarks, Zd as plainTextToInlineText, Zp as unwrapResponse, _h as Primitive, ag as surfaceForegroundValue, ah as useSize, am as SelectItem, ay as unsafeAsPositiveByteCount, c_ as normalizeRightAngle, d_ as resolveMediaTransformForAspect, ef as truncateInlineText, f_ as getDirectImageUrlForMediaAsset, gh as composeEventHandlers, hh as createContextScope, im as SelectContent, iy as unsafeAsMediaAssetId, ja as resolveMediaStorageUrl, jm as DialogContent, jr as getBlockDefinition, k as usePreviewRenderBackgrounds, ka as resolveImageUrlWithContext, l_ as formatAspectRatioToken, lm as usePrevious, ny as assertNever, om as SelectTrigger, p_ as getImageUrl, ph as useControllableState, qm as __spreadArrays, rm as Select, s_ as isRotationDimensionSwap, sm as SelectValue, sp as assertNever$1, u_ as parseAspectRatioValue, w as selectedImageFromRenderableAsset, wa as computeMediaTransformStyle, wm as DialogDescription$1, x_ as mediaIdentifierSchema, xa as getRichTextImageSize, xh as useControlReadiness, xm as Dialog, y_ as resolveManagedMediaReference, yh as Button, z_ as generateUuidV4, zn as defaultBackgroundOverrideForMode, zt as getDashboardBaseUrl } from "./previewAssistantSlot-DRDu7Ndv.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, Bt as readThemeScopeContext, D as usePreviewCompiledThemeOptional, Q as useMediaEditor, Xt as Input, d as CustomizeBackgroundColorPicker, et as useApiMediaUploader, ln as classifyKnownMimeType, tt as TransferError } from "./SiteChromeCustomizeButton-DgDYHwkG.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-CBXHo6ph.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";
@@ -172,6 +172,7 @@ const footerModeSchema = z.enum([
172
172
  //#endregion
173
173
  //#region ../ui/src/scrollable-dialog-shell.tsx
174
174
  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 }) {
175
+ const portalContainer = usePortalContainer();
175
176
  const inner = /* @__PURE__ */ jsxs(Fragment$1, { children: [
176
177
  /* @__PURE__ */ jsx("div", {
177
178
  "data-slot": "scrollable-dialog-header",
@@ -204,6 +205,7 @@ function ScrollableDialogShell({ header, footer, children, mobileFullscreen = fa
204
205
  ] });
205
206
  return /* @__PURE__ */ jsxs(DialogPortal, {
206
207
  "data-slot": "dialog-portal",
208
+ container: portalContainer,
207
209
  children: [/* @__PURE__ */ jsx(DialogOverlay, {
208
210
  "data-slot": "dialog-overlay",
209
211
  className: "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50"
@@ -21616,7 +21618,6 @@ function BlockTypeDropdown({ editor, onOpenChange, tone = "dark" }) {
21616
21618
  "data-rb-document-toolbar": richTextDocumentOwner(editor),
21617
21619
  align: "start",
21618
21620
  className: cn$1("min-w-[12rem] p-1", tone === "light" ? "border-2 border-input bg-white text-slate-900" : "border border-slate-700 bg-slate-950/95 text-slate-100"),
21619
- container: typeof document !== "undefined" ? document.getElementById("builder-editor-chrome-root") : void 0,
21620
21621
  children: options.map((option) => {
21621
21622
  const active = option.isActive(editor);
21622
21623
  return /* @__PURE__ */ jsxs(DropdownMenuItem, {
@@ -21674,10 +21675,7 @@ function ToolbarIconButton({ children, ariaLabel, isActive, label, widthClassNam
21674
21675
  children: label
21675
21676
  }) : null]
21676
21677
  })
21677
- }), /* @__PURE__ */ jsx(TooltipContent, {
21678
- container: typeof document !== "undefined" ? document.getElementById("builder-editor-chrome-root") : void 0,
21679
- children: ariaLabel
21680
- })] });
21678
+ }), /* @__PURE__ */ jsx(TooltipContent, { children: ariaLabel })] });
21681
21679
  }
21682
21680
  //#endregion
21683
21681
  //#region ../editor/src/primitives/rich-text/toolbar/linkPopoverUtils.ts
@@ -22107,7 +22105,7 @@ function RichTextToolbar({ editor, buttons, onPickImage, linkItems, onRequestLin
22107
22105
  const [isHovered, setIsHovered] = useState(false);
22108
22106
  const [isFocused, setIsFocused] = useState(false);
22109
22107
  const [isMenuOpen, setIsMenuOpen] = useState(false);
22110
- const [chromeRoot, setChromeRoot] = useState(null);
22108
+ const portalContainer = usePortalContainer() ?? null;
22111
22109
  useEffect(() => {
22112
22110
  if (!editor) return;
22113
22111
  const handleFocus = () => setIsFocused(true);
@@ -22119,11 +22117,6 @@ function RichTextToolbar({ editor, buttons, onPickImage, linkItems, onRequestLin
22119
22117
  editor.off("blur", handleBlur);
22120
22118
  };
22121
22119
  }, [editor]);
22122
- useEffect(() => {
22123
- if (host.kind !== "chrome") return;
22124
- if (typeof window === "undefined") return;
22125
- setChromeRoot(document.getElementById("builder-editor-chrome-root") ?? null);
22126
- }, [host.kind]);
22127
22120
  if (!editor || buttons.length === 0) return null;
22128
22121
  if (!shouldShowToolbar(visibility, {
22129
22122
  isFocused,
@@ -22212,12 +22205,12 @@ function RichTextToolbar({ editor, buttons, onPickImage, linkItems, onRequestLin
22212
22205
  "data-rb-document-toolbar": richTextDocumentOwner(editor),
22213
22206
  onMouseEnter: () => setIsHovered(true),
22214
22207
  onMouseLeave: () => setIsHovered(false),
22215
- 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"),
22216
22209
  children: /* @__PURE__ */ jsx(TooltipProvider, {
22217
22210
  delayDuration: 200,
22218
22211
  children: buttons.map(renderButton)
22219
22212
  })
22220
- }), chromeRoot);
22213
+ }), portalContainer);
22221
22214
  }
22222
22215
  /** Hosting follows this toolbar's admitted visibility, retaining its interaction state while hidden. */
22223
22216
  function renderToolbarHost(host, toolbar, chromeRoot) {
@@ -30455,11 +30448,6 @@ function useRichTextImageProjection(fallbackSiteId) {
30455
30448
  function useSiteColourVariables() {
30456
30449
  return usePreviewCompiledThemeOptional()?.colourVariables ?? null;
30457
30450
  }
30458
- /** A token's colour as CSS: the site's value when known, otherwise the variable in scope. */
30459
- function siteColourCss(variables, token) {
30460
- const channels = variables?.[`--tb-${token}`];
30461
- return channels ? `rgb(${channels})` : `rgb(var(--tb-${token}))`;
30462
- }
30463
30451
  //#endregion
30464
30452
  //#region ../preview-next/src/client/blocks/BlockBackgroundChooser.tsx
30465
30453
  function BackgroundChooser({ editingSlot, capability, current, imagePoolStatus, onChoose }) {
@@ -31203,4 +31191,390 @@ function arrangementLookNote(look, styleName) {
31203
31191
  }
31204
31192
  }
31205
31193
  //#endregion
31206
- 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 };