@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
package/dist/server/config.mjs
CHANGED
|
@@ -3682,6 +3682,8 @@ z.discriminatedUnion("kind", navigationLinkInputSchemaOptions);
|
|
|
3682
3682
|
//#endregion
|
|
3683
3683
|
//#region ../theme-core/src/palette/utils/colorConversion.ts
|
|
3684
3684
|
const clamp01 = (x) => Math.max(0, Math.min(1, x));
|
|
3685
|
+
const mod = (a, n) => (a % n + n) % n;
|
|
3686
|
+
const deg = (x) => mod(x, 360);
|
|
3685
3687
|
function hexToRgb(hex) {
|
|
3686
3688
|
const h = hex.replace(/^#/, "");
|
|
3687
3689
|
const m = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
|
|
@@ -3704,6 +3706,45 @@ function srgbToLinear(u) {
|
|
|
3704
3706
|
function linearToSrgb(x) {
|
|
3705
3707
|
return clamp01(x <= .0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - .055) * 255;
|
|
3706
3708
|
}
|
|
3709
|
+
function rgbToHsl(r, g, b) {
|
|
3710
|
+
const R = r / 255, G = g / 255, B = b / 255;
|
|
3711
|
+
const max = Math.max(R, G, B), min = Math.min(R, G, B);
|
|
3712
|
+
const d = max - min;
|
|
3713
|
+
let h = 0;
|
|
3714
|
+
if (d !== 0) {
|
|
3715
|
+
switch (max) {
|
|
3716
|
+
case R:
|
|
3717
|
+
h = (G - B) / d + (G < B ? 6 : 0);
|
|
3718
|
+
break;
|
|
3719
|
+
case G:
|
|
3720
|
+
h = (B - R) / d + 2;
|
|
3721
|
+
break;
|
|
3722
|
+
case B:
|
|
3723
|
+
h = (R - G) / d + 4;
|
|
3724
|
+
break;
|
|
3725
|
+
}
|
|
3726
|
+
h *= 60;
|
|
3727
|
+
}
|
|
3728
|
+
const l = (max + min) / 2;
|
|
3729
|
+
const s = d === 0 ? 0 : d / (1 - Math.abs(2 * l - 1));
|
|
3730
|
+
return {
|
|
3731
|
+
h,
|
|
3732
|
+
s,
|
|
3733
|
+
l
|
|
3734
|
+
};
|
|
3735
|
+
}
|
|
3736
|
+
function srgbToOklab(r, g, b) {
|
|
3737
|
+
const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
|
|
3738
|
+
const l = .4122214708 * R + .5363325363 * G + .0514459929 * B;
|
|
3739
|
+
const m = .2119034982 * R + .6806995451 * G + .1073969566 * B;
|
|
3740
|
+
const s = .0883024619 * R + .2817188376 * G + .6299787005 * B;
|
|
3741
|
+
const l_ = Math.cbrt(l), m_ = Math.cbrt(m), s_ = Math.cbrt(s);
|
|
3742
|
+
return {
|
|
3743
|
+
L: .2104542553 * l_ + .793617785 * m_ - .0040720468 * s_,
|
|
3744
|
+
a: 1.9779984951 * l_ - 2.428592205 * m_ + .4505937099 * s_,
|
|
3745
|
+
b: .0259040371 * l_ + .7827717662 * m_ - .808675766 * s_
|
|
3746
|
+
};
|
|
3747
|
+
}
|
|
3707
3748
|
function oklabToSrgb(L, a, b) {
|
|
3708
3749
|
const l_ = Math.pow(L + .3963377774 * a + .2158037573 * b, 3);
|
|
3709
3750
|
const m_ = Math.pow(L - .1055613458 * a - .0638541728 * b, 3);
|
|
@@ -3717,6 +3758,14 @@ function oklabToSrgb(L, a, b) {
|
|
|
3717
3758
|
b: linearToSrgb(B)
|
|
3718
3759
|
};
|
|
3719
3760
|
}
|
|
3761
|
+
function oklabToOklch(L, a, b) {
|
|
3762
|
+
const C = Math.sqrt(a * a + b * b);
|
|
3763
|
+
return {
|
|
3764
|
+
L,
|
|
3765
|
+
C,
|
|
3766
|
+
h: C < 1e-7 ? 0 : deg(Math.atan2(b, a) * 180 / Math.PI)
|
|
3767
|
+
};
|
|
3768
|
+
}
|
|
3720
3769
|
function oklchToOklab(L, C, h) {
|
|
3721
3770
|
const hr = h * Math.PI / 180;
|
|
3722
3771
|
return {
|
|
@@ -3725,6 +3774,27 @@ function oklchToOklab(L, C, h) {
|
|
|
3725
3774
|
b: C * Math.sin(hr)
|
|
3726
3775
|
};
|
|
3727
3776
|
}
|
|
3777
|
+
function featuresFromHex(hex) {
|
|
3778
|
+
const { r, g, b } = hexToRgb(hex);
|
|
3779
|
+
const { h, s, l } = rgbToHsl(r, g, b);
|
|
3780
|
+
const { L, a, b: b2 } = srgbToOklab(r, g, b);
|
|
3781
|
+
const { L: okL, C: okC, h: okH } = oklabToOklch(L, a, b2);
|
|
3782
|
+
return {
|
|
3783
|
+
r,
|
|
3784
|
+
g,
|
|
3785
|
+
b,
|
|
3786
|
+
h,
|
|
3787
|
+
s,
|
|
3788
|
+
l,
|
|
3789
|
+
v: Math.max(r, g, b) / 255,
|
|
3790
|
+
Y: .2126 * srgbToLinear(r) + .7152 * srgbToLinear(g) + .0722 * srgbToLinear(b),
|
|
3791
|
+
chroma: s,
|
|
3792
|
+
okL,
|
|
3793
|
+
okC,
|
|
3794
|
+
okH,
|
|
3795
|
+
hex
|
|
3796
|
+
};
|
|
3797
|
+
}
|
|
3728
3798
|
function relativeLuminance(r, g, b) {
|
|
3729
3799
|
const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
|
|
3730
3800
|
return .2126 * R + .7152 * G + .0722 * B;
|
|
@@ -6808,6 +6878,36 @@ function normalizedReference(value) {
|
|
|
6808
6878
|
return normalized.length > 0 ? normalized : null;
|
|
6809
6879
|
}
|
|
6810
6880
|
//#endregion
|
|
6881
|
+
//#region ../theme-core/src/surfaces/logoVariant.ts
|
|
6882
|
+
/** Concrete hex behind a plain, opaque palette token, or null otherwise. */
|
|
6883
|
+
function opaquePaletteHexForToken(expandedPalette, token) {
|
|
6884
|
+
if (!token) return null;
|
|
6885
|
+
const parts = parseColorTokenParts(token);
|
|
6886
|
+
if (parts.kind !== "token" || parts.opacityPercent !== null) return null;
|
|
6887
|
+
return expandedPalette[parts.token] ?? null;
|
|
6888
|
+
}
|
|
6889
|
+
/**
|
|
6890
|
+
* Tone of the surface a foreground token was resolved for.
|
|
6891
|
+
*
|
|
6892
|
+
* A token with opacity has no known underlay to composite against, and a raw
|
|
6893
|
+
* or unrecognised token has no palette hex, so both are `unknown` rather than
|
|
6894
|
+
* a guess.
|
|
6895
|
+
*/
|
|
6896
|
+
function surfaceToneFromForegroundToken(expandedPalette, foregroundToken) {
|
|
6897
|
+
const hex = opaquePaletteHexForToken(expandedPalette, foregroundToken);
|
|
6898
|
+
if (!hex) return "unknown";
|
|
6899
|
+
return featuresFromHex(hex).Y >= .5 ? "dark" : "light";
|
|
6900
|
+
}
|
|
6901
|
+
/**
|
|
6902
|
+
* The logo to draw on a surface of the given tone. A missing variant falls
|
|
6903
|
+
* back to the other one, and an unknown tone uses the light-backgrounds logo,
|
|
6904
|
+
* which is what every site rendered before variants existed.
|
|
6905
|
+
*/
|
|
6906
|
+
function selectLogoVariant(tone, variants) {
|
|
6907
|
+
const { forLightBackgrounds, forDarkBackgrounds } = variants;
|
|
6908
|
+
return tone === "dark" ? forDarkBackgrounds ?? forLightBackgrounds : forLightBackgrounds ?? forDarkBackgrounds;
|
|
6909
|
+
}
|
|
6910
|
+
//#endregion
|
|
6811
6911
|
//#region ../theme-core/src/utils/colorStyles.ts
|
|
6812
6912
|
const COLOR_VAR_PREFIX = "--tb-";
|
|
6813
6913
|
function parseToken(source) {
|
|
@@ -6859,16 +6959,28 @@ function backgroundColorStyle(token) {
|
|
|
6859
6959
|
return { backgroundColor: rgbColorValue(token) };
|
|
6860
6960
|
}
|
|
6861
6961
|
/**
|
|
6962
|
+
* Converts a text color token to a CSS color value that follows the enclosing
|
|
6963
|
+
* surface. The semantic text tokens (`text`, `heading`, `mutedText`) resolve
|
|
6964
|
+
* to the surface foreground variables, so text adapts when a section's
|
|
6965
|
+
* background changes; any other token is a fixed theme color.
|
|
6966
|
+
*
|
|
6967
|
+
* @param token - Theme color token
|
|
6968
|
+
* @returns CSS color value
|
|
6969
|
+
*/
|
|
6970
|
+
function textColorValue(token) {
|
|
6971
|
+
const parsed = parseToken(token);
|
|
6972
|
+
const surfaceRole = parsed.raw ? null : surfaceRoleForTextToken(parsed.token);
|
|
6973
|
+
if (!surfaceRole) return rgbColorValue(token);
|
|
6974
|
+
return parsed.opacityPercent === void 0 ? surfaceForegroundValue(surfaceRole) : surfaceForegroundValueWithOpacity(surfaceRole, parsed.opacityPercent);
|
|
6975
|
+
}
|
|
6976
|
+
/**
|
|
6862
6977
|
* Creates a text color style object from a theme token.
|
|
6863
6978
|
*
|
|
6864
6979
|
* @param token - Theme color token
|
|
6865
6980
|
* @returns CSSProperties with color
|
|
6866
6981
|
*/
|
|
6867
6982
|
function textColorStyle(token) {
|
|
6868
|
-
|
|
6869
|
-
const surfaceRole = parsed.raw ? null : surfaceRoleForTextToken(parsed.token);
|
|
6870
|
-
if (surfaceRole) return { color: parsed.opacityPercent === void 0 ? surfaceForegroundValue(surfaceRole) : surfaceForegroundValueWithOpacity(surfaceRole, parsed.opacityPercent) };
|
|
6871
|
-
return { color: rgbColorValue(token) };
|
|
6983
|
+
return { color: textColorValue(token) };
|
|
6872
6984
|
}
|
|
6873
6985
|
/**
|
|
6874
6986
|
* Creates a border color style object from a theme token.
|
|
@@ -18680,9 +18792,7 @@ function navRow(opts) {
|
|
|
18680
18792
|
rel: { $bind: { from: `${childItemName}.rel` } },
|
|
18681
18793
|
"data-active": { $bind: { from: `${childItemName}.active` } }
|
|
18682
18794
|
}, [text({ as: "span" }, bind(`${childItemName}.label`))], repeat(`${itemName}.children`, childItemName));
|
|
18683
|
-
const dropdown = el("div", { className: "nav-dropdown rb-relative" }, [
|
|
18684
|
-
type: "button",
|
|
18685
|
-
variantId: "",
|
|
18795
|
+
const dropdown = el("div", { className: "nav-dropdown rb-relative" }, [el("headerControl", {
|
|
18686
18796
|
className: prependClassName("nav-dropdown-trigger", linkClassName),
|
|
18687
18797
|
"aria-haspopup": "menu",
|
|
18688
18798
|
"aria-expanded": "false",
|
|
@@ -18750,9 +18860,7 @@ function navColumn(opts) {
|
|
|
18750
18860
|
const dropdown = el("div", {
|
|
18751
18861
|
className: "nav-mobile-dropdown",
|
|
18752
18862
|
"data-nav-mobile-dropdown": "true"
|
|
18753
|
-
}, [
|
|
18754
|
-
type: "button",
|
|
18755
|
-
variantId: "",
|
|
18863
|
+
}, [el("headerControl", {
|
|
18756
18864
|
className: triggerClassName,
|
|
18757
18865
|
"aria-expanded": "false",
|
|
18758
18866
|
"aria-controls": childrenId,
|
|
@@ -25059,6 +25167,49 @@ const layoutTransforms = [
|
|
|
25059
25167
|
footerLogoMediaClassTransform,
|
|
25060
25168
|
footerLogoTextVisibleTransform
|
|
25061
25169
|
];
|
|
25170
|
+
//#endregion
|
|
25171
|
+
//#region ../blocks/src/system/transforms/registry/chromeLogo.ts
|
|
25172
|
+
const chromeLogoSchema = z.object({ surface: z.enum([
|
|
25173
|
+
"header-root",
|
|
25174
|
+
"header-mobile-panel",
|
|
25175
|
+
"footer-root"
|
|
25176
|
+
]) });
|
|
25177
|
+
/** The brand foreground shares the logo's surface; navigation may own a separate capsule. */
|
|
25178
|
+
function chromeSurfaceTextToken(surface, theme, palette) {
|
|
25179
|
+
switch (surface) {
|
|
25180
|
+
case "header-root": {
|
|
25181
|
+
const header = theme.header;
|
|
25182
|
+
const foreground = resolveHeaderRootForeground(header, palette, resolveHeaderVisualStyles(header).isTransparent);
|
|
25183
|
+
return foreground.kind === "known" ? foreground.roles.text : resolveHeaderLeafTextColor(header);
|
|
25184
|
+
}
|
|
25185
|
+
case "header-mobile-panel": return theme.header?.dropdownStyle?.textColor ?? "text";
|
|
25186
|
+
case "footer-root": {
|
|
25187
|
+
const foreground = resolveFooterRootForeground(theme.footer, palette);
|
|
25188
|
+
return foreground.kind === "known" ? foreground.roles.text : void 0;
|
|
25189
|
+
}
|
|
25190
|
+
}
|
|
25191
|
+
}
|
|
25192
|
+
function readChromeTheme(viewModel) {
|
|
25193
|
+
return asPartialObject(asPartialObject(viewModel?.["$root"])?.theme) ?? {};
|
|
25194
|
+
}
|
|
25195
|
+
function resolveChromeSurfaceTone(surface, context) {
|
|
25196
|
+
return surfaceToneFromForegroundToken(context.theme.palette, chromeSurfaceTextToken(surface, readChromeTheme(context.viewModel), context.theme.palette));
|
|
25197
|
+
}
|
|
25198
|
+
const chromeLogoTransforms = [{
|
|
25199
|
+
id: "layout.chromeLogo",
|
|
25200
|
+
kind: "formatter",
|
|
25201
|
+
summary: "Select the light- or dark-background site logo for a header or footer surface",
|
|
25202
|
+
schema: chromeLogoSchema,
|
|
25203
|
+
run: (value, options, context) => {
|
|
25204
|
+
const content = asPartialObject(value);
|
|
25205
|
+
const variants = asPartialObject(content?.logoVariants);
|
|
25206
|
+
if (!variants) return content?.logo ?? null;
|
|
25207
|
+
return selectLogoVariant(resolveChromeSurfaceTone(options.surface, context), {
|
|
25208
|
+
forLightBackgrounds: variants.forLightBackgrounds ?? null,
|
|
25209
|
+
forDarkBackgrounds: variants.forDarkBackgrounds ?? null
|
|
25210
|
+
});
|
|
25211
|
+
}
|
|
25212
|
+
}];
|
|
25062
25213
|
const headerRuntimeTransforms = [{
|
|
25063
25214
|
id: "layout.headerRuntimeContract",
|
|
25064
25215
|
kind: "formatter",
|
|
@@ -25266,46 +25417,42 @@ const whenTransformed = (from, transformId, equals = true) => (node) => ({
|
|
|
25266
25417
|
equals
|
|
25267
25418
|
}
|
|
25268
25419
|
});
|
|
25269
|
-
|
|
25420
|
+
/** Draw whichever site logo suits the surface this row sits on. */
|
|
25421
|
+
const bindChromeLogo = (surface) => bind("content", { transforms: [{
|
|
25422
|
+
id: "layout.chromeLogo",
|
|
25423
|
+
options: { surface }
|
|
25424
|
+
}] });
|
|
25425
|
+
/**
|
|
25426
|
+
* The brand link. The logo is chosen per surface because the open mobile menu
|
|
25427
|
+
* paints its own background, which may be the opposite tone to the header.
|
|
25428
|
+
*/
|
|
25429
|
+
const createLogoRow = (surface) => link({
|
|
25270
25430
|
href: "/",
|
|
25271
25431
|
className: bindProp("$root.theme.header.logo", {
|
|
25272
25432
|
transforms: pipe(tx("layout.headerLogoClass")),
|
|
25273
25433
|
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"
|
|
25274
25434
|
})
|
|
25275
|
-
}, [
|
|
25276
|
-
|
|
25277
|
-
|
|
25278
|
-
|
|
25279
|
-
|
|
25280
|
-
|
|
25281
|
-
|
|
25282
|
-
|
|
25283
|
-
}) }, when("site.logo"), bind("site.logo"))], when("content.logo", { not: true })),
|
|
25284
|
-
text({
|
|
25285
|
-
as: "strong",
|
|
25286
|
-
className: "header-logo-text rb-truncate"
|
|
25287
|
-
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))
|
|
25288
|
-
]);
|
|
25435
|
+
}, [media({ className: bindProp("$root.theme.header.logo", {
|
|
25436
|
+
transforms: pipe(tx("layout.headerLogoMediaClass", { base: "rb-header-logo-sm rb-w-auto rb-transition-all rb-duration-300" })),
|
|
25437
|
+
fallback: "rb-header-logo-sm rb-w-auto rb-transition-all rb-duration-300"
|
|
25438
|
+
}) }, when("content.logo"), bindChromeLogo(surface)), text({
|
|
25439
|
+
as: "strong",
|
|
25440
|
+
className: "header-logo-text rb-truncate"
|
|
25441
|
+
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))]);
|
|
25442
|
+
const logoRow = createLogoRow("header-root");
|
|
25289
25443
|
const centeredLogoRow = link({
|
|
25290
25444
|
href: "/",
|
|
25291
25445
|
className: bindProp("$root.theme.header.logo", {
|
|
25292
25446
|
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" })),
|
|
25293
25447
|
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"
|
|
25294
25448
|
})
|
|
25295
|
-
}, [
|
|
25296
|
-
|
|
25297
|
-
|
|
25298
|
-
|
|
25299
|
-
|
|
25300
|
-
|
|
25301
|
-
|
|
25302
|
-
fallback: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300"
|
|
25303
|
-
}) }, when("site.logo"), bind("site.logo"))], when("content.logo", { not: true })),
|
|
25304
|
-
text({
|
|
25305
|
-
as: "strong",
|
|
25306
|
-
className: "header-logo-text"
|
|
25307
|
-
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))
|
|
25308
|
-
]);
|
|
25449
|
+
}, [media({ className: bindProp("$root.theme.header.logo", {
|
|
25450
|
+
transforms: pipe(tx("layout.headerLogoMediaClass", { base: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300" })),
|
|
25451
|
+
fallback: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300"
|
|
25452
|
+
}) }, when("content.logo"), bindChromeLogo("header-root")), text({
|
|
25453
|
+
as: "strong",
|
|
25454
|
+
className: "header-logo-text"
|
|
25455
|
+
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))]);
|
|
25309
25456
|
const createNavRow = (className, align = "end") => navRow({
|
|
25310
25457
|
className: `${className} header-nav-row`,
|
|
25311
25458
|
align,
|
|
@@ -25345,10 +25492,8 @@ const mobileToggleIcon = stack({
|
|
|
25345
25492
|
}
|
|
25346
25493
|
]);
|
|
25347
25494
|
const mobileToggleButton = {
|
|
25348
|
-
type: "
|
|
25495
|
+
type: "headerControl",
|
|
25349
25496
|
props: {
|
|
25350
|
-
type: "button",
|
|
25351
|
-
variantId: "",
|
|
25352
25497
|
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`,
|
|
25353
25498
|
"aria-label": "Open menu",
|
|
25354
25499
|
"aria-expanded": "false",
|
|
@@ -25358,10 +25503,8 @@ const mobileToggleButton = {
|
|
|
25358
25503
|
children: [mobileToggleIcon]
|
|
25359
25504
|
};
|
|
25360
25505
|
const mobileOverlayToggleButton = {
|
|
25361
|
-
type: "
|
|
25506
|
+
type: "headerControl",
|
|
25362
25507
|
props: {
|
|
25363
|
-
type: "button",
|
|
25364
|
-
variantId: "",
|
|
25365
25508
|
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",
|
|
25366
25509
|
"aria-label": "Open menu",
|
|
25367
25510
|
"aria-expanded": "false",
|
|
@@ -25385,7 +25528,7 @@ const mobileOverlayHeader = inline({
|
|
|
25385
25528
|
align: "center",
|
|
25386
25529
|
justify: "between",
|
|
25387
25530
|
style: borderColorStyle("border")
|
|
25388
|
-
}, [
|
|
25531
|
+
}, [createLogoRow("header-mobile-panel"), mobileOverlayToggleButton]);
|
|
25389
25532
|
const mobileOverlayBody = stack({
|
|
25390
25533
|
className: "rb-flex-1 rb-px-6 rb-py-6",
|
|
25391
25534
|
gap: "md",
|
|
@@ -25572,7 +25715,10 @@ const brandLogo = link({
|
|
|
25572
25715
|
options: { base: "rb-h-10 rb-w-auto" }
|
|
25573
25716
|
}],
|
|
25574
25717
|
fallback: "rb-h-10 rb-w-auto"
|
|
25575
|
-
} } }, when("module.showLogo", { equals: true }), when("content.logo"), bind("content
|
|
25718
|
+
} } }, when("module.showLogo", { equals: true }), when("content.logo"), bind("content", { transforms: [{
|
|
25719
|
+
id: "layout.chromeLogo",
|
|
25720
|
+
options: { surface: "footer-root" }
|
|
25721
|
+
}] })), text({
|
|
25576
25722
|
as: "strong",
|
|
25577
25723
|
className: "footer-logo-text rb-nav-text"
|
|
25578
25724
|
}, when("module.showTitle", { equals: true }), bind("site.title", { fallback: "Your Site" }))], when("module.kind", { equals: "brand" }));
|
|
@@ -28288,6 +28434,12 @@ const occurrenceContextSchema = z.object({
|
|
|
28288
28434
|
capacityOverride: z.number().nullable().optional(),
|
|
28289
28435
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
28290
28436
|
}).nullable();
|
|
28437
|
+
//#endregion
|
|
28438
|
+
//#region ../blocks/src/system/runtime/api/readAuthority.ts
|
|
28439
|
+
const browserReadAuthoritySchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("published") }).strict(), z.object({
|
|
28440
|
+
kind: z.literal("preview"),
|
|
28441
|
+
token: z.string().min(1)
|
|
28442
|
+
}).strict()]);
|
|
28291
28443
|
const unsupportedEventRegistrationPageSurfaceSubjectSchema = z.object({
|
|
28292
28444
|
kind: z.literal("unsupported"),
|
|
28293
28445
|
reason: z.enum([
|
|
@@ -28398,6 +28550,33 @@ function normalizeEventCalendarDisplayMode$1(input) {
|
|
|
28398
28550
|
if (isEventCalendarDisplayMode(input.variant)) return input.variant;
|
|
28399
28551
|
return isEventCalendarDisplayMode(input.displayMode) ? input.displayMode : void 0;
|
|
28400
28552
|
}
|
|
28553
|
+
/** One closed authority for the projections required by each rendered mode. */
|
|
28554
|
+
function resolveEventCalendarReadPlan(input) {
|
|
28555
|
+
const mode = normalizeEventCalendarDisplayMode$1(input) ?? "combined";
|
|
28556
|
+
switch (mode) {
|
|
28557
|
+
case "combined": return {
|
|
28558
|
+
mode,
|
|
28559
|
+
jobs: "both",
|
|
28560
|
+
readProfile: "listing-card"
|
|
28561
|
+
};
|
|
28562
|
+
case "list": return {
|
|
28563
|
+
mode,
|
|
28564
|
+
jobs: "list",
|
|
28565
|
+
readProfile: "listing-card"
|
|
28566
|
+
};
|
|
28567
|
+
case "calendar": return {
|
|
28568
|
+
mode,
|
|
28569
|
+
jobs: "calendar",
|
|
28570
|
+
readProfile: "listing-card"
|
|
28571
|
+
};
|
|
28572
|
+
case "timetable":
|
|
28573
|
+
case "week-board": return {
|
|
28574
|
+
mode,
|
|
28575
|
+
jobs: "calendar",
|
|
28576
|
+
readProfile: "timetable"
|
|
28577
|
+
};
|
|
28578
|
+
}
|
|
28579
|
+
}
|
|
28401
28580
|
function isEventCalendarDefaultView(value) {
|
|
28402
28581
|
return typeof value === "string" && eventCalendarDefaultViewValues.includes(value);
|
|
28403
28582
|
}
|
|
@@ -28592,6 +28771,7 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
28592
28771
|
apiBaseUrl: z.string().optional(),
|
|
28593
28772
|
portalToken: z.string().nullable().optional(),
|
|
28594
28773
|
previewToken: z.string().nullable().optional(),
|
|
28774
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
28595
28775
|
...eventRegistrationHydrationSchemaShape,
|
|
28596
28776
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
28597
28777
|
wholeSeriesRunEvents: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
@@ -28629,6 +28809,7 @@ z.object({
|
|
|
28629
28809
|
apiBaseUrl: z.string().optional(),
|
|
28630
28810
|
portalToken: z.string().nullable().optional(),
|
|
28631
28811
|
previewToken: z.string().nullable().optional(),
|
|
28812
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
28632
28813
|
stage: previewStageSchema.optional()
|
|
28633
28814
|
});
|
|
28634
28815
|
function buildEventRegistrationDisplayFromScopedEvents(source, scopedSourceEvents) {
|
|
@@ -28887,6 +29068,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
28887
29068
|
text({ as: "h2" }, bind("content.heading"), when("content.heading")),
|
|
28888
29069
|
richText({ className: "rb-prose rb-max-w-none" }, bind("content.description"), when("content.description")),
|
|
28889
29070
|
eventRegistration(withApiBindings({
|
|
29071
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
28890
29072
|
occurrenceContext: { $bind: { from: "$root.occurrenceContext" } },
|
|
28891
29073
|
subject: { $bind: { from: "$root.subject" } },
|
|
28892
29074
|
portalToken: { $bind: {
|
|
@@ -29519,8 +29701,7 @@ function resolveEventListPaginationAction(input) {
|
|
|
29519
29701
|
//#endregion
|
|
29520
29702
|
//#region ../blocks/src/system/blocks/events/shared/calendarWindow.ts
|
|
29521
29703
|
function resolveCalendarReadProfile(content) {
|
|
29522
|
-
|
|
29523
|
-
return mode === "timetable" || mode === "week-board" ? "timetable" : "listing-card";
|
|
29704
|
+
return resolveEventCalendarReadPlan(content).readProfile;
|
|
29524
29705
|
}
|
|
29525
29706
|
/** Runtime picker sentinels and bound loader IDs must describe the same query. */
|
|
29526
29707
|
function normalizeCalendarFilterId(value) {
|
|
@@ -29630,6 +29811,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
29630
29811
|
events: z.array(publicEventSchema).nullable().optional(),
|
|
29631
29812
|
siteId: z.string(),
|
|
29632
29813
|
apiBaseUrl: z.string().optional(),
|
|
29814
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
29633
29815
|
stage: previewStageSchema.optional(),
|
|
29634
29816
|
listLayout: eventLayoutSchema.optional(),
|
|
29635
29817
|
listColumns: columnOptionSchema.optional(),
|
|
@@ -29682,7 +29864,6 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
29682
29864
|
const eventCollectionHydrationSchema = z.object({
|
|
29683
29865
|
siteId: z.string(),
|
|
29684
29866
|
calendarWindow: calendarWindowPageSchema.optional(),
|
|
29685
|
-
stage: previewStageSchema.optional(),
|
|
29686
29867
|
prefetchedEvents: z.boolean(),
|
|
29687
29868
|
eventSurface: eventSurfaceScopeSchema$1,
|
|
29688
29869
|
filterEventPresets: z.string().nullable(),
|
|
@@ -29757,7 +29938,6 @@ function buildEventCollectionHydration(source, now = /* @__PURE__ */ new Date())
|
|
|
29757
29938
|
return {
|
|
29758
29939
|
calendarWindow: source.calendarWindow ?? void 0,
|
|
29759
29940
|
siteId: source.siteId,
|
|
29760
|
-
stage: source.stage,
|
|
29761
29941
|
prefetchedEvents: source.events != null,
|
|
29762
29942
|
eventSurface: selected ? "all" : normalizeEventSurfaceScope(source.eventSurface),
|
|
29763
29943
|
filterEventPresets: selected ? null : normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
@@ -29777,6 +29957,7 @@ const eventListingSourceSchema = z.object({
|
|
|
29777
29957
|
events: z.array(publicEventSchema).nullable().optional(),
|
|
29778
29958
|
siteId: z.string(),
|
|
29779
29959
|
apiBaseUrl: z.string().optional(),
|
|
29960
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
29780
29961
|
stage: previewStageSchema.optional(),
|
|
29781
29962
|
layout: eventLayoutSchema.optional(),
|
|
29782
29963
|
columns: columnOptionSchema.optional(),
|
|
@@ -29817,7 +29998,6 @@ const eventListingDisplaySchema = z.object({
|
|
|
29817
29998
|
});
|
|
29818
29999
|
const eventListingHydrationSchema = z.object({
|
|
29819
30000
|
siteId: z.string(),
|
|
29820
|
-
stage: previewStageSchema.optional(),
|
|
29821
30001
|
eventsPerPage: eventPageSizeSchema,
|
|
29822
30002
|
paginationAction: eventListPaginationActionSchema,
|
|
29823
30003
|
showFilters: z.boolean(),
|
|
@@ -29840,6 +30020,7 @@ const eventListingRenderSchema = z.object({
|
|
|
29840
30020
|
z.object({
|
|
29841
30021
|
siteId: z.string(),
|
|
29842
30022
|
apiBaseUrl: z.string().optional(),
|
|
30023
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
29843
30024
|
stage: previewStageSchema.optional()
|
|
29844
30025
|
});
|
|
29845
30026
|
const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
@@ -29874,7 +30055,6 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
29874
30055
|
},
|
|
29875
30056
|
hydration: {
|
|
29876
30057
|
siteId: source.siteId,
|
|
29877
|
-
stage: source.stage,
|
|
29878
30058
|
eventsPerPage: pageSize,
|
|
29879
30059
|
paginationAction: resolveEventListPaginationAction({
|
|
29880
30060
|
paginationMode: source.paginationMode,
|
|
@@ -30156,6 +30336,7 @@ const eventListingBlockDefinition = {
|
|
|
30156
30336
|
rootType: "stack",
|
|
30157
30337
|
rootProps: { gap: "lg" },
|
|
30158
30338
|
children: [...eventSectionHeaderLayoutNodes(), el("event-listing", withApiBindings({
|
|
30339
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
30159
30340
|
events: { $bind: { from: "data.events" } },
|
|
30160
30341
|
stage: { $bind: {
|
|
30161
30342
|
from: "$root.previewStage",
|
|
@@ -30353,6 +30534,7 @@ const eventCalendarRenderSchema = z.object({
|
|
|
30353
30534
|
z.object({
|
|
30354
30535
|
siteId: z.string(),
|
|
30355
30536
|
apiBaseUrl: z.string().optional(),
|
|
30537
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
30356
30538
|
stage: previewStageSchema.optional()
|
|
30357
30539
|
});
|
|
30358
30540
|
/**
|
|
@@ -30374,7 +30556,7 @@ function buildEventCalendarDisplay(source) {
|
|
|
30374
30556
|
listColumns: source.listColumns ?? source.columns
|
|
30375
30557
|
}),
|
|
30376
30558
|
kind: "event-calendar",
|
|
30377
|
-
displayMode:
|
|
30559
|
+
displayMode: resolveEventCalendarReadPlan(source).mode,
|
|
30378
30560
|
className: source.className ?? null,
|
|
30379
30561
|
events: (source.events ?? []).slice().sort((left, right) => new Date(left.startsAt).getTime() - new Date(right.startsAt).getTime()),
|
|
30380
30562
|
boardTitle: normalizeOptionalText(source.boardTitle),
|
|
@@ -30391,13 +30573,16 @@ const eventCalendarBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
30391
30573
|
source: createZodCodec(eventCalendarSourceSchema),
|
|
30392
30574
|
render: createZodCodec(eventCalendarRenderSchema)
|
|
30393
30575
|
},
|
|
30394
|
-
buildRender: (source) =>
|
|
30395
|
-
|
|
30396
|
-
|
|
30397
|
-
|
|
30398
|
-
|
|
30399
|
-
|
|
30400
|
-
|
|
30576
|
+
buildRender: (source) => {
|
|
30577
|
+
const plan = resolveEventCalendarReadPlan(source);
|
|
30578
|
+
return {
|
|
30579
|
+
display: buildEventCalendarDisplay(source.calendarWindow && plan.jobs === "calendar" ? {
|
|
30580
|
+
...source,
|
|
30581
|
+
events: source.calendarWindow.events
|
|
30582
|
+
} : source),
|
|
30583
|
+
hydration: buildEventCollectionHydration(source)
|
|
30584
|
+
};
|
|
30585
|
+
}
|
|
30401
30586
|
});
|
|
30402
30587
|
//#endregion
|
|
30403
30588
|
//#region ../blocks/src/system/blocks/events/eventCalendarDataLoaders.ts
|
|
@@ -30547,6 +30732,7 @@ const eventCalendarLayout = [styledSection({
|
|
|
30547
30732
|
rootType: "stack",
|
|
30548
30733
|
rootProps: { gap: "lg" },
|
|
30549
30734
|
children: [...eventSectionHeaderLayoutNodes({ splitClassName: "event-section-head event-section-head--split" }), el("event-calendar", withApiBindings({
|
|
30735
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
30550
30736
|
events: { $bind: { from: "data.events" } },
|
|
30551
30737
|
calendarWindow: { $bind: { from: "data.calendarWindow" } },
|
|
30552
30738
|
stage: { $bind: {
|
|
@@ -34110,6 +34296,7 @@ const shopSourceSchema = z.object({
|
|
|
34110
34296
|
products: z.array(publicProductSchema).nullable().optional(),
|
|
34111
34297
|
siteId: z.string().optional(),
|
|
34112
34298
|
apiBaseUrl: z.string().optional(),
|
|
34299
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
34113
34300
|
stage: previewStageSchema.optional()
|
|
34114
34301
|
});
|
|
34115
34302
|
const productVariantOptionDisplaySchema = z.object({
|
|
@@ -34277,6 +34464,7 @@ function resolveShowPricePerCredit(source) {
|
|
|
34277
34464
|
z.object({
|
|
34278
34465
|
siteId: z.string().optional(),
|
|
34279
34466
|
apiBaseUrl: z.string().optional(),
|
|
34467
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
34280
34468
|
stage: previewStageSchema.optional()
|
|
34281
34469
|
});
|
|
34282
34470
|
const shopBlockRuntime = defineProgressiveBlockRuntime({
|
|
@@ -34617,6 +34805,7 @@ const shopBlockDefinition = {
|
|
|
34617
34805
|
baseClass: "",
|
|
34618
34806
|
spacing: "spacious",
|
|
34619
34807
|
children: sectionContainer([shop(withApiBindings({
|
|
34808
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
34620
34809
|
mode: "passes-memberships",
|
|
34621
34810
|
showPasses: { $bind: {
|
|
34622
34811
|
from: "content.showPasses",
|
|
@@ -34815,6 +35004,7 @@ const productListBlockDefinition = {
|
|
|
34815
35004
|
baseClass: "",
|
|
34816
35005
|
spacing: "spacious",
|
|
34817
35006
|
children: sectionContainer([productList(withApiBindings({
|
|
35007
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
34818
35008
|
mode: "product-list",
|
|
34819
35009
|
heading: { $bind: {
|
|
34820
35010
|
from: "content.heading",
|
|
@@ -34957,6 +35147,7 @@ const productDetailBlockDefinition = {
|
|
|
34957
35147
|
baseClass: "",
|
|
34958
35148
|
spacing: "spacious",
|
|
34959
35149
|
children: sectionContainer([productDetail(withApiBindings({
|
|
35150
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
34960
35151
|
mode: "product-detail",
|
|
34961
35152
|
heading: { $bind: {
|
|
34962
35153
|
from: "content.heading",
|
|
@@ -35073,6 +35264,7 @@ const cartBlockDefinition = {
|
|
|
35073
35264
|
baseClass: "",
|
|
35074
35265
|
spacing: "spacious",
|
|
35075
35266
|
children: sectionContainer([cart(withApiBindings({
|
|
35267
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
35076
35268
|
mode: "cart",
|
|
35077
35269
|
heading: { $bind: {
|
|
35078
35270
|
from: "content.heading",
|
|
@@ -35156,6 +35348,7 @@ const checkoutBlockDefinition = {
|
|
|
35156
35348
|
baseClass: "",
|
|
35157
35349
|
spacing: "spacious",
|
|
35158
35350
|
children: sectionContainer([checkout(withApiBindings({
|
|
35351
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
35159
35352
|
mode: "checkout",
|
|
35160
35353
|
heading: { $bind: {
|
|
35161
35354
|
from: "content.heading",
|
|
@@ -37816,8 +38009,8 @@ const builtinTransformDefinitions = [
|
|
|
37816
38009
|
summary: "Choose the read projection required by the calendar display mode",
|
|
37817
38010
|
schema: z.object({ job: z.enum(["list", "calendar"]) }),
|
|
37818
38011
|
run(value, options) {
|
|
37819
|
-
const
|
|
37820
|
-
return
|
|
38012
|
+
const plan = resolveEventCalendarReadPlan(asPartialObject(value) ?? {});
|
|
38013
|
+
return plan.jobs === "both" || plan.jobs === options.job;
|
|
37821
38014
|
}
|
|
37822
38015
|
},
|
|
37823
38016
|
{
|
|
@@ -37830,6 +38023,7 @@ const builtinTransformDefinitions = [
|
|
|
37830
38023
|
},
|
|
37831
38024
|
...formattingTransforms,
|
|
37832
38025
|
...layoutTransforms,
|
|
38026
|
+
...chromeLogoTransforms,
|
|
37833
38027
|
...uiTransforms,
|
|
37834
38028
|
...mediaTransforms,
|
|
37835
38029
|
...backgroundTransforms,
|