@riverbankcms/sdk 0.182.0 → 0.184.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 +79 -0
- package/README.md +83 -4
- package/dist/_dts/{BlocksIslandsHydrator-Bvw2bUif.d.ts → BlocksIslandsHydrator-DjBTJYiF.d.ts} +1 -1
- package/dist/_dts/{Page-B2EAT-bE.d.ts → Page-BpXEM2ET.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-D0vww6rh.d.ts → SdkPreviewMode-Bb3h7KRE.d.ts} +2 -2
- package/dist/_dts/{client-D6T430bk.d.ts → client-DgTRRtl_.d.ts} +14 -1
- package/dist/_dts/{content-types-wZVWccC6.d.ts → content-types-DZQJp_ak.d.ts} +9 -16
- package/dist/_dts/{contracts-B-vtOcr8.d.ts → contracts-Ww1fmd-c.d.ts} +3 -3
- package/dist/_dts/{generatePageMetadata-CxfwHE6z.d.ts → generatePageMetadata-BGc7dju6.d.ts} +2 -2
- package/dist/_dts/{index-CciRW_w1.d.ts → index-BECaUNYs.d.ts} +2 -2
- package/dist/_dts/{index-CEyYMhLJ.d.ts → index-Cc85KVLW.d.ts} +3 -3
- package/dist/_dts/{index-CQrb3Ccc.d.ts → index-Cni4jykw.d.ts} +4 -4
- package/dist/_dts/{index-DIU-wL1M.d.ts → index-DxxTQ_0V.d.ts} +2 -2
- package/dist/_dts/{index-Cqxis-nv.d.ts → index-W9-7djG3.d.ts} +1 -1
- package/dist/_dts/{index-DqPKdeTk.d.ts → index-ukS-Ffem.d.ts} +1 -1
- package/dist/_dts/{loadContent-D0wrxiSp.d.ts → loadContent-BlSWTlbD.d.ts} +7 -7
- package/dist/_dts/{request-DEwxUSw8.d.ts → request-CZz2BoXJ.d.ts} +89478 -88093
- package/dist/_dts/{resolveBlockData-VaG_MYbN.d.ts → resolveBlockData-D12HXnS3.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-DTwklC_v.d.ts → resolvePageContent-BteMsSGP.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 +7 -7
- 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 -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 +3 -3
- 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/portal/index.d.ts +10 -2
- 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 +126 -2
- package/dist/_dts/{serviceBookingOutline-DtQuFlID.d.ts → serviceBookingOutline-aTlOvO3U.d.ts} +16 -8
- package/dist/_dts/{types-B3RjeBLV.d.ts → types-Bi7R07RX.d.ts} +45 -4
- package/dist/_dts/{types-BvUSGQrw.d.ts → types-CCcQlRBi.d.ts} +22 -12
- package/dist/_dts/{types-CkRFtBqd.d.ts → types-Du4aMnWC.d.ts} +13 -15
- package/dist/_dts/{validation-BZA3DhcV.d.ts → validation-CjCWVmwe.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-CQMf0HdN.mjs → BlocksIslandsHydrator-CFLWxjxR.mjs} +22 -18
- package/dist/client/{BookingMailingListNote-7kdvuPow.mjs → BookingMailingListNote-C4LcfwyA.mjs} +8 -8
- package/dist/client/{BookingQuestionFields-BJI7mZuV.mjs → BookingQuestionFields-DdcmoHqQ.mjs} +2 -2
- package/dist/client/{CalendarAction-D_Glwvz2.mjs → CalendarAction-DYGewmvh.mjs} +1 -1
- package/dist/client/{CalendarNavigationChevron-DPUD6wjy.mjs → CalendarNavigationChevron-ZfrUiiiI.mjs} +25 -8
- package/dist/client/{CheckboxChoice-C8i4NraK.mjs → CheckboxChoice-CTMIII37.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-8kwNF9HN.mjs → DemoBookingPortalAccess-pzkGVkgG.mjs} +7 -5
- package/dist/client/{EventCalendar.client-Dhb14bcC.mjs → EventCalendar.client-Ct1B3xI4.mjs} +10 -10
- package/dist/client/{EventCombined.client-C1jEZBN9.mjs → EventCombined.client-DgfNtcgW.mjs} +9 -9
- package/dist/client/{EventEmbeddedCheckoutStep-BGkbUhuw.mjs → EventEmbeddedCheckoutStep-CjoaG1zy.mjs} +1 -1
- package/dist/client/{EventItem-Bb0ppG2N.mjs → EventItem-KGKkK19N.mjs} +29 -14
- package/dist/client/{EventListWeekNavigation-DMryCaNV.mjs → EventListWeekNavigation-Ba9ezxuC.mjs} +1 -1
- package/dist/client/{EventListing.client-BuH5kKA3.mjs → EventListing.client-xFKRDLwC.mjs} +3 -3
- package/dist/client/{EventListing.view-DsqvuulZ.mjs → EventListing.view-Dy36vWHi.mjs} +84 -7
- package/dist/client/{EventRegistrationPayment-D4FvQSFF.mjs → EventRegistrationPayment-Dth9L00x.mjs} +118 -76
- package/dist/client/{Page-sV6BJkXX.mjs → Page-DB5KODiu.mjs} +4491 -1398
- package/dist/client/{ProtectedSubmitButton-BNnKuir8.mjs → ProtectedSubmitButton-CY6u5sQa.mjs} +1 -1
- package/dist/client/{SiteTermsAgreementField-VfSd6JU-.mjs → SiteTermsAgreementField-BDVP_HeK.mjs} +3 -3
- package/dist/client/{StepIndicator-B6o5B7g3.mjs → StepIndicator-CLgDVzCs.mjs} +1 -1
- package/dist/client/{StepIndicator-BTqO7cJl.mjs → StepIndicator-DRyZ8igu.mjs} +7 -7
- package/dist/client/{ThemedButton-PFOhXktM.mjs → ThemedButton-C4rCsPCt.mjs} +52 -10
- package/dist/client/{accessibleSurfaces-BogaGutk.mjs → accessibleSurfaces-CqroimVQ.mjs} +1024 -619
- package/dist/client/{accordion-6cuswD_s.mjs → accordion-BQYRP5xV.mjs} +1 -1
- package/dist/client/{booking-form.client-BOMe_SKi.mjs → booking-form.client-B7ckDuOC.mjs} +191 -71
- package/dist/client/{bookingForm-DSCH-VHo.mjs → bookingForm-BeD4650p.mjs} +7 -6
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{boxStyleClassNames-BFuqZCfz.mjs → boxStyleClassNames-CA7FirMH.mjs} +2 -2
- package/dist/client/buttonParts-C39GC0kz.mjs +1518 -0
- package/dist/client/{carousel-CGyQVV1M.mjs → carousel-DJ9Aa1m3.mjs} +2 -2
- package/dist/client/{carousel.client-BtLwHefX.mjs → carousel.client-DKWqVHHh.mjs} +1 -1
- package/dist/client/{cart-BYOe7MCh.mjs → cart-DdCenbTy.mjs} +3 -3
- package/dist/client/{cart.client-BKFkaXdV.mjs → cart.client-BQm06qNw.mjs} +1 -1
- package/dist/client/{checkout-Dwd7Di77.mjs → checkout-45wPQULN.mjs} +3 -3
- package/dist/client/{checkout.client-C25hpi-z.mjs → checkout.client-bSv4cc5z.mjs} +1 -1
- package/dist/client/{checkoutUrls-tG788sw0.mjs → checkoutUrls-CwlaMl3W.mjs} +1 -1
- package/dist/client/client.mjs +460 -119
- package/dist/client/{constants-DdxFG3Ic.mjs → constants-DXV4KR7l.mjs} +1 -1
- package/dist/client/{context-Hi1RuYEM.mjs → context-lCPfX-xe.mjs} +15 -5
- package/dist/client/{dateFormatting-C8vBCHuo.mjs → dateFormatting-HvfmS_cH.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-BAL5UIDG.mjs → demoPortalMagicLink-Ce3Gyin_.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-Dv1Lr9kJ.mjs → enhanceHeaderSection-CGcDE9aE.mjs} +4 -4
- package/dist/client/{event-registration.client-dB_Z7bb-.mjs → event-registration.client-DlPfn4YG.mjs} +52 -29
- package/dist/client/{eventCalendar-CQnRA4Ww.mjs → eventCalendar-CioAdryV.mjs} +4 -4
- package/dist/client/{eventCombined-BDOG1hVp.mjs → eventCombined-Dwt0G6ez.mjs} +4 -4
- package/dist/client/{eventListing-DSVmhy9n.mjs → eventListing-B3H9ifOC.mjs} +4 -4
- package/dist/client/{eventRegistration-CD5mRtEH.mjs → eventRegistration-Do7cAhXb.mjs} +7 -6
- package/dist/client/{form-DWnlEVSK.mjs → form-CsqzgC6v.mjs} +3 -3
- package/dist/client/{form.client-D7zmeqNI.mjs → form.client-DVDB7hY6.mjs} +5 -5
- package/dist/client/{form.parts-C-G6N_MK.mjs → form.parts-1q2rzSYt.mjs} +3 -3
- package/dist/client/gifting/client.mjs +16 -9
- package/dist/client/{gifting-Cn0jidP5.mjs → gifting-BrXQGX-k.mjs} +4 -4
- package/dist/client/{gifting.client-DVo1YFLs.mjs → gifting.client--zAjnY5N.mjs} +155 -85
- package/dist/client/gifting.interactive-CrwHpUJG.mjs +207 -0
- package/dist/client/gifting.parts-CcKdDaQq.mjs +124 -0
- package/dist/client/{headerSection-DjQuj_6v.mjs → headerSection-DlcDH4bi.mjs} +2 -2
- package/dist/client/{noop-jesvJXEE.mjs → islands-dMh0Oxli.mjs} +16103 -7965
- package/dist/client/{newsletter-form.client-rIYPziZC.mjs → newsletter-form.client-BxA1PsdS.mjs} +6 -6
- package/dist/client/{newsletter-form.interactive-DVt3enLr.mjs → newsletter-form.interactive-D0iRg7p2.mjs} +229 -197
- package/dist/client/{newsletter-form.parts-CH6dGfdn.mjs → newsletter-form.parts-Dmuklz0r.mjs} +2 -2
- package/dist/client/{newsletterForm-Cg8cBDHd.mjs → newsletterForm-CBzvgIfg.mjs} +3 -3
- package/dist/client/portal/client.mjs +51 -35
- package/dist/client/{portalOrders-oEoTvzkW.mjs → portalOrders-tCxS04g0.mjs} +3 -2
- package/dist/client/{portalRoutes-ByyVZfVq.mjs → portalRoutes-DiGibcZI.mjs} +31 -9
- package/dist/client/portalSession-0XhXyTxT.mjs +41 -0
- package/dist/client/{product-detail.client-5aHq-vuu.mjs → product-detail.client-D9MP8hvH.mjs} +1 -1
- package/dist/client/{product-list.client-CyAk5rnC.mjs → product-list.client-wCz1qcUY.mjs} +1 -1
- package/dist/client/{productDetail-B8aZ2mqY.mjs → productDetail-D9-fCY6c.mjs} +3 -3
- package/dist/client/{productList-BuLemmod.mjs → productList-PJyxXSac.mjs} +3 -3
- package/dist/client/{propsDecoder-0Unsqn3R.mjs → propsDecoder-B8lrKGPw.mjs} +4 -2
- package/dist/client/{registry.server-DzvtVVD0.mjs → registry.server-CI63JVHW.mjs} +2444 -1078
- package/dist/client/rendering/client.mjs +32 -28
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +5 -5
- package/dist/client/{richText-coerce-Bnng7JFA.mjs → richText-coerce-Jt9hDHdh.mjs} +2 -2
- package/dist/client/{routeIslandApiConfig-BGfcc9sk.mjs → routeIslandApiConfig-ZSPcJWx1.mjs} +1 -1
- package/dist/client/runtimeResponse-DlPBWBd9.mjs +3 -0
- package/dist/client/{runtimeResponse-DAPVRToN.mjs → runtimeResponse-_iW9oEYc.mjs} +1 -1
- package/dist/client/{shop-GuMqnDL-.mjs → shop-CbdJlWOw.mjs} +3 -3
- package/dist/client/{shop-commerce-D5bDY1o1.mjs → shop-commerce-BqLbzUUn.mjs} +47 -28
- package/dist/client/{shop-commerce-store-B7sHnLwI.mjs → shop-commerce-store-BT0-zRqN.mjs} +1 -1
- package/dist/client/{shop-discount-apply.state-Dos2zdC2.mjs → shop-discount-apply.state-Cws0lnSb.mjs} +2 -2
- package/dist/client/{shop.client-uvj5GDZb.mjs → shop.client-0cNErhJT.mjs} +54 -24
- package/dist/client/{shopShared-3giNWE3H.mjs → shopShared-COuQ2MhQ.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/{src-CmXh3JWs.mjs → src-Do_s2lqH.mjs} +11 -18
- package/dist/client/{timetableModel-GA-hn1qM.mjs → timetableModel-DqI6U1BS.mjs} +11 -8
- package/dist/client/{urlParams-C2QHo1Pa.mjs → useAutomaticDiscountPreview-CeVUVzGf.mjs} +44 -1
- package/dist/client/{useAvailableSlots-CBneCxbG.mjs → useAvailableSlots-B0mjVhZr.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-D0kGF0C7.mjs → useDiscountCodeUi-B_hfgdAP.mjs} +6 -2
- package/dist/client/{useEventPagination-xX8n_Tuu.mjs → useEventPagination-Ct4A6iR1.mjs} +14 -16
- package/dist/client/{view-DOyZc-DF.mjs → view-Cj151w4m.mjs} +24 -9
- package/dist/client/{wizardSteps-B952ify5.mjs → wizardSteps-B3gsXNnb.mjs} +283 -222
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-aRJjq4x8.mjs → EventEmbeddedCheckoutStep-CVy9oapv.mjs} +1 -1
- package/dist/preview-next/client/{LocationPickerEnvironment-BW3dRFIv.mjs → LocationPickerEnvironment-DuRUwUrK.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-Db9BHyXh.mjs → MapLibreEditMap-CdSDYBq9.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-BI3UCdpu.mjs → PageSectionToolbar-Dv4CW0AQ.mjs} +952 -138
- package/dist/preview-next/client/{PreviewEditorSidebar-jkfLVOgY.mjs → PreviewEditorSidebar-B7WW58uE.mjs} +4774 -2040
- package/dist/preview-next/client/{PreviewEditorUI-DwJQs4hM.mjs → PreviewEditorUI-BnJ1ughv.mjs} +71 -47
- package/dist/preview-next/client/{PreviewShell-BAxAkuz8.mjs → PreviewShell-C7qWzAe4.mjs} +72 -40
- package/dist/preview-next/client/{SdkPreviewModeRuntime-0UVB-39f.mjs → SdkPreviewModeRuntime-CYi4UHtG.mjs} +135 -30
- package/dist/preview-next/client/{ThemedButton-CVYz7h68.mjs → ThemedButton-CRgbU75r.mjs} +799 -17
- package/dist/preview-next/client/{lucide-react-00FF_oar.mjs → lucide-react-B4c6U3ZU.mjs} +11 -1
- package/dist/preview-next/client/{previewAssistantSlot-BgiYk3PB.mjs → previewAssistantSlot-DrUoRNu9.mjs} +24203 -9291
- package/dist/preview-next/client/{previewChromeRoot-tieNdF3E.mjs → previewChromeRoot-CEYp90mM.mjs} +3 -90
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-DXb_Evl0.mjs → sdk-runtime-DnO2_c0A.mjs} +2 -2
- package/dist/preview-next/client/{siteStyleAccess-BlN0jt2c.mjs → siteStyleAccess-B3PwHw2z.mjs} +46 -11
- package/dist/preview-next/client/{useAutosaveStatus-BUEPA4oL.mjs → useAutosaveStatus-DrdQ4ier.mjs} +49 -3
- package/dist/preview-next/client/{useOpenBlockForSetup-BVfr5P--.mjs → useOpenBlockForSetup-kuGRKaRL.mjs} +2008 -448
- package/dist/preview-next/container-responsive.css +469 -2
- package/dist/preview-next/editor-chrome.css +23 -2
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-BHTBA48n.mjs → route-contract-CwrXkLT3.mjs} +177 -43
- package/dist/server/{Block.shared-hGoyEdjJ.mjs → Block.shared-C5ucphCJ.mjs} +5 -5
- package/dist/server/{ThemeScopeCore-BfUCTOwj.mjs → ThemeScopeCore-DvbqYXdK.mjs} +46 -10
- package/dist/server/{accessibleSurfaces-Dskni4Xj.mjs → accessibleSurfaces-CAcf1lHT.mjs} +732 -176
- package/dist/server/{accordions-By_0Ykks.mjs → accordions-DjcsqjCK.mjs} +1 -1
- package/dist/server/{bindings-DMJH4bvo.mjs → bindings-CFw4M-gZ.mjs} +69 -248
- package/dist/server/{client-DrwlRNAH.mjs → client-D0XCgITW.mjs} +488 -119
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{constants-CeMywaiD.mjs → constants-BZduY8jG.mjs} +31 -8
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/index.mjs +4 -4
- package/dist/server/{loadContent-D0prFflT.mjs → loadContent-C-qyB8Tq.mjs} +11 -10
- package/dist/server/{loadPage-CBLke9pJ.mjs → loadPage-BpKKmi8E.mjs} +3 -3
- package/dist/server/lookMediaFrame-EFws7tAj.mjs +31835 -0
- package/dist/server/manifest.mjs +2 -2
- package/dist/server/{navigation-wrcuWmgp.mjs → navigation-DYkuiNXa.mjs} +1 -1
- package/dist/server/navigation.mjs +1 -1
- package/dist/server/next.mjs +9 -9
- package/dist/server/{overrideResolution-DUgCEH8z.mjs → overrideResolution-DmZn4xUE.mjs} +1 -1
- package/dist/server/page-converter.mjs +18 -5
- package/dist/server/{pageRenderPlan-BHrmogsW.mjs → pageRenderPlan-DRB7cUZ0.mjs} +674 -298
- package/dist/server/{pageRuntimeSupport-D2-YMRei.mjs → pageRuntimeSupport-Uv1xDieJ.mjs} +13 -6
- package/dist/server/{pageShared-CG8O31Eo.mjs → pageShared-BdQF875z.mjs} +911 -516
- package/dist/server/{parseThemeForPersistence-CrPlbJEN.mjs → parseThemeForPersistence-CwcWZL7u.mjs} +3 -3
- package/dist/server/{portal-pG_uhsI2.mjs → portal-BQ8qiQnk.mjs} +22 -2
- package/dist/server/portal.mjs +3 -3
- package/dist/server/{prebuild-C8Amvzce.mjs → prebuild-B51QZVNe.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-BxUETRIZ.mjs → prefetchBlockData-CppDAfJW.mjs} +4 -4
- package/dist/server/{registry-Cc88-23f.mjs → registry-Bf4W8Qa7.mjs} +7585 -24378
- 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 -10
- package/dist/server/{resolveBlockData-OG3KOkig.mjs → resolveBlockData-DMHAZooQ.mjs} +2 -2
- package/dist/server/{expandPalette-ehuW8r2g.mjs → resolveButtonColourStates-BMtAAPzp.mjs} +1670 -1346
- package/dist/server/{responseMedia-IfH65QAH.mjs → responseMedia-DKYfR518.mjs} +1 -1
- package/dist/server/{schema-CwfxQjc4.mjs → schema-DGaihVwp.mjs} +300 -29
- package/dist/server/server.mjs +3 -3
- package/dist/server/{servicePageContent-BcFuhhD7.mjs → servicePageContent-CRvmreX7.mjs} +40 -16
- package/dist/server/theme-bridge.mjs +5 -4
- package/dist/server/theme.mjs +2 -2
- package/dist/server/{three-pass-converter-DPaUPTfl.mjs → three-pass-converter-mcy2E1Yd.mjs} +2 -2
- package/dist/server/{titleSourceSchema-NhK6azFS.mjs → titleSourceSchema-B2qFOUwZ.mjs} +4 -5
- package/dist/server/{typeGuards-CTW_9AXq.mjs → typeGuards-DZOaGTEv.mjs} +126 -126
- package/dist/server/{types-BKaBZFjD.mjs → types-C_S0pWbR.mjs} +487 -9
- package/dist/server/{validation-BovmbS8N.mjs → validation-CUtNT_EZ.mjs} +14 -10
- package/dist/server/{version-hws4hgyX.mjs → version-DebJQ4zn.mjs} +1 -1
- package/dist/server/{video-Cdr3wh-q.mjs → video-DBaeSawZ.mjs} +1 -1
- package/dist/styles/index.css +2987 -168
- package/package.json +1 -1
- package/dist/client/gifting.parts-Bak93gD2.mjs +0 -86
- package/dist/client/runtimeResponse-nXT8VAMl.mjs +0 -3
- package/dist/client/types-BEaKfam_.mjs +0 -778
- package/dist/server/customCss-C9kgPHvr.mjs +0 -247
- package/dist/server/lookMediaFrame-H0fi4bJk.mjs +0 -2701
- package/dist/server/media-gvfIw3z8.mjs +0 -216
|
@@ -86,9 +86,16 @@ const PALETTE_TOKEN_NAMES = [
|
|
|
86
86
|
"border"
|
|
87
87
|
];
|
|
88
88
|
const paletteTokenNameSchema = z.enum(PALETTE_TOKEN_NAMES);
|
|
89
|
+
/** Fixed solver endpoints, distinct from the palette-local legacy `white`. Not picker options. */
|
|
90
|
+
const absoluteInkColors = {
|
|
91
|
+
absoluteBlack: "#000000",
|
|
92
|
+
absoluteWhite: "#ffffff"
|
|
93
|
+
};
|
|
89
94
|
const themeColorBaseTokenNames = [
|
|
90
95
|
...PALETTE_TOKEN_NAMES,
|
|
91
96
|
...blockColorTokenNames,
|
|
97
|
+
"absoluteBlack",
|
|
98
|
+
"absoluteWhite",
|
|
92
99
|
"white",
|
|
93
100
|
"neutral",
|
|
94
101
|
"primaryText",
|
|
@@ -116,7 +123,7 @@ function isKnownShadeToken(value) {
|
|
|
116
123
|
const match = value.match(/^([a-zA-Z][a-zA-Z0-9]*)(?:-([0-9]{2,3}))$/);
|
|
117
124
|
if (!match) return false;
|
|
118
125
|
const [, base, shade] = match;
|
|
119
|
-
return Boolean(base && shade && isKnownBaseToken(base) && shadeStepSet.has(shade));
|
|
126
|
+
return Boolean(base && shade && isKnownBaseToken(base) && !(base in absoluteInkColors) && shadeStepSet.has(shade));
|
|
120
127
|
}
|
|
121
128
|
function isThemeColorTokenBase(value) {
|
|
122
129
|
return isKnownBaseToken(value) || isKnownShadeToken(value);
|
|
@@ -629,6 +636,398 @@ const letterSpacingSchema = z.enum([
|
|
|
629
636
|
"wide"
|
|
630
637
|
]);
|
|
631
638
|
//#endregion
|
|
639
|
+
//#region ../site-contracts/src/theme/buttonParts.ts
|
|
640
|
+
/**
|
|
641
|
+
* Button parts: what a recipe may draw beyond the button's own box.
|
|
642
|
+
*
|
|
643
|
+
* A recipe state can dress four parts: the button itself (`self`), its label
|
|
644
|
+
* span (`label`), and the two pseudo-elements (`before`, `after`). Each part is
|
|
645
|
+
* a map of CSS declarations from a closed property list. Values are written in
|
|
646
|
+
* a small closed grammar: numbers with units, a fixed list of keywords and
|
|
647
|
+
* functions, and paint placeholders. No colour can be written literally, so
|
|
648
|
+
* every colour a part paints comes from the button's resolved state colours,
|
|
649
|
+
* the surface's mark colour or a named palette token.
|
|
650
|
+
*
|
|
651
|
+
* Placeholders:
|
|
652
|
+
* {ink} the label colour of whichever state is showing
|
|
653
|
+
* {ink:hover} the resolved label colour of a named state
|
|
654
|
+
* {fill:hover} the resolved fill of a named state (transparent for a surface treatment)
|
|
655
|
+
* {token:accent} a palette colour, for decoration only
|
|
656
|
+
* {mark} the surface's mark colour (falls back to the accent)
|
|
657
|
+
* {label} the button's label text, for `content`
|
|
658
|
+
* {shape:Name} a mask shape from the button shape registry
|
|
659
|
+
* {key:name} one of the variant's declared keyframes
|
|
660
|
+
*/
|
|
661
|
+
const BUTTON_PART_NAMES = [
|
|
662
|
+
"self",
|
|
663
|
+
"label",
|
|
664
|
+
"before",
|
|
665
|
+
"after"
|
|
666
|
+
];
|
|
667
|
+
const MOTION_PROPERTIES = [
|
|
668
|
+
"transform",
|
|
669
|
+
"transform-origin",
|
|
670
|
+
"translate",
|
|
671
|
+
"rotate",
|
|
672
|
+
"scale",
|
|
673
|
+
"opacity",
|
|
674
|
+
"transition",
|
|
675
|
+
"animation",
|
|
676
|
+
"filter"
|
|
677
|
+
];
|
|
678
|
+
const BOX_PROPERTIES = [
|
|
679
|
+
"position",
|
|
680
|
+
"inset",
|
|
681
|
+
"top",
|
|
682
|
+
"right",
|
|
683
|
+
"bottom",
|
|
684
|
+
"left",
|
|
685
|
+
"width",
|
|
686
|
+
"height",
|
|
687
|
+
"min-width",
|
|
688
|
+
"min-height",
|
|
689
|
+
"margin",
|
|
690
|
+
"margin-inline-start",
|
|
691
|
+
"margin-inline-end",
|
|
692
|
+
"padding",
|
|
693
|
+
"padding-bottom",
|
|
694
|
+
"display",
|
|
695
|
+
"align-items",
|
|
696
|
+
"align-self",
|
|
697
|
+
"justify-content",
|
|
698
|
+
"flex",
|
|
699
|
+
"z-index",
|
|
700
|
+
"overflow",
|
|
701
|
+
"pointer-events",
|
|
702
|
+
"clip-path",
|
|
703
|
+
"border-radius",
|
|
704
|
+
"background",
|
|
705
|
+
"background-color",
|
|
706
|
+
"background-image",
|
|
707
|
+
"background-size",
|
|
708
|
+
"background-position",
|
|
709
|
+
"background-repeat",
|
|
710
|
+
"box-shadow",
|
|
711
|
+
"mask",
|
|
712
|
+
"mask-position",
|
|
713
|
+
"mask-composite",
|
|
714
|
+
"backdrop-filter",
|
|
715
|
+
"color",
|
|
716
|
+
"white-space",
|
|
717
|
+
"text-shadow"
|
|
718
|
+
];
|
|
719
|
+
const BUTTON_PART_PROPERTIES = {
|
|
720
|
+
self: [
|
|
721
|
+
...MOTION_PROPERTIES,
|
|
722
|
+
"position",
|
|
723
|
+
"isolation",
|
|
724
|
+
"overflow",
|
|
725
|
+
"backdrop-filter",
|
|
726
|
+
"text-shadow",
|
|
727
|
+
"letter-spacing",
|
|
728
|
+
"font-variant-caps",
|
|
729
|
+
"font-stretch",
|
|
730
|
+
"white-space",
|
|
731
|
+
"line-height",
|
|
732
|
+
"min-height",
|
|
733
|
+
"gap",
|
|
734
|
+
"text-decoration-line",
|
|
735
|
+
"text-decoration-thickness",
|
|
736
|
+
"text-underline-offset"
|
|
737
|
+
],
|
|
738
|
+
label: [
|
|
739
|
+
...MOTION_PROPERTIES,
|
|
740
|
+
...BOX_PROPERTIES,
|
|
741
|
+
"word-spacing"
|
|
742
|
+
],
|
|
743
|
+
before: [
|
|
744
|
+
...MOTION_PROPERTIES,
|
|
745
|
+
...BOX_PROPERTIES,
|
|
746
|
+
"content"
|
|
747
|
+
],
|
|
748
|
+
after: [
|
|
749
|
+
...MOTION_PROPERTIES,
|
|
750
|
+
...BOX_PROPERTIES,
|
|
751
|
+
"content"
|
|
752
|
+
]
|
|
753
|
+
};
|
|
754
|
+
const KEYFRAME_PROPERTIES = [
|
|
755
|
+
"transform",
|
|
756
|
+
"translate",
|
|
757
|
+
"rotate",
|
|
758
|
+
"scale",
|
|
759
|
+
"opacity",
|
|
760
|
+
"border-radius",
|
|
761
|
+
"clip-path",
|
|
762
|
+
"background-position",
|
|
763
|
+
"background-size",
|
|
764
|
+
"mask-position",
|
|
765
|
+
"filter",
|
|
766
|
+
"animation-timing-function"
|
|
767
|
+
];
|
|
768
|
+
const UNITS = [
|
|
769
|
+
"",
|
|
770
|
+
"px",
|
|
771
|
+
"em",
|
|
772
|
+
"rem",
|
|
773
|
+
"%",
|
|
774
|
+
"ms",
|
|
775
|
+
"s",
|
|
776
|
+
"deg",
|
|
777
|
+
"fr"
|
|
778
|
+
];
|
|
779
|
+
/** Every bare word a value may contain. Colour names are deliberately absent. */
|
|
780
|
+
const KEYWORDS = /* @__PURE__ */ new Set([
|
|
781
|
+
"none",
|
|
782
|
+
"auto",
|
|
783
|
+
"inherit",
|
|
784
|
+
"initial",
|
|
785
|
+
"normal",
|
|
786
|
+
"absolute",
|
|
787
|
+
"relative",
|
|
788
|
+
"static",
|
|
789
|
+
"hidden",
|
|
790
|
+
"visible",
|
|
791
|
+
"isolate",
|
|
792
|
+
"block",
|
|
793
|
+
"inline-block",
|
|
794
|
+
"inline-flex",
|
|
795
|
+
"flex",
|
|
796
|
+
"grid",
|
|
797
|
+
"center",
|
|
798
|
+
"stretch",
|
|
799
|
+
"flex-start",
|
|
800
|
+
"flex-end",
|
|
801
|
+
"start",
|
|
802
|
+
"end",
|
|
803
|
+
"nowrap",
|
|
804
|
+
"underline",
|
|
805
|
+
"transparent",
|
|
806
|
+
"top",
|
|
807
|
+
"right",
|
|
808
|
+
"bottom",
|
|
809
|
+
"left",
|
|
810
|
+
"no-repeat",
|
|
811
|
+
"repeat-x",
|
|
812
|
+
"repeat-y",
|
|
813
|
+
"repeat",
|
|
814
|
+
"content-box",
|
|
815
|
+
"border-box",
|
|
816
|
+
"padding-box",
|
|
817
|
+
"exclude",
|
|
818
|
+
"cover",
|
|
819
|
+
"contain",
|
|
820
|
+
"to",
|
|
821
|
+
"from",
|
|
822
|
+
"at",
|
|
823
|
+
"in",
|
|
824
|
+
"srgb",
|
|
825
|
+
"oklab",
|
|
826
|
+
"circle",
|
|
827
|
+
"closest-side",
|
|
828
|
+
"farthest-side",
|
|
829
|
+
"all",
|
|
830
|
+
"ease",
|
|
831
|
+
"ease-in",
|
|
832
|
+
"ease-out",
|
|
833
|
+
"ease-in-out",
|
|
834
|
+
"linear",
|
|
835
|
+
"step-end",
|
|
836
|
+
"step-start",
|
|
837
|
+
"infinite",
|
|
838
|
+
"alternate",
|
|
839
|
+
"both",
|
|
840
|
+
"forwards",
|
|
841
|
+
"backwards",
|
|
842
|
+
"all-small-caps",
|
|
843
|
+
"small-caps",
|
|
844
|
+
"transform",
|
|
845
|
+
"translate",
|
|
846
|
+
"rotate",
|
|
847
|
+
"scale",
|
|
848
|
+
"opacity",
|
|
849
|
+
"filter",
|
|
850
|
+
"clip-path",
|
|
851
|
+
"inset",
|
|
852
|
+
"color",
|
|
853
|
+
"background-color",
|
|
854
|
+
"background-size",
|
|
855
|
+
"background-position",
|
|
856
|
+
"box-shadow",
|
|
857
|
+
"border-radius",
|
|
858
|
+
"text-shadow",
|
|
859
|
+
"width",
|
|
860
|
+
"height",
|
|
861
|
+
"bottom",
|
|
862
|
+
"mask-position",
|
|
863
|
+
"backdrop-filter",
|
|
864
|
+
"text-decoration-thickness",
|
|
865
|
+
"text-underline-offset",
|
|
866
|
+
"calc",
|
|
867
|
+
"translateX",
|
|
868
|
+
"translateY",
|
|
869
|
+
"scaleX",
|
|
870
|
+
"scaleY",
|
|
871
|
+
"skewX",
|
|
872
|
+
"polygon",
|
|
873
|
+
"cubic-bezier",
|
|
874
|
+
"steps",
|
|
875
|
+
"linear-gradient",
|
|
876
|
+
"radial-gradient",
|
|
877
|
+
"repeating-linear-gradient",
|
|
878
|
+
"repeating-conic-gradient",
|
|
879
|
+
"conic-gradient",
|
|
880
|
+
"color-mix",
|
|
881
|
+
"blur",
|
|
882
|
+
"brightness",
|
|
883
|
+
"saturate"
|
|
884
|
+
]);
|
|
885
|
+
/**
|
|
886
|
+
* The mask shapes a part may name with `{shape:Name}`: the affordance icons and
|
|
887
|
+
* the filled shapes. theme-core draws them (`buttonShapeMaskUrl`), and its tests
|
|
888
|
+
* check that every name here has a drawing.
|
|
889
|
+
*/
|
|
890
|
+
const BUTTON_SHAPE_IDS = [
|
|
891
|
+
"ArrowRight",
|
|
892
|
+
"ArrowLeft",
|
|
893
|
+
"ChevronRight",
|
|
894
|
+
"ChevronLeft",
|
|
895
|
+
"ChevronDown",
|
|
896
|
+
"ArrowUpRight",
|
|
897
|
+
"Wave"
|
|
898
|
+
];
|
|
899
|
+
function isButtonShapeId(value) {
|
|
900
|
+
return value !== void 0 && BUTTON_SHAPE_IDS.includes(value);
|
|
901
|
+
}
|
|
902
|
+
const PAINT_STATES = [
|
|
903
|
+
"base",
|
|
904
|
+
"hover",
|
|
905
|
+
"active",
|
|
906
|
+
"disabled"
|
|
907
|
+
];
|
|
908
|
+
const TOKEN_PATTERN = /\{[^{}]*\}|-?(?:\d+\.?\d*|\.\d+)[a-z%]*|[a-zA-Z][a-zA-Z0-9-]*|[ ,()/+*-]/g;
|
|
909
|
+
const NUMBER_PATTERN = /^-?(?:\d+\.?\d*|\.\d+)([a-z%]*)$/;
|
|
910
|
+
const NAME_PATTERN = /^[a-z][a-z0-9-]{0,39}$/;
|
|
911
|
+
function isPaintState(value) {
|
|
912
|
+
return value !== void 0 && PAINT_STATES.includes(value);
|
|
913
|
+
}
|
|
914
|
+
function opaqueToken(argument) {
|
|
915
|
+
const token = parseThemeColorToken(argument);
|
|
916
|
+
if (token === null) return null;
|
|
917
|
+
const parts = parseColorTokenParts(token);
|
|
918
|
+
return parts.kind === "token" && parts.opacityPercent === null ? token : null;
|
|
919
|
+
}
|
|
920
|
+
function bare(token) {
|
|
921
|
+
return (argument) => argument === void 0 ? token : null;
|
|
922
|
+
}
|
|
923
|
+
/** One parser per placeholder kind; each is handed the text after the colon, if any. */
|
|
924
|
+
const PLACEHOLDERS = {
|
|
925
|
+
ink: (argument) => argument === void 0 ? {
|
|
926
|
+
kind: "ink",
|
|
927
|
+
state: null
|
|
928
|
+
} : isPaintState(argument) ? {
|
|
929
|
+
kind: "ink",
|
|
930
|
+
state: argument
|
|
931
|
+
} : null,
|
|
932
|
+
fill: (argument) => isPaintState(argument) ? {
|
|
933
|
+
kind: "fill",
|
|
934
|
+
state: argument
|
|
935
|
+
} : null,
|
|
936
|
+
token: (argument) => {
|
|
937
|
+
const token = opaqueToken(argument);
|
|
938
|
+
return token === null ? null : {
|
|
939
|
+
kind: "token",
|
|
940
|
+
token
|
|
941
|
+
};
|
|
942
|
+
},
|
|
943
|
+
mark: bare({ kind: "mark" }),
|
|
944
|
+
label: bare({ kind: "label" }),
|
|
945
|
+
shape: (argument) => isButtonShapeId(argument) ? {
|
|
946
|
+
kind: "shape",
|
|
947
|
+
id: argument
|
|
948
|
+
} : null,
|
|
949
|
+
key: (argument) => argument !== void 0 && NAME_PATTERN.test(argument) ? {
|
|
950
|
+
kind: "key",
|
|
951
|
+
name: argument
|
|
952
|
+
} : null
|
|
953
|
+
};
|
|
954
|
+
function parsePlaceholder(body) {
|
|
955
|
+
const [kind = "", argument, ...rest] = body.split(":");
|
|
956
|
+
const parse = Object.prototype.hasOwnProperty.call(PLACEHOLDERS, kind) ? PLACEHOLDERS[kind] : void 0;
|
|
957
|
+
return rest.length > 0 || parse === void 0 ? null : parse(argument);
|
|
958
|
+
}
|
|
959
|
+
function isAllowedWord(text) {
|
|
960
|
+
const number = NUMBER_PATTERN.exec(text);
|
|
961
|
+
if (number) return UNITS.includes(number[1] ?? "");
|
|
962
|
+
return !/^[a-zA-Z]/.test(text) || KEYWORDS.has(text);
|
|
963
|
+
}
|
|
964
|
+
function parsePiece(text) {
|
|
965
|
+
if (text.startsWith("{")) return parsePlaceholder(text.slice(1, -1));
|
|
966
|
+
return isAllowedWord(text) ? {
|
|
967
|
+
kind: "text",
|
|
968
|
+
text
|
|
969
|
+
} : null;
|
|
970
|
+
}
|
|
971
|
+
/** Every bracket closes one that was opened, and none is left open: an unclosed one would swallow the `;` and `}` after it. */
|
|
972
|
+
function hasBalancedBrackets(pieces) {
|
|
973
|
+
return pieces.reduce((open, piece) => open < 0 ? open : piece === "(" ? open + 1 : piece === ")" ? open - 1 : open, 0) === 0;
|
|
974
|
+
}
|
|
975
|
+
/** Split a part value into literal text and placeholders; null when it leaves the grammar. */
|
|
976
|
+
function parseButtonPartValue(value) {
|
|
977
|
+
if (value.length === 0 || value.length > 400) return null;
|
|
978
|
+
if (value.includes("/*") || value.includes("*/")) return null;
|
|
979
|
+
const pieces = [...value.matchAll(TOKEN_PATTERN)].map((match) => match[0]);
|
|
980
|
+
if (pieces.join("") !== value || !hasBalancedBrackets(pieces)) return null;
|
|
981
|
+
const tokens = pieces.map(parsePiece);
|
|
982
|
+
return tokens.every((token) => token !== null) ? tokens : null;
|
|
983
|
+
}
|
|
984
|
+
const partValueSchema = z.string().refine((value) => parseButtonPartValue(value) !== null, { message: "Button part values use numbers, the listed keywords and paint placeholders only" });
|
|
985
|
+
function declarationsSchema(properties) {
|
|
986
|
+
return z.record(z.string(), partValueSchema).superRefine((declarations, ctx) => {
|
|
987
|
+
Object.entries(declarations).forEach(([property, value]) => {
|
|
988
|
+
if (!properties.includes(property)) {
|
|
989
|
+
ctx.addIssue({
|
|
990
|
+
code: "custom",
|
|
991
|
+
path: [property],
|
|
992
|
+
message: `"${property}" is not a property this button part may set`
|
|
993
|
+
});
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
996
|
+
if ((parseButtonPartValue(value)?.some((token) => token.kind === "label") ?? false) !== (property === "content")) ctx.addIssue({
|
|
997
|
+
code: "custom",
|
|
998
|
+
path: [property],
|
|
999
|
+
message: "`content` takes {label}, and nothing else does"
|
|
1000
|
+
});
|
|
1001
|
+
});
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
const buttonPartsSchema = z.strictObject({
|
|
1005
|
+
self: declarationsSchema(BUTTON_PART_PROPERTIES.self).optional(),
|
|
1006
|
+
label: declarationsSchema(BUTTON_PART_PROPERTIES.label).optional(),
|
|
1007
|
+
before: declarationsSchema(BUTTON_PART_PROPERTIES.before).optional(),
|
|
1008
|
+
after: declarationsSchema(BUTTON_PART_PROPERTIES.after).optional()
|
|
1009
|
+
});
|
|
1010
|
+
/** One layer of a state's box-shadow. Lengths are pixels; `paint` is a part value. */
|
|
1011
|
+
const buttonShadowLayerSchema = z.strictObject({
|
|
1012
|
+
inset: z.literal(true).optional(),
|
|
1013
|
+
x: z.number().finite().min(-64).max(64),
|
|
1014
|
+
y: z.number().finite().min(-64).max(64),
|
|
1015
|
+
blur: z.number().finite().min(0).max(96),
|
|
1016
|
+
spread: z.number().finite().min(-48).max(48),
|
|
1017
|
+
paint: partValueSchema
|
|
1018
|
+
});
|
|
1019
|
+
/** Named keyframes a variant's parts may run, e.g. `animation: {key:sweep} 900ms ease 1 both`. */
|
|
1020
|
+
const buttonKeyframesSchema = z.record(z.string().regex(NAME_PATTERN), z.record(z.string().regex(/^(?:from|to|\d{1,3}(?:\.\d{1,2})?%)$/), declarationsSchema(KEYFRAME_PROPERTIES)));
|
|
1021
|
+
/**
|
|
1022
|
+
* A free border radius: one to four lengths or percentages, optionally a
|
|
1023
|
+
* second set after a slash. Tailwind radius tokens stay valid beside it.
|
|
1024
|
+
*/
|
|
1025
|
+
const RADIUS_LENGTH = String.raw`(?:0|\d+(?:\.\d+)?(?:px|rem|em|%))`;
|
|
1026
|
+
const FREE_RADIUS_PATTERN = new RegExp(String.raw`^${RADIUS_LENGTH}(?: ${RADIUS_LENGTH}){0,3}(?: \/ ${RADIUS_LENGTH}(?: ${RADIUS_LENGTH}){0,3})?$`);
|
|
1027
|
+
function isFreeButtonRadius(value) {
|
|
1028
|
+
return FREE_RADIUS_PATTERN.test(value);
|
|
1029
|
+
}
|
|
1030
|
+
//#endregion
|
|
632
1031
|
//#region ../site-contracts/src/theme/buttons.ts
|
|
633
1032
|
/**
|
|
634
1033
|
* Canonical persisted/CSS-safe button variant identifier.
|
|
@@ -810,10 +1209,25 @@ const prioritySchema = z.union([
|
|
|
810
1209
|
z.literal(2),
|
|
811
1210
|
z.literal(3)
|
|
812
1211
|
]);
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
1212
|
+
/**
|
|
1213
|
+
* What a role becomes on a ground where its own colours fail.
|
|
1214
|
+
* `surface-outline` is an outline in the ground's ink that fills on hover.
|
|
1215
|
+
* `surface-solid` is its mirror: filled with the ground's ink. Its hover either
|
|
1216
|
+
* keeps that fill (`steady`, for a button whose hover is movement or decoration)
|
|
1217
|
+
* or takes the ground's own colour (`swap`, for a button whose hover is a change
|
|
1218
|
+
* of fill). Both kinds use the surface's checked colour pair.
|
|
1219
|
+
*/
|
|
1220
|
+
const buttonSurfaceFallbackSchema = z.discriminatedUnion("kind", [
|
|
1221
|
+
z.strictObject({ kind: z.literal("surface-outline") }),
|
|
1222
|
+
z.strictObject({
|
|
1223
|
+
kind: z.literal("surface-solid"),
|
|
1224
|
+
hover: z.enum(["steady", "swap"])
|
|
1225
|
+
}),
|
|
1226
|
+
z.strictObject({
|
|
1227
|
+
kind: z.literal("variant"),
|
|
1228
|
+
role: variantRoleSchema
|
|
1229
|
+
})
|
|
1230
|
+
]);
|
|
817
1231
|
const buttonSurfacePolicyShape = Object.fromEntries(VARIANT_ROLES.map((role) => [role, z.array(buttonSurfaceFallbackSchema).max(VARIANT_ROLES.length)]));
|
|
818
1232
|
const buttonSurfacePolicySchema = z.strictObject(buttonSurfacePolicyShape);
|
|
819
1233
|
/**
|
|
@@ -956,9 +1370,13 @@ const buttonVisualAppearanceSchema = z.strictObject({
|
|
|
956
1370
|
}),
|
|
957
1371
|
effects: z.array(buttonEffectApplicationSchema),
|
|
958
1372
|
transform: z.literal("none").optional(),
|
|
959
|
-
contextualHover: contextualButtonHoverSchema.optional()
|
|
1373
|
+
contextualHover: contextualButtonHoverSchema.optional(),
|
|
1374
|
+
/** The state's whole box-shadow, as layers. `shadow` stays flat beside it. */
|
|
1375
|
+
shadowLayers: z.array(buttonShadowLayerSchema).max(4).optional(),
|
|
1376
|
+
/** Declarations for the button, its label span and its two pseudo-elements. See buttonParts.ts. */
|
|
1377
|
+
parts: buttonPartsSchema.optional()
|
|
960
1378
|
});
|
|
961
|
-
const
|
|
1379
|
+
const buttonVisualStatesObjectSchema = z.strictObject({
|
|
962
1380
|
base: buttonVisualAppearanceSchema.extend({ shadow: variantShadowSchema }),
|
|
963
1381
|
hover: buttonVisualAppearanceSchema.extend({ shadow: variantShadowSchema }),
|
|
964
1382
|
focus: buttonVisualAppearanceSchema.extend({
|
|
@@ -972,6 +1390,46 @@ const buttonVisualStatesSchema = z.strictObject({
|
|
|
972
1390
|
active: buttonVisualAppearanceSchema.extend({ shadow: variantShadowSchema }),
|
|
973
1391
|
disabled: buttonVisualAppearanceSchema.extend({ shadow: variantShadowSchema })
|
|
974
1392
|
});
|
|
1393
|
+
const BUTTON_STATE_NAMES = [
|
|
1394
|
+
"base",
|
|
1395
|
+
"hover",
|
|
1396
|
+
"focus",
|
|
1397
|
+
"active",
|
|
1398
|
+
"disabled"
|
|
1399
|
+
];
|
|
1400
|
+
/**
|
|
1401
|
+
* Parts are explicit like everything else in a recipe: a part declared in one
|
|
1402
|
+
* state is declared in all five, with the same properties, so no state inherits
|
|
1403
|
+
* a value from another. Shadow layers replace the flat shadow; they never sit on top of one.
|
|
1404
|
+
*/
|
|
1405
|
+
const buttonVisualStatesSchema = buttonVisualStatesObjectSchema.superRefine((states, ctx) => {
|
|
1406
|
+
BUTTON_STATE_NAMES.forEach((state) => {
|
|
1407
|
+
const appearance = states[state];
|
|
1408
|
+
if (appearance.shadowLayers && appearance.shadow !== "focus-indicator" && appearance.shadow.elevation !== "none") ctx.addIssue({
|
|
1409
|
+
code: "custom",
|
|
1410
|
+
path: [state, "shadowLayers"],
|
|
1411
|
+
message: "A state with shadow layers declares a flat `shadow`"
|
|
1412
|
+
});
|
|
1413
|
+
});
|
|
1414
|
+
BUTTON_PART_NAMES.forEach((part) => {
|
|
1415
|
+
const keys = (state) => {
|
|
1416
|
+
const declarations = states[state].parts?.[part];
|
|
1417
|
+
return declarations === void 0 ? null : Object.keys(declarations).sort().join(" ");
|
|
1418
|
+
};
|
|
1419
|
+
const base = keys("base");
|
|
1420
|
+
BUTTON_STATE_NAMES.forEach((state) => {
|
|
1421
|
+
if (keys(state) !== base) ctx.addIssue({
|
|
1422
|
+
code: "custom",
|
|
1423
|
+
path: [
|
|
1424
|
+
state,
|
|
1425
|
+
"parts",
|
|
1426
|
+
part
|
|
1427
|
+
],
|
|
1428
|
+
message: `The ${part} part must declare the same properties in every state`
|
|
1429
|
+
});
|
|
1430
|
+
});
|
|
1431
|
+
});
|
|
1432
|
+
});
|
|
975
1433
|
const variantEffectsSchema = z.strictObject({
|
|
976
1434
|
base: z.array(buttonEffectApplicationSchema).optional(),
|
|
977
1435
|
hover: z.array(buttonEffectApplicationSchema).optional(),
|
|
@@ -1012,7 +1470,27 @@ const buttonVariantSchema = z.strictObject({
|
|
|
1012
1470
|
contextualHover: contextualButtonHoverSchema.optional(),
|
|
1013
1471
|
effects: variantEffectsSchema.optional(),
|
|
1014
1472
|
sizes: variantSizeOverridesSchema.optional(),
|
|
1015
|
-
affordance: buttonVariantAffordanceSchema.optional()
|
|
1473
|
+
affordance: buttonVariantAffordanceSchema.optional(),
|
|
1474
|
+
keyframes: buttonKeyframesSchema.optional()
|
|
1475
|
+
}).superRefine((variant, ctx) => {
|
|
1476
|
+
const declared = Object.keys(variant.keyframes ?? {});
|
|
1477
|
+
BUTTON_STATE_NAMES.forEach((state) => {
|
|
1478
|
+
Object.entries(variant.visualStates?.[state].parts ?? {}).forEach(([part, declarations]) => {
|
|
1479
|
+
Object.entries(declarations ?? {}).forEach(([property, value]) => {
|
|
1480
|
+
(parseButtonPartValue(value) ?? []).flatMap((token) => token.kind === "key" && !declared.includes(token.name) ? [token.name] : []).forEach((name) => ctx.addIssue({
|
|
1481
|
+
code: "custom",
|
|
1482
|
+
path: [
|
|
1483
|
+
"visualStates",
|
|
1484
|
+
state,
|
|
1485
|
+
"parts",
|
|
1486
|
+
part,
|
|
1487
|
+
property
|
|
1488
|
+
],
|
|
1489
|
+
message: `No keyframes named "${name}" are declared for this variant`
|
|
1490
|
+
}));
|
|
1491
|
+
});
|
|
1492
|
+
});
|
|
1493
|
+
});
|
|
1016
1494
|
});
|
|
1017
1495
|
const buttonSystemSchema = z.strictObject({
|
|
1018
1496
|
global: buttonGlobalSettingsSchema,
|
|
@@ -1082,4 +1560,4 @@ const buttonSizeNameSchema = z.enum([
|
|
|
1082
1560
|
"xl"
|
|
1083
1561
|
]);
|
|
1084
1562
|
//#endregion
|
|
1085
|
-
export {
|
|
1563
|
+
export { parseColorTokenParts as $, surfaceInkDeclarations as A, CSS_LOADING_FUNCTIONS as B, SURFACE_INK_CSS_VARS as C, surfaceForegroundStyle as D, surfaceForegroundInputFromResolved as E, cssVarValue as F, blockColorTokenNames as G, staysInsideDeclaration as H, mergeStyles as I, normalizePaletteHex as J, hexColorSchema as K, rgbColorValue as L, surfaceInkValue as M, backgroundColorStyle as N, surfaceForegroundValue as O, borderColorStyle as P, paletteModeSchema as Q, textColorStyle as R, SURFACE_FOREGROUND_CSS_VARS as S, surfaceForegroundDeclarations as T, PALETTE_TOKEN_NAMES as U, callsCssLoadingFunction as V, absoluteInkColors as W, paletteColorsFromEntries as X, paletteColorEntries as Y, paletteColorsSchema as Z, isFreeButtonRadius as _, createStandardButtonSurfacePolicy as a, VARIANT_ROLES as b, buttonEffectApplicationSchema as c, buttonVariantIdSchema as d, parseThemeColorToken as et, buttonVisualStatesSchema as f, buttonKeyframesSchema as g, BUTTON_PART_NAMES as h, buttonSizeNameSchema as i, surfaceInkStyle as j, surfaceForegroundValueWithOpacity as k, buttonPressOffsetSchema as l, parseOpaqueButtonColourToken as m, STANDARD_BUTTON_SURFACE_POLICY as n, isVariantRole as o, opaqueButtonColourTokenSchema as p, isThemeColorToken as q, asSpecialVariantId as r, unsafeAsOpaqueButtonColourToken as s, DEFAULT_VARIANT_ALIAS_ID as t, themeColorTokenSchema as tt, buttonSystemSchema as u, parseButtonPartValue as v, completeSurfaceForegrounds as w, DEFAULT_SURFACE_TEXT_COLOR as x, SYSTEM_BLOCK_KINDS as y, textColorValue as z };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { f as builtinTransformDefinitions } from "./pageRenderPlan-
|
|
2
|
-
import {
|
|
3
|
-
import { c as SUPPORTED_LOADER_ENDPOINTS } from "./responseMedia-
|
|
4
|
-
import {
|
|
1
|
+
import { f as builtinTransformDefinitions } from "./pageRenderPlan-DRB7cUZ0.mjs";
|
|
2
|
+
import { Bo as blockEditingExtensionShape, Go as builtInBlockKindsSchema, Ko as fieldSchema, Uo as blockCategoryEnum, Wo as blockLookFieldShape, jo as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, ls as parseMailingListProviderScope, qo as validateManifestLookField, t as getBlockDefinition, zo as blockEditingDeclarationShape } from "./registry-Bf4W8Qa7.mjs";
|
|
3
|
+
import { c as SUPPORTED_LOADER_ENDPOINTS } from "./responseMedia-DKYfR518.mjs";
|
|
4
|
+
import { p as customBlockLayoutSchema } from "./typeGuards-DZOaGTEv.mjs";
|
|
5
5
|
import { r as footerModeSchema } from "./mode-bkFS8glh.mjs";
|
|
6
|
-
import { c as ALLOWED_NODE_TYPES_SET, i as customBlockLayoutSizeIssues, n as customBlockFieldDefaultIssues, r as customBlockLayoutPropIssues, t as titleSourceValueSchema, u as ALLOWED_TRANSFORM_IDS_SET } from "./titleSourceSchema-
|
|
6
|
+
import { c as ALLOWED_NODE_TYPES_SET, i as customBlockLayoutSizeIssues, n as customBlockFieldDefaultIssues, r as customBlockLayoutPropIssues, t as titleSourceValueSchema, u as ALLOWED_TRANSFORM_IDS_SET } from "./titleSourceSchema-B2qFOUwZ.mjs";
|
|
7
7
|
import { n as collectBookingReservedFieldCollisions, t as APPOINTMENT_BOOKING_BLOCK_ID } from "./booking-form.reserved-fields-Cqp13TKc.mjs";
|
|
8
|
-
import { t as SUPPORTED_LOADER_ENDPOINTS$1 } from "./prefetchBlockData-
|
|
8
|
+
import { t as SUPPORTED_LOADER_ENDPOINTS$1 } from "./prefetchBlockData-CppDAfJW.mjs";
|
|
9
9
|
import { n as BINDING_TRANSFORM_VALUES$1 } from "./bindings-DhmIW3Er.mjs";
|
|
10
10
|
import { t as SYSTEM_BLOCK_KINDS } from "./block-kinds-BCY9z3oB.mjs";
|
|
11
11
|
import { i as safeParseRouteTemplate, t as describeRouteTemplateParseError } from "./routeTemplate-AsKQwa47.mjs";
|
|
@@ -231,11 +231,13 @@ const sdkCustomBlockInputSchema = z.object({
|
|
|
231
231
|
dataLoaders: sdkDataLoadersSchema$1,
|
|
232
232
|
layout: z.optional(customBlockLayoutSchema),
|
|
233
233
|
...sdkBlockPresentationShape,
|
|
234
|
-
...
|
|
234
|
+
...blockLookFieldShape,
|
|
235
|
+
...blockEditingDeclarationShape
|
|
235
236
|
}).superRefine(validateManifestLookField).superRefine(validateSdkBlockDeclaration);
|
|
236
237
|
const sdkBlockFieldExtensionInputSchema = z.object({
|
|
237
238
|
fields: z.array(fieldDefinitionInputSchema).min(1),
|
|
238
|
-
...
|
|
239
|
+
...blockLookFieldShape,
|
|
240
|
+
...blockEditingExtensionShape
|
|
239
241
|
}).superRefine(validateManifestLookField);
|
|
240
242
|
const sdkBlockFieldExtensionsInputSchema = z.record(z.string().min(1), sdkBlockFieldExtensionInputSchema);
|
|
241
243
|
const sdkThemePaletteSchema$1 = z.record(z.string(), z.string());
|
|
@@ -1130,7 +1132,8 @@ const blockFieldOptionsSchema = z.record(z.string().regex(/^(block\.|custom\.)[a
|
|
|
1130
1132
|
*/
|
|
1131
1133
|
const blockFieldExtensionSchema = z.object({
|
|
1132
1134
|
fields: fieldSchema.array().min(1, "At least one field is required"),
|
|
1133
|
-
...
|
|
1135
|
+
...blockLookFieldShape,
|
|
1136
|
+
...blockEditingExtensionShape
|
|
1134
1137
|
}).superRefine(validateManifestLookField).refine((data) => {
|
|
1135
1138
|
return data.fields.every((field) => {
|
|
1136
1139
|
if (!field.required) return true;
|
|
@@ -1246,7 +1249,8 @@ const sdkCustomBlockSchema = z.object({
|
|
|
1246
1249
|
dataLoaders: sdkDataLoadersSchema,
|
|
1247
1250
|
layout: z.optional(customBlockLayoutSchema),
|
|
1248
1251
|
...sdkBlockPresentationShape,
|
|
1249
|
-
...
|
|
1252
|
+
...blockLookFieldShape,
|
|
1253
|
+
...blockEditingDeclarationShape
|
|
1250
1254
|
}).superRefine(validateManifestLookField).superRefine(validateSdkBlockDeclaration).superRefine(validateCustomBlockPresentation);
|
|
1251
1255
|
/**
|
|
1252
1256
|
* Schema for the complete SDK site configuration.
|