@riverbankcms/sdk 0.171.0 → 0.172.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_dts/{BlocksIslandsHydrator-xuFmD41p.d.ts → BlocksIslandsHydrator-DtrzTJ77.d.ts} +1 -1
- package/dist/_dts/{Page-4fzXy8H9.d.ts → Page-DViYbakk.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-BlHgMsc8.d.ts → SdkPreviewMode-D-5OeDbT.d.ts} +2 -2
- package/dist/_dts/{client-BPoU758C.d.ts → client-DZBOzd3U.d.ts} +1 -2
- package/dist/_dts/{content-types-TnkhoSls.d.ts → content-types-DS3DrYn_.d.ts} +3 -3
- package/dist/_dts/{contracts-7wrMA79U.d.ts → contracts-C3QGPCUf.d.ts} +3 -3
- package/dist/_dts/{footerPageOutline-DaOsPQ_Q.d.ts → footerPageOutline-D9Q7VIul.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-D9aDEzKK.d.ts → generatePageMetadata-R7NeFT1u.d.ts} +2 -2
- package/dist/_dts/{index-DDKJfaLY.d.ts → index-BnMavhoh.d.ts} +2 -2
- package/dist/_dts/{index-585vn6qb.d.ts → index-C0zjLMAW.d.ts} +49 -38
- package/dist/_dts/{index-W9R3Bnf2.d.ts → index-CpOkfBt1.d.ts} +3 -3
- package/dist/_dts/{index-Cbw0IiY7.d.ts → index-Da4UMgbs.d.ts} +2 -2
- package/dist/_dts/{index-DNCDENic.d.ts → index-DkFV_1Bc.d.ts} +1 -1
- package/dist/_dts/{index-ChNbrcgD.d.ts → index-Dns7OHyl.d.ts} +1 -1
- package/dist/_dts/{index-CZKSUcDs.d.ts → index-MuMYjetm.d.ts} +4 -4
- package/dist/_dts/{loadContent-DPyNAJym.d.ts → loadContent-DJmXHzfi.d.ts} +7 -7
- package/dist/_dts/{request-jXTRN1Y4.d.ts → request-wQ28JWbr.d.ts} +66983 -65876
- package/dist/_dts/{resolveBlockData-BbvE-gsZ.d.ts → resolveBlockData-C-IP53u9.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-BBgih00D.d.ts → resolvePageContent-Cc4zqaEC.d.ts} +2 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +7 -7
- package/dist/_dts/sdk/src/config/index.d.ts +6 -6
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
- package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
- package/dist/_dts/sdk/src/data/types.d.ts +2 -2
- package/dist/_dts/sdk/src/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
- package/dist/_dts/sdk/src/next/index.d.ts +7 -7
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
- package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
- package/dist/_dts/sdk/src/theme/index.d.ts +18 -1
- package/dist/_dts/{types-kWvBwYK6.d.ts → types-CpjyP5I4.d.ts} +7 -7
- package/dist/_dts/{types-DEAKoDNi.d.ts → types-DrinAfeW.d.ts} +3 -3
- package/dist/_dts/{types-BXuVxDYo.d.ts → types-ZuZoGsZV.d.ts} +2 -2
- package/dist/_dts/{validation-BAO0_ntM.d.ts → validation-CIZ_fP5l.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DfMsMIej.mjs → BlocksIslandsHydrator-UFmQB1BE.mjs} +17 -17
- package/dist/client/{BookingMailingListNote-aaSicywS.mjs → BookingMailingListNote-VjRYhx1c.mjs} +6 -6
- package/dist/client/{BookingPanelArrangement-OgftZ9QC.mjs → BookingPanelArrangement-DpqnRo-t.mjs} +1 -1
- package/dist/client/{BookingQuestionFields-BlaCItmH.mjs → BookingQuestionFields-CzOT8ZWo.mjs} +4 -4
- package/dist/client/{CalendarNavigationChevron-iMWrY6Hz.mjs → CalendarNavigationChevron-CNckKZct.mjs} +7 -7
- package/dist/client/{CheckboxChoice-B65wFjqx.mjs → CheckboxChoice-b-PJLEXe.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-BCumOTLY.mjs → DemoBookingPortalAccess-CmZLVXOy.mjs} +6 -6
- package/dist/client/{EventCalendar.client-kh7mkYnW.mjs → EventCalendar.client-BU-SxLCn.mjs} +9 -9
- package/dist/client/{EventCombined.client-DXD5i0Ar.mjs → EventCombined.client-f28VltfY.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-DKKRCuta.mjs → EventEmbeddedCheckoutStep-B18VbNS_.mjs} +1 -1
- package/dist/client/{EventItem-BnwcoFQN.mjs → EventItem-sKBofjiW.mjs} +40 -14
- package/dist/client/{EventListWeekNavigation-DuG6z02f.mjs → EventListWeekNavigation-IAcax47T.mjs} +1 -1
- package/dist/client/{EventListing.client-18yfHrcr.mjs → EventListing.client-BEtnRvZr.mjs} +3 -3
- package/dist/client/{EventListing.view-BM7rTVSL.mjs → EventListing.view-BZ4l_rmT.mjs} +189 -73
- package/dist/client/{EventRegistrationPayment-D5J3DR0x.mjs → EventRegistrationPayment-BWb295cD.mjs} +9 -9
- package/dist/client/{LocationMapActions-QahdLtdE.mjs → LocationMapActions-Hsj2HC_1.mjs} +2 -2
- package/dist/client/{MapDrawingSvg-Dy6UMuIw.mjs → MapDrawingSvg-C7E7Lyfa.mjs} +1 -1
- package/dist/client/{Page-DH2sm4Cf.mjs → Page-Ds1s3DuC.mjs} +1425 -490
- package/dist/client/{ProtectedSubmitButton-AOUzjDK9.mjs → ProtectedSubmitButton-C-ql101B.mjs} +1 -1
- package/dist/client/{StepIndicator-CsRlU46Y.mjs → StepIndicator-CSCyAaKY.mjs} +6 -6
- package/dist/client/{TabBarFragment-CsAufYwT.mjs → TabBarFragment-BqfRLojo.mjs} +1 -1
- package/dist/client/{ThemedButton-BMDHwnM6.mjs → ThemedButton-DuaYtnvG.mjs} +1 -1
- package/dist/client/{accessibleSurfaces-Bbn1-jJ8.mjs → accessibleSurfaces-OsAseM7H.mjs} +57 -42
- package/dist/client/{accordion-DT4MD3Np.mjs → accordion-DgwFZJSx.mjs} +1 -1
- package/dist/client/{booking-form.client-DdqNQNCa.mjs → booking-form.client-CKY9oksp.mjs} +33 -29
- package/dist/client/{bookingForm-CLN396HU.mjs → bookingForm-CsHhcdSF.mjs} +4 -4
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{boxStyleClassNames-iLF_3KX9.mjs → boxStyleClassNames-B1Z_TGAe.mjs} +1 -1
- package/dist/client/{carousel-DFLomCGm.mjs → carousel-0sw2Kc3a.mjs} +2 -2
- package/dist/client/{carousel.client-YF4mUK5t.mjs → carousel.client-h65clfUO.mjs} +1 -1
- package/dist/client/{cart-BozMM5NK.mjs → cart-CPfvMDGJ.mjs} +3 -3
- package/dist/client/{cart.client-CqOOxPbW.mjs → cart.client-BJBPUTmg.mjs} +1 -1
- package/dist/client/{checkout-CTWF5nbB.mjs → checkout-DU4JFjGT.mjs} +3 -3
- package/dist/client/{checkout.client-CpqxN8e0.mjs → checkout.client-BbNCO4xa.mjs} +1 -1
- package/dist/client/{checkoutUrls-Ccg6yfjq.mjs → checkoutUrls-BQ3OlWlM.mjs} +1 -1
- package/dist/client/client.mjs +151 -6
- package/dist/client/{context-Dzjv2CpA.mjs → context-xNC1Cyjw.mjs} +14 -1
- package/dist/client/{cta-pzQkBLgS.mjs → cta-CNVQHLKs.mjs} +53 -11
- package/dist/client/{dateFormatting-BfurxGwg.mjs → dateFormatting-B6ea-egy.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-D0dcPsRE.mjs → demoPortalMagicLink-BhjGxhX3.mjs} +1 -1
- package/dist/client/{display-Cl6mgSJa.mjs → display-B5DfNb6A.mjs} +1869 -333
- package/dist/client/{enhanceHeaderSection-CJCl0HJC.mjs → enhanceHeaderSection-BFcHLuqk.mjs} +139 -16
- package/dist/client/{event-details.client-Pn9Kxh3I.mjs → event-details.client-WHT5GLn2.mjs} +1 -1
- package/dist/client/{event-registration.client-BAmBdWXE.mjs → event-registration.client-CmnRKELC.mjs} +11 -11
- package/dist/client/{eventCalendar-C5Bh2L8L.mjs → eventCalendar-2NbdCyov.mjs} +4 -4
- package/dist/client/{eventCombined-dELKxxIe.mjs → eventCombined-D1lH1n2T.mjs} +4 -4
- package/dist/client/{eventDetails-Do9D_fJ_.mjs → eventDetails-BHvnF2Tw.mjs} +2 -2
- package/dist/client/{eventListing-B2HTUWLq.mjs → eventListing-EhSDk4UL.mjs} +4 -4
- package/dist/client/{eventRegistration-ByOJnqGc.mjs → eventRegistration-z_0jN_KS.mjs} +4 -4
- package/dist/client/{form-DX70QG-J.mjs → form-BfChzSkS.mjs} +3 -3
- package/dist/client/{form.client-CJoqBrS6.mjs → form.client-D1zehtPk.mjs} +4 -4
- package/dist/client/{form.parts-DTof9pL3.mjs → form.parts-rMDlUQIv.mjs} +3 -3
- package/dist/client/{formatDate-Cjouxh4Y.mjs → formatDate-ymSVT9Y5.mjs} +1 -1
- package/dist/client/gifting/client.mjs +3 -3
- package/dist/client/{headerSection-CJuPX_1K.mjs → headerSection-BX9bQ84k.mjs} +2 -2
- package/dist/client/{newsletter-form.client-CqzNjOft.mjs → newsletter-form.client-DMbuJCtJ.mjs} +5 -5
- package/dist/client/{newsletter-form.parts-DjJsFms2.mjs → newsletter-form.parts-BxrVsoI0.mjs} +2 -2
- package/dist/client/{newsletterForm-D1MHoPbh.mjs → newsletterForm-B_I3FJFS.mjs} +3 -3
- package/dist/client/{noop-poI1m2yW.mjs → noop-CamIX2yK.mjs} +17 -1
- package/dist/client/portal/client.mjs +231 -117
- package/dist/client/{product-detail.client-DOQ7El1d.mjs → product-detail.client-qxuiYCof.mjs} +1 -1
- package/dist/client/{product-list.client-CmxOZbzL.mjs → product-list.client-CDL-jihv.mjs} +1 -1
- package/dist/client/{productDetail-BN3zv5sa.mjs → productDetail-B97m0uZy.mjs} +3 -3
- package/dist/client/{productList-GN_Id4bF.mjs → productList-DE4vSSG_.mjs} +3 -3
- package/dist/client/{propsDecoder-BdmzM3D5.mjs → propsDecoder-BTde6Syh.mjs} +3 -3
- package/dist/client/{registry.server-BOyra8CA.mjs → registry.server-Cn8XjRte.mjs} +1464 -1183
- package/dist/client/rendering/client.mjs +27 -27
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +22 -16
- package/dist/client/{richText-coerce-CtoGLZ_e.mjs → richText-coerce-Bcl3vTb4.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-DnaJ8PQc.mjs → routeIslandApiConfig-BjRoLoMD.mjs} +1 -1
- package/dist/client/{runtimeResponse-BN8PoIVp.mjs → runtimeResponse-B-lrAGhX.mjs} +1 -1
- package/dist/client/{runtimeResponse-B1-cyLXt.mjs → runtimeResponse-CPcA8xSm.mjs} +1 -1
- package/dist/client/{shop-LjBLDBqF.mjs → shop-BC4H0oYT.mjs} +3 -3
- package/dist/client/{shop-commerce-B8aZTdRJ.mjs → shop-commerce-BsY7a71m.mjs} +12 -12
- package/dist/client/{shop-commerce-store-C1FtHYl7.mjs → shop-commerce-store-BZ5j90HD.mjs} +1 -1
- package/dist/client/{shop.client-D0qZ3KZp.mjs → shop.client-WgGVGelc.mjs} +12 -12
- package/dist/client/{shop.interactive-DAKyWK1B.mjs → shop.interactive-Bb67gPLL.mjs} +187 -81
- package/dist/client/{shopShared-CztcSe9i.mjs → shopShared-BE6TEk2A.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/{timetableModel-D1jDTbms.mjs → timetableModel-Bbz_ECL5.mjs} +10 -10
- package/dist/client/{types-B0hJldSt.mjs → types-DjWUR_O6.mjs} +8 -2
- package/dist/client/{useAvailableSlots-ByHedoBi.mjs → useAvailableSlots-CdP14E_b.mjs} +2 -2
- package/dist/client/{useDiscountApply-CHGYDxdM.mjs → useDiscountApply-DvOSso2l.mjs} +1 -1
- package/dist/client/{useDiscountCodeUi-Dew9UAEy.mjs → useDiscountCodeUi-B4fRd2jy.mjs} +1 -1
- package/dist/client/{useEventPagination-BpC7-ksE.mjs → useEventPagination-M3jC8lgP.mjs} +6 -6
- package/dist/client/{view-BxeiAL3c.mjs → view-B0TFnP4y.mjs} +198 -60
- package/dist/client/{view-ShYH3WXh.mjs → view-DNNNbnNj.mjs} +3 -3
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-CKe4cjZ4.mjs → EventEmbeddedCheckoutStep-aRJjq4x8.mjs} +1 -1
- package/dist/preview-next/client/{LocationPickerEnvironment-lW2aLGWd.mjs → LocationPickerEnvironment-D4F_5rnr.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-C9InQJpd.mjs → MapLibreEditMap-BKMNxSEJ.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-DsSqwrMS.mjs → PageSectionToolbar-D59tHj_L.mjs} +320 -395
- package/dist/preview-next/client/{PreviewEditorSidebar-BEEWzXnU.mjs → PreviewEditorSidebar-CjOIZlUk.mjs} +761 -416
- package/dist/preview-next/client/{PreviewEditorUI-C86Out4V.mjs → PreviewEditorUI--kS9Cwsc.mjs} +126 -137
- package/dist/preview-next/client/PreviewLayoutContext-Dy0LwcHc.mjs +26 -0
- package/dist/preview-next/client/PreviewQueryProvider-BgIucg_5.mjs +21 -0
- package/dist/preview-next/client/{PreviewShell-CBWYjBvQ.mjs → PreviewShell-Bi8-rclb.mjs} +312 -63
- package/dist/preview-next/client/{SdkPreviewModeRuntime-o-mVqWLx.mjs → SdkPreviewModeRuntime-CWTUw-3L.mjs} +308 -135
- package/dist/preview-next/client/{SiteChromeCustomizeButton-H_ciMNHA.mjs → SiteChromeCustomizeButton-CrgS3I8d.mjs} +1936 -320
- package/dist/preview-next/client/{ThemedButton-CKYjeU_M.mjs → ThemedButton-CVYz7h68.mjs} +8 -2
- package/dist/preview-next/client/{lucide-react-DygTyy7K.mjs → lucide-react-BCNn8dEQ.mjs} +1 -1
- package/dist/preview-next/client/{previewAssistantSlot-CuOcsG_N.mjs → previewAssistantSlot-Caofnr1Z.mjs} +23441 -21340
- package/dist/preview-next/client/{previewChromeRoot-DPeV7KaP.mjs → previewChromeRoot-CbAI_jSH.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +5 -4
- package/dist/preview-next/client/sdk-runtime-DY65_hLk.mjs +6 -0
- package/dist/preview-next/client/{useAutosaveStatus-DNA1Q4L1.mjs → useAutosaveStatus-CakNU3lp.mjs} +2 -2
- package/dist/preview-next/client/{useOpenBlockForSetup-BdnMlHC6.mjs → useOpenBlockForSetup-CCEMkosU.mjs} +126 -11
- package/dist/preview-next/container-responsive.css +215 -4
- package/dist/preview-next/editor-base.css +14 -4
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-CtSgU8UZ.mjs → route-contract-DsKDQoVW.mjs} +147 -2
- package/dist/server/{Block.shared-ifgaBglp.mjs → Block.shared-D7Qy9F4a.mjs} +4 -4
- package/dist/server/{ThemeScopeCore-DGDOH6OU.mjs → ThemeScopeCore-D1NTXZdX.mjs} +15 -10
- package/dist/server/{accessibleSurfaces-BuPNCWAK.mjs → accessibleSurfaces-Dbd2__Le.mjs} +12 -11
- package/dist/server/{bindings-CiYpie1M.mjs → bindings-Bp6OnR3n.mjs} +109 -20
- package/dist/server/{block-kinds-DkzOr19P.mjs → block-kinds-BCY9z3oB.mjs} +1 -0
- package/dist/server/{client-ngWuFsmN.mjs → client-dROAfMRa.mjs} +149 -4
- package/dist/server/config-template-validation.mjs +3 -0
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-DeLQeJAZ.mjs → loadContent-zOIrtqz-.mjs} +19 -14
- package/dist/server/{loadPage-D4J747FQ.mjs → loadPage-vwFiq1Rk.mjs} +2 -2
- package/dist/server/next.mjs +6 -6
- package/dist/server/{opaqueSurface-ukEz1BaM.mjs → opaqueSurface-COEKXVwk.mjs} +2 -2
- package/dist/server/{overrideResolution-DSuVkpqm.mjs → overrideResolution-DjboggbB.mjs} +1 -1
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{pageRenderPlan-DFv3h4Ib.mjs → pageRenderPlan-BR4t1rOw.mjs} +954 -337
- package/dist/server/{pageRuntimeSupport-yHaRNWMj.mjs → pageRuntimeSupport-BKo6XVK-.mjs} +3 -2
- package/dist/server/{pageShared-CAZD0LcY.mjs → pageShared-BJjptSGp.mjs} +1039 -853
- package/dist/server/{parseThemeForPersistence-Dl7LIBJq.mjs → parseThemeForPersistence-B18KDEue.mjs} +2 -2
- package/dist/server/{prebuild-BKOCND3b.mjs → prebuild-CntSkZQI.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-GIoExi8A.mjs → prefetchBlockData-BM9Ds0OQ.mjs} +2 -2
- package/dist/server/{registry-BogXzcOD.mjs → registry-wYH0LH5f.mjs} +7269 -4975
- package/dist/server/rendering/components/pageShared.mjs +1 -1
- package/dist/server/rendering/helpers/loadPage.mjs +1 -1
- package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
- package/dist/server/rendering/server.mjs +3 -3
- package/dist/server/rendering.mjs +7 -7
- package/dist/server/{resolveBlockData-CT4YSBve.mjs → resolveBlockData-Bu_p4HxZ.mjs} +2 -2
- package/dist/server/{resolveButtonColourStates-DVISOQD9.mjs → resolveButtonColourStates-CCPUY9Xh.mjs} +53 -33
- package/dist/server/{schema-C92Q8y0-.mjs → schema-BFOqYIMQ.mjs} +2 -1
- package/dist/server/server.mjs +3 -3
- package/dist/server/theme-bridge.mjs +2 -2
- package/dist/server/theme.mjs +2 -2
- package/dist/server/{validation-vSBCWU3w.mjs → validation-DAQdPDku.mjs} +4 -4
- package/dist/server/{version-Cw5vFmUY.mjs → version-DAB0O3yx.mjs} +1 -1
- package/dist/styles/index.css +1260 -15
- package/package.json +1 -1
- package/dist/preview-next/client/PreviewQueryProvider-BC0V7iAR.mjs +0 -43
- package/dist/preview-next/client/sdk-runtime-zTTFZ4MM.mjs +0 -5
package/dist/preview-next/client/{PageSectionToolbar-DsSqwrMS.mjs → PageSectionToolbar-D59tHj_L.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { r as __toESM, t as __commonJSMin } from "./rolldown-runtime-CE6sIgz8.mjs";
|
|
3
|
-
import { $_ as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { A as
|
|
3
|
+
import { $_ as authoredValuesEqual, A_ as getDirectImageUrlForMediaAsset, Ah as useControllableState, Bm as DialogHeader, C as selectedImageFromMediaValue, Cf as plainTextToInlineText, Cg as surfaceForegroundValue, Cm as unwrapResponse, Cy as assertNever, D_ as formatAspectRatioToken, Dy as unsafeAsMediaAssetId, E_ as normalizeRightAngle, Ef as truncateInlineText, F as nextLookTilePin, Fm as Dialog, Fn as defaultBackgroundOverrideForMode, Gm as DialogClose, Hn as rankBackgroundImagePoolItems, Ih as Button, It as getDashboardBaseUrl, Jm as DialogOverlay, Km as DialogContent, L_ as resolveManagedMediaReference, Lm as DialogContent$1, M as lookPositionLabel, Mh as createContextScope, Mm as Callout, Mr as getBlockDefinition, N as lookTilePosition, Nh as composeEventHandlers, Nn as backgroundColorTokens, Np as assertNever$1, O_ as parseAspectRatioValue, Oy as unsafeAsPositiveByteCount, Ph as Primitive, Rh as useControlReadiness, Rm as DialogDescription$1, Sa as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, Sh as useSize, T_ as isRotationDimensionSwap, Tf as replaceInlineTextRange, Uh as useComposedRefs, Um as overlayScrimClass, Vm as DialogTitle$1, Wh as cn$2, Wv as unsafeAsEditorBlockId, Xm as DialogTitle, Xt as useEditorUiStore, Ym as DialogPortal, Zt as useEditorUiStoreInstance, _f as inlineTextHighlightTones, ah as __extends, b as pageDesignLookPosition, ba as resolveMediaStorageUrl, bf as normalizeInlineText, ch as __rest, cp as gradientToCss, ef as RichTextDocSchema, ff as applyInlineTextMarkToRange, gf as inlineTextEqual, hf as inlineTextAccentTones, i as usePreviewSidebarNavigation, ih as __awaiter, j_ as getImageUrl, k as usePreviewRenderBackgrounds, k_ as resolveMediaTransformForAspect, lh as __spreadArray, nf as richTextVariantCapabilities, o as usePreviewPageDesignEditorState, oh as __generator, ov as generateUuidV4, pa as computeMediaTransformStyle, q_ as asLayoutVariantKey, qm as DialogDescription, rh as __assign, sh as __read, th as usePortalContainer, tp as getCuratedSiteStyle, ua as getRichTextImageSize, uh as __spreadArrays, up as getGradientPreset, va as resolveImageUrlWithContext, vf as inlineTextToPlainText, w as selectedImageFromRenderableAsset, wf as removeInlineTextMarkFromRange, wm as selectedCanvasBlockId, xf as normalizeInlineTextMarks, y as cyclePageDesignBlockLook, z_ as mediaIdentifierSchema, zh as cva } from "./previewAssistantSlot-Caofnr1Z.mjs";
|
|
4
|
+
import { A as LoaderCircle, F as Italic$1, G as FileText, Gt as err, H as Highlighter, I as Info, J as FileHeadphone, K as FileSpreadsheet, Kt as ok, L as Image, M as ListOrdered, N as Link$1, R as ImageUp, S as Palette, St as Archive, W as File, Y as FileArchive, Z as EyeOff, a as Upload, c as Trash2, dt as ChevronRight, ft as ChevronLeft, j as List, mt as Check, n as X, q as FilePlay, s as TriangleAlert, tt as Crop, v as Plus, vt as Bold$1, y as Pencil } from "./lucide-react-BCNn8dEQ.mjs";
|
|
5
|
+
import { I as siteColourCss, O as usePreviewCompiledThemeOptional, Tn as classifyKnownMimeType, Ut as readThemeScopeContext, Xt as CHOSEN_OPTION_CLASS, a as PreviewChromeFloatingControl, an as usePrevious, c as measureSiteTopChromeClearance, en as Select, et as useMediaEditor, f as CustomizeBackgroundColorPicker, fn as useFieldDescribedBy, in as SelectValue, ln as Input, nn as SelectItem, nt as useApiMediaUploader, rn as SelectTrigger, rt as TransferError, s as readThemeCustomProperties, tn as SelectContent, tt as useMediaEditorOptional, u as planBlockToolbarPlacement } from "./SiteChromeCustomizeButton-CrgS3I8d.mjs";
|
|
6
|
+
import { A as Tooltip, F as DropdownMenu, H as DropdownMenuTrigger, I as DropdownMenuContent, L as DropdownMenuItem, M as TooltipProvider, N as TooltipTrigger, P as Badge, a as blockNoticeAction, d as arrangementBackgroundControlFor, f as arrangementBlockControlsFor, j as TooltipContent, o as blockNoticeLabel, r as useBlockCustomizeControls, s as blockNoticeMessage, t as useOpenBlockForSetup, u as useBlockNotice } from "./useOpenBlockForSetup-CCEMkosU.mjs";
|
|
7
7
|
import * as React$1 from "react";
|
|
8
8
|
import React, { Component, createContext, createRef, forwardRef, useCallback, useContext, useDebugValue, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
9
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -170,6 +170,53 @@ const footerModeSchema = z.enum([
|
|
|
170
170
|
"none"
|
|
171
171
|
]);
|
|
172
172
|
//#endregion
|
|
173
|
+
//#region ../ui/src/surface.tsx
|
|
174
|
+
const surfaceVariants = cva("text-card-foreground", {
|
|
175
|
+
variants: {
|
|
176
|
+
variant: {
|
|
177
|
+
default: "bg-muted",
|
|
178
|
+
background: "bg-background",
|
|
179
|
+
/**
|
|
180
|
+
* The dark band (Macadamia's ink). `surface-inverse` remaps the
|
|
181
|
+
* button, focus and muted-text tokens inside it, so shared controls
|
|
182
|
+
* read light-on-dark without per-use overrides. Don't nest light
|
|
183
|
+
* surfaces inside it: they'd inherit the remapped tokens.
|
|
184
|
+
*/
|
|
185
|
+
inverse: "surface-inverse bg-inverse text-inverse-foreground"
|
|
186
|
+
},
|
|
187
|
+
radius: {
|
|
188
|
+
sm: "rounded-sm",
|
|
189
|
+
xl: "rounded-xl",
|
|
190
|
+
lg: "rounded-lg",
|
|
191
|
+
md: "rounded-md",
|
|
192
|
+
none: "rounded-none",
|
|
193
|
+
flushMobile: "rounded-none md:rounded-xl"
|
|
194
|
+
},
|
|
195
|
+
padding: {
|
|
196
|
+
none: "",
|
|
197
|
+
sm: "p-3",
|
|
198
|
+
md: "p-4",
|
|
199
|
+
lg: "p-6"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
defaultVariants: {
|
|
203
|
+
variant: "default",
|
|
204
|
+
radius: "xl",
|
|
205
|
+
padding: "none"
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
function Surface({ className, variant, radius, padding, ...props }) {
|
|
209
|
+
return /* @__PURE__ */ jsx("div", {
|
|
210
|
+
"data-slot": "surface",
|
|
211
|
+
className: cn$2(surfaceVariants({
|
|
212
|
+
variant,
|
|
213
|
+
radius,
|
|
214
|
+
padding
|
|
215
|
+
}), className),
|
|
216
|
+
...props
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
//#endregion
|
|
173
220
|
//#region ../ui/src/scrollable-dialog-shell.tsx
|
|
174
221
|
function ScrollableDialogShell({ header, footer, children, mobileFullscreen = false, desktopMaxWidth = "sm:max-w-3xl", desktopHeight = "sm:h-[80vh]", maxWidth = "max-w-3xl", height = "h-[80vh]", disableMotion = false, showCloseButton = true, className, headerClassName, bodyClassName, footerClassName, wrapContent, ...props }) {
|
|
175
222
|
const portalContainer = usePortalContainer();
|
|
@@ -208,7 +255,7 @@ function ScrollableDialogShell({ header, footer, children, mobileFullscreen = fa
|
|
|
208
255
|
container: portalContainer,
|
|
209
256
|
children: [/* @__PURE__ */ jsx(DialogOverlay, {
|
|
210
257
|
"data-slot": "dialog-overlay",
|
|
211
|
-
className:
|
|
258
|
+
className: overlayScrimClass
|
|
212
259
|
}), /* @__PURE__ */ jsx(DialogContent, {
|
|
213
260
|
"data-slot": "scrollable-dialog-shell",
|
|
214
261
|
className: cn$2("bg-background", !disableMotion && "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", mobileFullscreen ? cn$2("fixed inset-0 left-0 top-0 z-50 translate-x-0 translate-y-0", "h-svh w-full max-w-full rounded-none border-0 shadow-lg", !disableMotion && "duration-200", "sm:inset-auto sm:top-[50%] sm:left-[50%] sm:w-full sm:max-w-[calc(100%-2rem)] sm:translate-x-[-50%] sm:translate-y-[-50%] sm:rounded-lg sm:border", desktopMaxWidth, desktopHeight) : cn$2("fixed top-[50%] left-[50%] z-50 translate-x-[-50%] translate-y-[-50%]", "w-full max-w-[calc(100%-2rem)] rounded-lg border shadow-lg", !disableMotion && "duration-200", maxWidth, height), "flex flex-col", className),
|
|
@@ -254,108 +301,13 @@ function ScrollableDialogContent({ title, description, footer, children, mobileF
|
|
|
254
301
|
});
|
|
255
302
|
}
|
|
256
303
|
//#endregion
|
|
257
|
-
//#region ../ui/src/badge.tsx
|
|
258
|
-
const badgeVariants = cva("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
|
|
259
|
-
variants: {
|
|
260
|
-
variant: {
|
|
261
|
-
default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
|
|
262
|
-
secondary: "border-secondary/30 bg-secondary/10 text-secondary-foreground hover:bg-secondary/15",
|
|
263
|
-
destructive: "border-destructive/30 bg-destructive/10 text-destructive hover:bg-destructive/15",
|
|
264
|
-
success: "border-success/30 bg-success/10 text-success hover:bg-success/15",
|
|
265
|
-
warning: "border-warning/30 bg-warning/10 text-warning-foreground hover:bg-warning/15",
|
|
266
|
-
outline: "border-border/60 text-foreground"
|
|
267
|
-
},
|
|
268
|
-
/**
|
|
269
|
-
* A status shown as a coloured dot before its label, with the tone
|
|
270
|
-
* carried by the dot rather than a fill. `true` draws it as a bordered
|
|
271
|
-
* pill (a page's status); `bare` drops the pill and sits in a line of
|
|
272
|
-
* text at the surrounding size (an event workspace's status row).
|
|
273
|
-
*/
|
|
274
|
-
dot: {
|
|
275
|
-
true: "gap-1.5 rounded-full bg-background pl-2 pr-2.5 font-medium before:size-2 before:shrink-0 before:rounded-full before:bg-current before:content-['']",
|
|
276
|
-
bare: "gap-1.5 rounded-none border-0 bg-transparent p-0 text-[length:inherit] font-medium shadow-none before:size-2 before:shrink-0 before:rounded-full before:bg-current before:content-[''] hover:bg-transparent",
|
|
277
|
-
false: ""
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
|
-
compoundVariants: [
|
|
281
|
-
{
|
|
282
|
-
dot: true,
|
|
283
|
-
variant: "default",
|
|
284
|
-
className: "border-primary text-foreground shadow-none before:bg-primary hover:bg-background"
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
dot: true,
|
|
288
|
-
variant: "secondary",
|
|
289
|
-
className: "border-secondary/60 text-foreground before:bg-secondary/70 hover:bg-background"
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
dot: true,
|
|
293
|
-
variant: "destructive",
|
|
294
|
-
className: "border-destructive/50 hover:bg-background"
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
dot: true,
|
|
298
|
-
variant: "success",
|
|
299
|
-
className: "border-success/70 hover:bg-background"
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
dot: true,
|
|
303
|
-
variant: "warning",
|
|
304
|
-
className: "border-warning/60 text-foreground before:bg-warning hover:bg-background"
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
dot: true,
|
|
308
|
-
variant: "outline",
|
|
309
|
-
className: "border-border before:bg-border"
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
dot: "bare",
|
|
313
|
-
variant: "default",
|
|
314
|
-
className: "text-foreground before:bg-primary"
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
dot: "bare",
|
|
318
|
-
variant: "success",
|
|
319
|
-
className: "text-foreground before:bg-success"
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
dot: "bare",
|
|
323
|
-
variant: "warning",
|
|
324
|
-
className: "text-warning-foreground before:bg-warning"
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
dot: "bare",
|
|
328
|
-
variant: "destructive",
|
|
329
|
-
className: "text-destructive before:bg-destructive"
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
dot: "bare",
|
|
333
|
-
variant: "outline",
|
|
334
|
-
className: "text-muted-foreground before:bg-muted-foreground/50"
|
|
335
|
-
}
|
|
336
|
-
],
|
|
337
|
-
defaultVariants: {
|
|
338
|
-
variant: "default",
|
|
339
|
-
dot: false
|
|
340
|
-
}
|
|
341
|
-
});
|
|
342
|
-
function Badge({ className, variant, dot, ...props }) {
|
|
343
|
-
return /* @__PURE__ */ jsx("div", {
|
|
344
|
-
className: cn$2(badgeVariants({
|
|
345
|
-
variant,
|
|
346
|
-
dot
|
|
347
|
-
}), className),
|
|
348
|
-
...props
|
|
349
|
-
});
|
|
350
|
-
}
|
|
351
|
-
//#endregion
|
|
352
304
|
//#region ../ui/src/segmented-control.tsx
|
|
353
305
|
const SEGMENT_SIZE_CLASS = {
|
|
354
306
|
sm: "min-h-7 px-3 text-xs",
|
|
355
307
|
default: "min-h-9 px-4 text-[length:var(--control-font-size)]"
|
|
356
308
|
};
|
|
357
309
|
/**
|
|
358
|
-
* A pale track with the chosen option
|
|
310
|
+
* A pale track with the chosen option filled green as a pill. The options
|
|
359
311
|
* share the track's width equally when the caller makes it wider (`w-full`).
|
|
360
312
|
*/
|
|
361
313
|
function SegmentedControl({ options, value, onValueChange, size = "default", className, ...aria }) {
|
|
@@ -370,7 +322,7 @@ function SegmentedControl({ options, value, onValueChange, size = "default", cla
|
|
|
370
322
|
disabled: opt.disabled,
|
|
371
323
|
onClick: () => onValueChange(opt.value),
|
|
372
324
|
"aria-pressed": isActive,
|
|
373
|
-
className: cn$2("inline-flex flex-1 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-[var(--button-radius)] font-[var(--control-font-weight)] tracking-[var(--control-letter-spacing)] transition-[color,background-color,box-shadow]", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0", SEGMENT_SIZE_CLASS[size], isActive ? "bg-
|
|
325
|
+
className: cn$2("inline-flex flex-1 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-[var(--button-radius)] font-[var(--control-font-weight)] tracking-[var(--control-letter-spacing)] transition-[color,background-color,box-shadow]", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0", SEGMENT_SIZE_CLASS[size], isActive ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:text-foreground"),
|
|
374
326
|
children: opt.label
|
|
375
327
|
}, opt.value);
|
|
376
328
|
})
|
|
@@ -526,12 +478,14 @@ function getState(checked) {
|
|
|
526
478
|
}
|
|
527
479
|
//#endregion
|
|
528
480
|
//#region ../ui/src/switch.tsx
|
|
529
|
-
const Switch = React$1.forwardRef(({ className, disabled, ...props }, ref) => {
|
|
481
|
+
const Switch = React$1.forwardRef(({ className, disabled, "aria-describedby": ariaDescribedBy, ...props }, ref) => {
|
|
530
482
|
const readiness = useControlReadiness(disabled);
|
|
483
|
+
const describedBy = useFieldDescribedBy(props.id, ariaDescribedBy);
|
|
531
484
|
return /* @__PURE__ */ jsx(Switch$1, {
|
|
532
485
|
ref,
|
|
533
|
-
className: cn$2("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-
|
|
486
|
+
className: cn$2("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-[color:color-mix(in_srgb,var(--muted-foreground)_40%,var(--background))]", className),
|
|
534
487
|
...props,
|
|
488
|
+
"aria-describedby": describedBy,
|
|
535
489
|
...readiness,
|
|
536
490
|
children: /* @__PURE__ */ jsx(SwitchThumb, { className: cn$2("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0") })
|
|
537
491
|
});
|
|
@@ -565,12 +519,14 @@ function progressPercentage(value, max) {
|
|
|
565
519
|
}
|
|
566
520
|
//#endregion
|
|
567
521
|
//#region ../ui/src/editor-canvas-chrome.tsx
|
|
522
|
+
const WHITE_EDGE_INSIDE = "shadow-[inset_0_0_0_1px_rgb(255_255_255/0.9)]";
|
|
523
|
+
const WHITE_EDGE_AROUND = "shadow-[0_0_0_1px_rgb(255_255_255/0.9)]";
|
|
568
524
|
/** An outline drawn as its own layer, so the item's own borders, shadows and outlines stay as they are. Place it inside a positioned element. */
|
|
569
525
|
function EditorSelectionFrame() {
|
|
570
526
|
return /* @__PURE__ */ jsx("div", {
|
|
571
527
|
"aria-hidden": "true",
|
|
572
528
|
"data-preview-block-selection-frame": "",
|
|
573
|
-
className:
|
|
529
|
+
className: `pointer-events-none absolute inset-0 z-10 border-[3px] border-sky-500 ${WHITE_EDGE_INSIDE}`
|
|
574
530
|
});
|
|
575
531
|
}
|
|
576
532
|
const INSERTION_PILL_STYLE = {
|
|
@@ -586,9 +542,9 @@ function EditorInsertionMarker({ edge, label = "New block goes here", ref }) {
|
|
|
586
542
|
ref,
|
|
587
543
|
"aria-hidden": "true",
|
|
588
544
|
"data-preview-insertion-marker": edge,
|
|
589
|
-
className: `pointer-events-none absolute inset-x-0 z-30 h-[3px] bg-sky-500 ${edge === "top" ? "-top-px" : "-bottom-px"}`,
|
|
545
|
+
className: `pointer-events-none absolute inset-x-0 z-30 h-[3px] bg-sky-500 ${WHITE_EDGE_AROUND} ${edge === "top" ? "-top-px" : "-bottom-px"}`,
|
|
590
546
|
children: /* @__PURE__ */ jsxs("span", {
|
|
591
|
-
className: "absolute left-1/2 top-1/2 inline-flex -translate-x-1/2 -translate-y-1/2 items-center whitespace-nowrap rounded-full bg-sky-500 font-sans font-semibold text-white shadow-md",
|
|
547
|
+
className: "absolute left-1/2 top-1/2 inline-flex -translate-x-1/2 -translate-y-1/2 items-center whitespace-nowrap rounded-full bg-sky-500 font-sans font-semibold text-white shadow-md ring-1 ring-white/90",
|
|
592
548
|
style: INSERTION_PILL_STYLE,
|
|
593
549
|
children: [/* @__PURE__ */ jsx(Plus, {
|
|
594
550
|
"aria-hidden": "true",
|
|
@@ -610,20 +566,29 @@ function EditorCanvasChipRow({ label, children }) {
|
|
|
610
566
|
children
|
|
611
567
|
});
|
|
612
568
|
}
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
569
|
+
const darkChip = "flex items-center overflow-hidden rounded-full bg-black/80 font-sans text-xs text-white shadow";
|
|
570
|
+
const darkChipButton = "grid h-7 w-7 shrink-0 place-items-center hover:bg-black";
|
|
571
|
+
/** A black chip that does one thing when pressed, such as opening the item it sits on. */
|
|
572
|
+
function EditorCanvasChip({ children, label, onPress }) {
|
|
573
|
+
return /* @__PURE__ */ jsx("button", {
|
|
616
574
|
type: "button",
|
|
617
|
-
|
|
575
|
+
"aria-label": label,
|
|
576
|
+
className: `${darkChip} h-7 shrink-0 px-3 font-medium hover:bg-black`,
|
|
618
577
|
onClick: (event) => {
|
|
578
|
+
event.preventDefault();
|
|
619
579
|
event.stopPropagation();
|
|
620
|
-
|
|
580
|
+
onPress();
|
|
621
581
|
},
|
|
582
|
+
children
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
/** The chip naming the selected item; pressing it opens the item. */
|
|
586
|
+
function EditorCanvasNameChip({ name, onOpen }) {
|
|
587
|
+
return /* @__PURE__ */ jsxs(EditorCanvasChip, {
|
|
588
|
+
onPress: onOpen,
|
|
622
589
|
children: [name, " ›"]
|
|
623
590
|
});
|
|
624
591
|
}
|
|
625
|
-
const darkChip = "flex items-center overflow-hidden rounded-full bg-black/80 text-xs text-white shadow";
|
|
626
|
-
const darkChipButton = "grid h-7 w-7 shrink-0 place-items-center hover:bg-black";
|
|
627
592
|
/** A dark chip with a lead-in label and a choice of options, one of them current. */
|
|
628
593
|
function EditorCanvasChoiceChip({ label, leadIn, options, current, onChoose }) {
|
|
629
594
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -804,6 +769,18 @@ const LIGHT_TEXT = {
|
|
|
804
769
|
};
|
|
805
770
|
const UNKNOWN_SURFACE_CANDIDATES = [LIGHT_TOOLBAR_SURFACE, DARK_TOOLBAR_SURFACE];
|
|
806
771
|
const MIN_SAMPLE_CONTRAST = 3;
|
|
772
|
+
const DARK_PHOTO_STAND_IN = {
|
|
773
|
+
r: 38,
|
|
774
|
+
g: 38,
|
|
775
|
+
b: 38,
|
|
776
|
+
a: 1
|
|
777
|
+
};
|
|
778
|
+
const LIGHT_PHOTO_STAND_IN = {
|
|
779
|
+
r: 232,
|
|
780
|
+
g: 232,
|
|
781
|
+
b: 232,
|
|
782
|
+
a: 1
|
|
783
|
+
};
|
|
807
784
|
function defaultInlineTextPresentationContext(tone) {
|
|
808
785
|
const surface = fallbackSurfaceForToolbarTone(tone);
|
|
809
786
|
const selectedTextRgba = tone === "dark" ? LIGHT_TEXT : DARK_TEXT;
|
|
@@ -819,7 +796,7 @@ function readInlineTextPresentationContext(editable, toolbarTone) {
|
|
|
819
796
|
const computed = window.getComputedStyle(editable);
|
|
820
797
|
const selectedTextRgba = parseCssColor(computed.color) ?? fallbackTextColorForTone(toolbarTone);
|
|
821
798
|
return {
|
|
822
|
-
surface: readInlineTextSurface(editable, toolbarTone),
|
|
799
|
+
surface: readInlineTextSurface(editable, toolbarTone, selectedTextRgba),
|
|
823
800
|
selectedTextColor: colorToCss(selectedTextRgba),
|
|
824
801
|
selectedTextRgba,
|
|
825
802
|
accentTextRgbaByTone: readAccentTextRgbaByTone(editable, selectedTextRgba),
|
|
@@ -875,7 +852,7 @@ function previewTypography(typography) {
|
|
|
875
852
|
};
|
|
876
853
|
}
|
|
877
854
|
function previewSurfaceForText(textRgba, surface) {
|
|
878
|
-
if (surface.kind
|
|
855
|
+
if (surface.kind !== "theme-fallback" && surface.kind !== "toolbar-fallback") return surface;
|
|
879
856
|
if (contrastRatio(textRgba, surface.rgba) >= MIN_SAMPLE_CONTRAST) return surface;
|
|
880
857
|
return [surface.rgba, ...UNKNOWN_SURFACE_CANDIDATES].map((candidate) => ({
|
|
881
858
|
color: colorToCss(candidate),
|
|
@@ -889,40 +866,35 @@ function defaultAccentTextRgbaByTone(fallback) {
|
|
|
889
866
|
function readAccentTextRgbaByTone(editable, fallback) {
|
|
890
867
|
return Object.fromEntries(inlineTextAccentTones.map((tone) => [tone, resolveCssColor(editable, accentColorValue(tone), "color") ?? fallback]));
|
|
891
868
|
}
|
|
892
|
-
function readInlineTextSurface(editable, toolbarTone) {
|
|
869
|
+
function readInlineTextSurface(editable, toolbarTone, textRgba) {
|
|
893
870
|
const fallback = readThemeFallbackSurface(editable) ?? fallbackSurfaceForToolbarTone(toolbarTone);
|
|
894
871
|
const block = editable.closest("[data-block]") ?? editable.closest(".rb-section");
|
|
895
872
|
if (!block) return fallback;
|
|
873
|
+
if (block.querySelector(".background-image")) return readPhotoSurface(block, textRgba);
|
|
896
874
|
const styleLayer = block.querySelector(".background-style");
|
|
875
|
+
const solid = (styleLayer ? readVisibleBackgroundColor(styleLayer, { includeElementOpacity: true }) : null) ?? readVisibleBackgroundColor(block, { includeElementOpacity: true });
|
|
876
|
+
return solid ? {
|
|
877
|
+
kind: "block-solid",
|
|
878
|
+
color: colorToCss(solid),
|
|
879
|
+
rgba: solid
|
|
880
|
+
} : fallback;
|
|
881
|
+
}
|
|
882
|
+
/** The ground over a photo: its overlay, if it has one, over a stand-in for the photo. */
|
|
883
|
+
function readPhotoSurface(block, textRgba) {
|
|
884
|
+
const photo = relativeLuminance(textRgba) > .5 ? DARK_PHOTO_STAND_IN : LIGHT_PHOTO_STAND_IN;
|
|
897
885
|
const overlay = block.querySelector(".background-overlay");
|
|
898
|
-
const hasImage = Boolean(block.querySelector(".background-image"));
|
|
899
886
|
const overlayColor = overlay ? readVisibleBackgroundColor(overlay) : null;
|
|
900
|
-
if (
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
if (styleLayerColor) return {
|
|
912
|
-
kind: "block-solid",
|
|
913
|
-
color: colorToCss(styleLayerColor),
|
|
914
|
-
rgba: styleLayerColor
|
|
915
|
-
};
|
|
916
|
-
}
|
|
917
|
-
if (!hasImage) {
|
|
918
|
-
const blockColor = readVisibleBackgroundColor(block, { includeElementOpacity: true });
|
|
919
|
-
if (blockColor) return {
|
|
920
|
-
kind: "block-solid",
|
|
921
|
-
color: colorToCss(blockColor),
|
|
922
|
-
rgba: blockColor
|
|
923
|
-
};
|
|
924
|
-
}
|
|
925
|
-
return fallback;
|
|
887
|
+
if (!overlay || !overlayColor) return {
|
|
888
|
+
kind: "image",
|
|
889
|
+
color: colorToCss(photo),
|
|
890
|
+
rgba: photo
|
|
891
|
+
};
|
|
892
|
+
const composited = compositeColors(overlayColor, photo, readOpacity(overlay));
|
|
893
|
+
return {
|
|
894
|
+
kind: "image-overlay",
|
|
895
|
+
color: colorToCss(composited),
|
|
896
|
+
rgba: composited
|
|
897
|
+
};
|
|
926
898
|
}
|
|
927
899
|
function readThemeFallbackSurface(root) {
|
|
928
900
|
const themeScope = readThemeScopeContext(root).visualScope?.element ?? root;
|
|
@@ -1090,152 +1062,193 @@ function srgbToLinear(channel) {
|
|
|
1090
1062
|
}
|
|
1091
1063
|
//#endregion
|
|
1092
1064
|
//#region ../editor/src/inline/FloatingToolbar.tsx
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1065
|
+
const ACCENT_NAMES = {
|
|
1066
|
+
accent: "Accent colour",
|
|
1067
|
+
brand: "Brand colour",
|
|
1068
|
+
contrast: "Body text colour"
|
|
1069
|
+
};
|
|
1070
|
+
const HIGHLIGHT_NAMES = {
|
|
1071
|
+
soft: "Light shading",
|
|
1072
|
+
accent: "Accent colour",
|
|
1073
|
+
brand: "Brand colour"
|
|
1074
|
+
};
|
|
1075
|
+
const MENU_LABELS = {
|
|
1076
|
+
accent: "Text colour",
|
|
1077
|
+
highlight: "Highlight"
|
|
1078
|
+
};
|
|
1079
|
+
function FloatingToolbar({ ownerId, selection, selectedText, presentationContext, openMenu, setOpenMenu, onToggleStrong, onToggleEmphasis, onApplyAccent, onRemoveAccent, onApplyHighlight, onRemoveHighlight }) {
|
|
1080
|
+
const ref = useRef(null);
|
|
1081
|
+
const size = useMeasuredSize(ref, `${openMenu ?? "none"}:${selectedText}`);
|
|
1082
|
+
const { style, placement } = toolbarPlacement(selection.rect, size);
|
|
1083
|
+
const words = selectedText.trim().length > 0 ? selectedText.trim() : "Selected text";
|
|
1084
|
+
const options = openMenu === "accent" ? accentOptions(presentationContext, onApplyAccent, onRemoveAccent) : openMenu === "highlight" ? highlightOptions(presentationContext, onApplyHighlight, onRemoveHighlight) : [];
|
|
1085
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1086
|
+
ref,
|
|
1102
1087
|
"data-rb-inline-text-owner": ownerId,
|
|
1103
1088
|
"data-rb-inline-text-toolbar": true,
|
|
1104
|
-
"data-tone": tone,
|
|
1105
1089
|
"data-placement": placement,
|
|
1106
|
-
className: "
|
|
1090
|
+
className: "builder-dashboard-chrome-theme fixed z-[80] bg-transparent text-left font-sans text-sm font-normal not-italic normal-case leading-normal",
|
|
1107
1091
|
style,
|
|
1108
1092
|
onMouseDown: (event) => {
|
|
1109
1093
|
event.preventDefault();
|
|
1110
1094
|
},
|
|
1095
|
+
children: /* @__PURE__ */ jsxs(Surface, {
|
|
1096
|
+
variant: "inverse",
|
|
1097
|
+
radius: "lg",
|
|
1098
|
+
className: cn$2("flex p-1 shadow-lg", placement === "above" ? "flex-col-reverse" : "flex-col"),
|
|
1099
|
+
children: [/* @__PURE__ */ jsx(ToolbarButtons, {
|
|
1100
|
+
openMenu,
|
|
1101
|
+
setOpenMenu,
|
|
1102
|
+
onToggleStrong,
|
|
1103
|
+
onToggleEmphasis
|
|
1104
|
+
}), openMenu ? /* @__PURE__ */ jsx(ToneMenu, {
|
|
1105
|
+
label: MENU_LABELS[openMenu],
|
|
1106
|
+
options,
|
|
1107
|
+
words,
|
|
1108
|
+
placement
|
|
1109
|
+
}) : null]
|
|
1110
|
+
})
|
|
1111
|
+
});
|
|
1112
|
+
}
|
|
1113
|
+
function ToolbarButtons({ openMenu, setOpenMenu, onToggleStrong, onToggleEmphasis }) {
|
|
1114
|
+
const menuButton = (menu, icon) => /* @__PURE__ */ jsx(Button, {
|
|
1115
|
+
type: "button",
|
|
1116
|
+
size: "icon",
|
|
1117
|
+
variant: openMenu === menu ? "secondary" : "ghost",
|
|
1118
|
+
"aria-label": MENU_LABELS[menu],
|
|
1119
|
+
title: MENU_LABELS[menu],
|
|
1120
|
+
"aria-expanded": openMenu === menu,
|
|
1121
|
+
"aria-haspopup": "menu",
|
|
1122
|
+
onClick: () => setOpenMenu(openMenu === menu ? null : menu),
|
|
1123
|
+
children: icon
|
|
1124
|
+
});
|
|
1125
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1126
|
+
className: "flex gap-0.5",
|
|
1111
1127
|
children: [
|
|
1112
|
-
/* @__PURE__ */ jsx(
|
|
1128
|
+
/* @__PURE__ */ jsx(Button, {
|
|
1113
1129
|
type: "button",
|
|
1130
|
+
size: "icon",
|
|
1131
|
+
variant: "ghost",
|
|
1114
1132
|
"aria-label": "Bold",
|
|
1115
1133
|
title: "Bold",
|
|
1116
1134
|
onClick: onToggleStrong,
|
|
1117
|
-
children: /* @__PURE__ */ jsx(Bold$1, {
|
|
1118
|
-
"aria-hidden": true,
|
|
1119
|
-
size: 16
|
|
1120
|
-
})
|
|
1135
|
+
children: /* @__PURE__ */ jsx(Bold$1, { "aria-hidden": true })
|
|
1121
1136
|
}),
|
|
1122
|
-
/* @__PURE__ */ jsx(
|
|
1137
|
+
/* @__PURE__ */ jsx(Button, {
|
|
1123
1138
|
type: "button",
|
|
1139
|
+
size: "icon",
|
|
1140
|
+
variant: "ghost",
|
|
1124
1141
|
"aria-label": "Italic",
|
|
1125
1142
|
title: "Italic",
|
|
1126
1143
|
onClick: onToggleEmphasis,
|
|
1127
|
-
children: /* @__PURE__ */ jsx(Italic$1, {
|
|
1128
|
-
"aria-hidden": true,
|
|
1129
|
-
size: 16
|
|
1130
|
-
})
|
|
1131
|
-
}),
|
|
1132
|
-
/* @__PURE__ */ jsx("button", {
|
|
1133
|
-
type: "button",
|
|
1134
|
-
"aria-label": "Accent color",
|
|
1135
|
-
title: "Accent color",
|
|
1136
|
-
"data-open": openMenu === "accent" ? "true" : void 0,
|
|
1137
|
-
onClick: () => setOpenMenu(openMenu === "accent" ? null : "accent"),
|
|
1138
|
-
children: /* @__PURE__ */ jsx(Palette, {
|
|
1139
|
-
"aria-hidden": true,
|
|
1140
|
-
size: 16
|
|
1141
|
-
})
|
|
1142
|
-
}),
|
|
1143
|
-
/* @__PURE__ */ jsx("button", {
|
|
1144
|
-
type: "button",
|
|
1145
|
-
"aria-label": "Highlight background",
|
|
1146
|
-
title: "Highlight background",
|
|
1147
|
-
"data-open": openMenu === "highlight" ? "true" : void 0,
|
|
1148
|
-
onClick: () => setOpenMenu(openMenu === "highlight" ? null : "highlight"),
|
|
1149
|
-
children: /* @__PURE__ */ jsx(Highlighter, {
|
|
1150
|
-
"aria-hidden": true,
|
|
1151
|
-
size: 16
|
|
1152
|
-
})
|
|
1144
|
+
children: /* @__PURE__ */ jsx(Italic$1, { "aria-hidden": true })
|
|
1153
1145
|
}),
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
children: [accentPreviews.map(({ toneOption, preview }) => /* @__PURE__ */ jsx("button", {
|
|
1157
|
-
type: "button",
|
|
1158
|
-
"aria-label": `Apply ${toneOption} accent color`,
|
|
1159
|
-
title: `Apply ${toneOption} accent color`,
|
|
1160
|
-
onClick: () => onApplyAccent(toneOption),
|
|
1161
|
-
children: /* @__PURE__ */ jsx(TonePreview, {
|
|
1162
|
-
preview,
|
|
1163
|
-
selectedText: clampedSelectedText
|
|
1164
|
-
})
|
|
1165
|
-
}, toneOption)), /* @__PURE__ */ jsx("button", {
|
|
1166
|
-
type: "button",
|
|
1167
|
-
"aria-label": "Use plain text color",
|
|
1168
|
-
title: "Use plain text color",
|
|
1169
|
-
onClick: onRemoveAccent,
|
|
1170
|
-
children: /* @__PURE__ */ jsx(TonePreview, {
|
|
1171
|
-
preview: plainPreview,
|
|
1172
|
-
selectedText: clampedSelectedText
|
|
1173
|
-
})
|
|
1174
|
-
})]
|
|
1175
|
-
}) : null,
|
|
1176
|
-
openMenu === "highlight" ? /* @__PURE__ */ jsxs(ToneMenu, {
|
|
1177
|
-
label: "Highlight background",
|
|
1178
|
-
children: [inlineTextHighlightTones.map((toneOption) => /* @__PURE__ */ jsx("button", {
|
|
1179
|
-
type: "button",
|
|
1180
|
-
"aria-label": `Apply ${toneOption} highlight background`,
|
|
1181
|
-
title: `Apply ${toneOption} highlight background`,
|
|
1182
|
-
onClick: () => onApplyHighlight(toneOption),
|
|
1183
|
-
children: /* @__PURE__ */ jsx(TonePreview, {
|
|
1184
|
-
preview: buildHighlightTonePreview(toneOption, presentationContext),
|
|
1185
|
-
selectedText: clampedSelectedText
|
|
1186
|
-
})
|
|
1187
|
-
}, toneOption)), /* @__PURE__ */ jsx("button", {
|
|
1188
|
-
type: "button",
|
|
1189
|
-
"aria-label": "Remove highlight background",
|
|
1190
|
-
title: "Remove highlight background",
|
|
1191
|
-
onClick: onRemoveHighlight,
|
|
1192
|
-
children: /* @__PURE__ */ jsx(TonePreview, {
|
|
1193
|
-
preview: plainPreview,
|
|
1194
|
-
selectedText: clampedSelectedText
|
|
1195
|
-
})
|
|
1196
|
-
})]
|
|
1197
|
-
}) : null
|
|
1146
|
+
menuButton("accent", /* @__PURE__ */ jsx(Palette, { "aria-hidden": true })),
|
|
1147
|
+
menuButton("highlight", /* @__PURE__ */ jsx(Highlighter, { "aria-hidden": true }))
|
|
1198
1148
|
]
|
|
1199
1149
|
});
|
|
1200
1150
|
}
|
|
1201
|
-
function
|
|
1151
|
+
function accentOptions(context, onApply, onRemove) {
|
|
1152
|
+
const plain = buildPlainTonePreview(context);
|
|
1153
|
+
return [...inlineTextAccentTones.map((tone) => ({
|
|
1154
|
+
key: tone,
|
|
1155
|
+
name: ACCENT_NAMES[tone],
|
|
1156
|
+
preview: buildAccentTonePreview(tone, context),
|
|
1157
|
+
onChoose: () => onApply(tone)
|
|
1158
|
+
})).filter(({ preview }) => !inlineTextTonePreviewLooksSame(preview, plain)), {
|
|
1159
|
+
key: "plain",
|
|
1160
|
+
name: "Plain text",
|
|
1161
|
+
preview: plain,
|
|
1162
|
+
onChoose: onRemove
|
|
1163
|
+
}];
|
|
1164
|
+
}
|
|
1165
|
+
function highlightOptions(context, onApply, onRemove) {
|
|
1166
|
+
return [...inlineTextHighlightTones.map((tone) => ({
|
|
1167
|
+
key: tone,
|
|
1168
|
+
name: HIGHLIGHT_NAMES[tone],
|
|
1169
|
+
preview: buildHighlightTonePreview(tone, context),
|
|
1170
|
+
onChoose: () => onApply(tone)
|
|
1171
|
+
})), {
|
|
1172
|
+
key: "plain",
|
|
1173
|
+
name: "No highlight",
|
|
1174
|
+
preview: buildPlainTonePreview(context),
|
|
1175
|
+
onChoose: onRemove
|
|
1176
|
+
}];
|
|
1177
|
+
}
|
|
1178
|
+
function ToneMenu({ label, options, words, placement }) {
|
|
1179
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1180
|
+
role: "menu",
|
|
1181
|
+
"aria-label": label,
|
|
1182
|
+
className: cn$2("grid gap-0.5 border-current/15", placement === "above" ? "mb-1 border-b pb-1" : "mt-1 border-t pt-1"),
|
|
1183
|
+
children: options.map((option) => /* @__PURE__ */ jsxs(Button, {
|
|
1184
|
+
type: "button",
|
|
1185
|
+
role: "menuitem",
|
|
1186
|
+
variant: "ghost",
|
|
1187
|
+
"aria-label": option.name,
|
|
1188
|
+
className: "h-auto w-full justify-start gap-3 px-1.5 py-1",
|
|
1189
|
+
onClick: option.onChoose,
|
|
1190
|
+
children: [/* @__PURE__ */ jsx(TonePreview, {
|
|
1191
|
+
preview: option.preview,
|
|
1192
|
+
words
|
|
1193
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
1194
|
+
className: "shrink-0",
|
|
1195
|
+
children: option.name
|
|
1196
|
+
})]
|
|
1197
|
+
}, option.key))
|
|
1198
|
+
});
|
|
1199
|
+
}
|
|
1200
|
+
/** The selected words as they'd look in this colour, on the ground they sit on. */
|
|
1201
|
+
function TonePreview({ preview, words }) {
|
|
1202
1202
|
return /* @__PURE__ */ jsx("span", {
|
|
1203
|
-
|
|
1204
|
-
"
|
|
1203
|
+
"aria-hidden": "true",
|
|
1204
|
+
className: cn$2("flex min-h-7 min-w-0 max-w-[12rem] items-center overflow-hidden rounded-sm px-2 py-0.5", preview.lowContrast && "ring-1 ring-inverse-foreground/50"),
|
|
1205
1205
|
style: preview.surfaceStyle,
|
|
1206
1206
|
children: /* @__PURE__ */ jsx("span", {
|
|
1207
|
-
className: "
|
|
1207
|
+
className: "truncate",
|
|
1208
1208
|
style: preview.textStyle,
|
|
1209
|
-
children:
|
|
1209
|
+
children: words
|
|
1210
1210
|
})
|
|
1211
1211
|
});
|
|
1212
1212
|
}
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1213
|
+
const EDGE = 12;
|
|
1214
|
+
const GAP = 8;
|
|
1215
|
+
const FIRST_GUESS = {
|
|
1216
|
+
width: 180,
|
|
1217
|
+
height: 50
|
|
1218
|
+
};
|
|
1219
|
+
/** The toolbar's drawn size, read again whenever its contents change, so it can be kept on screen. */
|
|
1220
|
+
function useMeasuredSize(ref, contentKey) {
|
|
1221
|
+
const [size, setSize] = useState(FIRST_GUESS);
|
|
1222
|
+
useLayoutEffect(() => {
|
|
1223
|
+
const box = ref.current?.getBoundingClientRect();
|
|
1224
|
+
if (!box || box.width === 0) return;
|
|
1225
|
+
if (Math.abs(box.width - size.width) > .5 || Math.abs(box.height - size.height) > .5) setSize({
|
|
1226
|
+
width: box.width,
|
|
1227
|
+
height: box.height
|
|
1228
|
+
});
|
|
1229
|
+
}, [
|
|
1230
|
+
ref,
|
|
1231
|
+
contentKey,
|
|
1232
|
+
size
|
|
1233
|
+
]);
|
|
1234
|
+
return size;
|
|
1220
1235
|
}
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
const left = Math.min(Math.max(
|
|
1224
|
-
|
|
1225
|
-
if (aboveTop < 12) return {
|
|
1236
|
+
/** Above the words when the bar and any open menu fit there, otherwise below. */
|
|
1237
|
+
function toolbarPlacement(rect, size) {
|
|
1238
|
+
const left = Math.min(Math.max(EDGE, rect.left + rect.width / 2 - size.width / 2), Math.max(EDGE, window.innerWidth - size.width - EDGE));
|
|
1239
|
+
if (rect.top - GAP - size.height < EDGE) return {
|
|
1226
1240
|
placement: "below",
|
|
1227
1241
|
style: {
|
|
1228
1242
|
left,
|
|
1229
|
-
top: rect.bottom +
|
|
1230
|
-
width: toolbarWidth
|
|
1243
|
+
top: rect.bottom + GAP
|
|
1231
1244
|
}
|
|
1232
1245
|
};
|
|
1233
1246
|
return {
|
|
1234
1247
|
placement: "above",
|
|
1235
1248
|
style: {
|
|
1236
1249
|
left,
|
|
1237
|
-
top:
|
|
1238
|
-
|
|
1250
|
+
top: rect.top - GAP,
|
|
1251
|
+
transform: "translateY(-100%)"
|
|
1239
1252
|
}
|
|
1240
1253
|
};
|
|
1241
1254
|
}
|
|
@@ -1249,7 +1262,7 @@ function InlineTextEditorStyles() {
|
|
|
1249
1262
|
|
|
1250
1263
|
[data-rb-inline-text-editor]:hover,
|
|
1251
1264
|
[data-rb-inline-text-editor]:focus-visible {
|
|
1252
|
-
outline: 1px dashed
|
|
1265
|
+
outline: 1px dashed rgb(14, 165, 233);
|
|
1253
1266
|
outline-offset: 2px;
|
|
1254
1267
|
}
|
|
1255
1268
|
|
|
@@ -1264,102 +1277,6 @@ function InlineTextEditorStyles() {
|
|
|
1264
1277
|
letter-spacing: inherit;
|
|
1265
1278
|
text-transform: inherit;
|
|
1266
1279
|
}
|
|
1267
|
-
|
|
1268
|
-
.rb-inline-text-toolbar {
|
|
1269
|
-
align-items: center;
|
|
1270
|
-
background: rgba(15, 23, 42, 0.94);
|
|
1271
|
-
border: 1px solid rgba(255, 255, 255, 0.14);
|
|
1272
|
-
border-radius: 8px;
|
|
1273
|
-
box-shadow: 0 18px 44px rgba(15, 23, 42, 0.28);
|
|
1274
|
-
color: white;
|
|
1275
|
-
display: flex;
|
|
1276
|
-
gap: 3px;
|
|
1277
|
-
justify-content: center;
|
|
1278
|
-
padding: 5px;
|
|
1279
|
-
position: fixed;
|
|
1280
|
-
z-index: 80;
|
|
1281
|
-
}
|
|
1282
|
-
|
|
1283
|
-
.rb-inline-text-toolbar[data-tone="light"] {
|
|
1284
|
-
background: rgba(255, 255, 255, 0.98);
|
|
1285
|
-
border-color: rgba(15, 23, 42, 0.14);
|
|
1286
|
-
color: rgb(15, 23, 42);
|
|
1287
|
-
}
|
|
1288
|
-
|
|
1289
|
-
.rb-inline-text-toolbar > button,
|
|
1290
|
-
.rb-inline-text-toolbar-menu > button {
|
|
1291
|
-
align-items: center;
|
|
1292
|
-
background: transparent;
|
|
1293
|
-
border: 0;
|
|
1294
|
-
border-radius: 6px;
|
|
1295
|
-
color: inherit;
|
|
1296
|
-
cursor: pointer;
|
|
1297
|
-
display: inline-flex;
|
|
1298
|
-
font: inherit;
|
|
1299
|
-
justify-content: center;
|
|
1300
|
-
min-height: 30px;
|
|
1301
|
-
min-width: 30px;
|
|
1302
|
-
padding: 5px 7px;
|
|
1303
|
-
}
|
|
1304
|
-
|
|
1305
|
-
.rb-inline-text-toolbar > button:hover,
|
|
1306
|
-
.rb-inline-text-toolbar > button[data-open="true"],
|
|
1307
|
-
.rb-inline-text-toolbar-menu > button:hover {
|
|
1308
|
-
background: rgba(148, 163, 184, 0.22);
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1311
|
-
.rb-inline-text-toolbar-menu {
|
|
1312
|
-
background: inherit;
|
|
1313
|
-
border: inherit;
|
|
1314
|
-
border-radius: 8px;
|
|
1315
|
-
box-shadow: inherit;
|
|
1316
|
-
display: grid;
|
|
1317
|
-
gap: 2px;
|
|
1318
|
-
left: 0;
|
|
1319
|
-
min-width: 100%;
|
|
1320
|
-
padding: 5px;
|
|
1321
|
-
position: absolute;
|
|
1322
|
-
top: calc(100% + 6px);
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
.rb-inline-text-toolbar[data-placement="below"] .rb-inline-text-toolbar-menu {
|
|
1326
|
-
bottom: calc(100% + 6px);
|
|
1327
|
-
top: auto;
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
|
-
.rb-inline-text-toolbar-menu > button {
|
|
1331
|
-
justify-content: flex-start;
|
|
1332
|
-
width: 100%;
|
|
1333
|
-
overflow: hidden;
|
|
1334
|
-
text-align: left;
|
|
1335
|
-
white-space: nowrap;
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
.rb-inline-text-toolbar-preview {
|
|
1339
|
-
align-items: center;
|
|
1340
|
-
border: 1px solid rgba(148, 163, 184, 0.32);
|
|
1341
|
-
border-radius: 5px;
|
|
1342
|
-
display: inline-flex;
|
|
1343
|
-
max-width: 100%;
|
|
1344
|
-
width: 100%;
|
|
1345
|
-
min-height: 28px;
|
|
1346
|
-
overflow: hidden;
|
|
1347
|
-
padding: 3px 7px;
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
.rb-inline-text-toolbar-preview[data-low-contrast="true"] {
|
|
1351
|
-
box-shadow:
|
|
1352
|
-
inset 0 0 0 1px rgba(255, 255, 255, 0.52),
|
|
1353
|
-
0 0 0 1px rgba(15, 23, 42, 0.26);
|
|
1354
|
-
}
|
|
1355
|
-
|
|
1356
|
-
.rb-inline-text-toolbar-preview-text {
|
|
1357
|
-
display: inline;
|
|
1358
|
-
max-width: 100%;
|
|
1359
|
-
overflow: hidden;
|
|
1360
|
-
text-overflow: ellipsis;
|
|
1361
|
-
white-space: nowrap;
|
|
1362
|
-
}
|
|
1363
1280
|
` });
|
|
1364
1281
|
}
|
|
1365
1282
|
//#endregion
|
|
@@ -1598,7 +1515,6 @@ function InlineTextEditor({ value, onChange, as: Comp = "span", id, className, s
|
|
|
1598
1515
|
ownerId,
|
|
1599
1516
|
selection,
|
|
1600
1517
|
selectedText: plainText.slice(selection.start, selection.end),
|
|
1601
|
-
tone: toolbarTone,
|
|
1602
1518
|
presentationContext,
|
|
1603
1519
|
openMenu,
|
|
1604
1520
|
setOpenMenu,
|
|
@@ -30533,7 +30449,7 @@ function GradientPresetCard({ gradientId, selected, onClick }) {
|
|
|
30533
30449
|
type: "button",
|
|
30534
30450
|
"aria-label": `Choose ${preset.name}, ${kindLabel}`,
|
|
30535
30451
|
"aria-pressed": selected,
|
|
30536
|
-
className:
|
|
30452
|
+
className: cn$2("overflow-hidden rounded-md border text-left text-xs transition hover:border-muted-foreground", selected ? CHOSEN_OPTION_CLASS : "bg-background"),
|
|
30537
30453
|
onClick,
|
|
30538
30454
|
children: [/* @__PURE__ */ jsx("span", {
|
|
30539
30455
|
"aria-hidden": "true",
|
|
@@ -30635,7 +30551,7 @@ function MediaLibraryButton({ onOpen }) {
|
|
|
30635
30551
|
function ImagePoolButton({ item, selected, thumbnailUrl, onClick }) {
|
|
30636
30552
|
return /* @__PURE__ */ jsx("button", {
|
|
30637
30553
|
type: "button",
|
|
30638
|
-
className:
|
|
30554
|
+
className: cn$2("w-full rounded-md border px-2 py-1 text-left text-xs hover:bg-muted", selected ? CHOSEN_OPTION_CLASS : "bg-background"),
|
|
30639
30555
|
onClick,
|
|
30640
30556
|
children: /* @__PURE__ */ jsxs("span", {
|
|
30641
30557
|
className: "flex min-w-0 items-center gap-2",
|
|
@@ -31246,46 +31162,55 @@ function useMediaQuery(query) {
|
|
|
31246
31162
|
//#endregion
|
|
31247
31163
|
//#region ../preview-next/src/client/blocks/BlockReadinessNote.tsx
|
|
31248
31164
|
/**
|
|
31249
|
-
* The canvas note on a block
|
|
31250
|
-
*
|
|
31165
|
+
* The canvas note on a block visitors can't see: only editors see it, and it
|
|
31166
|
+
* sits inside the block so it moves with it. Something to set up is a warning;
|
|
31167
|
+
* a block hidden by the editor's own choice gets a quiet note.
|
|
31251
31168
|
*/
|
|
31252
|
-
function BlockReadinessNote({
|
|
31253
|
-
if (!
|
|
31254
|
-
|
|
31255
|
-
|
|
31256
|
-
|
|
31257
|
-
|
|
31258
|
-
className: "absolute left-4 top-4 z-20
|
|
31259
|
-
children:
|
|
31260
|
-
|
|
31261
|
-
|
|
31262
|
-
|
|
31263
|
-
|
|
31264
|
-
|
|
31265
|
-
|
|
31266
|
-
|
|
31267
|
-
|
|
31268
|
-
|
|
31269
|
-
|
|
31270
|
-
|
|
31271
|
-
|
|
31272
|
-
|
|
31273
|
-
|
|
31274
|
-
|
|
31275
|
-
|
|
31276
|
-
|
|
31277
|
-
|
|
31278
|
-
|
|
31279
|
-
|
|
31280
|
-
|
|
31281
|
-
|
|
31282
|
-
|
|
31283
|
-
|
|
31284
|
-
|
|
31285
|
-
|
|
31286
|
-
|
|
31287
|
-
|
|
31288
|
-
|
|
31169
|
+
function BlockReadinessNote({ notice, element, blockName, onOpen }) {
|
|
31170
|
+
if (!notice || !element) return null;
|
|
31171
|
+
const warning = notice.kind === "NeedsSetup";
|
|
31172
|
+
const Icon = warning ? TriangleAlert : EyeOff;
|
|
31173
|
+
const label = blockNoticeLabel(notice);
|
|
31174
|
+
return createPortal(/* @__PURE__ */ jsx("div", {
|
|
31175
|
+
className: "builder-dashboard-chrome-theme absolute left-4 top-4 z-20 max-w-[22rem] overflow-hidden rounded-md bg-background text-left font-sans shadow-md",
|
|
31176
|
+
children: /* @__PURE__ */ jsxs(Callout, {
|
|
31177
|
+
tone: warning ? "warning" : "default",
|
|
31178
|
+
role: "note",
|
|
31179
|
+
"aria-label": `${blockName}: ${label}`,
|
|
31180
|
+
"data-preview-readiness-note": "",
|
|
31181
|
+
className: "flex gap-2.5 p-3 leading-snug",
|
|
31182
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
31183
|
+
className: warning ? "mt-0.5 size-4 shrink-0 text-warning" : "mt-0.5 size-4 shrink-0 text-muted-foreground",
|
|
31184
|
+
"aria-hidden": "true"
|
|
31185
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
31186
|
+
className: "min-w-0 space-y-1.5 text-sm",
|
|
31187
|
+
children: [
|
|
31188
|
+
/* @__PURE__ */ jsxs("p", {
|
|
31189
|
+
className: "font-semibold",
|
|
31190
|
+
children: [
|
|
31191
|
+
blockName,
|
|
31192
|
+
" ",
|
|
31193
|
+
/* @__PURE__ */ jsxs("span", {
|
|
31194
|
+
className: "font-normal text-muted-foreground",
|
|
31195
|
+
children: ["· ", label]
|
|
31196
|
+
})
|
|
31197
|
+
]
|
|
31198
|
+
}),
|
|
31199
|
+
/* @__PURE__ */ jsx("p", { children: blockNoticeMessage(notice) }),
|
|
31200
|
+
/* @__PURE__ */ jsx("p", {
|
|
31201
|
+
className: "text-xs text-muted-foreground",
|
|
31202
|
+
children: "You're seeing this because you're editing."
|
|
31203
|
+
}),
|
|
31204
|
+
/* @__PURE__ */ jsx(Button, {
|
|
31205
|
+
type: "button",
|
|
31206
|
+
size: "sm",
|
|
31207
|
+
variant: warning ? "default" : "outline",
|
|
31208
|
+
onClick: onOpen,
|
|
31209
|
+
children: blockNoticeAction(notice)
|
|
31210
|
+
})
|
|
31211
|
+
]
|
|
31212
|
+
})]
|
|
31213
|
+
})
|
|
31289
31214
|
}), element);
|
|
31290
31215
|
}
|
|
31291
31216
|
//#endregion
|
|
@@ -31362,7 +31287,7 @@ function revealWhenShown(marker) {
|
|
|
31362
31287
|
//#region ../preview-next/src/client/blocks/BlockToolbar.tsx
|
|
31363
31288
|
function BlockToolbar(input) {
|
|
31364
31289
|
const { selection, controls, toolbar, open, openField, cycleSdk, cycleRecipe } = useBlockToolbar(input);
|
|
31365
|
-
const
|
|
31290
|
+
const notice = useBlockNotice(input.blockId);
|
|
31366
31291
|
const name = controls.manifest?.title ?? getBlockDefinition(input.blockKind)?.manifest.title ?? input.blockKind;
|
|
31367
31292
|
const row = /* @__PURE__ */ jsxs(EditorCanvasChipRow, {
|
|
31368
31293
|
label: `${name} controls`,
|
|
@@ -31394,10 +31319,10 @@ function BlockToolbar(input) {
|
|
|
31394
31319
|
element: selection.blockElement
|
|
31395
31320
|
}),
|
|
31396
31321
|
/* @__PURE__ */ jsx(BlockReadinessNote, {
|
|
31397
|
-
|
|
31322
|
+
notice,
|
|
31398
31323
|
element: selection.blockElement,
|
|
31399
31324
|
blockName: name,
|
|
31400
|
-
|
|
31325
|
+
onOpen: () => notice?.repair.kind === "field" ? openField(notice.repair.path) : open()
|
|
31401
31326
|
}),
|
|
31402
31327
|
/* @__PURE__ */ jsx(InsertionMarker, {
|
|
31403
31328
|
blockId: input.blockId,
|
|
@@ -31577,4 +31502,4 @@ function PageSectionToolbar({ blockId, content }) {
|
|
|
31577
31502
|
] });
|
|
31578
31503
|
}
|
|
31579
31504
|
//#endregion
|
|
31580
|
-
export { ScrollableDialogContent as A, EMPTY_DOC as C, resolveSdkFooterMode as D, decideDocumentReplacement as E,
|
|
31505
|
+
export { ScrollableDialogContent as A, EMPTY_DOC as C, resolveSdkFooterMode as D, decideDocumentReplacement as E, resolveVideoSelectionIntentForMediaField as F, isSvgMimeType as I, Surface as M, surfaceVariants as N, EditorCanvasChip as O, emitMediaCropDebug as P, useRichTextEditor as S, InlineTextEditor as T, MediaPickerMiniDialog as _, ArrangementOptionsBody as a, getRichTextImagePositionFromTarget as b, BackgroundChooser as c, gradientLabel as d, readBackgroundColorPaletteSnapshot as f, MediaEditor as g, getUnresolvedRichTextImageWarnings as h, ArrangementLookNote as i, ScrollableDialogShell as j, Switch as k, BackgroundPreviewSwatch as l, useRichTextImageProjection as m, pageSectionIdFromBlockId as n, lookIsAutomatic as o, useSiteColourVariables as p, BlockToolbar as r, useArrangementToolbar as s, PageSectionToolbar as t, formatTokenLabel as u, MediaPickerMini as v, parseRichTextDoc as w, insertOrReplaceRichTextImage as x, RichTextEditorSurface as y };
|