@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/server.mjs
CHANGED
|
@@ -9539,7 +9539,7 @@ var SimpleCache = class {
|
|
|
9539
9539
|
* 1. This constant
|
|
9540
9540
|
* 2. The "version" field in package.json
|
|
9541
9541
|
*/
|
|
9542
|
-
const SDK_VERSION = "0.
|
|
9542
|
+
const SDK_VERSION = "0.144.0";
|
|
9543
9543
|
//#endregion
|
|
9544
9544
|
//#region src/client/error.ts
|
|
9545
9545
|
let _Symbol$for;
|
|
@@ -10606,6 +10606,8 @@ const buttonSystemSchema = z.strictObject({
|
|
|
10606
10606
|
//#endregion
|
|
10607
10607
|
//#region ../theme-core/src/palette/utils/colorConversion.ts
|
|
10608
10608
|
const clamp01 = (x) => Math.max(0, Math.min(1, x));
|
|
10609
|
+
const mod = (a, n) => (a % n + n) % n;
|
|
10610
|
+
const deg = (x) => mod(x, 360);
|
|
10609
10611
|
function hexToRgb(hex) {
|
|
10610
10612
|
const h = hex.replace(/^#/, "");
|
|
10611
10613
|
const m = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
|
|
@@ -10628,6 +10630,45 @@ function srgbToLinear(u) {
|
|
|
10628
10630
|
function linearToSrgb(x) {
|
|
10629
10631
|
return clamp01(x <= .0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - .055) * 255;
|
|
10630
10632
|
}
|
|
10633
|
+
function rgbToHsl(r, g, b) {
|
|
10634
|
+
const R = r / 255, G = g / 255, B = b / 255;
|
|
10635
|
+
const max = Math.max(R, G, B), min = Math.min(R, G, B);
|
|
10636
|
+
const d = max - min;
|
|
10637
|
+
let h = 0;
|
|
10638
|
+
if (d !== 0) {
|
|
10639
|
+
switch (max) {
|
|
10640
|
+
case R:
|
|
10641
|
+
h = (G - B) / d + (G < B ? 6 : 0);
|
|
10642
|
+
break;
|
|
10643
|
+
case G:
|
|
10644
|
+
h = (B - R) / d + 2;
|
|
10645
|
+
break;
|
|
10646
|
+
case B:
|
|
10647
|
+
h = (R - G) / d + 4;
|
|
10648
|
+
break;
|
|
10649
|
+
}
|
|
10650
|
+
h *= 60;
|
|
10651
|
+
}
|
|
10652
|
+
const l = (max + min) / 2;
|
|
10653
|
+
const s = d === 0 ? 0 : d / (1 - Math.abs(2 * l - 1));
|
|
10654
|
+
return {
|
|
10655
|
+
h,
|
|
10656
|
+
s,
|
|
10657
|
+
l
|
|
10658
|
+
};
|
|
10659
|
+
}
|
|
10660
|
+
function srgbToOklab(r, g, b) {
|
|
10661
|
+
const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
|
|
10662
|
+
const l = .4122214708 * R + .5363325363 * G + .0514459929 * B;
|
|
10663
|
+
const m = .2119034982 * R + .6806995451 * G + .1073969566 * B;
|
|
10664
|
+
const s = .0883024619 * R + .2817188376 * G + .6299787005 * B;
|
|
10665
|
+
const l_ = Math.cbrt(l), m_ = Math.cbrt(m), s_ = Math.cbrt(s);
|
|
10666
|
+
return {
|
|
10667
|
+
L: .2104542553 * l_ + .793617785 * m_ - .0040720468 * s_,
|
|
10668
|
+
a: 1.9779984951 * l_ - 2.428592205 * m_ + .4505937099 * s_,
|
|
10669
|
+
b: .0259040371 * l_ + .7827717662 * m_ - .808675766 * s_
|
|
10670
|
+
};
|
|
10671
|
+
}
|
|
10631
10672
|
function oklabToSrgb(L, a, b) {
|
|
10632
10673
|
const l_ = Math.pow(L + .3963377774 * a + .2158037573 * b, 3);
|
|
10633
10674
|
const m_ = Math.pow(L - .1055613458 * a - .0638541728 * b, 3);
|
|
@@ -10641,6 +10682,14 @@ function oklabToSrgb(L, a, b) {
|
|
|
10641
10682
|
b: linearToSrgb(B)
|
|
10642
10683
|
};
|
|
10643
10684
|
}
|
|
10685
|
+
function oklabToOklch(L, a, b) {
|
|
10686
|
+
const C = Math.sqrt(a * a + b * b);
|
|
10687
|
+
return {
|
|
10688
|
+
L,
|
|
10689
|
+
C,
|
|
10690
|
+
h: C < 1e-7 ? 0 : deg(Math.atan2(b, a) * 180 / Math.PI)
|
|
10691
|
+
};
|
|
10692
|
+
}
|
|
10644
10693
|
function oklchToOklab(L, C, h) {
|
|
10645
10694
|
const hr = h * Math.PI / 180;
|
|
10646
10695
|
return {
|
|
@@ -10649,6 +10698,27 @@ function oklchToOklab(L, C, h) {
|
|
|
10649
10698
|
b: C * Math.sin(hr)
|
|
10650
10699
|
};
|
|
10651
10700
|
}
|
|
10701
|
+
function featuresFromHex(hex) {
|
|
10702
|
+
const { r, g, b } = hexToRgb(hex);
|
|
10703
|
+
const { h, s, l } = rgbToHsl(r, g, b);
|
|
10704
|
+
const { L, a, b: b2 } = srgbToOklab(r, g, b);
|
|
10705
|
+
const { L: okL, C: okC, h: okH } = oklabToOklch(L, a, b2);
|
|
10706
|
+
return {
|
|
10707
|
+
r,
|
|
10708
|
+
g,
|
|
10709
|
+
b,
|
|
10710
|
+
h,
|
|
10711
|
+
s,
|
|
10712
|
+
l,
|
|
10713
|
+
v: Math.max(r, g, b) / 255,
|
|
10714
|
+
Y: .2126 * srgbToLinear(r) + .7152 * srgbToLinear(g) + .0722 * srgbToLinear(b),
|
|
10715
|
+
chroma: s,
|
|
10716
|
+
okL,
|
|
10717
|
+
okC,
|
|
10718
|
+
okH,
|
|
10719
|
+
hex
|
|
10720
|
+
};
|
|
10721
|
+
}
|
|
10652
10722
|
function relativeLuminance(r, g, b) {
|
|
10653
10723
|
const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
|
|
10654
10724
|
return .2126 * R + .7152 * G + .0722 * B;
|
|
@@ -11698,6 +11768,36 @@ function normalizedReference(value) {
|
|
|
11698
11768
|
return normalized.length > 0 ? normalized : null;
|
|
11699
11769
|
}
|
|
11700
11770
|
//#endregion
|
|
11771
|
+
//#region ../theme-core/src/surfaces/logoVariant.ts
|
|
11772
|
+
/** Concrete hex behind a plain, opaque palette token, or null otherwise. */
|
|
11773
|
+
function opaquePaletteHexForToken(expandedPalette, token) {
|
|
11774
|
+
if (!token) return null;
|
|
11775
|
+
const parts = parseColorTokenParts(token);
|
|
11776
|
+
if (parts.kind !== "token" || parts.opacityPercent !== null) return null;
|
|
11777
|
+
return expandedPalette[parts.token] ?? null;
|
|
11778
|
+
}
|
|
11779
|
+
/**
|
|
11780
|
+
* Tone of the surface a foreground token was resolved for.
|
|
11781
|
+
*
|
|
11782
|
+
* A token with opacity has no known underlay to composite against, and a raw
|
|
11783
|
+
* or unrecognised token has no palette hex, so both are `unknown` rather than
|
|
11784
|
+
* a guess.
|
|
11785
|
+
*/
|
|
11786
|
+
function surfaceToneFromForegroundToken(expandedPalette, foregroundToken) {
|
|
11787
|
+
const hex = opaquePaletteHexForToken(expandedPalette, foregroundToken);
|
|
11788
|
+
if (!hex) return "unknown";
|
|
11789
|
+
return featuresFromHex(hex).Y >= .5 ? "dark" : "light";
|
|
11790
|
+
}
|
|
11791
|
+
/**
|
|
11792
|
+
* The logo to draw on a surface of the given tone. A missing variant falls
|
|
11793
|
+
* back to the other one, and an unknown tone uses the light-backgrounds logo,
|
|
11794
|
+
* which is what every site rendered before variants existed.
|
|
11795
|
+
*/
|
|
11796
|
+
function selectLogoVariant(tone, variants) {
|
|
11797
|
+
const { forLightBackgrounds, forDarkBackgrounds } = variants;
|
|
11798
|
+
return tone === "dark" ? forDarkBackgrounds ?? forLightBackgrounds : forLightBackgrounds ?? forDarkBackgrounds;
|
|
11799
|
+
}
|
|
11800
|
+
//#endregion
|
|
11701
11801
|
//#region ../theme-core/src/utils/colorStyles.ts
|
|
11702
11802
|
const COLOR_VAR_PREFIX = "--tb-";
|
|
11703
11803
|
function parseToken(source) {
|
|
@@ -11749,16 +11849,28 @@ function backgroundColorStyle(token) {
|
|
|
11749
11849
|
return { backgroundColor: rgbColorValue(token) };
|
|
11750
11850
|
}
|
|
11751
11851
|
/**
|
|
11852
|
+
* Converts a text color token to a CSS color value that follows the enclosing
|
|
11853
|
+
* surface. The semantic text tokens (`text`, `heading`, `mutedText`) resolve
|
|
11854
|
+
* to the surface foreground variables, so text adapts when a section's
|
|
11855
|
+
* background changes; any other token is a fixed theme color.
|
|
11856
|
+
*
|
|
11857
|
+
* @param token - Theme color token
|
|
11858
|
+
* @returns CSS color value
|
|
11859
|
+
*/
|
|
11860
|
+
function textColorValue(token) {
|
|
11861
|
+
const parsed = parseToken(token);
|
|
11862
|
+
const surfaceRole = parsed.raw ? null : surfaceRoleForTextToken(parsed.token);
|
|
11863
|
+
if (!surfaceRole) return rgbColorValue(token);
|
|
11864
|
+
return parsed.opacityPercent === void 0 ? surfaceForegroundValue(surfaceRole) : surfaceForegroundValueWithOpacity(surfaceRole, parsed.opacityPercent);
|
|
11865
|
+
}
|
|
11866
|
+
/**
|
|
11752
11867
|
* Creates a text color style object from a theme token.
|
|
11753
11868
|
*
|
|
11754
11869
|
* @param token - Theme color token
|
|
11755
11870
|
* @returns CSSProperties with color
|
|
11756
11871
|
*/
|
|
11757
11872
|
function textColorStyle(token) {
|
|
11758
|
-
|
|
11759
|
-
const surfaceRole = parsed.raw ? null : surfaceRoleForTextToken(parsed.token);
|
|
11760
|
-
if (surfaceRole) return { color: parsed.opacityPercent === void 0 ? surfaceForegroundValue(surfaceRole) : surfaceForegroundValueWithOpacity(surfaceRole, parsed.opacityPercent) };
|
|
11761
|
-
return { color: rgbColorValue(token) };
|
|
11873
|
+
return { color: textColorValue(token) };
|
|
11762
11874
|
}
|
|
11763
11875
|
/**
|
|
11764
11876
|
* Creates a border color style object from a theme token.
|
|
@@ -26703,9 +26815,7 @@ function navRow(opts) {
|
|
|
26703
26815
|
rel: { $bind: { from: `${childItemName}.rel` } },
|
|
26704
26816
|
"data-active": { $bind: { from: `${childItemName}.active` } }
|
|
26705
26817
|
}, [text({ as: "span" }, bind(`${childItemName}.label`))], repeat(`${itemName}.children`, childItemName));
|
|
26706
|
-
const dropdown = el("div", { className: "nav-dropdown rb-relative" }, [
|
|
26707
|
-
type: "button",
|
|
26708
|
-
variantId: "",
|
|
26818
|
+
const dropdown = el("div", { className: "nav-dropdown rb-relative" }, [el("headerControl", {
|
|
26709
26819
|
className: prependClassName("nav-dropdown-trigger", linkClassName),
|
|
26710
26820
|
"aria-haspopup": "menu",
|
|
26711
26821
|
"aria-expanded": "false",
|
|
@@ -26773,9 +26883,7 @@ function navColumn(opts) {
|
|
|
26773
26883
|
const dropdown = el("div", {
|
|
26774
26884
|
className: "nav-mobile-dropdown",
|
|
26775
26885
|
"data-nav-mobile-dropdown": "true"
|
|
26776
|
-
}, [
|
|
26777
|
-
type: "button",
|
|
26778
|
-
variantId: "",
|
|
26886
|
+
}, [el("headerControl", {
|
|
26779
26887
|
className: triggerClassName,
|
|
26780
26888
|
"aria-expanded": "false",
|
|
26781
26889
|
"aria-controls": childrenId,
|
|
@@ -33124,6 +33232,49 @@ const layoutTransforms = [
|
|
|
33124
33232
|
footerLogoMediaClassTransform,
|
|
33125
33233
|
footerLogoTextVisibleTransform
|
|
33126
33234
|
];
|
|
33235
|
+
//#endregion
|
|
33236
|
+
//#region ../blocks/src/system/transforms/registry/chromeLogo.ts
|
|
33237
|
+
const chromeLogoSchema = z.object({ surface: z.enum([
|
|
33238
|
+
"header-root",
|
|
33239
|
+
"header-mobile-panel",
|
|
33240
|
+
"footer-root"
|
|
33241
|
+
]) });
|
|
33242
|
+
/** The brand foreground shares the logo's surface; navigation may own a separate capsule. */
|
|
33243
|
+
function chromeSurfaceTextToken(surface, theme, palette) {
|
|
33244
|
+
switch (surface) {
|
|
33245
|
+
case "header-root": {
|
|
33246
|
+
const header = theme.header;
|
|
33247
|
+
const foreground = resolveHeaderRootForeground(header, palette, resolveHeaderVisualStyles(header).isTransparent);
|
|
33248
|
+
return foreground.kind === "known" ? foreground.roles.text : resolveHeaderLeafTextColor(header);
|
|
33249
|
+
}
|
|
33250
|
+
case "header-mobile-panel": return theme.header?.dropdownStyle?.textColor ?? "text";
|
|
33251
|
+
case "footer-root": {
|
|
33252
|
+
const foreground = resolveFooterRootForeground(theme.footer, palette);
|
|
33253
|
+
return foreground.kind === "known" ? foreground.roles.text : void 0;
|
|
33254
|
+
}
|
|
33255
|
+
}
|
|
33256
|
+
}
|
|
33257
|
+
function readChromeTheme(viewModel) {
|
|
33258
|
+
return asPartialObject(asPartialObject(viewModel?.["$root"])?.theme) ?? {};
|
|
33259
|
+
}
|
|
33260
|
+
function resolveChromeSurfaceTone(surface, context) {
|
|
33261
|
+
return surfaceToneFromForegroundToken(context.theme.palette, chromeSurfaceTextToken(surface, readChromeTheme(context.viewModel), context.theme.palette));
|
|
33262
|
+
}
|
|
33263
|
+
const chromeLogoTransforms = [{
|
|
33264
|
+
id: "layout.chromeLogo",
|
|
33265
|
+
kind: "formatter",
|
|
33266
|
+
summary: "Select the light- or dark-background site logo for a header or footer surface",
|
|
33267
|
+
schema: chromeLogoSchema,
|
|
33268
|
+
run: (value, options, context) => {
|
|
33269
|
+
const content = asPartialObject(value);
|
|
33270
|
+
const variants = asPartialObject(content?.logoVariants);
|
|
33271
|
+
if (!variants) return content?.logo ?? null;
|
|
33272
|
+
return selectLogoVariant(resolveChromeSurfaceTone(options.surface, context), {
|
|
33273
|
+
forLightBackgrounds: variants.forLightBackgrounds ?? null,
|
|
33274
|
+
forDarkBackgrounds: variants.forDarkBackgrounds ?? null
|
|
33275
|
+
});
|
|
33276
|
+
}
|
|
33277
|
+
}];
|
|
33127
33278
|
const headerRuntimeTransforms = [{
|
|
33128
33279
|
id: "layout.headerRuntimeContract",
|
|
33129
33280
|
kind: "formatter",
|
|
@@ -33326,46 +33477,42 @@ const whenTransformed = (from, transformId, equals = true) => (node) => ({
|
|
|
33326
33477
|
equals
|
|
33327
33478
|
}
|
|
33328
33479
|
});
|
|
33329
|
-
|
|
33480
|
+
/** Draw whichever site logo suits the surface this row sits on. */
|
|
33481
|
+
const bindChromeLogo = (surface) => bind("content", { transforms: [{
|
|
33482
|
+
id: "layout.chromeLogo",
|
|
33483
|
+
options: { surface }
|
|
33484
|
+
}] });
|
|
33485
|
+
/**
|
|
33486
|
+
* The brand link. The logo is chosen per surface because the open mobile menu
|
|
33487
|
+
* paints its own background, which may be the opposite tone to the header.
|
|
33488
|
+
*/
|
|
33489
|
+
const createLogoRow = (surface) => link({
|
|
33330
33490
|
href: "/",
|
|
33331
33491
|
className: bindProp("$root.theme.header.logo", {
|
|
33332
33492
|
transforms: pipe(tx("layout.headerLogoClass")),
|
|
33333
33493
|
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"
|
|
33334
33494
|
})
|
|
33335
|
-
}, [
|
|
33336
|
-
|
|
33337
|
-
|
|
33338
|
-
|
|
33339
|
-
|
|
33340
|
-
|
|
33341
|
-
|
|
33342
|
-
|
|
33343
|
-
}) }, when("site.logo"), bind("site.logo"))], when("content.logo", { not: true })),
|
|
33344
|
-
text({
|
|
33345
|
-
as: "strong",
|
|
33346
|
-
className: "header-logo-text rb-truncate"
|
|
33347
|
-
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))
|
|
33348
|
-
]);
|
|
33495
|
+
}, [media({ className: bindProp("$root.theme.header.logo", {
|
|
33496
|
+
transforms: pipe(tx("layout.headerLogoMediaClass", { base: "rb-header-logo-sm rb-w-auto rb-transition-all rb-duration-300" })),
|
|
33497
|
+
fallback: "rb-header-logo-sm rb-w-auto rb-transition-all rb-duration-300"
|
|
33498
|
+
}) }, when("content.logo"), bindChromeLogo(surface)), text({
|
|
33499
|
+
as: "strong",
|
|
33500
|
+
className: "header-logo-text rb-truncate"
|
|
33501
|
+
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))]);
|
|
33502
|
+
const logoRow = createLogoRow("header-root");
|
|
33349
33503
|
const centeredLogoRow = link({
|
|
33350
33504
|
href: "/",
|
|
33351
33505
|
className: bindProp("$root.theme.header.logo", {
|
|
33352
33506
|
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" })),
|
|
33353
33507
|
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"
|
|
33354
33508
|
})
|
|
33355
|
-
}, [
|
|
33356
|
-
|
|
33357
|
-
|
|
33358
|
-
|
|
33359
|
-
|
|
33360
|
-
|
|
33361
|
-
|
|
33362
|
-
fallback: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300"
|
|
33363
|
-
}) }, when("site.logo"), bind("site.logo"))], when("content.logo", { not: true })),
|
|
33364
|
-
text({
|
|
33365
|
-
as: "strong",
|
|
33366
|
-
className: "header-logo-text"
|
|
33367
|
-
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))
|
|
33368
|
-
]);
|
|
33509
|
+
}, [media({ className: bindProp("$root.theme.header.logo", {
|
|
33510
|
+
transforms: pipe(tx("layout.headerLogoMediaClass", { base: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300" })),
|
|
33511
|
+
fallback: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300"
|
|
33512
|
+
}) }, when("content.logo"), bindChromeLogo("header-root")), text({
|
|
33513
|
+
as: "strong",
|
|
33514
|
+
className: "header-logo-text"
|
|
33515
|
+
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))]);
|
|
33369
33516
|
const createNavRow = (className, align = "end") => navRow({
|
|
33370
33517
|
className: `${className} header-nav-row`,
|
|
33371
33518
|
align,
|
|
@@ -33405,10 +33552,8 @@ const mobileToggleIcon = stack({
|
|
|
33405
33552
|
}
|
|
33406
33553
|
]);
|
|
33407
33554
|
const mobileToggleButton = {
|
|
33408
|
-
type: "
|
|
33555
|
+
type: "headerControl",
|
|
33409
33556
|
props: {
|
|
33410
|
-
type: "button",
|
|
33411
|
-
variantId: "",
|
|
33412
33557
|
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`,
|
|
33413
33558
|
"aria-label": "Open menu",
|
|
33414
33559
|
"aria-expanded": "false",
|
|
@@ -33418,10 +33563,8 @@ const mobileToggleButton = {
|
|
|
33418
33563
|
children: [mobileToggleIcon]
|
|
33419
33564
|
};
|
|
33420
33565
|
const mobileOverlayToggleButton = {
|
|
33421
|
-
type: "
|
|
33566
|
+
type: "headerControl",
|
|
33422
33567
|
props: {
|
|
33423
|
-
type: "button",
|
|
33424
|
-
variantId: "",
|
|
33425
33568
|
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",
|
|
33426
33569
|
"aria-label": "Open menu",
|
|
33427
33570
|
"aria-expanded": "false",
|
|
@@ -33445,7 +33588,7 @@ const mobileOverlayHeader = inline({
|
|
|
33445
33588
|
align: "center",
|
|
33446
33589
|
justify: "between",
|
|
33447
33590
|
style: borderColorStyle("border")
|
|
33448
|
-
}, [
|
|
33591
|
+
}, [createLogoRow("header-mobile-panel"), mobileOverlayToggleButton]);
|
|
33449
33592
|
const mobileOverlayBody = stack({
|
|
33450
33593
|
className: "rb-flex-1 rb-px-6 rb-py-6",
|
|
33451
33594
|
gap: "md",
|
|
@@ -33632,7 +33775,10 @@ const brandLogo = link({
|
|
|
33632
33775
|
options: { base: "rb-h-10 rb-w-auto" }
|
|
33633
33776
|
}],
|
|
33634
33777
|
fallback: "rb-h-10 rb-w-auto"
|
|
33635
|
-
} } }, when("module.showLogo", { equals: true }), when("content.logo"), bind("content
|
|
33778
|
+
} } }, when("module.showLogo", { equals: true }), when("content.logo"), bind("content", { transforms: [{
|
|
33779
|
+
id: "layout.chromeLogo",
|
|
33780
|
+
options: { surface: "footer-root" }
|
|
33781
|
+
}] })), text({
|
|
33636
33782
|
as: "strong",
|
|
33637
33783
|
className: "footer-logo-text rb-nav-text"
|
|
33638
33784
|
}, when("module.showTitle", { equals: true }), bind("site.title", { fallback: "Your Site" }))], when("module.kind", { equals: "brand" }));
|
|
@@ -36271,6 +36417,12 @@ const occurrenceContextSchema = z.object({
|
|
|
36271
36417
|
capacityOverride: z.number().nullable().optional(),
|
|
36272
36418
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
36273
36419
|
}).nullable();
|
|
36420
|
+
//#endregion
|
|
36421
|
+
//#region ../blocks/src/system/runtime/api/readAuthority.ts
|
|
36422
|
+
const browserReadAuthoritySchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("published") }).strict(), z.object({
|
|
36423
|
+
kind: z.literal("preview"),
|
|
36424
|
+
token: z.string().min(1)
|
|
36425
|
+
}).strict()]);
|
|
36274
36426
|
const unsupportedEventRegistrationPageSurfaceSubjectSchema = z.object({
|
|
36275
36427
|
kind: z.literal("unsupported"),
|
|
36276
36428
|
reason: z.enum([
|
|
@@ -36381,6 +36533,33 @@ function normalizeEventCalendarDisplayMode$1(input) {
|
|
|
36381
36533
|
if (isEventCalendarDisplayMode(input.variant)) return input.variant;
|
|
36382
36534
|
return isEventCalendarDisplayMode(input.displayMode) ? input.displayMode : void 0;
|
|
36383
36535
|
}
|
|
36536
|
+
/** One closed authority for the projections required by each rendered mode. */
|
|
36537
|
+
function resolveEventCalendarReadPlan(input) {
|
|
36538
|
+
const mode = normalizeEventCalendarDisplayMode$1(input) ?? "combined";
|
|
36539
|
+
switch (mode) {
|
|
36540
|
+
case "combined": return {
|
|
36541
|
+
mode,
|
|
36542
|
+
jobs: "both",
|
|
36543
|
+
readProfile: "listing-card"
|
|
36544
|
+
};
|
|
36545
|
+
case "list": return {
|
|
36546
|
+
mode,
|
|
36547
|
+
jobs: "list",
|
|
36548
|
+
readProfile: "listing-card"
|
|
36549
|
+
};
|
|
36550
|
+
case "calendar": return {
|
|
36551
|
+
mode,
|
|
36552
|
+
jobs: "calendar",
|
|
36553
|
+
readProfile: "listing-card"
|
|
36554
|
+
};
|
|
36555
|
+
case "timetable":
|
|
36556
|
+
case "week-board": return {
|
|
36557
|
+
mode,
|
|
36558
|
+
jobs: "calendar",
|
|
36559
|
+
readProfile: "timetable"
|
|
36560
|
+
};
|
|
36561
|
+
}
|
|
36562
|
+
}
|
|
36384
36563
|
function isEventCalendarDefaultView(value) {
|
|
36385
36564
|
return typeof value === "string" && eventCalendarDefaultViewValues.includes(value);
|
|
36386
36565
|
}
|
|
@@ -36575,6 +36754,7 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
36575
36754
|
apiBaseUrl: z.string().optional(),
|
|
36576
36755
|
portalToken: z.string().nullable().optional(),
|
|
36577
36756
|
previewToken: z.string().nullable().optional(),
|
|
36757
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
36578
36758
|
...eventRegistrationHydrationSchemaShape,
|
|
36579
36759
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
36580
36760
|
wholeSeriesRunEvents: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
@@ -36612,6 +36792,7 @@ z.object({
|
|
|
36612
36792
|
apiBaseUrl: z.string().optional(),
|
|
36613
36793
|
portalToken: z.string().nullable().optional(),
|
|
36614
36794
|
previewToken: z.string().nullable().optional(),
|
|
36795
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
36615
36796
|
stage: previewStageSchema.optional()
|
|
36616
36797
|
});
|
|
36617
36798
|
function buildEventRegistrationDisplayFromScopedEvents(source, scopedSourceEvents) {
|
|
@@ -36870,6 +37051,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
36870
37051
|
text({ as: "h2" }, bind("content.heading"), when("content.heading")),
|
|
36871
37052
|
richText({ className: "rb-prose rb-max-w-none" }, bind("content.description"), when("content.description")),
|
|
36872
37053
|
eventRegistration(withApiBindings({
|
|
37054
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
36873
37055
|
occurrenceContext: { $bind: { from: "$root.occurrenceContext" } },
|
|
36874
37056
|
subject: { $bind: { from: "$root.subject" } },
|
|
36875
37057
|
portalToken: { $bind: {
|
|
@@ -37502,8 +37684,7 @@ function resolveEventListPaginationAction(input) {
|
|
|
37502
37684
|
//#endregion
|
|
37503
37685
|
//#region ../blocks/src/system/blocks/events/shared/calendarWindow.ts
|
|
37504
37686
|
function resolveCalendarReadProfile(content) {
|
|
37505
|
-
|
|
37506
|
-
return mode === "timetable" || mode === "week-board" ? "timetable" : "listing-card";
|
|
37687
|
+
return resolveEventCalendarReadPlan(content).readProfile;
|
|
37507
37688
|
}
|
|
37508
37689
|
/** Runtime picker sentinels and bound loader IDs must describe the same query. */
|
|
37509
37690
|
function normalizeCalendarFilterId(value) {
|
|
@@ -37613,6 +37794,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
37613
37794
|
events: z.array(publicEventSchema).nullable().optional(),
|
|
37614
37795
|
siteId: z.string(),
|
|
37615
37796
|
apiBaseUrl: z.string().optional(),
|
|
37797
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
37616
37798
|
stage: previewStageSchema.optional(),
|
|
37617
37799
|
listLayout: eventLayoutSchema.optional(),
|
|
37618
37800
|
listColumns: columnOptionSchema.optional(),
|
|
@@ -37665,7 +37847,6 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
37665
37847
|
const eventCollectionHydrationSchema = z.object({
|
|
37666
37848
|
siteId: z.string(),
|
|
37667
37849
|
calendarWindow: calendarWindowPageSchema.optional(),
|
|
37668
|
-
stage: previewStageSchema.optional(),
|
|
37669
37850
|
prefetchedEvents: z.boolean(),
|
|
37670
37851
|
eventSurface: eventSurfaceScopeSchema$1,
|
|
37671
37852
|
filterEventPresets: z.string().nullable(),
|
|
@@ -37740,7 +37921,6 @@ function buildEventCollectionHydration(source, now = /* @__PURE__ */ new Date())
|
|
|
37740
37921
|
return {
|
|
37741
37922
|
calendarWindow: source.calendarWindow ?? void 0,
|
|
37742
37923
|
siteId: source.siteId,
|
|
37743
|
-
stage: source.stage,
|
|
37744
37924
|
prefetchedEvents: source.events != null,
|
|
37745
37925
|
eventSurface: selected ? "all" : normalizeEventSurfaceScope(source.eventSurface),
|
|
37746
37926
|
filterEventPresets: selected ? null : normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
@@ -37760,6 +37940,7 @@ const eventListingSourceSchema = z.object({
|
|
|
37760
37940
|
events: z.array(publicEventSchema).nullable().optional(),
|
|
37761
37941
|
siteId: z.string(),
|
|
37762
37942
|
apiBaseUrl: z.string().optional(),
|
|
37943
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
37763
37944
|
stage: previewStageSchema.optional(),
|
|
37764
37945
|
layout: eventLayoutSchema.optional(),
|
|
37765
37946
|
columns: columnOptionSchema.optional(),
|
|
@@ -37800,7 +37981,6 @@ const eventListingDisplaySchema = z.object({
|
|
|
37800
37981
|
});
|
|
37801
37982
|
const eventListingHydrationSchema = z.object({
|
|
37802
37983
|
siteId: z.string(),
|
|
37803
|
-
stage: previewStageSchema.optional(),
|
|
37804
37984
|
eventsPerPage: eventPageSizeSchema,
|
|
37805
37985
|
paginationAction: eventListPaginationActionSchema,
|
|
37806
37986
|
showFilters: z.boolean(),
|
|
@@ -37823,6 +38003,7 @@ const eventListingRenderSchema = z.object({
|
|
|
37823
38003
|
z.object({
|
|
37824
38004
|
siteId: z.string(),
|
|
37825
38005
|
apiBaseUrl: z.string().optional(),
|
|
38006
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
37826
38007
|
stage: previewStageSchema.optional()
|
|
37827
38008
|
});
|
|
37828
38009
|
const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
@@ -37857,7 +38038,6 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
37857
38038
|
},
|
|
37858
38039
|
hydration: {
|
|
37859
38040
|
siteId: source.siteId,
|
|
37860
|
-
stage: source.stage,
|
|
37861
38041
|
eventsPerPage: pageSize,
|
|
37862
38042
|
paginationAction: resolveEventListPaginationAction({
|
|
37863
38043
|
paginationMode: source.paginationMode,
|
|
@@ -38139,6 +38319,7 @@ const eventListingBlockDefinition = {
|
|
|
38139
38319
|
rootType: "stack",
|
|
38140
38320
|
rootProps: { gap: "lg" },
|
|
38141
38321
|
children: [...eventSectionHeaderLayoutNodes(), el("event-listing", withApiBindings({
|
|
38322
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
38142
38323
|
events: { $bind: { from: "data.events" } },
|
|
38143
38324
|
stage: { $bind: {
|
|
38144
38325
|
from: "$root.previewStage",
|
|
@@ -38336,6 +38517,7 @@ const eventCalendarRenderSchema = z.object({
|
|
|
38336
38517
|
z.object({
|
|
38337
38518
|
siteId: z.string(),
|
|
38338
38519
|
apiBaseUrl: z.string().optional(),
|
|
38520
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
38339
38521
|
stage: previewStageSchema.optional()
|
|
38340
38522
|
});
|
|
38341
38523
|
/**
|
|
@@ -38357,7 +38539,7 @@ function buildEventCalendarDisplay(source) {
|
|
|
38357
38539
|
listColumns: source.listColumns ?? source.columns
|
|
38358
38540
|
}),
|
|
38359
38541
|
kind: "event-calendar",
|
|
38360
|
-
displayMode:
|
|
38542
|
+
displayMode: resolveEventCalendarReadPlan(source).mode,
|
|
38361
38543
|
className: source.className ?? null,
|
|
38362
38544
|
events: (source.events ?? []).slice().sort((left, right) => new Date(left.startsAt).getTime() - new Date(right.startsAt).getTime()),
|
|
38363
38545
|
boardTitle: normalizeOptionalText(source.boardTitle),
|
|
@@ -38374,13 +38556,16 @@ const eventCalendarBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
38374
38556
|
source: createZodCodec(eventCalendarSourceSchema),
|
|
38375
38557
|
render: createZodCodec(eventCalendarRenderSchema)
|
|
38376
38558
|
},
|
|
38377
|
-
buildRender: (source) =>
|
|
38378
|
-
|
|
38379
|
-
|
|
38380
|
-
|
|
38381
|
-
|
|
38382
|
-
|
|
38383
|
-
|
|
38559
|
+
buildRender: (source) => {
|
|
38560
|
+
const plan = resolveEventCalendarReadPlan(source);
|
|
38561
|
+
return {
|
|
38562
|
+
display: buildEventCalendarDisplay(source.calendarWindow && plan.jobs === "calendar" ? {
|
|
38563
|
+
...source,
|
|
38564
|
+
events: source.calendarWindow.events
|
|
38565
|
+
} : source),
|
|
38566
|
+
hydration: buildEventCollectionHydration(source)
|
|
38567
|
+
};
|
|
38568
|
+
}
|
|
38384
38569
|
});
|
|
38385
38570
|
//#endregion
|
|
38386
38571
|
//#region ../blocks/src/system/blocks/events/eventCalendarDataLoaders.ts
|
|
@@ -38530,6 +38715,7 @@ const eventCalendarLayout = [styledSection({
|
|
|
38530
38715
|
rootType: "stack",
|
|
38531
38716
|
rootProps: { gap: "lg" },
|
|
38532
38717
|
children: [...eventSectionHeaderLayoutNodes({ splitClassName: "event-section-head event-section-head--split" }), el("event-calendar", withApiBindings({
|
|
38718
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
38533
38719
|
events: { $bind: { from: "data.events" } },
|
|
38534
38720
|
calendarWindow: { $bind: { from: "data.calendarWindow" } },
|
|
38535
38721
|
stage: { $bind: {
|
|
@@ -42317,6 +42503,7 @@ const shopSourceSchema = z.object({
|
|
|
42317
42503
|
products: z.array(publicProductSchema).nullable().optional(),
|
|
42318
42504
|
siteId: z.string().optional(),
|
|
42319
42505
|
apiBaseUrl: z.string().optional(),
|
|
42506
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
42320
42507
|
stage: previewStageSchema.optional()
|
|
42321
42508
|
});
|
|
42322
42509
|
const productVariantOptionDisplaySchema = z.object({
|
|
@@ -42484,6 +42671,7 @@ function resolveShowPricePerCredit(source) {
|
|
|
42484
42671
|
z.object({
|
|
42485
42672
|
siteId: z.string().optional(),
|
|
42486
42673
|
apiBaseUrl: z.string().optional(),
|
|
42674
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
42487
42675
|
stage: previewStageSchema.optional()
|
|
42488
42676
|
});
|
|
42489
42677
|
const shopBlockRuntime = defineProgressiveBlockRuntime({
|
|
@@ -42824,6 +43012,7 @@ const shopBlockDefinition = {
|
|
|
42824
43012
|
baseClass: "",
|
|
42825
43013
|
spacing: "spacious",
|
|
42826
43014
|
children: sectionContainer([shop(withApiBindings({
|
|
43015
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
42827
43016
|
mode: "passes-memberships",
|
|
42828
43017
|
showPasses: { $bind: {
|
|
42829
43018
|
from: "content.showPasses",
|
|
@@ -43022,6 +43211,7 @@ const productListBlockDefinition = {
|
|
|
43022
43211
|
baseClass: "",
|
|
43023
43212
|
spacing: "spacious",
|
|
43024
43213
|
children: sectionContainer([productList(withApiBindings({
|
|
43214
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
43025
43215
|
mode: "product-list",
|
|
43026
43216
|
heading: { $bind: {
|
|
43027
43217
|
from: "content.heading",
|
|
@@ -43164,6 +43354,7 @@ const productDetailBlockDefinition = {
|
|
|
43164
43354
|
baseClass: "",
|
|
43165
43355
|
spacing: "spacious",
|
|
43166
43356
|
children: sectionContainer([productDetail(withApiBindings({
|
|
43357
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
43167
43358
|
mode: "product-detail",
|
|
43168
43359
|
heading: { $bind: {
|
|
43169
43360
|
from: "content.heading",
|
|
@@ -43280,6 +43471,7 @@ const cartBlockDefinition = {
|
|
|
43280
43471
|
baseClass: "",
|
|
43281
43472
|
spacing: "spacious",
|
|
43282
43473
|
children: sectionContainer([cart(withApiBindings({
|
|
43474
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
43283
43475
|
mode: "cart",
|
|
43284
43476
|
heading: { $bind: {
|
|
43285
43477
|
from: "content.heading",
|
|
@@ -43363,6 +43555,7 @@ const checkoutBlockDefinition = {
|
|
|
43363
43555
|
baseClass: "",
|
|
43364
43556
|
spacing: "spacious",
|
|
43365
43557
|
children: sectionContainer([checkout(withApiBindings({
|
|
43558
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
43366
43559
|
mode: "checkout",
|
|
43367
43560
|
heading: { $bind: {
|
|
43368
43561
|
from: "content.heading",
|
|
@@ -46035,8 +46228,8 @@ const defaultTransforms = createTransformRegistry([
|
|
|
46035
46228
|
summary: "Choose the read projection required by the calendar display mode",
|
|
46036
46229
|
schema: z.object({ job: z.enum(["list", "calendar"]) }),
|
|
46037
46230
|
run(value, options) {
|
|
46038
|
-
const
|
|
46039
|
-
return
|
|
46231
|
+
const plan = resolveEventCalendarReadPlan(asPartialObject(value) ?? {});
|
|
46232
|
+
return plan.jobs === "both" || plan.jobs === options.job;
|
|
46040
46233
|
}
|
|
46041
46234
|
},
|
|
46042
46235
|
{
|
|
@@ -46049,6 +46242,7 @@ const defaultTransforms = createTransformRegistry([
|
|
|
46049
46242
|
},
|
|
46050
46243
|
...formattingTransforms,
|
|
46051
46244
|
...layoutTransforms,
|
|
46245
|
+
...chromeLogoTransforms,
|
|
46052
46246
|
...uiTransforms,
|
|
46053
46247
|
...mediaTransforms,
|
|
46054
46248
|
...backgroundTransforms,
|
|
@@ -47237,20 +47431,24 @@ function createPublicAppointmentReadOperations(deps) {
|
|
|
47237
47431
|
//#region src/client/publicEventReadOperations.ts
|
|
47238
47432
|
function createPublicEventReadOperations(deps) {
|
|
47239
47433
|
async function resolveEventSubroute(params, kind) {
|
|
47240
|
-
const { siteId, subject, segment, signal } = params;
|
|
47434
|
+
const { siteId, subject, segment, signal, preview = false } = params;
|
|
47241
47435
|
if (!siteId || !segment) throw new Error(`${kind === "event-run" ? "resolveEventRun" : "resolveEventOccurrence"}() requires siteId, subject, and segment`);
|
|
47242
47436
|
const subjectId = subject.kind === "eventOffering" ? subject.eventOfferingId : subject.eventSeriesId;
|
|
47243
|
-
return deps.resilientFetchData("resolveEventSubroute", `${kind}:${siteId}:${subject.kind}:${subjectId}:${segment}`, (requestSignal) => deps.apiClient({
|
|
47437
|
+
return deps.resilientFetchData("resolveEventSubroute", `${kind}:${siteId}:${subject.kind}:${subjectId}:${segment}:${preview ? "preview" : "published"}`, (requestSignal) => deps.apiClient({
|
|
47244
47438
|
endpoint: "resolveEventSubroute",
|
|
47245
47439
|
params: {
|
|
47246
47440
|
siteId,
|
|
47247
47441
|
kind,
|
|
47248
47442
|
subjectKind: subject.kind,
|
|
47249
47443
|
subjectId,
|
|
47250
|
-
segment
|
|
47444
|
+
segment,
|
|
47445
|
+
stage: preview ? "preview" : "published"
|
|
47251
47446
|
},
|
|
47252
47447
|
options: { signal: requestSignal }
|
|
47253
|
-
}), {
|
|
47448
|
+
}), {
|
|
47449
|
+
signal,
|
|
47450
|
+
preview
|
|
47451
|
+
});
|
|
47254
47452
|
}
|
|
47255
47453
|
return {
|
|
47256
47454
|
async listPublicEventCalendarWindow({ signal, ...params }) {
|