@riverbankcms/sdk 0.162.0 → 0.164.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/README.md +12 -1
- package/dist/_dts/{BlocksIslandsHydrator-PZUoA872.d.ts → BlocksIslandsHydrator-CubPwupc.d.ts} +1 -1
- package/dist/_dts/{Page-CdQS6C7i.d.ts → Page-CDzsagB2.d.ts} +15 -12
- package/dist/_dts/{SdkPreviewMode-CNGO-5f1.d.ts → SdkPreviewMode-CPRQbRCI.d.ts} +2 -3
- package/dist/_dts/{client-DGa53rjL.d.ts → client-CbeYTSry.d.ts} +13 -41
- package/dist/_dts/{content-types-K9R7P-KF.d.ts → content-types--uYRIcIF.d.ts} +2 -2
- package/dist/_dts/{contracts-CyBaPaIq.d.ts → contracts-DJQYAOsv.d.ts} +5 -4
- package/dist/_dts/{footerPageOutline-B6jmKmon.d.ts → footerPageOutline-CKkhBwgJ.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-iemoR3AN.d.ts → generatePageMetadata--qd7NCIA.d.ts} +2 -2
- package/dist/_dts/{index-DEu85xBt.d.ts → index-BZE-1azr.d.ts} +1 -1
- package/dist/_dts/{index-Wm62sXf2.d.ts → index-BpEbwDM7.d.ts} +4 -4
- package/dist/_dts/index-CXsnaCGe.d.ts +10 -0
- package/dist/_dts/{index-8CN0Nd-Z.d.ts → index-CjdIn9-_.d.ts} +2 -2
- package/dist/_dts/{index-BtnsA14K.d.ts → index-DYQFmf--.d.ts} +4 -3
- package/dist/_dts/{index-Dbd0Sn0G.d.ts → index-D_pQO-AS.d.ts} +21723 -21361
- package/dist/_dts/{index-Du1IRglc.d.ts → index-DriYVLfT.d.ts} +2 -2
- package/dist/_dts/{index-DI2yaSPY.d.ts → index-JS8WYgD3.d.ts} +31248 -30975
- package/dist/_dts/{index-Jlcq6w69.d.ts → index-wegfy7lf.d.ts} +3 -3
- package/dist/_dts/{loadContent-BPfAAZDW.d.ts → loadContent-DUi94Qfk.d.ts} +15 -30
- package/dist/_dts/{resolvePageContent-DWbrtKf8.d.ts → resolvePageContent-JDE0ry6T.d.ts} +2 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +3 -4
- 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/spam-protection/index.d.ts +32 -52
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{types-ClZ-BQL_.d.ts → types-DiciZDrk.d.ts} +3 -3
- package/dist/_dts/{types-CVv2H4AT.d.ts → types-DubJnBnI.d.ts} +7 -7
- package/dist/_dts/{types-CfNG5koF.d.ts → types-W40f2olO.d.ts} +3 -2
- package/dist/_dts/{validation-BJ6Lf_Dr.d.ts → validation-BF4_zNkR.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-COqlgWYU.mjs → BlocksIslandsHydrator-64hFxF02.mjs} +20 -20
- package/dist/client/{BookingMailingListNote-CFYPDEHH.mjs → BookingMailingListNote-CSQyFm9J.mjs} +1 -1
- package/dist/client/{CalendarNavigationChevron-COBVxgHb.mjs → CalendarNavigationChevron-Bvkx8Z7Y.mjs} +6 -6
- package/dist/client/{CheckboxChoice-C7X9dJ8A.mjs → CheckboxChoice-3PhxDxgR.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-CvT0E9AR.mjs → DemoBookingPortalAccess-pt2xXBQp.mjs} +5 -5
- package/dist/client/{DemoPortalSignInLink-EBOBN5dT.mjs → DemoPortalSignInLink-Qw780EfW.mjs} +1 -1
- package/dist/client/{EventCalendar.client-U6pKcntV.mjs → EventCalendar.client-DWoboRW5.mjs} +9 -9
- package/dist/client/{EventCombined.client-CNzwEHws.mjs → EventCombined.client-C98ucpcP.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-B9yAWV_k.mjs → EventEmbeddedCheckoutStep-DHRlFfkp.mjs} +2 -1
- package/dist/client/{EventItem-M5rpaHxi.mjs → EventItem-hrSyTApW.mjs} +102 -22
- package/dist/client/{EventListWeekNavigation-D4ieBLDY.mjs → EventListWeekNavigation-C3t7H13W.mjs} +1 -1
- package/dist/client/{EventListing.client-B8F40Rmn.mjs → EventListing.client-Cp11sBX_.mjs} +3 -3
- package/dist/client/{EventListing.view-k4lhuCn5.mjs → EventListing.view-Dd5QHIAf.mjs} +7 -56
- package/dist/client/{EventRegistrationPayment-C3g8_Hqb.mjs → EventRegistrationPayment-ByT88VHR.mjs} +18 -22
- package/dist/client/{LocationMapActions-CAjt7qVo.mjs → LocationMapActions-BsepG5Vv.mjs} +2 -2
- package/dist/client/{MapDrawingSvg-_aIK2ojv.mjs → MapDrawingSvg-R4JMT4yd.mjs} +1 -1
- package/dist/client/{Page-DJBIQBOw.mjs → Page-Dub71o3c.mjs} +956 -378
- package/dist/client/ProtectedSubmitButton-DGbgGvdh.mjs +14 -0
- package/dist/client/SpamProtectionWidget-CRsKTQV-.mjs +139 -0
- package/dist/client/{StepIndicator-CFacB1z6.mjs → StepIndicator-Bp7MyutT.mjs} +2 -2
- package/dist/client/{TabBarFragment-BLsfQskO.mjs → TabBarFragment-C4WJyybx.mjs} +1 -1
- package/dist/client/{ThemedButton-BWsDgjMC.mjs → ThemedButton-BGVwNwE-.mjs} +2 -898
- package/dist/client/{accordion-CtO2XF7M.mjs → accordion-vCG_JC5t.mjs} +1 -1
- package/dist/client/altchaProtection-BWchRM3v.mjs +12 -0
- package/dist/client/{booking-form.client-RICCQ0h2.mjs → booking-form.client-CHTbcZJM.mjs} +23 -56
- package/dist/client/{bookingForm-SvjLPx8i.mjs → bookingForm-BxbUbzUr.mjs} +4 -4
- package/dist/client/bookings.mjs +23 -32
- package/dist/client/{carousel-BR-zCD3O.mjs → carousel-FM1mkkL0.mjs} +2 -2
- package/dist/client/{carousel.client-CEWtoZd3.mjs → carousel.client-ChoLiWwD.mjs} +1 -1
- package/dist/client/{cart-C6YpKbZZ.mjs → cart-BDFhbh9j.mjs} +3 -3
- package/dist/client/{cart.client-dC938WrX.mjs → cart.client-x3HOke6T.mjs} +1 -1
- package/dist/client/{checkout-Dy9RlREI.mjs → checkout-BibhwnTd.mjs} +3 -3
- package/dist/client/{checkout.client-CefG0d2F.mjs → checkout.client-CE4jUi0G.mjs} +1 -1
- package/dist/client/client.mjs +216 -109
- package/dist/client/{context-BFwxgZpB.mjs → context-BNAM7NsW.mjs} +17 -3
- package/dist/client/{cta-DtA42Xio.mjs → cta-ChiN1Vgg.mjs} +1 -1
- package/dist/client/{dateFormatting-yP1B7F0O.mjs → dateFormatting-QwBSo0hK.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-WOiT5Ryi.mjs → demoPortalMagicLink-NwKJk6gn.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-Dh8c_Lq-.mjs → enhanceHeaderSection-D4zqEBDl.mjs} +3 -3
- package/dist/client/{event-details.client-BFgsLqTj.mjs → event-details.client-jFyFjOIC.mjs} +1 -1
- package/dist/client/{event-registration.client-BaXZ1-Ky.mjs → event-registration.client-BK_jVv3R.mjs} +37 -55
- package/dist/client/{eventCalendar-COLwF80U.mjs → eventCalendar-DSkzejQh.mjs} +4 -4
- package/dist/client/{eventCombined-D3Ltwu03.mjs → eventCombined-BG-BEaYh.mjs} +4 -4
- package/dist/client/{eventDetails-CBrkimXu.mjs → eventDetails-BhIwXAKe.mjs} +2 -2
- package/dist/client/{eventListing-CedKVA1S.mjs → eventListing-DQtyO1Xj.mjs} +4 -4
- package/dist/client/{eventRegistration-DkQQfR1b.mjs → eventRegistration-DRTz8X0M.mjs} +4 -4
- package/dist/client/{form-XFy9uXSJ.mjs → form-GXqjObPC.mjs} +3 -3
- package/dist/client/{form.client-B0iancFK.mjs → form.client-CoKNba2e.mjs} +33 -24
- package/dist/client/{form.parts-DMbolu9Y.mjs → form.parts-magB_epJ.mjs} +6 -5
- package/dist/client/{formatDate-Jm5MQOCA.mjs → formatDate-BiloOyjS.mjs} +1 -1
- package/dist/client/gifting/client.mjs +4 -3
- package/dist/client/{headerSection-WjlECjtV.mjs → headerSection-BMQCPHT3.mjs} +2 -2
- package/dist/client/mediaAssets-BX-vWwQc.mjs +43 -0
- package/dist/client/{mediaContext-CNzWmoA4.mjs → mediaContext-CdqGYlWl.mjs} +1 -1
- package/dist/client/{newsletter-form.client-D-XwJTjN.mjs → newsletter-form.client-8orCez1z.mjs} +99 -84
- package/dist/client/{newsletter-form.parts-H92f30y0.mjs → newsletter-form.parts-D8NgHY_F.mjs} +11 -7
- package/dist/client/{newsletterForm-DMuxzu6I.mjs → newsletterForm-BhBNsS3n.mjs} +3 -3
- package/dist/client/{noop-B3RNPVrt.mjs → noop-C2vZse15.mjs} +3 -3
- package/dist/client/portal/client.mjs +13 -12
- package/dist/client/{product-detail.client-B3HuuykE.mjs → product-detail.client-CQ0k0fbH.mjs} +1 -1
- package/dist/client/{product-list.client-CzsDrHQO.mjs → product-list.client-Xlr1P0x9.mjs} +1 -1
- package/dist/client/{productDetail-CbBUVWgd.mjs → productDetail-BsCao6X4.mjs} +3 -3
- package/dist/client/{productList-vqOKH2mh.mjs → productList-Cc-PmbEe.mjs} +3 -3
- package/dist/client/{propsDecoder-CkSUep5a.mjs → propsDecoder-DikkDJ9x.mjs} +3 -3
- package/dist/client/protection-C0PoH1lT.mjs +104 -0
- package/dist/client/purchase-BMsWpx8y.mjs +894 -0
- package/dist/client/{registry.server-cZ24QwtW.mjs → registry.server-BpLZo3bC.mjs} +27 -24
- package/dist/client/rendering/client.mjs +27 -27
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +23 -19
- package/dist/client/{richText-coerce-DDcCKvBJ.mjs → richText-coerce-WuMYrBm3.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-DYBioANh.mjs → routeIslandApiConfig-DNx6b07x.mjs} +1 -1
- package/dist/client/{schema-DNHLlze-.mjs → schema-DMUkBtIO.mjs} +3517 -3147
- package/dist/client/{shop-CF0dhnfH.mjs → shop-DyXtB5TD.mjs} +3 -3
- package/dist/client/{shop-commerce-store-Ba8zPlIg.mjs → shop-commerce-store-CbBsS1kD.mjs} +1 -1
- package/dist/client/{shop-commerce-DQznNBEo.mjs → shop-commerce-xjWH7-Ym.mjs} +11 -11
- package/dist/client/{shop.client-DqfYoqWH.mjs → shop.client-QOKqQPgK.mjs} +12 -12
- package/dist/client/{shop.interactive-CreQ0I7i.mjs → shop.interactive-BQdm441g.mjs} +62 -34
- package/dist/client/{shopShared-D-yh-P7g.mjs → shopShared-CyW6MU48.mjs} +2 -2
- package/dist/client/{site-styles-B9HgmY07.mjs → site-styles-BLHYJ8S7.mjs} +755 -35
- package/dist/client/spam-protection.mjs +4 -69
- package/dist/client/{timetableModel-DCdVErTJ.mjs → timetableModel-BgdkhRuA.mjs} +10 -10
- package/dist/client/{useAvailableSlots-Cvgdp2DH.mjs → useAvailableSlots-wmdo6uZ8.mjs} +3 -3
- package/dist/client/{useBookingNowIso-DrTnGNzD.mjs → useBookingNowIso-CUExAee1.mjs} +1 -1
- package/dist/client/{useDiscountApply-CULjnXGl.mjs → useDiscountApply-BRM-OoTN.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-Gn_m7e0o.mjs → useDiscountCodeUi-BEIvL31G.mjs} +1 -1
- package/dist/client/{useEventPagination-CsysCF22.mjs → useEventPagination-Dk3g64we.mjs} +6 -6
- package/dist/client/{view-DMyTchi7.mjs → view-BnaOmrap.mjs} +4 -4
- package/dist/client/{view-BpBjo9Te.mjs → view-vhKGFfC3.mjs} +7 -7
- package/dist/client/{wizardSteps-BO2OmMO9.mjs → wizardSteps-xqU4q63H.mjs} +14 -14
- 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-43wIAWr4.mjs} +1 -1
- package/dist/preview-next/client/{PreviewEditorSidebar-ChrW9VEo.mjs → PreviewEditorSidebar-C3AQVxQt.mjs} +74 -72
- package/dist/preview-next/client/{PreviewEditorUI-VaHvYtrA.mjs → PreviewEditorUI-C-1zDCR_.mjs} +151 -126
- package/dist/preview-next/client/{SdkPreviewModeRuntime-DWwktlWs.mjs → SdkPreviewModeRuntime-B47yHFL0.mjs} +371 -1433
- package/dist/preview-next/client/{SdkPreviewModeRuntime-Bz7jR6nl.mjs → SdkPreviewModeRuntime-C6Rhm2NQ.mjs} +1 -1
- package/dist/preview-next/client/{ThemedButton-CHKOWXxl.mjs → ThemedButton-g7NPrsGp.mjs} +462 -110
- package/dist/preview-next/client/{previewAuthStore-C0VUwEHz.mjs → previewAuthStore-By_zfrS5.mjs} +164988 -163471
- package/dist/preview-next/client/{previewChromeSurface-Dhyx2YrS.mjs → previewChromeSurface-Cjwxv90x.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-C2GWOCyj.mjs → sdk-runtime-BG2HYvQj.mjs} +1 -1
- package/dist/preview-next/client/{siteStyleAccess-DHyzUpv4.mjs → siteStyleAccess-BiSyYyyr.mjs} +10854 -9509
- package/dist/preview-next/client/{spinner-BeR2S8oG.mjs → spinner-DnWpeDp2.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-D5tHZEz5.mjs} +40 -42
- package/dist/preview-next/upload-structure.css +18 -0
- package/dist/server/{Block.shared-DxvNGDig.mjs → Block.shared-Iy7g11iP.mjs} +17 -16
- package/dist/server/{bindings-BuhKvYkE.mjs → bindings-BVJGgUT0.mjs} +2 -2
- package/dist/server/{client-BobW6DOz.mjs → client-CiKaE8ms.mjs} +215 -109
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{effectiveNavLinkStyle-B-MKSt0p.mjs → effectiveNavLinkStyle-EDSdd_oK.mjs} +725 -18
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-CCG_3mbY.mjs → loadContent-BuintpdO.mjs} +6 -4
- package/dist/server/loadPage-BwjncpJf.mjs +2 -0
- package/dist/server/{loadPage-jntGoMrf.mjs → loadPage-Dk4wea8M.mjs} +3 -2
- package/dist/server/next.mjs +9 -9
- package/dist/server/{overrideResolution-BBOlgn4Z.mjs → overrideResolution-BDiQWM7D.mjs} +1 -1
- package/dist/server/{overrides-DByQwIyW.mjs → overrides-DVemf-GV.mjs} +231 -114
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{prebuild-DrwcTk2t.mjs → prebuild-DubLNgRH.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-LfgxSJYE.mjs → prefetchBlockData-Bnbwoe5n.mjs} +53 -28
- package/dist/server/{publicProducts-8A3T5v4M.mjs → publicProducts-D3Fc5TKk.mjs} +85 -70
- package/dist/server/{registry-Digv02oV.mjs → registry-zjd1P2Dl.mjs} +127 -59
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +8 -8
- package/dist/server/{resolveBlockData-C23t8-77.mjs → resolveBlockData-CZJ--nH6.mjs} +1 -1
- package/dist/server/routing.mjs +1 -1
- package/dist/server/{schema-BiqpDRwB.mjs → schema-BlTWmTSl.mjs} +4163 -3793
- package/dist/server/server.mjs +3 -3
- package/dist/server/{site-styles-DrkprQPL.mjs → site-styles-yHytcXIB.mjs} +33 -20
- package/dist/server/{siteChromeOverlayClearance-BmKKkkbh.mjs → siteChromeOverlayClearance-D0uCNZ7E.mjs} +159 -107
- package/dist/server/{src-08GY1njw.mjs → src-cbbK3Bho.mjs} +547 -147
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/theme.mjs +1 -1
- package/dist/server/{themeAdmission-CSd_Vusz.mjs → themeAdmission-BdY8lP-K.mjs} +3 -2
- package/dist/server/{validation-DdUTkBOZ.mjs → validation-CGH-Xs4E.mjs} +2 -2
- package/dist/server/{version-DdIOqIDe.mjs → version-DoOG6F13.mjs} +1 -1
- package/dist/styles/index.css +399 -112
- package/package.json +2 -3
- package/dist/_dts/AltchaWidget-COIYJ7DF.d.ts +0 -33
- package/dist/_dts/index-C39F9KaB.d.ts +0 -77
- package/dist/client/mediaAssets-BkoW_PEn.mjs +0 -16
- package/dist/client/src-BNZzXgWu.mjs +0 -102
- 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-Dk4wea8M.mjs";
|
|
2
|
+
import { i as loadContent, n as isPageContent, r as isPageSurfaceContent, t as isEntryContent } from "./loadContent-BuintpdO.mjs";
|
|
3
|
+
import { t as createRiverbankClient } from "./client-CiKaE8ms.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, Ht as asPageFlowPresetId, 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-BlTWmTSl.mjs";
|
|
2
|
+
import { B as noneBoundaryOption, C as offeredSiteStyles, F as parseBookingPageLookId, H as spaciousBoundaryOption, I as pageDesignDecisionsV2Schema, P as bookingPageLookIdValues, S as curatedSiteStyleIdValues, V as softBoundaryOption, c as headerNavFontSizePreferenceValues, k as generatedDesignOptionCatalog, l as headerNavTypographyPreferenceValues, s as defaultHeaderNavPreferences, z as boundaryRuntimeMetricsForDecorativeTransition } from "./effectiveNavLinkStyle-EDSdd_oK.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region ../theme-core/src/site-styles/blockFlow.ts
|
|
5
5
|
function defineBlockDesignMetadata(input) {
|
|
@@ -75,6 +75,22 @@ function parseCanonicalRuntimeBackground(content) {
|
|
|
75
75
|
background: parsed.data
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
+
/** The Look owns shading and ink together; authored image/crop stay intact. */
|
|
79
|
+
function applyLookPhotoTreatment(background, treatment) {
|
|
80
|
+
if (background.type !== "image" || treatment !== "text-overlay") return background;
|
|
81
|
+
return {
|
|
82
|
+
...background,
|
|
83
|
+
overlay: {
|
|
84
|
+
type: "gradient",
|
|
85
|
+
opacity: 1,
|
|
86
|
+
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%)"
|
|
87
|
+
},
|
|
88
|
+
textColor: "neutral-50",
|
|
89
|
+
headingColor: "neutral-50",
|
|
90
|
+
linkColor: "neutral-50",
|
|
91
|
+
supportingColor: "neutral-50"
|
|
92
|
+
};
|
|
93
|
+
}
|
|
78
94
|
function resolveSectionBackground(source, lookDefault, rhythm, arrangementHeroPhoto) {
|
|
79
95
|
if (heroPhotoIsContent(source, arrangementHeroPhoto, rhythm !== void 0)) {
|
|
80
96
|
if (rhythm !== void 0) return rhythmBackground(rhythm);
|
|
@@ -118,7 +134,7 @@ function sectionForegroundBackground(resolved, palette) {
|
|
|
118
134
|
if (resolved.kind !== "content-media") return resolved.background;
|
|
119
135
|
const original = resolveSurfaceForeground(resolved.background, palette);
|
|
120
136
|
const measured = resolveSurfaceForeground(resolved.ground, palette);
|
|
121
|
-
if (original.kind
|
|
137
|
+
if (original.kind !== "known" || measured.kind !== "known") return resolved.background;
|
|
122
138
|
return [
|
|
123
139
|
"text",
|
|
124
140
|
"heading",
|
|
@@ -412,6 +428,7 @@ const defaultHeaderBrandPreferences = {
|
|
|
412
428
|
brandDisplay: "auto",
|
|
413
429
|
logoSize: "auto"
|
|
414
430
|
};
|
|
431
|
+
asPageFlowPresetId("flow:quiet"), noneBoundaryOption.id, asPageFlowPresetId("flow:balanced"), softBoundaryOption.id, asPageFlowPresetId("flow:expressive"), spaciousBoundaryOption.id;
|
|
415
432
|
//#endregion
|
|
416
433
|
//#region ../theme-core/src/site-styles/resolver.ts
|
|
417
434
|
const blockDesignFallback = {
|
|
@@ -725,22 +742,6 @@ z.union([z.nullish(z.never()).transform(() => ({ kind: "automatic" })), pageDesi
|
|
|
725
742
|
const value = issue.input;
|
|
726
743
|
return typeof value === "object" && value !== null && "schemaVersion" in value && value.schemaVersion !== 2 ? "Unsupported page design decisions schemaVersion." : "Invalid page design decisions shape.";
|
|
727
744
|
} });
|
|
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
745
|
bookingPageLookIdValues.map((value) => {
|
|
745
746
|
const id = parseBookingPageLookId(value);
|
|
746
747
|
if (!id) throw new Error(`Invalid booking look catalogue entry: ${value}`);
|
|
@@ -751,5 +752,17 @@ bookingPageLookIdValues.map((value) => {
|
|
|
751
752
|
id
|
|
752
753
|
};
|
|
753
754
|
});
|
|
755
|
+
[...[
|
|
756
|
+
165,
|
|
757
|
+
150,
|
|
758
|
+
135,
|
|
759
|
+
120,
|
|
760
|
+
105,
|
|
761
|
+
90,
|
|
762
|
+
75,
|
|
763
|
+
60,
|
|
764
|
+
45,
|
|
765
|
+
30
|
|
766
|
+
].flatMap((o) => [o, -o])];
|
|
754
767
|
//#endregion
|
|
755
|
-
export {
|
|
768
|
+
export { deriveSectionGround as a, resolveSectionBackground as c, applyLookPhotoTreatment as i, sectionForegroundBackground as l, composeBoundary as n, heroPhotoPaintsGround as o, sectionFactsForContent as r, parseCanonicalRuntimeBackground as s, boundaryLayout as t, defineBlockDesignMetadata as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { M as generateNavLinkCSS,
|
|
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-BlTWmTSl.mjs";
|
|
2
|
+
import { L as headerNeedsPhotoShade, M as buildTextContrastShadow, N as generateNavLinkCSS, R as headerRootPaint, d as readHeaderNavFontSizePreference, o as readOpeningToneProjection, t as effectiveHeaderNavLinkStyle, u as mergeHeaderNavTypographyPreference } from "./effectiveNavLinkStyle-EDSdd_oK.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,22 @@ 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
|
-
cssChunks.push(
|
|
259
|
+
const dropdown = resolveDropdownSurface(header, theme, tokens, solvedInks);
|
|
260
|
+
cssChunks.push(generateDropdownContainerStyles(themeId, tokens, dropdown));
|
|
261
|
+
cssChunks.push(generateDropdownLinkStyles(header, themeId, tokens, theme, dropdown));
|
|
260
262
|
cssChunks.push(generateDropdownCaretStyles(themeId));
|
|
261
263
|
cssChunks.push(generateDropdownTriggerOverrides(header, themeId));
|
|
262
|
-
cssChunks.push(generateMobilePanelStyles(
|
|
264
|
+
cssChunks.push(generateMobilePanelStyles(themeId, dropdown));
|
|
263
265
|
if (header.variant === "floating" && header.container) cssChunks.push(generateFloatingContainerStyles(header, themeId, tokens, responsiveMode));
|
|
264
|
-
cssChunks.push(generateNavContainerStyles(header, themeId, tokens));
|
|
266
|
+
cssChunks.push(generateNavContainerStyles(header, themeId, tokens, theme, solvedInks));
|
|
265
267
|
cssChunks.push(generateHeaderCtaTreatmentStyles(header, themeId, tokens));
|
|
266
268
|
cssChunks.push(generateCtaGapStyles(header, themeId));
|
|
267
269
|
return cssChunks.filter(Boolean).join("\n\n");
|
|
268
270
|
}
|
|
271
|
+
/** Scope shading to the actual opening under overlay chrome, including hidden-header pages. */
|
|
272
|
+
function generateOpeningPhotoShade(header, themeId) {
|
|
273
|
+
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)"}; }`;
|
|
274
|
+
}
|
|
269
275
|
function resolveHeaderContrastTreatment(header) {
|
|
270
276
|
if (header.navLinkStyle?.contrastTreatment) return header.navLinkStyle.contrastTreatment;
|
|
271
277
|
return isClearSplitHeaderShape(header) ? "soft-glow" : null;
|
|
@@ -284,7 +290,7 @@ function isDetachedFloatingHeaderShape(header) {
|
|
|
284
290
|
/**
|
|
285
291
|
* Generate root header container styles
|
|
286
292
|
*/
|
|
287
|
-
function generateHeaderRootStyles(header, themeId, tokens) {
|
|
293
|
+
function generateHeaderRootStyles(header, themeId, tokens, inks) {
|
|
288
294
|
const selector = `:where([data-theme-scope="${themeId}"]) .header-root`;
|
|
289
295
|
const rules = [];
|
|
290
296
|
const isContainedNav = headerRootPaint(header) === "contained-nav";
|
|
@@ -296,7 +302,11 @@ function generateHeaderRootStyles(header, themeId, tokens) {
|
|
|
296
302
|
} : buildHeaderSurfaceRules(header, tokens);
|
|
297
303
|
const floatingSurfaceBorder = header.variant === "floating";
|
|
298
304
|
if (!floatingSurfaceBorder) rules.push(...surfaceRules.border);
|
|
299
|
-
const basePaintRules = floatingSurfaceBorder ? [
|
|
305
|
+
const basePaintRules = floatingSurfaceBorder ? [
|
|
306
|
+
...surfaceRules.base,
|
|
307
|
+
...surfaceRules.border,
|
|
308
|
+
...inks
|
|
309
|
+
] : [...surfaceRules.base, ...inks];
|
|
300
310
|
const scrolledPaintRules = floatingSurfaceBorder ? surfaceRules.border : [];
|
|
301
311
|
if (header.positioning === "sticky" || header.positioning === "fixed") {
|
|
302
312
|
const shadowVar = getComponentShadowVar(header.shadow?.elevation ?? "none");
|
|
@@ -342,14 +352,13 @@ function generateLogoTextBehaviorStyles(logoText, themeId) {
|
|
|
342
352
|
/**
|
|
343
353
|
* Generate dropdown menu container styles
|
|
344
354
|
*/
|
|
345
|
-
function generateDropdownContainerStyles(
|
|
355
|
+
function generateDropdownContainerStyles(themeId, tokens, surface) {
|
|
346
356
|
const selector = `:where([data-theme-scope="${themeId}"]) .nav-dropdown-menu`;
|
|
347
357
|
const rules = [];
|
|
348
|
-
const dropdownStyle =
|
|
358
|
+
const dropdownStyle = surface.style;
|
|
349
359
|
rules.push(...NAV_DROPDOWN_CONTAINER_RAIL_CSS_RULES);
|
|
350
|
-
|
|
351
|
-
rules.push(
|
|
352
|
-
rules.push(...surface.declarations(tokens));
|
|
360
|
+
rules.push(`background-color: ${surface.backgroundColor};`);
|
|
361
|
+
rules.push(...surface.foregroundDeclarations);
|
|
353
362
|
const borderToken = dropdownStyle?.borderColor;
|
|
354
363
|
if (borderToken === null) rules.push(`border: none;`);
|
|
355
364
|
else rules.push(`border: 1px solid ${tokens.getColor(borderToken ?? "border")};`);
|
|
@@ -363,71 +372,62 @@ function generateDropdownContainerStyles(header, themeId, tokens, theme) {
|
|
|
363
372
|
lg: "0.75rem"
|
|
364
373
|
}[borderRadius]};`);
|
|
365
374
|
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
|
-
|
|
375
|
+
return `\n${selector} {\n ${rules.join("\n ")}\n}\n` + generateDropdownFrosting(selector, surface);
|
|
376
|
+
}
|
|
377
|
+
function dropdownLinkEffects(style, textToken, opacity) {
|
|
378
|
+
const background = style?.hoverBackground === void 0 ? textToken : style.hoverBackground;
|
|
379
|
+
return [...background === null ? [] : [{
|
|
380
|
+
effectId: "background-on-hover-alpha",
|
|
381
|
+
options: {
|
|
382
|
+
colorToken: background,
|
|
383
|
+
opacity
|
|
384
|
+
}
|
|
385
|
+
}], ...style?.hoverTextColor ? [{
|
|
386
|
+
effectId: "text-color-change",
|
|
387
|
+
options: { hoverColorToken: style.hoverTextColor }
|
|
388
|
+
}] : []];
|
|
389
|
+
}
|
|
390
|
+
function dropdownNavLinkStyle(header, surface) {
|
|
391
|
+
const style = surface.style;
|
|
392
|
+
const textToken = surface.textToken;
|
|
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),
|
|
429
|
+
className: "nav-dropdown-link"
|
|
430
|
+
}) + `\n${`:where([data-theme-scope="${themeId}"]) .nav-dropdown-link`} {\n ${dropdownTypographyRules(surface.style).join("\n ")}\n}\n`;
|
|
431
431
|
}
|
|
432
432
|
function generateDropdownCaretStyles(themeId) {
|
|
433
433
|
return `
|
|
@@ -455,42 +455,72 @@ ${`: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
|
-
|
|
466
|
-
|
|
467
|
-
|
|
458
|
+
/** Reuse the header's decided opening tone; unknown openings retain opaque paint. */
|
|
459
|
+
function contextualDropdownStyle(header) {
|
|
460
|
+
const style = header.dropdownStyle;
|
|
461
|
+
const treatment = style?.surfaceTreatment;
|
|
462
|
+
if (!style || treatment?.kind !== "frosted" || treatment.tone !== "opening") return style;
|
|
463
|
+
const tone = readOpeningToneProjection(header);
|
|
464
|
+
if (!tone) return {
|
|
465
|
+
...style,
|
|
466
|
+
surfaceTreatment: { kind: "solid" }
|
|
467
|
+
};
|
|
468
|
+
const textColor = tone === "dark" ? "neutral-50" : "neutral-950";
|
|
469
|
+
return {
|
|
470
|
+
...style,
|
|
471
|
+
background: tone === "dark" ? "neutral-950" : "neutral-50",
|
|
472
|
+
textColor,
|
|
473
|
+
hoverBackground: textColor,
|
|
474
|
+
borderColor: null
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
/** Menu text wins; only an absent preference falls back to the header's ink. */
|
|
478
|
+
function dropdownTextCandidate(style, header) {
|
|
479
|
+
return style?.textColor ?? ((header.navColor ?? header.textColor)?.trim() || "text");
|
|
480
|
+
}
|
|
481
|
+
function resolveDropdownSurface(header, theme, tokens, solvedInks) {
|
|
482
|
+
const style = contextualDropdownStyle(header);
|
|
483
|
+
const backgroundToken = style?.background ?? "surface";
|
|
484
|
+
const candidate = dropdownTextCandidate(style, header);
|
|
468
485
|
const foreground = resolveSurfaceForeground({
|
|
469
486
|
type: "color",
|
|
470
487
|
color: backgroundToken,
|
|
471
488
|
textColor: candidate
|
|
472
489
|
}, expandPalette(theme.palette));
|
|
473
490
|
return {
|
|
474
|
-
backgroundToken,
|
|
491
|
+
backgroundColor: tokens.getColor(backgroundToken),
|
|
475
492
|
textToken: foreground.kind === "known" ? foreground.roles.text : candidate,
|
|
476
|
-
|
|
493
|
+
foregroundDeclarations: [...foreground.kind === "known" ? surfaceForegroundDeclarations(surfaceForegroundInputFromResolved(foreground, (token) => tokens.getColor(token))) : [`color: ${tokens.getColor(candidate)};`], ...surfaceInkDeclarations(surfaceInkPublication(foreground, solvedInks))],
|
|
494
|
+
treatment: style?.surfaceTreatment,
|
|
495
|
+
style
|
|
477
496
|
};
|
|
478
497
|
}
|
|
479
|
-
/**
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
498
|
+
/** Solid paint is the fallback. Blur is enhancement, never the readability mechanism. */
|
|
499
|
+
function generateDropdownFrosting(selector, surface) {
|
|
500
|
+
if (surface.treatment?.kind !== "frosted") return "";
|
|
501
|
+
const blur = surface.treatment.blur === "sm" ? "8px" : "12px";
|
|
502
|
+
return `
|
|
503
|
+
@supports (background-color: color-mix(in srgb, white, transparent)) and ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
|
504
|
+
${selector} {
|
|
505
|
+
background-color: color-mix(in srgb, ${surface.backgroundColor} ${surface.treatment.opacity * 100}%, transparent);
|
|
506
|
+
backdrop-filter: blur(${blur});
|
|
507
|
+
-webkit-backdrop-filter: blur(${blur});
|
|
508
|
+
${surface.treatment.opacity < 1 ? surfaceInkDeclarations({ kind: "reset" }).join("\n ") : ""}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
`;
|
|
512
|
+
}
|
|
513
|
+
/** Mobile shares the resolved opaque surface, never desktop translucency. */
|
|
514
|
+
function generateMobilePanelStyles(themeId, surface) {
|
|
484
515
|
const selector = `:where([data-theme-scope="${themeId}"]) .nav-mobile-panel`;
|
|
485
516
|
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)]);
|
|
517
|
+
const body = renderCssDeclarations([`background-color: ${surface.backgroundColor};`, ...surface.foregroundDeclarations]);
|
|
488
518
|
return `\n${selector} {\n ${body}\n}\n\n${selfSelector} {\n ${body}\n}\n`;
|
|
489
519
|
}
|
|
490
520
|
/**
|
|
491
521
|
* Generate nav container styles (pill/glass)
|
|
492
522
|
*/
|
|
493
|
-
function generateNavContainerStyles(header, themeId, tokens) {
|
|
523
|
+
function generateNavContainerStyles(header, themeId, tokens, theme, solvedInks) {
|
|
494
524
|
const navContainer = header.navContainer;
|
|
495
525
|
const navContainerType = navContainer?.type ?? "none";
|
|
496
526
|
if (!navContainer || navContainerType === "none") return "";
|
|
@@ -504,22 +534,30 @@ function generateNavContainerStyles(header, themeId, tokens) {
|
|
|
504
534
|
rules.push("gap: 1.5rem;");
|
|
505
535
|
if (isDetachedFloatingHeaderShape(header)) rules.push("align-self: flex-start;");
|
|
506
536
|
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
537
|
+
rules.push(...navContainerSurfaceRules(header, navContainer, tokens, theme, solvedInks));
|
|
538
|
+
return `${selector} { ${rules.join(" ")} }`;
|
|
539
|
+
}
|
|
540
|
+
/** Paint and publication are decided together, so translucent containers cannot borrow solid inks. */
|
|
541
|
+
function navContainerSurfaceRules(header, container, tokens, theme, policy) {
|
|
542
|
+
if (container.type === "glass") {
|
|
543
|
+
const opacity = resolveFloatingGlassOpacity(header, container.opacity, .15);
|
|
544
|
+
return [
|
|
545
|
+
`background-color: ${container.tint ? buildTint(tokens.getColor(container.tint), opacity) : buildRgbWhite(opacity)};`,
|
|
546
|
+
`backdrop-filter: ${HEADER_BLUR};`,
|
|
547
|
+
`-webkit-backdrop-filter: ${HEADER_BLUR};`,
|
|
548
|
+
"border: 1px solid rgba(255, 255, 255, 0.2);",
|
|
549
|
+
"box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);",
|
|
550
|
+
...surfaceInkDeclarations({ kind: "reset" })
|
|
551
|
+
];
|
|
520
552
|
}
|
|
521
|
-
|
|
522
|
-
|
|
553
|
+
const opacity = clampOpacity(container.opacity, .15);
|
|
554
|
+
const background = container.tint ? buildTint(tokens.getColor(container.tint), opacity) : tokens.getColor("surface");
|
|
555
|
+
const solid = container.tint ? opacity === 1 ? container.tint : null : "surface";
|
|
556
|
+
return [
|
|
557
|
+
`background-color: ${background};`,
|
|
558
|
+
`border: 1px solid ${tokens.getColor("border")};`,
|
|
559
|
+
...headerContainerInks(solid, theme, policy)
|
|
560
|
+
];
|
|
523
561
|
}
|
|
524
562
|
/**
|
|
525
563
|
* Generate floating container styles
|
|
@@ -534,6 +572,7 @@ function generateFloatingContainerStyles(header, themeId, tokens, responsiveMode
|
|
|
534
572
|
else rules.push(`background-color: ${buildRgbWhite(opacity)};`);
|
|
535
573
|
rules.push(`backdrop-filter: ${FLOATING_BLUR};`);
|
|
536
574
|
rules.push(`-webkit-backdrop-filter: ${FLOATING_BLUR};`);
|
|
575
|
+
rules.push(...surfaceInkDeclarations({ kind: "reset" }));
|
|
537
576
|
if (container.border) rules.push(`border: 1px solid rgb(255 255 255 / 0.2);`);
|
|
538
577
|
rules.push(`border-radius: ${{
|
|
539
578
|
none: "0",
|
|
@@ -649,6 +688,19 @@ function applyAlpha(color, opacity) {
|
|
|
649
688
|
}
|
|
650
689
|
return color;
|
|
651
690
|
}
|
|
691
|
+
/** Container glass is deliberately unmeasured; an opaque pill owns its solid paint. */
|
|
692
|
+
function headerContainerInks(color, theme, policy) {
|
|
693
|
+
if (color === null) return surfaceInkDeclarations({ kind: "reset" });
|
|
694
|
+
return surfaceInkDeclarations(surfaceInkPublication(resolveSurfaceForeground({
|
|
695
|
+
type: "color",
|
|
696
|
+
color
|
|
697
|
+
}, expandPalette(theme.palette)), policy));
|
|
698
|
+
}
|
|
699
|
+
/** Floating mobile bars paint the header background even when the root overlays the page. */
|
|
700
|
+
function headerPaintInks(header, theme, policy) {
|
|
701
|
+
if (headerRootPaint(header) === "contained-nav") return [];
|
|
702
|
+
return surfaceInkDeclarations(surfaceInkPublication(resolveSurfaceForeground(header.background, expandPalette(theme.palette)), policy));
|
|
703
|
+
}
|
|
652
704
|
//#endregion
|
|
653
705
|
//#region ../theme-core/src/siteChromePlacement.ts
|
|
654
706
|
const SITE_CHROME_PLACEMENT_CLASSES = [
|