@riverbankcms/sdk 0.173.0 → 0.174.1

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 (208) hide show
  1. package/README.md +6 -1
  2. package/dist/_dts/{BlocksIslandsHydrator-O50mTMCY.d.ts → BlocksIslandsHydrator-YRmc-Yxz.d.ts} +1 -1
  3. package/dist/_dts/{Page-Bk99sJwV.d.ts → Page-Du0zX1B-.d.ts} +27 -16
  4. package/dist/_dts/{SdkPreviewMode-DzAue6Kj.d.ts → SdkPreviewMode-4L8v3FkY.d.ts} +14 -7
  5. package/dist/_dts/{client-ZlNEIvlU.d.ts → client-B1J6Akyf.d.ts} +1 -1
  6. package/dist/_dts/{content-types-DBXPNc0h.d.ts → content-types-CGGYI0u_.d.ts} +2 -2
  7. package/dist/_dts/{contracts-D9bhu0bb.d.ts → contracts-CHMlw9hT.d.ts} +5 -4
  8. package/dist/_dts/{footerPageOutline-Bfap3soN.d.ts → footerPageOutline-DIHSU1Vr.d.ts} +6 -6
  9. package/dist/_dts/{generatePageMetadata-DwCdg31h.d.ts → generatePageMetadata-JITXD6BU.d.ts} +2 -2
  10. package/dist/_dts/{index-Dq_AboWN.d.ts → index-BLEKFHt1.d.ts} +1 -1
  11. package/dist/_dts/{index-BnatulTs.d.ts → index-BgOr1Xyz.d.ts} +3 -3
  12. package/dist/_dts/{index-KXh8FQ2s.d.ts → index-CF62FntA.d.ts} +2 -2
  13. package/dist/_dts/{index-CJzs-yIJ.d.ts → index-CXZSy_9M.d.ts} +2 -2
  14. package/dist/_dts/{index-DutLU2d2.d.ts → index-D9ZYmGAJ.d.ts} +2 -1
  15. package/dist/_dts/{index-DW3eeNph.d.ts → index-DpJm0NpL.d.ts} +4 -4
  16. package/dist/_dts/{index-C611wjIL.d.ts → index-yWDbUojb.d.ts} +1 -1
  17. package/dist/_dts/{loadContent-Bde2y870.d.ts → loadContent-M-s0p0rq.d.ts} +11 -11
  18. package/dist/_dts/{request-Bysk4QPI.d.ts → request-BK-pHf0P.d.ts} +3685 -1762
  19. package/dist/_dts/{resolveBlockData-ChbNvpSF.d.ts → resolveBlockData-DZAlnhwt.d.ts} +5 -5
  20. package/dist/_dts/{resolvePageContent-CGa6QMgc.d.ts → resolvePageContent-DXUCWJ3y.d.ts} +2 -2
  21. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  22. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  23. package/dist/_dts/sdk/src/client.d.ts +9 -9
  24. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  25. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  26. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  27. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  28. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  29. package/dist/_dts/sdk/src/data/types.d.ts +2 -2
  30. package/dist/_dts/sdk/src/index.d.ts +8 -8
  31. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  32. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  33. package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
  34. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  35. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  36. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  37. package/dist/_dts/sdk/src/portal/client.d.ts +4 -2
  38. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  39. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  40. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  41. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  42. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  43. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  44. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  45. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +13 -8
  46. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  47. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  48. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  49. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  50. package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
  51. package/dist/_dts/sdk/src/server.d.ts +5 -5
  52. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  53. package/dist/_dts/sdk/src/theme/index.d.ts +36 -204
  54. package/dist/_dts/{types-BwitGNTl.d.ts → types-CwmB2NHU.d.ts} +7 -7
  55. package/dist/_dts/{types-BoEk9ZON.d.ts → types-DjVNADXR.d.ts} +3 -3
  56. package/dist/_dts/{types-kpp8XyXv.d.ts → types-Dmow_FI6.d.ts} +2 -2
  57. package/dist/_dts/{validation-ChftKX-o.d.ts → validation-h8t1HLlL.d.ts} +4 -4
  58. package/dist/client/{BlocksIslandsHydrator-BnUeSE3d.mjs → BlocksIslandsHydrator-DRVx_XLi.mjs} +17 -17
  59. package/dist/client/{BookingMailingListNote-LHQMODqB.mjs → BookingMailingListNote-CwrMzj-k.mjs} +10 -10
  60. package/dist/client/{BookingPanelArrangement-Be704P85.mjs → BookingPanelArrangement-C2_hFT6K.mjs} +1 -1
  61. package/dist/client/{BookingQuestionFields-BewbU_cV.mjs → BookingQuestionFields-DZMrGvBh.mjs} +3 -3
  62. package/dist/client/{CalendarNavigationChevron-BMZp3RS3.mjs → CalendarNavigationChevron-Az1-TIEI.mjs} +6 -6
  63. package/dist/client/{DemoBookingPortalAccess-CARUWQ_E.mjs → DemoBookingPortalAccess-1p-pJ1lg.mjs} +5 -5
  64. package/dist/client/{EventCalendar.client-CaI6upCX.mjs → EventCalendar.client-CDkkP-Lv.mjs} +9 -9
  65. package/dist/client/{EventCombined.client-CoRUaYHY.mjs → EventCombined.client-DK3aaz62.mjs} +7 -7
  66. package/dist/client/{EventItem-Doe4KodB.mjs → EventItem-WeUipfIP.mjs} +4 -4
  67. package/dist/client/{EventListWeekNavigation-CXWLKDfa.mjs → EventListWeekNavigation-D3sbAeDo.mjs} +1 -1
  68. package/dist/client/{EventListing.client-DvJ5tGTx.mjs → EventListing.client-DL3gGGmF.mjs} +3 -3
  69. package/dist/client/{EventListing.view-BmfyK7S5.mjs → EventListing.view-DKFImKOx.mjs} +6 -6
  70. package/dist/client/{EventRegistrationPayment-DwMlJB2V.mjs → EventRegistrationPayment-Dn9TpWyL.mjs} +45 -18
  71. package/dist/client/{LocationMapActions-CdRPU6gp.mjs → LocationMapActions-BJT7MqP2.mjs} +1 -1
  72. package/dist/client/{MapDrawingSvg-DCLtxOnt.mjs → MapDrawingSvg-DCIwlON6.mjs} +1 -1
  73. package/dist/client/{Page-D46Dmr7b.mjs → Page-BpeP9xdt.mjs} +731 -1549
  74. package/dist/client/{StepIndicator-CrSZCZn1.mjs → StepIndicator-CP6zrwkl.mjs} +6 -242
  75. package/dist/client/{accessibleSurfaces-D4DhWo9j.mjs → accessibleSurfaces-DN8it_Cx.mjs} +35 -7
  76. package/dist/client/{accordion-P8xcfKxq.mjs → accordion-nR7D4m1a.mjs} +1 -1
  77. package/dist/client/{booking-form.client-BM2s-NqR.mjs → booking-form.client-Ce-mQZ7W.mjs} +362 -47
  78. package/dist/client/{bookingForm-JnaZPZge.mjs → bookingForm-B-qT_AQB.mjs} +4 -4
  79. package/dist/client/bookings.mjs +6 -6
  80. package/dist/client/{boxStyleClassNames-Cahps5kR.mjs → boxStyleClassNames-CrE3TDpW.mjs} +2 -29
  81. package/dist/client/{carousel-CQQ_m0KA.mjs → carousel-CVUOatsY.mjs} +1 -1
  82. package/dist/client/{cart-0Q4fjw_K.mjs → cart-DE0K6E0R.mjs} +3 -3
  83. package/dist/client/{cart.client-BI0IaHX3.mjs → cart.client-C23E6WQ5.mjs} +1 -1
  84. package/dist/client/{checkout-1J-3ftxF.mjs → checkout-76cdHyPL.mjs} +3 -3
  85. package/dist/client/{checkout.client-DOGYDlDk.mjs → checkout.client-DJOzqb26.mjs} +1 -1
  86. package/dist/client/{checkoutUrls-CwHqcqzP.mjs → checkoutUrls-CvIP5DCO.mjs} +1 -1
  87. package/dist/client/client.mjs +159 -7
  88. package/dist/client/{context-D0KCgbOq.mjs → context-CNlesLfF.mjs} +1 -1
  89. package/dist/client/{course-CmOuoZHN.mjs → course-DHIrXqNT.mjs} +2 -2
  90. package/dist/client/{creditProducts-BTRX4edc.mjs → creditProducts-KYMVIH3J.mjs} +2 -84
  91. package/dist/client/{dateFormatting-Dmfaczzq.mjs → dateFormatting-B73Ll0s4.mjs} +9 -1
  92. package/dist/client/{demoPortalMagicLink-CL7KGRta.mjs → demoPortalMagicLink-BVbLD4pi.mjs} +1 -1
  93. package/dist/client/{display-lL-YRApN.mjs → display-Cf_j5stk.mjs} +2574 -763
  94. package/dist/client/{enhanceHeaderSection-B-eLGs2C.mjs → enhanceHeaderSection-5GD5o4Mt.mjs} +3 -3
  95. package/dist/client/{event-details.client-DH1-Jxsh.mjs → event-details.client-D7Oz1q2L.mjs} +1 -1
  96. package/dist/client/{event-registration.client-GuuElczW.mjs → event-registration.client-zbuX36aA.mjs} +137 -131
  97. package/dist/client/{eventCalendar-BiCINPkV.mjs → eventCalendar-uZrksODt.mjs} +4 -4
  98. package/dist/client/{eventCombined-BtzmH6FW.mjs → eventCombined-DxhvNAx8.mjs} +4 -4
  99. package/dist/client/{eventDetails-BJpAD10-.mjs → eventDetails-DCIH4BYG.mjs} +2 -2
  100. package/dist/client/{eventListing-jLB8iRqp.mjs → eventListing-B9KrnPvc.mjs} +4 -4
  101. package/dist/client/{eventRegistration-WhtpDEbq.mjs → eventRegistration-TjnURMKl.mjs} +4 -4
  102. package/dist/client/{form-DO6qKH3M.mjs → form-CfqIAhfN.mjs} +3 -3
  103. package/dist/client/{form.client-D12ljYiX.mjs → form.client-CL6fF0cW.mjs} +6 -6
  104. package/dist/client/{form.parts-C8QHaQOI.mjs → form.parts-Bf-L66Gg.mjs} +1 -1
  105. package/dist/client/{formatDate-BnhfIpCa.mjs → formatDate-Dp7POa9Y.mjs} +1 -1
  106. package/dist/client/gifting/client.mjs +2 -2
  107. package/dist/client/{headerSection-BtFWtoUm.mjs → headerSection-WVXtOcuW.mjs} +2 -2
  108. package/dist/client/{newsletter-form.client-oHrqM_Ao.mjs → newsletter-form.client-Bb7GAZpO.mjs} +9 -7
  109. package/dist/client/{newsletter-form.parts-D5U-FuVy.mjs → newsletter-form.parts-BqOVRdIc.mjs} +1 -1
  110. package/dist/client/{newsletterForm-CBYbFxSx.mjs → newsletterForm-DOVe-qY3.mjs} +3 -3
  111. package/dist/client/{noop-CN0o0yjH.mjs → noop-D5mFWXtN.mjs} +30 -6
  112. package/dist/client/portal/client.mjs +346 -272
  113. package/dist/client/{product-detail.client-d_sNCapC.mjs → product-detail.client-CNzeFnFf.mjs} +1 -1
  114. package/dist/client/{product-list.client-DkSpw6WQ.mjs → product-list.client-LKpzC7pj.mjs} +1 -1
  115. package/dist/client/{productDetail-DaqM-LgL.mjs → productDetail-D2JNeEgx.mjs} +3 -3
  116. package/dist/client/{productList-CMx4-XlG.mjs → productList-DTgZXOEq.mjs} +3 -3
  117. package/dist/client/{propsDecoder-BZbUKstC.mjs → propsDecoder-mpBQt2AT.mjs} +3 -3
  118. package/dist/client/{registry.server-Cdot3dMk.mjs → registry.server-DdTJyar2.mjs} +31 -47
  119. package/dist/client/rendering/client.mjs +26 -26
  120. package/dist/client/rendering/islands.mjs +1 -1
  121. package/dist/client/rendering.mjs +16 -13
  122. package/dist/client/{richText-coerce-ByApwB4q.mjs → richText-coerce-C32cRQ03.mjs} +1 -1
  123. package/dist/client/{routeIslandApiConfig-DTET8f__.mjs → routeIslandApiConfig-8cfSgT0E.mjs} +1 -1
  124. package/dist/client/{runtimeResponse-IkOwKZD0.mjs → runtimeResponse-9v8q2NBc.mjs} +1 -1
  125. package/dist/client/runtimeResponse-CVkM0dHy.mjs +3 -0
  126. package/dist/client/{shop-Cy6xXDM7.mjs → shop-5LBhftWx.mjs} +3 -3
  127. package/dist/client/{shop-commerce-oDR76k1q.mjs → shop-commerce-DkValjZj.mjs} +12 -12
  128. package/dist/client/{shop-commerce-store-DjoUpL3a.mjs → shop-commerce-store-BOmXFmk_.mjs} +1 -1
  129. package/dist/client/{shop-discount-apply.state-WsGb9DD8.mjs → shop-discount-apply.state-D0ifS6KX.mjs} +2 -2
  130. package/dist/client/{shop.client-Brha4BSM.mjs → shop.client-BTtZqNmv.mjs} +13 -13
  131. package/dist/client/{shop.interactive-CXhYl0DW.mjs → shop.interactive-DNRqG4aX.mjs} +18 -24
  132. package/dist/client/{shopShared-JCa_SRhP.mjs → shopShared-Nky6kPYr.mjs} +2 -2
  133. package/dist/client/{timetableModel-CZeJwMxP.mjs → timetableModel-DZArznD_.mjs} +25 -152
  134. package/dist/client/{useAvailableSlots-DfbSkWop.mjs → useAvailableSlots-CUVRD1nx.mjs} +24 -4
  135. package/dist/client/{useDiscountApply-Dq-wjb1d.mjs → useDiscountApply-BBnStWXU.mjs} +1 -1
  136. package/dist/client/{useDiscountCodeUi-Cyy0meCH.mjs → useDiscountCodeUi-d7viY_mu.mjs} +1 -1
  137. package/dist/client/{useEventPagination-CCAGQHsD.mjs → useEventPagination-Da2JqxGC.mjs} +6 -6
  138. package/dist/client/{view-Sw075FOY.mjs → view-BvuYmQJ5.mjs} +2 -2
  139. package/dist/client/{view-D6yebI4r.mjs → view-D9ObkFtz.mjs} +12 -11
  140. package/dist/preview-next/client/{LocationPickerEnvironment-D4F_5rnr.mjs → LocationPickerEnvironment-8iKKoYZr.mjs} +1 -1
  141. package/dist/preview-next/client/{MapLibreEditMap-BKMNxSEJ.mjs → MapLibreEditMap-AIUPN1Zx.mjs} +2 -2
  142. package/dist/preview-next/client/{PageSectionToolbar-DG2rXUmo.mjs → PageSectionToolbar-DwxHT-2k.mjs} +57 -144
  143. package/dist/preview-next/client/{PreviewEditorSidebar-BDY5vdHU.mjs → PreviewEditorSidebar-D4SBxGU6.mjs} +758 -1279
  144. package/dist/preview-next/client/{PreviewEditorUI-CqZCfOaz.mjs → PreviewEditorUI-D8mUct32.mjs} +29 -26
  145. package/dist/preview-next/client/{PreviewShell-Bv2HZ7JY.mjs → PreviewShell-L2AEdNUQ.mjs} +50 -30
  146. package/dist/preview-next/client/{SdkPreviewModeRuntime-BMTcR-MW.mjs → SdkPreviewModeRuntime-bhVAU2D2.mjs} +47 -19
  147. package/dist/preview-next/client/{lucide-react-BCNn8dEQ.mjs → lucide-react-Dfgl3Vtq.mjs} +7 -1
  148. package/dist/preview-next/client/{previewAssistantSlot-La6MerV_.mjs → previewAssistantSlot-Jpj_HDra.mjs} +101003 -51855
  149. package/dist/preview-next/client/{previewChromeRoot-BcOQqJIP.mjs → previewChromeRoot-CYTDvx4u.mjs} +1 -1
  150. package/dist/preview-next/client/runtime.mjs +3 -3
  151. package/dist/preview-next/client/{sdk-runtime-BkckHox4.mjs → sdk-runtime-CZHX6J_4.mjs} +2 -2
  152. package/dist/preview-next/client/siteStyleAccess-DmGIG9Hk.mjs +9356 -0
  153. package/dist/preview-next/client/{useAutosaveStatus-CPAHgGqI.mjs → useAutosaveStatus-DQCyswQ-.mjs} +2 -2
  154. package/dist/preview-next/client/{useOpenBlockForSetup-BDkuSZxQ.mjs → useOpenBlockForSetup-LwE5yXvL.mjs} +19 -4
  155. package/dist/preview-next/container-responsive.css +117 -32
  156. package/dist/preview-next/keepAlive.mjs +1 -1
  157. package/dist/preview-next/middleware.mjs +1 -1
  158. package/dist/preview-next/{route-contract-CPV30ABr.mjs → route-contract-BOuNcOcN.mjs} +153 -2
  159. package/dist/server/{Block.shared-BaMMstO1.mjs → Block.shared-wfJfhs08.mjs} +10 -5
  160. package/dist/server/{ThemeScopeCore-D1NTXZdX.mjs → ThemeScopeCore-BtrJNHTB.mjs} +23 -6
  161. package/dist/server/{accessibleSurfaces-Dbd2__Le.mjs → accessibleSurfaces-CM3QANtw.mjs} +22 -5
  162. package/dist/server/{bindings-Dge4sqel.mjs → bindings-P1CF2Gm6.mjs} +6 -4
  163. package/dist/server/{client-VVIQjC4r.mjs → client-CGtU5fHI.mjs} +156 -4
  164. package/dist/server/config-validation.mjs +1 -1
  165. package/dist/server/config.mjs +2 -2
  166. package/dist/server/customCss-BGB8gMVb.mjs +210 -0
  167. package/dist/server/data/resolveBlockData.mjs +1 -1
  168. package/dist/server/index.mjs +2 -2
  169. package/dist/server/{loadContent-BIJb3WAK.mjs → loadContent-ChnkJSay.mjs} +8 -9
  170. package/dist/server/{loadPage-DjTU19y7.mjs → loadPage-DesHhgxj.mjs} +3 -3
  171. package/dist/server/lookMediaFrame-BBr0mkze.mjs +2626 -0
  172. package/dist/server/manifest.mjs +2 -2
  173. package/dist/server/next.mjs +9 -8
  174. package/dist/server/{overrideResolution-1Ru3NMQj.mjs → overrideResolution-DHEkHcZs.mjs} +3 -4
  175. package/dist/server/page-converter.mjs +2 -2
  176. package/dist/server/{pageRenderPlan-CytPhrI9.mjs → pageRenderPlan-0jvm0RBk.mjs} +29 -331
  177. package/dist/server/{pageRuntimeSupport-DWspU5EZ.mjs → pageRuntimeSupport-8-f1Zr9e.mjs} +14 -6
  178. package/dist/server/{pageShared-Bhx8bVe1.mjs → pageShared-CuVFoV4z.mjs} +370 -291
  179. package/dist/server/{parseThemeForPersistence-CtgRtvo3.mjs → parseThemeForPersistence-Cwqb5pZx.mjs} +2 -2
  180. package/dist/server/{portal-Ce1Prfl3.mjs → portal-BjVHMAUC.mjs} +1 -1
  181. package/dist/server/portal.mjs +1 -1
  182. package/dist/server/{prebuild-BjvFb0CA.mjs → prebuild-Bms_Y7wQ.mjs} +1 -1
  183. package/dist/server/prebuild.mjs +1 -1
  184. package/dist/server/{prefetchBlockData-Db3stNpp.mjs → prefetchBlockData-5oC5kyHe.mjs} +2 -2
  185. package/dist/server/{registry-BMCfcev6.mjs → registry-DmqxC8th.mjs} +1258 -3166
  186. package/dist/server/rendering/components/pageShared.mjs +1 -1
  187. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  188. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +2 -2
  189. package/dist/server/rendering/server.mjs +3 -3
  190. package/dist/server/rendering.mjs +7 -7
  191. package/dist/server/{resolveBlockData--yUbI-Ll.mjs → resolveBlockData-EYogtwQc.mjs} +1 -1
  192. package/dist/server/{resolveButtonColourStates-CCPUY9Xh.mjs → resolveButtonColourStates--6yJp9Tq.mjs} +15 -4
  193. package/dist/server/{schema-D5Vfmqzw.mjs → schema-CUDHMirj.mjs} +46 -153
  194. package/dist/server/server.mjs +3 -3
  195. package/dist/server/{src-Cxucn-1P.mjs → src-DHK4JUlp.mjs} +4 -1
  196. package/dist/server/theme-bridge.mjs +21 -15
  197. package/dist/server/theme.mjs +2 -2
  198. package/dist/server/{three-pass-converter-Bsfdy_ZV.mjs → three-pass-converter-39SXCCnh.mjs} +1 -1
  199. package/dist/server/{titleSourceSchema-DwKJfMYb.mjs → titleSourceSchema-Cu-3PRvv.mjs} +0 -1
  200. package/dist/server/{validation-EgTtnTcY.mjs → validation-Bt_8IL1g.mjs} +4 -4
  201. package/dist/server/{version-LjgU0Cq1.mjs → version-DT_efohp.mjs} +1 -1
  202. package/dist/styles/index.css +989 -279
  203. package/package.json +1 -1
  204. package/dist/client/bookability-SargNwlO.mjs +0 -17
  205. package/dist/client/runtimeResponse-Wd6kwhE_.mjs +0 -3
  206. package/dist/preview-next/client/SiteChromeCustomizeButton-D1MGyN_Z.mjs +0 -55403
  207. package/dist/server/customCss-QymcmOZ-.mjs +0 -97
  208. package/dist/server/opaqueSurface-COEKXVwk.mjs +0 -54
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import { n as __exportAll } from "./rolldown-runtime-CE6sIgz8.mjs";
3
- import { $f as admitLayoutGridForPlan, $m as planRepeaterGridStartNewRow, $n as getAtPath, $p as defaultPolicyPageFlowPresetId, $t as useSidebarView, $u as suggestSemanticIconForFeatureCard, $v as asAppearancePresetId, $y as unsafeAsEditorBlockId, A as usePreviewRenderReadiness, Ag as useId$1, Ah as unwrapResponse, Ai as chooseScheduleScope, Am as sectionTransitionVariantForBoundaryOptionId, An as getGroupChildFields, At as listPageSurfaceContentSlots, Ay as parseNewsletterListId, Bb as unsafeAsSiteId, Bg as composeEventHandlers, Bh as CalloutDescription, Br as buildNewsletterFormInteractiveIslandProps, Bv as runtimeMediaSchema, Ca as resolveMediaSlotContract, Cg as Portal$1, Cn as initialBlockDraftValues, Ct as partitionFieldsByIntent, Dg as Root2$1, Di as EVENT_SELECTION_SCOPE_OPTIONS, Dm as defaultSectionTransitionVariantForFamily, Dn as getFieldDefault, Dt as deleteSlotBlock, Dy as parseBrevoListId, Ef as isBlockButtonRole, Eg as Content, En as manifestFieldSectionOptions, Et as deleteBlock, Fb as parseMediaAssetId, Fg as useDirection, Fh as journalTrustAt, Ft as normalizeApiError, Fv as parseAspectRatioValue, Fy as publicProfileWeekdays, Gh as DialogDescription$1, Gp as getHeaderStyle, Gt as routeLifecycleContext, Gv as PUBLIC_FILE_FIELD_KINDS, Gy as pristineValueSync, Hh as Dialog, Hn as rankBackgroundImagePoolItems, I as selectedLookTile, Ig as createCollection, Im as appearancePresets, In as enabledBackgroundModes, Ip as sectionPhotoPresence, Iv as resolveMediaTransformForAspect, Iy as publishedContactDetails, J as runHeldLifecycle, Jh as DialogTitle$1, Jm as projectRepeaterGridLayout, Jt as resolveContentTitle, Ju as createFeatureCardIconKey, Jy as createEditorInsertBlockCommand, Kg as cva, Kh as DialogFooter, Km as buildRepeaterGridDropTargets, Kp as concretePaletteFromTheme, Kt as deriveRouteMetadataPresentation, Ku as FEATURE_CARD_GENERATED_ICON_SIZE_PX, Kv as mediaIdentifierSchema, Ky as syncStateOf, Lg as useControllableState, Ln as imagePoolForOverride, Lt as getDashboardUrl, Lv as getDirectImageUrlForMediaAsset, Mb as assertNever$1, Mg as useFocusGuards, Mh as sidebarReturnView, Mi as toggleEventType, Mn as readSliderFieldUiConfig, Mp as resolveVisiblePromotedFieldPathsForEditorBlock, Mr as getBlockDefinition, Mt as reorderSlotBlocks, Mv as isRotationDimensionSwap, My as knownSocialPlatformLabels, N as lookTilePosition, Ng as DismissableLayer, Nh as journalLabels, Ni as writeEventSelectionChips, Nr as listBlockDescriptors, Nt as withSlotCompositionHash, Ny as knownSocialPlatforms, O as usePreviewJoinOutcome, Og as createPopperScope, Oi as EVENT_SELECTION_TYPE_OPTIONS, Om as sectionTransitionFamilies, On as getRepeaterItemDefault, Op as parseFieldDefinition, Ot as isSurfaceSlotBlockTarget, Oy as parseMailchimpAudienceId, P as lookTilesFor, Ph as journalTargetKey, Pn as canCycleBackgroundOverrideValue, Pt as blocksKeys, Py as parsePublicProfile, Qg as useShallow, Qm as normalizeRepeaterGridSpan, Qy as editorBlockCollectionOwnersEqual, S as setPageDesignBlockBackground, Sg as Presence, So as planOfferingPreviewCardSelection, St as isNonEmptyValue, Sy as parseMailingListPlacementTargeting, Tf as BLOCK_BUTTON_ROLE_OPTIONS, Tg as Arrow$1, Tn as createManifestValidation, Tt as createSlotBlock, Ty as mailingListTargetingChoiceIds, Ug as Button$1, Uh as DialogClose, Um as isInternalResolvedLinkValue, Un as resolveBackgroundCapability, Uy as displayedValues, V as usePreviewAuth, Vb as expectParsedBrandedId, Vg as Primitive, Vh as CalloutTitle, Vn as planBackgroundTransition, Vt as ApiRequestError, W as useEntryController, Wg as buttonVariants, Wh as DialogContent, Wm as planLayoutGridColumnEdit, Wp as getHeaderLayout, Wy as knownRevision, X as useServerRefresh, Xg as useComposedRefs, Xm as flowRepeaterGridItems, Xt as useEditorUiStore, Xu as parseFeatureCardGeneratedIconSizePx, Xy as createEditorReorderBlocksCommand, Yh as DialogTrigger, Ym as findFirstAvailableRepeaterGridPlacement, Yt as planLeaseNotice, Yu as getFeatureCardIconCompletion, Yv as isBodyFontFamily, Yy as createEditorRemoveBlockCommand, Z as useSessionJournal, Zg as cn, Zm as isRepeaterGridLayoutInvalid, Zt as useEditorUiStoreInstance, Zu as resolveFeatureCardGeneratedIconSizePx, Zy as editorBlockCollectionOwnerKey, __ as buttonStyleSelectionKey, _a as resolveImageSourceSetWithContext, _b as resolveBookingTimeZoneId, _h as editorAdmissionSession, _n as useStore, _o as isOfferingsPreviewSourceKey, _t as collectVisibleWhenWatchPaths, am as palettesForSiteStyle, bb as toUtcIsoDateTimeString, bn as deriveEditorValuePublicationState, bt as getWidgetKey, by as resolveMailingListDefaultDestination, c_ as resolveRepeaterGridRowFieldId, cg as usePortalContainer, cn as journalNoticeMessage, cp as parseBlockIconValue, ct as LeaseNoticeButtons, d as cycleSiteChromeSelectionId, d_ as buttonStyleHoverPreferenceValue, dm as getGradientPreset, dp as parseGeneratedIconSetId, dt as JournalWriteRefused, e_ as isEdited, eb as unsafeAsEditorBlockValues, ed as toFeatureCardIconSuggestionInputs, eg as DialogDescription, eh as resolveRepeaterGridAcceptedSpans, en as recoveryConflictCopy, ep as deriveFieldValidationPlan, er as siblingPath$2, f_ as buttonStyleSelectionParameterValue, fm as buildFontPreviewUrl, fp as parseSiteIconStyleGuideVersionId, g_ as updateButtonStyleSelectionChoice, gb as resolveBookingBusinessTimeZone, gm as findCuratedPalette, go as inferLegacyOfferingsPreviewGroupOrder, gt as derivePromotedFieldPlan, h_ as updateButtonStyleHoverPreference, ht as publishContentEntry, hy as slugify$1, i as usePreviewSidebarNavigation, im as offeredSiteStyles, ip as sanitizeHref, jd as buildFormInteractiveIslandProps, jg as FocusScope, ji as readEventSelectionChips, jn as readNumberFieldUiConfig, jt as reorderBlocks, kg as useSize, kh as extractApiEnvelopeErrorDetails, ki as chooseAllEvents, km as sectionTransitionFamilyForBoundaryOptionId, kn as normalizeFieldForCanonicalValidation, kt as listEntryPageContentSlots, ky as parseMailchimpInterestId, l_ as resolveRepeaterGridSpanFieldId, lg as ReactRemoveScroll, lh as resolveBlockTitle, lm as gradientToCss, ln as lifecycleOutcomeMessage, m_ as resolveButtonStyleSelection, mb as parseBookingLocalDate, mh as editorAdmissionIsOpen, mp as coerceInlineTextWithFallback, mt as missingReceiptError, my as generateUuidV4, n as usePreviewAssistantSlot, n_ as readLinkedEntryLease, nb as formatDateTime, nh as resolveRepeaterGridColumnsForBreakpoint, nm as getCuratedSiteStyle, nn as unfinishedBlockCopy, np as isRichTextDoc, o as usePreviewPageDesignEditorState, o_ as isAcceptedRepeaterGridSpan, op as getBlockIconSemanticId, p_ as findButtonStyleRecipe, pa as computeMediaTransformStyle, pt as sendPageCommand, q as DONE, qg as createSlot, qh as DialogHeader, qm as planRepeaterGridSpanChange, qp as concretePaletteToTheme, qt as resolvePageRouteSlug, qv as asRecord, qy as valueStatus, r_ as canEditorWrite, rg as DialogTitle, s as usePreviewPageDesignRenderState, s_ as resolveRepeaterGridColumnFieldId, sn as selectJournalWriteState, sp as getGeneratedBlockIconStyleState, st as LeaseDiscardedNoticeView, sy as authoredValuesEqual, t_ as canWriteLinkedEntry, tb as formatDate, th as resolveRepeaterGridBreakpointForWidth, tr as withValueAtPath, u as useSiteChromeCustomizeOptional, u_ as siteOptionSources, um as GRADIENT_PRESETS, up as parseGeneratedIconAssetId, v as buildPageDesignEditorReadModelForBlocks, va as resolveImageUrlWithContext, vg as hideOthers, vn as toEditorBlockItem, vo as normalizeOfferingsPreviewGroupOrder, vt as evaluateVisibility, wa as buildResolveImageUrlContext, wg as Anchor, wn as createManifestFormAdapter, wo as resolveOfferingsPreviewGroupOrderEntries, wp as plainTextToInlineText, wt as createBlock, wy as DEFAULT_MAILING_LIST_TARGETING, x as pageDesignLookTiles, xt as hasVisibilityConditions, xy as mailingListProviderName, yb as parseUtcIsoDateTimeString, yh as OPERATION_ID_HEADER, ym as findFooterLook, yn as withoutServerVersions, yp as inlineTextToPlainText, yt as getFieldIntent, yv as paletteValueKey, yy as assessMailingListTargeting, zb as parseSiteId, zg as createContextScope, zh as Callout, zn as parseBackgroundOverrideFromContent, zv as mediaSchema } from "./previewAssistantSlot-La6MerV_.mjs";
4
- import { $ as EllipsisVertical, A as LoaderCircle, B as ImageOff, E as Maximize2, G as FileText, Gt as err, Kt as ok, L as Image, O as Lock, P as Link2, R as ImageUp, S as Palette, U as GripVertical, Z as EyeOff, _t as Box$1, b as PanelTop, bt as ArrowUpRight, c as Trash2, d as SlidersHorizontal, dt as ChevronRight, f as Settings, ft as ChevronLeft, g as RotateCcw, ht as Calendar$1, i as Video, it as Clock3, lt as CircleAlert, m as Rows3, mt as Check, n as X$1, nt as Copy, pt as ChevronDown, rt as Clock, s as TriangleAlert, t as lucide_react_exports, tt as Crop, u as Sparkles, v as Plus, x as PanelBottom, xt as ArrowDown, y as Pencil, yt as ArrowUp, z as ImagePlus } from "./lucide-react-BCNn8dEQ.mjs";
5
- import { $ as footerCreditLine, $t as Textarea, An as removeFooterEngagementSection, B as useSiteEditorAdmission, Cn as Trigger$1, Ct as ThemeScopeCore, D as SiteFontFaceStyles, Dn as normalizeLegacyFooterContentToV1, En as deriveFooterEditorOverview, Fn as footerArrangementPolicy, G as SiteOptionWidgetProvider, Gt as themeRuntimeScopeProps, H as buildFooterRuntimeViewModel, In as planFooterArrangement, J as getFooterEngagementAuthoringOptions, Jt as DEFAULT_THEME_RESPONSIVE_MODE, K as useSiteOptionWidgetContext, Kt as buildThemeRuntime, L as siteColourCss, Mn as setFooterSectionSelected, Nn as upsertFooterEngagementSection, On as parseFooterEngagementSection, Pn as validateFooterComposition, Q as updatePublicProfile, R as locationWidgetOverrides, S as isHeaderMenuSurfaceState, Sn as Root$2, St as revealEditorElement, Tn as classifyKnownMimeType, U as resolveFooterLayoutHints, Ut as buildThemeDataAttrs, X as updateFooterComposition, Xt as CHOSEN_OPTION_CLASS, Y as getPublicProfile, Z as updateFooterCredit, Zt as ChoiceTileGroup, _n as Content$2, _t as unmapValueFromSelect, an as usePrevious$1, b as resolvePreviewSidebarChromeModel, bn as Trigger$2, bt as useField, cn as FieldTrigger, ct as useImageResolveContextOptional, d as CustomizeBackgroundControlRows, dn as FIELD_SURFACE_CLASS, dt as BlockContextProvider, en as Select$1, ft as useBlockContext, g as resolvePreviewDashboardSetupHandoff, gn as TabsTrigger, gt as mapOptionValueForSelect, h as buildPreviewDashboardSetupUrl, hn as TabsList, ht as mapCurrentValueForSelect, in as SelectValue, jn as resolveFooterSections, k as useRememberSiteFonts, ln as Input, lt as FormNodeClient, mn as TabsContent, mt as hasEmptyOption, n as SiteChromeSurfaceControls, nn as SelectItem, on as clamp, ot as NewsletterFormClient, p as canInspectSiteStyle, pn as Tabs, pt as SelectField, q as getFooterComposition, r as dashboardLogoSettingsHref, rn as SelectTrigger, sn as SearchInput, tn as SelectContent, tt as useMediaEditor, un as FIELD_FOCUS_WITHIN_CLASS, ut as BlockApiProvider, v as resolvePreviewEditorGuidanceModel, vn as List, vt as FieldFrame, x as HeaderMenuControls, xn as Content$1, xt as useLinkedInlineTextField, yn as Root2$2, yt as FieldLabelText } from "./SiteChromeCustomizeButton-D1MGyN_Z.mjs";
3
+ import { $ as useFooterComposerState, $a as getGeneratedBlockIconStyleState, $c as buttonVariants, $i as FEATURE_CARD_GENERATED_ICON_SIZE_PX, $l as asRecord, $n as readSliderFieldUiConfig, $o as buildFontPreviewUrl, $s as DialogHeader, $t as listEntryPageContentSlots, $u as parseBookingLocalDate, A as usePreviewJoinOutcome, An as lifecycleOutcomeMessage, At as toRoutableLinkPayload, Au as knownSocialPlatforms, Bc as FocusScope, Bn as withoutServerVersions, Bs as unwrapResponse, Bt as derivePromotedFieldPlan, Bu as knownRevision, C as pageDesignLookTiles, Ci as resolveImageUrlWithContext, Cl as updateButtonStyleHoverPreference, Cn as recoveryConflictCopy, Co as DEFAULT_THEME_RESPONSIVE_MODE, Cs as planRepeaterGridStartNewRow, Cu as mailingListTargetingChoiceIds, Dc as hideOthers, Di as resolveMediaSlotContract, Ds as resolveBlockTitle, Dt as sendPageCommand, Du as parseMailchimpInterestId, Ei as resolveMediaSlot, Es as resolveRepeaterGridColumnsForBreakpoint, Eu as parseMailchimpAudienceId, F as lookTilePosition, Fc as Content$1, Fi as buildResolveImageUrlContext, Fl as paletteValueKey, Fo as getHeaderLayout, Fr as siblingPath$2, Fs as OPERATION_ID_HEADER, Ft as NewsletterFormClient, Gc as createCollection, Gi as normalizeOfferingsPreviewGroupOrder, Gl as mediaSchema, Gn as createManifestFormAdapter, Gs as Callout, Gt as hasVisibilityConditions, Gu as createEditorRemoveBlockCommand, Hc as DismissableLayer, Hl as resolveMediaTransformForAspect, Hs as sidebarReturnView, Ht as evaluateVisibility, Hu as syncStateOf, I as lookTilesFor, Ic as Root2$1, Io as getHeaderStyle, Ir as withValueAtPath, J as footerLayoutSelection, Jc as createContextScope, Jn as getFieldDefault, Js as Dialog, Jt as createBlock, Ju as editorBlockCollectionOwnersEqual, Ka as admitLayoutGridForPlan, Kc as useControllableState, Kl as runtimeMediaSchema, Kn as createManifestValidation, Ko as offeredSiteStyles, Ks as CalloutDescription, Kt as isNonEmptyValue, Ku as createEditorReorderBlocksCommand, La as BLOCK_BUTTON_ROLE_OPTIONS, Lc as createPopperScope, Lo as concretePaletteFromTheme, Lt as useImageResolveContextOptional, M as usePreviewRenderReadiness, Mc as Portal$1, Mt as updateFooterComposition, Mu as publicProfileWeekdays, Nc as Anchor, Nt as footerCreditLine, Nu as publishedContactDetails, Ot as missingReceiptError, Ou as parseNewsletterListId, Pc as Arrow$1, Pr as getAtPath, Q as useFooterAuthoringOptional, Qa as getBlockIconSemanticId, Qc as Button$1, Qi as themeRuntimeScopeProps, Ql as mediaIdentifierSchema, Qn as readNumberFieldUiConfig, Qo as getGradientPreset, Qs as DialogFooter, Qt as isSurfaceSlotBlockTarget, Qu as formatDateTime, R as selectedLookTile, Ra as isBlockButtonRole, Rc as useSize, Rl as isRotationDimensionSwap, Ro as concretePaletteToTheme, Rt as FormNodeClient, Si as resolveImageSourceSetWithContext, Sl as resolveButtonStyleSelection, Sn as useSidebarView, Ss as normalizeRepeaterGridSpan, Su as DEFAULT_MAILING_LIST_TARGETING, Tl as buttonStyleSelectionKey, Tn as unfinishedBlockCopy, To as resolveVisiblePromotedFieldPathsForEditorBlock, Ts as resolveRepeaterGridBreakpointForWidth, Tt as LeaseNoticeButtons, Tu as parseBrevoListId, U as usePreviewAuth, Ui as inferLegacyOfferingsPreviewGroupOrder, Ul as getDirectImageUrlForMediaAsset, Ut as getFieldIntent, Uu as valueStatus, Vc as useFocusGuards, Vl as parseAspectRatioValue, Vn as deriveEditorValuePublicationState, Vo as defaultPolicyPageFlowPresetId, Vt as collectVisibleWhenWatchPaths, Vu as pristineValueSync, Wc as useDirection, Wi as isOfferingsPreviewSourceKey, Wn as initialBlockDraftValues, Wo as getCuratedSiteStyle, Wt as getWidgetKey, Wu as createEditorInsertBlockCommand, X as resolveFooterEngagementPreview, Xc as Primitive, Xi as buildThemeDataAttrs, Xn as normalizeFieldForCanonicalValidation, Xo as gradientToCss, Xs as DialogContent, Xt as deleteBlock, Xu as unsafeAsEditorBlockValues, Y as resolveFooterEngagementAuthoringState, Ya as isRichTextDoc, Yc as composeEventHandlers, Yi as resolveOfferingsPreviewGroupOrderEntries, Yn as getRepeaterItemDefault, Ys as DialogClose, Yt as createSlotBlock, Yu as unsafeAsEditorBlockId, Z as FooterComposerProvider, Za as sanitizeHref, Zl as PUBLIC_FILE_FIELD_KINDS, Zn as getGroupChildFields, Zo as GRADIENT_PRESETS, Zs as DialogDescription$1, Zt as deleteSlotBlock, Zu as formatDate, _c as usePortalContainer, _i as writeEventSelectionChips, _l as resolveRepeaterGridSpanFieldId, _n as resolveContentTitle, _s as planRepeaterGridSpanChange, _u as resolveFooterSections, aa as toFeatureCardIconSuggestionInputs, ad as parseMediaAssetId, al as useComposedRefs, ao as coerceInlineTextWithFallback, as as sectionTransitionFamilies, at as readFooterEngagementDraft, b as buildPageDesignEditorReadModelForBlocks, bl as buttonStyleSelectionParameterValue, bn as useEditorUiStoreInstance, bo as buildThemeRuntime, bs as flowRepeaterGridItems, bu as planFooterLayout, cr as planBackgroundTransition, cu as slugify$1, d as cycleSiteChromeSelectionId, dc as Content, di as EVENT_SELECTION_SCOPE_OPTIONS, dl as readLinkedEntryLease, ds as appearancePresets, dt as DONE, du as resolveMailingListDefaultDestination, ea as createFeatureCardIconKey, ec as DialogTitle$1, ed as resolveBookingBusinessTimeZone, en as listPageSurfaceContentSlots, eo as parseBlockIconValue, fc as Root$2, fi as EVENT_SELECTION_TYPE_OPTIONS, fl as canEditorWrite, ft as runHeldLifecycle, fu as mailingListProviderName, gi as toggleEventType, gl as resolveRepeaterGridRowFieldId, gn as resolvePageRouteSlug, gs as buildRepeaterGridDropTargets, hi as readEventSelectionChips, hl as resolveRepeaterGridColumnFieldId, hn as deriveRouteMetadataPresentation, ho as plainTextToInlineText, hs as planLayoutGridColumnEdit, hu as parseFooterCompositionV1, i as usePreviewSidebarNavigation, ia as suggestSemanticIconForFeatureCard, id as assertNever$1, in as blocksKeys, ir as imagePoolForOverride, is as defaultSectionTransitionVariantForFamily, it as footerPartKey, jc as Presence, jt as publishContentEntry, ju as parsePublicProfile, ko as sectionPhotoPresence, kt as footerMenuNavigationFacts, ku as knownSocialPlatformLabels, lc as DialogTitle, ld as parseSiteId, ll as isEdited, lr as rankBackgroundImagePoolItems, lt as useEntryController, mi as chooseScheduleScope, ml as isAcceptedRepeaterGridSpan, mn as routeLifecycleContext, ms as isInternalResolvedLinkValue, mu as normalizeLegacyFooterContentToV1, n as usePreviewAssistantSlot, na as parseFeatureCardGeneratedIconSizePx, nd as parseUtcIsoDateTimeString, ni as getBlockDefinition, nl as createSlot, nn as reorderSlotBlocks, no as parseGeneratedIconSetId, nt as footerHeaderStatus, nu as asAppearancePresetId, o as usePreviewPageDesignEditorState, oc as DialogDescription, ol as cn, on as getDashboardUrl, or as parseBackgroundOverrideFromContent, os as sectionTransitionFamilyForBoundaryOptionId, ot as footerEngagementEventFields, ou as authoredValuesEqual, pc as Trigger$1, pi as chooseAllEvents, pt as useServerRefresh, pu as deriveFooterEditorOverview, q as buildFooterRuntimeViewModel, qa as deriveFieldValidationPlan, qi as planOfferingPreviewCardSelection, qn as manifestFieldSectionOptions, qo as palettesForSiteStyle, qs as CalloutTitle, qt as partitionFieldsByIntent, qu as editorBlockCollectionOwnerKey, ra as resolveFeatureCardGeneratedIconSizePx, rd as toUtcIsoDateTimeString, ri as listBlockDescriptors, rn as withSlotCompositionHash, ro as parseSiteIconStyleGuideVersionId, rr as enabledBackgroundModes, rs as findCuratedPalette, rt as footerEngagementStarted, s as usePreviewPageDesignRenderState, si as buildNewsletterFormInteractiveIslandProps, sl as useShallow, ss as sectionTransitionVariantForBoundaryOptionId, st as parseFooterEngagementDraft, su as generateUuidV4, ta as getFeatureCardIconCompletion, tc as DialogTrigger, td as resolveBookingTimeZoneId, tl as cva, tn as reorderBlocks, to as parseGeneratedIconAssetId, tr as canCycleBackgroundOverrideValue, tu as isBodyFontFamily, u as useSiteChromeCustomizeOptional, ud as expectParsedBrandedId, ul as canWriteLinkedEntry, un as ApiRequestError, uo as inlineTextToPlainText, ur as resolveBackgroundCapability, uu as assessMailingListTargeting, v as useLiveFooterRuntime, va as buildFormInteractiveIslandProps, vc as ReactRemoveScroll, vl as siteOptionSources, vn as planLeaseNotice, vs as projectRepeaterGridLayout, vu as setFooterSectionSelected, w as setPageDesignBlockBackground, wl as updateButtonStyleSelectionChoice, ws as resolveRepeaterGridAcceptedSpans, wt as LeaseDiscardedNoticeView, xi as computeMediaTransformStyle, xl as findButtonStyleRecipe, xs as isRepeaterGridLayoutInvalid, xu as parseMailingListPlacementTargeting, yl as buttonStyleHoverPreferenceValue, yn as useEditorUiStore, yo as parseFieldDefinition, ys as findFirstAvailableRepeaterGridPlacement, yu as unsafeAsFooterModuleId, zc as useId$1, zn as toEditorBlockItem, zs as extractApiEnvelopeErrorDetails, zt as BlockApiProvider, zu as displayedValues } from "./previewAssistantSlot-Jpj_HDra.mjs";
4
+ import { $ as EllipsisVertical, A as LoaderCircle, B as ImageOff, E as Maximize2, G as FileText, Kt as err, L as Image, O as Lock, P as Link2, R as ImageUp, S as Palette, U as GripVertical, Z as EyeOff, _t as Box$1, b as PanelTop, bt as ArrowUpRight, c as Trash2, d as SlidersHorizontal, dt as ChevronRight, f as Settings, ft as ChevronLeft, g as RotateCcw, ht as Calendar$1, i as Video, it as Clock3, lt as CircleAlert, m as Rows3, mt as Check, n as X$1, nt as Copy, pt as ChevronDown, qt as ok, rt as Clock, s as TriangleAlert, t as lucide_react_exports, tt as Crop, u as Sparkles, v as Plus, x as PanelBottom, xt as ArrowDown, y as Pencil, yt as ArrowUp, z as ImagePlus } from "./lucide-react-Dfgl3Vtq.mjs";
5
+ import { $ as FieldFrame, B as useSiteOptionWidgetContext, Ct as clamp, D as SiteFontFaceStyles, Dt as Input, Et as NativeSelect, Ft as Content$2, H as useMediaEditor, It as List, J as SelectField, K as BlockContextProvider, L as siteColourCss, Lt as Root2$2, Mt as TabsContent, Nt as TabsList, Ot as FIELD_FOCUS_WITHIN_CLASS, Pt as TabsTrigger, Q as unmapValueFromSelect, R as locationWidgetOverrides, Rt as Trigger$2, St as usePrevious$1, Tt as FieldTrigger, X as mapCurrentValueForSelect, Y as hasEmptyOption, Z as mapOptionValueForSelect, _t as Select$1, at as ThemeScopeCore, bt as SelectTrigger, c as resolvePreviewSidebarChromeModel, d as dashboardLogoSettingsHref, et as FieldLabelText, f as HeaderMenuControls, gt as Textarea, i as resolvePreviewDashboardSetupHandoff, it as revealEditorElement, jt as Tabs, k as useRememberSiteFonts, kt as FIELD_SURFACE_CLASS, m as CustomizeBackgroundControlRows, mt as ChoiceTileGroup, nt as useField, o as resolvePreviewEditorGuidanceModel, p as isHeaderMenuSurfaceState, pt as CHOSEN_OPTION_CLASS, q as useBlockContext, r as buildPreviewDashboardSetupUrl, rt as useLinkedInlineTextField, t as canInspectSiteStyle, tt as hintWithCharacterLimit, u as SiteChromeSurfaceControls, vt as SelectContent, wt as SearchInput, xt as SelectValue, yt as SelectItem, z as SiteOptionWidgetProvider, zt as classifyKnownMimeType } from "./siteStyleAccess-DmGIG9Hk.mjs";
6
6
  import { J as paletteTokenNameSchema, V as hexColorSchema, W as paletteColorEntries, c as isKnownIconName, i as ThemedButtonSpecimen, l as isIconPickerPreset, o as getIconComponent, s as getIconPickerOptionsForPreset, tt as VARIANT_ROLES, u as resolveIconPickerPreset } from "./ThemedButton-CVYz7h68.mjs";
7
- import { A as ScrollableDialogContent, C as EMPTY_DOC, D as resolveSdkFooterMode, F as resolveVideoSelectionIntentForMediaField, I as isSvgMimeType, M as Surface, N as surfaceVariants, P as emitMediaCropDebug, S as useRichTextEditor, T as InlineTextEditor, _ as MediaPickerMiniDialog, a as ArrangementOptionsBody, b as getRichTextImagePositionFromTarget, c as BackgroundChooser, d as gradientLabel, f as readBackgroundColorPaletteSnapshot, g as MediaEditor, h as getUnresolvedRichTextImageWarnings, i as ArrangementLookNote, j as ScrollableDialogShell, k as Switch, l as BackgroundPreviewSwatch, m as useRichTextImageProjection, n as pageSectionIdFromBlockId, o as lookIsAutomatic, p as useSiteColourVariables, s as useArrangementToolbar, u as formatTokenLabel, v as MediaPickerMini, x as insertOrReplaceRichTextImage, y as RichTextEditorSurface } from "./PageSectionToolbar-DG2rXUmo.mjs";
7
+ import { A as ScrollableDialogContent, C as EMPTY_DOC, D as resolveSdkFooterMode, F as resolveVideoSelectionIntentForMediaField, I as isSvgMimeType, M as Surface, N as surfaceVariants, O as Switch, P as emitMediaCropDebug, S as useRichTextEditor, T as InlineTextEditor, _ as MediaPickerMiniDialog, a as ArrangementOptionsBody, b as getRichTextImagePositionFromTarget, c as BackgroundChooser, d as gradientLabel, f as readBackgroundColorPaletteSnapshot, g as MediaEditor, h as getUnresolvedRichTextImageWarnings, i as ArrangementLookNote, j as ScrollableDialogShell, k as SegmentedControl, l as BackgroundPreviewSwatch, m as useRichTextImageProjection, n as pageSectionIdFromBlockId, o as lookIsAutomatic, p as useSiteColourVariables, s as useArrangementToolbar, u as formatTokenLabel, v as MediaPickerMini, x as insertOrReplaceRichTextImage, y as RichTextEditorSurface } from "./PageSectionToolbar-DwxHT-2k.mjs";
8
8
  import { n as TZDate } from "./src-DzXUmsyK.mjs";
9
- import { i as useOptionalLocationPickerEnvironment, n as LocationPickerEnvironmentProvider } from "./LocationPickerEnvironment-D4F_5rnr.mjs";
10
- import { a as publicationLabel, o as Spinner, s as Separator, t as useAutosaveStatus } from "./useAutosaveStatus-CPAHgGqI.mjs";
11
- import { A as Tooltip, C as blockLookOwnedFieldPaths, D as showRawStyleFields, E as prepareBlockEditorManifest, F as DropdownMenu, H as DropdownMenuTrigger, I as DropdownMenuContent, L as DropdownMenuItem, M as TooltipProvider, N as TooltipTrigger, O as getBlockManifestFromSdkConfig, P as Badge, S as arrangementVisibilityValues, T as hideThemeV2RawStyleFields, V as DropdownMenuSeparator, _ as createFieldObservation, b as arrangementLookResolution, f as arrangementBlockControlsFor, g as isRecord$1, h as isObjectRecord, i as NEEDS_SETUP_LABEL, j as TooltipContent, k as mergeBlockDescriptors, l as needsSetupOf, m as createStoreBackend, n as resolveBlockManifest, o as blockNoticeLabel, p as arrangementLookNameFor, r as useBlockCustomizeControls, s as blockNoticeMessage, u as useBlockNotice, v as SdkConfigProvider, w as lookNotShownFieldIds, x as arrangementOwnedFieldIds, y as useSdkConfig } from "./useOpenBlockForSetup-BDkuSZxQ.mjs";
9
+ import { i as useOptionalLocationPickerEnvironment, n as LocationPickerEnvironmentProvider } from "./LocationPickerEnvironment-8iKKoYZr.mjs";
10
+ import { a as publicationLabel, o as Spinner, s as Separator, t as useAutosaveStatus } from "./useAutosaveStatus-DQCyswQ-.mjs";
11
+ import { A as Tooltip, C as blockLookOwnedFieldPaths, D as showRawStyleFields, E as prepareBlockEditorManifest, F as DropdownMenu, H as DropdownMenuTrigger, I as DropdownMenuContent, L as DropdownMenuItem, M as TooltipProvider, N as TooltipTrigger, O as getBlockManifestFromSdkConfig, P as Badge, S as arrangementVisibilityValues, T as hideThemeV2RawStyleFields, V as DropdownMenuSeparator, _ as createFieldObservation, b as arrangementLookResolution, f as arrangementBlockControlsFor, g as isRecord$1, h as isObjectRecord, i as NEEDS_SETUP_LABEL, j as TooltipContent, k as mergeBlockDescriptors, l as needsSetupOf, m as createStoreBackend, n as resolveBlockManifest, o as blockNoticeLabel, p as arrangementLookNameFor, r as useBlockCustomizeControls, s as blockNoticeMessage, u as useBlockNotice, v as SdkConfigProvider, w as lookNotShownFieldIds, x as arrangementOwnedFieldIds, y as useSdkConfig } from "./useOpenBlockForSetup-LwE5yXvL.mjs";
12
12
  import * as React$1 from "react";
13
13
  import React, { Fragment, createContext, forwardRef, memo, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
14
14
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -105,12 +105,12 @@ const CollapsibleTrigger = React$1.forwardRef(({ className, ...props }, ref) =>
105
105
  ...props
106
106
  }));
107
107
  CollapsibleTrigger.displayName = Trigger$1.displayName;
108
- const CollapsibleContent = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Content$1, {
108
+ const CollapsibleContent = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Content, {
109
109
  ref,
110
110
  className: cn(["data-[state=closed]:overflow-hidden data-[state=open]:overflow-visible data-[state=closed]:h-0 data-[state=open]:h-auto", "data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down"].join(" "), className),
111
111
  ...props
112
112
  }));
113
- CollapsibleContent.displayName = Content$1.displayName;
113
+ CollapsibleContent.displayName = Content.displayName;
114
114
  //#endregion
115
115
  //#region ../ui/src/editor-item-card-actions.tsx
116
116
  /**
@@ -3216,7 +3216,7 @@ var PopoverContentImpl = React$1.forwardRef((props, forwardedRef) => {
3216
3216
  onFocusOutside,
3217
3217
  onDismiss: () => context.onOpenChange(false),
3218
3218
  deferPointerDownOutside: true,
3219
- children: /* @__PURE__ */ jsx(Content, {
3219
+ children: /* @__PURE__ */ jsx(Content$1, {
3220
3220
  "data-state": getState(context.open),
3221
3221
  role: "dialog",
3222
3222
  id: context.contentId,
@@ -9706,7 +9706,7 @@ function createLayoutGridColumnEditBackend(backend, fields, base = "") {
9706
9706
  }
9707
9707
  //#endregion
9708
9708
  //#region ../block-form/src/widgets/TextField/TextField.tsx
9709
- function TextField$1({ path, backend, config }) {
9709
+ function TextField({ path, backend, config }) {
9710
9710
  const { value, error, setValue } = useField(path, backend);
9711
9711
  return /* @__PURE__ */ jsx(FieldFrame, {
9712
9712
  fieldPath: path,
@@ -9714,6 +9714,7 @@ function TextField$1({ path, backend, config }) {
9714
9714
  required: config.required,
9715
9715
  description: config.description,
9716
9716
  error: error?.message,
9717
+ hint: hintWithCharacterLimit(value ?? "", config.maxLength),
9717
9718
  children: ({ id }) => config.multiline ? /* @__PURE__ */ jsx(Textarea, {
9718
9719
  id,
9719
9720
  value: value ?? "",
@@ -11041,6 +11042,17 @@ function getDefaultValue(field) {
11041
11042
  return getFieldDefault(field, { resolve: getDefaultValue });
11042
11043
  }
11043
11044
  //#endregion
11045
+ //#region ../block-form/src/widgets/RepeaterField/utils/addButtonNoun.ts
11046
+ /**
11047
+ * "Add button", "Add image": the item's name in sentence case after the verb.
11048
+ * A name that starts with an acronym ("FAQ") keeps its capitals.
11049
+ */
11050
+ function addButtonNoun(itemLabel) {
11051
+ const label = itemLabel ?? "item";
11052
+ const [first = "", second = ""] = label;
11053
+ return second !== "" && second === second.toLowerCase() && second !== second.toUpperCase() ? first.toLowerCase() + label.slice(1) : label;
11054
+ }
11055
+ //#endregion
11044
11056
  //#region ../block-form/src/widgets/RepeaterField/utils/buildItemLabel.ts
11045
11057
  const UUID_LIKE_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
11046
11058
  function getStringValue$1(value) {
@@ -11105,6 +11117,13 @@ function deriveLabelFromItem(itemFields, itemValue, sourceFieldId) {
11105
11117
  }
11106
11118
  return null;
11107
11119
  }
11120
+ /** Nothing typed or chosen, however deep: what a row is before anyone's touched it. */
11121
+ function isBlankValue(value) {
11122
+ if (value == null) return true;
11123
+ if (typeof value === "string") return value.trim().length === 0;
11124
+ if (Array.isArray(value)) return value.every(isBlankValue);
11125
+ return typeof value === "object" && Object.values(value).every(isBlankValue);
11126
+ }
11108
11127
  function buildItemLabel(field, index, backend, basePath) {
11109
11128
  const itemValue = backend.getValue(`${basePath}.${index}`);
11110
11129
  const normalizedItemValue = itemValue && typeof itemValue === "object" && !Array.isArray(itemValue) ? itemValue : null;
@@ -11116,9 +11135,12 @@ function buildItemLabel(field, index, backend, basePath) {
11116
11135
  const label = sourceField ? readFieldDisplayValue(sourceField, value) : getStringValue$1(value);
11117
11136
  if (label) return label;
11118
11137
  }
11119
- const derived = deriveLabelFromItem(itemFields, normalizedItemValue, source);
11120
- if (derived) return derived;
11121
- return `${field.itemLabel ?? "Item"} ${index + 1}`;
11138
+ return deriveLabelFromItem(itemFields, normalizedItemValue, source) ?? unnamedItemLabel(field, itemFields, normalizedItemValue, index);
11139
+ }
11140
+ /** A row with no words to show: "New question" until it has any, then "Question 2". */
11141
+ function unnamedItemLabel(field, itemFields, itemValue, index) {
11142
+ const itemLabel = field.itemLabel ?? "Item";
11143
+ return itemFields.length > 0 && itemFields.every((child) => isBlankValue(itemValue?.[child.id])) ? `New ${addButtonNoun(itemLabel)}` : `${itemLabel} ${index + 1}`;
11122
11144
  }
11123
11145
  //#endregion
11124
11146
  //#region ../block-form/src/widgets/RepeaterField/utils/getRepeaterItemFields.ts
@@ -11880,58 +11902,6 @@ function RepeaterRowActions(props) {
11880
11902
  return /* @__PURE__ */ jsx(EditorItemCardActions, { ...buildRepeaterRowActions(props) });
11881
11903
  }
11882
11904
  //#endregion
11883
- //#region ../api/src/navigation/routableLink.ts
11884
- /**
11885
- * Prefer identifier-based links when available so links survive route/path updates.
11886
- * Falls back to an internal route payload for legacy rows or incomplete data.
11887
- */
11888
- function toRoutableLinkPayload(item) {
11889
- switch (item.entityType) {
11890
- case "page":
11891
- if (item.identifier) return {
11892
- kind: "page",
11893
- identifier: item.identifier
11894
- };
11895
- return toResolvedInternalPayload(item);
11896
- case "content":
11897
- if (item.identifier && item.contentTypeKey) return {
11898
- kind: "entry",
11899
- contentType: item.contentTypeKey,
11900
- identifier: item.identifier
11901
- };
11902
- return toResolvedInternalPayload(item);
11903
- case "pageSurface": return toResolvedInternalPayload(item);
11904
- default: return assertNever$1(item);
11905
- }
11906
- }
11907
- function toResolvedInternalPayload(item) {
11908
- return {
11909
- kind: "internal",
11910
- routeId: item.routeId,
11911
- entityId: item.entityId,
11912
- entityType: item.entityType,
11913
- href: item.path ?? "/",
11914
- title: item.title ?? item.draftTitle ?? "Untitled",
11915
- typeLabel: item.typeLabel,
11916
- contentTypeKey: item.contentTypeKey,
11917
- contentTypeName: item.contentTypeName,
11918
- updatedAt: item.updatedAt ?? null
11919
- };
11920
- }
11921
- //#endregion
11922
- //#region ../api/src/navigation.ts
11923
- async function getNavigationMenus(apiClient, { siteId, options }) {
11924
- try {
11925
- return unwrapResponse(await apiClient({
11926
- endpoint: "getNavigationMenus",
11927
- params: { siteId },
11928
- options
11929
- }));
11930
- } catch (error) {
11931
- normalizeApiError(error, "Failed to fetch navigation menus");
11932
- }
11933
- }
11934
- //#endregion
11935
11905
  //#region ../media-editor/src/fieldUi.ts
11936
11906
  function withRepeaterThumbnailMediaFieldUi(field, options) {
11937
11907
  if (!field || field.type !== "media") return null;
@@ -13142,17 +13112,6 @@ function RepeaterLayoutGrid({ config, backend, basePath, items, minItems, onMove
13142
13112
  });
13143
13113
  }
13144
13114
  //#endregion
13145
- //#region ../block-form/src/widgets/RepeaterField/utils/addButtonNoun.ts
13146
- /**
13147
- * "Add button", "Add image": the item's name in sentence case after the verb.
13148
- * A name that starts with an acronym ("FAQ") keeps its capitals.
13149
- */
13150
- function addButtonNoun(itemLabel) {
13151
- const label = itemLabel ?? "item";
13152
- const [first = "", second = ""] = label;
13153
- return second !== "" && second === second.toLowerCase() && second !== second.toUpperCase() ? first.toLowerCase() + label.slice(1) : label;
13154
- }
13155
- //#endregion
13156
13115
  //#region ../block-form/src/widgets/RepeaterField/components/RepeaterThumbnailGrid.tsx
13157
13116
  function getGridClassName(density) {
13158
13117
  if (density === "compact") return "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3";
@@ -21554,7 +21513,7 @@ function InlineTextControl({ path, config, value, error, onChange }) {
21554
21513
  * These live in @riverbankcms/editor-blocks and are passed via FormRenderer.widgetOverrides.
21555
21514
  */
21556
21515
  const WIDGET_COMPONENTS = {
21557
- text: TextField$1,
21516
+ text: TextField,
21558
21517
  inlineText: InlineTextField$1,
21559
21518
  number: NumberField,
21560
21519
  select: SelectField,
@@ -21865,6 +21824,7 @@ function FormRendererContent(input) {
21865
21824
  });
21866
21825
  return props.blockKind ? /* @__PURE__ */ jsx(BlockContextProvider, {
21867
21826
  blockKind: props.blockKind,
21827
+ mediaLook: props.visibilityValues?.mediaLook,
21868
21828
  children: content
21869
21829
  }) : content;
21870
21830
  }
@@ -25905,20 +25865,37 @@ function UnreadableMediaField({ config }) {
25905
25865
  children: /* @__PURE__ */ jsx(UnreadableMediaWarning, {})
25906
25866
  });
25907
25867
  }
25868
+ /** Derive the photo editor's presentation without changing its stored content. */
25869
+ function imageFieldPresentation(config, path, values, context) {
25870
+ const { blockKind, mediaLook } = context ?? {};
25871
+ const { contract: slot, mediaFrame: frame } = resolveMediaSlot({
25872
+ blockKind,
25873
+ fieldPath: path,
25874
+ values,
25875
+ fieldAspectRatio: config.aspectRatio,
25876
+ fieldUi: config.ui,
25877
+ mediaLook
25878
+ });
25879
+ return {
25880
+ ...editorPresentation(config),
25881
+ allowedKinds: config.mediaKinds ?? ["image"],
25882
+ previewAspectRatio: slot.edit.mode === "fixed-aspect" ? parseAspectRatioValue(slot.edit.aspectRatio) : void 0,
25883
+ previewBorderRadius: frame?.borderRadius,
25884
+ minSourceWidth: slot.edit.minSourceWidth,
25885
+ minSourceHeight: slot.edit.minSourceHeight,
25886
+ cropEditorMode: config.ui?.cropEditorMode ?? "dialog",
25887
+ cropEditorAutoOpen: config.ui?.cropEditorAutoOpen === true,
25888
+ videoPrepIntent: videoPrepIntentForMediaField(path, config.mediaKinds),
25889
+ videoSelectionIntent: videoSelectionIntentForMediaField(path, config.mediaKinds)
25890
+ };
25891
+ }
25908
25892
  function MediaField(props) {
25909
25893
  const { config, path, backend } = props;
25910
25894
  const { admission, setValue } = useAdmittedField(props);
25911
25895
  const blockContext = useBlockContext();
25912
25896
  if (admission.kind === "unreadable") return /* @__PURE__ */ jsx(UnreadableMediaField, { config });
25913
25897
  const { value } = admission;
25914
- const slot = resolveMediaSlotContract({
25915
- blockKind: blockContext?.blockKind,
25916
- fieldPath: path,
25917
- values: asRecord(backend.getValues()),
25918
- fieldAspectRatio: config.aspectRatio,
25919
- fieldUi: config.ui
25920
- });
25921
- const previewAspectRatio = slot.edit.mode === "fixed-aspect" ? parseAspectRatioValue(slot.edit.aspectRatio) : void 0;
25898
+ const presentation = imageFieldPresentation(config, path, asRecord(backend.getValues()), blockContext);
25922
25899
  const onChange = (next) => {
25923
25900
  emitMediaCropDebug("MediaField", "change", {
25924
25901
  path,
@@ -25937,15 +25914,7 @@ function MediaField(props) {
25937
25914
  ]),
25938
25915
  value,
25939
25916
  onChange,
25940
- ...editorPresentation(config),
25941
- allowedKinds: config.mediaKinds ?? ["image"],
25942
- previewAspectRatio,
25943
- minSourceWidth: slot.edit.minSourceWidth,
25944
- minSourceHeight: slot.edit.minSourceHeight,
25945
- cropEditorMode: config.ui?.cropEditorMode ?? "dialog",
25946
- cropEditorAutoOpen: config.ui?.cropEditorAutoOpen === true,
25947
- videoPrepIntent: videoPrepIntentForMediaField(path, config.mediaKinds),
25948
- videoSelectionIntent: videoSelectionIntentForMediaField(path, config.mediaKinds)
25917
+ ...presentation
25949
25918
  })
25950
25919
  });
25951
25920
  }
@@ -26866,7 +26835,7 @@ function globalFieldsSummary(form) {
26866
26835
  }
26867
26836
  //#endregion
26868
26837
  //#region ../editor-blocks/src/widgets/mailing-list-targeting/MailingListTargetingField.tsx
26869
- const inputClass$2 = "w-full rounded-md border bg-background px-3 py-2 text-sm";
26838
+ const inputClass$1 = "w-full rounded-md border bg-background px-3 py-2 text-sm";
26870
26839
  function useMailingListSetup() {
26871
26840
  const { siteId, load, manageHref } = useMailingListTargetingContext();
26872
26841
  const [loadState, setLoadState] = useState({ tag: "loading" });
@@ -27168,7 +27137,7 @@ function MailchimpAudience({ matched, setValue, name }) {
27168
27137
  children: "Audience"
27169
27138
  }), /* @__PURE__ */ jsxs("select", {
27170
27139
  id: selectId,
27171
- className: inputClass$2,
27140
+ className: inputClass$1,
27172
27141
  value: matched.targeting.audienceId,
27173
27142
  onChange: (event) => {
27174
27143
  const audienceId = parseMailchimpAudienceId(event.target.value);
@@ -28461,246 +28430,343 @@ function planFooterEditorView(input) {
28461
28430
  scopeLabel: "All pages",
28462
28431
  shown: overview.selected.map((item) => sectionPlan(item.section, true, missingIds.has(item.section.id), input.canEdit)),
28463
28432
  available: overview.available.map((item) => sectionPlan(item.section, false, false, input.canEdit)),
28464
- arrangement: planFooterArrangement(renderable, footerArrangementPolicy({
28465
- arrangement: input.arrangement,
28466
- storedNavigationLayout: input.navigationLayout
28467
- }))
28433
+ layout: planFooterLayout(renderable, { layout: input.layout })
28468
28434
  };
28469
28435
  }
28470
28436
  //#endregion
28471
- //#region ../content-editor/src/footerEngagementDraft.ts
28472
- function reduceFooterEngagementDraft(draft, event) {
28473
- switch (event.type) {
28474
- case "select-kind":
28475
- if (event.kind === draft.kind) return draft;
28476
- return event.kind === "standard-contact" ? createStandardContactDraft(sharedDraftFields(draft), "") : createEmptyMailingListDraft(sharedDraftFields(draft));
28477
- case "set-treatment": return {
28478
- ...draft,
28479
- treatment: event.treatment
28480
- };
28481
- case "set-heading": return {
28482
- ...draft,
28483
- heading: event.heading
28484
- };
28485
- case "set-intro": return {
28486
- ...draft,
28487
- intro: event.intro
28488
- };
28489
- case "set-form": return draft.kind === "standard-contact" ? {
28490
- ...draft,
28491
- formId: event.formId
28492
- } : draft;
28493
- case "set-mailing-targeting": return draft.kind === "mailing-list" ? {
28494
- ...draft,
28495
- targeting: event.targeting
28496
- } : draft;
28497
- default: return assertNever$1(event);
28498
- }
28499
- }
28500
- function createFooterEngagementDraft(section) {
28501
- const shared = {
28502
- treatment: section?.treatment ?? "integrated",
28503
- heading: section?.heading ?? "Stay in touch",
28504
- intro: section?.source.intro ?? ""
28505
- };
28506
- if (section?.source.kind === "standard-contact") return createStandardContactDraft(shared, section.source.formId);
28507
- if (section?.source.kind === "mailing-list") return createMailingListDraft(shared, section.source);
28508
- return createStandardContactDraft(shared, "");
28437
+ //#region ../content-editor/src/FooterBrandChoice.tsx
28438
+ const FOOTER_BRAND_COPY = {
28439
+ label: "Name or logo",
28440
+ name: "Name",
28441
+ logo: "Logo",
28442
+ both: "Name and logo",
28443
+ addLogoLink: "Add a logo in Settings",
28444
+ addLogoRest: " to show it here."
28445
+ };
28446
+ /** Stored footers that hid both (no longer offered) read as the name, which is what they now show. */
28447
+ function footerBrandChoice(section) {
28448
+ if (section.showLogo && section.showTitle) return "both";
28449
+ return section.showLogo ? "logo" : "name";
28509
28450
  }
28510
- function sharedDraftFields(draft) {
28451
+ function withFooterBrandChoice(composition, choice) {
28511
28452
  return {
28512
- treatment: draft.treatment,
28513
- heading: draft.heading,
28514
- intro: draft.intro
28453
+ ...composition,
28454
+ sections: composition.sections.map((section) => section.kind === "brand" ? {
28455
+ ...section,
28456
+ showLogo: choice !== "name",
28457
+ showTitle: choice !== "logo"
28458
+ } : section)
28515
28459
  };
28516
28460
  }
28517
- function createStandardContactDraft(shared, formId) {
28518
- return {
28519
- ...shared,
28520
- kind: "standard-contact",
28521
- formId
28522
- };
28461
+ /**
28462
+ * What sits at the top of the footer, as one choice. Hiding both isn't
28463
+ * offered (the brand row is removed from the footer instead), and with no
28464
+ * logo uploaded the footer shows the name whatever is chosen.
28465
+ */
28466
+ function FooterBrandChoiceControl({ composition, hasLogo, manageSettingsHref, onChange }) {
28467
+ const brand = composition.sections.find((section) => section.kind === "brand" && section.selected);
28468
+ if (!brand) return null;
28469
+ const value = hasLogo ? footerBrandChoice(brand) : "name";
28470
+ return /* @__PURE__ */ jsxs("div", {
28471
+ className: "space-y-1.5",
28472
+ children: [
28473
+ /* @__PURE__ */ jsx("div", {
28474
+ className: "text-sm font-medium",
28475
+ children: FOOTER_BRAND_COPY.label
28476
+ }),
28477
+ /* @__PURE__ */ jsx(SegmentedControl, {
28478
+ "aria-label": FOOTER_BRAND_COPY.label,
28479
+ size: "sm",
28480
+ className: "w-full",
28481
+ value,
28482
+ onValueChange: (choice) => onChange(withFooterBrandChoice(composition, choice)),
28483
+ options: [
28484
+ {
28485
+ value: "name",
28486
+ label: FOOTER_BRAND_COPY.name
28487
+ },
28488
+ {
28489
+ value: "logo",
28490
+ label: FOOTER_BRAND_COPY.logo,
28491
+ disabled: !hasLogo
28492
+ },
28493
+ {
28494
+ value: "both",
28495
+ label: FOOTER_BRAND_COPY.both,
28496
+ disabled: !hasLogo
28497
+ }
28498
+ ]
28499
+ }),
28500
+ hasLogo ? null : /* @__PURE__ */ jsxs("p", {
28501
+ className: "text-xs text-muted-foreground",
28502
+ children: [/* @__PURE__ */ jsx("a", {
28503
+ className: "underline underline-offset-2",
28504
+ href: manageSettingsHref,
28505
+ children: FOOTER_BRAND_COPY.addLogoLink
28506
+ }), FOOTER_BRAND_COPY.addLogoRest]
28507
+ })
28508
+ ]
28509
+ });
28510
+ }
28511
+ //#endregion
28512
+ //#region ../content-editor/src/FooterLiveTextField.tsx
28513
+ /**
28514
+ * One line or a few lines of footer text. The value and its saving belong to
28515
+ * the caller (the footer part hooks); this draws the field, saves on leaving it,
28516
+ * and says so when a save didn't go through.
28517
+ */
28518
+ function FooterLiveTextField({ label, hint, optional = false, error, maxLength, multiline = false, value, onChange, live }) {
28519
+ return /* @__PURE__ */ jsx(FieldFrame, {
28520
+ label,
28521
+ hint,
28522
+ optional,
28523
+ error: error ?? null,
28524
+ children: ({ id, descriptionId, messageId }) => {
28525
+ const props = {
28526
+ id,
28527
+ "aria-describedby": [descriptionId, messageId].filter(Boolean).join(" ") || void 0,
28528
+ "aria-invalid": error ? true : void 0,
28529
+ maxLength,
28530
+ value,
28531
+ onBlur: live.flush
28532
+ };
28533
+ return multiline ? /* @__PURE__ */ jsx(Textarea, {
28534
+ ...props,
28535
+ rows: 2,
28536
+ onChange: (event) => onChange(event.target.value)
28537
+ }) : /* @__PURE__ */ jsx(Input, {
28538
+ ...props,
28539
+ onChange: (event) => onChange(event.target.value)
28540
+ });
28541
+ }
28542
+ });
28523
28543
  }
28524
- function createEmptyMailingListDraft(shared) {
28544
+ /** Shown under a part's fields when its last save failed. What the owner typed stays in the fields. */
28545
+ function FooterLiveSaveFailure({ live }) {
28546
+ if (!live.failed) return null;
28547
+ return /* @__PURE__ */ jsxs("div", {
28548
+ role: "alert",
28549
+ className: "flex items-center justify-between gap-3 text-sm text-destructive",
28550
+ children: [/* @__PURE__ */ jsx("span", { children: "That didn't save. Your changes are still here." }), /* @__PURE__ */ jsx(Button$1, {
28551
+ type: "button",
28552
+ variant: "outline",
28553
+ size: "sm",
28554
+ onClick: live.retry,
28555
+ children: "Try again"
28556
+ })]
28557
+ });
28558
+ }
28559
+ //#endregion
28560
+ //#region ../content-editor/src/useFooterPart.ts
28561
+ /** Forms dispatch edits; the composer owns their raw input, what it means, and its lifecycle. */
28562
+ function useFooterPartSave(part) {
28563
+ const composer = useFooterAuthoringOptional();
28564
+ if (!composer) throw new Error("Footer composer provider is missing");
28565
+ const key = footerPartKey({
28566
+ kind: part.kind,
28567
+ section: part.section,
28568
+ fields: {}
28569
+ });
28570
+ const edit = (draft, finalize) => {
28571
+ if (composer.compositionSnapshot?.kind !== "ready" || !composer.acceptingEdits) return;
28572
+ if (composer.fieldState.submit(draft) && finalize) composer.finalizeComposition();
28573
+ };
28525
28574
  return {
28526
- ...shared,
28527
- kind: "mailing-list",
28528
- targeting: { mode: "default" }
28575
+ composer,
28576
+ key,
28577
+ edit,
28578
+ shown: composer.compositionSnapshot?.kind === "ready" ? composer.compositionSnapshot.composition : null,
28579
+ live: {
28580
+ flush: composer.finalizeComposition,
28581
+ retry: () => composer.fieldState.retry(key),
28582
+ failed: composer.compositionDrafts.some((draft) => draft.identity.key === key && draft.status === "failed")
28583
+ }
28529
28584
  };
28530
28585
  }
28531
- function createMailingListDraft(shared, source) {
28532
- return {
28533
- ...shared,
28534
- kind: "mailing-list",
28535
- targeting: source.targeting
28536
- };
28537
- }
28538
- function parseFooterEngagementDraft(draft, currentId) {
28539
- const source = draft.kind === "standard-contact" ? {
28540
- kind: draft.kind,
28541
- formId: draft.formId,
28542
- intro: draft.intro || null
28543
- } : createMailingListSource(draft);
28544
- return parseFooterEngagementSection({
28545
- id: currentId,
28586
+ /** The footer's contact form or mailing list part. Choices save at once; words save after a pause. */
28587
+ function useFooterEngagementPart(section) {
28588
+ const { composer, key, edit, shown, live } = useFooterPartSave({
28546
28589
  kind: "engagement",
28547
- heading: draft.heading,
28548
- selected: true,
28549
- treatment: draft.treatment,
28550
- source
28551
- });
28552
- }
28553
- function createMailingListSource(draft) {
28590
+ section
28591
+ });
28592
+ const typed = composer.fieldState.draft(key);
28593
+ const fields = typed?.kind === "engagement" ? typed.fields : {};
28594
+ const value = readFooterEngagementDraft(shown, fields, composer.engagementOptions);
28595
+ const dispatch = (event) => {
28596
+ const typing = event.type === "set-heading" || event.type === "set-intro";
28597
+ if (!typing) live.flush();
28598
+ edit({
28599
+ kind: "engagement",
28600
+ section,
28601
+ fields: footerEngagementEventFields(value, event)
28602
+ }, !typing);
28603
+ };
28554
28604
  return {
28555
- kind: "mailing-list",
28556
- targeting: draft.targeting,
28557
- intro: draft.intro || null
28605
+ value,
28606
+ dispatch,
28607
+ live,
28608
+ started: footerEngagementStarted(fields)
28609
+ };
28610
+ }
28611
+ /** A section's own heading and body text. */
28612
+ function useFooterSectionTextPart(module) {
28613
+ const { composer, key, edit, shown, live } = useFooterPartSave({
28614
+ kind: "section-text",
28615
+ section: module.id
28616
+ });
28617
+ const typed = composer.fieldState.draft(key);
28618
+ const value = {
28619
+ ...shown?.sections.find((section) => section.id === module.id) ?? module,
28620
+ ...typed?.kind === "section-text" ? typed.fields : {}
28621
+ };
28622
+ const change = (field, input) => {
28623
+ if (field === "content") return edit({
28624
+ kind: "section-text",
28625
+ section: module.id,
28626
+ fields: { content: input }
28627
+ }, false);
28628
+ edit({
28629
+ kind: "section-text",
28630
+ section: module.id,
28631
+ fields: { heading: typeof input === "string" ? input : null }
28632
+ }, false);
28633
+ };
28634
+ return {
28635
+ ...live,
28636
+ value,
28637
+ change
28558
28638
  };
28559
28639
  }
28560
28640
  //#endregion
28561
28641
  //#region ../content-editor/src/FooterEngagementEditorFields.tsx
28562
- const inputClass$1 = "w-full rounded-md border bg-background px-3 py-2 text-sm";
28563
- const buttonClass$3 = "rounded-md border bg-background px-3 py-2 text-sm font-medium hover:bg-muted";
28564
- function EngagementKindChoice({ dispatch, kind }) {
28565
- return /* @__PURE__ */ jsxs("fieldset", {
28566
- className: "space-y-2",
28567
- children: [
28568
- /* @__PURE__ */ jsx("legend", {
28569
- className: "text-sm font-medium",
28570
- children: "What should visitors do?"
28571
- }),
28572
- /* @__PURE__ */ jsx(RadioChoice, {
28573
- checked: kind === "standard-contact",
28574
- label: "Send a message",
28575
- name: "engagement-kind",
28576
- onChange: () => dispatch({
28577
- type: "select-kind",
28578
- kind: "standard-contact"
28579
- })
28580
- }),
28581
- /* @__PURE__ */ jsx(RadioChoice, {
28582
- checked: kind === "mailing-list",
28583
- label: "Join a mailing list",
28584
- name: "engagement-kind",
28585
- onChange: () => dispatch({
28586
- type: "select-kind",
28587
- kind: "mailing-list"
28588
- })
28642
+ /** The signup / contact form panel's words, from the approved Phase 6 mockup. */
28643
+ const ENGAGEMENT_COPY = {
28644
+ mailingTitle: "Mailing list signup",
28645
+ contactTitle: "Contact form",
28646
+ choiceLabel: "Visitors can",
28647
+ mailingList: "Join your list",
28648
+ contactForm: "Send a message",
28649
+ headingLabel: "Heading",
28650
+ headingHint: "In Compact strip, this shows as a small label by the form.",
28651
+ introLabel: "A line under the heading",
28652
+ introHint: "Compact strip leaves this out to keep the strip short.",
28653
+ listNote: "The button text and privacy note come from your mailing list settings.",
28654
+ listSettings: "Mailing list settings",
28655
+ askOwner: "Ask the site's owner to change the mailing list settings.",
28656
+ notSetUpTitle: "You haven't set up a mailing list yet",
28657
+ notSetUpBody: "Once it's set up, the signup shows in your footer. Until then, visitors won't see it.",
28658
+ notSetUpAction: "Set up your mailing list",
28659
+ attentionTitle: "This signup isn't showing on your site",
28660
+ formAttentionTitle: "This form isn't showing on your site",
28661
+ formLabel: "Which form",
28662
+ formPlaceholder: "Choose a contact form",
28663
+ formFields: "Asks for",
28664
+ formOpen: "Edit this form",
28665
+ noFormsTitle: "You don't have a contact form yet",
28666
+ noFormsBody: "Make one in Forms, then choose it here.",
28667
+ noFormsAction: "Make a contact form",
28668
+ remove: "Remove from footer"
28669
+ };
28670
+ function StandardContactChoice({ dispatch, error, formId, manageFormsHref, options }) {
28671
+ const standardForms = options.forms.filter((form) => form.contactDefinition?.kind === "standard-contact");
28672
+ const selectedForm = standardForms.find((form) => form.id === formId);
28673
+ if (standardForms.length === 0) return /* @__PURE__ */ jsx(NoContactForms, {
28674
+ error,
28675
+ manageFormsHref
28676
+ });
28677
+ const fields = visibleFieldLabels(selectedForm);
28678
+ return /* @__PURE__ */ jsxs("div", {
28679
+ className: "space-y-3",
28680
+ children: [/* @__PURE__ */ jsx(FieldFrame, {
28681
+ error,
28682
+ fieldPath: "engagement.formId",
28683
+ label: ENGAGEMENT_COPY.formLabel,
28684
+ hint: fields ? `${ENGAGEMENT_COPY.formFields}: ${fields}` : void 0,
28685
+ children: ({ id, descriptionId, messageId }) => /* @__PURE__ */ jsxs(NativeSelect, {
28686
+ id,
28687
+ "aria-describedby": describedBy(descriptionId, messageId),
28688
+ "aria-invalid": error ? true : void 0,
28689
+ onChange: (event) => dispatch({
28690
+ type: "set-form",
28691
+ formId: event.target.value
28692
+ }),
28693
+ value: formId,
28694
+ children: [/* @__PURE__ */ jsx("option", {
28695
+ value: "",
28696
+ children: ENGAGEMENT_COPY.formPlaceholder
28697
+ }), standardForms.map((form) => /* @__PURE__ */ jsx("option", {
28698
+ value: form.id,
28699
+ children: form.name
28700
+ }, form.id))]
28589
28701
  })
28590
- ]
28702
+ }), selectedForm ? /* @__PURE__ */ jsx(Button$1, {
28703
+ asChild: true,
28704
+ variant: "link",
28705
+ size: "sm",
28706
+ className: "h-auto px-0",
28707
+ children: /* @__PURE__ */ jsx("a", {
28708
+ href: `${manageFormsHref.replace(/\/$/u, "")}/${selectedForm.id}`,
28709
+ children: ENGAGEMENT_COPY.formOpen
28710
+ })
28711
+ }) : null]
28591
28712
  });
28592
28713
  }
28593
- function EngagementCopyFields({ dispatch, draft, error }) {
28594
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(TextField, {
28595
- error,
28596
- label: "Heading",
28597
- maxLength: 80,
28598
- onChange: (heading) => dispatch({
28599
- type: "set-heading",
28600
- heading
28601
- }),
28602
- path: "engagement.heading",
28603
- value: draft.heading
28604
- }), /* @__PURE__ */ jsx(TextField, {
28605
- label: "Intro",
28606
- maxLength: 240,
28607
- multiline: true,
28608
- onChange: (intro) => dispatch({
28609
- type: "set-intro",
28610
- intro
28611
- }),
28612
- path: "engagement.intro",
28613
- value: draft.intro
28614
- })] });
28714
+ /** The selected contact form's visible fields, for the hint under the picker. */
28715
+ function visibleFieldLabels(form) {
28716
+ if (form?.contactDefinition?.kind !== "standard-contact") return null;
28717
+ return form.contactDefinition.fields.filter((field) => field.visible).map((field) => field.label).join(" · ");
28615
28718
  }
28616
- function EngagementPlacementChoice({ dispatch, treatment }) {
28617
- return /* @__PURE__ */ jsxs("fieldset", {
28719
+ function NoContactForms({ error, manageFormsHref }) {
28720
+ return /* @__PURE__ */ jsxs(Callout, {
28618
28721
  className: "space-y-2",
28619
28722
  children: [
28620
- /* @__PURE__ */ jsx("legend", {
28621
- className: "text-sm font-medium",
28622
- children: "Placement"
28623
- }),
28624
- /* @__PURE__ */ jsx(RadioChoice, {
28625
- checked: treatment === "integrated",
28626
- label: "Part of the footer",
28627
- name: "engagement-treatment",
28628
- onChange: () => dispatch({
28629
- type: "set-treatment",
28630
- treatment: "integrated"
28631
- })
28632
- }),
28633
- /* @__PURE__ */ jsx(RadioChoice, {
28634
- checked: treatment === "separate-row",
28635
- label: "Show it in a separate row",
28636
- name: "engagement-treatment",
28637
- onChange: () => dispatch({
28638
- type: "set-treatment",
28639
- treatment: "separate-row"
28723
+ /* @__PURE__ */ jsx(CalloutTitle, { children: ENGAGEMENT_COPY.noFormsTitle }),
28724
+ /* @__PURE__ */ jsx(CalloutDescription, { children: ENGAGEMENT_COPY.noFormsBody }),
28725
+ /* @__PURE__ */ jsx(EngagementError, { message: error }),
28726
+ /* @__PURE__ */ jsx(Button$1, {
28727
+ asChild: true,
28728
+ size: "sm",
28729
+ children: /* @__PURE__ */ jsx("a", {
28730
+ href: manageFormsHref,
28731
+ children: ENGAGEMENT_COPY.noFormsAction
28640
28732
  })
28641
28733
  })
28642
28734
  ]
28643
28735
  });
28644
28736
  }
28645
- function StandardContactChoice({ dispatch, formId, manageFormsHref, options }) {
28646
- const standardForms = options.forms.filter((form) => form.contactDefinition?.kind === "standard-contact");
28647
- const selectedForm = standardForms.find((form) => form.id === formId);
28648
- useEffect(() => {
28649
- if (formId && !selectedForm) dispatch({
28650
- type: "set-form",
28651
- formId: ""
28652
- });
28653
- }, [
28654
- dispatch,
28655
- formId,
28656
- selectedForm
28657
- ]);
28658
- return /* @__PURE__ */ jsxs("div", {
28659
- className: "space-y-3",
28737
+ function EngagementError({ message }) {
28738
+ return message ? /* @__PURE__ */ jsx("p", {
28739
+ role: "alert",
28740
+ className: "text-sm text-destructive",
28741
+ children: message
28742
+ }) : null;
28743
+ }
28744
+ function MailingListChoice({ dispatch, draft, manageNewsletterHref, options }) {
28745
+ if (options.mailingList.tag !== "configured") return /* @__PURE__ */ jsxs(Callout, {
28746
+ className: "space-y-2",
28660
28747
  children: [
28661
- /* @__PURE__ */ jsx(FieldFrame, {
28662
- fieldPath: "engagement.formId",
28663
- label: "Contact form",
28664
- children: ({ id, descriptionId, messageId }) => /* @__PURE__ */ jsxs("select", {
28665
- id,
28666
- "aria-describedby": describedBy(descriptionId, messageId),
28667
- className: inputClass$1,
28668
- onChange: (event) => dispatch({
28669
- type: "set-form",
28670
- formId: event.target.value
28671
- }),
28672
- value: formId,
28673
- children: [/* @__PURE__ */ jsx("option", {
28674
- value: "",
28675
- children: "Choose a standard contact form"
28676
- }), standardForms.map((form) => /* @__PURE__ */ jsx("option", {
28677
- value: form.id,
28678
- children: form.name
28679
- }, form.id))]
28748
+ /* @__PURE__ */ jsx(CalloutTitle, { children: ENGAGEMENT_COPY.notSetUpTitle }),
28749
+ /* @__PURE__ */ jsx(CalloutDescription, { children: ENGAGEMENT_COPY.notSetUpBody }),
28750
+ options.canManageMailingListSetup ? /* @__PURE__ */ jsx(Button$1, {
28751
+ asChild: true,
28752
+ size: "sm",
28753
+ children: /* @__PURE__ */ jsx("a", {
28754
+ href: manageNewsletterHref,
28755
+ children: ENGAGEMENT_COPY.notSetUpAction
28680
28756
  })
28681
- }),
28682
- selectedForm?.contactDefinition?.kind === "standard-contact" ? /* @__PURE__ */ jsx("div", {
28683
- className: "rounded-md border p-3 text-xs text-muted-foreground",
28684
- children: selectedForm.contactDefinition.fields.filter((field) => field.visible).map((field) => field.label).join(" · ")
28685
- }) : null,
28686
- selectedForm ? /* @__PURE__ */ jsx("a", {
28687
- className: buttonClass$3,
28688
- href: `${manageFormsHref.replace(/\/$/u, "")}/${selectedForm.id}`,
28689
- children: "Open in Forms"
28690
- }) : null
28757
+ }) : /* @__PURE__ */ jsx(CalloutDescription, { children: ENGAGEMENT_COPY.askOwner })
28691
28758
  ]
28692
28759
  });
28693
- }
28694
- function MailingListChoice({ dispatch, draft, manageNewsletterHref, options }) {
28695
28760
  return /* @__PURE__ */ jsxs("div", {
28696
28761
  className: "space-y-3",
28697
28762
  children: [
28698
- options.mailingList.tag === "configured" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(MailingListGlobalSettingsSummary, { context: {
28763
+ /* @__PURE__ */ jsx(MailingListGlobalSettingsSummary, { context: {
28699
28764
  runtime: options.mailingList,
28700
28765
  expectedProviderScope: options.expectedMailingListProviderScope,
28701
28766
  confirmation: options.confirmation,
28702
28767
  canManageSetup: options.canManageMailingListSetup
28703
- } }), /* @__PURE__ */ jsx(MailingListTargetingControl, {
28768
+ } }),
28769
+ /* @__PURE__ */ jsx(MailingListTargetingControl, {
28704
28770
  context: options.mailingList,
28705
28771
  targeting: draft.targeting,
28706
28772
  name: "footer-mailing-list-targeting",
@@ -28708,84 +28774,53 @@ function MailingListChoice({ dispatch, draft, manageNewsletterHref, options }) {
28708
28774
  type: "set-mailing-targeting",
28709
28775
  targeting
28710
28776
  })
28711
- })] }) : /* @__PURE__ */ jsx("p", {
28712
- className: "rounded-md border border-dashed p-3 text-sm text-muted-foreground",
28713
- children: "Set up a mailing list before adding this footer form."
28714
28777
  }),
28715
- options.canManageMailingListSetup ? /* @__PURE__ */ jsx("a", {
28716
- className: buttonClass$3,
28717
- href: manageNewsletterHref,
28718
- children: "Manage mailing list"
28719
- }) : /* @__PURE__ */ jsx("p", {
28778
+ /* @__PURE__ */ jsx("p", {
28720
28779
  className: "text-xs text-muted-foreground",
28721
- children: "Ask an administrator to change shared form settings."
28780
+ children: ENGAGEMENT_COPY.listNote
28722
28781
  }),
28723
- /* @__PURE__ */ jsx("div", {
28782
+ options.canManageMailingListSetup ? /* @__PURE__ */ jsx(Button$1, {
28783
+ asChild: true,
28784
+ variant: "link",
28785
+ size: "sm",
28786
+ className: "h-auto px-0",
28787
+ children: /* @__PURE__ */ jsx("a", {
28788
+ href: manageNewsletterHref,
28789
+ children: ENGAGEMENT_COPY.listSettings
28790
+ })
28791
+ }) : /* @__PURE__ */ jsx("p", {
28724
28792
  className: "text-xs text-muted-foreground",
28725
- children: "Form fields, button text, privacy note and confirmation are managed in Mailing list setup."
28793
+ children: ENGAGEMENT_COPY.askOwner
28726
28794
  })
28727
28795
  ]
28728
28796
  });
28729
28797
  }
28730
- function TextField({ error, label, maxLength, multiline = false, onChange, path, value }) {
28731
- return /* @__PURE__ */ jsx(FieldFrame, {
28732
- error,
28733
- fieldPath: path,
28734
- label,
28735
- children: ({ id, descriptionId, messageId }) => {
28736
- const props = {
28737
- id,
28738
- "aria-describedby": describedBy(descriptionId, messageId),
28739
- className: inputClass$1,
28740
- maxLength,
28741
- onChange: (event) => onChange(event.target.value),
28742
- value
28743
- };
28744
- return multiline ? /* @__PURE__ */ jsx("textarea", { ...props }) : /* @__PURE__ */ jsx("input", { ...props });
28745
- }
28746
- });
28747
- }
28748
- function RadioChoice({ checked, label, name, onChange }) {
28749
- return /* @__PURE__ */ jsxs("label", {
28750
- className: "flex items-center gap-2 text-sm",
28751
- children: [/* @__PURE__ */ jsx("input", {
28752
- checked,
28753
- name,
28754
- onChange,
28755
- type: "radio"
28756
- }), label]
28757
- });
28758
- }
28759
28798
  function describedBy(descriptionId, messageId) {
28760
28799
  return [descriptionId, messageId].filter(Boolean).join(" ") || void 0;
28761
28800
  }
28762
28801
  //#endregion
28763
28802
  //#region ../content-editor/src/FooterEngagementEditorPanel.tsx
28764
- const buttonClass$2 = "rounded-md border bg-background px-3 py-2 text-sm font-medium hover:bg-muted";
28765
- const primaryButtonClass$2 = "rounded-md bg-primary px-3 py-2 text-sm font-medium text-primary-foreground";
28766
28803
  function FooterEngagementEditorPanel(props) {
28767
- const { dispatch, draft, error, preview } = useFooterEngagementDraft(props);
28804
+ const { dispatch, draft, error, live } = useFooterEngagementDraft(props);
28805
+ const mailing = draft.kind === "mailing-list";
28768
28806
  return /* @__PURE__ */ jsxs("div", {
28769
28807
  className: "space-y-5",
28770
28808
  children: [
28771
- /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h2", {
28809
+ /* @__PURE__ */ jsx("h2", {
28772
28810
  className: "font-semibold",
28773
- children: "Footer contact"
28774
- }), /* @__PURE__ */ jsx("p", {
28775
- className: "text-xs text-muted-foreground",
28776
- children: "Preview the change here before applying it to every page."
28777
- })] }),
28778
- /* @__PURE__ */ jsx(ReadinessNotice, { readiness: props.readiness }),
28779
- /* @__PURE__ */ jsx(EngagementKindChoice, {
28780
- dispatch,
28781
- kind: draft.kind
28811
+ children: mailing ? ENGAGEMENT_COPY.mailingTitle : ENGAGEMENT_COPY.contactTitle
28782
28812
  }),
28783
- /* @__PURE__ */ jsx(EngagementCopyFields, {
28784
- draft,
28785
- error,
28813
+ /* @__PURE__ */ jsx(EngagementKindChoice, {
28814
+ kind: draft.kind,
28786
28815
  dispatch
28787
28816
  }),
28817
+ /* @__PURE__ */ jsx(RepairCallout, {
28818
+ mailing,
28819
+ options: props.options,
28820
+ readiness: props.readiness
28821
+ }),
28788
28822
  draft.kind === "standard-contact" ? /* @__PURE__ */ jsx(StandardContactChoice, {
28823
+ error: fieldErrorMessage(error, "formId"),
28789
28824
  formId: draft.formId,
28790
28825
  manageFormsHref: props.manageFormsHref,
28791
28826
  options: props.options,
@@ -28796,114 +28831,134 @@ function FooterEngagementEditorPanel(props) {
28796
28831
  options: props.options,
28797
28832
  dispatch
28798
28833
  }),
28799
- /* @__PURE__ */ jsx(EngagementPlacementChoice, {
28800
- treatment: draft.treatment,
28801
- dispatch
28802
- }),
28803
- /* @__PURE__ */ jsx(PreviewActions, {
28804
- candidate: props.candidate,
28805
- onApply: props.onApply,
28806
- onCancel: props.onCancel,
28807
- onPreview: preview
28834
+ /* @__PURE__ */ jsx(EngagementTextFields, {
28835
+ draft,
28836
+ error,
28837
+ dispatch,
28838
+ live
28808
28839
  }),
28809
- props.current !== null ? /* @__PURE__ */ jsx("button", {
28810
- className: buttonClass$2,
28811
- onClick: props.onRemove,
28812
- type: "button",
28813
- children: "Remove from footer"
28840
+ /* @__PURE__ */ jsx(FooterLiveSaveFailure, { live }),
28841
+ /* @__PURE__ */ jsx(EngagementError, { message: generalErrorMessage(error) }),
28842
+ props.current !== null ? /* @__PURE__ */ jsx("div", {
28843
+ className: "border-t pt-4",
28844
+ children: /* @__PURE__ */ jsx(Button$1, {
28845
+ type: "button",
28846
+ variant: "outline",
28847
+ size: "sm",
28848
+ onClick: props.onRemove,
28849
+ children: ENGAGEMENT_COPY.remove
28850
+ })
28814
28851
  }) : null
28815
28852
  ]
28816
28853
  });
28817
28854
  }
28818
- function useFooterEngagementDraft(props) {
28819
- const [draft, setDraft] = useState(() => createFooterEngagementDraft(props.candidate ?? props.current));
28820
- const [error, setError] = useState(null);
28821
- return {
28822
- dispatch: useCallback((event) => setDraft((current) => reduceFooterEngagementDraft(current, event)), []),
28823
- draft,
28824
- error,
28825
- preview: useCallback(() => {
28826
- const parsed = parseFooterEngagementDraft(draft, props.current?.id ?? "engagement");
28827
- if (!parsed.ok) {
28828
- setError(parsed.error.message);
28829
- return;
28830
- }
28831
- setError(null);
28832
- props.onPreview(parsed.value);
28833
- }, [draft, props])
28834
- };
28835
- }
28836
- function ReadinessNotice({ readiness }) {
28837
- return readiness.kind === "needs-repair" ? /* @__PURE__ */ jsx("p", {
28838
- role: "alert",
28839
- className: "rounded-md border p-3 text-sm",
28840
- children: readiness.message
28841
- }) : null;
28842
- }
28843
- function PreviewActions({ candidate, onApply, onCancel, onPreview }) {
28844
- return candidate !== null ? /* @__PURE__ */ jsxs("div", {
28845
- className: "space-y-3 rounded-lg border bg-muted/30 p-3",
28855
+ function EngagementKindChoice({ kind, dispatch }) {
28856
+ return /* @__PURE__ */ jsxs("div", {
28857
+ className: "space-y-1.5",
28846
28858
  children: [/* @__PURE__ */ jsx("div", {
28847
28859
  className: "text-sm font-medium",
28848
- children: "Preview ready"
28849
- }), /* @__PURE__ */ jsxs("div", {
28850
- className: "flex gap-2",
28851
- children: [/* @__PURE__ */ jsx("button", {
28852
- className: primaryButtonClass$2,
28853
- onClick: onApply,
28854
- type: "button",
28855
- children: "Apply to footer"
28856
- }), /* @__PURE__ */ jsx("button", {
28857
- className: buttonClass$2,
28858
- onClick: onCancel,
28859
- type: "button",
28860
- children: "Cancel"
28861
- })]
28860
+ id: "footer-engagement-kind",
28861
+ children: ENGAGEMENT_COPY.choiceLabel
28862
+ }), /* @__PURE__ */ jsx(SegmentedControl, {
28863
+ "aria-label": ENGAGEMENT_COPY.choiceLabel,
28864
+ size: "sm",
28865
+ className: "w-full",
28866
+ value: kind,
28867
+ onValueChange: (next) => dispatch({
28868
+ type: "select-kind",
28869
+ kind: next
28870
+ }),
28871
+ options: [{
28872
+ value: "mailing-list",
28873
+ label: ENGAGEMENT_COPY.mailingList
28874
+ }, {
28875
+ value: "standard-contact",
28876
+ label: ENGAGEMENT_COPY.contactForm
28877
+ }]
28862
28878
  })]
28863
- }) : /* @__PURE__ */ jsx("button", {
28864
- className: primaryButtonClass$2,
28865
- onClick: onPreview,
28866
- type: "button",
28867
- children: "Preview change"
28868
28879
  });
28869
28880
  }
28870
- //#endregion
28871
- //#region ../content-editor/src/FooterNavigationLayoutControl.tsx
28872
- const selectClass = "w-full rounded-md border bg-background px-3 py-2 text-sm";
28873
- function FooterNavigationLayoutControl({ value, arrangement, onChange, pending = false, disabled = false }) {
28874
- if (arrangement === "centred") return null;
28875
- return /* @__PURE__ */ jsx(FieldFrame, {
28876
- id: "footer-navigation-layout",
28877
- label: "Link layout",
28878
- description: "Inline links use a full-width row; stacked links stay in a footer column.",
28879
- children: ({ id, descriptionId }) => /* @__PURE__ */ jsxs("select", {
28880
- id,
28881
- "aria-describedby": descriptionId,
28882
- className: selectClass,
28883
- disabled: disabled || pending,
28884
- "aria-busy": pending,
28885
- value,
28886
- onChange: (event) => onChange(event.target.value === "stack" ? "stack" : "inline-wrap"),
28887
- children: [/* @__PURE__ */ jsx("option", {
28888
- value: "stack",
28889
- children: "Stacked"
28890
- }), /* @__PURE__ */ jsx("option", {
28891
- value: "inline-wrap",
28892
- children: "Inline"
28893
- })]
28894
- })
28881
+ /** The mailing-list choice explains an unconfigured list itself, so this stays quiet then. */
28882
+ function RepairCallout({ mailing, options, readiness }) {
28883
+ if (readiness.kind !== "needs-repair") return null;
28884
+ if (mailing && options.mailingList.tag !== "configured") return null;
28885
+ return /* @__PURE__ */ jsxs(Callout, {
28886
+ tone: "warning",
28887
+ role: "alert",
28888
+ children: [/* @__PURE__ */ jsx(CalloutTitle, { children: mailing ? ENGAGEMENT_COPY.attentionTitle : ENGAGEMENT_COPY.formAttentionTitle }), /* @__PURE__ */ jsx(CalloutDescription, { children: readiness.message })]
28895
28889
  });
28896
28890
  }
28891
+ function EngagementTextFields({ draft, error, dispatch, live }) {
28892
+ const mailing = draft.kind === "mailing-list";
28893
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(FooterLiveTextField, {
28894
+ label: ENGAGEMENT_COPY.headingLabel,
28895
+ hint: mailing ? ENGAGEMENT_COPY.headingHint : void 0,
28896
+ error: fieldErrorMessage(error, "heading"),
28897
+ maxLength: 80,
28898
+ value: draft.heading,
28899
+ onChange: (heading) => dispatch({
28900
+ type: "set-heading",
28901
+ heading
28902
+ }),
28903
+ live
28904
+ }), /* @__PURE__ */ jsx(FooterLiveTextField, {
28905
+ label: ENGAGEMENT_COPY.introLabel,
28906
+ optional: true,
28907
+ hint: mailing ? ENGAGEMENT_COPY.introHint : void 0,
28908
+ error: fieldErrorMessage(error, "intro"),
28909
+ maxLength: 240,
28910
+ multiline: true,
28911
+ value: draft.intro,
28912
+ onChange: (intro) => dispatch({
28913
+ type: "set-intro",
28914
+ intro
28915
+ }),
28916
+ live
28917
+ })] });
28918
+ }
28919
+ function fieldErrorMessage(error, field) {
28920
+ return error?.field === field ? error.message : null;
28921
+ }
28922
+ /** Errors without a field of their own show below the choices. */
28923
+ function generalErrorMessage(error) {
28924
+ return error !== null && (error.field === null || error.field === "targeting") ? error.message : null;
28925
+ }
28926
+ /**
28927
+ * One draft for the whole panel. Choices (what visitors can do, which form or
28928
+ * list) save at once; the heading and intro save after a pause in typing, under
28929
+ * one text key per field so a run of typing joins one Undo step.
28930
+ */
28931
+ function useFooterEngagementDraft(props) {
28932
+ const known = useRef(props.current?.id);
28933
+ if (props.current) known.current = props.current.id;
28934
+ const sectionId = known.current ?? unsafeAsFooterModuleId("engagement");
28935
+ const { value: draft, dispatch, live, started } = useFooterEngagementPart(sectionId);
28936
+ const parsed = parseFooterEngagementDraft(draft, sectionId);
28937
+ const error = parsed.ok ? null : parsed.error;
28938
+ return {
28939
+ dispatch,
28940
+ draft,
28941
+ error: props.current === null && !started && error?.field === "formId" ? null : error,
28942
+ live
28943
+ };
28944
+ }
28897
28945
  //#endregion
28898
28946
  //#region ../content-editor/src/FooterComposerOverview.tsx
28899
28947
  const buttonClass$1 = "rounded-md border bg-background px-3 py-2 text-sm font-medium hover:bg-muted";
28900
28948
  const primaryButtonClass$1 = "rounded-md bg-primary px-3 py-2 text-sm font-medium text-primary-foreground";
28901
28949
  function SaveBadge({ state }) {
28902
28950
  if (state === "idle") return null;
28951
+ const label = {
28952
+ saving: "Saving…",
28953
+ saved: "Saved",
28954
+ conflict: "Newer version loaded",
28955
+ failed: "Save failed",
28956
+ unsaved: "Not saved yet"
28957
+ }[state];
28903
28958
  return /* @__PURE__ */ jsx("span", {
28904
28959
  "aria-live": "polite",
28905
28960
  className: "text-xs text-muted-foreground",
28906
- children: state === "saving" ? "Saving…" : state === "saved" ? "Saved" : state === "conflict" ? "Newer version loaded" : "Save failed"
28961
+ children: label
28907
28962
  });
28908
28963
  }
28909
28964
  function FooterPreview({ runtime }) {
@@ -28921,13 +28976,13 @@ function FooterPreview({ runtime }) {
28921
28976
  className: "space-y-6",
28922
28977
  disabled: true,
28923
28978
  children: runtime.regions.map((region) => /* @__PURE__ */ jsx("div", {
28924
- "data-footer-preview-region": region.kind,
28925
- className: region.kind === "bottom" ? "border-t border-white/15 pt-4" : "grid gap-6 md:grid-cols-2",
28979
+ "data-footer-preview-region": region.slot,
28980
+ className: region.slot === "base" ? "border-t border-white/15 pt-4" : "grid gap-6 md:grid-cols-2",
28926
28981
  children: region.groups.map((group) => /* @__PURE__ */ jsx("div", {
28927
28982
  className: "min-w-0 space-y-3 rounded-lg border border-white/15 p-4",
28928
28983
  children: group.modules.map((module) => /* @__PURE__ */ jsx(FooterPreviewModule, { module }, module.id))
28929
28984
  }, group.kind))
28930
- }, region.kind))
28985
+ }, region.slot))
28931
28986
  })
28932
28987
  })
28933
28988
  });
@@ -29002,17 +29057,10 @@ function previewModuleLabel(module) {
29002
29057
  function engagementLabel(engagement) {
29003
29058
  return engagement.kind === "standard-contact" ? "Contact form" : "Mailing list signup";
29004
29059
  }
29005
- function FooterOverview({ credit, onCreditHiddenChange, plan, composition, onTarget, onChange, manageLinksHref, manageSettingsHref, navigationLayout, arrangement, onEngagement, onNavigationLayoutChange, navigationLayoutPending, navigationLayoutDisabled }) {
29060
+ function FooterOverview({ credit, onCreditHiddenChange, plan, composition, onTarget, onChange, manageLinksHref, manageSettingsHref, onEngagement, onAddEngagement }) {
29006
29061
  return /* @__PURE__ */ jsxs("div", {
29007
29062
  className: "space-y-5",
29008
29063
  children: [
29009
- onNavigationLayoutChange ? /* @__PURE__ */ jsx(FooterNavigationLayoutControl, {
29010
- arrangement,
29011
- value: navigationLayout,
29012
- pending: navigationLayoutPending,
29013
- disabled: navigationLayoutDisabled,
29014
- onChange: onNavigationLayoutChange
29015
- }) : null,
29016
29064
  /* @__PURE__ */ jsx("h2", {
29017
29065
  className: "font-semibold",
29018
29066
  children: "Shown in footer"
@@ -29037,7 +29085,7 @@ function FooterOverview({ credit, onCreditHiddenChange, plan, composition, onTar
29037
29085
  }),
29038
29086
  /* @__PURE__ */ jsx(AddFooterEngagement, {
29039
29087
  composition,
29040
- onEngagement
29088
+ onAdd: onAddEngagement
29041
29089
  })
29042
29090
  ]
29043
29091
  });
@@ -29055,7 +29103,7 @@ function ShownFooterSections(props) {
29055
29103
  })]
29056
29104
  });
29057
29105
  }
29058
- function AddFooterEngagement({ composition, onEngagement }) {
29106
+ function AddFooterEngagement({ composition, onAdd }) {
29059
29107
  if (composition.sections.some((section) => section.kind === "engagement")) return null;
29060
29108
  return /* @__PURE__ */ jsxs("div", {
29061
29109
  className: "flex items-center justify-between gap-3 rounded-lg border border-dashed p-3",
@@ -29064,7 +29112,7 @@ function AddFooterEngagement({ composition, onEngagement }) {
29064
29112
  children: "Contact form or mailing list"
29065
29113
  }), /* @__PURE__ */ jsx("button", {
29066
29114
  className: buttonClass$1,
29067
- onClick: onEngagement,
29115
+ onClick: onAdd,
29068
29116
  type: "button",
29069
29117
  children: "Add"
29070
29118
  })]
@@ -29112,7 +29160,7 @@ function PlatformCreditSection({ place, credit, onHiddenChange }) {
29112
29160
  }),
29113
29161
  /* @__PURE__ */ jsx("div", {
29114
29162
  className: "mt-1 text-xs text-muted-foreground",
29115
- children: credit.kind === "optional" ? "Your plan lets you hide this line." : "Included with your Macadamia plan."
29163
+ children: credit.kind === "optional" ? "Your plan lets you remove this line." : "Included with your Macadamia plan."
29116
29164
  }),
29117
29165
  credit.kind === "optional" ? /* @__PURE__ */ jsx("div", {
29118
29166
  className: "mt-3 flex flex-wrap gap-2",
@@ -29121,7 +29169,7 @@ function PlatformCreditSection({ place, credit, onHiddenChange }) {
29121
29169
  disabled: saving,
29122
29170
  onClick: () => void change(true),
29123
29171
  type: "button",
29124
- children: "Hide"
29172
+ children: "Remove"
29125
29173
  })
29126
29174
  }) : null,
29127
29175
  /* @__PURE__ */ jsx(CreditSaveFailure, { state })
@@ -29198,7 +29246,7 @@ function ShownFooterSection({ composition, item, manageLinksHref, manageSettings
29198
29246
  className: buttonClass$1,
29199
29247
  onClick: hide,
29200
29248
  type: "button",
29201
- children: "Hide"
29249
+ children: "Remove"
29202
29250
  }),
29203
29251
  /* @__PURE__ */ jsx(ShownSectionSourceActions, {
29204
29252
  item,
@@ -29262,574 +29310,21 @@ function AvailableSection({ item, composition, onChange }) {
29262
29310
  });
29263
29311
  }
29264
29312
  //#endregion
29265
- //#region ../content-editor/src/footerEngagementEditor.ts
29266
- function resolveFooterEngagementAuthoringState(section, options) {
29267
- const resolution = resolveFooterEngagementPreview(section, options);
29268
- if (resolution.kind === "none" || resolution.kind === "resolved") return { kind: "ready" };
29269
- return {
29270
- kind: "needs-repair",
29271
- message: repairMessage(resolution.reason, section, options)
29272
- };
29273
- }
29274
- function resolveFooterEngagementPreview(section, options) {
29275
- if (section === null || !section.selected) return { kind: "none" };
29276
- if (section.source.kind === "standard-contact") return resolveStandardContactPreview(section.id, section.source, options);
29277
- return resolveMailingListPreview(section.id, section.source, options);
29278
- }
29279
- function resolveStandardContactPreview(sectionId, source, options) {
29280
- const form = options.forms.find((candidate) => candidate.id === source.formId);
29281
- if (form === void 0) return {
29282
- kind: "needs-attention",
29283
- reason: "missing-form"
29284
- };
29285
- if (form.contactDefinition.kind !== "standard-contact") return {
29286
- kind: "needs-attention",
29287
- reason: form.contactDefinition.kind === "invalid-contact" ? "invalid-form" : "wrong-form-kind"
29288
- };
29289
- return {
29290
- kind: "resolved",
29291
- sectionId,
29292
- engagement: {
29293
- kind: "standard-contact",
29294
- intro: source.intro,
29295
- runtime: { value: {
29296
- id: form.id,
29297
- schemaJson: { fields: form.contactDefinition.fields.filter((field) => field.visible).map((field) => ({
29298
- id: field.id,
29299
- label: field.label,
29300
- required: field.required,
29301
- type: standardContactFieldType(field.id)
29302
- })) }
29303
- } }
29304
- }
29305
- };
29306
- }
29307
- function resolveMailingListPreview(sectionId, source, options) {
29308
- if (options.mailingList.tag !== "configured") return {
29309
- kind: "needs-attention",
29310
- reason: "destination-not-ready"
29311
- };
29312
- if (source.targeting.mode === "custom" && source.targeting.provider !== options.mailingList.provider.provider) return {
29313
- kind: "needs-attention",
29314
- reason: "destination-not-ready"
29315
- };
29316
- return {
29317
- kind: "resolved",
29318
- sectionId,
29319
- engagement: {
29320
- kind: "mailing-list",
29321
- intro: source.intro,
29322
- runtime: {
29323
- mode: "preview",
29324
- source: "preview",
29325
- mailingList: options.mailingList,
29326
- targeting: source.targeting
29327
- }
29328
- }
29329
- };
29330
- }
29331
- function standardContactFieldType(fieldId) {
29332
- switch (fieldId) {
29333
- case "name": return "text";
29334
- case "email": return "email";
29335
- case "phone": return "tel";
29336
- case "message": return "textarea";
29337
- }
29338
- }
29339
- function repairMessage(reason, section, options) {
29340
- if (section?.source.kind === "standard-contact") return "Choose an available standard contact form.";
29341
- if (section?.source.kind === "mailing-list" && options.mailingList.tag === "not_configured") return "Set up a mailing list before using this footer form.";
29342
- return {
29343
- "missing-form": "Choose an available standard contact form.",
29344
- "wrong-form-kind": "Choose an available standard contact form.",
29345
- "invalid-form": "Choose an available standard contact form.",
29346
- "destination-not-ready": "Choose an available mailing list."
29347
- }[reason];
29348
- }
29349
- //#endregion
29350
29313
  //#region ../content-editor/src/footerPreviewRuntime.ts
29351
29314
  function buildFooterPreviewRuntime(input) {
29352
29315
  return buildFooterRuntimeViewModel({
29353
29316
  composition: input.composition,
29354
29317
  publicProfile: input.publicProfile,
29355
- businessAddress: input.hasBusinessAddress ? "Business address" : null,
29318
+ businessAddress: input.businessAddress,
29356
29319
  hasLogo: input.hasLogo,
29357
- hasFooterNavigation: input.hasMainNavigation,
29320
+ ...input.navigationFacts,
29358
29321
  hasLegalPolicyNavigation: input.hasLegalPolicyNavigation,
29359
- layoutVariant: input.arrangement,
29360
- navigationLayout: input.navigationLayout,
29322
+ layout: input.layoutSelection.layout,
29323
+ offeredLayouts: input.layoutSelection.offeredLayouts,
29361
29324
  engagement: input.engagement,
29362
- attribution: input.attribution
29363
- });
29364
- }
29365
- //#endregion
29366
- //#region ../content-editor/src/session-journal/useJournalTargetRefresh.ts
29367
- /** A display refresh follows a successful replay; it never supplies replay admission or a receipt. */
29368
- function useJournalTargetRefresh(journal, target, refresh) {
29369
- const latest = useRef(refresh);
29370
- latest.current = refresh;
29371
- useEffect(() => journal.store.subscribe((next, previous) => {
29372
- if (previous.replay.kind !== "running" || next.replay.kind !== "idle" || next.cursor === previous.cursor) return;
29373
- const change = previous.replay.request;
29374
- if (change.kind !== target.kind || change.siteId !== target.siteId) return;
29375
- if (!journalTrustAt(next, journalTargetKey(change))) return;
29376
- Promise.resolve().then(() => latest.current()).catch((error) => {
29377
- journal.dispatch({ kind: "display-held" });
29378
- console.error("[editor] journal display refresh failed", error);
29379
- });
29380
- }), [
29381
- journal,
29382
- target.kind,
29383
- target.siteId
29384
- ]);
29385
- }
29386
- //#endregion
29387
- //#region ../content-editor/src/footerWriteStatus.ts
29388
- /** One mounted-visit boundary excludes old receipts and hydration without recording another completion log. */
29389
- function selectFooterWriteStatus(journal, mounted, siteId, includeTheme) {
29390
- const facts = selectJournalWriteState(journal, [
29391
- {
29392
- kind: "footer-composition",
29393
- siteId,
29394
- expectedMailingListProviderScope: null
29395
- },
29396
- {
29397
- kind: "public-profile",
29398
- siteId
29399
- },
29400
- ...includeTheme ? [{
29401
- kind: "theme-selection",
29402
- siteId,
29403
- selectionId: null
29404
- }] : []
29405
- ]);
29406
- const success = facts.entries.some((entry) => receivedSinceMount(entry, mounted)) || facts.notice?.kind === "replayed" && journal.notice !== mounted.notice;
29407
- return {
29408
- saveState: facts.saving ? "saving" : facts.attentionNotice ? facts.attentionNotice.kind === "change" && facts.attentionNotice.reason === "conflict" ? "conflict" : "failed" : success ? "saved" : "idle",
29409
- message: footerWriteMessage(facts.attentionNotice)
29410
- };
29411
- }
29412
- function receivedSinceMount(entry, mounted) {
29413
- if (entry.settlement.kind !== "settled") return false;
29414
- const initial = mounted.entries.find((item) => item.edit.operationId === entry.edit.operationId)?.settlement;
29415
- return initial?.kind !== "settled" || initial.receipt !== entry.settlement.receipt;
29416
- }
29417
- /** Keep footer/profile conflict wording at its existing location; theme and failures share journal copy. */
29418
- function footerWriteMessage(notice) {
29419
- if (notice?.kind === "change" && notice.reason === "conflict" && notice.during === "save") {
29420
- if (notice.target.kind === "footer-composition") return "A newer footer was saved elsewhere. The latest version is shown; review it before trying again.";
29421
- if (notice.target.kind === "public-profile") return "Shared details changed elsewhere. The latest version is shown; review it before trying again.";
29422
- }
29423
- return journalNoticeMessage(notice);
29424
- }
29425
- //#endregion
29426
- //#region ../content-editor/src/useFooterComposerState.ts
29427
- function useFooterComposerState({ apiClient, canEdit, initialTarget, initialTargetRequestId, navigationLayoutControl = {
29428
- layout: "stack",
29429
- pending: false,
29430
- disabled: true
29431
- }, includeThemeStatus = true, onSaved, rawSiteId }) {
29432
- const siteId = useMemo(() => unsafeAsSiteId(rawSiteId), [rawSiteId]);
29433
- const loaded = useFooterLoad(apiClient, rawSiteId, siteId);
29434
- useFooterJournalRefresh(rawSiteId, loaded.load);
29435
- const [target, setTarget] = useFooterEditorTarget(initialTarget, initialTargetRequestId);
29436
- const session = useFooterSessionState(rawSiteId, canEdit, includeThemeStatus);
29437
- const saveComposition = useCompositionSaver({
29438
- apiClient,
29439
- canEdit,
29440
- compositionSnapshot: loaded.compositionSnapshot,
29441
- engagementOptions: loaded.engagementOptions,
29442
- onSaved,
29443
- reobserve: loaded.reobserve,
29444
- setCompositionSnapshot: loaded.setCompositionSnapshot,
29445
- siteId
29325
+ attribution: input.attribution,
29326
+ ...input.suppressSignup ? { suppressSignup: true } : {}
29446
29327
  });
29447
- const saveProfile = useProfileSaver({
29448
- apiClient,
29449
- canEdit,
29450
- onSaved,
29451
- reobserve: loaded.reobserve,
29452
- profileSnapshot: loaded.profileSnapshot,
29453
- setProfileSnapshot: loaded.setProfileSnapshot,
29454
- siteId
29455
- });
29456
- const saveCreditHidden = useCreditSaver({
29457
- apiClient,
29458
- canEdit,
29459
- credit: loaded.credit,
29460
- onSaved,
29461
- setCredit: loaded.setCredit,
29462
- siteId
29463
- });
29464
- return {
29465
- ...loaded,
29466
- ...session,
29467
- navigationLayoutControl,
29468
- saveCreditHidden,
29469
- saveComposition,
29470
- saveProfile,
29471
- siteId,
29472
- target,
29473
- setTarget
29474
- };
29475
- }
29476
- /**
29477
- * Hiding the platform credit is a site setting, not part of the composition or
29478
- * its undo history. The line moves once the save lands, so a failure is
29479
- * reported where the owner clicked.
29480
- */
29481
- function useCreditSaver(options) {
29482
- const { apiClient, canEdit, credit, onSaved, setCredit, siteId } = options;
29483
- return useCallback(async (hidden) => {
29484
- if (credit.kind !== "optional" || !footerAuthoringAllowed(canEdit, siteId)) return "failed";
29485
- try {
29486
- setCredit(await updateFooterCredit(apiClient, siteId, { hidden }));
29487
- onSaved?.();
29488
- return "saved";
29489
- } catch {
29490
- return "failed";
29491
- }
29492
- }, [
29493
- apiClient,
29494
- canEdit,
29495
- credit,
29496
- onSaved,
29497
- setCredit,
29498
- siteId
29499
- ]);
29500
- }
29501
- /** Status and admission are session facts; the only local marker is this mounted visit's start. */
29502
- function useFooterSessionState(siteId, canEdit, includeThemeStatus) {
29503
- const journal = useSessionJournal();
29504
- const mounted = useMemo(() => journal.store.getState(), [journal, siteId]);
29505
- const journalState = useStore(journal.store);
29506
- const admission = useSiteEditorAdmission(siteId);
29507
- return {
29508
- ...selectFooterWriteStatus(journalState, mounted, siteId, includeThemeStatus),
29509
- canEdit: canEdit && editorAdmissionIsOpen(admission),
29510
- authoringAllowed: () => footerAuthoringAllowed(canEdit, siteId)
29511
- };
29512
- }
29513
- function useFooterEditorTarget(initialTarget, initialTargetRequestId) {
29514
- const [target, setTarget] = useState(initialTarget ?? { kind: "overview" });
29515
- const initialTargetRef = useRef(initialTarget);
29516
- initialTargetRef.current = initialTarget;
29517
- useEffect(() => {
29518
- if (initialTargetRequestId !== void 0 && initialTargetRef.current) setTarget(initialTargetRef.current);
29519
- }, [initialTargetRequestId]);
29520
- return [target, setTarget];
29521
- }
29522
- function useFooterJournalRefresh(siteId, refresh) {
29523
- const journal = useSessionJournal();
29524
- useJournalTargetRefresh(journal, {
29525
- kind: "footer-composition",
29526
- siteId
29527
- }, refresh);
29528
- useJournalTargetRefresh(journal, {
29529
- kind: "public-profile",
29530
- siteId
29531
- }, refresh);
29532
- }
29533
- function footerAuthoringAllowed(canEdit, siteId) {
29534
- return canEdit && editorAdmissionIsOpen(editorAdmissionSession.read(siteId));
29535
- }
29536
- function footerErrorMessage(error, fallback = "The footer could not be loaded.") {
29537
- return error instanceof Error ? error.message : fallback;
29538
- }
29539
- /** Everything the composer shows, read together so the screen never mixes two moments. */
29540
- async function readFooterAuthoring(apiClient, rawSiteId, siteId) {
29541
- const [composition, profile, navigation, engagement] = await Promise.all([
29542
- getFooterComposition(apiClient, siteId),
29543
- getPublicProfile(apiClient, siteId),
29544
- getNavigationMenus(apiClient, { siteId: rawSiteId }),
29545
- getFooterEngagementAuthoringOptions(apiClient, siteId)
29546
- ]);
29547
- return {
29548
- composition,
29549
- profile,
29550
- navigation,
29551
- engagement
29552
- };
29553
- }
29554
- /**
29555
- * The platform credit as last confirmed. A reload that started before a credit
29556
- * save landed must not undo it, so a read applies only if no save came since.
29557
- */
29558
- function useCreditState() {
29559
- const [credit, setCreditState] = useState({ kind: "not-shown" });
29560
- const writes = useRef(0);
29561
- return {
29562
- credit,
29563
- setCredit: useCallback((next) => {
29564
- writes.current += 1;
29565
- setCreditState(next);
29566
- }, []),
29567
- readCredit: useCallback(() => {
29568
- const writesAtStart = writes.current;
29569
- return (read) => {
29570
- if (writes.current === writesAtStart) setCreditState(read);
29571
- };
29572
- }, [])
29573
- };
29574
- }
29575
- function useFooterLoad(apiClient, rawSiteId, siteId) {
29576
- const [compositionSnapshot, setCompositionSnapshot] = useState(null);
29577
- const [profileSnapshot, setProfileSnapshot] = useState(null);
29578
- const [navigationMenus, setNavigationMenus] = useState(null);
29579
- const [engagementOptions, setEngagementOptions] = useState(null);
29580
- const { credit, setCredit, readCredit } = useCreditState();
29581
- const [loadError, setLoadError] = useState(null);
29582
- const baseline = useFooterJournalBaseline(apiClient, rawSiteId, siteId);
29583
- const load = useCallback(async () => {
29584
- setLoadError(null);
29585
- try {
29586
- const applyCredit = readCredit();
29587
- const { composition, profile, navigation, engagement } = await readFooterAuthoring(apiClient, rawSiteId, siteId);
29588
- setCompositionSnapshot(composition);
29589
- applyCredit(composition.credit);
29590
- setProfileSnapshot(profile);
29591
- baseline.observe(composition, profile);
29592
- setNavigationMenus(navigation.menus);
29593
- setEngagementOptions(engagement);
29594
- } catch (error) {
29595
- setLoadError(footerErrorMessage(error));
29596
- }
29597
- }, [
29598
- apiClient,
29599
- baseline,
29600
- rawSiteId,
29601
- readCredit,
29602
- siteId
29603
- ]);
29604
- useEffect(() => {
29605
- load();
29606
- }, [load]);
29607
- return {
29608
- credit,
29609
- compositionSnapshot,
29610
- engagementOptions,
29611
- load,
29612
- reobserve: baseline.reobserve,
29613
- loadError,
29614
- navigationMenus,
29615
- profileSnapshot,
29616
- setCompositionSnapshot,
29617
- setCredit,
29618
- setProfileSnapshot
29619
- };
29620
- }
29621
- /**
29622
- * Every read of the stored footer and profile is this session's baseline for both journal targets.
29623
- * After an uncertain save the journal holds them; `reobserve` reads what is stored and lifts the hold
29624
- * without replacing what is on screen.
29625
- */
29626
- function useFooterJournalBaseline(apiClient, rawSiteId, siteId) {
29627
- const journal = useSessionJournal();
29628
- return useMemo(() => {
29629
- const observe = (composition, profile) => {
29630
- if (composition.kind === "ready") journal.observe({
29631
- kind: "footer-composition",
29632
- siteId: rawSiteId,
29633
- expectedMailingListProviderScope: null,
29634
- value: composition.composition,
29635
- revision: composition.revision
29636
- });
29637
- if (profile.kind === "ready") journal.observe({
29638
- kind: "public-profile",
29639
- siteId: rawSiteId,
29640
- value: profile.profile,
29641
- revision: profile.revision
29642
- });
29643
- };
29644
- const reobserve = async () => {
29645
- const [composition, profile] = await Promise.all([getFooterComposition(apiClient, siteId), getPublicProfile(apiClient, siteId)]);
29646
- observe(composition, profile);
29647
- };
29648
- return {
29649
- observe,
29650
- reobserve
29651
- };
29652
- }, [
29653
- apiClient,
29654
- journal,
29655
- rawSiteId,
29656
- siteId
29657
- ]);
29658
- }
29659
- function useOptimisticSave(siteId, snapshot, setSnapshot) {
29660
- const latest = useRef({
29661
- siteId,
29662
- snapshot,
29663
- confirmed: snapshot,
29664
- request: null
29665
- });
29666
- if (latest.current.siteId !== siteId || latest.current.snapshot !== snapshot) latest.current = {
29667
- siteId,
29668
- snapshot,
29669
- confirmed: snapshot,
29670
- request: null
29671
- };
29672
- useEffect(() => () => {
29673
- latest.current.request = null;
29674
- }, []);
29675
- return (candidate) => {
29676
- const request = {};
29677
- const confirmed = latest.current.confirmed;
29678
- latest.current = {
29679
- ...latest.current,
29680
- request
29681
- };
29682
- if (candidate) {
29683
- latest.current.snapshot = candidate;
29684
- setSnapshot(candidate);
29685
- }
29686
- const settle = (saved) => {
29687
- if (latest.current.request !== request) return false;
29688
- latest.current = {
29689
- siteId,
29690
- snapshot: saved,
29691
- confirmed: saved,
29692
- request: null
29693
- };
29694
- if (saved) setSnapshot(saved);
29695
- return true;
29696
- };
29697
- return {
29698
- settle,
29699
- rollback: () => settle(confirmed)
29700
- };
29701
- };
29702
- }
29703
- function useCompositionSaver(options) {
29704
- const journal = useSessionJournal();
29705
- const begin = useOptimisticSave(options.siteId, options.compositionSnapshot, options.setCompositionSnapshot);
29706
- return async (next, optimistic = true) => {
29707
- const snapshot = options.compositionSnapshot;
29708
- if (!footerAuthoringAllowed(options.canEdit, options.siteId) || snapshot?.kind !== "ready") return "failed";
29709
- const captured = captureComposition(journal, options, snapshot, next);
29710
- if (captured.reservation.kind === "busy") return "failed";
29711
- const request = begin(optimistic ? {
29712
- ...snapshot,
29713
- composition: next
29714
- } : null);
29715
- return saveCompositionRequest(options, next, snapshot.revision, request, {
29716
- reservation: captured.reservation,
29717
- change: captured.change
29718
- });
29719
- };
29720
- }
29721
- function captureComposition(journal, options, snapshot, next) {
29722
- const change = {
29723
- kind: "footer-composition",
29724
- siteId: options.siteId,
29725
- before: snapshot.composition,
29726
- after: next,
29727
- expectedMailingListProviderScope: options.engagementOptions?.expectedMailingListProviderScope ?? null
29728
- };
29729
- return {
29730
- change,
29731
- reservation: journal.accept({
29732
- expectedRevision: snapshot.revision,
29733
- ...change,
29734
- textKey: null,
29735
- label: journalLabels.footer
29736
- })
29737
- };
29738
- }
29739
- async function saveCompositionRequest(options, next, baseRevision, request, captured) {
29740
- try {
29741
- if (!footerAuthoringAllowed(options.canEdit, options.siteId)) throw new JournalWriteRefused("Editor admission closed before the footer save");
29742
- const result = await updateFooterComposition(options.apiClient, options.siteId, {
29743
- composition: next,
29744
- baseRevision,
29745
- expectedMailingListProviderScope: options.engagementOptions?.expectedMailingListProviderScope ?? void 0
29746
- });
29747
- if (result.kind === "conflict") {
29748
- if (result.authoritative.kind === "ready") captured.reservation.conflict({
29749
- kind: "footer-composition",
29750
- siteId: options.siteId,
29751
- expectedMailingListProviderScope: captured.change.expectedMailingListProviderScope,
29752
- value: result.authoritative.composition,
29753
- revision: result.authoritative.revision
29754
- });
29755
- else captured.reservation.stale();
29756
- request.settle(result.authoritative);
29757
- return "conflict";
29758
- }
29759
- captured.reservation.settle({
29760
- expectedRevision: baseRevision,
29761
- revision: result.snapshot.revision,
29762
- ...captured.change,
29763
- after: result.snapshot.composition
29764
- });
29765
- if (request.settle(result.snapshot)) options.onSaved?.();
29766
- return "saved";
29767
- } catch (error) {
29768
- captured.reservation.fail(error);
29769
- if (captured.reservation.held()) options.reobserve().catch(() => void 0);
29770
- request.rollback();
29771
- return "failed";
29772
- }
29773
- }
29774
- function useProfileSaver(options) {
29775
- const journal = useSessionJournal();
29776
- const begin = useOptimisticSave(options.siteId, options.profileSnapshot, options.setProfileSnapshot);
29777
- return async (next) => {
29778
- const snapshot = options.profileSnapshot;
29779
- if (!footerAuthoringAllowed(options.canEdit, options.siteId) || snapshot?.kind !== "ready") return;
29780
- const change = {
29781
- kind: "public-profile",
29782
- siteId: options.siteId,
29783
- before: snapshot.profile,
29784
- after: next
29785
- };
29786
- const reservation = journal.accept({
29787
- expectedRevision: snapshot.revision,
29788
- ...change,
29789
- textKey: null,
29790
- label: journalLabels.profile
29791
- });
29792
- if (reservation.kind === "busy") return;
29793
- const request = begin({
29794
- ...snapshot,
29795
- profile: next
29796
- });
29797
- await saveProfileRequest(options, next, snapshot.revision, request, {
29798
- reservation,
29799
- change
29800
- });
29801
- };
29802
- }
29803
- async function saveProfileRequest(options, next, baseRevision, request, captured) {
29804
- try {
29805
- if (!footerAuthoringAllowed(options.canEdit, options.siteId)) throw new JournalWriteRefused("Editor admission closed before the profile save");
29806
- const result = await updatePublicProfile(options.apiClient, options.siteId, {
29807
- profile: next,
29808
- baseRevision
29809
- });
29810
- if (result.kind === "conflict") {
29811
- if (result.authoritative.kind === "ready") captured.reservation.conflict({
29812
- kind: "public-profile",
29813
- siteId: options.siteId,
29814
- value: result.authoritative.profile,
29815
- revision: result.authoritative.revision
29816
- });
29817
- else captured.reservation.stale();
29818
- request.settle(result.authoritative);
29819
- return;
29820
- }
29821
- captured.reservation.settle({
29822
- expectedRevision: baseRevision,
29823
- revision: result.snapshot.revision,
29824
- ...captured.change,
29825
- after: result.snapshot.profile
29826
- });
29827
- if (request.settle(result.snapshot)) options.onSaved?.();
29828
- } catch (error) {
29829
- captured.reservation.fail(error);
29830
- if (captured.reservation.held()) options.reobserve().catch(() => void 0);
29831
- request.rollback();
29832
- }
29833
29328
  }
29834
29329
  //#endregion
29835
29330
  //#region ../content-editor/src/FooterComposerPanel.tsx
@@ -29843,34 +29338,40 @@ const moduleFieldCatalog = [{
29843
29338
  required: false,
29844
29339
  maxLength: 80
29845
29340
  }];
29846
- function fieldsForModule(module) {
29847
- if (module.kind === "brand") return [
29848
- ...moduleFieldCatalog,
29849
- {
29850
- id: "showLogo",
29851
- type: "boolean",
29852
- label: "Show logo"
29853
- },
29854
- {
29855
- id: "showTitle",
29856
- type: "boolean",
29857
- label: "Show site title"
29858
- }
29859
- ];
29860
- if (module.kind === "supporting-text" || module.kind === "legal") return [...moduleFieldCatalog, {
29341
+ /** The heading field, with a note when this layout draws the section's heading as an icon. */
29342
+ function headingField(headingAsIcon) {
29343
+ const [heading] = moduleFieldCatalog;
29344
+ if (!heading) throw new Error("The footer heading field is missing");
29345
+ return headingAsIcon ? {
29346
+ ...heading,
29347
+ description: SECTION_HEADING_AS_ICON
29348
+ } : heading;
29349
+ }
29350
+ const SECTION_HEADING_AS_ICON = "Shown as an icon in this layout.";
29351
+ function fieldsForModule(module, headingAsIcon) {
29352
+ const heading = headingField(headingAsIcon);
29353
+ if (module.kind === "supporting-text" || module.kind === "legal") return [heading, {
29861
29354
  id: "content",
29862
29355
  type: "richText",
29863
29356
  label: module.kind === "legal" ? "Legal text" : "Supporting text"
29864
29357
  }];
29865
- return [...moduleFieldCatalog];
29358
+ return [heading];
29866
29359
  }
29867
- function FooterComposerPanel({ apiClient, siteId: rawSiteId, customFooterMode, manageLinksHref, manageFormsHref = manageLinksHref.replace(/\/navigation$/u, "/forms"), manageNewsletterHref = manageLinksHref.replace(/\/navigation$/u, "/newsletter"), manageSettingsHref, arrangement, navigationLayoutControl: suppliedNavigationControl, initialTarget, initialTargetRequestId, variant = "full", canEdit = true, onSaved, loadingFallback }) {
29868
- const { authoringAllowed, canEdit: authoringEnabled, compositionSnapshot, engagementOptions, load, loadError, message, navigationLayoutControl, navigationMenus, profileSnapshot, credit, saveComposition, saveCreditHidden, saveProfile, saveState, setCompositionSnapshot, setTarget, siteId, target } = useFooterComposerState({
29360
+ function FooterComposerPanel(props) {
29361
+ return useFooterAuthoringOptional() ? /* @__PURE__ */ jsx(FooterComposerContent, { ...props }) : /* @__PURE__ */ jsx(FooterComposerProvider, {
29362
+ apiClient: props.apiClient,
29363
+ rawSiteId: props.siteId,
29364
+ canEdit: props.canEdit ?? true,
29365
+ onSaved: props.onSaved,
29366
+ children: /* @__PURE__ */ jsx(FooterComposerContent, { ...props })
29367
+ }, props.siteId);
29368
+ }
29369
+ function FooterComposerContent({ apiClient, siteId: rawSiteId, customFooterMode, manageLinksHref, manageFormsHref = manageLinksHref.replace(/\/navigation$/u, "/forms"), manageNewsletterHref = manageLinksHref.replace(/\/navigation$/u, "/newsletter"), manageSettingsHref, widgets, layoutSelection, liveRuntime, appearanceControls, initialTarget, initialTargetRequestId, variant = "full", canEdit = true, onSaved, loadingFallback }) {
29370
+ const { businessAddress, authoringAllowed, canEdit: authoringEnabled, compositionSnapshot, engagementOptions, fieldState, retryFailedDrafts, acceptingEdits, load, loadError, writeStatus, compositionDrafts, profileDrafts, navigationMenus, profileSnapshot, credit, saveComposition, saveCreditHidden, saveProfile, setCompositionSnapshot, setTarget, siteId, target } = useFooterComposerState({
29869
29371
  apiClient,
29870
29372
  canEdit,
29871
29373
  initialTarget,
29872
29374
  initialTargetRequestId,
29873
- navigationLayoutControl: suppliedNavigationControl,
29874
29375
  includeThemeStatus: variant === "full",
29875
29376
  onSaved,
29876
29377
  rawSiteId
@@ -29896,96 +29397,101 @@ function FooterComposerPanel({ apiClient, siteId: rawSiteId, customFooterMode, m
29896
29397
  }
29897
29398
  });
29898
29399
  return /* @__PURE__ */ jsx(ReadyFooterComposer, {
29400
+ businessAddress,
29899
29401
  canEdit: authoringEnabled,
29900
29402
  compositionSnapshot,
29901
29403
  customFooterMode,
29902
29404
  engagementOptions,
29903
- arrangement,
29405
+ layoutSelection,
29406
+ liveRuntime,
29407
+ appearanceControls,
29904
29408
  manageFormsHref,
29905
29409
  manageLinksHref,
29906
29410
  manageNewsletterHref,
29907
29411
  manageSettingsHref,
29908
- message,
29909
- navigationLayoutControl,
29412
+ widgets,
29413
+ writeStatus,
29414
+ compositionDrafts,
29415
+ profileDrafts,
29416
+ retryFailedDrafts,
29417
+ acceptingEdits,
29910
29418
  navigationMenus,
29911
29419
  profileSnapshot,
29912
29420
  credit,
29913
29421
  saveComposition,
29914
29422
  saveCreditHidden,
29915
29423
  saveProfile,
29916
- saveState,
29917
29424
  setTarget,
29425
+ beginAddingEngagement: fieldState.beginAddingEngagement,
29918
29426
  target,
29919
29427
  variant
29920
29428
  });
29921
29429
  }
29922
29430
  function ReadyFooterComposer(props) {
29923
- const [engagementCandidate, setEngagementCandidate] = useState(null);
29924
- const { canEdit, compositionSnapshot, engagementOptions, arrangement, navigationLayoutControl, navigationMenus, profileSnapshot, target } = props;
29925
- const candidateComposition = engagementCandidate === null ? null : upsertFooterEngagementSection(compositionSnapshot.composition, engagementCandidate);
29926
- const previewComposition = candidateComposition?.ok === true ? candidateComposition.value : compositionSnapshot.composition;
29927
- const candidateError = candidateComposition?.ok === false ? candidateComposition.error.message : null;
29431
+ const { canEdit, compositionSnapshot, engagementOptions, layoutSelection, navigationMenus, profileSnapshot, target } = props;
29928
29432
  const currentEngagement = compositionSnapshot.composition.sections.find((section) => section.kind === "engagement") ?? null;
29929
- const previewEngagement = previewComposition.sections.find((section) => section.kind === "engagement") ?? null;
29930
- const engagementReadiness = resolveFooterEngagementAuthoringState(previewEngagement, engagementOptions);
29931
- const resolvedEngagement = resolveFooterEngagementPreview(previewEngagement, engagementOptions);
29932
- const hasMainNavigation = navigationMenus.some((menu) => menu.location === "footer" && menu.items.length > 0);
29933
- const hasLegalPolicyNavigation = navigationMenus.some((menu) => menu.location === "legal" && menu.items.length > 0);
29934
- const plan = planFooterEditorView({
29935
- composition: previewComposition,
29433
+ const engagementReadiness = resolveFooterEngagementAuthoringState(currentEngagement, engagementOptions);
29434
+ const resolvedEngagement = resolveFooterEngagementPreview(currentEngagement, engagementOptions);
29435
+ const navigationFacts = footerMenuNavigationFacts(navigationMenus);
29436
+ const previewRuntime = buildFooterPreviewRuntime({
29437
+ composition: compositionSnapshot.composition,
29936
29438
  publicProfile: profileSnapshot.profile,
29937
- hasBusinessAddress: profileSnapshot.hasBusinessAddress,
29439
+ businessAddress: props.businessAddress,
29938
29440
  hasLogo: profileSnapshot.hasLogo,
29939
- hasMainNavigation,
29940
- hasLegalPolicyNavigation,
29941
- hasEngagementSource: resolvedEngagement.kind === "resolved",
29942
- canEdit,
29943
- arrangement,
29944
- navigationLayout: navigationLayoutControl.layout
29441
+ navigationFacts,
29442
+ hasLegalPolicyNavigation: navigationFacts.hasLegalPolicyNavigation,
29443
+ layoutSelection,
29444
+ engagement: resolvedEngagement,
29445
+ attribution: footerCreditLine(props.credit)
29945
29446
  });
29946
- const previewRuntime = buildFooterPreviewRuntime({
29947
- composition: previewComposition,
29447
+ const shownRuntime = props.liveRuntime ?? previewRuntime;
29448
+ const plan = planFooterEditorView({
29449
+ composition: compositionSnapshot.composition,
29948
29450
  publicProfile: profileSnapshot.profile,
29949
29451
  hasBusinessAddress: profileSnapshot.hasBusinessAddress,
29950
29452
  hasLogo: profileSnapshot.hasLogo,
29951
- hasMainNavigation,
29952
- hasLegalPolicyNavigation,
29953
- arrangement,
29954
- navigationLayout: navigationLayoutControl.layout,
29955
- engagement: resolvedEngagement,
29956
- attribution: footerCreditLine(props.credit)
29453
+ hasMainNavigation: navigationFacts.hasFooterNavigation,
29454
+ hasLegalPolicyNavigation: navigationFacts.hasLegalPolicyNavigation,
29455
+ hasEngagementSource: resolvedEngagement.kind === "resolved",
29456
+ canEdit,
29457
+ layout: shownRuntime.presentation.effective
29957
29458
  });
29958
29459
  const targetModule = target.kind === "module" ? compositionSnapshot.composition.sections.find((section) => section.id === target.moduleId) ?? null : null;
29959
29460
  const editingEngagement = target.kind === "engagement" || targetModule?.kind === "engagement";
29461
+ const openPartKey = editingEngagement ? footerPartKey({
29462
+ kind: "engagement",
29463
+ section: unsafeAsFooterModuleId("engagement"),
29464
+ fields: {}
29465
+ }) : targetModule ? footerPartKey({
29466
+ kind: "section-text",
29467
+ section: targetModule.id,
29468
+ fields: {}
29469
+ }) : null;
29960
29470
  const editor = /* @__PURE__ */ jsx(FooterEditorPane, {
29961
29471
  ...props,
29962
29472
  currentEngagement,
29963
29473
  editingEngagement,
29964
- engagementCandidate,
29965
29474
  engagementReadiness,
29966
29475
  plan,
29967
- setEngagementCandidate,
29476
+ shownRuntime,
29968
29477
  targetModule
29969
29478
  });
29970
29479
  return /* @__PURE__ */ jsx(FooterComposerLayout, {
29971
29480
  customFooterMode: props.customFooterMode,
29972
29481
  editor,
29973
- message: candidateError ?? props.message,
29482
+ writeStatus: footerHeaderStatus(props.writeStatus, [...props.compositionDrafts, ...props.profileDrafts], openPartKey),
29483
+ retryFailedDrafts: props.retryFailedDrafts,
29974
29484
  previewRuntime,
29975
- saveState: props.saveState,
29976
- showStagedPreview: engagementCandidate !== null,
29977
29485
  variant: props.variant
29978
29486
  });
29979
29487
  }
29488
+ /** In the details strip the footer draws an icon where the section's heading would be. */
29489
+ function headingShownAsIcon(runtime, moduleId) {
29490
+ return runtime.regions.some((region) => region.slot === "strip" && region.groups.some((group) => group.modules.some((module) => module.id === moduleId)));
29491
+ }
29980
29492
  function FooterEditorPane(props) {
29981
- const applyEngagement = async () => {
29982
- if (props.engagementCandidate === null) return;
29983
- const next = upsertFooterEngagementSection(props.compositionSnapshot.composition, props.engagementCandidate);
29984
- if (!next.ok) return;
29985
- if (await props.saveComposition(next.value, false) !== "failed") props.setEngagementCandidate(null);
29986
- };
29987
29493
  return /* @__PURE__ */ jsxs("fieldset", {
29988
- disabled: !props.canEdit,
29494
+ disabled: !props.canEdit || !props.acceptingEdits,
29989
29495
  className: props.variant === "sidebar" ? "space-y-4 p-4" : "space-y-4 rounded-xl border bg-card p-4 lg:sticky lg:top-6 lg:self-start",
29990
29496
  children: [
29991
29497
  !props.canEdit ? /* @__PURE__ */ jsx("p", {
@@ -29998,45 +29504,21 @@ function FooterEditorPane(props) {
29998
29504
  onClick: () => props.setTarget({ kind: "overview" }),
29999
29505
  children: "← Footer overview"
30000
29506
  }) : null,
30001
- props.target.kind === "overview" ? /* @__PURE__ */ jsx(FooterOverview, {
30002
- credit: props.credit,
30003
- onCreditHiddenChange: props.saveCreditHidden,
30004
- composition: props.compositionSnapshot.composition,
30005
- manageLinksHref: props.manageLinksHref,
30006
- manageSettingsHref: props.manageSettingsHref,
30007
- onChange: props.saveComposition,
30008
- onEngagement: () => props.setTarget({ kind: "engagement" }),
30009
- onTarget: props.setTarget,
30010
- plan: props.plan,
30011
- navigationLayout: props.navigationLayoutControl.layout,
30012
- navigationLayoutPending: props.navigationLayoutControl.pending,
30013
- navigationLayoutDisabled: props.navigationLayoutControl.disabled,
30014
- arrangement: props.arrangement,
30015
- onNavigationLayoutChange: props.navigationLayoutControl.onChange
30016
- }) : null,
29507
+ props.target.kind === "overview" ? /* @__PURE__ */ jsx(FooterOverviewPane, { ...props }) : null,
30017
29508
  props.target.kind === "module" && !props.editingEngagement ? /* @__PURE__ */ jsx(ModuleEditor, {
30018
29509
  module: props.targetModule,
30019
29510
  composition: props.compositionSnapshot.composition,
30020
29511
  onChange: props.saveComposition,
29512
+ headingAsIcon: props.targetModule ? headingShownAsIcon(props.shownRuntime, props.targetModule.id) : false,
29513
+ hasLogo: props.profileSnapshot.hasLogo,
29514
+ manageSettingsHref: props.manageSettingsHref,
29515
+ widgets: props.widgets,
30021
29516
  onShared: (section) => props.setTarget({
30022
29517
  kind: "shared-profile",
30023
29518
  section
30024
29519
  })
30025
29520
  }) : null,
30026
- props.editingEngagement ? /* @__PURE__ */ jsx(FooterEngagementEditorPanel, {
30027
- candidate: props.engagementCandidate,
30028
- current: props.currentEngagement,
30029
- manageFormsHref: props.manageFormsHref,
30030
- manageNewsletterHref: props.manageNewsletterHref,
30031
- onApply: applyEngagement,
30032
- onCancel: () => props.setEngagementCandidate(null),
30033
- onPreview: props.setEngagementCandidate,
30034
- onRemove: async () => {
30035
- if (await props.saveComposition(removeFooterEngagementSection(props.compositionSnapshot.composition), false) !== "failed") props.setEngagementCandidate(null);
30036
- },
30037
- options: props.engagementOptions,
30038
- readiness: props.engagementReadiness
30039
- }, `${props.engagementCandidate?.id ?? props.compositionSnapshot.revision}:${props.currentEngagement?.source.kind ?? "none"}`) : null,
29521
+ props.editingEngagement ? /* @__PURE__ */ jsx(FooterEngagementPane, { ...props }) : null,
30040
29522
  props.target.kind === "shared-profile" ? /* @__PURE__ */ jsx(SharedProfileEditor, {
30041
29523
  section: props.target.section,
30042
29524
  profile: props.profileSnapshot.profile,
@@ -30046,40 +29528,74 @@ function FooterEditorPane(props) {
30046
29528
  ]
30047
29529
  });
30048
29530
  }
30049
- function FooterComposerLayout({ customFooterMode, editor, message, previewRuntime, saveState, showStagedPreview, variant }) {
29531
+ function FooterOverviewPane(props) {
29532
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [Boolean(props.appearanceControls) || props.plan.shown.some(({ section }) => section.kind === "brand") ? /* @__PURE__ */ jsxs("section", {
29533
+ "aria-label": "How it looks",
29534
+ className: "space-y-3",
29535
+ children: [props.appearanceControls, /* @__PURE__ */ jsx(FooterBrandChoiceControl, {
29536
+ composition: props.compositionSnapshot.composition,
29537
+ hasLogo: props.profileSnapshot.hasLogo,
29538
+ manageSettingsHref: props.manageSettingsHref,
29539
+ onChange: (composition) => void props.saveComposition(composition)
29540
+ })]
29541
+ }) : null, /* @__PURE__ */ jsx(FooterOverview, {
29542
+ credit: props.credit,
29543
+ onCreditHiddenChange: props.saveCreditHidden,
29544
+ composition: props.compositionSnapshot.composition,
29545
+ manageLinksHref: props.manageLinksHref,
29546
+ manageSettingsHref: props.manageSettingsHref,
29547
+ onChange: props.saveComposition,
29548
+ onEngagement: () => props.setTarget({ kind: "engagement" }),
29549
+ onAddEngagement: () => {
29550
+ props.beginAddingEngagement();
29551
+ props.setTarget({ kind: "engagement" });
29552
+ },
29553
+ onTarget: props.setTarget,
29554
+ plan: props.plan
29555
+ })] });
29556
+ }
29557
+ function FooterEngagementPane(props) {
29558
+ return /* @__PURE__ */ jsx(FooterEngagementEditorPanel, {
29559
+ current: props.currentEngagement,
29560
+ manageFormsHref: props.manageFormsHref,
29561
+ manageNewsletterHref: props.manageNewsletterHref,
29562
+ onRemove: () => {
29563
+ const id = props.currentEngagement?.id;
29564
+ const next = id ? setFooterSectionSelected(props.compositionSnapshot.composition, id, false) : null;
29565
+ if (next?.ok) props.saveComposition(next.value);
29566
+ props.setTarget({ kind: "overview" });
29567
+ },
29568
+ options: props.engagementOptions,
29569
+ readiness: props.engagementReadiness
29570
+ });
29571
+ }
29572
+ function FooterComposerLayout({ customFooterMode, editor, writeStatus, retryFailedDrafts, previewRuntime, variant }) {
30050
29573
  if (variant === "sidebar") return /* @__PURE__ */ jsxs("div", {
30051
29574
  className: "space-y-3",
30052
- children: [
30053
- /* @__PURE__ */ jsxs("div", {
30054
- className: "border-b px-4 py-3",
30055
- children: [/* @__PURE__ */ jsxs("div", {
30056
- className: "flex items-center gap-2",
30057
- children: [
30058
- /* @__PURE__ */ jsx("h1", {
30059
- className: "font-semibold",
30060
- children: "Footer"
30061
- }),
30062
- /* @__PURE__ */ jsx("span", {
30063
- className: "rounded-full bg-muted px-2 py-0.5 text-xs",
30064
- children: "All pages"
30065
- }),
30066
- /* @__PURE__ */ jsx(SaveBadge, { state: saveState })
30067
- ]
30068
- }), message ? /* @__PURE__ */ jsx("p", {
30069
- role: "alert",
30070
- className: "mt-2 text-xs text-destructive",
30071
- children: message
30072
- }) : null]
30073
- }),
30074
- showStagedPreview ? /* @__PURE__ */ jsxs("div", {
30075
- className: "space-y-2 px-4",
30076
- children: [/* @__PURE__ */ jsx("h2", {
30077
- className: "text-sm font-semibold",
30078
- children: "Staged footer preview"
30079
- }), /* @__PURE__ */ jsx(FooterPreview, { runtime: previewRuntime })]
30080
- }) : null,
30081
- editor
30082
- ]
29575
+ children: [/* @__PURE__ */ jsxs("div", {
29576
+ className: "border-b px-4 py-3",
29577
+ children: [/* @__PURE__ */ jsxs("div", {
29578
+ className: "flex items-center gap-2",
29579
+ children: [
29580
+ /* @__PURE__ */ jsx("h1", {
29581
+ className: "font-semibold",
29582
+ children: "Footer"
29583
+ }),
29584
+ /* @__PURE__ */ jsx("span", {
29585
+ className: "rounded-full bg-muted px-2 py-0.5 text-xs",
29586
+ children: "All pages"
29587
+ }),
29588
+ /* @__PURE__ */ jsx(SaveBadge, { state: writeStatus.saveState })
29589
+ ]
29590
+ }), writeStatus.retry ? /* @__PURE__ */ jsx(FooterLiveSaveFailure, { live: {
29591
+ failed: true,
29592
+ retry: retryFailedDrafts
29593
+ } }) : writeStatus.message ? /* @__PURE__ */ jsx("p", {
29594
+ role: "alert",
29595
+ className: "mt-2 text-xs text-destructive",
29596
+ children: writeStatus.message
29597
+ }) : null]
29598
+ }), editor]
30083
29599
  });
30084
29600
  return /* @__PURE__ */ jsxs("div", {
30085
29601
  className: "grid gap-8 lg:grid-cols-[minmax(0,1fr)_22rem]",
@@ -30099,7 +29615,7 @@ function FooterComposerLayout({ customFooterMode, editor, message, previewRuntim
30099
29615
  className: "rounded-full bg-muted px-2.5 py-1 text-xs font-medium",
30100
29616
  children: "All pages"
30101
29617
  }),
30102
- /* @__PURE__ */ jsx(SaveBadge, { state: saveState })
29618
+ /* @__PURE__ */ jsx(SaveBadge, { state: writeStatus.saveState })
30103
29619
  ]
30104
29620
  }), /* @__PURE__ */ jsx("p", {
30105
29621
  className: "text-sm text-muted-foreground",
@@ -30115,119 +29631,103 @@ function FooterComposerLayout({ customFooterMode, editor, message, previewRuntim
30115
29631
  customFooterMode === "none" || customFooterMode === "blocks" ? " currently inactive." : " shown alongside custom footer blocks."
30116
29632
  ]
30117
29633
  }) : null,
30118
- message ? /* @__PURE__ */ jsx("div", {
29634
+ writeStatus.retry ? /* @__PURE__ */ jsx(FooterLiveSaveFailure, { live: {
29635
+ failed: true,
29636
+ retry: retryFailedDrafts
29637
+ } }) : writeStatus.message ? /* @__PURE__ */ jsx("div", {
30119
29638
  role: "alert",
30120
29639
  className: "rounded-lg border border-destructive/40 bg-destructive/5 p-3 text-sm",
30121
- children: message
29640
+ children: writeStatus.message
30122
29641
  }) : null,
30123
29642
  /* @__PURE__ */ jsx(FooterPreview, { runtime: previewRuntime })
30124
29643
  ]
30125
29644
  }), editor]
30126
29645
  });
30127
29646
  }
30128
- function ModuleEditor({ module, composition, onChange, onShared }) {
30129
- const form = useForm({ values: module ? { ...module } : {} });
30130
- const backend = useMemo(() => createRHFBackend(form), [form]);
30131
- if (module === null) return /* @__PURE__ */ jsx("p", {
29647
+ function ModuleEditor(props) {
29648
+ if (props.module === null) return /* @__PURE__ */ jsx("p", {
30132
29649
  className: "text-sm",
30133
29650
  children: "This section is no longer available."
30134
29651
  });
30135
- const saveSection = (values) => {
30136
- const sections = composition.sections.map((candidate) => candidate.id === module.id ? {
30137
- ...candidate,
30138
- ...values,
30139
- id: candidate.id,
30140
- kind: candidate.kind
30141
- } : candidate);
30142
- const parsed = validateFooterComposition({
30143
- ...composition,
30144
- sections
30145
- });
30146
- if (parsed.ok) onChange(parsed.value);
30147
- };
30148
- if (module.kind === "contact" || module.kind === "opening-hours" || module.kind === "social-links") {
30149
- const section = module.kind;
30150
- return /* @__PURE__ */ jsxs("div", {
30151
- className: "space-y-4",
30152
- children: [
30153
- /* @__PURE__ */ jsxs("form", {
30154
- className: "space-y-3",
30155
- onSubmit: form.handleSubmit(saveSection),
30156
- children: [
30157
- /* @__PURE__ */ jsx("h2", {
30158
- className: "font-semibold",
30159
- children: footerModuleLabel(module)
30160
- }),
30161
- /* @__PURE__ */ jsx(FormRenderer, {
30162
- dateContext: civilPickerDisplay.dateContext,
30163
- fields: moduleFieldCatalog,
30164
- backend
30165
- }),
30166
- /* @__PURE__ */ jsx("button", {
30167
- type: "submit",
30168
- className: buttonClass,
30169
- children: "Save heading"
30170
- })
30171
- ]
30172
- }),
30173
- /* @__PURE__ */ jsx("p", {
30174
- className: "text-sm text-muted-foreground",
30175
- children: "These are shared details. Changes apply everywhere they are used."
30176
- }),
30177
- /* @__PURE__ */ jsx("button", {
30178
- type: "button",
30179
- className: primaryButtonClass,
30180
- onClick: () => onShared(section),
30181
- children: "Edit shared details"
30182
- })
30183
- ]
30184
- });
30185
- }
30186
- if (module.kind === "business-address" || module.kind === "navigation" || module.kind === "legal-navigation") return /* @__PURE__ */ jsxs("form", {
29652
+ return /* @__PURE__ */ jsx(LiveModuleEditor, {
29653
+ ...props,
29654
+ module: props.module
29655
+ }, props.module.id);
29656
+ }
29657
+ const moduleNotes = {
29658
+ "business-address": "This section uses the business address in General settings.",
29659
+ navigation: "Links are managed in Navigation.",
29660
+ "legal-navigation": "Links are managed in Navigation.",
29661
+ "supporting-text": "Only shown in the footer.",
29662
+ legal: "Only shown in the footer."
29663
+ };
29664
+ /**
29665
+ * A section's own words save as they're typed, like the rest of the footer:
29666
+ * a pause or leaving a field saves, under one text key per field so a run of
29667
+ * typing joins one Undo step. A change that doesn't validate shows why and
29668
+ * isn't sent; a failed save keeps what was typed.
29669
+ */
29670
+ function LiveModuleEditor({ module, composition, onChange, onShared, headingAsIcon, hasLogo, manageSettingsHref, widgets }) {
29671
+ const live = useFooterSectionTextPart(module);
29672
+ const form = useForm({ values: live.value });
29673
+ const backend = {
29674
+ ...useMemo(() => createRHFBackend(form), [form]),
29675
+ setValue: (path, value) => {
29676
+ const field = path.split(".")[0];
29677
+ if (field === "heading" || field === "content") live.change(field, value);
29678
+ }
29679
+ };
29680
+ const parsed = parseFooterCompositionV1({
29681
+ ...composition,
29682
+ sections: composition.sections.map((section) => section.id === module.id ? {
29683
+ ...section,
29684
+ ...live.value
29685
+ } : section)
29686
+ });
29687
+ const error = parsed.ok ? null : parsed.error.message;
29688
+ const shared = module.kind === "contact" || module.kind === "opening-hours" || module.kind === "social-links" ? module.kind : null;
29689
+ const note = moduleNotes[module.kind];
29690
+ return /* @__PURE__ */ jsxs("div", {
30187
29691
  className: "space-y-4",
30188
- onSubmit: form.handleSubmit(saveSection),
30189
29692
  children: [
30190
29693
  /* @__PURE__ */ jsx("h2", {
30191
29694
  className: "font-semibold",
30192
29695
  children: footerModuleLabel(module)
30193
29696
  }),
30194
- /* @__PURE__ */ jsx(FormRenderer, {
30195
- dateContext: civilPickerDisplay.dateContext,
30196
- fields: moduleFieldCatalog,
30197
- backend
29697
+ module.kind === "brand" ? /* @__PURE__ */ jsx(FooterBrandChoiceControl, {
29698
+ composition,
29699
+ hasLogo,
29700
+ manageSettingsHref,
29701
+ onChange: (next) => void onChange(next)
29702
+ }) : null,
29703
+ /* @__PURE__ */ jsx("div", {
29704
+ onBlur: live.flush,
29705
+ children: /* @__PURE__ */ jsx(FormRenderer, {
29706
+ dateContext: civilPickerDisplay.dateContext,
29707
+ fields: fieldsForModule(module, headingAsIcon),
29708
+ backend,
29709
+ widgetOverrides: widgets
29710
+ })
30198
29711
  }),
30199
- /* @__PURE__ */ jsx("p", {
29712
+ error ? /* @__PURE__ */ jsx("p", {
29713
+ role: "alert",
29714
+ className: "text-sm text-destructive",
29715
+ children: error
29716
+ }) : null,
29717
+ /* @__PURE__ */ jsx(FooterLiveSaveFailure, { live }),
29718
+ note ? /* @__PURE__ */ jsx("p", {
30200
29719
  className: "text-sm text-muted-foreground",
30201
- children: module.kind === "business-address" ? "This section uses the business address in General settings." : "Links are managed in Navigation."
30202
- }),
30203
- /* @__PURE__ */ jsx("button", {
30204
- type: "submit",
30205
- className: primaryButtonClass,
30206
- children: "Save heading"
30207
- })
30208
- ]
30209
- });
30210
- return /* @__PURE__ */ jsxs("form", {
30211
- className: "space-y-4",
30212
- onSubmit: form.handleSubmit(saveSection),
30213
- children: [
30214
- /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h2", {
30215
- className: "font-semibold",
30216
- children: footerModuleLabel(module)
30217
- }), /* @__PURE__ */ jsx("p", {
30218
- className: "text-xs text-muted-foreground",
30219
- children: "Footer-local content"
30220
- })] }),
30221
- /* @__PURE__ */ jsx(FormRenderer, {
30222
- dateContext: civilPickerDisplay.dateContext,
30223
- fields: fieldsForModule(module),
30224
- backend
30225
- }),
30226
- /* @__PURE__ */ jsx("button", {
30227
- type: "submit",
29720
+ children: note
29721
+ }) : null,
29722
+ shared ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("p", {
29723
+ className: "text-sm text-muted-foreground",
29724
+ children: "These are shared details. Changes apply everywhere they're used."
29725
+ }), /* @__PURE__ */ jsx("button", {
29726
+ type: "button",
30228
29727
  className: primaryButtonClass,
30229
- children: "Save section"
30230
- })
29728
+ onClick: () => onShared(shared),
29729
+ children: "Edit shared details"
29730
+ })] }) : null
30231
29731
  ]
30232
29732
  });
30233
29733
  }
@@ -30499,7 +29999,7 @@ function SocialLinksEditor({ profile, onChange }) {
30499
29999
  children: "Social links"
30500
30000
  }), /* @__PURE__ */ jsx("p", {
30501
30001
  className: "text-xs text-muted-foreground",
30502
- children: "Ordered public links. Changes apply everywhere they are used."
30002
+ children: "Ordered public links. Changes apply everywhere they're used."
30503
30003
  })] }),
30504
30004
  links.map((link, index) => /* @__PURE__ */ jsxs("div", {
30505
30005
  className: "space-y-2 rounded-lg border p-3",
@@ -33066,27 +32566,30 @@ function footerComposerNavigationProps(view, requestId) {
33066
32566
  }
33067
32567
  //#endregion
33068
32568
  //#region ../preview-next/src/client/preview/PreviewFooterEditorPanel.tsx
33069
- function PreviewFooterEditorPanel({ sdkConfig, apiClient, siteId, dashboardBaseUrl, theme, view, requestId, canEdit, onSaved }) {
33070
- const navigationLayoutControl = useSiteChromeCustomizeOptional()?.footerNavigationControl;
32569
+ function PreviewFooterEditorPanel({ sdkConfig, apiClient, siteId, dashboardBaseUrl, theme, view, requestId, canEdit }) {
32570
+ const liveRuntime = useLiveFooterRuntime();
33071
32571
  const dashboardSiteUrl = `${dashboardBaseUrl?.replace(/\/$/u, "") ?? ""}/dashboard/sites/${siteId}`;
33072
- return /* @__PURE__ */ jsx(FooterComposerPanel, {
33073
- apiClient,
32572
+ return /* @__PURE__ */ jsx(PreviewFormProvider, {
33074
32573
  siteId,
33075
- customFooterMode: resolveSdkFooterMode(sdkConfig),
33076
- manageLinksHref: `${dashboardSiteUrl}/navigation`,
33077
- manageSettingsHref: `${dashboardSiteUrl}/settings`,
33078
- ...footerComposerLayoutProps(theme),
33079
- navigationLayoutControl,
33080
- loadingFallback: /* @__PURE__ */ jsx(ContentSpinner, { className: "py-8" }),
33081
- ...footerComposerNavigationProps(view, requestId),
33082
- variant: "sidebar",
33083
- canEdit,
33084
- onSaved
32574
+ theme,
32575
+ previewClient: apiClient,
32576
+ children: /* @__PURE__ */ jsx(FooterComposerPanel, {
32577
+ apiClient,
32578
+ siteId,
32579
+ customFooterMode: resolveSdkFooterMode(sdkConfig),
32580
+ manageLinksHref: `${dashboardSiteUrl}/navigation`,
32581
+ manageSettingsHref: `${dashboardSiteUrl}/settings`,
32582
+ layoutSelection: footerLayoutSelection(theme),
32583
+ widgets: previewWidgetOverrides,
32584
+ liveRuntime: liveRuntime ?? void 0,
32585
+ appearanceControls: /* @__PURE__ */ jsx(SiteChromeSurfaceControls, { surface: "footer" }),
32586
+ loadingFallback: /* @__PURE__ */ jsx(ContentSpinner, { className: "py-8" }),
32587
+ ...footerComposerNavigationProps(view, requestId),
32588
+ variant: "sidebar",
32589
+ canEdit
32590
+ })
33085
32591
  });
33086
32592
  }
33087
- function footerComposerLayoutProps(theme) {
33088
- return { arrangement: resolveFooterLayoutHints(theme).layoutVariant };
33089
- }
33090
32593
  //#endregion
33091
32594
  //#region ../preview-next/src/client/preview/PreviewEditorGuidanceCard.tsx
33092
32595
  function PreviewEditorGuidanceCard({ guidance, completeSetupDisabled, onCompleteSetup }) {
@@ -35275,10 +34778,9 @@ function StyleConfigurator({ siteId, apiClient, buttonStyleRepairs, onFocusedSur
35275
34778
  const currentTypography = shown.theme.typography;
35276
34779
  const currentHeaderLayout = getHeaderLayout(selection.headerLayoutId);
35277
34780
  const currentHeaderStyle = getHeaderStyle(selection.headerStyleId);
35278
- const currentFooterLook = findFooterLook(selection.footerLookId ?? chromeSelectionModels.footer.renderedLookId);
35279
34781
  const headerSurfaceState = siteChromeCustomize.getSurfaceState("header");
35280
34782
  const styleSelections = siteChromeCustomize.styleSelections;
35281
- const { handlePreviewButtonStyle, handlePreviewHeaderLayout, handlePreviewHeaderStyle, handlePreviewFooterLook, handlePreviewPalette, handleHeadingTypographyChange, handleBodyTypographyChange, handleTypographyScaleChange, handleTokenOverride, handleChooseSiteStyle } = controls;
34783
+ const { handlePreviewButtonStyle, handlePreviewHeaderLayout, handlePreviewHeaderStyle, handlePreviewPalette, handleHeadingTypographyChange, handleBodyTypographyChange, handleTypographyScaleChange, handleTokenOverride, handleChooseSiteStyle } = controls;
35282
34784
  if (expandedRow === "typography" && typographySurface.kind !== "overview") return /* @__PURE__ */ jsx("div", {
35283
34785
  className: "flex h-full min-h-0 flex-col",
35284
34786
  "data-style-configurator-focused-surface": true,
@@ -35352,24 +34854,6 @@ function StyleConfigurator({ siteId, apiClient, buttonStyleRepairs, onFocusedSur
35352
34854
  onMenuFontSizeChange: siteChromeCustomize.setHeaderMenuFontSize
35353
34855
  }) : null
35354
34856
  }),
35355
- /* @__PURE__ */ jsx(SiteChromeSelectionRow, {
35356
- label: "Footer",
35357
- ariaLabel: "Footer layout",
35358
- defaultDescription: "Use the footer layout chosen for this site style.",
35359
- expanded: expandedRow === "footer",
35360
- onToggle: () => handleToggleRow("footer"),
35361
- currentId: chromeSelectionModels.footer.renderedLookId,
35362
- currentLabel: currentFooterLook?.label ?? "Unknown footer layout",
35363
- scopeDescription: "Changes the footer layout on every page.",
35364
- options: chromeSelectionModels.footer.options,
35365
- diagnostics: chromeSelectionModels.footer.diagnostics,
35366
- onCycle: (direction) => {
35367
- const next = cycleSiteChromeSelectionId(chromeSelectionModels.footer.options, chromeSelectionModels.footer.renderedLookId, direction);
35368
- if (next !== void 0) handlePreviewFooterLook(next);
35369
- },
35370
- onPreview: handlePreviewFooterLook,
35371
- disabled
35372
- }),
35373
34857
  /* @__PURE__ */ jsx(ButtonStyleRow, {
35374
34858
  expanded: expandedRow === "buttons",
35375
34859
  onToggle: () => handleToggleRow("buttons"),
@@ -35429,10 +34913,6 @@ function useConfiguratorControls(owner) {
35429
34913
  styleId
35430
34914
  }, "immediate");
35431
34915
  },
35432
- handlePreviewFooterLook: (lookId) => choose?.({
35433
- kind: "set-footer-look",
35434
- lookId
35435
- }, "immediate"),
35436
34916
  handlePreviewPalette: (key) => {
35437
34917
  const palette = findCuratedPalette(key);
35438
34918
  if (palette) choose?.({
@@ -37153,8 +36633,7 @@ function SidebarTaskView({ props, view, requestId, uiStoreForBlockEditor, linked
37153
36633
  theme: props.theme ?? null,
37154
36634
  view,
37155
36635
  requestId,
37156
- canEdit,
37157
- onSaved: requestServerRefresh
36636
+ canEdit
37158
36637
  });
37159
36638
  case "assistant": return null;
37160
36639
  case "linkedEntry": return linkedEntry ? /* @__PURE__ */ jsx(LinkedEntryEditorPanel, {