@riverbankcms/sdk 0.162.0 → 0.163.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/CHANGELOG.md +9 -0
- package/dist/_dts/{BlocksIslandsHydrator-PZUoA872.d.ts → BlocksIslandsHydrator-DYPGA_qh.d.ts} +1 -1
- package/dist/_dts/{Page-CdQS6C7i.d.ts → Page-zwnvFBPu.d.ts} +8 -8
- package/dist/_dts/{SdkPreviewMode-CNGO-5f1.d.ts → SdkPreviewMode-DukuJzGr.d.ts} +3 -3
- package/dist/_dts/{client-DGa53rjL.d.ts → client-Chh3bnXC.d.ts} +1 -1
- package/dist/_dts/{content-types-K9R7P-KF.d.ts → content-types-Bbzqw9J2.d.ts} +2 -2
- package/dist/_dts/{contracts-CyBaPaIq.d.ts → contracts-GJ1kGBsi.d.ts} +4 -4
- package/dist/_dts/{footerPageOutline-B6jmKmon.d.ts → footerPageOutline-BNMKhyvo.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-iemoR3AN.d.ts → generatePageMetadata-Ce0m1P3B.d.ts} +2 -2
- package/dist/_dts/{index-Wm62sXf2.d.ts → index-C3mJvn27.d.ts} +4 -4
- package/dist/_dts/{index-DI2yaSPY.d.ts → index-CaL0nKkl.d.ts} +81 -26
- package/dist/_dts/{index-DEu85xBt.d.ts → index-CdSNXLOx.d.ts} +1 -1
- package/dist/_dts/{index-Dbd0Sn0G.d.ts → index-CyQhZuhM.d.ts} +49 -3
- package/dist/_dts/{index-C39F9KaB.d.ts → index-D2y4Iy-d.d.ts} +1 -1
- package/dist/_dts/{index-BtnsA14K.d.ts → index-DRxgeK8L.d.ts} +4 -3
- package/dist/_dts/{index-Du1IRglc.d.ts → index-FstkyqQB.d.ts} +2 -2
- package/dist/_dts/{index-Jlcq6w69.d.ts → index-G2p-HOrK.d.ts} +3 -3
- package/dist/_dts/{index-8CN0Nd-Z.d.ts → index-rhMSu0oY.d.ts} +2 -2
- package/dist/_dts/{loadContent-BPfAAZDW.d.ts → loadContent-DiLZoInK.d.ts} +7 -7
- package/dist/_dts/{resolvePageContent-DWbrtKf8.d.ts → resolvePageContent-CWUnipv8.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 +6 -6
- 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/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/index.d.ts +13 -7
- 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/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{types-CfNG5koF.d.ts → types-BmtrA45p.d.ts} +2 -2
- package/dist/_dts/{types-CVv2H4AT.d.ts → types-CalL7aKP.d.ts} +7 -7
- package/dist/_dts/{types-ClZ-BQL_.d.ts → types-DFOqkClJ.d.ts} +3 -3
- package/dist/_dts/{validation-BJ6Lf_Dr.d.ts → validation-G8MRoIhq.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-COqlgWYU.mjs → BlocksIslandsHydrator-DLCXwe30.mjs} +20 -20
- package/dist/client/{BookingMailingListNote-CFYPDEHH.mjs → BookingMailingListNote-BV5-50F0.mjs} +1 -1
- package/dist/client/{CalendarNavigationChevron-COBVxgHb.mjs → CalendarNavigationChevron-CVLAHdZG.mjs} +6 -6
- package/dist/client/{CheckboxChoice-C7X9dJ8A.mjs → CheckboxChoice-Dtgp3OU8.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-CvT0E9AR.mjs → DemoBookingPortalAccess-B3caCnTT.mjs} +5 -5
- package/dist/client/{DemoPortalSignInLink-EBOBN5dT.mjs → DemoPortalSignInLink-Ct8JMKW0.mjs} +1 -1
- package/dist/client/{EventCalendar.client-U6pKcntV.mjs → EventCalendar.client-ffa6920T.mjs} +9 -9
- package/dist/client/{EventCombined.client-CNzwEHws.mjs → EventCombined.client-zm0W2G79.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-B9yAWV_k.mjs → EventEmbeddedCheckoutStep-CPPE2rWS.mjs} +1 -1
- package/dist/client/{EventItem-M5rpaHxi.mjs → EventItem-CND3mfra.mjs} +91 -15
- package/dist/client/{EventListWeekNavigation-D4ieBLDY.mjs → EventListWeekNavigation-D8QdxL_f.mjs} +1 -1
- package/dist/client/{EventListing.client-B8F40Rmn.mjs → EventListing.client-CaoRZUI9.mjs} +3 -3
- package/dist/client/{EventListing.view-k4lhuCn5.mjs → EventListing.view-BfnOmxYD.mjs} +7 -56
- package/dist/client/{EventRegistrationPayment-C3g8_Hqb.mjs → EventRegistrationPayment-Dfu3RSL2.mjs} +10 -10
- package/dist/client/{LocationMapActions-CAjt7qVo.mjs → LocationMapActions-wlyxASdT.mjs} +2 -2
- package/dist/client/{MapDrawingSvg-_aIK2ojv.mjs → MapDrawingSvg-B9oKSitp.mjs} +1 -1
- package/dist/client/{Page-DJBIQBOw.mjs → Page-BEF9HrAy.mjs} +584 -251
- package/dist/client/{StepIndicator-CFacB1z6.mjs → StepIndicator-Bjx4faaw.mjs} +2 -2
- package/dist/client/{TabBarFragment-BLsfQskO.mjs → TabBarFragment-Cu7k_VSl.mjs} +1 -1
- package/dist/client/{ThemedButton-BWsDgjMC.mjs → ThemedButton-DclwabI7.mjs} +1 -1
- package/dist/client/{accordion-CtO2XF7M.mjs → accordion-lzM2nSZB.mjs} +1 -1
- package/dist/client/{booking-form.client-RICCQ0h2.mjs → booking-form.client-Bll4QwBi.mjs} +12 -12
- package/dist/client/{bookingForm-SvjLPx8i.mjs → bookingForm-Cq5fQ-vo.mjs} +4 -4
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{carousel-BR-zCD3O.mjs → carousel-CxerQwIx.mjs} +2 -2
- package/dist/client/{carousel.client-CEWtoZd3.mjs → carousel.client-CVUXq8Mb.mjs} +1 -1
- package/dist/client/{cart-C6YpKbZZ.mjs → cart-X-m0isoI.mjs} +3 -3
- package/dist/client/{cart.client-dC938WrX.mjs → cart.client-CJbzWIl0.mjs} +1 -1
- package/dist/client/{checkout-Dy9RlREI.mjs → checkout-Gd0O_fGH.mjs} +3 -3
- package/dist/client/{checkout.client-CefG0d2F.mjs → checkout.client-Baee6Jsm.mjs} +1 -1
- package/dist/client/client.mjs +2 -2
- package/dist/client/{context-BFwxgZpB.mjs → context-Bg0SFWcM.mjs} +1 -1
- package/dist/client/{cta-DtA42Xio.mjs → cta-HffyM4MA.mjs} +1 -1
- package/dist/client/{dateFormatting-yP1B7F0O.mjs → dateFormatting-CV45BH5M.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-WOiT5Ryi.mjs → demoPortalMagicLink-CDWheSjI.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-Dh8c_Lq-.mjs → enhanceHeaderSection-BqVDXL0D.mjs} +3 -3
- package/dist/client/{event-details.client-BFgsLqTj.mjs → event-details.client-SFtS9OkF.mjs} +1 -1
- package/dist/client/{event-registration.client-BaXZ1-Ky.mjs → event-registration.client-CguNVIFY.mjs} +13 -13
- package/dist/client/{eventCalendar-COLwF80U.mjs → eventCalendar-DSGG35jd.mjs} +4 -4
- package/dist/client/{eventCombined-D3Ltwu03.mjs → eventCombined-Oe-PiChx.mjs} +4 -4
- package/dist/client/{eventDetails-CBrkimXu.mjs → eventDetails-BhcTT6P3.mjs} +2 -2
- package/dist/client/{eventListing-CedKVA1S.mjs → eventListing-BS0kBEgI.mjs} +4 -4
- package/dist/client/{eventRegistration-DkQQfR1b.mjs → eventRegistration-B82SHv7j.mjs} +4 -4
- package/dist/client/{form-XFy9uXSJ.mjs → form-DAIUrVXb.mjs} +3 -3
- package/dist/client/{form.client-B0iancFK.mjs → form.client-BoAkhoh_.mjs} +4 -4
- package/dist/client/{form.parts-DMbolu9Y.mjs → form.parts-1VnasOK8.mjs} +3 -3
- package/dist/client/{formatDate-Jm5MQOCA.mjs → formatDate-BKil_Psb.mjs} +1 -1
- package/dist/client/gifting/client.mjs +3 -3
- package/dist/client/{headerSection-WjlECjtV.mjs → headerSection-CyuHk8Ei.mjs} +2 -2
- package/dist/client/mediaAssets-CGJE1Omu.mjs +43 -0
- package/dist/client/{mediaContext-CNzWmoA4.mjs → mediaContext-DIkX2S-X.mjs} +1 -1
- package/dist/client/{newsletter-form.client-D-XwJTjN.mjs → newsletter-form.client-CCdyHx0B.mjs} +5 -5
- package/dist/client/{newsletter-form.parts-H92f30y0.mjs → newsletter-form.parts-Dl8AjsXW.mjs} +2 -2
- package/dist/client/{newsletterForm-DMuxzu6I.mjs → newsletterForm-qFWLZJui.mjs} +3 -3
- package/dist/client/{noop-B3RNPVrt.mjs → noop-4XFGzJpT.mjs} +3 -3
- package/dist/client/portal/client.mjs +12 -12
- package/dist/client/{product-detail.client-B3HuuykE.mjs → product-detail.client-Tq4S99ce.mjs} +1 -1
- package/dist/client/{product-list.client-CzsDrHQO.mjs → product-list.client-CuL5jB1w.mjs} +1 -1
- package/dist/client/{productDetail-CbBUVWgd.mjs → productDetail-BRqgcotZ.mjs} +3 -3
- package/dist/client/{productList-vqOKH2mh.mjs → productList-EK9Um-oh.mjs} +3 -3
- package/dist/client/{propsDecoder-CkSUep5a.mjs → propsDecoder-VD4arFq1.mjs} +3 -3
- package/dist/client/{registry.server-cZ24QwtW.mjs → registry.server-qYbsatxH.mjs} +19 -19
- package/dist/client/rendering/client.mjs +26 -27
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +19 -19
- package/dist/client/{richText-coerce-DDcCKvBJ.mjs → richText-coerce-CW8CFk8v.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-DYBioANh.mjs → routeIslandApiConfig-CnZ_1ol2.mjs} +1 -1
- package/dist/client/{schema-DNHLlze-.mjs → schema-BFwQDvJL.mjs} +846 -497
- package/dist/client/{shop-CF0dhnfH.mjs → shop-CTUaT57E.mjs} +3 -3
- package/dist/client/{shop-commerce-DQznNBEo.mjs → shop-commerce-BWwbsm_-.mjs} +11 -11
- package/dist/client/{shop-commerce-store-Ba8zPlIg.mjs → shop-commerce-store-15UII0y3.mjs} +1 -1
- package/dist/client/{shop.client-DqfYoqWH.mjs → shop.client-UWgdmJBm.mjs} +12 -12
- package/dist/client/{shop.interactive-CreQ0I7i.mjs → shop.interactive-Cf_kASpd.mjs} +44 -26
- package/dist/client/{shopShared-D-yh-P7g.mjs → shopShared-Bi8d584P.mjs} +2 -2
- package/dist/client/{site-styles-B9HgmY07.mjs → site-styles-dy54AUdz.mjs} +747 -32
- package/dist/client/{timetableModel-DCdVErTJ.mjs → timetableModel-Bi8ruFgB.mjs} +10 -10
- package/dist/client/{useAvailableSlots-Cvgdp2DH.mjs → useAvailableSlots-DiLbDqM3.mjs} +3 -3
- package/dist/client/{useBookingNowIso-DrTnGNzD.mjs → useBookingNowIso-CWIiqPd0.mjs} +1 -1
- package/dist/client/{useDiscountApply-CULjnXGl.mjs → useDiscountApply-ChtszhF9.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-Gn_m7e0o.mjs → useDiscountCodeUi-B0Z7n2tZ.mjs} +1 -1
- package/dist/client/{useEventPagination-CsysCF22.mjs → useEventPagination-DRrATQHQ.mjs} +6 -6
- package/dist/client/{view-BpBjo9Te.mjs → view-OvsxzgxP.mjs} +7 -7
- package/dist/client/{view-DMyTchi7.mjs → view-yUIfWX3S.mjs} +4 -4
- package/dist/client/{wizardSteps-BO2OmMO9.mjs → wizardSteps-kbONzKUv.mjs} +5 -5
- package/dist/preview-next/before-render.mjs +1 -1
- package/dist/preview-next/chrome.css +1 -1
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-DLsSmZbO.mjs → EventEmbeddedCheckoutStep-DzoFjIqB.mjs} +1 -1
- package/dist/preview-next/client/{PreviewEditorSidebar-ChrW9VEo.mjs → PreviewEditorSidebar-BhgPyyUW.mjs} +10 -8
- package/dist/preview-next/client/{PreviewEditorUI-VaHvYtrA.mjs → PreviewEditorUI-lndKKBtB.mjs} +151 -126
- package/dist/preview-next/client/{SdkPreviewModeRuntime-DWwktlWs.mjs → SdkPreviewModeRuntime-Bk7On_EM.mjs} +139 -1264
- package/dist/preview-next/client/{SdkPreviewModeRuntime-Bz7jR6nl.mjs → SdkPreviewModeRuntime-DCDDXDlt.mjs} +1 -1
- package/dist/preview-next/client/{ThemedButton-CHKOWXxl.mjs → ThemedButton-nUnE3iMv.mjs} +403 -66
- package/dist/preview-next/client/{previewAuthStore-C0VUwEHz.mjs → previewAuthStore-DHtSQIBE.mjs} +12933 -11769
- package/dist/preview-next/client/{previewChromeSurface-Dhyx2YrS.mjs → previewChromeSurface-CxQ6dZ8D.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-C2GWOCyj.mjs → sdk-runtime-DSZv7Vfm.mjs} +1 -1
- package/dist/preview-next/client/{siteStyleAccess-DHyzUpv4.mjs → siteStyleAccess-Chq5KKKh.mjs} +3782 -2453
- package/dist/preview-next/client/{spinner-BeR2S8oG.mjs → spinner-CjxE3uws.mjs} +1 -1
- package/dist/preview-next/edit-map.css +37 -0
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/maplibre-gl.css +1 -0
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-CkrFDMrl.mjs → route-contract-CxCstfkP.mjs} +9 -0
- package/dist/preview-next/upload-structure.css +18 -0
- package/dist/server/{Block.shared-DxvNGDig.mjs → Block.shared-Dz9k8vCX.mjs} +16 -16
- package/dist/server/{bindings-BuhKvYkE.mjs → bindings-S-gCHhj5.mjs} +2 -2
- package/dist/server/{client-BobW6DOz.mjs → client-C2Q56xqV.mjs} +2 -2
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{effectiveNavLinkStyle-B-MKSt0p.mjs → effectiveNavLinkStyle-DLzJPcDL.mjs} +713 -12
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-CCG_3mbY.mjs → loadContent-D7ItMsEl.mjs} +4 -4
- package/dist/server/loadPage-D2qvYV5g.mjs +2 -0
- package/dist/server/{loadPage-jntGoMrf.mjs → loadPage-DaPiPYUL.mjs} +2 -2
- package/dist/server/next.mjs +9 -9
- package/dist/server/{overrideResolution-BBOlgn4Z.mjs → overrideResolution-anoB3Kbn.mjs} +1 -1
- package/dist/server/{overrides-DByQwIyW.mjs → overrides-W1Cc6srh.mjs} +177 -80
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{prebuild-DrwcTk2t.mjs → prebuild-BF9yNfCS.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-LfgxSJYE.mjs → prefetchBlockData-Cn9k3DW6.mjs} +10 -6
- package/dist/server/{publicProducts-8A3T5v4M.mjs → publicProducts-BVcJ6TG7.mjs} +11 -2
- package/dist/server/{registry-Digv02oV.mjs → registry-4ZF3bUuJ.mjs} +97 -42
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +8 -8
- package/dist/server/{resolveBlockData-C23t8-77.mjs → resolveBlockData-BKQ1Fc0M.mjs} +1 -1
- package/dist/server/routing.mjs +1 -1
- package/dist/server/{schema-BiqpDRwB.mjs → schema-DgrigZq9.mjs} +4118 -3769
- package/dist/server/server.mjs +3 -3
- package/dist/server/{site-styles-DrkprQPL.mjs → site-styles-CxE9F3hj.mjs} +36 -22
- package/dist/server/{siteChromeOverlayClearance-BmKKkkbh.mjs → siteChromeOverlayClearance-OhS6f830.mjs} +161 -105
- package/dist/server/{src-08GY1njw.mjs → src-C44_fMy5.mjs} +291 -106
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/theme.mjs +1 -1
- package/dist/server/{themeAdmission-CSd_Vusz.mjs → themeAdmission-CVc04B9m.mjs} +2 -2
- package/dist/server/{validation-DdUTkBOZ.mjs → validation-BrbY0nxR.mjs} +2 -2
- package/dist/server/{version-DdIOqIDe.mjs → version-BBSk8uM6.mjs} +1 -1
- package/dist/styles/index.css +162 -72
- package/package.json +1 -1
- package/dist/client/mediaAssets-BkoW_PEn.mjs +0 -16
- package/dist/server/loadPage-Bk9HDh9K.mjs +0 -2
package/dist/server/server.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as loadPage } from "./loadPage-
|
|
2
|
-
import { i as loadContent, n as isPageContent, r as isPageSurfaceContent, t as isEntryContent } from "./loadContent-
|
|
3
|
-
import { t as createRiverbankClient } from "./client-
|
|
1
|
+
import { t as loadPage } from "./loadPage-DaPiPYUL.mjs";
|
|
2
|
+
import { i as loadContent, n as isPageContent, r as isPageSurfaceContent, t as isEntryContent } from "./loadContent-D7ItMsEl.mjs";
|
|
3
|
+
import { t as createRiverbankClient } from "./client-C2Q56xqV.mjs";
|
|
4
4
|
export { createRiverbankClient, isEntryContent, isPageContent, isPageSurfaceContent, loadContent, loadPage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { F as
|
|
1
|
+
import { $ as logoSizePolicyValues, Ft as asBlockOrderIndex, Gn as surfaceToneFromForegroundToken, K as cardRoleSchema, Kn as resolveSurfaceForeground, Lt as asDesignBlockId, Mn as gradientScrimSamples, Mr as themeColorShadeSteps, Nn as scrimTone, Pt as asBlockContentVersionId, Q as brandDisplayModeValues, Ut as asSiteStyleId, Vt as asLayoutVariantKey, Wt as assertNever, X as headerInteractionPaletteValues, _t as runtimeBoxBackgroundSchema, an as plainFrame, jr as parseThemeColorToken, n as headerPositioningValues, pn as parseEditorSessionGeneration, tr as resolveConcreteColorHex, zt as asDesignPageId } from "./schema-DgrigZq9.mjs";
|
|
2
|
+
import { F as pageDesignDecisionsV2Schema, N as bookingPageLookIdValues, O as generatedDesignOptionCatalog, P as parseBookingPageLookId, R as boundaryRuntimeMetricsForDecorativeTransition, S as offeredSiteStyles, c as headerNavTypographyPreferenceValues, o as defaultHeaderNavPreferences, s as headerNavFontSizePreferenceValues, x as curatedSiteStyleIdValues } from "./effectiveNavLinkStyle-DLzJPcDL.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region ../theme-core/src/site-styles/blockFlow.ts
|
|
5
5
|
function defineBlockDesignMetadata(input) {
|
|
@@ -67,12 +67,30 @@ function parseCanonicalRuntimeBackground(content) {
|
|
|
67
67
|
if (!background) return { kind: "none" };
|
|
68
68
|
const parsed = runtimeBoxBackgroundSchema.safeParse(background);
|
|
69
69
|
if (!parsed.success) return { kind: "none" };
|
|
70
|
-
|
|
70
|
+
const painted = applyLookPhotoTreatment(content, parsed.data);
|
|
71
|
+
return painted.contentOwner === "page-design-editor" ? {
|
|
71
72
|
kind: "page-design-override",
|
|
72
|
-
background:
|
|
73
|
+
background: painted
|
|
73
74
|
} : {
|
|
74
75
|
kind: "block-authored",
|
|
75
|
-
background:
|
|
76
|
+
background: painted
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/** The Look owns shading and ink together; authored image/crop stay intact. */
|
|
80
|
+
function applyLookPhotoTreatment(content, background) {
|
|
81
|
+
const structure = readRecord(readRecord(readRecord(content._effectiveLook)?.look)?.structure);
|
|
82
|
+
if (background.type !== "image" || structure?.photoTreatment !== "text-overlay") return background;
|
|
83
|
+
return {
|
|
84
|
+
...background,
|
|
85
|
+
overlay: {
|
|
86
|
+
type: "gradient",
|
|
87
|
+
opacity: 1,
|
|
88
|
+
gradient: "var(--rb-opening-photo-shade, linear-gradient(transparent, transparent)), linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.76) 25%, rgba(0,0,0,0.4) 46%, transparent 72%)"
|
|
89
|
+
},
|
|
90
|
+
textColor: "neutral-50",
|
|
91
|
+
headingColor: "neutral-50",
|
|
92
|
+
linkColor: "neutral-50",
|
|
93
|
+
supportingColor: "neutral-50"
|
|
76
94
|
};
|
|
77
95
|
}
|
|
78
96
|
function resolveSectionBackground(source, lookDefault, rhythm, arrangementHeroPhoto) {
|
|
@@ -118,7 +136,7 @@ function sectionForegroundBackground(resolved, palette) {
|
|
|
118
136
|
if (resolved.kind !== "content-media") return resolved.background;
|
|
119
137
|
const original = resolveSurfaceForeground(resolved.background, palette);
|
|
120
138
|
const measured = resolveSurfaceForeground(resolved.ground, palette);
|
|
121
|
-
if (original.kind
|
|
139
|
+
if (original.kind !== "known" || measured.kind !== "known") return resolved.background;
|
|
122
140
|
return [
|
|
123
141
|
"text",
|
|
124
142
|
"heading",
|
|
@@ -725,22 +743,6 @@ z.union([z.nullish(z.never()).transform(() => ({ kind: "automatic" })), pageDesi
|
|
|
725
743
|
const value = issue.input;
|
|
726
744
|
return typeof value === "object" && value !== null && "schemaVersion" in value && value.schemaVersion !== 2 ? "Unsupported page design decisions schemaVersion." : "Invalid page design decisions shape.";
|
|
727
745
|
} });
|
|
728
|
-
//#endregion
|
|
729
|
-
//#region ../theme-core/src/site-styles/bookingPageLookIds.ts
|
|
730
|
-
/** Deterministic fallback order; Fulcrum is the default. */
|
|
731
|
-
const bookingPageLookIdValues = [
|
|
732
|
-
"site-style:fulcrum",
|
|
733
|
-
"site-style:folio",
|
|
734
|
-
"site-style:measure",
|
|
735
|
-
"site-style:grounded-practice",
|
|
736
|
-
"site-style:lantern",
|
|
737
|
-
"site-style:poster"
|
|
738
|
-
];
|
|
739
|
-
/** Boundary admission for draft and suggestion inputs. */
|
|
740
|
-
function parseBookingPageLookId(value) {
|
|
741
|
-
const id = bookingPageLookIdValues.find((candidate) => candidate === value);
|
|
742
|
-
return id ? asSiteStyleId(id) : null;
|
|
743
|
-
}
|
|
744
746
|
bookingPageLookIdValues.map((value) => {
|
|
745
747
|
const id = parseBookingPageLookId(value);
|
|
746
748
|
if (!id) throw new Error(`Invalid booking look catalogue entry: ${value}`);
|
|
@@ -751,5 +753,17 @@ bookingPageLookIdValues.map((value) => {
|
|
|
751
753
|
id
|
|
752
754
|
};
|
|
753
755
|
});
|
|
756
|
+
[...[
|
|
757
|
+
165,
|
|
758
|
+
150,
|
|
759
|
+
135,
|
|
760
|
+
120,
|
|
761
|
+
105,
|
|
762
|
+
90,
|
|
763
|
+
75,
|
|
764
|
+
60,
|
|
765
|
+
45,
|
|
766
|
+
30
|
|
767
|
+
].flatMap((o) => [o, -o])];
|
|
754
768
|
//#endregion
|
|
755
769
|
export { heroPhotoPaintsGround as a, sectionForegroundBackground as c, deriveSectionGround as i, defineBlockDesignMetadata as l, composeBoundary as n, parseCanonicalRuntimeBackground as o, sectionFactsForContent as r, resolveSectionBackground as s, boundaryLayout as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Jn as surfaceInkPublication, Kn as resolveSurfaceForeground, Or as rgbColorValue, Sr as surfaceInkDeclarations, W as renderCssDeclarations, Wt as assertNever, Xn as expandPalette, _r as surfaceForegroundDeclarations, a as generateMobileOverlayBackdropFilterFix, br as surfaceForegroundValue, h as getComponentShadowVar, i as generateHeaderScrollTreatmentStyles, l as MQ_MD_DOWN, lr as TokenResolver, m as getComponentBorderWidthPx, o as getHeaderPaintTargets, s as renderHeaderPaintTargetRules, vr as surfaceForegroundInputFromResolved, yt as siteChromeBackgroundOverrideOwner } from "./schema-DgrigZq9.mjs";
|
|
2
|
+
import { I as headerNeedsPhotoShade, L as headerRootPaint, M as generateNavLinkCSS, j as buildTextContrastShadow, l as mergeHeaderNavTypographyPreference, t as effectiveHeaderNavLinkStyle, u as readHeaderNavFontSizePreference } from "./effectiveNavLinkStyle-DLzJPcDL.mjs";
|
|
3
3
|
//#region ../theme-core/src/responsive/mediaQuery.ts
|
|
4
4
|
/**
|
|
5
5
|
* Convert familiar viewport media queries to container queries when safe.
|
|
@@ -235,13 +235,14 @@ const FLOATING_BLUR = "blur(16px)";
|
|
|
235
235
|
* Similar to button system - generates theme-scoped CSS using [data-theme-scope] selector
|
|
236
236
|
*/
|
|
237
237
|
function generateHeaderCss(options) {
|
|
238
|
-
const { themeId, theme, responsiveMode = DEFAULT_THEME_RESPONSIVE_MODE } = options;
|
|
238
|
+
const { themeId, theme, responsiveMode = DEFAULT_THEME_RESPONSIVE_MODE, solvedInks = "withhold" } = options;
|
|
239
239
|
const tokens = new TokenResolver(theme);
|
|
240
240
|
const header = theme.header;
|
|
241
241
|
const cssChunks = [];
|
|
242
242
|
const headerContrastTreatment = resolveHeaderContrastTreatment(header);
|
|
243
243
|
const headerNavTextSize = resolveHeaderNavTextSize(header);
|
|
244
|
-
cssChunks.push(generateHeaderRootStyles(header, themeId, tokens));
|
|
244
|
+
cssChunks.push(generateHeaderRootStyles(header, themeId, tokens, headerPaintInks(header, theme, solvedInks)));
|
|
245
|
+
cssChunks.push(generateOpeningPhotoShade(header, themeId));
|
|
245
246
|
cssChunks.push(generateMobileOverlayBackdropFilterFix(themeId, header.variant));
|
|
246
247
|
cssChunks.push(generateHeaderLogoStyles({
|
|
247
248
|
logo: header.logo,
|
|
@@ -255,17 +256,23 @@ function generateHeaderCss(options) {
|
|
|
255
256
|
}));
|
|
256
257
|
cssChunks.push(generateLogoTextBehaviorStyles(header.logoText, themeId));
|
|
257
258
|
cssChunks.push(generateHeaderNavLinkStyles(header, themeId, tokens, theme, headerContrastTreatment, headerNavTextSize));
|
|
258
|
-
|
|
259
|
-
|
|
259
|
+
const menuHeader = contextualDropdownHeader(header);
|
|
260
|
+
const dropdown = resolveDropdownSurface(menuHeader, theme, tokens, solvedInks);
|
|
261
|
+
cssChunks.push(generateDropdownContainerStyles(menuHeader, themeId, tokens, dropdown));
|
|
262
|
+
cssChunks.push(generateDropdownLinkStyles(menuHeader, themeId, tokens, theme, dropdown));
|
|
260
263
|
cssChunks.push(generateDropdownCaretStyles(themeId));
|
|
261
264
|
cssChunks.push(generateDropdownTriggerOverrides(header, themeId));
|
|
262
|
-
cssChunks.push(generateMobilePanelStyles(
|
|
265
|
+
cssChunks.push(generateMobilePanelStyles(themeId, dropdown));
|
|
263
266
|
if (header.variant === "floating" && header.container) cssChunks.push(generateFloatingContainerStyles(header, themeId, tokens, responsiveMode));
|
|
264
|
-
cssChunks.push(generateNavContainerStyles(header, themeId, tokens));
|
|
267
|
+
cssChunks.push(generateNavContainerStyles(header, themeId, tokens, theme, solvedInks));
|
|
265
268
|
cssChunks.push(generateHeaderCtaTreatmentStyles(header, themeId, tokens));
|
|
266
269
|
cssChunks.push(generateCtaGapStyles(header, themeId));
|
|
267
270
|
return cssChunks.filter(Boolean).join("\n\n");
|
|
268
271
|
}
|
|
272
|
+
/** Scope shading to the actual opening under overlay chrome, including hidden-header pages. */
|
|
273
|
+
function generateOpeningPhotoShade(header, themeId) {
|
|
274
|
+
return `:where([data-theme-scope="${themeId}"]) [data-site-document-layout-mode="header-overlay"] :is([data-page-block-position="first"], [data-page-block-position="only"]) { --rb-opening-photo-shade: ${headerNeedsPhotoShade(header) ? "linear-gradient(to bottom, rgba(0,0,0,0.78) 0px, rgba(0,0,0,0.64) 110px, transparent 220px)" : "linear-gradient(transparent, transparent)"}; }`;
|
|
275
|
+
}
|
|
269
276
|
function resolveHeaderContrastTreatment(header) {
|
|
270
277
|
if (header.navLinkStyle?.contrastTreatment) return header.navLinkStyle.contrastTreatment;
|
|
271
278
|
return isClearSplitHeaderShape(header) ? "soft-glow" : null;
|
|
@@ -284,7 +291,7 @@ function isDetachedFloatingHeaderShape(header) {
|
|
|
284
291
|
/**
|
|
285
292
|
* Generate root header container styles
|
|
286
293
|
*/
|
|
287
|
-
function generateHeaderRootStyles(header, themeId, tokens) {
|
|
294
|
+
function generateHeaderRootStyles(header, themeId, tokens, inks) {
|
|
288
295
|
const selector = `:where([data-theme-scope="${themeId}"]) .header-root`;
|
|
289
296
|
const rules = [];
|
|
290
297
|
const isContainedNav = headerRootPaint(header) === "contained-nav";
|
|
@@ -296,7 +303,11 @@ function generateHeaderRootStyles(header, themeId, tokens) {
|
|
|
296
303
|
} : buildHeaderSurfaceRules(header, tokens);
|
|
297
304
|
const floatingSurfaceBorder = header.variant === "floating";
|
|
298
305
|
if (!floatingSurfaceBorder) rules.push(...surfaceRules.border);
|
|
299
|
-
const basePaintRules = floatingSurfaceBorder ? [
|
|
306
|
+
const basePaintRules = floatingSurfaceBorder ? [
|
|
307
|
+
...surfaceRules.base,
|
|
308
|
+
...surfaceRules.border,
|
|
309
|
+
...inks
|
|
310
|
+
] : [...surfaceRules.base, ...inks];
|
|
300
311
|
const scrolledPaintRules = floatingSurfaceBorder ? surfaceRules.border : [];
|
|
301
312
|
if (header.positioning === "sticky" || header.positioning === "fixed") {
|
|
302
313
|
const shadowVar = getComponentShadowVar(header.shadow?.elevation ?? "none");
|
|
@@ -342,14 +353,13 @@ function generateLogoTextBehaviorStyles(logoText, themeId) {
|
|
|
342
353
|
/**
|
|
343
354
|
* Generate dropdown menu container styles
|
|
344
355
|
*/
|
|
345
|
-
function generateDropdownContainerStyles(header, themeId, tokens,
|
|
356
|
+
function generateDropdownContainerStyles(header, themeId, tokens, surface) {
|
|
346
357
|
const selector = `:where([data-theme-scope="${themeId}"]) .nav-dropdown-menu`;
|
|
347
358
|
const rules = [];
|
|
348
359
|
const dropdownStyle = header.dropdownStyle;
|
|
349
360
|
rules.push(...NAV_DROPDOWN_CONTAINER_RAIL_CSS_RULES);
|
|
350
|
-
|
|
351
|
-
rules.push(
|
|
352
|
-
rules.push(...surface.declarations(tokens));
|
|
361
|
+
rules.push(`background-color: ${surface.backgroundColor};`);
|
|
362
|
+
rules.push(...surface.foregroundDeclarations);
|
|
353
363
|
const borderToken = dropdownStyle?.borderColor;
|
|
354
364
|
if (borderToken === null) rules.push(`border: none;`);
|
|
355
365
|
else rules.push(`border: 1px solid ${tokens.getColor(borderToken ?? "border")};`);
|
|
@@ -363,71 +373,61 @@ function generateDropdownContainerStyles(header, themeId, tokens, theme) {
|
|
|
363
373
|
lg: "0.75rem"
|
|
364
374
|
}[borderRadius]};`);
|
|
365
375
|
rules.push(`padding: 0.5rem 0;`);
|
|
366
|
-
return `\n${selector} {\n ${rules.join("\n ")}\n}\n
|
|
367
|
-
}
|
|
368
|
-
function
|
|
369
|
-
const
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
376
|
+
return `\n${selector} {\n ${rules.join("\n ")}\n}\n` + generateDropdownFrosting(selector, surface);
|
|
377
|
+
}
|
|
378
|
+
function dropdownLinkEffects(style, textToken, opacity) {
|
|
379
|
+
const background = style?.hoverBackground === void 0 ? textToken : style.hoverBackground;
|
|
380
|
+
return [...background === null ? [] : [{
|
|
381
|
+
effectId: "background-on-hover-alpha",
|
|
382
|
+
options: {
|
|
383
|
+
colorToken: background,
|
|
384
|
+
opacity
|
|
385
|
+
}
|
|
386
|
+
}], ...style?.hoverTextColor ? [{
|
|
387
|
+
effectId: "text-color-change",
|
|
388
|
+
options: { hoverColorToken: style.hoverTextColor }
|
|
389
|
+
}] : []];
|
|
390
|
+
}
|
|
391
|
+
function dropdownNavLinkStyle(header, textToken) {
|
|
392
|
+
const style = header.dropdownStyle;
|
|
393
|
+
return {
|
|
394
|
+
name: "Dropdown",
|
|
395
|
+
typography: "body",
|
|
396
|
+
fontWeight: style?.fontWeight ?? header.navWeight ?? "medium",
|
|
397
|
+
textTransform: style?.textTransform ?? "none",
|
|
398
|
+
italic: false,
|
|
399
|
+
colorToken: textToken,
|
|
400
|
+
padding: "compact",
|
|
401
|
+
borderRadius: "sm",
|
|
402
|
+
effects: {
|
|
403
|
+
hover: dropdownLinkEffects(style, textToken, 12),
|
|
404
|
+
active: dropdownLinkEffects(style, textToken, 18)
|
|
405
|
+
}
|
|
387
406
|
};
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
});
|
|
393
|
-
hoverEffects.active?.push({
|
|
394
|
-
effectId: "text-color-change",
|
|
395
|
-
options: { hoverColorToken: configuredDropdownStyle.hoverTextColor }
|
|
396
|
-
});
|
|
397
|
-
}
|
|
398
|
-
const baseCSS = generateNavLinkCSS({
|
|
399
|
-
themeId,
|
|
400
|
-
tokens,
|
|
401
|
-
theme,
|
|
402
|
-
style: {
|
|
403
|
-
name: "Dropdown",
|
|
404
|
-
typography: "body",
|
|
405
|
-
fontWeight: configuredDropdownStyle?.fontWeight ?? header.navWeight ?? "medium",
|
|
406
|
-
textTransform: configuredDropdownStyle?.textTransform ?? "none",
|
|
407
|
-
italic: false,
|
|
408
|
-
colorToken: textColorToken,
|
|
409
|
-
padding: "compact",
|
|
410
|
-
borderRadius: "sm",
|
|
411
|
-
effects: hoverEffects
|
|
412
|
-
},
|
|
413
|
-
className: "nav-dropdown-link"
|
|
414
|
-
});
|
|
415
|
-
const additionalRules = [];
|
|
416
|
-
const letterSpacing = configuredDropdownStyle?.letterSpacing ?? "normal";
|
|
417
|
-
if (letterSpacing !== "normal") additionalRules.push(`letter-spacing: ${{
|
|
407
|
+
}
|
|
408
|
+
function dropdownTypographyRules(style) {
|
|
409
|
+
const letterSpacing = style?.letterSpacing ?? "normal";
|
|
410
|
+
const spacing = {
|
|
418
411
|
normal: "0em",
|
|
419
412
|
wide: "0.05em",
|
|
420
413
|
wider: "0.1em"
|
|
421
|
-
}
|
|
422
|
-
const
|
|
423
|
-
additionalRules.push(`font-size: ${{
|
|
414
|
+
};
|
|
415
|
+
const sizes = {
|
|
424
416
|
xs: "0.75rem",
|
|
425
417
|
sm: "0.875rem",
|
|
426
418
|
base: "1rem",
|
|
427
419
|
lg: "1.125rem"
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
|
|
420
|
+
};
|
|
421
|
+
return [...letterSpacing === "normal" ? [] : [`letter-spacing: ${spacing[letterSpacing]};`], `font-size: ${sizes[style?.textSize ?? "sm"]};`];
|
|
422
|
+
}
|
|
423
|
+
function generateDropdownLinkStyles(header, themeId, tokens, theme, surface) {
|
|
424
|
+
return generateNavLinkCSS({
|
|
425
|
+
themeId,
|
|
426
|
+
tokens,
|
|
427
|
+
theme,
|
|
428
|
+
style: dropdownNavLinkStyle(header, surface.textToken),
|
|
429
|
+
className: "nav-dropdown-link"
|
|
430
|
+
}) + `\n${`:where([data-theme-scope="${themeId}"]) .nav-dropdown-link`} {\n ${dropdownTypographyRules(header.dropdownStyle).join("\n ")}\n}\n`;
|
|
431
431
|
}
|
|
432
432
|
function generateDropdownCaretStyles(themeId) {
|
|
433
433
|
return `
|
|
@@ -455,42 +455,76 @@ ${`:where([data-theme-scope="${themeId}"]) .nav-dropdown-trigger.header-nav-link
|
|
|
455
455
|
}
|
|
456
456
|
`.trim();
|
|
457
457
|
}
|
|
458
|
-
/**
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
458
|
+
/** Reuse the header's decided opening tone; unknown openings retain opaque paint. */
|
|
459
|
+
function contextualDropdownHeader(header) {
|
|
460
|
+
const style = header.dropdownStyle;
|
|
461
|
+
const treatment = style?.surfaceTreatment;
|
|
462
|
+
if (!style || treatment?.kind !== "frosted" || treatment.tone !== "opening") return header;
|
|
463
|
+
const opening = header.scrollTreatment;
|
|
464
|
+
if (!opening) return {
|
|
465
|
+
...header,
|
|
466
|
+
dropdownStyle: {
|
|
467
|
+
...style,
|
|
468
|
+
surfaceTreatment: { kind: "solid" }
|
|
469
|
+
}
|
|
470
|
+
};
|
|
471
|
+
const dark = opening.backgroundTone === "dark";
|
|
472
|
+
const textColor = dark ? "neutral-50" : "neutral-950";
|
|
473
|
+
return {
|
|
474
|
+
...header,
|
|
475
|
+
dropdownStyle: {
|
|
476
|
+
...style,
|
|
477
|
+
background: dark ? "neutral-950" : "neutral-50",
|
|
478
|
+
textColor,
|
|
479
|
+
hoverBackground: textColor,
|
|
480
|
+
borderColor: null
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
function dropdownTextCandidate(header) {
|
|
485
|
+
return header.dropdownStyle?.textColor ?? ((header.navColor ?? header.textColor)?.trim() || "text");
|
|
486
|
+
}
|
|
487
|
+
function resolveDropdownSurface(header, theme, tokens, solvedInks) {
|
|
466
488
|
const backgroundToken = header.dropdownStyle?.background ?? "surface";
|
|
467
|
-
const candidate =
|
|
489
|
+
const candidate = dropdownTextCandidate(header);
|
|
468
490
|
const foreground = resolveSurfaceForeground({
|
|
469
491
|
type: "color",
|
|
470
492
|
color: backgroundToken,
|
|
471
493
|
textColor: candidate
|
|
472
494
|
}, expandPalette(theme.palette));
|
|
473
495
|
return {
|
|
474
|
-
backgroundToken,
|
|
496
|
+
backgroundColor: tokens.getColor(backgroundToken),
|
|
475
497
|
textToken: foreground.kind === "known" ? foreground.roles.text : candidate,
|
|
476
|
-
|
|
498
|
+
foregroundDeclarations: [...foreground.kind === "known" ? surfaceForegroundDeclarations(surfaceForegroundInputFromResolved(foreground, (token) => tokens.getColor(token))) : [`color: ${tokens.getColor(candidate)};`], ...surfaceInkDeclarations(surfaceInkPublication(foreground, solvedInks))],
|
|
499
|
+
treatment: header.dropdownStyle?.surfaceTreatment
|
|
477
500
|
};
|
|
478
501
|
}
|
|
479
|
-
/**
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
502
|
+
/** Solid paint is the fallback. Blur is enhancement, never the readability mechanism. */
|
|
503
|
+
function generateDropdownFrosting(selector, surface) {
|
|
504
|
+
if (surface.treatment?.kind !== "frosted") return "";
|
|
505
|
+
const blur = surface.treatment.blur === "sm" ? "8px" : "12px";
|
|
506
|
+
return `
|
|
507
|
+
@supports (background-color: color-mix(in srgb, white, transparent)) and ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
|
508
|
+
${selector} {
|
|
509
|
+
background-color: color-mix(in srgb, ${surface.backgroundColor} ${surface.treatment.opacity * 100}%, transparent);
|
|
510
|
+
backdrop-filter: blur(${blur});
|
|
511
|
+
-webkit-backdrop-filter: blur(${blur});
|
|
512
|
+
${surface.treatment.opacity < 1 ? surfaceInkDeclarations({ kind: "reset" }).join("\n ") : ""}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
`;
|
|
516
|
+
}
|
|
517
|
+
/** Mobile shares the resolved opaque surface, never desktop translucency. */
|
|
518
|
+
function generateMobilePanelStyles(themeId, surface) {
|
|
484
519
|
const selector = `:where([data-theme-scope="${themeId}"]) .nav-mobile-panel`;
|
|
485
520
|
const selfSelector = `:where(.nav-mobile-panel[data-theme-scope="${themeId}"])`;
|
|
486
|
-
const
|
|
487
|
-
const body = renderCssDeclarations([`background-color: ${tokens.getColor(surface.backgroundToken)};`, ...surface.declarations(tokens)]);
|
|
521
|
+
const body = renderCssDeclarations([`background-color: ${surface.backgroundColor};`, ...surface.foregroundDeclarations]);
|
|
488
522
|
return `\n${selector} {\n ${body}\n}\n\n${selfSelector} {\n ${body}\n}\n`;
|
|
489
523
|
}
|
|
490
524
|
/**
|
|
491
525
|
* Generate nav container styles (pill/glass)
|
|
492
526
|
*/
|
|
493
|
-
function generateNavContainerStyles(header, themeId, tokens) {
|
|
527
|
+
function generateNavContainerStyles(header, themeId, tokens, theme, solvedInks) {
|
|
494
528
|
const navContainer = header.navContainer;
|
|
495
529
|
const navContainerType = navContainer?.type ?? "none";
|
|
496
530
|
if (!navContainer || navContainerType === "none") return "";
|
|
@@ -504,22 +538,30 @@ function generateNavContainerStyles(header, themeId, tokens) {
|
|
|
504
538
|
rules.push("gap: 1.5rem;");
|
|
505
539
|
if (isDetachedFloatingHeaderShape(header)) rules.push("align-self: flex-start;");
|
|
506
540
|
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
541
|
+
rules.push(...navContainerSurfaceRules(header, navContainer, tokens, theme, solvedInks));
|
|
542
|
+
return `${selector} { ${rules.join(" ")} }`;
|
|
543
|
+
}
|
|
544
|
+
/** Paint and publication are decided together, so translucent containers cannot borrow solid inks. */
|
|
545
|
+
function navContainerSurfaceRules(header, container, tokens, theme, policy) {
|
|
546
|
+
if (container.type === "glass") {
|
|
547
|
+
const opacity = resolveFloatingGlassOpacity(header, container.opacity, .15);
|
|
548
|
+
return [
|
|
549
|
+
`background-color: ${container.tint ? buildTint(tokens.getColor(container.tint), opacity) : buildRgbWhite(opacity)};`,
|
|
550
|
+
`backdrop-filter: ${HEADER_BLUR};`,
|
|
551
|
+
`-webkit-backdrop-filter: ${HEADER_BLUR};`,
|
|
552
|
+
"border: 1px solid rgba(255, 255, 255, 0.2);",
|
|
553
|
+
"box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);",
|
|
554
|
+
...surfaceInkDeclarations({ kind: "reset" })
|
|
555
|
+
];
|
|
520
556
|
}
|
|
521
|
-
|
|
522
|
-
|
|
557
|
+
const opacity = clampOpacity(container.opacity, .15);
|
|
558
|
+
const background = container.tint ? buildTint(tokens.getColor(container.tint), opacity) : tokens.getColor("surface");
|
|
559
|
+
const solid = container.tint ? opacity === 1 ? container.tint : null : "surface";
|
|
560
|
+
return [
|
|
561
|
+
`background-color: ${background};`,
|
|
562
|
+
`border: 1px solid ${tokens.getColor("border")};`,
|
|
563
|
+
...headerContainerInks(solid, theme, policy)
|
|
564
|
+
];
|
|
523
565
|
}
|
|
524
566
|
/**
|
|
525
567
|
* Generate floating container styles
|
|
@@ -534,6 +576,7 @@ function generateFloatingContainerStyles(header, themeId, tokens, responsiveMode
|
|
|
534
576
|
else rules.push(`background-color: ${buildRgbWhite(opacity)};`);
|
|
535
577
|
rules.push(`backdrop-filter: ${FLOATING_BLUR};`);
|
|
536
578
|
rules.push(`-webkit-backdrop-filter: ${FLOATING_BLUR};`);
|
|
579
|
+
rules.push(...surfaceInkDeclarations({ kind: "reset" }));
|
|
537
580
|
if (container.border) rules.push(`border: 1px solid rgb(255 255 255 / 0.2);`);
|
|
538
581
|
rules.push(`border-radius: ${{
|
|
539
582
|
none: "0",
|
|
@@ -649,6 +692,19 @@ function applyAlpha(color, opacity) {
|
|
|
649
692
|
}
|
|
650
693
|
return color;
|
|
651
694
|
}
|
|
695
|
+
/** Container glass is deliberately unmeasured; an opaque pill owns its solid paint. */
|
|
696
|
+
function headerContainerInks(color, theme, policy) {
|
|
697
|
+
if (color === null) return surfaceInkDeclarations({ kind: "reset" });
|
|
698
|
+
return surfaceInkDeclarations(surfaceInkPublication(resolveSurfaceForeground({
|
|
699
|
+
type: "color",
|
|
700
|
+
color
|
|
701
|
+
}, expandPalette(theme.palette)), policy));
|
|
702
|
+
}
|
|
703
|
+
/** Floating mobile bars paint the header background even when the root overlays the page. */
|
|
704
|
+
function headerPaintInks(header, theme, policy) {
|
|
705
|
+
if (headerRootPaint(header) === "contained-nav") return [];
|
|
706
|
+
return surfaceInkDeclarations(surfaceInkPublication(resolveSurfaceForeground(header.background, expandPalette(theme.palette)), policy));
|
|
707
|
+
}
|
|
652
708
|
//#endregion
|
|
653
709
|
//#region ../theme-core/src/siteChromePlacement.ts
|
|
654
710
|
const SITE_CHROME_PLACEMENT_CLASSES = [
|