@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
package/dist/server/config.mjs
CHANGED
|
@@ -2683,6 +2683,17 @@ function resolveSiteVerticalBookingConfig(rawConfig) {
|
|
|
2683
2683
|
//#endregion
|
|
2684
2684
|
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
2685
2685
|
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
2686
|
+
checkPublicEventRegistrationNextStep: {
|
|
2687
|
+
path: "/public/sites/{siteId}/events/registration-next-step",
|
|
2688
|
+
method: "POST",
|
|
2689
|
+
auth: "public",
|
|
2690
|
+
responseKind: "json",
|
|
2691
|
+
errors: [
|
|
2692
|
+
"validation:invalid_input",
|
|
2693
|
+
"auth:forbidden",
|
|
2694
|
+
"server:internal_error"
|
|
2695
|
+
]
|
|
2696
|
+
},
|
|
2686
2697
|
listPublicEventCalendarWindow: {
|
|
2687
2698
|
path: "/public/sites/{siteId}/events/calendar-window",
|
|
2688
2699
|
method: "GET",
|
|
@@ -3671,6 +3682,8 @@ z.discriminatedUnion("kind", navigationLinkInputSchemaOptions);
|
|
|
3671
3682
|
//#endregion
|
|
3672
3683
|
//#region ../theme-core/src/palette/utils/colorConversion.ts
|
|
3673
3684
|
const clamp01 = (x) => Math.max(0, Math.min(1, x));
|
|
3685
|
+
const mod = (a, n) => (a % n + n) % n;
|
|
3686
|
+
const deg = (x) => mod(x, 360);
|
|
3674
3687
|
function hexToRgb(hex) {
|
|
3675
3688
|
const h = hex.replace(/^#/, "");
|
|
3676
3689
|
const m = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
|
|
@@ -3693,6 +3706,45 @@ function srgbToLinear(u) {
|
|
|
3693
3706
|
function linearToSrgb(x) {
|
|
3694
3707
|
return clamp01(x <= .0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - .055) * 255;
|
|
3695
3708
|
}
|
|
3709
|
+
function rgbToHsl(r, g, b) {
|
|
3710
|
+
const R = r / 255, G = g / 255, B = b / 255;
|
|
3711
|
+
const max = Math.max(R, G, B), min = Math.min(R, G, B);
|
|
3712
|
+
const d = max - min;
|
|
3713
|
+
let h = 0;
|
|
3714
|
+
if (d !== 0) {
|
|
3715
|
+
switch (max) {
|
|
3716
|
+
case R:
|
|
3717
|
+
h = (G - B) / d + (G < B ? 6 : 0);
|
|
3718
|
+
break;
|
|
3719
|
+
case G:
|
|
3720
|
+
h = (B - R) / d + 2;
|
|
3721
|
+
break;
|
|
3722
|
+
case B:
|
|
3723
|
+
h = (R - G) / d + 4;
|
|
3724
|
+
break;
|
|
3725
|
+
}
|
|
3726
|
+
h *= 60;
|
|
3727
|
+
}
|
|
3728
|
+
const l = (max + min) / 2;
|
|
3729
|
+
const s = d === 0 ? 0 : d / (1 - Math.abs(2 * l - 1));
|
|
3730
|
+
return {
|
|
3731
|
+
h,
|
|
3732
|
+
s,
|
|
3733
|
+
l
|
|
3734
|
+
};
|
|
3735
|
+
}
|
|
3736
|
+
function srgbToOklab(r, g, b) {
|
|
3737
|
+
const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
|
|
3738
|
+
const l = .4122214708 * R + .5363325363 * G + .0514459929 * B;
|
|
3739
|
+
const m = .2119034982 * R + .6806995451 * G + .1073969566 * B;
|
|
3740
|
+
const s = .0883024619 * R + .2817188376 * G + .6299787005 * B;
|
|
3741
|
+
const l_ = Math.cbrt(l), m_ = Math.cbrt(m), s_ = Math.cbrt(s);
|
|
3742
|
+
return {
|
|
3743
|
+
L: .2104542553 * l_ + .793617785 * m_ - .0040720468 * s_,
|
|
3744
|
+
a: 1.9779984951 * l_ - 2.428592205 * m_ + .4505937099 * s_,
|
|
3745
|
+
b: .0259040371 * l_ + .7827717662 * m_ - .808675766 * s_
|
|
3746
|
+
};
|
|
3747
|
+
}
|
|
3696
3748
|
function oklabToSrgb(L, a, b) {
|
|
3697
3749
|
const l_ = Math.pow(L + .3963377774 * a + .2158037573 * b, 3);
|
|
3698
3750
|
const m_ = Math.pow(L - .1055613458 * a - .0638541728 * b, 3);
|
|
@@ -3706,6 +3758,14 @@ function oklabToSrgb(L, a, b) {
|
|
|
3706
3758
|
b: linearToSrgb(B)
|
|
3707
3759
|
};
|
|
3708
3760
|
}
|
|
3761
|
+
function oklabToOklch(L, a, b) {
|
|
3762
|
+
const C = Math.sqrt(a * a + b * b);
|
|
3763
|
+
return {
|
|
3764
|
+
L,
|
|
3765
|
+
C,
|
|
3766
|
+
h: C < 1e-7 ? 0 : deg(Math.atan2(b, a) * 180 / Math.PI)
|
|
3767
|
+
};
|
|
3768
|
+
}
|
|
3709
3769
|
function oklchToOklab(L, C, h) {
|
|
3710
3770
|
const hr = h * Math.PI / 180;
|
|
3711
3771
|
return {
|
|
@@ -3714,6 +3774,27 @@ function oklchToOklab(L, C, h) {
|
|
|
3714
3774
|
b: C * Math.sin(hr)
|
|
3715
3775
|
};
|
|
3716
3776
|
}
|
|
3777
|
+
function featuresFromHex(hex) {
|
|
3778
|
+
const { r, g, b } = hexToRgb(hex);
|
|
3779
|
+
const { h, s, l } = rgbToHsl(r, g, b);
|
|
3780
|
+
const { L, a, b: b2 } = srgbToOklab(r, g, b);
|
|
3781
|
+
const { L: okL, C: okC, h: okH } = oklabToOklch(L, a, b2);
|
|
3782
|
+
return {
|
|
3783
|
+
r,
|
|
3784
|
+
g,
|
|
3785
|
+
b,
|
|
3786
|
+
h,
|
|
3787
|
+
s,
|
|
3788
|
+
l,
|
|
3789
|
+
v: Math.max(r, g, b) / 255,
|
|
3790
|
+
Y: .2126 * srgbToLinear(r) + .7152 * srgbToLinear(g) + .0722 * srgbToLinear(b),
|
|
3791
|
+
chroma: s,
|
|
3792
|
+
okL,
|
|
3793
|
+
okC,
|
|
3794
|
+
okH,
|
|
3795
|
+
hex
|
|
3796
|
+
};
|
|
3797
|
+
}
|
|
3717
3798
|
function relativeLuminance(r, g, b) {
|
|
3718
3799
|
const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
|
|
3719
3800
|
return .2126 * R + .7152 * G + .0722 * B;
|
|
@@ -6797,6 +6878,36 @@ function normalizedReference(value) {
|
|
|
6797
6878
|
return normalized.length > 0 ? normalized : null;
|
|
6798
6879
|
}
|
|
6799
6880
|
//#endregion
|
|
6881
|
+
//#region ../theme-core/src/surfaces/logoVariant.ts
|
|
6882
|
+
/** Concrete hex behind a plain, opaque palette token, or null otherwise. */
|
|
6883
|
+
function opaquePaletteHexForToken(expandedPalette, token) {
|
|
6884
|
+
if (!token) return null;
|
|
6885
|
+
const parts = parseColorTokenParts(token);
|
|
6886
|
+
if (parts.kind !== "token" || parts.opacityPercent !== null) return null;
|
|
6887
|
+
return expandedPalette[parts.token] ?? null;
|
|
6888
|
+
}
|
|
6889
|
+
/**
|
|
6890
|
+
* Tone of the surface a foreground token was resolved for.
|
|
6891
|
+
*
|
|
6892
|
+
* A token with opacity has no known underlay to composite against, and a raw
|
|
6893
|
+
* or unrecognised token has no palette hex, so both are `unknown` rather than
|
|
6894
|
+
* a guess.
|
|
6895
|
+
*/
|
|
6896
|
+
function surfaceToneFromForegroundToken(expandedPalette, foregroundToken) {
|
|
6897
|
+
const hex = opaquePaletteHexForToken(expandedPalette, foregroundToken);
|
|
6898
|
+
if (!hex) return "unknown";
|
|
6899
|
+
return featuresFromHex(hex).Y >= .5 ? "dark" : "light";
|
|
6900
|
+
}
|
|
6901
|
+
/**
|
|
6902
|
+
* The logo to draw on a surface of the given tone. A missing variant falls
|
|
6903
|
+
* back to the other one, and an unknown tone uses the light-backgrounds logo,
|
|
6904
|
+
* which is what every site rendered before variants existed.
|
|
6905
|
+
*/
|
|
6906
|
+
function selectLogoVariant(tone, variants) {
|
|
6907
|
+
const { forLightBackgrounds, forDarkBackgrounds } = variants;
|
|
6908
|
+
return tone === "dark" ? forDarkBackgrounds ?? forLightBackgrounds : forLightBackgrounds ?? forDarkBackgrounds;
|
|
6909
|
+
}
|
|
6910
|
+
//#endregion
|
|
6800
6911
|
//#region ../theme-core/src/utils/colorStyles.ts
|
|
6801
6912
|
const COLOR_VAR_PREFIX = "--tb-";
|
|
6802
6913
|
function parseToken(source) {
|
|
@@ -6848,16 +6959,28 @@ function backgroundColorStyle(token) {
|
|
|
6848
6959
|
return { backgroundColor: rgbColorValue(token) };
|
|
6849
6960
|
}
|
|
6850
6961
|
/**
|
|
6962
|
+
* Converts a text color token to a CSS color value that follows the enclosing
|
|
6963
|
+
* surface. The semantic text tokens (`text`, `heading`, `mutedText`) resolve
|
|
6964
|
+
* to the surface foreground variables, so text adapts when a section's
|
|
6965
|
+
* background changes; any other token is a fixed theme color.
|
|
6966
|
+
*
|
|
6967
|
+
* @param token - Theme color token
|
|
6968
|
+
* @returns CSS color value
|
|
6969
|
+
*/
|
|
6970
|
+
function textColorValue(token) {
|
|
6971
|
+
const parsed = parseToken(token);
|
|
6972
|
+
const surfaceRole = parsed.raw ? null : surfaceRoleForTextToken(parsed.token);
|
|
6973
|
+
if (!surfaceRole) return rgbColorValue(token);
|
|
6974
|
+
return parsed.opacityPercent === void 0 ? surfaceForegroundValue(surfaceRole) : surfaceForegroundValueWithOpacity(surfaceRole, parsed.opacityPercent);
|
|
6975
|
+
}
|
|
6976
|
+
/**
|
|
6851
6977
|
* Creates a text color style object from a theme token.
|
|
6852
6978
|
*
|
|
6853
6979
|
* @param token - Theme color token
|
|
6854
6980
|
* @returns CSSProperties with color
|
|
6855
6981
|
*/
|
|
6856
6982
|
function textColorStyle(token) {
|
|
6857
|
-
|
|
6858
|
-
const surfaceRole = parsed.raw ? null : surfaceRoleForTextToken(parsed.token);
|
|
6859
|
-
if (surfaceRole) return { color: parsed.opacityPercent === void 0 ? surfaceForegroundValue(surfaceRole) : surfaceForegroundValueWithOpacity(surfaceRole, parsed.opacityPercent) };
|
|
6860
|
-
return { color: rgbColorValue(token) };
|
|
6983
|
+
return { color: textColorValue(token) };
|
|
6861
6984
|
}
|
|
6862
6985
|
/**
|
|
6863
6986
|
* Creates a border color style object from a theme token.
|
|
@@ -18669,9 +18792,7 @@ function navRow(opts) {
|
|
|
18669
18792
|
rel: { $bind: { from: `${childItemName}.rel` } },
|
|
18670
18793
|
"data-active": { $bind: { from: `${childItemName}.active` } }
|
|
18671
18794
|
}, [text({ as: "span" }, bind(`${childItemName}.label`))], repeat(`${itemName}.children`, childItemName));
|
|
18672
|
-
const dropdown = el("div", { className: "nav-dropdown rb-relative" }, [
|
|
18673
|
-
type: "button",
|
|
18674
|
-
variantId: "",
|
|
18795
|
+
const dropdown = el("div", { className: "nav-dropdown rb-relative" }, [el("headerControl", {
|
|
18675
18796
|
className: prependClassName("nav-dropdown-trigger", linkClassName),
|
|
18676
18797
|
"aria-haspopup": "menu",
|
|
18677
18798
|
"aria-expanded": "false",
|
|
@@ -18739,9 +18860,7 @@ function navColumn(opts) {
|
|
|
18739
18860
|
const dropdown = el("div", {
|
|
18740
18861
|
className: "nav-mobile-dropdown",
|
|
18741
18862
|
"data-nav-mobile-dropdown": "true"
|
|
18742
|
-
}, [
|
|
18743
|
-
type: "button",
|
|
18744
|
-
variantId: "",
|
|
18863
|
+
}, [el("headerControl", {
|
|
18745
18864
|
className: triggerClassName,
|
|
18746
18865
|
"aria-expanded": "false",
|
|
18747
18866
|
"aria-controls": childrenId,
|
|
@@ -25048,6 +25167,49 @@ const layoutTransforms = [
|
|
|
25048
25167
|
footerLogoMediaClassTransform,
|
|
25049
25168
|
footerLogoTextVisibleTransform
|
|
25050
25169
|
];
|
|
25170
|
+
//#endregion
|
|
25171
|
+
//#region ../blocks/src/system/transforms/registry/chromeLogo.ts
|
|
25172
|
+
const chromeLogoSchema = z.object({ surface: z.enum([
|
|
25173
|
+
"header-root",
|
|
25174
|
+
"header-mobile-panel",
|
|
25175
|
+
"footer-root"
|
|
25176
|
+
]) });
|
|
25177
|
+
/** The brand foreground shares the logo's surface; navigation may own a separate capsule. */
|
|
25178
|
+
function chromeSurfaceTextToken(surface, theme, palette) {
|
|
25179
|
+
switch (surface) {
|
|
25180
|
+
case "header-root": {
|
|
25181
|
+
const header = theme.header;
|
|
25182
|
+
const foreground = resolveHeaderRootForeground(header, palette, resolveHeaderVisualStyles(header).isTransparent);
|
|
25183
|
+
return foreground.kind === "known" ? foreground.roles.text : resolveHeaderLeafTextColor(header);
|
|
25184
|
+
}
|
|
25185
|
+
case "header-mobile-panel": return theme.header?.dropdownStyle?.textColor ?? "text";
|
|
25186
|
+
case "footer-root": {
|
|
25187
|
+
const foreground = resolveFooterRootForeground(theme.footer, palette);
|
|
25188
|
+
return foreground.kind === "known" ? foreground.roles.text : void 0;
|
|
25189
|
+
}
|
|
25190
|
+
}
|
|
25191
|
+
}
|
|
25192
|
+
function readChromeTheme(viewModel) {
|
|
25193
|
+
return asPartialObject(asPartialObject(viewModel?.["$root"])?.theme) ?? {};
|
|
25194
|
+
}
|
|
25195
|
+
function resolveChromeSurfaceTone(surface, context) {
|
|
25196
|
+
return surfaceToneFromForegroundToken(context.theme.palette, chromeSurfaceTextToken(surface, readChromeTheme(context.viewModel), context.theme.palette));
|
|
25197
|
+
}
|
|
25198
|
+
const chromeLogoTransforms = [{
|
|
25199
|
+
id: "layout.chromeLogo",
|
|
25200
|
+
kind: "formatter",
|
|
25201
|
+
summary: "Select the light- or dark-background site logo for a header or footer surface",
|
|
25202
|
+
schema: chromeLogoSchema,
|
|
25203
|
+
run: (value, options, context) => {
|
|
25204
|
+
const content = asPartialObject(value);
|
|
25205
|
+
const variants = asPartialObject(content?.logoVariants);
|
|
25206
|
+
if (!variants) return content?.logo ?? null;
|
|
25207
|
+
return selectLogoVariant(resolveChromeSurfaceTone(options.surface, context), {
|
|
25208
|
+
forLightBackgrounds: variants.forLightBackgrounds ?? null,
|
|
25209
|
+
forDarkBackgrounds: variants.forDarkBackgrounds ?? null
|
|
25210
|
+
});
|
|
25211
|
+
}
|
|
25212
|
+
}];
|
|
25051
25213
|
const headerRuntimeTransforms = [{
|
|
25052
25214
|
id: "layout.headerRuntimeContract",
|
|
25053
25215
|
kind: "formatter",
|
|
@@ -25255,46 +25417,42 @@ const whenTransformed = (from, transformId, equals = true) => (node) => ({
|
|
|
25255
25417
|
equals
|
|
25256
25418
|
}
|
|
25257
25419
|
});
|
|
25258
|
-
|
|
25420
|
+
/** Draw whichever site logo suits the surface this row sits on. */
|
|
25421
|
+
const bindChromeLogo = (surface) => bind("content", { transforms: [{
|
|
25422
|
+
id: "layout.chromeLogo",
|
|
25423
|
+
options: { surface }
|
|
25424
|
+
}] });
|
|
25425
|
+
/**
|
|
25426
|
+
* The brand link. The logo is chosen per surface because the open mobile menu
|
|
25427
|
+
* paints its own background, which may be the opposite tone to the header.
|
|
25428
|
+
*/
|
|
25429
|
+
const createLogoRow = (surface) => link({
|
|
25259
25430
|
href: "/",
|
|
25260
25431
|
className: bindProp("$root.theme.header.logo", {
|
|
25261
25432
|
transforms: pipe(tx("layout.headerLogoClass")),
|
|
25262
25433
|
fallback: "header-logo rb-flex rb-min-w-0 rb-items-center rb-gap-3 rb-no-underline rb-transition-opacity rb-hover-opacity-80"
|
|
25263
25434
|
})
|
|
25264
|
-
}, [
|
|
25265
|
-
|
|
25266
|
-
|
|
25267
|
-
|
|
25268
|
-
|
|
25269
|
-
|
|
25270
|
-
|
|
25271
|
-
|
|
25272
|
-
}) }, when("site.logo"), bind("site.logo"))], when("content.logo", { not: true })),
|
|
25273
|
-
text({
|
|
25274
|
-
as: "strong",
|
|
25275
|
-
className: "header-logo-text rb-truncate"
|
|
25276
|
-
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))
|
|
25277
|
-
]);
|
|
25435
|
+
}, [media({ className: bindProp("$root.theme.header.logo", {
|
|
25436
|
+
transforms: pipe(tx("layout.headerLogoMediaClass", { base: "rb-header-logo-sm rb-w-auto rb-transition-all rb-duration-300" })),
|
|
25437
|
+
fallback: "rb-header-logo-sm rb-w-auto rb-transition-all rb-duration-300"
|
|
25438
|
+
}) }, when("content.logo"), bindChromeLogo(surface)), text({
|
|
25439
|
+
as: "strong",
|
|
25440
|
+
className: "header-logo-text rb-truncate"
|
|
25441
|
+
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))]);
|
|
25442
|
+
const logoRow = createLogoRow("header-root");
|
|
25278
25443
|
const centeredLogoRow = link({
|
|
25279
25444
|
href: "/",
|
|
25280
25445
|
className: bindProp("$root.theme.header.logo", {
|
|
25281
25446
|
transforms: pipe(tx("layout.headerLogoClass", { base: "header-logo rb-flex rb-items-center rb-justify-center rb-gap-3 rb-text-center rb-no-underline rb-transition-opacity rb-hover-opacity-80" })),
|
|
25282
25447
|
fallback: "header-logo rb-flex rb-items-center rb-justify-center rb-gap-3 rb-text-center rb-no-underline rb-transition-opacity rb-hover-opacity-80"
|
|
25283
25448
|
})
|
|
25284
|
-
}, [
|
|
25285
|
-
|
|
25286
|
-
|
|
25287
|
-
|
|
25288
|
-
|
|
25289
|
-
|
|
25290
|
-
|
|
25291
|
-
fallback: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300"
|
|
25292
|
-
}) }, when("site.logo"), bind("site.logo"))], when("content.logo", { not: true })),
|
|
25293
|
-
text({
|
|
25294
|
-
as: "strong",
|
|
25295
|
-
className: "header-logo-text"
|
|
25296
|
-
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))
|
|
25297
|
-
]);
|
|
25449
|
+
}, [media({ className: bindProp("$root.theme.header.logo", {
|
|
25450
|
+
transforms: pipe(tx("layout.headerLogoMediaClass", { base: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300" })),
|
|
25451
|
+
fallback: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300"
|
|
25452
|
+
}) }, when("content.logo"), bindChromeLogo("header-root")), text({
|
|
25453
|
+
as: "strong",
|
|
25454
|
+
className: "header-logo-text"
|
|
25455
|
+
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))]);
|
|
25298
25456
|
const createNavRow = (className, align = "end") => navRow({
|
|
25299
25457
|
className: `${className} header-nav-row`,
|
|
25300
25458
|
align,
|
|
@@ -25334,10 +25492,8 @@ const mobileToggleIcon = stack({
|
|
|
25334
25492
|
}
|
|
25335
25493
|
]);
|
|
25336
25494
|
const mobileToggleButton = {
|
|
25337
|
-
type: "
|
|
25495
|
+
type: "headerControl",
|
|
25338
25496
|
props: {
|
|
25339
|
-
type: "button",
|
|
25340
|
-
variantId: "",
|
|
25341
25497
|
className: `nav-mobile-toggle ${mobileOnlyDisplay("inline-flex")} rb-h-10 rb-w-10 rb-items-center rb-justify-center rb-rounded-md transition-theme-standard`,
|
|
25342
25498
|
"aria-label": "Open menu",
|
|
25343
25499
|
"aria-expanded": "false",
|
|
@@ -25347,10 +25503,8 @@ const mobileToggleButton = {
|
|
|
25347
25503
|
children: [mobileToggleIcon]
|
|
25348
25504
|
};
|
|
25349
25505
|
const mobileOverlayToggleButton = {
|
|
25350
|
-
type: "
|
|
25506
|
+
type: "headerControl",
|
|
25351
25507
|
props: {
|
|
25352
|
-
type: "button",
|
|
25353
|
-
variantId: "",
|
|
25354
25508
|
className: "nav-mobile-toggle rb-inline-flex rb-h-10 rb-w-10 rb-items-center rb-justify-center rb-rounded-md transition-theme-standard",
|
|
25355
25509
|
"aria-label": "Open menu",
|
|
25356
25510
|
"aria-expanded": "false",
|
|
@@ -25374,7 +25528,7 @@ const mobileOverlayHeader = inline({
|
|
|
25374
25528
|
align: "center",
|
|
25375
25529
|
justify: "between",
|
|
25376
25530
|
style: borderColorStyle("border")
|
|
25377
|
-
}, [
|
|
25531
|
+
}, [createLogoRow("header-mobile-panel"), mobileOverlayToggleButton]);
|
|
25378
25532
|
const mobileOverlayBody = stack({
|
|
25379
25533
|
className: "rb-flex-1 rb-px-6 rb-py-6",
|
|
25380
25534
|
gap: "md",
|
|
@@ -25561,7 +25715,10 @@ const brandLogo = link({
|
|
|
25561
25715
|
options: { base: "rb-h-10 rb-w-auto" }
|
|
25562
25716
|
}],
|
|
25563
25717
|
fallback: "rb-h-10 rb-w-auto"
|
|
25564
|
-
} } }, when("module.showLogo", { equals: true }), when("content.logo"), bind("content
|
|
25718
|
+
} } }, when("module.showLogo", { equals: true }), when("content.logo"), bind("content", { transforms: [{
|
|
25719
|
+
id: "layout.chromeLogo",
|
|
25720
|
+
options: { surface: "footer-root" }
|
|
25721
|
+
}] })), text({
|
|
25565
25722
|
as: "strong",
|
|
25566
25723
|
className: "footer-logo-text rb-nav-text"
|
|
25567
25724
|
}, when("module.showTitle", { equals: true }), bind("site.title", { fallback: "Your Site" }))], when("module.kind", { equals: "brand" }));
|
|
@@ -28277,6 +28434,12 @@ const occurrenceContextSchema = z.object({
|
|
|
28277
28434
|
capacityOverride: z.number().nullable().optional(),
|
|
28278
28435
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
28279
28436
|
}).nullable();
|
|
28437
|
+
//#endregion
|
|
28438
|
+
//#region ../blocks/src/system/runtime/api/readAuthority.ts
|
|
28439
|
+
const browserReadAuthoritySchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("published") }).strict(), z.object({
|
|
28440
|
+
kind: z.literal("preview"),
|
|
28441
|
+
token: z.string().min(1)
|
|
28442
|
+
}).strict()]);
|
|
28280
28443
|
const unsupportedEventRegistrationPageSurfaceSubjectSchema = z.object({
|
|
28281
28444
|
kind: z.literal("unsupported"),
|
|
28282
28445
|
reason: z.enum([
|
|
@@ -28387,6 +28550,33 @@ function normalizeEventCalendarDisplayMode$1(input) {
|
|
|
28387
28550
|
if (isEventCalendarDisplayMode(input.variant)) return input.variant;
|
|
28388
28551
|
return isEventCalendarDisplayMode(input.displayMode) ? input.displayMode : void 0;
|
|
28389
28552
|
}
|
|
28553
|
+
/** One closed authority for the projections required by each rendered mode. */
|
|
28554
|
+
function resolveEventCalendarReadPlan(input) {
|
|
28555
|
+
const mode = normalizeEventCalendarDisplayMode$1(input) ?? "combined";
|
|
28556
|
+
switch (mode) {
|
|
28557
|
+
case "combined": return {
|
|
28558
|
+
mode,
|
|
28559
|
+
jobs: "both",
|
|
28560
|
+
readProfile: "listing-card"
|
|
28561
|
+
};
|
|
28562
|
+
case "list": return {
|
|
28563
|
+
mode,
|
|
28564
|
+
jobs: "list",
|
|
28565
|
+
readProfile: "listing-card"
|
|
28566
|
+
};
|
|
28567
|
+
case "calendar": return {
|
|
28568
|
+
mode,
|
|
28569
|
+
jobs: "calendar",
|
|
28570
|
+
readProfile: "listing-card"
|
|
28571
|
+
};
|
|
28572
|
+
case "timetable":
|
|
28573
|
+
case "week-board": return {
|
|
28574
|
+
mode,
|
|
28575
|
+
jobs: "calendar",
|
|
28576
|
+
readProfile: "timetable"
|
|
28577
|
+
};
|
|
28578
|
+
}
|
|
28579
|
+
}
|
|
28390
28580
|
function isEventCalendarDefaultView(value) {
|
|
28391
28581
|
return typeof value === "string" && eventCalendarDefaultViewValues.includes(value);
|
|
28392
28582
|
}
|
|
@@ -28581,6 +28771,7 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
28581
28771
|
apiBaseUrl: z.string().optional(),
|
|
28582
28772
|
portalToken: z.string().nullable().optional(),
|
|
28583
28773
|
previewToken: z.string().nullable().optional(),
|
|
28774
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
28584
28775
|
...eventRegistrationHydrationSchemaShape,
|
|
28585
28776
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
28586
28777
|
wholeSeriesRunEvents: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
@@ -28618,6 +28809,7 @@ z.object({
|
|
|
28618
28809
|
apiBaseUrl: z.string().optional(),
|
|
28619
28810
|
portalToken: z.string().nullable().optional(),
|
|
28620
28811
|
previewToken: z.string().nullable().optional(),
|
|
28812
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
28621
28813
|
stage: previewStageSchema.optional()
|
|
28622
28814
|
});
|
|
28623
28815
|
function buildEventRegistrationDisplayFromScopedEvents(source, scopedSourceEvents) {
|
|
@@ -28693,6 +28885,7 @@ function shellLabelForRegistrationStep(step, events) {
|
|
|
28693
28885
|
case "redirecting":
|
|
28694
28886
|
case "verifying-payment":
|
|
28695
28887
|
case "verifying-timeout":
|
|
28888
|
+
case "payment-status":
|
|
28696
28889
|
case "payment-failed": return "Details";
|
|
28697
28890
|
}
|
|
28698
28891
|
}
|
|
@@ -28875,6 +29068,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
28875
29068
|
text({ as: "h2" }, bind("content.heading"), when("content.heading")),
|
|
28876
29069
|
richText({ className: "rb-prose rb-max-w-none" }, bind("content.description"), when("content.description")),
|
|
28877
29070
|
eventRegistration(withApiBindings({
|
|
29071
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
28878
29072
|
occurrenceContext: { $bind: { from: "$root.occurrenceContext" } },
|
|
28879
29073
|
subject: { $bind: { from: "$root.subject" } },
|
|
28880
29074
|
portalToken: { $bind: {
|
|
@@ -29507,8 +29701,7 @@ function resolveEventListPaginationAction(input) {
|
|
|
29507
29701
|
//#endregion
|
|
29508
29702
|
//#region ../blocks/src/system/blocks/events/shared/calendarWindow.ts
|
|
29509
29703
|
function resolveCalendarReadProfile(content) {
|
|
29510
|
-
|
|
29511
|
-
return mode === "timetable" || mode === "week-board" ? "timetable" : "listing-card";
|
|
29704
|
+
return resolveEventCalendarReadPlan(content).readProfile;
|
|
29512
29705
|
}
|
|
29513
29706
|
/** Runtime picker sentinels and bound loader IDs must describe the same query. */
|
|
29514
29707
|
function normalizeCalendarFilterId(value) {
|
|
@@ -29618,6 +29811,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
29618
29811
|
events: z.array(publicEventSchema).nullable().optional(),
|
|
29619
29812
|
siteId: z.string(),
|
|
29620
29813
|
apiBaseUrl: z.string().optional(),
|
|
29814
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
29621
29815
|
stage: previewStageSchema.optional(),
|
|
29622
29816
|
listLayout: eventLayoutSchema.optional(),
|
|
29623
29817
|
listColumns: columnOptionSchema.optional(),
|
|
@@ -29670,7 +29864,6 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
29670
29864
|
const eventCollectionHydrationSchema = z.object({
|
|
29671
29865
|
siteId: z.string(),
|
|
29672
29866
|
calendarWindow: calendarWindowPageSchema.optional(),
|
|
29673
|
-
stage: previewStageSchema.optional(),
|
|
29674
29867
|
prefetchedEvents: z.boolean(),
|
|
29675
29868
|
eventSurface: eventSurfaceScopeSchema$1,
|
|
29676
29869
|
filterEventPresets: z.string().nullable(),
|
|
@@ -29745,7 +29938,6 @@ function buildEventCollectionHydration(source, now = /* @__PURE__ */ new Date())
|
|
|
29745
29938
|
return {
|
|
29746
29939
|
calendarWindow: source.calendarWindow ?? void 0,
|
|
29747
29940
|
siteId: source.siteId,
|
|
29748
|
-
stage: source.stage,
|
|
29749
29941
|
prefetchedEvents: source.events != null,
|
|
29750
29942
|
eventSurface: selected ? "all" : normalizeEventSurfaceScope(source.eventSurface),
|
|
29751
29943
|
filterEventPresets: selected ? null : normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
@@ -29765,6 +29957,7 @@ const eventListingSourceSchema = z.object({
|
|
|
29765
29957
|
events: z.array(publicEventSchema).nullable().optional(),
|
|
29766
29958
|
siteId: z.string(),
|
|
29767
29959
|
apiBaseUrl: z.string().optional(),
|
|
29960
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
29768
29961
|
stage: previewStageSchema.optional(),
|
|
29769
29962
|
layout: eventLayoutSchema.optional(),
|
|
29770
29963
|
columns: columnOptionSchema.optional(),
|
|
@@ -29805,7 +29998,6 @@ const eventListingDisplaySchema = z.object({
|
|
|
29805
29998
|
});
|
|
29806
29999
|
const eventListingHydrationSchema = z.object({
|
|
29807
30000
|
siteId: z.string(),
|
|
29808
|
-
stage: previewStageSchema.optional(),
|
|
29809
30001
|
eventsPerPage: eventPageSizeSchema,
|
|
29810
30002
|
paginationAction: eventListPaginationActionSchema,
|
|
29811
30003
|
showFilters: z.boolean(),
|
|
@@ -29828,6 +30020,7 @@ const eventListingRenderSchema = z.object({
|
|
|
29828
30020
|
z.object({
|
|
29829
30021
|
siteId: z.string(),
|
|
29830
30022
|
apiBaseUrl: z.string().optional(),
|
|
30023
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
29831
30024
|
stage: previewStageSchema.optional()
|
|
29832
30025
|
});
|
|
29833
30026
|
const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
@@ -29862,7 +30055,6 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
29862
30055
|
},
|
|
29863
30056
|
hydration: {
|
|
29864
30057
|
siteId: source.siteId,
|
|
29865
|
-
stage: source.stage,
|
|
29866
30058
|
eventsPerPage: pageSize,
|
|
29867
30059
|
paginationAction: resolveEventListPaginationAction({
|
|
29868
30060
|
paginationMode: source.paginationMode,
|
|
@@ -30144,6 +30336,7 @@ const eventListingBlockDefinition = {
|
|
|
30144
30336
|
rootType: "stack",
|
|
30145
30337
|
rootProps: { gap: "lg" },
|
|
30146
30338
|
children: [...eventSectionHeaderLayoutNodes(), el("event-listing", withApiBindings({
|
|
30339
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
30147
30340
|
events: { $bind: { from: "data.events" } },
|
|
30148
30341
|
stage: { $bind: {
|
|
30149
30342
|
from: "$root.previewStage",
|
|
@@ -30341,6 +30534,7 @@ const eventCalendarRenderSchema = z.object({
|
|
|
30341
30534
|
z.object({
|
|
30342
30535
|
siteId: z.string(),
|
|
30343
30536
|
apiBaseUrl: z.string().optional(),
|
|
30537
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
30344
30538
|
stage: previewStageSchema.optional()
|
|
30345
30539
|
});
|
|
30346
30540
|
/**
|
|
@@ -30362,7 +30556,7 @@ function buildEventCalendarDisplay(source) {
|
|
|
30362
30556
|
listColumns: source.listColumns ?? source.columns
|
|
30363
30557
|
}),
|
|
30364
30558
|
kind: "event-calendar",
|
|
30365
|
-
displayMode:
|
|
30559
|
+
displayMode: resolveEventCalendarReadPlan(source).mode,
|
|
30366
30560
|
className: source.className ?? null,
|
|
30367
30561
|
events: (source.events ?? []).slice().sort((left, right) => new Date(left.startsAt).getTime() - new Date(right.startsAt).getTime()),
|
|
30368
30562
|
boardTitle: normalizeOptionalText(source.boardTitle),
|
|
@@ -30379,13 +30573,16 @@ const eventCalendarBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
30379
30573
|
source: createZodCodec(eventCalendarSourceSchema),
|
|
30380
30574
|
render: createZodCodec(eventCalendarRenderSchema)
|
|
30381
30575
|
},
|
|
30382
|
-
buildRender: (source) =>
|
|
30383
|
-
|
|
30384
|
-
|
|
30385
|
-
|
|
30386
|
-
|
|
30387
|
-
|
|
30388
|
-
|
|
30576
|
+
buildRender: (source) => {
|
|
30577
|
+
const plan = resolveEventCalendarReadPlan(source);
|
|
30578
|
+
return {
|
|
30579
|
+
display: buildEventCalendarDisplay(source.calendarWindow && plan.jobs === "calendar" ? {
|
|
30580
|
+
...source,
|
|
30581
|
+
events: source.calendarWindow.events
|
|
30582
|
+
} : source),
|
|
30583
|
+
hydration: buildEventCollectionHydration(source)
|
|
30584
|
+
};
|
|
30585
|
+
}
|
|
30389
30586
|
});
|
|
30390
30587
|
//#endregion
|
|
30391
30588
|
//#region ../blocks/src/system/blocks/events/eventCalendarDataLoaders.ts
|
|
@@ -30535,6 +30732,7 @@ const eventCalendarLayout = [styledSection({
|
|
|
30535
30732
|
rootType: "stack",
|
|
30536
30733
|
rootProps: { gap: "lg" },
|
|
30537
30734
|
children: [...eventSectionHeaderLayoutNodes({ splitClassName: "event-section-head event-section-head--split" }), el("event-calendar", withApiBindings({
|
|
30735
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
30538
30736
|
events: { $bind: { from: "data.events" } },
|
|
30539
30737
|
calendarWindow: { $bind: { from: "data.calendarWindow" } },
|
|
30540
30738
|
stage: { $bind: {
|
|
@@ -34098,6 +34296,7 @@ const shopSourceSchema = z.object({
|
|
|
34098
34296
|
products: z.array(publicProductSchema).nullable().optional(),
|
|
34099
34297
|
siteId: z.string().optional(),
|
|
34100
34298
|
apiBaseUrl: z.string().optional(),
|
|
34299
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
34101
34300
|
stage: previewStageSchema.optional()
|
|
34102
34301
|
});
|
|
34103
34302
|
const productVariantOptionDisplaySchema = z.object({
|
|
@@ -34265,6 +34464,7 @@ function resolveShowPricePerCredit(source) {
|
|
|
34265
34464
|
z.object({
|
|
34266
34465
|
siteId: z.string().optional(),
|
|
34267
34466
|
apiBaseUrl: z.string().optional(),
|
|
34467
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
34268
34468
|
stage: previewStageSchema.optional()
|
|
34269
34469
|
});
|
|
34270
34470
|
const shopBlockRuntime = defineProgressiveBlockRuntime({
|
|
@@ -34605,6 +34805,7 @@ const shopBlockDefinition = {
|
|
|
34605
34805
|
baseClass: "",
|
|
34606
34806
|
spacing: "spacious",
|
|
34607
34807
|
children: sectionContainer([shop(withApiBindings({
|
|
34808
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
34608
34809
|
mode: "passes-memberships",
|
|
34609
34810
|
showPasses: { $bind: {
|
|
34610
34811
|
from: "content.showPasses",
|
|
@@ -34803,6 +35004,7 @@ const productListBlockDefinition = {
|
|
|
34803
35004
|
baseClass: "",
|
|
34804
35005
|
spacing: "spacious",
|
|
34805
35006
|
children: sectionContainer([productList(withApiBindings({
|
|
35007
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
34806
35008
|
mode: "product-list",
|
|
34807
35009
|
heading: { $bind: {
|
|
34808
35010
|
from: "content.heading",
|
|
@@ -34945,6 +35147,7 @@ const productDetailBlockDefinition = {
|
|
|
34945
35147
|
baseClass: "",
|
|
34946
35148
|
spacing: "spacious",
|
|
34947
35149
|
children: sectionContainer([productDetail(withApiBindings({
|
|
35150
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
34948
35151
|
mode: "product-detail",
|
|
34949
35152
|
heading: { $bind: {
|
|
34950
35153
|
from: "content.heading",
|
|
@@ -35061,6 +35264,7 @@ const cartBlockDefinition = {
|
|
|
35061
35264
|
baseClass: "",
|
|
35062
35265
|
spacing: "spacious",
|
|
35063
35266
|
children: sectionContainer([cart(withApiBindings({
|
|
35267
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
35064
35268
|
mode: "cart",
|
|
35065
35269
|
heading: { $bind: {
|
|
35066
35270
|
from: "content.heading",
|
|
@@ -35144,6 +35348,7 @@ const checkoutBlockDefinition = {
|
|
|
35144
35348
|
baseClass: "",
|
|
35145
35349
|
spacing: "spacious",
|
|
35146
35350
|
children: sectionContainer([checkout(withApiBindings({
|
|
35351
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
35147
35352
|
mode: "checkout",
|
|
35148
35353
|
heading: { $bind: {
|
|
35149
35354
|
from: "content.heading",
|
|
@@ -37804,8 +38009,8 @@ const builtinTransformDefinitions = [
|
|
|
37804
38009
|
summary: "Choose the read projection required by the calendar display mode",
|
|
37805
38010
|
schema: z.object({ job: z.enum(["list", "calendar"]) }),
|
|
37806
38011
|
run(value, options) {
|
|
37807
|
-
const
|
|
37808
|
-
return
|
|
38012
|
+
const plan = resolveEventCalendarReadPlan(asPartialObject(value) ?? {});
|
|
38013
|
+
return plan.jobs === "both" || plan.jobs === options.job;
|
|
37809
38014
|
}
|
|
37810
38015
|
},
|
|
37811
38016
|
{
|
|
@@ -37818,6 +38023,7 @@ const builtinTransformDefinitions = [
|
|
|
37818
38023
|
},
|
|
37819
38024
|
...formattingTransforms,
|
|
37820
38025
|
...layoutTransforms,
|
|
38026
|
+
...chromeLogoTransforms,
|
|
37821
38027
|
...uiTransforms,
|
|
37822
38028
|
...mediaTransforms,
|
|
37823
38029
|
...backgroundTransforms,
|