@riverbankcms/sdk 0.143.0 → 0.144.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/{PreviewEditorSidebar-DROGfMKi.mjs → PreviewEditorSidebar-CQZNnFiM.mjs} +19 -25
- package/dist/{PreviewEditorUI-BaRjhFu-.mjs → PreviewEditorUI-DCNxnmI0.mjs} +2 -2
- package/dist/{SdkPreviewModeRuntime-OIABYLES.mjs → SdkPreviewModeRuntime-BJolUbr1.mjs} +15 -6
- package/dist/{SiteChromeCustomizeContext-ohjTvZbc.mjs → SiteChromeCustomizeContext-CKgEpoxi.mjs} +1915 -1463
- package/dist/_dts/api/src/billing.d.ts +1 -1
- package/dist/_dts/api/src/billingEndpointTypes.d.ts +8 -2
- package/dist/_dts/api/src/bookingConfig.d.ts +3 -1
- package/dist/_dts/api/src/index.d.ts +1 -1
- package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +4 -4
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +1 -1
- package/dist/_dts/api/src/sdkSettingsContracts.d.ts +8 -0
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +2 -8
- package/dist/_dts/api/src/siteSettings.d.ts +17 -7
- package/dist/_dts/billing/src/membership/index.d.ts +3 -0
- package/dist/_dts/block-form/src/backend/types.d.ts +14 -0
- package/dist/_dts/block-form/src/client/index.d.ts +1 -0
- package/dist/_dts/block-form/src/context/RepeaterHostActionsContext.d.ts +30 -0
- package/dist/_dts/block-form/src/context/index.d.ts +1 -0
- package/dist/_dts/block-form/src/index.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterList.d.ts +4 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRow.d.ts +5 -2
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRowActions.d.ts +11 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/index.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useEmptyStateFocusAfterRemoval.d.ts +8 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/buildSummary.d.ts +15 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterRowActionsDomain.d.ts +5 -2
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +34 -10
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +3 -0
- package/dist/_dts/blocks/src/system/constants/events.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/api/context.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/api/readAuthority.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/core.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +7 -13
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +3 -6
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +9 -4
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.d.ts +1 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +7 -24
- package/dist/_dts/blocks/src/system/runtime/nodes/cart.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/checkout.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationBookingLayer.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardActions.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.override.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +4 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +7 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +7 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +5 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/header-control.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/layout.d.ts +6 -21
- package/dist/_dts/blocks/src/system/runtime/nodes/product-detail.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/product-list.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/ThemedButton.d.ts +58 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/transforms/registry/chromeLogo.d.ts +23 -0
- package/dist/_dts/blocks/src/system/transforms/registry/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +3 -1
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +4 -1
- package/dist/_dts/core/src/event-catalogue.d.ts +27 -0
- package/dist/_dts/core/src/event-preset-vocabulary.d.ts +7 -0
- package/dist/_dts/core/src/index.d.ts +2 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +13 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +286 -2
- package/dist/_dts/editor-blocks/src/block-editor/{BlockCardHeader.d.ts → BlockCardFrame.d.ts} +11 -3
- package/dist/_dts/logger/src/console.d.ts +3 -0
- package/dist/_dts/sdk/src/client/publicEventReadOperations.d.ts +1 -0
- package/dist/_dts/sdk/src/client/types.d.ts +3 -0
- package/dist/_dts/sdk/src/navigation/index.d.ts +27 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +15 -7
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/client.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +7 -1
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/routeIslandApiConfig.d.ts +3 -2
- package/dist/_dts/sdk/src/rendering/islands/enhancers/shopShared.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/overrides.d.ts +1 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/affordanceSuppression.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/classNames.d.ts +3 -13
- package/dist/_dts/theme-core/src/customCss/index.d.ts +1 -1
- package/dist/_dts/theme-core/src/customCss/patch.d.ts +0 -5
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/surfaces/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/surfaces/logoVariant.d.ts +26 -0
- package/dist/_dts/theme-core/src/utils/colorStyles.d.ts +10 -0
- package/dist/_dts/ui/src/editor-item-card.d.ts +116 -0
- package/dist/_dts/ui/src/index.d.ts +1 -0
- package/dist/client/{BookingConsentAgreement-BoCtvzzu.mjs → BookingConsentAgreement-DoAILrkN.mjs} +4 -55
- package/dist/client/{DiscountCodeDisclosure-B5S30nZk.mjs → DiscountCodeDisclosure-X528hUTf.mjs} +27 -17
- package/dist/client/{EventCombined.client-CeZ2-zSt.mjs → EventCombined.client-DSBVwq5m.mjs} +54 -46
- package/dist/client/{EventListing.client-DJN3j8B3.mjs → EventListing.client-DmFAX7Vb.mjs} +3 -4
- package/dist/client/{LeafletStaticMap-RjtGzDQT.mjs → LeafletStaticMap-BAqXdfhq.mjs} +1 -1
- package/dist/client/ThemedButton-BwNFVwi4.mjs +412 -0
- package/dist/client/{accordion-DOmnDoyg.mjs → accordion-DRhMdkbd.mjs} +1 -1
- package/dist/client/{bookingForm-C0vk7pgS.mjs → bookingForm-iJ_nCsNF.mjs} +26 -32
- package/dist/client/bookings.mjs +201 -118
- package/dist/client/{carousel-BZJ7pno3.mjs → carousel-D8zuffZr.mjs} +2 -2
- package/dist/client/{carousel.client-DQTjCVQT.mjs → carousel.client-jahpU9Vz.mjs} +1 -1
- package/dist/client/{cart-CaeVAHJl.mjs → cart-DeMGJViN.mjs} +3 -3
- package/dist/client/{checkout-7wmoNDtG.mjs → checkout-DXc06Km2.mjs} +3 -3
- package/dist/client/{checkoutUrls-FL6lRkrt.mjs → checkoutUrls-CW3-78uu.mjs} +1 -1
- package/dist/client/client.mjs +2271 -1983
- package/dist/client/{colorStyles-3013aRAY.mjs → colorStyles-CuJBiS-1.mjs} +16 -4
- package/dist/client/{context-BOimxE3U.mjs → context-CDLCfDep.mjs} +24 -8
- package/dist/client/{dates-BnzVksi4.mjs → dates-ClFx7Epy.mjs} +2 -2
- package/dist/client/{eventCalendar-l-fpaslC.mjs → eventCalendar-BaGpnOGN.mjs} +39 -50
- package/dist/client/{eventCombined-DGGvssK6.mjs → eventCombined-ywONOx2m.mjs} +5 -4
- package/dist/client/{eventDetails-DRiCm_hL.mjs → eventDetails-B2LlOTYY.mjs} +4 -4
- package/dist/client/{eventListing-dph8loYX.mjs → eventListing-CMgxWpqP.mjs} +5 -4
- package/dist/client/{eventRegistration-ClBohmbY.mjs → eventRegistration-BarLDNHR.mjs} +83 -68
- package/dist/client/{form-BLVVAnd3.mjs → form-BjqKaBJ7.mjs} +9 -10
- package/dist/client/{headerSection-DHy4C8Ix.mjs → headerSection-CP4XDwz1.mjs} +23 -30
- package/dist/client/hooks.mjs +257 -63
- package/dist/client/{locationMap-6HuS28ck.mjs → locationMap-C5gW-d-w.mjs} +9 -10
- package/dist/client/{media-DHpfFwd3.mjs → media-BtJ37tzS.mjs} +1 -1
- package/dist/client/{newsletterForm-xOdcOhZP.mjs → newsletterForm-afXlVSA0.mjs} +8 -9
- package/dist/client/{pricing-ChinRYFt.mjs → pricing-Bl1CAl28.mjs} +1 -1
- package/dist/client/{productDetail-0chA5gbK.mjs → productDetail-CvQ3jWQe.mjs} +3 -3
- package/dist/client/{productList-OoINA0h1.mjs → productList-U874PGO7.mjs} +3 -3
- package/dist/client/{propsDecoder-CIZ-hbIG.mjs → propsDecoder-DPXtCZWP.mjs} +87 -29
- package/dist/client/rendering/client.mjs +1891 -1740
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +2225 -1913
- package/dist/client/{routeIslandApiConfig-UNsfPcYq.mjs → routeIslandApiConfig-NGYiUWXu.mjs} +8 -1
- package/dist/client/{scrollToBlock-BPZl0gPZ.mjs → scrollToBlock-0-C3DVhK.mjs} +1 -1
- package/dist/client/{shop-CLJFqNIq.mjs → shop-BXjXhM9P.mjs} +45 -58
- package/dist/client/{shop-commerce-PpANg5wB.mjs → shop-commerce-BZ6UlWJ7.mjs} +42 -55
- package/dist/client/{shop-commerce-store-TA_Kz2ku.mjs → shop-commerce-store-DlSBXb3D.mjs} +1 -1
- package/dist/client/{shopShared-DzcFcA5g.mjs → shopShared-kkEOiLPA.mjs} +6 -5
- package/dist/client/{useEventFilters-CFU21QZo.mjs → useEventFilters-zvnnE1ro.mjs} +66 -355
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/editor-chrome.css +8 -0
- package/dist/{sdk-runtime-CDKl0Fr7.mjs → sdk-runtime-DFJlQt3q.mjs} +1 -1
- package/dist/{separator-BTp96X32.mjs → separator-o8GHb1xh.mjs} +1 -1
- package/dist/server/components.mjs +828 -623
- package/dist/server/config-validation.mjs +257 -63
- package/dist/server/config.mjs +257 -63
- package/dist/server/data.mjs +257 -63
- package/dist/server/index.mjs +9 -5
- package/dist/server/navigation.mjs +28 -1
- package/dist/server/next.mjs +14129 -13947
- package/dist/server/page-converter.mjs +110 -59
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +832 -624
- package/dist/server/rendering.mjs +830 -624
- package/dist/server/routing.mjs +294 -69
- package/dist/server/server.mjs +266 -68
- package/dist/server/theme-bridge.mjs +40 -1
- package/dist/styles/index.css +6 -0
- package/package.json +1 -1
|
@@ -3605,6 +3605,8 @@ z.discriminatedUnion("kind", navigationLinkInputSchemaOptions);
|
|
|
3605
3605
|
//#endregion
|
|
3606
3606
|
//#region ../theme-core/src/palette/utils/colorConversion.ts
|
|
3607
3607
|
const clamp01 = (x) => Math.max(0, Math.min(1, x));
|
|
3608
|
+
const mod = (a, n) => (a % n + n) % n;
|
|
3609
|
+
const deg = (x) => mod(x, 360);
|
|
3608
3610
|
function hexToRgb(hex) {
|
|
3609
3611
|
const h = hex.replace(/^#/, "");
|
|
3610
3612
|
const m = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
|
|
@@ -3627,6 +3629,45 @@ function srgbToLinear(u) {
|
|
|
3627
3629
|
function linearToSrgb(x) {
|
|
3628
3630
|
return clamp01(x <= .0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - .055) * 255;
|
|
3629
3631
|
}
|
|
3632
|
+
function rgbToHsl(r, g, b) {
|
|
3633
|
+
const R = r / 255, G = g / 255, B = b / 255;
|
|
3634
|
+
const max = Math.max(R, G, B), min = Math.min(R, G, B);
|
|
3635
|
+
const d = max - min;
|
|
3636
|
+
let h = 0;
|
|
3637
|
+
if (d !== 0) {
|
|
3638
|
+
switch (max) {
|
|
3639
|
+
case R:
|
|
3640
|
+
h = (G - B) / d + (G < B ? 6 : 0);
|
|
3641
|
+
break;
|
|
3642
|
+
case G:
|
|
3643
|
+
h = (B - R) / d + 2;
|
|
3644
|
+
break;
|
|
3645
|
+
case B:
|
|
3646
|
+
h = (R - G) / d + 4;
|
|
3647
|
+
break;
|
|
3648
|
+
}
|
|
3649
|
+
h *= 60;
|
|
3650
|
+
}
|
|
3651
|
+
const l = (max + min) / 2;
|
|
3652
|
+
const s = d === 0 ? 0 : d / (1 - Math.abs(2 * l - 1));
|
|
3653
|
+
return {
|
|
3654
|
+
h,
|
|
3655
|
+
s,
|
|
3656
|
+
l
|
|
3657
|
+
};
|
|
3658
|
+
}
|
|
3659
|
+
function srgbToOklab(r, g, b) {
|
|
3660
|
+
const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
|
|
3661
|
+
const l = .4122214708 * R + .5363325363 * G + .0514459929 * B;
|
|
3662
|
+
const m = .2119034982 * R + .6806995451 * G + .1073969566 * B;
|
|
3663
|
+
const s = .0883024619 * R + .2817188376 * G + .6299787005 * B;
|
|
3664
|
+
const l_ = Math.cbrt(l), m_ = Math.cbrt(m), s_ = Math.cbrt(s);
|
|
3665
|
+
return {
|
|
3666
|
+
L: .2104542553 * l_ + .793617785 * m_ - .0040720468 * s_,
|
|
3667
|
+
a: 1.9779984951 * l_ - 2.428592205 * m_ + .4505937099 * s_,
|
|
3668
|
+
b: .0259040371 * l_ + .7827717662 * m_ - .808675766 * s_
|
|
3669
|
+
};
|
|
3670
|
+
}
|
|
3630
3671
|
function oklabToSrgb(L, a, b) {
|
|
3631
3672
|
const l_ = Math.pow(L + .3963377774 * a + .2158037573 * b, 3);
|
|
3632
3673
|
const m_ = Math.pow(L - .1055613458 * a - .0638541728 * b, 3);
|
|
@@ -3640,6 +3681,14 @@ function oklabToSrgb(L, a, b) {
|
|
|
3640
3681
|
b: linearToSrgb(B)
|
|
3641
3682
|
};
|
|
3642
3683
|
}
|
|
3684
|
+
function oklabToOklch(L, a, b) {
|
|
3685
|
+
const C = Math.sqrt(a * a + b * b);
|
|
3686
|
+
return {
|
|
3687
|
+
L,
|
|
3688
|
+
C,
|
|
3689
|
+
h: C < 1e-7 ? 0 : deg(Math.atan2(b, a) * 180 / Math.PI)
|
|
3690
|
+
};
|
|
3691
|
+
}
|
|
3643
3692
|
function oklchToOklab(L, C, h) {
|
|
3644
3693
|
const hr = h * Math.PI / 180;
|
|
3645
3694
|
return {
|
|
@@ -3648,6 +3697,27 @@ function oklchToOklab(L, C, h) {
|
|
|
3648
3697
|
b: C * Math.sin(hr)
|
|
3649
3698
|
};
|
|
3650
3699
|
}
|
|
3700
|
+
function featuresFromHex(hex) {
|
|
3701
|
+
const { r, g, b } = hexToRgb(hex);
|
|
3702
|
+
const { h, s, l } = rgbToHsl(r, g, b);
|
|
3703
|
+
const { L, a, b: b2 } = srgbToOklab(r, g, b);
|
|
3704
|
+
const { L: okL, C: okC, h: okH } = oklabToOklch(L, a, b2);
|
|
3705
|
+
return {
|
|
3706
|
+
r,
|
|
3707
|
+
g,
|
|
3708
|
+
b,
|
|
3709
|
+
h,
|
|
3710
|
+
s,
|
|
3711
|
+
l,
|
|
3712
|
+
v: Math.max(r, g, b) / 255,
|
|
3713
|
+
Y: .2126 * srgbToLinear(r) + .7152 * srgbToLinear(g) + .0722 * srgbToLinear(b),
|
|
3714
|
+
chroma: s,
|
|
3715
|
+
okL,
|
|
3716
|
+
okC,
|
|
3717
|
+
okH,
|
|
3718
|
+
hex
|
|
3719
|
+
};
|
|
3720
|
+
}
|
|
3651
3721
|
function relativeLuminance(r, g, b) {
|
|
3652
3722
|
const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
|
|
3653
3723
|
return .2126 * R + .7152 * G + .0722 * B;
|
|
@@ -6731,6 +6801,36 @@ function normalizedReference(value) {
|
|
|
6731
6801
|
return normalized.length > 0 ? normalized : null;
|
|
6732
6802
|
}
|
|
6733
6803
|
//#endregion
|
|
6804
|
+
//#region ../theme-core/src/surfaces/logoVariant.ts
|
|
6805
|
+
/** Concrete hex behind a plain, opaque palette token, or null otherwise. */
|
|
6806
|
+
function opaquePaletteHexForToken(expandedPalette, token) {
|
|
6807
|
+
if (!token) return null;
|
|
6808
|
+
const parts = parseColorTokenParts(token);
|
|
6809
|
+
if (parts.kind !== "token" || parts.opacityPercent !== null) return null;
|
|
6810
|
+
return expandedPalette[parts.token] ?? null;
|
|
6811
|
+
}
|
|
6812
|
+
/**
|
|
6813
|
+
* Tone of the surface a foreground token was resolved for.
|
|
6814
|
+
*
|
|
6815
|
+
* A token with opacity has no known underlay to composite against, and a raw
|
|
6816
|
+
* or unrecognised token has no palette hex, so both are `unknown` rather than
|
|
6817
|
+
* a guess.
|
|
6818
|
+
*/
|
|
6819
|
+
function surfaceToneFromForegroundToken(expandedPalette, foregroundToken) {
|
|
6820
|
+
const hex = opaquePaletteHexForToken(expandedPalette, foregroundToken);
|
|
6821
|
+
if (!hex) return "unknown";
|
|
6822
|
+
return featuresFromHex(hex).Y >= .5 ? "dark" : "light";
|
|
6823
|
+
}
|
|
6824
|
+
/**
|
|
6825
|
+
* The logo to draw on a surface of the given tone. A missing variant falls
|
|
6826
|
+
* back to the other one, and an unknown tone uses the light-backgrounds logo,
|
|
6827
|
+
* which is what every site rendered before variants existed.
|
|
6828
|
+
*/
|
|
6829
|
+
function selectLogoVariant(tone, variants) {
|
|
6830
|
+
const { forLightBackgrounds, forDarkBackgrounds } = variants;
|
|
6831
|
+
return tone === "dark" ? forDarkBackgrounds ?? forLightBackgrounds : forLightBackgrounds ?? forDarkBackgrounds;
|
|
6832
|
+
}
|
|
6833
|
+
//#endregion
|
|
6734
6834
|
//#region ../theme-core/src/utils/colorStyles.ts
|
|
6735
6835
|
const COLOR_VAR_PREFIX = "--tb-";
|
|
6736
6836
|
function parseToken(source) {
|
|
@@ -6782,16 +6882,28 @@ function backgroundColorStyle(token) {
|
|
|
6782
6882
|
return { backgroundColor: rgbColorValue(token) };
|
|
6783
6883
|
}
|
|
6784
6884
|
/**
|
|
6885
|
+
* Converts a text color token to a CSS color value that follows the enclosing
|
|
6886
|
+
* surface. The semantic text tokens (`text`, `heading`, `mutedText`) resolve
|
|
6887
|
+
* to the surface foreground variables, so text adapts when a section's
|
|
6888
|
+
* background changes; any other token is a fixed theme color.
|
|
6889
|
+
*
|
|
6890
|
+
* @param token - Theme color token
|
|
6891
|
+
* @returns CSS color value
|
|
6892
|
+
*/
|
|
6893
|
+
function textColorValue(token) {
|
|
6894
|
+
const parsed = parseToken(token);
|
|
6895
|
+
const surfaceRole = parsed.raw ? null : surfaceRoleForTextToken(parsed.token);
|
|
6896
|
+
if (!surfaceRole) return rgbColorValue(token);
|
|
6897
|
+
return parsed.opacityPercent === void 0 ? surfaceForegroundValue(surfaceRole) : surfaceForegroundValueWithOpacity(surfaceRole, parsed.opacityPercent);
|
|
6898
|
+
}
|
|
6899
|
+
/**
|
|
6785
6900
|
* Creates a text color style object from a theme token.
|
|
6786
6901
|
*
|
|
6787
6902
|
* @param token - Theme color token
|
|
6788
6903
|
* @returns CSSProperties with color
|
|
6789
6904
|
*/
|
|
6790
6905
|
function textColorStyle(token) {
|
|
6791
|
-
|
|
6792
|
-
const surfaceRole = parsed.raw ? null : surfaceRoleForTextToken(parsed.token);
|
|
6793
|
-
if (surfaceRole) return { color: parsed.opacityPercent === void 0 ? surfaceForegroundValue(surfaceRole) : surfaceForegroundValueWithOpacity(surfaceRole, parsed.opacityPercent) };
|
|
6794
|
-
return { color: rgbColorValue(token) };
|
|
6906
|
+
return { color: textColorValue(token) };
|
|
6795
6907
|
}
|
|
6796
6908
|
/**
|
|
6797
6909
|
* Creates a border color style object from a theme token.
|
|
@@ -18603,9 +18715,7 @@ function navRow(opts) {
|
|
|
18603
18715
|
rel: { $bind: { from: `${childItemName}.rel` } },
|
|
18604
18716
|
"data-active": { $bind: { from: `${childItemName}.active` } }
|
|
18605
18717
|
}, [text({ as: "span" }, bind(`${childItemName}.label`))], repeat(`${itemName}.children`, childItemName));
|
|
18606
|
-
const dropdown = el("div", { className: "nav-dropdown rb-relative" }, [
|
|
18607
|
-
type: "button",
|
|
18608
|
-
variantId: "",
|
|
18718
|
+
const dropdown = el("div", { className: "nav-dropdown rb-relative" }, [el("headerControl", {
|
|
18609
18719
|
className: prependClassName("nav-dropdown-trigger", linkClassName),
|
|
18610
18720
|
"aria-haspopup": "menu",
|
|
18611
18721
|
"aria-expanded": "false",
|
|
@@ -18673,9 +18783,7 @@ function navColumn(opts) {
|
|
|
18673
18783
|
const dropdown = el("div", {
|
|
18674
18784
|
className: "nav-mobile-dropdown",
|
|
18675
18785
|
"data-nav-mobile-dropdown": "true"
|
|
18676
|
-
}, [
|
|
18677
|
-
type: "button",
|
|
18678
|
-
variantId: "",
|
|
18786
|
+
}, [el("headerControl", {
|
|
18679
18787
|
className: triggerClassName,
|
|
18680
18788
|
"aria-expanded": "false",
|
|
18681
18789
|
"aria-controls": childrenId,
|
|
@@ -24982,6 +25090,49 @@ const layoutTransforms = [
|
|
|
24982
25090
|
footerLogoMediaClassTransform,
|
|
24983
25091
|
footerLogoTextVisibleTransform
|
|
24984
25092
|
];
|
|
25093
|
+
//#endregion
|
|
25094
|
+
//#region ../blocks/src/system/transforms/registry/chromeLogo.ts
|
|
25095
|
+
const chromeLogoSchema = z.object({ surface: z.enum([
|
|
25096
|
+
"header-root",
|
|
25097
|
+
"header-mobile-panel",
|
|
25098
|
+
"footer-root"
|
|
25099
|
+
]) });
|
|
25100
|
+
/** The brand foreground shares the logo's surface; navigation may own a separate capsule. */
|
|
25101
|
+
function chromeSurfaceTextToken(surface, theme, palette) {
|
|
25102
|
+
switch (surface) {
|
|
25103
|
+
case "header-root": {
|
|
25104
|
+
const header = theme.header;
|
|
25105
|
+
const foreground = resolveHeaderRootForeground(header, palette, resolveHeaderVisualStyles(header).isTransparent);
|
|
25106
|
+
return foreground.kind === "known" ? foreground.roles.text : resolveHeaderLeafTextColor(header);
|
|
25107
|
+
}
|
|
25108
|
+
case "header-mobile-panel": return theme.header?.dropdownStyle?.textColor ?? "text";
|
|
25109
|
+
case "footer-root": {
|
|
25110
|
+
const foreground = resolveFooterRootForeground(theme.footer, palette);
|
|
25111
|
+
return foreground.kind === "known" ? foreground.roles.text : void 0;
|
|
25112
|
+
}
|
|
25113
|
+
}
|
|
25114
|
+
}
|
|
25115
|
+
function readChromeTheme(viewModel) {
|
|
25116
|
+
return asPartialObject(asPartialObject(viewModel?.["$root"])?.theme) ?? {};
|
|
25117
|
+
}
|
|
25118
|
+
function resolveChromeSurfaceTone(surface, context) {
|
|
25119
|
+
return surfaceToneFromForegroundToken(context.theme.palette, chromeSurfaceTextToken(surface, readChromeTheme(context.viewModel), context.theme.palette));
|
|
25120
|
+
}
|
|
25121
|
+
const chromeLogoTransforms = [{
|
|
25122
|
+
id: "layout.chromeLogo",
|
|
25123
|
+
kind: "formatter",
|
|
25124
|
+
summary: "Select the light- or dark-background site logo for a header or footer surface",
|
|
25125
|
+
schema: chromeLogoSchema,
|
|
25126
|
+
run: (value, options, context) => {
|
|
25127
|
+
const content = asPartialObject(value);
|
|
25128
|
+
const variants = asPartialObject(content?.logoVariants);
|
|
25129
|
+
if (!variants) return content?.logo ?? null;
|
|
25130
|
+
return selectLogoVariant(resolveChromeSurfaceTone(options.surface, context), {
|
|
25131
|
+
forLightBackgrounds: variants.forLightBackgrounds ?? null,
|
|
25132
|
+
forDarkBackgrounds: variants.forDarkBackgrounds ?? null
|
|
25133
|
+
});
|
|
25134
|
+
}
|
|
25135
|
+
}];
|
|
24985
25136
|
const headerRuntimeTransforms = [{
|
|
24986
25137
|
id: "layout.headerRuntimeContract",
|
|
24987
25138
|
kind: "formatter",
|
|
@@ -25189,46 +25340,42 @@ const whenTransformed = (from, transformId, equals = true) => (node) => ({
|
|
|
25189
25340
|
equals
|
|
25190
25341
|
}
|
|
25191
25342
|
});
|
|
25192
|
-
|
|
25343
|
+
/** Draw whichever site logo suits the surface this row sits on. */
|
|
25344
|
+
const bindChromeLogo = (surface) => bind("content", { transforms: [{
|
|
25345
|
+
id: "layout.chromeLogo",
|
|
25346
|
+
options: { surface }
|
|
25347
|
+
}] });
|
|
25348
|
+
/**
|
|
25349
|
+
* The brand link. The logo is chosen per surface because the open mobile menu
|
|
25350
|
+
* paints its own background, which may be the opposite tone to the header.
|
|
25351
|
+
*/
|
|
25352
|
+
const createLogoRow = (surface) => link({
|
|
25193
25353
|
href: "/",
|
|
25194
25354
|
className: bindProp("$root.theme.header.logo", {
|
|
25195
25355
|
transforms: pipe(tx("layout.headerLogoClass")),
|
|
25196
25356
|
fallback: "header-logo rb-flex rb-min-w-0 rb-items-center rb-gap-3 rb-no-underline rb-transition-opacity rb-hover-opacity-80"
|
|
25197
25357
|
})
|
|
25198
|
-
}, [
|
|
25199
|
-
|
|
25200
|
-
|
|
25201
|
-
|
|
25202
|
-
|
|
25203
|
-
|
|
25204
|
-
|
|
25205
|
-
|
|
25206
|
-
}) }, when("site.logo"), bind("site.logo"))], when("content.logo", { not: true })),
|
|
25207
|
-
text({
|
|
25208
|
-
as: "strong",
|
|
25209
|
-
className: "header-logo-text rb-truncate"
|
|
25210
|
-
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))
|
|
25211
|
-
]);
|
|
25358
|
+
}, [media({ className: bindProp("$root.theme.header.logo", {
|
|
25359
|
+
transforms: pipe(tx("layout.headerLogoMediaClass", { base: "rb-header-logo-sm rb-w-auto rb-transition-all rb-duration-300" })),
|
|
25360
|
+
fallback: "rb-header-logo-sm rb-w-auto rb-transition-all rb-duration-300"
|
|
25361
|
+
}) }, when("content.logo"), bindChromeLogo(surface)), text({
|
|
25362
|
+
as: "strong",
|
|
25363
|
+
className: "header-logo-text rb-truncate"
|
|
25364
|
+
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))]);
|
|
25365
|
+
const logoRow = createLogoRow("header-root");
|
|
25212
25366
|
const centeredLogoRow = link({
|
|
25213
25367
|
href: "/",
|
|
25214
25368
|
className: bindProp("$root.theme.header.logo", {
|
|
25215
25369
|
transforms: pipe(tx("layout.headerLogoClass", { base: "header-logo rb-flex rb-items-center rb-justify-center rb-gap-3 rb-text-center rb-no-underline rb-transition-opacity rb-hover-opacity-80" })),
|
|
25216
25370
|
fallback: "header-logo rb-flex rb-items-center rb-justify-center rb-gap-3 rb-text-center rb-no-underline rb-transition-opacity rb-hover-opacity-80"
|
|
25217
25371
|
})
|
|
25218
|
-
}, [
|
|
25219
|
-
|
|
25220
|
-
|
|
25221
|
-
|
|
25222
|
-
|
|
25223
|
-
|
|
25224
|
-
|
|
25225
|
-
fallback: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300"
|
|
25226
|
-
}) }, when("site.logo"), bind("site.logo"))], when("content.logo", { not: true })),
|
|
25227
|
-
text({
|
|
25228
|
-
as: "strong",
|
|
25229
|
-
className: "header-logo-text"
|
|
25230
|
-
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))
|
|
25231
|
-
]);
|
|
25372
|
+
}, [media({ className: bindProp("$root.theme.header.logo", {
|
|
25373
|
+
transforms: pipe(tx("layout.headerLogoMediaClass", { base: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300" })),
|
|
25374
|
+
fallback: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300"
|
|
25375
|
+
}) }, when("content.logo"), bindChromeLogo("header-root")), text({
|
|
25376
|
+
as: "strong",
|
|
25377
|
+
className: "header-logo-text"
|
|
25378
|
+
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))]);
|
|
25232
25379
|
const createNavRow = (className, align = "end") => navRow({
|
|
25233
25380
|
className: `${className} header-nav-row`,
|
|
25234
25381
|
align,
|
|
@@ -25268,10 +25415,8 @@ const mobileToggleIcon = stack({
|
|
|
25268
25415
|
}
|
|
25269
25416
|
]);
|
|
25270
25417
|
const mobileToggleButton = {
|
|
25271
|
-
type: "
|
|
25418
|
+
type: "headerControl",
|
|
25272
25419
|
props: {
|
|
25273
|
-
type: "button",
|
|
25274
|
-
variantId: "",
|
|
25275
25420
|
className: `nav-mobile-toggle ${mobileOnlyDisplay("inline-flex")} rb-h-10 rb-w-10 rb-items-center rb-justify-center rb-rounded-md transition-theme-standard`,
|
|
25276
25421
|
"aria-label": "Open menu",
|
|
25277
25422
|
"aria-expanded": "false",
|
|
@@ -25281,10 +25426,8 @@ const mobileToggleButton = {
|
|
|
25281
25426
|
children: [mobileToggleIcon]
|
|
25282
25427
|
};
|
|
25283
25428
|
const mobileOverlayToggleButton = {
|
|
25284
|
-
type: "
|
|
25429
|
+
type: "headerControl",
|
|
25285
25430
|
props: {
|
|
25286
|
-
type: "button",
|
|
25287
|
-
variantId: "",
|
|
25288
25431
|
className: "nav-mobile-toggle rb-inline-flex rb-h-10 rb-w-10 rb-items-center rb-justify-center rb-rounded-md transition-theme-standard",
|
|
25289
25432
|
"aria-label": "Open menu",
|
|
25290
25433
|
"aria-expanded": "false",
|
|
@@ -25308,7 +25451,7 @@ const mobileOverlayHeader = inline({
|
|
|
25308
25451
|
align: "center",
|
|
25309
25452
|
justify: "between",
|
|
25310
25453
|
style: borderColorStyle("border")
|
|
25311
|
-
}, [
|
|
25454
|
+
}, [createLogoRow("header-mobile-panel"), mobileOverlayToggleButton]);
|
|
25312
25455
|
const mobileOverlayBody = stack({
|
|
25313
25456
|
className: "rb-flex-1 rb-px-6 rb-py-6",
|
|
25314
25457
|
gap: "md",
|
|
@@ -25495,7 +25638,10 @@ const brandLogo = link({
|
|
|
25495
25638
|
options: { base: "rb-h-10 rb-w-auto" }
|
|
25496
25639
|
}],
|
|
25497
25640
|
fallback: "rb-h-10 rb-w-auto"
|
|
25498
|
-
} } }, when("module.showLogo", { equals: true }), when("content.logo"), bind("content
|
|
25641
|
+
} } }, when("module.showLogo", { equals: true }), when("content.logo"), bind("content", { transforms: [{
|
|
25642
|
+
id: "layout.chromeLogo",
|
|
25643
|
+
options: { surface: "footer-root" }
|
|
25644
|
+
}] })), text({
|
|
25499
25645
|
as: "strong",
|
|
25500
25646
|
className: "footer-logo-text rb-nav-text"
|
|
25501
25647
|
}, when("module.showTitle", { equals: true }), bind("site.title", { fallback: "Your Site" }))], when("module.kind", { equals: "brand" }));
|
|
@@ -28211,6 +28357,12 @@ const occurrenceContextSchema = z.object({
|
|
|
28211
28357
|
capacityOverride: z.number().nullable().optional(),
|
|
28212
28358
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
28213
28359
|
}).nullable();
|
|
28360
|
+
//#endregion
|
|
28361
|
+
//#region ../blocks/src/system/runtime/api/readAuthority.ts
|
|
28362
|
+
const browserReadAuthoritySchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("published") }).strict(), z.object({
|
|
28363
|
+
kind: z.literal("preview"),
|
|
28364
|
+
token: z.string().min(1)
|
|
28365
|
+
}).strict()]);
|
|
28214
28366
|
const unsupportedEventRegistrationPageSurfaceSubjectSchema = z.object({
|
|
28215
28367
|
kind: z.literal("unsupported"),
|
|
28216
28368
|
reason: z.enum([
|
|
@@ -28321,6 +28473,33 @@ function normalizeEventCalendarDisplayMode$1(input) {
|
|
|
28321
28473
|
if (isEventCalendarDisplayMode(input.variant)) return input.variant;
|
|
28322
28474
|
return isEventCalendarDisplayMode(input.displayMode) ? input.displayMode : void 0;
|
|
28323
28475
|
}
|
|
28476
|
+
/** One closed authority for the projections required by each rendered mode. */
|
|
28477
|
+
function resolveEventCalendarReadPlan(input) {
|
|
28478
|
+
const mode = normalizeEventCalendarDisplayMode$1(input) ?? "combined";
|
|
28479
|
+
switch (mode) {
|
|
28480
|
+
case "combined": return {
|
|
28481
|
+
mode,
|
|
28482
|
+
jobs: "both",
|
|
28483
|
+
readProfile: "listing-card"
|
|
28484
|
+
};
|
|
28485
|
+
case "list": return {
|
|
28486
|
+
mode,
|
|
28487
|
+
jobs: "list",
|
|
28488
|
+
readProfile: "listing-card"
|
|
28489
|
+
};
|
|
28490
|
+
case "calendar": return {
|
|
28491
|
+
mode,
|
|
28492
|
+
jobs: "calendar",
|
|
28493
|
+
readProfile: "listing-card"
|
|
28494
|
+
};
|
|
28495
|
+
case "timetable":
|
|
28496
|
+
case "week-board": return {
|
|
28497
|
+
mode,
|
|
28498
|
+
jobs: "calendar",
|
|
28499
|
+
readProfile: "timetable"
|
|
28500
|
+
};
|
|
28501
|
+
}
|
|
28502
|
+
}
|
|
28324
28503
|
function isEventCalendarDefaultView(value) {
|
|
28325
28504
|
return typeof value === "string" && eventCalendarDefaultViewValues.includes(value);
|
|
28326
28505
|
}
|
|
@@ -28515,6 +28694,7 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
28515
28694
|
apiBaseUrl: z.string().optional(),
|
|
28516
28695
|
portalToken: z.string().nullable().optional(),
|
|
28517
28696
|
previewToken: z.string().nullable().optional(),
|
|
28697
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
28518
28698
|
...eventRegistrationHydrationSchemaShape,
|
|
28519
28699
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
28520
28700
|
wholeSeriesRunEvents: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
@@ -28552,6 +28732,7 @@ z.object({
|
|
|
28552
28732
|
apiBaseUrl: z.string().optional(),
|
|
28553
28733
|
portalToken: z.string().nullable().optional(),
|
|
28554
28734
|
previewToken: z.string().nullable().optional(),
|
|
28735
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
28555
28736
|
stage: previewStageSchema.optional()
|
|
28556
28737
|
});
|
|
28557
28738
|
function buildEventRegistrationDisplayFromScopedEvents(source, scopedSourceEvents) {
|
|
@@ -28810,6 +28991,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
28810
28991
|
text({ as: "h2" }, bind("content.heading"), when("content.heading")),
|
|
28811
28992
|
richText({ className: "rb-prose rb-max-w-none" }, bind("content.description"), when("content.description")),
|
|
28812
28993
|
eventRegistration(withApiBindings({
|
|
28994
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
28813
28995
|
occurrenceContext: { $bind: { from: "$root.occurrenceContext" } },
|
|
28814
28996
|
subject: { $bind: { from: "$root.subject" } },
|
|
28815
28997
|
portalToken: { $bind: {
|
|
@@ -29442,8 +29624,7 @@ function resolveEventListPaginationAction(input) {
|
|
|
29442
29624
|
//#endregion
|
|
29443
29625
|
//#region ../blocks/src/system/blocks/events/shared/calendarWindow.ts
|
|
29444
29626
|
function resolveCalendarReadProfile(content) {
|
|
29445
|
-
|
|
29446
|
-
return mode === "timetable" || mode === "week-board" ? "timetable" : "listing-card";
|
|
29627
|
+
return resolveEventCalendarReadPlan(content).readProfile;
|
|
29447
29628
|
}
|
|
29448
29629
|
/** Runtime picker sentinels and bound loader IDs must describe the same query. */
|
|
29449
29630
|
function normalizeCalendarFilterId(value) {
|
|
@@ -29553,6 +29734,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
29553
29734
|
events: z.array(publicEventSchema).nullable().optional(),
|
|
29554
29735
|
siteId: z.string(),
|
|
29555
29736
|
apiBaseUrl: z.string().optional(),
|
|
29737
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
29556
29738
|
stage: previewStageSchema.optional(),
|
|
29557
29739
|
listLayout: eventLayoutSchema.optional(),
|
|
29558
29740
|
listColumns: columnOptionSchema.optional(),
|
|
@@ -29605,7 +29787,6 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
29605
29787
|
const eventCollectionHydrationSchema = z.object({
|
|
29606
29788
|
siteId: z.string(),
|
|
29607
29789
|
calendarWindow: calendarWindowPageSchema.optional(),
|
|
29608
|
-
stage: previewStageSchema.optional(),
|
|
29609
29790
|
prefetchedEvents: z.boolean(),
|
|
29610
29791
|
eventSurface: eventSurfaceScopeSchema$1,
|
|
29611
29792
|
filterEventPresets: z.string().nullable(),
|
|
@@ -29680,7 +29861,6 @@ function buildEventCollectionHydration(source, now = /* @__PURE__ */ new Date())
|
|
|
29680
29861
|
return {
|
|
29681
29862
|
calendarWindow: source.calendarWindow ?? void 0,
|
|
29682
29863
|
siteId: source.siteId,
|
|
29683
|
-
stage: source.stage,
|
|
29684
29864
|
prefetchedEvents: source.events != null,
|
|
29685
29865
|
eventSurface: selected ? "all" : normalizeEventSurfaceScope(source.eventSurface),
|
|
29686
29866
|
filterEventPresets: selected ? null : normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
@@ -29700,6 +29880,7 @@ const eventListingSourceSchema = z.object({
|
|
|
29700
29880
|
events: z.array(publicEventSchema).nullable().optional(),
|
|
29701
29881
|
siteId: z.string(),
|
|
29702
29882
|
apiBaseUrl: z.string().optional(),
|
|
29883
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
29703
29884
|
stage: previewStageSchema.optional(),
|
|
29704
29885
|
layout: eventLayoutSchema.optional(),
|
|
29705
29886
|
columns: columnOptionSchema.optional(),
|
|
@@ -29740,7 +29921,6 @@ const eventListingDisplaySchema = z.object({
|
|
|
29740
29921
|
});
|
|
29741
29922
|
const eventListingHydrationSchema = z.object({
|
|
29742
29923
|
siteId: z.string(),
|
|
29743
|
-
stage: previewStageSchema.optional(),
|
|
29744
29924
|
eventsPerPage: eventPageSizeSchema,
|
|
29745
29925
|
paginationAction: eventListPaginationActionSchema,
|
|
29746
29926
|
showFilters: z.boolean(),
|
|
@@ -29763,6 +29943,7 @@ const eventListingRenderSchema = z.object({
|
|
|
29763
29943
|
z.object({
|
|
29764
29944
|
siteId: z.string(),
|
|
29765
29945
|
apiBaseUrl: z.string().optional(),
|
|
29946
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
29766
29947
|
stage: previewStageSchema.optional()
|
|
29767
29948
|
});
|
|
29768
29949
|
const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
@@ -29797,7 +29978,6 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
29797
29978
|
},
|
|
29798
29979
|
hydration: {
|
|
29799
29980
|
siteId: source.siteId,
|
|
29800
|
-
stage: source.stage,
|
|
29801
29981
|
eventsPerPage: pageSize,
|
|
29802
29982
|
paginationAction: resolveEventListPaginationAction({
|
|
29803
29983
|
paginationMode: source.paginationMode,
|
|
@@ -30079,6 +30259,7 @@ const eventListingBlockDefinition = {
|
|
|
30079
30259
|
rootType: "stack",
|
|
30080
30260
|
rootProps: { gap: "lg" },
|
|
30081
30261
|
children: [...eventSectionHeaderLayoutNodes(), el("event-listing", withApiBindings({
|
|
30262
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
30082
30263
|
events: { $bind: { from: "data.events" } },
|
|
30083
30264
|
stage: { $bind: {
|
|
30084
30265
|
from: "$root.previewStage",
|
|
@@ -30276,6 +30457,7 @@ const eventCalendarRenderSchema = z.object({
|
|
|
30276
30457
|
z.object({
|
|
30277
30458
|
siteId: z.string(),
|
|
30278
30459
|
apiBaseUrl: z.string().optional(),
|
|
30460
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
30279
30461
|
stage: previewStageSchema.optional()
|
|
30280
30462
|
});
|
|
30281
30463
|
/**
|
|
@@ -30297,7 +30479,7 @@ function buildEventCalendarDisplay(source) {
|
|
|
30297
30479
|
listColumns: source.listColumns ?? source.columns
|
|
30298
30480
|
}),
|
|
30299
30481
|
kind: "event-calendar",
|
|
30300
|
-
displayMode:
|
|
30482
|
+
displayMode: resolveEventCalendarReadPlan(source).mode,
|
|
30301
30483
|
className: source.className ?? null,
|
|
30302
30484
|
events: (source.events ?? []).slice().sort((left, right) => new Date(left.startsAt).getTime() - new Date(right.startsAt).getTime()),
|
|
30303
30485
|
boardTitle: normalizeOptionalText(source.boardTitle),
|
|
@@ -30314,13 +30496,16 @@ const eventCalendarBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
30314
30496
|
source: createZodCodec(eventCalendarSourceSchema),
|
|
30315
30497
|
render: createZodCodec(eventCalendarRenderSchema)
|
|
30316
30498
|
},
|
|
30317
|
-
buildRender: (source) =>
|
|
30318
|
-
|
|
30319
|
-
|
|
30320
|
-
|
|
30321
|
-
|
|
30322
|
-
|
|
30323
|
-
|
|
30499
|
+
buildRender: (source) => {
|
|
30500
|
+
const plan = resolveEventCalendarReadPlan(source);
|
|
30501
|
+
return {
|
|
30502
|
+
display: buildEventCalendarDisplay(source.calendarWindow && plan.jobs === "calendar" ? {
|
|
30503
|
+
...source,
|
|
30504
|
+
events: source.calendarWindow.events
|
|
30505
|
+
} : source),
|
|
30506
|
+
hydration: buildEventCollectionHydration(source)
|
|
30507
|
+
};
|
|
30508
|
+
}
|
|
30324
30509
|
});
|
|
30325
30510
|
//#endregion
|
|
30326
30511
|
//#region ../blocks/src/system/blocks/events/eventCalendarDataLoaders.ts
|
|
@@ -30470,6 +30655,7 @@ const eventCalendarLayout = [styledSection({
|
|
|
30470
30655
|
rootType: "stack",
|
|
30471
30656
|
rootProps: { gap: "lg" },
|
|
30472
30657
|
children: [...eventSectionHeaderLayoutNodes({ splitClassName: "event-section-head event-section-head--split" }), el("event-calendar", withApiBindings({
|
|
30658
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
30473
30659
|
events: { $bind: { from: "data.events" } },
|
|
30474
30660
|
calendarWindow: { $bind: { from: "data.calendarWindow" } },
|
|
30475
30661
|
stage: { $bind: {
|
|
@@ -34033,6 +34219,7 @@ const shopSourceSchema = z.object({
|
|
|
34033
34219
|
products: z.array(publicProductSchema).nullable().optional(),
|
|
34034
34220
|
siteId: z.string().optional(),
|
|
34035
34221
|
apiBaseUrl: z.string().optional(),
|
|
34222
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
34036
34223
|
stage: previewStageSchema.optional()
|
|
34037
34224
|
});
|
|
34038
34225
|
const productVariantOptionDisplaySchema = z.object({
|
|
@@ -34200,6 +34387,7 @@ function resolveShowPricePerCredit(source) {
|
|
|
34200
34387
|
z.object({
|
|
34201
34388
|
siteId: z.string().optional(),
|
|
34202
34389
|
apiBaseUrl: z.string().optional(),
|
|
34390
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
34203
34391
|
stage: previewStageSchema.optional()
|
|
34204
34392
|
});
|
|
34205
34393
|
const shopBlockRuntime = defineProgressiveBlockRuntime({
|
|
@@ -34540,6 +34728,7 @@ const shopBlockDefinition = {
|
|
|
34540
34728
|
baseClass: "",
|
|
34541
34729
|
spacing: "spacious",
|
|
34542
34730
|
children: sectionContainer([shop(withApiBindings({
|
|
34731
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
34543
34732
|
mode: "passes-memberships",
|
|
34544
34733
|
showPasses: { $bind: {
|
|
34545
34734
|
from: "content.showPasses",
|
|
@@ -34738,6 +34927,7 @@ const productListBlockDefinition = {
|
|
|
34738
34927
|
baseClass: "",
|
|
34739
34928
|
spacing: "spacious",
|
|
34740
34929
|
children: sectionContainer([productList(withApiBindings({
|
|
34930
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
34741
34931
|
mode: "product-list",
|
|
34742
34932
|
heading: { $bind: {
|
|
34743
34933
|
from: "content.heading",
|
|
@@ -34880,6 +35070,7 @@ const productDetailBlockDefinition = {
|
|
|
34880
35070
|
baseClass: "",
|
|
34881
35071
|
spacing: "spacious",
|
|
34882
35072
|
children: sectionContainer([productDetail(withApiBindings({
|
|
35073
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
34883
35074
|
mode: "product-detail",
|
|
34884
35075
|
heading: { $bind: {
|
|
34885
35076
|
from: "content.heading",
|
|
@@ -34996,6 +35187,7 @@ const cartBlockDefinition = {
|
|
|
34996
35187
|
baseClass: "",
|
|
34997
35188
|
spacing: "spacious",
|
|
34998
35189
|
children: sectionContainer([cart(withApiBindings({
|
|
35190
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
34999
35191
|
mode: "cart",
|
|
35000
35192
|
heading: { $bind: {
|
|
35001
35193
|
from: "content.heading",
|
|
@@ -35079,6 +35271,7 @@ const checkoutBlockDefinition = {
|
|
|
35079
35271
|
baseClass: "",
|
|
35080
35272
|
spacing: "spacious",
|
|
35081
35273
|
children: sectionContainer([checkout(withApiBindings({
|
|
35274
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
35082
35275
|
mode: "checkout",
|
|
35083
35276
|
heading: { $bind: {
|
|
35084
35277
|
from: "content.heading",
|
|
@@ -37739,8 +37932,8 @@ const builtinTransformDefinitions = [
|
|
|
37739
37932
|
summary: "Choose the read projection required by the calendar display mode",
|
|
37740
37933
|
schema: z.object({ job: z.enum(["list", "calendar"]) }),
|
|
37741
37934
|
run(value, options) {
|
|
37742
|
-
const
|
|
37743
|
-
return
|
|
37935
|
+
const plan = resolveEventCalendarReadPlan(asPartialObject(value) ?? {});
|
|
37936
|
+
return plan.jobs === "both" || plan.jobs === options.job;
|
|
37744
37937
|
}
|
|
37745
37938
|
},
|
|
37746
37939
|
{
|
|
@@ -37753,6 +37946,7 @@ const builtinTransformDefinitions = [
|
|
|
37753
37946
|
},
|
|
37754
37947
|
...formattingTransforms,
|
|
37755
37948
|
...layoutTransforms,
|
|
37949
|
+
...chromeLogoTransforms,
|
|
37756
37950
|
...uiTransforms,
|
|
37757
37951
|
...mediaTransforms,
|
|
37758
37952
|
...backgroundTransforms,
|