@riverbankcms/sdk 0.142.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-Dk6Dt11f.mjs → PreviewEditorSidebar-CQZNnFiM.mjs} +20 -26
- package/dist/{PreviewEditorUI-D6EQTsCA.mjs → PreviewEditorUI-DCNxnmI0.mjs} +3 -3
- package/dist/{PreviewQueryProvider-CC-EPkyQ.mjs → PreviewQueryProvider-BCYICImX.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-DH1n4ytY.mjs → SdkPreviewModeRuntime-BJolUbr1.mjs} +17 -8
- package/dist/{SiteChromeCustomizeContext-DunIzY0K.mjs → SiteChromeCustomizeContext-CKgEpoxi.mjs} +2406 -1988
- 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/endpoints.d.ts +7 -0
- 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/publicEventEndpointDefinitions.d.ts +7 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +49 -41
- 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 +7 -1
- package/dist/_dts/blocks/src/system/runtime/api/context.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +18 -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/api/types/events.d.ts +95 -35
- 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/PaymentStatusStep.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +0 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +14 -1
- 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/event-registration.headless.planning.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationCompletion.d.ts +1 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationDerivations.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/ticketSelectionLines.d.ts +4 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +9 -11
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +56 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +12 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/usePaymentStatusRecovery.d.ts +23 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/utils.d.ts +1 -1
- 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/commerce/src/purchase/event-registration-errors.d.ts +4 -4
- package/dist/_dts/commerce/src/purchase/eventCheckoutRecoveryWindow.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +2 -1
- package/dist/_dts/commerce/src/purchase/stateTransitions.d.ts +1 -13
- 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 +3126 -3077
- 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-CnJeq3_r.mjs → BookingConsentAgreement-DoAILrkN.mjs} +4 -55
- package/dist/client/{DiscountCodeDisclosure-BINEO6J9.mjs → DiscountCodeDisclosure-X528hUTf.mjs} +27 -17
- package/dist/client/{EventCombined.client-srxNQ6sZ.mjs → EventCombined.client-DSBVwq5m.mjs} +54 -46
- package/dist/client/{EventListing.client-DbyVyGkX.mjs → EventListing.client-DmFAX7Vb.mjs} +3 -4
- package/dist/client/{LeafletStaticMap-B-wpijzL.mjs → LeafletStaticMap-BAqXdfhq.mjs} +1 -1
- package/dist/client/ThemedButton-BwNFVwi4.mjs +412 -0
- package/dist/client/{accordion-B-iUXU7n.mjs → accordion-DRhMdkbd.mjs} +1 -1
- package/dist/client/{bookingForm-BXYPke5q.mjs → bookingForm-iJ_nCsNF.mjs} +26 -32
- package/dist/client/bookings.mjs +657 -650
- package/dist/client/{carousel-Cr4aj63H.mjs → carousel-D8zuffZr.mjs} +2 -2
- package/dist/client/{carousel.client-DQTjCVQT.mjs → carousel.client-jahpU9Vz.mjs} +1 -1
- package/dist/client/{cart-DibP9WWa.mjs → cart-DeMGJViN.mjs} +3 -3
- package/dist/client/{checkout-CrSBVnL8.mjs → checkout-DXc06Km2.mjs} +3 -3
- package/dist/client/{checkoutUrls-FL6lRkrt.mjs → checkoutUrls-CW3-78uu.mjs} +1 -1
- package/dist/client/client.mjs +2714 -2448
- package/dist/client/{colorStyles-3013aRAY.mjs → colorStyles-CuJBiS-1.mjs} +16 -4
- package/dist/client/{context-Ces-AgdR.mjs → context-CDLCfDep.mjs} +35 -8
- package/dist/client/{dates-BXyNeNhB.mjs → dates-ClFx7Epy.mjs} +2 -2
- package/dist/client/{eventCalendar-HwpPeqrH.mjs → eventCalendar-BaGpnOGN.mjs} +39 -50
- package/dist/client/{eventCombined-BpFUkuEI.mjs → eventCombined-ywONOx2m.mjs} +5 -4
- package/dist/client/{eventDetails-DK_agiWy.mjs → eventDetails-B2LlOTYY.mjs} +4 -4
- package/dist/client/{eventListing-DhzHqP1c.mjs → eventListing-CMgxWpqP.mjs} +5 -4
- package/dist/client/{eventRegistration-BdQ_Dn2d.mjs → eventRegistration-BarLDNHR.mjs} +549 -592
- package/dist/client/{form-B1frcuzy.mjs → form-BjqKaBJ7.mjs} +9 -10
- package/dist/client/{headerSection-CT5z460s.mjs → headerSection-CP4XDwz1.mjs} +23 -30
- package/dist/client/hooks.mjs +269 -63
- package/dist/client/{locationMap-CIQXB9i2.mjs → locationMap-C5gW-d-w.mjs} +9 -10
- package/dist/client/{media-DHpfFwd3.mjs → media-BtJ37tzS.mjs} +1 -1
- package/dist/client/{newsletterForm-BYNYZSes.mjs → newsletterForm-afXlVSA0.mjs} +8 -9
- package/dist/client/{pricing-CbTlAsmt.mjs → pricing-Bl1CAl28.mjs} +1 -1
- package/dist/client/{productDetail-CR7Z3yjS.mjs → productDetail-CvQ3jWQe.mjs} +3 -3
- package/dist/client/{productList-DXj00vzR.mjs → productList-U874PGO7.mjs} +3 -3
- package/dist/client/{propsDecoder-DiLiBdek.mjs → propsDecoder-DPXtCZWP.mjs} +100 -29
- package/dist/client/rendering/client.mjs +2397 -2279
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +2742 -2452
- package/dist/client/{routeIslandApiConfig-UNsfPcYq.mjs → routeIslandApiConfig-NGYiUWXu.mjs} +8 -1
- package/dist/client/{scrollToBlock-CrcbBf0h.mjs → scrollToBlock-0-C3DVhK.mjs} +1 -1
- package/dist/client/{shop-DgqiB_1b.mjs → shop-BXjXhM9P.mjs} +45 -58
- package/dist/client/{shop-commerce-D_J781in.mjs → shop-commerce-BZ6UlWJ7.mjs} +42 -55
- package/dist/client/{shop-commerce-store-PGUbDwqe.mjs → shop-commerce-store-DlSBXb3D.mjs} +1 -1
- package/dist/client/{shopShared-C_Bb2zwG.mjs → shopShared-kkEOiLPA.mjs} +6 -5
- package/dist/client/{useEventFilters-CM17Xpr1.mjs → useEventFilters-zvnnE1ro.mjs} +66 -355
- package/dist/preview-next/before-render.mjs +11 -0
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/editor-chrome.css +8 -0
- package/dist/preview-next/keepAlive.mjs +11 -0
- package/dist/preview-next/middleware.mjs +11 -0
- package/dist/{previewAuthStore-oVttoRDO.mjs → previewAuthStore-JA6-I_sL.mjs} +11 -0
- package/dist/{sdk-runtime-DhmuRhIX.mjs → sdk-runtime-DFJlQt3q.mjs} +2 -2
- package/dist/{separator-C3hlg9LH.mjs → separator-o8GHb1xh.mjs} +1 -1
- package/dist/server/components.mjs +840 -625
- package/dist/server/config-validation.mjs +269 -63
- package/dist/server/config.mjs +269 -63
- package/dist/server/data.mjs +269 -63
- package/dist/server/index.mjs +20 -5
- package/dist/server/navigation.mjs +28 -1
- package/dist/server/next.mjs +14129 -13937
- package/dist/server/page-converter.mjs +111 -59
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +844 -624
- package/dist/server/rendering.mjs +842 -626
- package/dist/server/routing.mjs +306 -69
- package/dist/server/server.mjs +278 -68
- package/dist/server/theme-bridge.mjs +40 -1
- package/dist/styles/index.css +6 -0
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/checkoutRecovery.d.ts +0 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useCheckoutRecovery.d.ts +0 -8
|
@@ -2606,6 +2606,17 @@ function resolveSiteVerticalBookingConfig(rawConfig) {
|
|
|
2606
2606
|
//#endregion
|
|
2607
2607
|
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
2608
2608
|
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
2609
|
+
checkPublicEventRegistrationNextStep: {
|
|
2610
|
+
path: "/public/sites/{siteId}/events/registration-next-step",
|
|
2611
|
+
method: "POST",
|
|
2612
|
+
auth: "public",
|
|
2613
|
+
responseKind: "json",
|
|
2614
|
+
errors: [
|
|
2615
|
+
"validation:invalid_input",
|
|
2616
|
+
"auth:forbidden",
|
|
2617
|
+
"server:internal_error"
|
|
2618
|
+
]
|
|
2619
|
+
},
|
|
2609
2620
|
listPublicEventCalendarWindow: {
|
|
2610
2621
|
path: "/public/sites/{siteId}/events/calendar-window",
|
|
2611
2622
|
method: "GET",
|
|
@@ -3594,6 +3605,8 @@ z.discriminatedUnion("kind", navigationLinkInputSchemaOptions);
|
|
|
3594
3605
|
//#endregion
|
|
3595
3606
|
//#region ../theme-core/src/palette/utils/colorConversion.ts
|
|
3596
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);
|
|
3597
3610
|
function hexToRgb(hex) {
|
|
3598
3611
|
const h = hex.replace(/^#/, "");
|
|
3599
3612
|
const m = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
|
|
@@ -3616,6 +3629,45 @@ function srgbToLinear(u) {
|
|
|
3616
3629
|
function linearToSrgb(x) {
|
|
3617
3630
|
return clamp01(x <= .0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - .055) * 255;
|
|
3618
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
|
+
}
|
|
3619
3671
|
function oklabToSrgb(L, a, b) {
|
|
3620
3672
|
const l_ = Math.pow(L + .3963377774 * a + .2158037573 * b, 3);
|
|
3621
3673
|
const m_ = Math.pow(L - .1055613458 * a - .0638541728 * b, 3);
|
|
@@ -3629,6 +3681,14 @@ function oklabToSrgb(L, a, b) {
|
|
|
3629
3681
|
b: linearToSrgb(B)
|
|
3630
3682
|
};
|
|
3631
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
|
+
}
|
|
3632
3692
|
function oklchToOklab(L, C, h) {
|
|
3633
3693
|
const hr = h * Math.PI / 180;
|
|
3634
3694
|
return {
|
|
@@ -3637,6 +3697,27 @@ function oklchToOklab(L, C, h) {
|
|
|
3637
3697
|
b: C * Math.sin(hr)
|
|
3638
3698
|
};
|
|
3639
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
|
+
}
|
|
3640
3721
|
function relativeLuminance(r, g, b) {
|
|
3641
3722
|
const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
|
|
3642
3723
|
return .2126 * R + .7152 * G + .0722 * B;
|
|
@@ -6720,6 +6801,36 @@ function normalizedReference(value) {
|
|
|
6720
6801
|
return normalized.length > 0 ? normalized : null;
|
|
6721
6802
|
}
|
|
6722
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
|
|
6723
6834
|
//#region ../theme-core/src/utils/colorStyles.ts
|
|
6724
6835
|
const COLOR_VAR_PREFIX = "--tb-";
|
|
6725
6836
|
function parseToken(source) {
|
|
@@ -6771,16 +6882,28 @@ function backgroundColorStyle(token) {
|
|
|
6771
6882
|
return { backgroundColor: rgbColorValue(token) };
|
|
6772
6883
|
}
|
|
6773
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
|
+
/**
|
|
6774
6900
|
* Creates a text color style object from a theme token.
|
|
6775
6901
|
*
|
|
6776
6902
|
* @param token - Theme color token
|
|
6777
6903
|
* @returns CSSProperties with color
|
|
6778
6904
|
*/
|
|
6779
6905
|
function textColorStyle(token) {
|
|
6780
|
-
|
|
6781
|
-
const surfaceRole = parsed.raw ? null : surfaceRoleForTextToken(parsed.token);
|
|
6782
|
-
if (surfaceRole) return { color: parsed.opacityPercent === void 0 ? surfaceForegroundValue(surfaceRole) : surfaceForegroundValueWithOpacity(surfaceRole, parsed.opacityPercent) };
|
|
6783
|
-
return { color: rgbColorValue(token) };
|
|
6906
|
+
return { color: textColorValue(token) };
|
|
6784
6907
|
}
|
|
6785
6908
|
/**
|
|
6786
6909
|
* Creates a border color style object from a theme token.
|
|
@@ -18592,9 +18715,7 @@ function navRow(opts) {
|
|
|
18592
18715
|
rel: { $bind: { from: `${childItemName}.rel` } },
|
|
18593
18716
|
"data-active": { $bind: { from: `${childItemName}.active` } }
|
|
18594
18717
|
}, [text({ as: "span" }, bind(`${childItemName}.label`))], repeat(`${itemName}.children`, childItemName));
|
|
18595
|
-
const dropdown = el("div", { className: "nav-dropdown rb-relative" }, [
|
|
18596
|
-
type: "button",
|
|
18597
|
-
variantId: "",
|
|
18718
|
+
const dropdown = el("div", { className: "nav-dropdown rb-relative" }, [el("headerControl", {
|
|
18598
18719
|
className: prependClassName("nav-dropdown-trigger", linkClassName),
|
|
18599
18720
|
"aria-haspopup": "menu",
|
|
18600
18721
|
"aria-expanded": "false",
|
|
@@ -18662,9 +18783,7 @@ function navColumn(opts) {
|
|
|
18662
18783
|
const dropdown = el("div", {
|
|
18663
18784
|
className: "nav-mobile-dropdown",
|
|
18664
18785
|
"data-nav-mobile-dropdown": "true"
|
|
18665
|
-
}, [
|
|
18666
|
-
type: "button",
|
|
18667
|
-
variantId: "",
|
|
18786
|
+
}, [el("headerControl", {
|
|
18668
18787
|
className: triggerClassName,
|
|
18669
18788
|
"aria-expanded": "false",
|
|
18670
18789
|
"aria-controls": childrenId,
|
|
@@ -24971,6 +25090,49 @@ const layoutTransforms = [
|
|
|
24971
25090
|
footerLogoMediaClassTransform,
|
|
24972
25091
|
footerLogoTextVisibleTransform
|
|
24973
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
|
+
}];
|
|
24974
25136
|
const headerRuntimeTransforms = [{
|
|
24975
25137
|
id: "layout.headerRuntimeContract",
|
|
24976
25138
|
kind: "formatter",
|
|
@@ -25178,46 +25340,42 @@ const whenTransformed = (from, transformId, equals = true) => (node) => ({
|
|
|
25178
25340
|
equals
|
|
25179
25341
|
}
|
|
25180
25342
|
});
|
|
25181
|
-
|
|
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({
|
|
25182
25353
|
href: "/",
|
|
25183
25354
|
className: bindProp("$root.theme.header.logo", {
|
|
25184
25355
|
transforms: pipe(tx("layout.headerLogoClass")),
|
|
25185
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"
|
|
25186
25357
|
})
|
|
25187
|
-
}, [
|
|
25188
|
-
|
|
25189
|
-
|
|
25190
|
-
|
|
25191
|
-
|
|
25192
|
-
|
|
25193
|
-
|
|
25194
|
-
|
|
25195
|
-
}) }, when("site.logo"), bind("site.logo"))], when("content.logo", { not: true })),
|
|
25196
|
-
text({
|
|
25197
|
-
as: "strong",
|
|
25198
|
-
className: "header-logo-text rb-truncate"
|
|
25199
|
-
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))
|
|
25200
|
-
]);
|
|
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");
|
|
25201
25366
|
const centeredLogoRow = link({
|
|
25202
25367
|
href: "/",
|
|
25203
25368
|
className: bindProp("$root.theme.header.logo", {
|
|
25204
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" })),
|
|
25205
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"
|
|
25206
25371
|
})
|
|
25207
|
-
}, [
|
|
25208
|
-
|
|
25209
|
-
|
|
25210
|
-
|
|
25211
|
-
|
|
25212
|
-
|
|
25213
|
-
|
|
25214
|
-
fallback: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300"
|
|
25215
|
-
}) }, when("site.logo"), bind("site.logo"))], when("content.logo", { not: true })),
|
|
25216
|
-
text({
|
|
25217
|
-
as: "strong",
|
|
25218
|
-
className: "header-logo-text"
|
|
25219
|
-
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))
|
|
25220
|
-
]);
|
|
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" }))]);
|
|
25221
25379
|
const createNavRow = (className, align = "end") => navRow({
|
|
25222
25380
|
className: `${className} header-nav-row`,
|
|
25223
25381
|
align,
|
|
@@ -25257,10 +25415,8 @@ const mobileToggleIcon = stack({
|
|
|
25257
25415
|
}
|
|
25258
25416
|
]);
|
|
25259
25417
|
const mobileToggleButton = {
|
|
25260
|
-
type: "
|
|
25418
|
+
type: "headerControl",
|
|
25261
25419
|
props: {
|
|
25262
|
-
type: "button",
|
|
25263
|
-
variantId: "",
|
|
25264
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`,
|
|
25265
25421
|
"aria-label": "Open menu",
|
|
25266
25422
|
"aria-expanded": "false",
|
|
@@ -25270,10 +25426,8 @@ const mobileToggleButton = {
|
|
|
25270
25426
|
children: [mobileToggleIcon]
|
|
25271
25427
|
};
|
|
25272
25428
|
const mobileOverlayToggleButton = {
|
|
25273
|
-
type: "
|
|
25429
|
+
type: "headerControl",
|
|
25274
25430
|
props: {
|
|
25275
|
-
type: "button",
|
|
25276
|
-
variantId: "",
|
|
25277
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",
|
|
25278
25432
|
"aria-label": "Open menu",
|
|
25279
25433
|
"aria-expanded": "false",
|
|
@@ -25297,7 +25451,7 @@ const mobileOverlayHeader = inline({
|
|
|
25297
25451
|
align: "center",
|
|
25298
25452
|
justify: "between",
|
|
25299
25453
|
style: borderColorStyle("border")
|
|
25300
|
-
}, [
|
|
25454
|
+
}, [createLogoRow("header-mobile-panel"), mobileOverlayToggleButton]);
|
|
25301
25455
|
const mobileOverlayBody = stack({
|
|
25302
25456
|
className: "rb-flex-1 rb-px-6 rb-py-6",
|
|
25303
25457
|
gap: "md",
|
|
@@ -25484,7 +25638,10 @@ const brandLogo = link({
|
|
|
25484
25638
|
options: { base: "rb-h-10 rb-w-auto" }
|
|
25485
25639
|
}],
|
|
25486
25640
|
fallback: "rb-h-10 rb-w-auto"
|
|
25487
|
-
} } }, 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({
|
|
25488
25645
|
as: "strong",
|
|
25489
25646
|
className: "footer-logo-text rb-nav-text"
|
|
25490
25647
|
}, when("module.showTitle", { equals: true }), bind("site.title", { fallback: "Your Site" }))], when("module.kind", { equals: "brand" }));
|
|
@@ -28200,6 +28357,12 @@ const occurrenceContextSchema = z.object({
|
|
|
28200
28357
|
capacityOverride: z.number().nullable().optional(),
|
|
28201
28358
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
28202
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()]);
|
|
28203
28366
|
const unsupportedEventRegistrationPageSurfaceSubjectSchema = z.object({
|
|
28204
28367
|
kind: z.literal("unsupported"),
|
|
28205
28368
|
reason: z.enum([
|
|
@@ -28310,6 +28473,33 @@ function normalizeEventCalendarDisplayMode$1(input) {
|
|
|
28310
28473
|
if (isEventCalendarDisplayMode(input.variant)) return input.variant;
|
|
28311
28474
|
return isEventCalendarDisplayMode(input.displayMode) ? input.displayMode : void 0;
|
|
28312
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
|
+
}
|
|
28313
28503
|
function isEventCalendarDefaultView(value) {
|
|
28314
28504
|
return typeof value === "string" && eventCalendarDefaultViewValues.includes(value);
|
|
28315
28505
|
}
|
|
@@ -28504,6 +28694,7 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
28504
28694
|
apiBaseUrl: z.string().optional(),
|
|
28505
28695
|
portalToken: z.string().nullable().optional(),
|
|
28506
28696
|
previewToken: z.string().nullable().optional(),
|
|
28697
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
28507
28698
|
...eventRegistrationHydrationSchemaShape,
|
|
28508
28699
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
28509
28700
|
wholeSeriesRunEvents: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
@@ -28541,6 +28732,7 @@ z.object({
|
|
|
28541
28732
|
apiBaseUrl: z.string().optional(),
|
|
28542
28733
|
portalToken: z.string().nullable().optional(),
|
|
28543
28734
|
previewToken: z.string().nullable().optional(),
|
|
28735
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
28544
28736
|
stage: previewStageSchema.optional()
|
|
28545
28737
|
});
|
|
28546
28738
|
function buildEventRegistrationDisplayFromScopedEvents(source, scopedSourceEvents) {
|
|
@@ -28616,6 +28808,7 @@ function shellLabelForRegistrationStep(step, events) {
|
|
|
28616
28808
|
case "redirecting":
|
|
28617
28809
|
case "verifying-payment":
|
|
28618
28810
|
case "verifying-timeout":
|
|
28811
|
+
case "payment-status":
|
|
28619
28812
|
case "payment-failed": return "Details";
|
|
28620
28813
|
}
|
|
28621
28814
|
}
|
|
@@ -28798,6 +28991,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
28798
28991
|
text({ as: "h2" }, bind("content.heading"), when("content.heading")),
|
|
28799
28992
|
richText({ className: "rb-prose rb-max-w-none" }, bind("content.description"), when("content.description")),
|
|
28800
28993
|
eventRegistration(withApiBindings({
|
|
28994
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
28801
28995
|
occurrenceContext: { $bind: { from: "$root.occurrenceContext" } },
|
|
28802
28996
|
subject: { $bind: { from: "$root.subject" } },
|
|
28803
28997
|
portalToken: { $bind: {
|
|
@@ -29430,8 +29624,7 @@ function resolveEventListPaginationAction(input) {
|
|
|
29430
29624
|
//#endregion
|
|
29431
29625
|
//#region ../blocks/src/system/blocks/events/shared/calendarWindow.ts
|
|
29432
29626
|
function resolveCalendarReadProfile(content) {
|
|
29433
|
-
|
|
29434
|
-
return mode === "timetable" || mode === "week-board" ? "timetable" : "listing-card";
|
|
29627
|
+
return resolveEventCalendarReadPlan(content).readProfile;
|
|
29435
29628
|
}
|
|
29436
29629
|
/** Runtime picker sentinels and bound loader IDs must describe the same query. */
|
|
29437
29630
|
function normalizeCalendarFilterId(value) {
|
|
@@ -29541,6 +29734,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
29541
29734
|
events: z.array(publicEventSchema).nullable().optional(),
|
|
29542
29735
|
siteId: z.string(),
|
|
29543
29736
|
apiBaseUrl: z.string().optional(),
|
|
29737
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
29544
29738
|
stage: previewStageSchema.optional(),
|
|
29545
29739
|
listLayout: eventLayoutSchema.optional(),
|
|
29546
29740
|
listColumns: columnOptionSchema.optional(),
|
|
@@ -29593,7 +29787,6 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
29593
29787
|
const eventCollectionHydrationSchema = z.object({
|
|
29594
29788
|
siteId: z.string(),
|
|
29595
29789
|
calendarWindow: calendarWindowPageSchema.optional(),
|
|
29596
|
-
stage: previewStageSchema.optional(),
|
|
29597
29790
|
prefetchedEvents: z.boolean(),
|
|
29598
29791
|
eventSurface: eventSurfaceScopeSchema$1,
|
|
29599
29792
|
filterEventPresets: z.string().nullable(),
|
|
@@ -29668,7 +29861,6 @@ function buildEventCollectionHydration(source, now = /* @__PURE__ */ new Date())
|
|
|
29668
29861
|
return {
|
|
29669
29862
|
calendarWindow: source.calendarWindow ?? void 0,
|
|
29670
29863
|
siteId: source.siteId,
|
|
29671
|
-
stage: source.stage,
|
|
29672
29864
|
prefetchedEvents: source.events != null,
|
|
29673
29865
|
eventSurface: selected ? "all" : normalizeEventSurfaceScope(source.eventSurface),
|
|
29674
29866
|
filterEventPresets: selected ? null : normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
@@ -29688,6 +29880,7 @@ const eventListingSourceSchema = z.object({
|
|
|
29688
29880
|
events: z.array(publicEventSchema).nullable().optional(),
|
|
29689
29881
|
siteId: z.string(),
|
|
29690
29882
|
apiBaseUrl: z.string().optional(),
|
|
29883
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
29691
29884
|
stage: previewStageSchema.optional(),
|
|
29692
29885
|
layout: eventLayoutSchema.optional(),
|
|
29693
29886
|
columns: columnOptionSchema.optional(),
|
|
@@ -29728,7 +29921,6 @@ const eventListingDisplaySchema = z.object({
|
|
|
29728
29921
|
});
|
|
29729
29922
|
const eventListingHydrationSchema = z.object({
|
|
29730
29923
|
siteId: z.string(),
|
|
29731
|
-
stage: previewStageSchema.optional(),
|
|
29732
29924
|
eventsPerPage: eventPageSizeSchema,
|
|
29733
29925
|
paginationAction: eventListPaginationActionSchema,
|
|
29734
29926
|
showFilters: z.boolean(),
|
|
@@ -29751,6 +29943,7 @@ const eventListingRenderSchema = z.object({
|
|
|
29751
29943
|
z.object({
|
|
29752
29944
|
siteId: z.string(),
|
|
29753
29945
|
apiBaseUrl: z.string().optional(),
|
|
29946
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
29754
29947
|
stage: previewStageSchema.optional()
|
|
29755
29948
|
});
|
|
29756
29949
|
const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
@@ -29785,7 +29978,6 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
29785
29978
|
},
|
|
29786
29979
|
hydration: {
|
|
29787
29980
|
siteId: source.siteId,
|
|
29788
|
-
stage: source.stage,
|
|
29789
29981
|
eventsPerPage: pageSize,
|
|
29790
29982
|
paginationAction: resolveEventListPaginationAction({
|
|
29791
29983
|
paginationMode: source.paginationMode,
|
|
@@ -30067,6 +30259,7 @@ const eventListingBlockDefinition = {
|
|
|
30067
30259
|
rootType: "stack",
|
|
30068
30260
|
rootProps: { gap: "lg" },
|
|
30069
30261
|
children: [...eventSectionHeaderLayoutNodes(), el("event-listing", withApiBindings({
|
|
30262
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
30070
30263
|
events: { $bind: { from: "data.events" } },
|
|
30071
30264
|
stage: { $bind: {
|
|
30072
30265
|
from: "$root.previewStage",
|
|
@@ -30264,6 +30457,7 @@ const eventCalendarRenderSchema = z.object({
|
|
|
30264
30457
|
z.object({
|
|
30265
30458
|
siteId: z.string(),
|
|
30266
30459
|
apiBaseUrl: z.string().optional(),
|
|
30460
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
30267
30461
|
stage: previewStageSchema.optional()
|
|
30268
30462
|
});
|
|
30269
30463
|
/**
|
|
@@ -30285,7 +30479,7 @@ function buildEventCalendarDisplay(source) {
|
|
|
30285
30479
|
listColumns: source.listColumns ?? source.columns
|
|
30286
30480
|
}),
|
|
30287
30481
|
kind: "event-calendar",
|
|
30288
|
-
displayMode:
|
|
30482
|
+
displayMode: resolveEventCalendarReadPlan(source).mode,
|
|
30289
30483
|
className: source.className ?? null,
|
|
30290
30484
|
events: (source.events ?? []).slice().sort((left, right) => new Date(left.startsAt).getTime() - new Date(right.startsAt).getTime()),
|
|
30291
30485
|
boardTitle: normalizeOptionalText(source.boardTitle),
|
|
@@ -30302,13 +30496,16 @@ const eventCalendarBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
30302
30496
|
source: createZodCodec(eventCalendarSourceSchema),
|
|
30303
30497
|
render: createZodCodec(eventCalendarRenderSchema)
|
|
30304
30498
|
},
|
|
30305
|
-
buildRender: (source) =>
|
|
30306
|
-
|
|
30307
|
-
|
|
30308
|
-
|
|
30309
|
-
|
|
30310
|
-
|
|
30311
|
-
|
|
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
|
+
}
|
|
30312
30509
|
});
|
|
30313
30510
|
//#endregion
|
|
30314
30511
|
//#region ../blocks/src/system/blocks/events/eventCalendarDataLoaders.ts
|
|
@@ -30458,6 +30655,7 @@ const eventCalendarLayout = [styledSection({
|
|
|
30458
30655
|
rootType: "stack",
|
|
30459
30656
|
rootProps: { gap: "lg" },
|
|
30460
30657
|
children: [...eventSectionHeaderLayoutNodes({ splitClassName: "event-section-head event-section-head--split" }), el("event-calendar", withApiBindings({
|
|
30658
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
30461
30659
|
events: { $bind: { from: "data.events" } },
|
|
30462
30660
|
calendarWindow: { $bind: { from: "data.calendarWindow" } },
|
|
30463
30661
|
stage: { $bind: {
|
|
@@ -34021,6 +34219,7 @@ const shopSourceSchema = z.object({
|
|
|
34021
34219
|
products: z.array(publicProductSchema).nullable().optional(),
|
|
34022
34220
|
siteId: z.string().optional(),
|
|
34023
34221
|
apiBaseUrl: z.string().optional(),
|
|
34222
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
34024
34223
|
stage: previewStageSchema.optional()
|
|
34025
34224
|
});
|
|
34026
34225
|
const productVariantOptionDisplaySchema = z.object({
|
|
@@ -34188,6 +34387,7 @@ function resolveShowPricePerCredit(source) {
|
|
|
34188
34387
|
z.object({
|
|
34189
34388
|
siteId: z.string().optional(),
|
|
34190
34389
|
apiBaseUrl: z.string().optional(),
|
|
34390
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
34191
34391
|
stage: previewStageSchema.optional()
|
|
34192
34392
|
});
|
|
34193
34393
|
const shopBlockRuntime = defineProgressiveBlockRuntime({
|
|
@@ -34528,6 +34728,7 @@ const shopBlockDefinition = {
|
|
|
34528
34728
|
baseClass: "",
|
|
34529
34729
|
spacing: "spacious",
|
|
34530
34730
|
children: sectionContainer([shop(withApiBindings({
|
|
34731
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
34531
34732
|
mode: "passes-memberships",
|
|
34532
34733
|
showPasses: { $bind: {
|
|
34533
34734
|
from: "content.showPasses",
|
|
@@ -34726,6 +34927,7 @@ const productListBlockDefinition = {
|
|
|
34726
34927
|
baseClass: "",
|
|
34727
34928
|
spacing: "spacious",
|
|
34728
34929
|
children: sectionContainer([productList(withApiBindings({
|
|
34930
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
34729
34931
|
mode: "product-list",
|
|
34730
34932
|
heading: { $bind: {
|
|
34731
34933
|
from: "content.heading",
|
|
@@ -34868,6 +35070,7 @@ const productDetailBlockDefinition = {
|
|
|
34868
35070
|
baseClass: "",
|
|
34869
35071
|
spacing: "spacious",
|
|
34870
35072
|
children: sectionContainer([productDetail(withApiBindings({
|
|
35073
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
34871
35074
|
mode: "product-detail",
|
|
34872
35075
|
heading: { $bind: {
|
|
34873
35076
|
from: "content.heading",
|
|
@@ -34984,6 +35187,7 @@ const cartBlockDefinition = {
|
|
|
34984
35187
|
baseClass: "",
|
|
34985
35188
|
spacing: "spacious",
|
|
34986
35189
|
children: sectionContainer([cart(withApiBindings({
|
|
35190
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
34987
35191
|
mode: "cart",
|
|
34988
35192
|
heading: { $bind: {
|
|
34989
35193
|
from: "content.heading",
|
|
@@ -35067,6 +35271,7 @@ const checkoutBlockDefinition = {
|
|
|
35067
35271
|
baseClass: "",
|
|
35068
35272
|
spacing: "spacious",
|
|
35069
35273
|
children: sectionContainer([checkout(withApiBindings({
|
|
35274
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
35070
35275
|
mode: "checkout",
|
|
35071
35276
|
heading: { $bind: {
|
|
35072
35277
|
from: "content.heading",
|
|
@@ -37727,8 +37932,8 @@ const builtinTransformDefinitions = [
|
|
|
37727
37932
|
summary: "Choose the read projection required by the calendar display mode",
|
|
37728
37933
|
schema: z.object({ job: z.enum(["list", "calendar"]) }),
|
|
37729
37934
|
run(value, options) {
|
|
37730
|
-
const
|
|
37731
|
-
return
|
|
37935
|
+
const plan = resolveEventCalendarReadPlan(asPartialObject(value) ?? {});
|
|
37936
|
+
return plan.jobs === "both" || plan.jobs === options.job;
|
|
37732
37937
|
}
|
|
37733
37938
|
},
|
|
37734
37939
|
{
|
|
@@ -37741,6 +37946,7 @@ const builtinTransformDefinitions = [
|
|
|
37741
37946
|
},
|
|
37742
37947
|
...formattingTransforms,
|
|
37743
37948
|
...layoutTransforms,
|
|
37949
|
+
...chromeLogoTransforms,
|
|
37744
37950
|
...uiTransforms,
|
|
37745
37951
|
...mediaTransforms,
|
|
37746
37952
|
...backgroundTransforms,
|