@riverbankcms/sdk 0.180.0 → 0.182.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-DC_AvZwy.d.ts → BlocksIslandsHydrator-Bvw2bUif.d.ts} +1 -1
- package/dist/_dts/{Page-DQOxVtp3.d.ts → Page-B2EAT-bE.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-DrLgY9_f.d.ts → SdkPreviewMode-D0vww6rh.d.ts} +2 -2
- package/dist/_dts/{client-BP7VBRvs.d.ts → client-D6T430bk.d.ts} +56 -70
- package/dist/_dts/{content-types-1-K2qi__.d.ts → content-types-wZVWccC6.d.ts} +2 -2
- package/dist/_dts/{contracts-Dfqz0Tcu.d.ts → contracts-B-vtOcr8.d.ts} +3 -3
- package/dist/_dts/{generatePageMetadata-CSfAqmry.d.ts → generatePageMetadata-CxfwHE6z.d.ts} +2 -2
- package/dist/_dts/{index-BeM5Ylwf.d.ts → index-CEyYMhLJ.d.ts} +1 -2
- package/dist/_dts/{index-DQr358-m.d.ts → index-CQrb3Ccc.d.ts} +8 -8
- package/dist/_dts/{index-DCcxLa8p.d.ts → index-CciRW_w1.d.ts} +2 -2
- package/dist/_dts/{index-Blrw2oVk.d.ts → index-Cqxis-nv.d.ts} +1 -1
- package/dist/_dts/{index-CB5Csefo.d.ts → index-DIU-wL1M.d.ts} +2 -2
- package/dist/_dts/{index-DQBGwBPx.d.ts → index-DqPKdeTk.d.ts} +1 -1
- package/dist/_dts/{loadContent-BG2tLGXj.d.ts → loadContent-D0wrxiSp.d.ts} +7 -7
- package/dist/_dts/{request-P08l6mkr.d.ts → request-DEwxUSw8.d.ts} +2375 -883
- package/dist/_dts/{resolveBlockData-BDHc8lFs.d.ts → resolveBlockData-VaG_MYbN.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-Y3IZBbtL.d.ts → resolvePageContent-DTwklC_v.d.ts} +1 -1
- 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/gifting/client.d.ts +1 -2
- package/dist/_dts/sdk/src/index.d.ts +104 -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 +3 -3
- package/dist/_dts/sdk/src/next/index.d.ts +83 -52
- 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 +43 -56
- package/dist/_dts/sdk/src/portal/index.d.ts +3 -18
- 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 +6 -6
- 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 +1 -1
- package/dist/_dts/{serviceBookingOutline-BvtNagjw.d.ts → serviceBookingOutline-DtQuFlID.d.ts} +6 -6
- package/dist/_dts/{types-DpEAnP4F.d.ts → types-B3RjeBLV.d.ts} +2 -2
- package/dist/_dts/{types-HAy1-Jjo.d.ts → types-BvUSGQrw.d.ts} +3 -3
- package/dist/_dts/{types-BrK6SS5c.d.ts → types-CkRFtBqd.d.ts} +7 -7
- package/dist/_dts/{validation-D6q3tOBA.d.ts → validation-BZA3DhcV.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DJSmdNUJ.mjs → BlocksIslandsHydrator-CQMf0HdN.mjs} +19 -19
- package/dist/client/{BookingMailingListNote-CGxg37zx.mjs → BookingMailingListNote-7kdvuPow.mjs} +93 -18
- package/dist/client/{BookingQuestionFields-DXegGSnS.mjs → BookingQuestionFields-BJI7mZuV.mjs} +7 -87
- package/dist/client/CalendarAction-D_Glwvz2.mjs +105 -0
- package/dist/client/{CalendarNavigationChevron-VfP50sYm.mjs → CalendarNavigationChevron-DPUD6wjy.mjs} +8 -8
- package/dist/client/{CheckboxChoice-BZPLCgTU.mjs → CheckboxChoice-C8i4NraK.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-0Ua44F1j.mjs → DemoBookingPortalAccess-8kwNF9HN.mjs} +9 -6
- package/dist/client/{EventCalendar.client-CrpiyDSP.mjs → EventCalendar.client-Dhb14bcC.mjs} +10 -10
- package/dist/client/{EventCombined.client-D0me9wnz.mjs → EventCombined.client-C1jEZBN9.mjs} +60 -10
- package/dist/client/{EventEmbeddedCheckoutStep-BDnicDM6.mjs → EventEmbeddedCheckoutStep-BGkbUhuw.mjs} +1 -1
- package/dist/client/{EventItem-CJITrGkF.mjs → EventItem-Bb0ppG2N.mjs} +9 -177
- package/dist/client/{EventListWeekNavigation-BlEm_xjq.mjs → EventListWeekNavigation-DMryCaNV.mjs} +1 -1
- package/dist/client/{EventListing.client-BNM_HuS0.mjs → EventListing.client-BuH5kKA3.mjs} +3 -3
- package/dist/client/{EventListing.view-CXfb7RRy.mjs → EventListing.view-DsqvuulZ.mjs} +8 -8
- package/dist/client/{EventRegistrationPayment-DiD9uYs6.mjs → EventRegistrationPayment-D4FvQSFF.mjs} +555 -502
- package/dist/client/{Page-bX7iy_MK.mjs → Page-sV6BJkXX.mjs} +550 -339
- package/dist/client/{ProtectedSubmitButton-De6AzhE6.mjs → ProtectedSubmitButton-BNnKuir8.mjs} +1 -1
- package/dist/client/{SiteTermsAgreementField-BAdW5DvE.mjs → SiteTermsAgreementField-VfSd6JU-.mjs} +7 -11
- package/dist/client/{StepIndicator-DCfdcb7s.mjs → StepIndicator-B6o5B7g3.mjs} +1 -1
- package/dist/client/{StepIndicator-DCqorVne.mjs → StepIndicator-BTqO7cJl.mjs} +235 -26
- package/dist/client/{ThemedButton-CnSa7o-I.mjs → ThemedButton-PFOhXktM.mjs} +1 -33
- package/dist/client/{accessibleSurfaces-Wl8-_OVJ.mjs → accessibleSurfaces-BogaGutk.mjs} +983 -634
- package/dist/client/{accordion-wofJY8xY.mjs → accordion-6cuswD_s.mjs} +1 -1
- package/dist/client/{booking-form.client-CYl9NrqS.mjs → booking-form.client-BOMe_SKi.mjs} +52 -29
- package/dist/client/bookingCalendar--aWnqFDn.mjs +180 -0
- package/dist/client/{bookingForm-kgVWtuMe.mjs → bookingForm-DSCH-VHo.mjs} +4 -4
- package/dist/client/bookings.mjs +17 -11
- package/dist/client/{boxStyleClassNames-CQHWz5gJ.mjs → boxStyleClassNames-BFuqZCfz.mjs} +2 -2
- package/dist/client/{carousel-BE1dEFsD.mjs → carousel-CGyQVV1M.mjs} +2 -2
- package/dist/client/{carousel.client-DMtGYTTM.mjs → carousel.client-BtLwHefX.mjs} +1 -1
- package/dist/client/{cart-BsjsdGZE.mjs → cart-BYOe7MCh.mjs} +3 -3
- package/dist/client/{cart.client-DylGUWXY.mjs → cart.client-BKFkaXdV.mjs} +1 -1
- package/dist/client/{checkout-B5KxEUDr.mjs → checkout-Dwd7Di77.mjs} +3 -3
- package/dist/client/{checkout.client-C98fhch3.mjs → checkout.client-C25hpi-z.mjs} +1 -1
- package/dist/client/{checkoutUrls-BMLYTf38.mjs → checkoutUrls-tG788sw0.mjs} +1 -1
- package/dist/client/client.mjs +106 -43
- package/dist/client/{constants-PfYJsEZF.mjs → constants-DdxFG3Ic.mjs} +1 -2
- package/dist/client/{context-DtKdUdkO.mjs → context-Hi1RuYEM.mjs} +753 -373
- package/dist/client/{dateFormatting-BaGPvQS3.mjs → dateFormatting-C8vBCHuo.mjs} +15 -25
- package/dist/client/{demoPortalMagicLink-B8eDjhuG.mjs → demoPortalMagicLink-BAL5UIDG.mjs} +2 -3
- package/dist/client/{enhanceHeaderSection-DvhD-8eE.mjs → enhanceHeaderSection-Dv1Lr9kJ.mjs} +4 -5
- package/dist/client/{event-registration.client-Du9a_xAN.mjs → event-registration.client-dB_Z7bb-.mjs} +191 -210
- package/dist/client/{eventCalendar-Di9wDfzl.mjs → eventCalendar-CQnRA4Ww.mjs} +4 -4
- package/dist/client/{eventCombined-CNW6nBsB.mjs → eventCombined-BDOG1hVp.mjs} +4 -4
- package/dist/client/{eventListing-CQMxQ8By.mjs → eventListing-DSVmhy9n.mjs} +4 -4
- package/dist/client/{eventRegistration-CprS9k1D.mjs → eventRegistration-CD5mRtEH.mjs} +4 -4
- package/dist/client/{form-Zl1_8RJ6.mjs → form-DWnlEVSK.mjs} +3 -3
- package/dist/client/{form.client-TaMUys6I.mjs → form.client-D7zmeqNI.mjs} +5 -5
- package/dist/client/{form.parts-CpNPbPPM.mjs → form.parts-C-G6N_MK.mjs} +3 -3
- package/dist/client/gifting/client.mjs +32 -29
- package/dist/client/{gifting-DNVa7-Wj.mjs → gifting-Cn0jidP5.mjs} +4 -4
- package/dist/client/{gifting.client-CFUq3GVx.mjs → gifting.client-DVo1YFLs.mjs} +5 -5
- package/dist/client/{gifting.parts-CDQvxA4A.mjs → gifting.parts-Bak93gD2.mjs} +2 -2
- package/dist/client/{headerSection-Cg6083rn.mjs → headerSection-DjQuj_6v.mjs} +2 -2
- package/dist/client/{mediaAssets-B99AP7ai.mjs → mediaAssets-COfQolI3.mjs} +1 -1
- package/dist/client/{mediaContext-Fusweriw.mjs → mediaContext-DzvnjYXm.mjs} +1 -1
- package/dist/client/{newsletter-form.client-VuL9I96G.mjs → newsletter-form.client-rIYPziZC.mjs} +7 -7
- package/dist/client/{newsletter-form.interactive-7Of3eYn0.mjs → newsletter-form.interactive-DVt3enLr.mjs} +181 -155
- package/dist/client/{newsletter-form.parts-OBqsfT24.mjs → newsletter-form.parts-CH6dGfdn.mjs} +2 -2
- package/dist/client/{newsletterForm-BkJe_RTv.mjs → newsletterForm-Cg8cBDHd.mjs} +3 -3
- package/dist/client/{lookSurfaces-gJ3OqPf9.mjs → noop-jesvJXEE.mjs} +403 -275
- package/dist/client/portal/client.mjs +12202 -7166
- package/dist/client/portalOrders-oEoTvzkW.mjs +596 -0
- package/dist/client/portalRoutes-ByyVZfVq.mjs +873 -0
- package/dist/client/{product-detail.client-B2hdxqJN.mjs → product-detail.client-5aHq-vuu.mjs} +1 -1
- package/dist/client/{product-list.client-CCEgu9rx.mjs → product-list.client-CyAk5rnC.mjs} +1 -1
- package/dist/client/{productDetail-CRX_ZRfS.mjs → productDetail-B8aZ2mqY.mjs} +3 -3
- package/dist/client/{productList-BAdJ6z5S.mjs → productList-BuLemmod.mjs} +3 -3
- package/dist/client/{propsDecoder-BLKAmX0S.mjs → propsDecoder-0Unsqn3R.mjs} +2 -2
- package/dist/client/{registry.server-Bj9cmHHF.mjs → registry.server-DzvtVVD0.mjs} +664 -434
- package/dist/client/{renderableMediaAssetAdmission-BlfqYLJW.mjs → renderableMediaAssetAdmission-BsOWd9lf.mjs} +1 -1
- package/dist/client/rendering/client.mjs +26 -26
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +16 -8
- package/dist/client/{richText-coerce-Z45OLLEX.mjs → richText-coerce-Bnng7JFA.mjs} +2 -1
- package/dist/client/{routeIslandApiConfig-DHpTTK77.mjs → routeIslandApiConfig-BGfcc9sk.mjs} +1 -1
- package/dist/client/{runtimeResponse-DtWSfWSZ.mjs → runtimeResponse-DAPVRToN.mjs} +1 -1
- package/dist/client/{runtimeResponse-D2j2-mOk.mjs → runtimeResponse-nXT8VAMl.mjs} +1 -1
- package/dist/client/{shop-BKsgxm_-.mjs → shop-GuMqnDL-.mjs} +3 -3
- package/dist/client/{shop-commerce-Cbtk_kUW.mjs → shop-commerce-D5bDY1o1.mjs} +53 -16
- package/dist/client/{shop-commerce-store-B-rv2p5h.mjs → shop-commerce-store-B7sHnLwI.mjs} +22 -5
- package/dist/client/{shop-discount-apply.state-CiCDLNh7.mjs → shop-discount-apply.state-Dos2zdC2.mjs} +2 -2
- package/dist/client/{shop.client-Rnqa74Tk.mjs → shop.client-uvj5GDZb.mjs} +17 -39
- package/dist/client/{shopShared-BaBfhjCq.mjs → shopShared-3giNWE3H.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/src-Al4ooTl_.mjs +164 -0
- package/dist/client/{src-o7WEvbK1.mjs → src-CmXh3JWs.mjs} +233 -91
- package/dist/client/{timetableModel-BOff1Kk5.mjs → timetableModel-GA-hn1qM.mjs} +11 -87
- package/dist/client/{shop-add-feedback-DvC2kP1K.mjs → urlParams-C2QHo1Pa.mjs} +1 -42
- package/dist/client/{useAvailableSlots-DQJNh10g.mjs → useAvailableSlots-CBneCxbG.mjs} +2 -3
- package/dist/client/{useDiscountCodeUi-BcFQRI_7.mjs → useDiscountCodeUi-D0kGF0C7.mjs} +1 -1
- package/dist/client/{useEventPagination-BvdcexDC.mjs → useEventPagination-xX8n_Tuu.mjs} +8 -8
- package/dist/client/{view-CTBwSpKv.mjs → view-DOyZc-DF.mjs} +4 -4
- package/dist/client/{wizardSteps-CWIQyRIw.mjs → wizardSteps-B952ify5.mjs} +1241 -295
- package/dist/preview-next/client/{PageSectionToolbar-CG6KwITA.mjs → PageSectionToolbar-BI3UCdpu.mjs} +3 -3
- package/dist/preview-next/client/{PreviewEditorSidebar-BGBqrC9m.mjs → PreviewEditorSidebar-jkfLVOgY.mjs} +12 -9
- package/dist/preview-next/client/{PreviewEditorUI-Bwkyx28x.mjs → PreviewEditorUI-DwJQs4hM.mjs} +4 -4
- package/dist/preview-next/client/{PreviewShell-DB1l6JNU.mjs → PreviewShell-BAxAkuz8.mjs} +5 -5
- package/dist/preview-next/client/{SdkPreviewModeRuntime-Bs6Cwzr3.mjs → SdkPreviewModeRuntime-0UVB-39f.mjs} +68 -17
- package/dist/preview-next/client/{previewAssistantSlot-T-oDD_Dd.mjs → previewAssistantSlot-BgiYk3PB.mjs} +7347 -3516
- package/dist/preview-next/client/{previewChromeRoot-BeukcDRy.mjs → previewChromeRoot-tieNdF3E.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-ceDW_9q2.mjs → sdk-runtime-DXb_Evl0.mjs} +2 -2
- package/dist/preview-next/client/{siteStyleAccess-CCB9bScO.mjs → siteStyleAccess-BlN0jt2c.mjs} +3 -3
- package/dist/preview-next/client/{useAutosaveStatus-D4o0CKq7.mjs → useAutosaveStatus-BUEPA4oL.mjs} +1 -1
- package/dist/preview-next/client/{useOpenBlockForSetup-Seccrvwu.mjs → useOpenBlockForSetup-BVfr5P--.mjs} +1 -1
- package/dist/preview-next/container-responsive.css +203 -174
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-FwFj8zGL.mjs → route-contract-BHTBA48n.mjs} +90 -37
- package/dist/server/{Block.shared-D6WrRCxX.mjs → Block.shared-hGoyEdjJ.mjs} +5 -5
- package/dist/server/{ThemeScopeCore-BQzjDQ2q.mjs → ThemeScopeCore-BfUCTOwj.mjs} +160 -142
- package/dist/server/{accessibleSurfaces-CM3QANtw.mjs → accessibleSurfaces-Dskni4Xj.mjs} +94 -330
- package/dist/server/accordions-By_0Ykks.mjs +111 -0
- package/dist/server/{bindings-CS6ih1Yc.mjs → bindings-DMJH4bvo.mjs} +7 -7
- package/dist/server/{client-m0ylCj_f.mjs → client-DrwlRNAH.mjs} +105 -42
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/constants-CeMywaiD.mjs +1485 -0
- package/dist/server/{customCss-BZ8YSrQg.mjs → customCss-C9kgPHvr.mjs} +41 -5
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/{resolveButtonColourStates--6yJp9Tq.mjs → expandPalette-ehuW8r2g.mjs} +745 -1229
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-vgWMz1uD.mjs → loadContent-D0prFflT.mjs} +5 -4
- package/dist/server/{loadPage-CIOL3-9t.mjs → loadPage-CBLke9pJ.mjs} +3 -3
- package/dist/server/{lookMediaFrame-m-91jGGn.mjs → lookMediaFrame-H0fi4bJk.mjs} +38 -18
- package/dist/server/manifest.mjs +36 -25
- package/dist/server/{mapLocation-BM5WX7FY.mjs → mapLocation-MDDSubTp.mjs} +1 -1
- package/dist/server/media-BRmYrnzb.mjs +31 -0
- package/dist/server/{media-luf7RF22.mjs → media-gvfIw3z8.mjs} +2 -31
- package/dist/server/{navigation-BcNfYYuu.mjs → navigation-wrcuWmgp.mjs} +2 -2
- package/dist/server/navigation.mjs +1 -1
- package/dist/server/next.mjs +134 -81
- package/dist/server/{overrideResolution-BiHmsvTZ.mjs → overrideResolution-DUgCEH8z.mjs} +1 -1
- package/dist/server/page-converter.mjs +3 -3
- package/dist/server/{pageRenderPlan-DJo_obpi.mjs → pageRenderPlan-BHrmogsW.mjs} +165 -247
- package/dist/server/{pageRuntimeSupport-BnSuoHON.mjs → pageRuntimeSupport-D2-YMRei.mjs} +5 -5
- package/dist/server/{pageShared-BJuOzxzn.mjs → pageShared-CG8O31Eo.mjs} +3402 -3249
- package/dist/server/{parseThemeForPersistence-DOsfofCy.mjs → parseThemeForPersistence-CrPlbJEN.mjs} +3 -2
- package/dist/server/{portal-B4JVkdjc.mjs → portal-pG_uhsI2.mjs} +62 -46
- package/dist/server/portal.mjs +3 -3
- package/dist/server/portalQuestions-oUyohgL9.mjs +225 -0
- package/dist/server/{prebuild-Cr8p8T7V.mjs → prebuild-C8Amvzce.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-BZh57-ua.mjs → prefetchBlockData-BxUETRIZ.mjs} +4 -3
- package/dist/server/{registry-CvhFwbXJ.mjs → registry-Cc88-23f.mjs} +1514 -1190
- 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 +4 -4
- package/dist/server/rendering.mjs +10 -9
- package/dist/server/{resolveBlockData-Cv_W1LVB.mjs → resolveBlockData-OG3KOkig.mjs} +2 -2
- package/dist/server/{responseMedia-KRKguBC5.mjs → responseMedia-IfH65QAH.mjs} +1 -1
- package/dist/server/{schema-BpsqaSSU.mjs → schema-CwfxQjc4.mjs} +10 -113
- package/dist/server/server.mjs +3 -3
- package/dist/server/{servicePageContent-CRKbTm_7.mjs → servicePageContent-BcFuhhD7.mjs} +22 -21
- package/dist/server/theme-bridge.mjs +34 -8
- package/dist/server/theme.mjs +2 -2
- package/dist/server/{three-pass-converter-39SXCCnh.mjs → three-pass-converter-DPaUPTfl.mjs} +34 -16
- package/dist/server/titleSourceSchema-NhK6azFS.mjs +2018 -0
- package/dist/server/typeGuards-CTW_9AXq.mjs +413 -0
- package/dist/server/types-BKaBZFjD.mjs +1085 -0
- package/dist/server/{validation-DCl-FCk_.mjs → validation-BovmbS8N.mjs} +70 -17
- package/dist/server/{version-DT_R5JAR.mjs → version-hws4hgyX.mjs} +1 -1
- package/dist/server/video-Cdr3wh-q.mjs +272 -0
- package/dist/styles/index.css +1098 -1885
- package/package.json +2 -1
- package/dist/_dts/index-B0_2-65A.d.ts +0 -101
- package/dist/client/TabBarFragment-DlKQRhP4.mjs +0 -56
- package/dist/client/checkoutRoute-DKlZRNZD.mjs +0 -22
- package/dist/client/creditProducts-BQ1t1erI.mjs +0 -266
- package/dist/client/formatDate-hhI1-tzt.mjs +0 -26
- package/dist/server/constants-Cj7hfbrA.mjs +0 -41
- package/dist/server/richTextSchema-QLaQrbII.mjs +0 -212
- package/dist/server/titleSourceSchema-Cu-3PRvv.mjs +0 -122
|
@@ -1,116 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as parseColorTokenParts, N as rgbColorValue, V as hexColorSchema, Y as parseThemeColorToken, b as completeSurfaceForegrounds, g as VARIANT_ROLES, n as STANDARD_BUTTON_SURFACE_POLICY, p as opaqueButtonColourTokenSchema, u as buttonSystemSchema } from "./types-BKaBZFjD.mjs";
|
|
2
|
+
import { A as onColorTokenName, B as preparePaletteColourIndex, C as paletteInk, D as paletteMutedInkOnSolid, E as paletteInkToken, G as oklabToSrgb, H as featuresFromHex, I as ORDINARY_TEXT_MIN_CONTRAST_RATIO, J as rgbToHex, L as contrastRatio, M as resolveOpaqueSurfaceHex, O as colourFamily, R as hexLuminance, T as paletteInkRoles, U as hexToRgb, V as solidPaint, _ as ELEVATION_OFFSET, a as compositeHex, b as pickBlackOrWhiteTextColor, h as BORDER_WIDTH_MAP, j as resolveConcreteColorHex, l as buttonStateBorder, m as BORDER_RADIUS_MAP, n as deriveSurfaceDecorationColors, q as oklchToOklab, r as expandPalette, u as compileButtonColourStates, v as FONT_SIZE_MAP, w as paletteInkOnSolid, x as inkFrom, y as generateShadowValue, z as luminanceInterval } from "./expandPalette-ehuW8r2g.mjs";
|
|
2
3
|
import { z } from "zod";
|
|
3
|
-
//#region ../theme-core/src/palette/colors.ts
|
|
4
|
-
const PALETTE_VALUE_KEY_PREFIX = "palette-value:v1|";
|
|
5
|
-
z.string().regex(/^[0-9a-f]{64}$/, "Palette hash must be a lowercase SHA-256 value").transform((value) => value);
|
|
6
|
-
function requirePaletteColorsFromEntries(entries) {
|
|
7
|
-
const result = paletteColorsFromEntries(entries);
|
|
8
|
-
if (result.ok) return result.colors;
|
|
9
|
-
throw new Error(`Invalid complete palette: ${result.error.kind}`);
|
|
10
|
-
}
|
|
11
|
-
function paletteColorFingerprint(colors) {
|
|
12
|
-
return PALETTE_TOKEN_NAMES.map((name) => `${name}:${colors[name]}`).join("|");
|
|
13
|
-
}
|
|
14
|
-
function canonicalPaletteHashInput(colors, mode) {
|
|
15
|
-
return `${mode}|${paletteColorFingerprint(colors)}`;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Stable curated-catalogue identity. Do not reorder roles: the order comes
|
|
19
|
-
* from PALETTE_TOKEN_NAMES through canonicalPaletteHashInput.
|
|
20
|
-
*/
|
|
21
|
-
function paletteValueKey(colors, mode) {
|
|
22
|
-
return `${PALETTE_VALUE_KEY_PREFIX}${canonicalPaletteHashInput(colors, mode)}`;
|
|
23
|
-
}
|
|
24
|
-
/** Parses only the exact v1 canonical form emitted by paletteValueKey. */
|
|
25
|
-
function parsePaletteValueKey(value) {
|
|
26
|
-
if (typeof value !== "string" || !value.startsWith(PALETTE_VALUE_KEY_PREFIX)) return null;
|
|
27
|
-
const [rawMode, ...rawRoles] = value.slice(17).split("|");
|
|
28
|
-
const mode = paletteModeSchema.safeParse(rawMode);
|
|
29
|
-
if (!mode.success || rawRoles.length !== PALETTE_TOKEN_NAMES.length) return null;
|
|
30
|
-
const colors = paletteColorsFromEntries(rawRoles.map((roleValue) => {
|
|
31
|
-
const separator = roleValue.indexOf(":");
|
|
32
|
-
return separator === -1 ? {
|
|
33
|
-
name: "",
|
|
34
|
-
hex: ""
|
|
35
|
-
} : {
|
|
36
|
-
name: roleValue.slice(0, separator),
|
|
37
|
-
hex: roleValue.slice(separator + 1)
|
|
38
|
-
};
|
|
39
|
-
}));
|
|
40
|
-
if (!colors.ok || paletteValueKey(colors.colors, mode.data) !== value) return null;
|
|
41
|
-
return value;
|
|
42
|
-
}
|
|
43
|
-
const paletteValueKeySchema = z.string().transform((value, ctx) => {
|
|
44
|
-
const parsed = parsePaletteValueKey(value);
|
|
45
|
-
if (parsed) return parsed;
|
|
46
|
-
ctx.addIssue({
|
|
47
|
-
code: "custom",
|
|
48
|
-
message: "Invalid canonical palette value key"
|
|
49
|
-
});
|
|
50
|
-
return z.NEVER;
|
|
51
|
-
});
|
|
52
|
-
//#endregion
|
|
53
|
-
//#region ../theme-core/src/palette/utils/opaqueSurfaceColor.ts
|
|
54
|
-
/** Resolve an opaque colour, compositing alpha against an explicit underlay. */
|
|
55
|
-
function resolveOpaqueSurfaceHex(reference, palette, underlayReference) {
|
|
56
|
-
const opaque = resolveConcreteColorHex(reference, palette);
|
|
57
|
-
if (opaque) return opaque;
|
|
58
|
-
if (!underlayReference) return null;
|
|
59
|
-
const underlayHex = resolveConcreteColorHex(underlayReference, palette);
|
|
60
|
-
if (!underlayHex) return null;
|
|
61
|
-
const parts = parseColorTokenParts(reference);
|
|
62
|
-
if (parts.kind === "token" && parts.opacityPercent !== null) {
|
|
63
|
-
const foregroundHex = normalizePaletteHex(palette[parts.token] ?? "");
|
|
64
|
-
return foregroundHex ? compositeHex$1(foregroundHex, underlayHex, parts.opacityPercent / 100) : null;
|
|
65
|
-
}
|
|
66
|
-
const rgba = parseRgba(parts.kind === "raw" ? parts.value : reference);
|
|
67
|
-
return rgba ? compositeHex$1(rgbToHex(rgba.r, rgba.g, rgba.b), underlayHex, rgba.alpha) : null;
|
|
68
|
-
}
|
|
69
|
-
/** Resolve a colour reference only when it is already fully opaque. */
|
|
70
|
-
function resolveConcreteColorHex(reference, palette) {
|
|
71
|
-
const literalHex = normalizePaletteHex(reference);
|
|
72
|
-
if (literalHex) return literalHex;
|
|
73
|
-
const parts = parseColorTokenParts(reference);
|
|
74
|
-
if (parts.kind === "token") {
|
|
75
|
-
if (parts.opacityPercent !== null) return null;
|
|
76
|
-
return normalizePaletteHex(palette[parts.token] ?? "");
|
|
77
|
-
}
|
|
78
|
-
const literal = parts.kind === "raw" ? parts.value : reference;
|
|
79
|
-
if (literal.toLowerCase() === "black") return "#000000";
|
|
80
|
-
if (literal.toLowerCase() === "white") return "#ffffff";
|
|
81
|
-
return normalizePaletteHex(literal);
|
|
82
|
-
}
|
|
83
|
-
function compositeHex$1(foregroundHex, underlayHex, alpha) {
|
|
84
|
-
const foreground = hexToRgb(foregroundHex);
|
|
85
|
-
const underlay = hexToRgb(underlayHex);
|
|
86
|
-
const channel = (foregroundValue, underlayValue) => Math.round(foregroundValue * alpha + underlayValue * (1 - alpha));
|
|
87
|
-
return rgbToHex(channel(foreground.r, underlay.r), channel(foreground.g, underlay.g), channel(foreground.b, underlay.b));
|
|
88
|
-
}
|
|
89
|
-
function parseRgba(value) {
|
|
90
|
-
const match = value.trim().match(/^rgba?\(\s*([\d.]+)(?:\s*,\s*|\s+)([\d.]+)(?:\s*,\s*|\s+)([\d.]+)(?:\s*(?:,|\/)\s*([\d.]+%?))?\s*\)$/i);
|
|
91
|
-
if (!match) return null;
|
|
92
|
-
const [, rSource, gSource, bSource] = match;
|
|
93
|
-
if (!rSource || !gSource || !bSource) return null;
|
|
94
|
-
const r = Number(rSource);
|
|
95
|
-
const g = Number(gSource);
|
|
96
|
-
const b = Number(bSource);
|
|
97
|
-
const alpha = parseAlpha(match[4]);
|
|
98
|
-
if (alpha === null || !isRgbChannel(r) || !isRgbChannel(g) || !isRgbChannel(b)) return null;
|
|
99
|
-
return {
|
|
100
|
-
r,
|
|
101
|
-
g,
|
|
102
|
-
b,
|
|
103
|
-
alpha
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
function parseAlpha(source) {
|
|
107
|
-
if (!source) return 1;
|
|
108
|
-
const value = source.endsWith("%") ? Number(source.slice(0, -1)) / 100 : Number(source);
|
|
109
|
-
return Number.isFinite(value) && value >= 0 && value <= 1 ? value : null;
|
|
110
|
-
}
|
|
111
|
-
function isRgbChannel(value) {
|
|
112
|
-
return Number.isFinite(value) && value >= 0 && value <= 255;
|
|
113
|
-
}
|
|
114
4
|
/**
|
|
115
5
|
* Derive the hover foreground that belongs with a resolved resting foreground.
|
|
116
6
|
*
|
|
@@ -184,7 +74,8 @@ const BUTTON_VISUAL_STATES = [
|
|
|
184
74
|
/**
|
|
185
75
|
* The ink certificate: every colour the site paints text or a mark on is held to
|
|
186
76
|
* its threshold here, on every backdrop it shows. An ink that misses takes the
|
|
187
|
-
*
|
|
77
|
+
* palette ink that clears all of them (the site's background or text colour,
|
|
78
|
+
* else black or white); inks that pass are kept as they are,
|
|
188
79
|
* so a palette that already passes paints exactly what it declared. It never
|
|
189
80
|
* throws, because owner palettes are arbitrary.
|
|
190
81
|
*
|
|
@@ -223,10 +114,16 @@ function inkClearsBackdrops(ink, threshold, backdrops, measurement) {
|
|
|
223
114
|
return hex !== null && contrastRatio(hex, backdrop, measurement.colourIndex) >= threshold;
|
|
224
115
|
});
|
|
225
116
|
}
|
|
226
|
-
/** The
|
|
117
|
+
/** The palette ink that clears every backdrop at ordinary-text contrast, or null when not even black or white does. */
|
|
227
118
|
function fallbackInk(backdrops, measurement) {
|
|
228
|
-
const
|
|
229
|
-
|
|
119
|
+
const ys = backdrops.map((backdrop) => hexLuminance(backdrop, measurement.colourIndex));
|
|
120
|
+
if (ys.length === 0) return null;
|
|
121
|
+
const ink = paletteInk(luminanceInterval(Math.min(...ys), Math.max(...ys)), paletteInkRoles(measurement.palette), contrastThresholdByPolicy["body-aa"]);
|
|
122
|
+
return ink.kind === "unpaintable" ? null : paletteInkToken(ink);
|
|
123
|
+
}
|
|
124
|
+
/** One solid backdrop: total, because black or white always clears it. */
|
|
125
|
+
function solidFallbackInk(backdrop, measurement) {
|
|
126
|
+
return paletteInkToken(paletteInkOnSolid(backdrop, paletteInkRoles(measurement.palette)));
|
|
230
127
|
}
|
|
231
128
|
function failingInks(inks, backdrops, measurement) {
|
|
232
129
|
return {
|
|
@@ -266,9 +163,9 @@ function certifySolidSurfaceInks(inks, backdrop, measurement) {
|
|
|
266
163
|
...inks,
|
|
267
164
|
fallback: []
|
|
268
165
|
};
|
|
269
|
-
return replaceFailing(inks, failing,
|
|
166
|
+
return replaceFailing(inks, failing, solidFallbackInk(backdrop, measurement));
|
|
270
167
|
}
|
|
271
|
-
/** Kept when the ink clears the threshold, otherwise the
|
|
168
|
+
/** Kept when the ink clears the threshold, otherwise the palette ink, which always clears a solid backdrop. */
|
|
272
169
|
function certifyPaint(place, ink, threshold, backdrop, measurement) {
|
|
273
170
|
return inkClearsBackdrops(ink, threshold, [backdrop], measurement) ? {
|
|
274
171
|
place,
|
|
@@ -278,7 +175,7 @@ function certifyPaint(place, ink, threshold, backdrop, measurement) {
|
|
|
278
175
|
fallback: false
|
|
279
176
|
} : {
|
|
280
177
|
place,
|
|
281
|
-
ink:
|
|
178
|
+
ink: solidFallbackInk(backdrop, measurement),
|
|
282
179
|
backdrop,
|
|
283
180
|
threshold,
|
|
284
181
|
fallback: true,
|
|
@@ -286,61 +183,6 @@ function certifyPaint(place, ink, threshold, backdrop, measurement) {
|
|
|
286
183
|
};
|
|
287
184
|
}
|
|
288
185
|
//#endregion
|
|
289
|
-
//#region ../theme-core/src/palette/utils/inkSolver.ts
|
|
290
|
-
/**
|
|
291
|
-
* How far (OKLab ΔE) a brand colour drawn as ink may be nudged along its own
|
|
292
|
-
* family before it stops reading as that colour. Past this the caller uses
|
|
293
|
-
* neutral or palette text instead (Will, 2026-10-14).
|
|
294
|
-
*/
|
|
295
|
-
const BRAND_INK_MAX_DELTA_E = .08;
|
|
296
|
-
/**
|
|
297
|
-
* The seed itself when it clears `paint`, otherwise the family member nearest
|
|
298
|
-
* the seed (OKLab ΔE) that clears. On a light ground that is darker, on a dark
|
|
299
|
-
* one lighter. A passing member further than `maxDistance` from the seed is
|
|
300
|
-
* refused as `too-far`, which is distinct from `unpaintable`: the family runs
|
|
301
|
-
* from black to white, so if no member clears, neither does black or white.
|
|
302
|
-
*/
|
|
303
|
-
function inkFrom(family, paint, ratio, maxDistance = BRAND_INK_MAX_DELTA_E) {
|
|
304
|
-
assertContrastRatio(ratio);
|
|
305
|
-
if (!Number.isFinite(maxDistance) || maxDistance < 0) throw new RangeError(`Maximum ink distance must be finite and not negative: ${maxDistance}`);
|
|
306
|
-
const seedRatio = worstContrast(family.seed.y, paint);
|
|
307
|
-
if (seedRatio >= ratio) return {
|
|
308
|
-
kind: "ink",
|
|
309
|
-
hex: family.seed.hex,
|
|
310
|
-
ratio: seedRatio,
|
|
311
|
-
source: "exact"
|
|
312
|
-
};
|
|
313
|
-
const nearest = family.members.reduce((best, member) => {
|
|
314
|
-
const achieved = worstContrast(member.y, paint);
|
|
315
|
-
if (achieved < ratio) return best;
|
|
316
|
-
const distance = oklabDistance(member.oklab, family.seed.oklab);
|
|
317
|
-
return best === null || distance < best.distance ? {
|
|
318
|
-
hex: member.hex,
|
|
319
|
-
distance,
|
|
320
|
-
ratio: achieved
|
|
321
|
-
} : best;
|
|
322
|
-
}, null);
|
|
323
|
-
if (nearest === null) return {
|
|
324
|
-
kind: "unpaintable",
|
|
325
|
-
interval: paint,
|
|
326
|
-
ratio
|
|
327
|
-
};
|
|
328
|
-
if (nearest.distance > maxDistance) return {
|
|
329
|
-
kind: "too-far",
|
|
330
|
-
nearest: {
|
|
331
|
-
hex: nearest.hex,
|
|
332
|
-
distance: nearest.distance
|
|
333
|
-
},
|
|
334
|
-
maxDistance
|
|
335
|
-
};
|
|
336
|
-
return {
|
|
337
|
-
kind: "ink",
|
|
338
|
-
hex: nearest.hex,
|
|
339
|
-
ratio: nearest.ratio,
|
|
340
|
-
source: "family"
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
//#endregion
|
|
344
186
|
//#region ../theme-core/src/surfaces/surfaceInks.ts
|
|
345
187
|
/** Lines and focus rings are graphics: WCAG non-text contrast. */
|
|
346
188
|
const GRAPHIC_MIN_CONTRAST_RATIO = 3;
|
|
@@ -377,7 +219,7 @@ const INK_SEEDS = {
|
|
|
377
219
|
*/
|
|
378
220
|
function solveSurfaceInks(backdropHex, textInk, palette, candidates = {}) {
|
|
379
221
|
const paint = solidPaint(backdropHex);
|
|
380
|
-
const fallback = literalInk(resolveConcreteColorHex(textInk, palette) ?? pickBlackOrWhiteTextColor(backdropHex));
|
|
222
|
+
const fallback = literalInk$1(resolveConcreteColorHex(textInk, palette) ?? pickBlackOrWhiteTextColor(backdropHex));
|
|
381
223
|
return {
|
|
382
224
|
brand: solveInk({
|
|
383
225
|
...INK_SEEDS.brand,
|
|
@@ -403,12 +245,12 @@ function solveInk(seed, paint, palette, fallback) {
|
|
|
403
245
|
if (!token || !seedHex.success) return fallback;
|
|
404
246
|
const solved = inkFrom(familyOf(seedHex.data), paint, seed.ratio, seed.maxDistance);
|
|
405
247
|
switch (solved.kind) {
|
|
406
|
-
case "ink": return solved.source === "exact" ? token : literalInk(solved.hex);
|
|
248
|
+
case "ink": return solved.source === "exact" ? token : literalInk$1(solved.hex);
|
|
407
249
|
case "too-far":
|
|
408
250
|
case "unpaintable": return fallback;
|
|
409
251
|
}
|
|
410
252
|
}
|
|
411
|
-
function literalInk(hex) {
|
|
253
|
+
function literalInk$1(hex) {
|
|
412
254
|
return hexColorSchema.parse(hex.toLowerCase());
|
|
413
255
|
}
|
|
414
256
|
const FAMILY_CACHE_LIMIT = 64;
|
|
@@ -423,14 +265,6 @@ function familyOf(seed) {
|
|
|
423
265
|
}
|
|
424
266
|
//#endregion
|
|
425
267
|
//#region ../theme-core/src/surfaces/resolveSurfaceForeground.ts
|
|
426
|
-
const FALLBACK_TEXT_TOKENS = [
|
|
427
|
-
"text",
|
|
428
|
-
"primaryForeground",
|
|
429
|
-
"secondaryForeground",
|
|
430
|
-
"accentForeground",
|
|
431
|
-
"neutral-950",
|
|
432
|
-
"neutral-50"
|
|
433
|
-
];
|
|
434
268
|
const CANONICAL_EQUIVALENT_TOKEN_ORDER = [
|
|
435
269
|
"text",
|
|
436
270
|
"primaryForeground",
|
|
@@ -481,11 +315,7 @@ function resolveDeterministicForeground(backgroundReference, candidates, palette
|
|
|
481
315
|
function resolveMeasuredForeground(backgroundReference, backgroundHex, candidates, palette) {
|
|
482
316
|
const backgroundToken = paletteToken(backgroundReference);
|
|
483
317
|
const derivedOnToken = backgroundToken ? onColorTokenName(backgroundToken) : null;
|
|
484
|
-
const text = firstSafeToken([
|
|
485
|
-
candidates.text,
|
|
486
|
-
derivedOnToken,
|
|
487
|
-
...FALLBACK_TEXT_TOKENS
|
|
488
|
-
], backgroundHex, palette, derivedOnToken ? [derivedOnToken] : []) ?? pickBlackOrWhiteTextColor(backgroundHex);
|
|
318
|
+
const text = firstSafeToken([candidates.text, derivedOnToken], backgroundHex, palette, derivedOnToken ? [derivedOnToken] : []) ?? paletteTextInk(backgroundHex, palette);
|
|
489
319
|
return certifiedForeground(knownForeground({
|
|
490
320
|
text,
|
|
491
321
|
heading: safeTokenOr(candidates.heading, text, backgroundHex, palette),
|
|
@@ -497,6 +327,10 @@ function resolveMeasuredForeground(backgroundReference, backgroundHex, candidate
|
|
|
497
327
|
inks: solveSurfaceInks(backgroundHex, text, palette)
|
|
498
328
|
}, candidates.linkHover, palette), palette);
|
|
499
329
|
}
|
|
330
|
+
/** The automatic text when neither the authored ink nor the ground's on-colour reads: the palette's own pair, then black or white. */
|
|
331
|
+
function paletteTextInk(backgroundHex, palette) {
|
|
332
|
+
return paletteInkToken(paletteInkOnSolid(backgroundHex, paletteInkRoles(palette)));
|
|
333
|
+
}
|
|
500
334
|
/**
|
|
501
335
|
* Every measured foreground goes through the ink certificate, whoever paints it
|
|
502
336
|
* (sections, cards, header, footer, accordions). The candidates above are chosen
|
|
@@ -519,13 +353,13 @@ function certifiedForeground(foreground, palette) {
|
|
|
519
353
|
};
|
|
520
354
|
}
|
|
521
355
|
function resolveTrustedTreatmentForeground(candidates, palette) {
|
|
522
|
-
const text =
|
|
356
|
+
const text = canonicalInk(candidates.text, palette);
|
|
523
357
|
if (!text) return { kind: "unmeasured-paint" };
|
|
524
358
|
return knownForeground({
|
|
525
359
|
text,
|
|
526
|
-
heading:
|
|
527
|
-
link:
|
|
528
|
-
supporting:
|
|
360
|
+
heading: canonicalInk(candidates.heading, palette) ?? text,
|
|
361
|
+
link: canonicalInk(candidates.link, palette) ?? text,
|
|
362
|
+
supporting: canonicalInk(candidates.supporting, palette) ?? text
|
|
529
363
|
}, { kind: "trusted-treatment" }, candidates.linkHover, palette);
|
|
530
364
|
}
|
|
531
365
|
function knownForeground(roles, provenance, hoverCandidate, palette) {
|
|
@@ -541,7 +375,7 @@ function knownForeground(roles, provenance, hoverCandidate, palette) {
|
|
|
541
375
|
roles: {
|
|
542
376
|
...roles,
|
|
543
377
|
linkHover: hover.token,
|
|
544
|
-
muted: provenance.kind === "measured" ?
|
|
378
|
+
muted: provenance.kind === "measured" ? paletteMutedInkOnSolid(provenance.backdropHex, resolveConcreteColorHex(roles.text, palette), paletteInkRoles(palette)) : roles.text
|
|
545
379
|
},
|
|
546
380
|
hoverDecoration: hover.decoration
|
|
547
381
|
};
|
|
@@ -584,6 +418,21 @@ function firstSafeToken(candidates, backgroundHex, palette, preferredEquivalentT
|
|
|
584
418
|
}
|
|
585
419
|
return null;
|
|
586
420
|
}
|
|
421
|
+
/**
|
|
422
|
+
* A media treatment's ink as the resolved contract spells it. Nothing measures
|
|
423
|
+
* the paint, so literal black or white (the photo tint's fallback) stays that
|
|
424
|
+
* literal colour rather than borrowing whichever palette token shares its value
|
|
425
|
+
* today, or being dropped when none does. Any other reference is a palette token.
|
|
426
|
+
* Measured solids keep `firstSafeToken`, whose equivalent on-colour carries the
|
|
427
|
+
* ground's own hover softening.
|
|
428
|
+
*/
|
|
429
|
+
function canonicalInk(reference, palette) {
|
|
430
|
+
return literalInk(reference) ?? canonicalToken(reference, palette);
|
|
431
|
+
}
|
|
432
|
+
function literalInk(reference) {
|
|
433
|
+
const normalized = normalizedReference(reference)?.toUpperCase();
|
|
434
|
+
return normalized === "#000000" || normalized === "#FFFFFF" ? normalized : null;
|
|
435
|
+
}
|
|
587
436
|
function canonicalToken(reference, palette, preferredEquivalentTokens = []) {
|
|
588
437
|
const normalized = normalizedReference(reference);
|
|
589
438
|
if (!normalized || normalized === "transparent") return null;
|
|
@@ -977,7 +826,7 @@ function paddingDeclarations(padding, borderWidth) {
|
|
|
977
826
|
}
|
|
978
827
|
//#endregion
|
|
979
828
|
//#region ../theme-core/src/buttons/buttonSurfaceContext.ts
|
|
980
|
-
/** The last resort,
|
|
829
|
+
/** The last resort, when neither palette role reads (`paletteInkOnSolid`). */
|
|
981
830
|
const LITERAL_NEUTRALS = {
|
|
982
831
|
black: {
|
|
983
832
|
hex: "#000000",
|
|
@@ -998,7 +847,7 @@ function deriveButtonSurfaceContext(input, palette, fallbackToken, colourIndex)
|
|
|
998
847
|
const background = deriveKnownBackground(input, palette, fallbackToken);
|
|
999
848
|
if (background.kind === "unknown") return background;
|
|
1000
849
|
const explicitForeground = resolveKnownColour(input.kind === "solid" || input.kind === "inherit" ? input.foreground ?? "" : "", palette);
|
|
1001
|
-
const foreground = explicitForeground && contrastRatio(background.colour.hex, explicitForeground.hex, colourIndex) >= 4.5 ? explicitForeground :
|
|
850
|
+
const foreground = explicitForeground && contrastRatio(background.colour.hex, explicitForeground.hex, colourIndex) >= 4.5 ? explicitForeground : automaticForeground(background.colour.hex, palette);
|
|
1002
851
|
return {
|
|
1003
852
|
kind: "known-solid",
|
|
1004
853
|
source: background.source,
|
|
@@ -1303,6 +1152,16 @@ function boundaryForVariant(variant) {
|
|
|
1303
1152
|
function findVariant(system, role) {
|
|
1304
1153
|
return system.variants.find((variant) => variant.enabled && variant.id === role);
|
|
1305
1154
|
}
|
|
1155
|
+
/** The surface's automatic text: the palette's own background or text where it reads, else black or white. */
|
|
1156
|
+
function automaticForeground(backgroundHex, palette) {
|
|
1157
|
+
const ink = paletteInkOnSolid(backgroundHex, paletteInkRoles(palette));
|
|
1158
|
+
if (ink.kind === "literal") return LITERAL_NEUTRALS[ink.hex === "#000000" ? "black" : "white"];
|
|
1159
|
+
return resolveKnownColour(ink.role, palette) ?? {
|
|
1160
|
+
hex: ink.hex,
|
|
1161
|
+
css: ink.hex,
|
|
1162
|
+
source: "literal-css"
|
|
1163
|
+
};
|
|
1164
|
+
}
|
|
1306
1165
|
function resolveKnownColour(value, palette) {
|
|
1307
1166
|
const reference = parseThemeColorReference(value, { palette });
|
|
1308
1167
|
if (reference.kind !== "literal-css") {
|
|
@@ -1393,77 +1252,6 @@ function contextualBoundaryStyles(boundary) {
|
|
|
1393
1252
|
};
|
|
1394
1253
|
}
|
|
1395
1254
|
//#endregion
|
|
1396
|
-
//#region ../theme-core/src/palette/utils/scrimContrast.ts
|
|
1397
|
-
const WHITE = "#ffffff";
|
|
1398
|
-
const BLACK = "#000000";
|
|
1399
|
-
/** `top` at `alpha` over opaque `bottom`, blended as CSS paints an overlay. */
|
|
1400
|
-
function compositeHex(topHex, alpha, bottomHex) {
|
|
1401
|
-
const top = hexToRgb(topHex);
|
|
1402
|
-
const bottom = hexToRgb(bottomHex);
|
|
1403
|
-
const mix = (a, b) => Math.round(alpha * a + (1 - alpha) * b);
|
|
1404
|
-
return rgbToHex(mix(top.r, bottom.r), mix(top.g, bottom.g), mix(top.b, bottom.b));
|
|
1405
|
-
}
|
|
1406
|
-
/**
|
|
1407
|
-
* The lowest contrast `foreground` can reach over `scrim` at `alpha` laid on
|
|
1408
|
-
* any pixel. A foreground whose luminance falls inside the range the
|
|
1409
|
-
* composites can take has a worst case of 1:1.
|
|
1410
|
-
*/
|
|
1411
|
-
function worstCaseScrimContrast(input) {
|
|
1412
|
-
const overWhite = compositeHex(input.scrimHex, input.alpha, WHITE);
|
|
1413
|
-
const overBlack = compositeHex(input.scrimHex, input.alpha, BLACK);
|
|
1414
|
-
const luminance = (hex) => {
|
|
1415
|
-
const { r, g, b } = hexToRgb(hex);
|
|
1416
|
-
return relativeLuminance(r, g, b);
|
|
1417
|
-
};
|
|
1418
|
-
const foreground = luminance(input.foregroundHex);
|
|
1419
|
-
const low = luminance(overBlack);
|
|
1420
|
-
const high = luminance(overWhite);
|
|
1421
|
-
if (foreground >= low && foreground <= high) return 1;
|
|
1422
|
-
return Math.min(contrastRatio(input.foregroundHex, overWhite), contrastRatio(input.foregroundHex, overBlack));
|
|
1423
|
-
}
|
|
1424
|
-
/**
|
|
1425
|
-
* The smallest scrim opacity, in hundredths, at which every foreground keeps
|
|
1426
|
-
* `threshold` contrast over any pixel. `null` when even an opaque scrim fails,
|
|
1427
|
-
* which means the foreground was never legible on the scrim colour itself.
|
|
1428
|
-
*/
|
|
1429
|
-
function minimumScrimOpacity(input) {
|
|
1430
|
-
const passes = (alpha) => input.foregroundHexes.every((foregroundHex) => worstCaseScrimContrast({
|
|
1431
|
-
foregroundHex,
|
|
1432
|
-
scrimHex: input.scrimHex,
|
|
1433
|
-
alpha
|
|
1434
|
-
}) >= input.threshold);
|
|
1435
|
-
return Array.from({ length: 101 }, (_, hundredths) => hundredths / 100).find(passes) ?? null;
|
|
1436
|
-
}
|
|
1437
|
-
/** Shared samples for literal RGB washes and palette-token gradient veils. */
|
|
1438
|
-
function gradientScrimSamples(gradient, alpha, palette) {
|
|
1439
|
-
const literal = [...gradient.matchAll(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/g)].map((stop) => ({
|
|
1440
|
-
hex: rgbToHex(Number(stop[1]), Number(stop[2]), Number(stop[3])),
|
|
1441
|
-
alpha: alpha * (stop[4] === void 0 ? 1 : Number(stop[4]))
|
|
1442
|
-
}));
|
|
1443
|
-
const tokens = [...gradient.matchAll(/var\(--tb-([\w-]+)\)/g)].flatMap((stop) => {
|
|
1444
|
-
const hex = stop[1] ? resolveConcreteColorHex(stop[1], palette) : null;
|
|
1445
|
-
return hex ? [{
|
|
1446
|
-
hex,
|
|
1447
|
-
alpha
|
|
1448
|
-
}] : [];
|
|
1449
|
-
});
|
|
1450
|
-
return [...literal, ...tokens];
|
|
1451
|
-
}
|
|
1452
|
-
/** The ink with the stronger worst-pixel guarantee identifies the veil tone.
|
|
1453
|
-
* No readable samples (or a tie) leaves classification to the foreground owner.
|
|
1454
|
-
*/
|
|
1455
|
-
function scrimTone(samples) {
|
|
1456
|
-
if (samples.length === 0) return null;
|
|
1457
|
-
const worst = (foregroundHex) => Math.min(...samples.map((sample) => worstCaseScrimContrast({
|
|
1458
|
-
foregroundHex,
|
|
1459
|
-
scrimHex: sample.hex,
|
|
1460
|
-
alpha: sample.alpha
|
|
1461
|
-
})));
|
|
1462
|
-
const white = worst(WHITE);
|
|
1463
|
-
const black = worst(BLACK);
|
|
1464
|
-
return white === black ? null : white > black ? "dark" : "light";
|
|
1465
|
-
}
|
|
1466
|
-
//#endregion
|
|
1467
1255
|
//#region ../theme-core/src/site-styles/surfaceTransportMarker.ts
|
|
1468
1256
|
/**
|
|
1469
1257
|
* The envelope key `serializeSurfaceTree` writes and `parseSurfaceTree` reads.
|
|
@@ -1479,24 +1267,12 @@ const ON_BACKGROUND = { kind: "on-background" };
|
|
|
1479
1267
|
const surfaceRecipes = {
|
|
1480
1268
|
base: {
|
|
1481
1269
|
backgroundCandidates: ["background", "surface"],
|
|
1482
|
-
headingCandidates: [
|
|
1483
|
-
|
|
1484
|
-
ON_BACKGROUND,
|
|
1485
|
-
"neutral-950",
|
|
1486
|
-
"neutral-50"
|
|
1487
|
-
],
|
|
1488
|
-
textCandidates: [
|
|
1489
|
-
"text",
|
|
1490
|
-
ON_BACKGROUND,
|
|
1491
|
-
"neutral-950",
|
|
1492
|
-
"neutral-50"
|
|
1493
|
-
],
|
|
1270
|
+
headingCandidates: ["text", ON_BACKGROUND],
|
|
1271
|
+
textCandidates: ["text", ON_BACKGROUND],
|
|
1494
1272
|
linkCandidates: [
|
|
1495
1273
|
"primary",
|
|
1496
1274
|
"text",
|
|
1497
|
-
ON_BACKGROUND
|
|
1498
|
-
"neutral-950",
|
|
1499
|
-
"neutral-50"
|
|
1275
|
+
ON_BACKGROUND
|
|
1500
1276
|
],
|
|
1501
1277
|
supportingCandidates: ["mutedText"],
|
|
1502
1278
|
inheritedBackground: true
|
|
@@ -1508,24 +1284,12 @@ const surfaceRecipes = {
|
|
|
1508
1284
|
"surface",
|
|
1509
1285
|
"background"
|
|
1510
1286
|
],
|
|
1511
|
-
headingCandidates: [
|
|
1512
|
-
|
|
1513
|
-
"text",
|
|
1514
|
-
"neutral-950",
|
|
1515
|
-
"neutral-50"
|
|
1516
|
-
],
|
|
1517
|
-
textCandidates: [
|
|
1518
|
-
ON_BACKGROUND,
|
|
1519
|
-
"text",
|
|
1520
|
-
"neutral-950",
|
|
1521
|
-
"neutral-50"
|
|
1522
|
-
],
|
|
1287
|
+
headingCandidates: [ON_BACKGROUND, "text"],
|
|
1288
|
+
textCandidates: [ON_BACKGROUND, "text"],
|
|
1523
1289
|
linkCandidates: [
|
|
1524
1290
|
"primary",
|
|
1525
1291
|
ON_BACKGROUND,
|
|
1526
|
-
"text"
|
|
1527
|
-
"neutral-950",
|
|
1528
|
-
"neutral-50"
|
|
1292
|
+
"text"
|
|
1529
1293
|
],
|
|
1530
1294
|
supportingCandidates: [
|
|
1531
1295
|
"mutedText",
|
|
@@ -1544,25 +1308,19 @@ const surfaceRecipes = {
|
|
|
1544
1308
|
ON_BACKGROUND,
|
|
1545
1309
|
"primaryForeground",
|
|
1546
1310
|
"background",
|
|
1547
|
-
"surface"
|
|
1548
|
-
"neutral-50",
|
|
1549
|
-
"neutral-950"
|
|
1311
|
+
"surface"
|
|
1550
1312
|
],
|
|
1551
1313
|
textCandidates: [
|
|
1552
1314
|
ON_BACKGROUND,
|
|
1553
1315
|
"primaryForeground",
|
|
1554
1316
|
"background",
|
|
1555
|
-
"surface"
|
|
1556
|
-
"neutral-50",
|
|
1557
|
-
"neutral-950"
|
|
1317
|
+
"surface"
|
|
1558
1318
|
],
|
|
1559
1319
|
linkCandidates: [
|
|
1560
1320
|
ON_BACKGROUND,
|
|
1561
1321
|
"primaryForeground",
|
|
1562
1322
|
"background",
|
|
1563
|
-
"surface"
|
|
1564
|
-
"neutral-50",
|
|
1565
|
-
"neutral-950"
|
|
1323
|
+
"surface"
|
|
1566
1324
|
],
|
|
1567
1325
|
supportingCandidates: [
|
|
1568
1326
|
ON_BACKGROUND,
|
|
@@ -1583,25 +1341,19 @@ const surfaceRecipes = {
|
|
|
1583
1341
|
ON_BACKGROUND,
|
|
1584
1342
|
"primaryForeground",
|
|
1585
1343
|
"background",
|
|
1586
|
-
"surface"
|
|
1587
|
-
"neutral-50",
|
|
1588
|
-
"neutral-950"
|
|
1344
|
+
"surface"
|
|
1589
1345
|
],
|
|
1590
1346
|
textCandidates: [
|
|
1591
1347
|
ON_BACKGROUND,
|
|
1592
1348
|
"primaryForeground",
|
|
1593
1349
|
"background",
|
|
1594
|
-
"surface"
|
|
1595
|
-
"neutral-50",
|
|
1596
|
-
"neutral-950"
|
|
1350
|
+
"surface"
|
|
1597
1351
|
],
|
|
1598
1352
|
linkCandidates: [
|
|
1599
1353
|
ON_BACKGROUND,
|
|
1600
1354
|
"primaryForeground",
|
|
1601
1355
|
"background",
|
|
1602
|
-
"surface"
|
|
1603
|
-
"neutral-50",
|
|
1604
|
-
"neutral-950"
|
|
1356
|
+
"surface"
|
|
1605
1357
|
],
|
|
1606
1358
|
supportingCandidates: [
|
|
1607
1359
|
ON_BACKGROUND,
|
|
@@ -1626,7 +1378,11 @@ function toAccessibleColorSurfaceIntent(surface) {
|
|
|
1626
1378
|
default: return assertNeverSurface(surface);
|
|
1627
1379
|
}
|
|
1628
1380
|
}
|
|
1629
|
-
/**
|
|
1381
|
+
/**
|
|
1382
|
+
* Keep every successful recipe. When no ground has a passing ink, the first
|
|
1383
|
+
* ground present takes the palette's own ink there (the shared owner), which
|
|
1384
|
+
* always reaches ordinary-text contrast on a solid.
|
|
1385
|
+
*/
|
|
1630
1386
|
function resolveAccessibleSurfaceRecipe(input) {
|
|
1631
1387
|
const result = tryAccessibleSurfaceRecipe(input);
|
|
1632
1388
|
if (result.kind === "resolved-accessible-surface") return result;
|
|
@@ -1634,13 +1390,13 @@ function resolveAccessibleSurfaceRecipe(input) {
|
|
|
1634
1390
|
const token = recipe.backgroundCandidates.find((candidate) => resolveConcreteColorHex(candidate, input.palette) !== null);
|
|
1635
1391
|
const hex = token ? resolveConcreteColorHex(token, input.palette) : null;
|
|
1636
1392
|
if (!token || !hex) return result;
|
|
1637
|
-
const ink =
|
|
1393
|
+
const ink = paletteInkOnSolid(hex, paletteInkRoles(input.palette));
|
|
1638
1394
|
const foreground = (role) => ({
|
|
1639
1395
|
kind: "safe-token",
|
|
1640
1396
|
role,
|
|
1641
|
-
token: asAccessibleSurfaceToken(ink),
|
|
1642
|
-
hex: ink,
|
|
1643
|
-
contrastRatio:
|
|
1397
|
+
token: asAccessibleSurfaceToken(paletteInkToken(ink)),
|
|
1398
|
+
hex: ink.hex,
|
|
1399
|
+
contrastRatio: ink.ratio
|
|
1644
1400
|
});
|
|
1645
1401
|
return {
|
|
1646
1402
|
kind: "resolved-accessible-surface",
|
|
@@ -1739,16 +1495,24 @@ function tryAccessibleSurfaceRecipe(input) {
|
|
|
1739
1495
|
rejectedCandidates
|
|
1740
1496
|
};
|
|
1741
1497
|
}
|
|
1498
|
+
/**
|
|
1499
|
+
* The recipe's explicit candidates first; when none reads, the palette's own
|
|
1500
|
+
* ink on this ground at the recipe's threshold (the shared owner, which tries
|
|
1501
|
+
* the palette's text and background before black or white). Null only when
|
|
1502
|
+
* even black or white misses the threshold, so the recipe tries its next ground.
|
|
1503
|
+
*/
|
|
1742
1504
|
function resolveRequiredForeground(input) {
|
|
1743
|
-
|
|
1505
|
+
const explicit = resolveSafeToken(input);
|
|
1506
|
+
if (explicit) return explicit;
|
|
1507
|
+
const ink = paletteInk(solidPaint(input.backgroundHex), paletteInkRoles(input.palette), input.threshold);
|
|
1508
|
+
if (ink.kind === "unpaintable") return null;
|
|
1509
|
+
return {
|
|
1510
|
+
kind: "safe-token",
|
|
1744
1511
|
role: input.role,
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
threshold: input.threshold,
|
|
1750
|
-
rejectedCandidates: input.rejectedCandidates
|
|
1751
|
-
});
|
|
1512
|
+
token: asAccessibleSurfaceToken(paletteInkToken(ink)),
|
|
1513
|
+
hex: ink.hex,
|
|
1514
|
+
contrastRatio: ink.ratio
|
|
1515
|
+
};
|
|
1752
1516
|
}
|
|
1753
1517
|
function resolveSupportingForeground(input) {
|
|
1754
1518
|
const resolved = resolveSafeToken({
|
|
@@ -2606,4 +2370,4 @@ function mapSurfaceTreeChildren(value, map) {
|
|
|
2606
2370
|
return isSurfaceTreeRecord(value) ? Object.fromEntries(Object.entries(value).map(([key, item]) => [key, map(item)])) : value;
|
|
2607
2371
|
}
|
|
2608
2372
|
//#endregion
|
|
2609
|
-
export {
|
|
2373
|
+
export { ownedThemeSnapshot as A, planForegroundHover as B, mapButtonRoleAppearances as C, resolveThemeColorReferenceValue as D, resolveOnColorForThemeToken as E, solveSurfaceInks as F, HOVER_TEXT_THRESHOLD as I, certifyPaint as L, safeTokenOr as M, surfaceInkPublication as N, resolveTokenOrCssColorValue as O, CONTROL_EDGE_SEED_TOKEN as P, contrastThresholdByPolicy as R, defineButtonStyleRecipe as S, isCssColorLiteral as T, buttonStateAppearanceDeclarations as _, requireResolvedSurface as a, paddingDeclarations as b, surfaceButtonRequest as c, toAccessibleColorSurfaceIntent as d, actionVariableFallback as f, buttonShadow as g, buttonRadius as h, prepareThemeSurfaceRevision as i, resolveSurfaceForeground as j, freezeOwnedThemeValue as k, surfaceDecorationColors as l, buttonBorder as m, parseSurfaceTree as n, resolveSurface as o, contextualButtonSurfaceResetStyles as p, prepareSurfaceIndex as r, serializeSurfaceTree as s, parseResolvedSurface as t, surfaceTransportContext as u, buttonTypographyDeclarations as v, mapButtonVisualAppearances as w, PUBLIC_BUTTON_ROLES as x, materializeRuntimeButtonAppearance as y, inkReference as z };
|