@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/server.mjs
CHANGED
|
@@ -2643,6 +2643,17 @@ function resolveSiteVerticalBookingConfig(rawConfig) {
|
|
|
2643
2643
|
//#endregion
|
|
2644
2644
|
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
2645
2645
|
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
2646
|
+
checkPublicEventRegistrationNextStep: {
|
|
2647
|
+
path: "/public/sites/{siteId}/events/registration-next-step",
|
|
2648
|
+
method: "POST",
|
|
2649
|
+
auth: "public",
|
|
2650
|
+
responseKind: "json",
|
|
2651
|
+
errors: [
|
|
2652
|
+
"validation:invalid_input",
|
|
2653
|
+
"auth:forbidden",
|
|
2654
|
+
"server:internal_error"
|
|
2655
|
+
]
|
|
2656
|
+
},
|
|
2646
2657
|
listPublicEventCalendarWindow: {
|
|
2647
2658
|
path: "/public/sites/{siteId}/events/calendar-window",
|
|
2648
2659
|
method: "GET",
|
|
@@ -9528,7 +9539,7 @@ var SimpleCache = class {
|
|
|
9528
9539
|
* 1. This constant
|
|
9529
9540
|
* 2. The "version" field in package.json
|
|
9530
9541
|
*/
|
|
9531
|
-
const SDK_VERSION = "0.
|
|
9542
|
+
const SDK_VERSION = "0.144.0";
|
|
9532
9543
|
//#endregion
|
|
9533
9544
|
//#region src/client/error.ts
|
|
9534
9545
|
let _Symbol$for;
|
|
@@ -10595,6 +10606,8 @@ const buttonSystemSchema = z.strictObject({
|
|
|
10595
10606
|
//#endregion
|
|
10596
10607
|
//#region ../theme-core/src/palette/utils/colorConversion.ts
|
|
10597
10608
|
const clamp01 = (x) => Math.max(0, Math.min(1, x));
|
|
10609
|
+
const mod = (a, n) => (a % n + n) % n;
|
|
10610
|
+
const deg = (x) => mod(x, 360);
|
|
10598
10611
|
function hexToRgb(hex) {
|
|
10599
10612
|
const h = hex.replace(/^#/, "");
|
|
10600
10613
|
const m = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
|
|
@@ -10617,6 +10630,45 @@ function srgbToLinear(u) {
|
|
|
10617
10630
|
function linearToSrgb(x) {
|
|
10618
10631
|
return clamp01(x <= .0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - .055) * 255;
|
|
10619
10632
|
}
|
|
10633
|
+
function rgbToHsl(r, g, b) {
|
|
10634
|
+
const R = r / 255, G = g / 255, B = b / 255;
|
|
10635
|
+
const max = Math.max(R, G, B), min = Math.min(R, G, B);
|
|
10636
|
+
const d = max - min;
|
|
10637
|
+
let h = 0;
|
|
10638
|
+
if (d !== 0) {
|
|
10639
|
+
switch (max) {
|
|
10640
|
+
case R:
|
|
10641
|
+
h = (G - B) / d + (G < B ? 6 : 0);
|
|
10642
|
+
break;
|
|
10643
|
+
case G:
|
|
10644
|
+
h = (B - R) / d + 2;
|
|
10645
|
+
break;
|
|
10646
|
+
case B:
|
|
10647
|
+
h = (R - G) / d + 4;
|
|
10648
|
+
break;
|
|
10649
|
+
}
|
|
10650
|
+
h *= 60;
|
|
10651
|
+
}
|
|
10652
|
+
const l = (max + min) / 2;
|
|
10653
|
+
const s = d === 0 ? 0 : d / (1 - Math.abs(2 * l - 1));
|
|
10654
|
+
return {
|
|
10655
|
+
h,
|
|
10656
|
+
s,
|
|
10657
|
+
l
|
|
10658
|
+
};
|
|
10659
|
+
}
|
|
10660
|
+
function srgbToOklab(r, g, b) {
|
|
10661
|
+
const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
|
|
10662
|
+
const l = .4122214708 * R + .5363325363 * G + .0514459929 * B;
|
|
10663
|
+
const m = .2119034982 * R + .6806995451 * G + .1073969566 * B;
|
|
10664
|
+
const s = .0883024619 * R + .2817188376 * G + .6299787005 * B;
|
|
10665
|
+
const l_ = Math.cbrt(l), m_ = Math.cbrt(m), s_ = Math.cbrt(s);
|
|
10666
|
+
return {
|
|
10667
|
+
L: .2104542553 * l_ + .793617785 * m_ - .0040720468 * s_,
|
|
10668
|
+
a: 1.9779984951 * l_ - 2.428592205 * m_ + .4505937099 * s_,
|
|
10669
|
+
b: .0259040371 * l_ + .7827717662 * m_ - .808675766 * s_
|
|
10670
|
+
};
|
|
10671
|
+
}
|
|
10620
10672
|
function oklabToSrgb(L, a, b) {
|
|
10621
10673
|
const l_ = Math.pow(L + .3963377774 * a + .2158037573 * b, 3);
|
|
10622
10674
|
const m_ = Math.pow(L - .1055613458 * a - .0638541728 * b, 3);
|
|
@@ -10630,6 +10682,14 @@ function oklabToSrgb(L, a, b) {
|
|
|
10630
10682
|
b: linearToSrgb(B)
|
|
10631
10683
|
};
|
|
10632
10684
|
}
|
|
10685
|
+
function oklabToOklch(L, a, b) {
|
|
10686
|
+
const C = Math.sqrt(a * a + b * b);
|
|
10687
|
+
return {
|
|
10688
|
+
L,
|
|
10689
|
+
C,
|
|
10690
|
+
h: C < 1e-7 ? 0 : deg(Math.atan2(b, a) * 180 / Math.PI)
|
|
10691
|
+
};
|
|
10692
|
+
}
|
|
10633
10693
|
function oklchToOklab(L, C, h) {
|
|
10634
10694
|
const hr = h * Math.PI / 180;
|
|
10635
10695
|
return {
|
|
@@ -10638,6 +10698,27 @@ function oklchToOklab(L, C, h) {
|
|
|
10638
10698
|
b: C * Math.sin(hr)
|
|
10639
10699
|
};
|
|
10640
10700
|
}
|
|
10701
|
+
function featuresFromHex(hex) {
|
|
10702
|
+
const { r, g, b } = hexToRgb(hex);
|
|
10703
|
+
const { h, s, l } = rgbToHsl(r, g, b);
|
|
10704
|
+
const { L, a, b: b2 } = srgbToOklab(r, g, b);
|
|
10705
|
+
const { L: okL, C: okC, h: okH } = oklabToOklch(L, a, b2);
|
|
10706
|
+
return {
|
|
10707
|
+
r,
|
|
10708
|
+
g,
|
|
10709
|
+
b,
|
|
10710
|
+
h,
|
|
10711
|
+
s,
|
|
10712
|
+
l,
|
|
10713
|
+
v: Math.max(r, g, b) / 255,
|
|
10714
|
+
Y: .2126 * srgbToLinear(r) + .7152 * srgbToLinear(g) + .0722 * srgbToLinear(b),
|
|
10715
|
+
chroma: s,
|
|
10716
|
+
okL,
|
|
10717
|
+
okC,
|
|
10718
|
+
okH,
|
|
10719
|
+
hex
|
|
10720
|
+
};
|
|
10721
|
+
}
|
|
10641
10722
|
function relativeLuminance(r, g, b) {
|
|
10642
10723
|
const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
|
|
10643
10724
|
return .2126 * R + .7152 * G + .0722 * B;
|
|
@@ -11687,6 +11768,36 @@ function normalizedReference(value) {
|
|
|
11687
11768
|
return normalized.length > 0 ? normalized : null;
|
|
11688
11769
|
}
|
|
11689
11770
|
//#endregion
|
|
11771
|
+
//#region ../theme-core/src/surfaces/logoVariant.ts
|
|
11772
|
+
/** Concrete hex behind a plain, opaque palette token, or null otherwise. */
|
|
11773
|
+
function opaquePaletteHexForToken(expandedPalette, token) {
|
|
11774
|
+
if (!token) return null;
|
|
11775
|
+
const parts = parseColorTokenParts(token);
|
|
11776
|
+
if (parts.kind !== "token" || parts.opacityPercent !== null) return null;
|
|
11777
|
+
return expandedPalette[parts.token] ?? null;
|
|
11778
|
+
}
|
|
11779
|
+
/**
|
|
11780
|
+
* Tone of the surface a foreground token was resolved for.
|
|
11781
|
+
*
|
|
11782
|
+
* A token with opacity has no known underlay to composite against, and a raw
|
|
11783
|
+
* or unrecognised token has no palette hex, so both are `unknown` rather than
|
|
11784
|
+
* a guess.
|
|
11785
|
+
*/
|
|
11786
|
+
function surfaceToneFromForegroundToken(expandedPalette, foregroundToken) {
|
|
11787
|
+
const hex = opaquePaletteHexForToken(expandedPalette, foregroundToken);
|
|
11788
|
+
if (!hex) return "unknown";
|
|
11789
|
+
return featuresFromHex(hex).Y >= .5 ? "dark" : "light";
|
|
11790
|
+
}
|
|
11791
|
+
/**
|
|
11792
|
+
* The logo to draw on a surface of the given tone. A missing variant falls
|
|
11793
|
+
* back to the other one, and an unknown tone uses the light-backgrounds logo,
|
|
11794
|
+
* which is what every site rendered before variants existed.
|
|
11795
|
+
*/
|
|
11796
|
+
function selectLogoVariant(tone, variants) {
|
|
11797
|
+
const { forLightBackgrounds, forDarkBackgrounds } = variants;
|
|
11798
|
+
return tone === "dark" ? forDarkBackgrounds ?? forLightBackgrounds : forLightBackgrounds ?? forDarkBackgrounds;
|
|
11799
|
+
}
|
|
11800
|
+
//#endregion
|
|
11690
11801
|
//#region ../theme-core/src/utils/colorStyles.ts
|
|
11691
11802
|
const COLOR_VAR_PREFIX = "--tb-";
|
|
11692
11803
|
function parseToken(source) {
|
|
@@ -11738,16 +11849,28 @@ function backgroundColorStyle(token) {
|
|
|
11738
11849
|
return { backgroundColor: rgbColorValue(token) };
|
|
11739
11850
|
}
|
|
11740
11851
|
/**
|
|
11852
|
+
* Converts a text color token to a CSS color value that follows the enclosing
|
|
11853
|
+
* surface. The semantic text tokens (`text`, `heading`, `mutedText`) resolve
|
|
11854
|
+
* to the surface foreground variables, so text adapts when a section's
|
|
11855
|
+
* background changes; any other token is a fixed theme color.
|
|
11856
|
+
*
|
|
11857
|
+
* @param token - Theme color token
|
|
11858
|
+
* @returns CSS color value
|
|
11859
|
+
*/
|
|
11860
|
+
function textColorValue(token) {
|
|
11861
|
+
const parsed = parseToken(token);
|
|
11862
|
+
const surfaceRole = parsed.raw ? null : surfaceRoleForTextToken(parsed.token);
|
|
11863
|
+
if (!surfaceRole) return rgbColorValue(token);
|
|
11864
|
+
return parsed.opacityPercent === void 0 ? surfaceForegroundValue(surfaceRole) : surfaceForegroundValueWithOpacity(surfaceRole, parsed.opacityPercent);
|
|
11865
|
+
}
|
|
11866
|
+
/**
|
|
11741
11867
|
* Creates a text color style object from a theme token.
|
|
11742
11868
|
*
|
|
11743
11869
|
* @param token - Theme color token
|
|
11744
11870
|
* @returns CSSProperties with color
|
|
11745
11871
|
*/
|
|
11746
11872
|
function textColorStyle(token) {
|
|
11747
|
-
|
|
11748
|
-
const surfaceRole = parsed.raw ? null : surfaceRoleForTextToken(parsed.token);
|
|
11749
|
-
if (surfaceRole) return { color: parsed.opacityPercent === void 0 ? surfaceForegroundValue(surfaceRole) : surfaceForegroundValueWithOpacity(surfaceRole, parsed.opacityPercent) };
|
|
11750
|
-
return { color: rgbColorValue(token) };
|
|
11873
|
+
return { color: textColorValue(token) };
|
|
11751
11874
|
}
|
|
11752
11875
|
/**
|
|
11753
11876
|
* Creates a border color style object from a theme token.
|
|
@@ -26692,9 +26815,7 @@ function navRow(opts) {
|
|
|
26692
26815
|
rel: { $bind: { from: `${childItemName}.rel` } },
|
|
26693
26816
|
"data-active": { $bind: { from: `${childItemName}.active` } }
|
|
26694
26817
|
}, [text({ as: "span" }, bind(`${childItemName}.label`))], repeat(`${itemName}.children`, childItemName));
|
|
26695
|
-
const dropdown = el("div", { className: "nav-dropdown rb-relative" }, [
|
|
26696
|
-
type: "button",
|
|
26697
|
-
variantId: "",
|
|
26818
|
+
const dropdown = el("div", { className: "nav-dropdown rb-relative" }, [el("headerControl", {
|
|
26698
26819
|
className: prependClassName("nav-dropdown-trigger", linkClassName),
|
|
26699
26820
|
"aria-haspopup": "menu",
|
|
26700
26821
|
"aria-expanded": "false",
|
|
@@ -26762,9 +26883,7 @@ function navColumn(opts) {
|
|
|
26762
26883
|
const dropdown = el("div", {
|
|
26763
26884
|
className: "nav-mobile-dropdown",
|
|
26764
26885
|
"data-nav-mobile-dropdown": "true"
|
|
26765
|
-
}, [
|
|
26766
|
-
type: "button",
|
|
26767
|
-
variantId: "",
|
|
26886
|
+
}, [el("headerControl", {
|
|
26768
26887
|
className: triggerClassName,
|
|
26769
26888
|
"aria-expanded": "false",
|
|
26770
26889
|
"aria-controls": childrenId,
|
|
@@ -33113,6 +33232,49 @@ const layoutTransforms = [
|
|
|
33113
33232
|
footerLogoMediaClassTransform,
|
|
33114
33233
|
footerLogoTextVisibleTransform
|
|
33115
33234
|
];
|
|
33235
|
+
//#endregion
|
|
33236
|
+
//#region ../blocks/src/system/transforms/registry/chromeLogo.ts
|
|
33237
|
+
const chromeLogoSchema = z.object({ surface: z.enum([
|
|
33238
|
+
"header-root",
|
|
33239
|
+
"header-mobile-panel",
|
|
33240
|
+
"footer-root"
|
|
33241
|
+
]) });
|
|
33242
|
+
/** The brand foreground shares the logo's surface; navigation may own a separate capsule. */
|
|
33243
|
+
function chromeSurfaceTextToken(surface, theme, palette) {
|
|
33244
|
+
switch (surface) {
|
|
33245
|
+
case "header-root": {
|
|
33246
|
+
const header = theme.header;
|
|
33247
|
+
const foreground = resolveHeaderRootForeground(header, palette, resolveHeaderVisualStyles(header).isTransparent);
|
|
33248
|
+
return foreground.kind === "known" ? foreground.roles.text : resolveHeaderLeafTextColor(header);
|
|
33249
|
+
}
|
|
33250
|
+
case "header-mobile-panel": return theme.header?.dropdownStyle?.textColor ?? "text";
|
|
33251
|
+
case "footer-root": {
|
|
33252
|
+
const foreground = resolveFooterRootForeground(theme.footer, palette);
|
|
33253
|
+
return foreground.kind === "known" ? foreground.roles.text : void 0;
|
|
33254
|
+
}
|
|
33255
|
+
}
|
|
33256
|
+
}
|
|
33257
|
+
function readChromeTheme(viewModel) {
|
|
33258
|
+
return asPartialObject(asPartialObject(viewModel?.["$root"])?.theme) ?? {};
|
|
33259
|
+
}
|
|
33260
|
+
function resolveChromeSurfaceTone(surface, context) {
|
|
33261
|
+
return surfaceToneFromForegroundToken(context.theme.palette, chromeSurfaceTextToken(surface, readChromeTheme(context.viewModel), context.theme.palette));
|
|
33262
|
+
}
|
|
33263
|
+
const chromeLogoTransforms = [{
|
|
33264
|
+
id: "layout.chromeLogo",
|
|
33265
|
+
kind: "formatter",
|
|
33266
|
+
summary: "Select the light- or dark-background site logo for a header or footer surface",
|
|
33267
|
+
schema: chromeLogoSchema,
|
|
33268
|
+
run: (value, options, context) => {
|
|
33269
|
+
const content = asPartialObject(value);
|
|
33270
|
+
const variants = asPartialObject(content?.logoVariants);
|
|
33271
|
+
if (!variants) return content?.logo ?? null;
|
|
33272
|
+
return selectLogoVariant(resolveChromeSurfaceTone(options.surface, context), {
|
|
33273
|
+
forLightBackgrounds: variants.forLightBackgrounds ?? null,
|
|
33274
|
+
forDarkBackgrounds: variants.forDarkBackgrounds ?? null
|
|
33275
|
+
});
|
|
33276
|
+
}
|
|
33277
|
+
}];
|
|
33116
33278
|
const headerRuntimeTransforms = [{
|
|
33117
33279
|
id: "layout.headerRuntimeContract",
|
|
33118
33280
|
kind: "formatter",
|
|
@@ -33315,46 +33477,42 @@ const whenTransformed = (from, transformId, equals = true) => (node) => ({
|
|
|
33315
33477
|
equals
|
|
33316
33478
|
}
|
|
33317
33479
|
});
|
|
33318
|
-
|
|
33480
|
+
/** Draw whichever site logo suits the surface this row sits on. */
|
|
33481
|
+
const bindChromeLogo = (surface) => bind("content", { transforms: [{
|
|
33482
|
+
id: "layout.chromeLogo",
|
|
33483
|
+
options: { surface }
|
|
33484
|
+
}] });
|
|
33485
|
+
/**
|
|
33486
|
+
* The brand link. The logo is chosen per surface because the open mobile menu
|
|
33487
|
+
* paints its own background, which may be the opposite tone to the header.
|
|
33488
|
+
*/
|
|
33489
|
+
const createLogoRow = (surface) => link({
|
|
33319
33490
|
href: "/",
|
|
33320
33491
|
className: bindProp("$root.theme.header.logo", {
|
|
33321
33492
|
transforms: pipe(tx("layout.headerLogoClass")),
|
|
33322
33493
|
fallback: "header-logo rb-flex rb-min-w-0 rb-items-center rb-gap-3 rb-no-underline rb-transition-opacity rb-hover-opacity-80"
|
|
33323
33494
|
})
|
|
33324
|
-
}, [
|
|
33325
|
-
|
|
33326
|
-
|
|
33327
|
-
|
|
33328
|
-
|
|
33329
|
-
|
|
33330
|
-
|
|
33331
|
-
|
|
33332
|
-
}) }, when("site.logo"), bind("site.logo"))], when("content.logo", { not: true })),
|
|
33333
|
-
text({
|
|
33334
|
-
as: "strong",
|
|
33335
|
-
className: "header-logo-text rb-truncate"
|
|
33336
|
-
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))
|
|
33337
|
-
]);
|
|
33495
|
+
}, [media({ className: bindProp("$root.theme.header.logo", {
|
|
33496
|
+
transforms: pipe(tx("layout.headerLogoMediaClass", { base: "rb-header-logo-sm rb-w-auto rb-transition-all rb-duration-300" })),
|
|
33497
|
+
fallback: "rb-header-logo-sm rb-w-auto rb-transition-all rb-duration-300"
|
|
33498
|
+
}) }, when("content.logo"), bindChromeLogo(surface)), text({
|
|
33499
|
+
as: "strong",
|
|
33500
|
+
className: "header-logo-text rb-truncate"
|
|
33501
|
+
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))]);
|
|
33502
|
+
const logoRow = createLogoRow("header-root");
|
|
33338
33503
|
const centeredLogoRow = link({
|
|
33339
33504
|
href: "/",
|
|
33340
33505
|
className: bindProp("$root.theme.header.logo", {
|
|
33341
33506
|
transforms: pipe(tx("layout.headerLogoClass", { base: "header-logo rb-flex rb-items-center rb-justify-center rb-gap-3 rb-text-center rb-no-underline rb-transition-opacity rb-hover-opacity-80" })),
|
|
33342
33507
|
fallback: "header-logo rb-flex rb-items-center rb-justify-center rb-gap-3 rb-text-center rb-no-underline rb-transition-opacity rb-hover-opacity-80"
|
|
33343
33508
|
})
|
|
33344
|
-
}, [
|
|
33345
|
-
|
|
33346
|
-
|
|
33347
|
-
|
|
33348
|
-
|
|
33349
|
-
|
|
33350
|
-
|
|
33351
|
-
fallback: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300"
|
|
33352
|
-
}) }, when("site.logo"), bind("site.logo"))], when("content.logo", { not: true })),
|
|
33353
|
-
text({
|
|
33354
|
-
as: "strong",
|
|
33355
|
-
className: "header-logo-text"
|
|
33356
|
-
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))
|
|
33357
|
-
]);
|
|
33509
|
+
}, [media({ className: bindProp("$root.theme.header.logo", {
|
|
33510
|
+
transforms: pipe(tx("layout.headerLogoMediaClass", { base: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300" })),
|
|
33511
|
+
fallback: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300"
|
|
33512
|
+
}) }, when("content.logo"), bindChromeLogo("header-root")), text({
|
|
33513
|
+
as: "strong",
|
|
33514
|
+
className: "header-logo-text"
|
|
33515
|
+
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))]);
|
|
33358
33516
|
const createNavRow = (className, align = "end") => navRow({
|
|
33359
33517
|
className: `${className} header-nav-row`,
|
|
33360
33518
|
align,
|
|
@@ -33394,10 +33552,8 @@ const mobileToggleIcon = stack({
|
|
|
33394
33552
|
}
|
|
33395
33553
|
]);
|
|
33396
33554
|
const mobileToggleButton = {
|
|
33397
|
-
type: "
|
|
33555
|
+
type: "headerControl",
|
|
33398
33556
|
props: {
|
|
33399
|
-
type: "button",
|
|
33400
|
-
variantId: "",
|
|
33401
33557
|
className: `nav-mobile-toggle ${mobileOnlyDisplay("inline-flex")} rb-h-10 rb-w-10 rb-items-center rb-justify-center rb-rounded-md transition-theme-standard`,
|
|
33402
33558
|
"aria-label": "Open menu",
|
|
33403
33559
|
"aria-expanded": "false",
|
|
@@ -33407,10 +33563,8 @@ const mobileToggleButton = {
|
|
|
33407
33563
|
children: [mobileToggleIcon]
|
|
33408
33564
|
};
|
|
33409
33565
|
const mobileOverlayToggleButton = {
|
|
33410
|
-
type: "
|
|
33566
|
+
type: "headerControl",
|
|
33411
33567
|
props: {
|
|
33412
|
-
type: "button",
|
|
33413
|
-
variantId: "",
|
|
33414
33568
|
className: "nav-mobile-toggle rb-inline-flex rb-h-10 rb-w-10 rb-items-center rb-justify-center rb-rounded-md transition-theme-standard",
|
|
33415
33569
|
"aria-label": "Open menu",
|
|
33416
33570
|
"aria-expanded": "false",
|
|
@@ -33434,7 +33588,7 @@ const mobileOverlayHeader = inline({
|
|
|
33434
33588
|
align: "center",
|
|
33435
33589
|
justify: "between",
|
|
33436
33590
|
style: borderColorStyle("border")
|
|
33437
|
-
}, [
|
|
33591
|
+
}, [createLogoRow("header-mobile-panel"), mobileOverlayToggleButton]);
|
|
33438
33592
|
const mobileOverlayBody = stack({
|
|
33439
33593
|
className: "rb-flex-1 rb-px-6 rb-py-6",
|
|
33440
33594
|
gap: "md",
|
|
@@ -33621,7 +33775,10 @@ const brandLogo = link({
|
|
|
33621
33775
|
options: { base: "rb-h-10 rb-w-auto" }
|
|
33622
33776
|
}],
|
|
33623
33777
|
fallback: "rb-h-10 rb-w-auto"
|
|
33624
|
-
} } }, when("module.showLogo", { equals: true }), when("content.logo"), bind("content
|
|
33778
|
+
} } }, when("module.showLogo", { equals: true }), when("content.logo"), bind("content", { transforms: [{
|
|
33779
|
+
id: "layout.chromeLogo",
|
|
33780
|
+
options: { surface: "footer-root" }
|
|
33781
|
+
}] })), text({
|
|
33625
33782
|
as: "strong",
|
|
33626
33783
|
className: "footer-logo-text rb-nav-text"
|
|
33627
33784
|
}, when("module.showTitle", { equals: true }), bind("site.title", { fallback: "Your Site" }))], when("module.kind", { equals: "brand" }));
|
|
@@ -36260,6 +36417,12 @@ const occurrenceContextSchema = z.object({
|
|
|
36260
36417
|
capacityOverride: z.number().nullable().optional(),
|
|
36261
36418
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
36262
36419
|
}).nullable();
|
|
36420
|
+
//#endregion
|
|
36421
|
+
//#region ../blocks/src/system/runtime/api/readAuthority.ts
|
|
36422
|
+
const browserReadAuthoritySchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("published") }).strict(), z.object({
|
|
36423
|
+
kind: z.literal("preview"),
|
|
36424
|
+
token: z.string().min(1)
|
|
36425
|
+
}).strict()]);
|
|
36263
36426
|
const unsupportedEventRegistrationPageSurfaceSubjectSchema = z.object({
|
|
36264
36427
|
kind: z.literal("unsupported"),
|
|
36265
36428
|
reason: z.enum([
|
|
@@ -36370,6 +36533,33 @@ function normalizeEventCalendarDisplayMode$1(input) {
|
|
|
36370
36533
|
if (isEventCalendarDisplayMode(input.variant)) return input.variant;
|
|
36371
36534
|
return isEventCalendarDisplayMode(input.displayMode) ? input.displayMode : void 0;
|
|
36372
36535
|
}
|
|
36536
|
+
/** One closed authority for the projections required by each rendered mode. */
|
|
36537
|
+
function resolveEventCalendarReadPlan(input) {
|
|
36538
|
+
const mode = normalizeEventCalendarDisplayMode$1(input) ?? "combined";
|
|
36539
|
+
switch (mode) {
|
|
36540
|
+
case "combined": return {
|
|
36541
|
+
mode,
|
|
36542
|
+
jobs: "both",
|
|
36543
|
+
readProfile: "listing-card"
|
|
36544
|
+
};
|
|
36545
|
+
case "list": return {
|
|
36546
|
+
mode,
|
|
36547
|
+
jobs: "list",
|
|
36548
|
+
readProfile: "listing-card"
|
|
36549
|
+
};
|
|
36550
|
+
case "calendar": return {
|
|
36551
|
+
mode,
|
|
36552
|
+
jobs: "calendar",
|
|
36553
|
+
readProfile: "listing-card"
|
|
36554
|
+
};
|
|
36555
|
+
case "timetable":
|
|
36556
|
+
case "week-board": return {
|
|
36557
|
+
mode,
|
|
36558
|
+
jobs: "calendar",
|
|
36559
|
+
readProfile: "timetable"
|
|
36560
|
+
};
|
|
36561
|
+
}
|
|
36562
|
+
}
|
|
36373
36563
|
function isEventCalendarDefaultView(value) {
|
|
36374
36564
|
return typeof value === "string" && eventCalendarDefaultViewValues.includes(value);
|
|
36375
36565
|
}
|
|
@@ -36564,6 +36754,7 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
36564
36754
|
apiBaseUrl: z.string().optional(),
|
|
36565
36755
|
portalToken: z.string().nullable().optional(),
|
|
36566
36756
|
previewToken: z.string().nullable().optional(),
|
|
36757
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
36567
36758
|
...eventRegistrationHydrationSchemaShape,
|
|
36568
36759
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
36569
36760
|
wholeSeriesRunEvents: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
@@ -36601,6 +36792,7 @@ z.object({
|
|
|
36601
36792
|
apiBaseUrl: z.string().optional(),
|
|
36602
36793
|
portalToken: z.string().nullable().optional(),
|
|
36603
36794
|
previewToken: z.string().nullable().optional(),
|
|
36795
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
36604
36796
|
stage: previewStageSchema.optional()
|
|
36605
36797
|
});
|
|
36606
36798
|
function buildEventRegistrationDisplayFromScopedEvents(source, scopedSourceEvents) {
|
|
@@ -36676,6 +36868,7 @@ function shellLabelForRegistrationStep(step, events) {
|
|
|
36676
36868
|
case "redirecting":
|
|
36677
36869
|
case "verifying-payment":
|
|
36678
36870
|
case "verifying-timeout":
|
|
36871
|
+
case "payment-status":
|
|
36679
36872
|
case "payment-failed": return "Details";
|
|
36680
36873
|
}
|
|
36681
36874
|
}
|
|
@@ -36858,6 +37051,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
36858
37051
|
text({ as: "h2" }, bind("content.heading"), when("content.heading")),
|
|
36859
37052
|
richText({ className: "rb-prose rb-max-w-none" }, bind("content.description"), when("content.description")),
|
|
36860
37053
|
eventRegistration(withApiBindings({
|
|
37054
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
36861
37055
|
occurrenceContext: { $bind: { from: "$root.occurrenceContext" } },
|
|
36862
37056
|
subject: { $bind: { from: "$root.subject" } },
|
|
36863
37057
|
portalToken: { $bind: {
|
|
@@ -37490,8 +37684,7 @@ function resolveEventListPaginationAction(input) {
|
|
|
37490
37684
|
//#endregion
|
|
37491
37685
|
//#region ../blocks/src/system/blocks/events/shared/calendarWindow.ts
|
|
37492
37686
|
function resolveCalendarReadProfile(content) {
|
|
37493
|
-
|
|
37494
|
-
return mode === "timetable" || mode === "week-board" ? "timetable" : "listing-card";
|
|
37687
|
+
return resolveEventCalendarReadPlan(content).readProfile;
|
|
37495
37688
|
}
|
|
37496
37689
|
/** Runtime picker sentinels and bound loader IDs must describe the same query. */
|
|
37497
37690
|
function normalizeCalendarFilterId(value) {
|
|
@@ -37601,6 +37794,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
37601
37794
|
events: z.array(publicEventSchema).nullable().optional(),
|
|
37602
37795
|
siteId: z.string(),
|
|
37603
37796
|
apiBaseUrl: z.string().optional(),
|
|
37797
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
37604
37798
|
stage: previewStageSchema.optional(),
|
|
37605
37799
|
listLayout: eventLayoutSchema.optional(),
|
|
37606
37800
|
listColumns: columnOptionSchema.optional(),
|
|
@@ -37653,7 +37847,6 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
37653
37847
|
const eventCollectionHydrationSchema = z.object({
|
|
37654
37848
|
siteId: z.string(),
|
|
37655
37849
|
calendarWindow: calendarWindowPageSchema.optional(),
|
|
37656
|
-
stage: previewStageSchema.optional(),
|
|
37657
37850
|
prefetchedEvents: z.boolean(),
|
|
37658
37851
|
eventSurface: eventSurfaceScopeSchema$1,
|
|
37659
37852
|
filterEventPresets: z.string().nullable(),
|
|
@@ -37728,7 +37921,6 @@ function buildEventCollectionHydration(source, now = /* @__PURE__ */ new Date())
|
|
|
37728
37921
|
return {
|
|
37729
37922
|
calendarWindow: source.calendarWindow ?? void 0,
|
|
37730
37923
|
siteId: source.siteId,
|
|
37731
|
-
stage: source.stage,
|
|
37732
37924
|
prefetchedEvents: source.events != null,
|
|
37733
37925
|
eventSurface: selected ? "all" : normalizeEventSurfaceScope(source.eventSurface),
|
|
37734
37926
|
filterEventPresets: selected ? null : normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
@@ -37748,6 +37940,7 @@ const eventListingSourceSchema = z.object({
|
|
|
37748
37940
|
events: z.array(publicEventSchema).nullable().optional(),
|
|
37749
37941
|
siteId: z.string(),
|
|
37750
37942
|
apiBaseUrl: z.string().optional(),
|
|
37943
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
37751
37944
|
stage: previewStageSchema.optional(),
|
|
37752
37945
|
layout: eventLayoutSchema.optional(),
|
|
37753
37946
|
columns: columnOptionSchema.optional(),
|
|
@@ -37788,7 +37981,6 @@ const eventListingDisplaySchema = z.object({
|
|
|
37788
37981
|
});
|
|
37789
37982
|
const eventListingHydrationSchema = z.object({
|
|
37790
37983
|
siteId: z.string(),
|
|
37791
|
-
stage: previewStageSchema.optional(),
|
|
37792
37984
|
eventsPerPage: eventPageSizeSchema,
|
|
37793
37985
|
paginationAction: eventListPaginationActionSchema,
|
|
37794
37986
|
showFilters: z.boolean(),
|
|
@@ -37811,6 +38003,7 @@ const eventListingRenderSchema = z.object({
|
|
|
37811
38003
|
z.object({
|
|
37812
38004
|
siteId: z.string(),
|
|
37813
38005
|
apiBaseUrl: z.string().optional(),
|
|
38006
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
37814
38007
|
stage: previewStageSchema.optional()
|
|
37815
38008
|
});
|
|
37816
38009
|
const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
@@ -37845,7 +38038,6 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
37845
38038
|
},
|
|
37846
38039
|
hydration: {
|
|
37847
38040
|
siteId: source.siteId,
|
|
37848
|
-
stage: source.stage,
|
|
37849
38041
|
eventsPerPage: pageSize,
|
|
37850
38042
|
paginationAction: resolveEventListPaginationAction({
|
|
37851
38043
|
paginationMode: source.paginationMode,
|
|
@@ -38127,6 +38319,7 @@ const eventListingBlockDefinition = {
|
|
|
38127
38319
|
rootType: "stack",
|
|
38128
38320
|
rootProps: { gap: "lg" },
|
|
38129
38321
|
children: [...eventSectionHeaderLayoutNodes(), el("event-listing", withApiBindings({
|
|
38322
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
38130
38323
|
events: { $bind: { from: "data.events" } },
|
|
38131
38324
|
stage: { $bind: {
|
|
38132
38325
|
from: "$root.previewStage",
|
|
@@ -38324,6 +38517,7 @@ const eventCalendarRenderSchema = z.object({
|
|
|
38324
38517
|
z.object({
|
|
38325
38518
|
siteId: z.string(),
|
|
38326
38519
|
apiBaseUrl: z.string().optional(),
|
|
38520
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
38327
38521
|
stage: previewStageSchema.optional()
|
|
38328
38522
|
});
|
|
38329
38523
|
/**
|
|
@@ -38345,7 +38539,7 @@ function buildEventCalendarDisplay(source) {
|
|
|
38345
38539
|
listColumns: source.listColumns ?? source.columns
|
|
38346
38540
|
}),
|
|
38347
38541
|
kind: "event-calendar",
|
|
38348
|
-
displayMode:
|
|
38542
|
+
displayMode: resolveEventCalendarReadPlan(source).mode,
|
|
38349
38543
|
className: source.className ?? null,
|
|
38350
38544
|
events: (source.events ?? []).slice().sort((left, right) => new Date(left.startsAt).getTime() - new Date(right.startsAt).getTime()),
|
|
38351
38545
|
boardTitle: normalizeOptionalText(source.boardTitle),
|
|
@@ -38362,13 +38556,16 @@ const eventCalendarBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
38362
38556
|
source: createZodCodec(eventCalendarSourceSchema),
|
|
38363
38557
|
render: createZodCodec(eventCalendarRenderSchema)
|
|
38364
38558
|
},
|
|
38365
|
-
buildRender: (source) =>
|
|
38366
|
-
|
|
38367
|
-
|
|
38368
|
-
|
|
38369
|
-
|
|
38370
|
-
|
|
38371
|
-
|
|
38559
|
+
buildRender: (source) => {
|
|
38560
|
+
const plan = resolveEventCalendarReadPlan(source);
|
|
38561
|
+
return {
|
|
38562
|
+
display: buildEventCalendarDisplay(source.calendarWindow && plan.jobs === "calendar" ? {
|
|
38563
|
+
...source,
|
|
38564
|
+
events: source.calendarWindow.events
|
|
38565
|
+
} : source),
|
|
38566
|
+
hydration: buildEventCollectionHydration(source)
|
|
38567
|
+
};
|
|
38568
|
+
}
|
|
38372
38569
|
});
|
|
38373
38570
|
//#endregion
|
|
38374
38571
|
//#region ../blocks/src/system/blocks/events/eventCalendarDataLoaders.ts
|
|
@@ -38518,6 +38715,7 @@ const eventCalendarLayout = [styledSection({
|
|
|
38518
38715
|
rootType: "stack",
|
|
38519
38716
|
rootProps: { gap: "lg" },
|
|
38520
38717
|
children: [...eventSectionHeaderLayoutNodes({ splitClassName: "event-section-head event-section-head--split" }), el("event-calendar", withApiBindings({
|
|
38718
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
38521
38719
|
events: { $bind: { from: "data.events" } },
|
|
38522
38720
|
calendarWindow: { $bind: { from: "data.calendarWindow" } },
|
|
38523
38721
|
stage: { $bind: {
|
|
@@ -42305,6 +42503,7 @@ const shopSourceSchema = z.object({
|
|
|
42305
42503
|
products: z.array(publicProductSchema).nullable().optional(),
|
|
42306
42504
|
siteId: z.string().optional(),
|
|
42307
42505
|
apiBaseUrl: z.string().optional(),
|
|
42506
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
42308
42507
|
stage: previewStageSchema.optional()
|
|
42309
42508
|
});
|
|
42310
42509
|
const productVariantOptionDisplaySchema = z.object({
|
|
@@ -42472,6 +42671,7 @@ function resolveShowPricePerCredit(source) {
|
|
|
42472
42671
|
z.object({
|
|
42473
42672
|
siteId: z.string().optional(),
|
|
42474
42673
|
apiBaseUrl: z.string().optional(),
|
|
42674
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
42475
42675
|
stage: previewStageSchema.optional()
|
|
42476
42676
|
});
|
|
42477
42677
|
const shopBlockRuntime = defineProgressiveBlockRuntime({
|
|
@@ -42812,6 +43012,7 @@ const shopBlockDefinition = {
|
|
|
42812
43012
|
baseClass: "",
|
|
42813
43013
|
spacing: "spacious",
|
|
42814
43014
|
children: sectionContainer([shop(withApiBindings({
|
|
43015
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
42815
43016
|
mode: "passes-memberships",
|
|
42816
43017
|
showPasses: { $bind: {
|
|
42817
43018
|
from: "content.showPasses",
|
|
@@ -43010,6 +43211,7 @@ const productListBlockDefinition = {
|
|
|
43010
43211
|
baseClass: "",
|
|
43011
43212
|
spacing: "spacious",
|
|
43012
43213
|
children: sectionContainer([productList(withApiBindings({
|
|
43214
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
43013
43215
|
mode: "product-list",
|
|
43014
43216
|
heading: { $bind: {
|
|
43015
43217
|
from: "content.heading",
|
|
@@ -43152,6 +43354,7 @@ const productDetailBlockDefinition = {
|
|
|
43152
43354
|
baseClass: "",
|
|
43153
43355
|
spacing: "spacious",
|
|
43154
43356
|
children: sectionContainer([productDetail(withApiBindings({
|
|
43357
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
43155
43358
|
mode: "product-detail",
|
|
43156
43359
|
heading: { $bind: {
|
|
43157
43360
|
from: "content.heading",
|
|
@@ -43268,6 +43471,7 @@ const cartBlockDefinition = {
|
|
|
43268
43471
|
baseClass: "",
|
|
43269
43472
|
spacing: "spacious",
|
|
43270
43473
|
children: sectionContainer([cart(withApiBindings({
|
|
43474
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
43271
43475
|
mode: "cart",
|
|
43272
43476
|
heading: { $bind: {
|
|
43273
43477
|
from: "content.heading",
|
|
@@ -43351,6 +43555,7 @@ const checkoutBlockDefinition = {
|
|
|
43351
43555
|
baseClass: "",
|
|
43352
43556
|
spacing: "spacious",
|
|
43353
43557
|
children: sectionContainer([checkout(withApiBindings({
|
|
43558
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
43354
43559
|
mode: "checkout",
|
|
43355
43560
|
heading: { $bind: {
|
|
43356
43561
|
from: "content.heading",
|
|
@@ -46023,8 +46228,8 @@ const defaultTransforms = createTransformRegistry([
|
|
|
46023
46228
|
summary: "Choose the read projection required by the calendar display mode",
|
|
46024
46229
|
schema: z.object({ job: z.enum(["list", "calendar"]) }),
|
|
46025
46230
|
run(value, options) {
|
|
46026
|
-
const
|
|
46027
|
-
return
|
|
46231
|
+
const plan = resolveEventCalendarReadPlan(asPartialObject(value) ?? {});
|
|
46232
|
+
return plan.jobs === "both" || plan.jobs === options.job;
|
|
46028
46233
|
}
|
|
46029
46234
|
},
|
|
46030
46235
|
{
|
|
@@ -46037,6 +46242,7 @@ const defaultTransforms = createTransformRegistry([
|
|
|
46037
46242
|
},
|
|
46038
46243
|
...formattingTransforms,
|
|
46039
46244
|
...layoutTransforms,
|
|
46245
|
+
...chromeLogoTransforms,
|
|
46040
46246
|
...uiTransforms,
|
|
46041
46247
|
...mediaTransforms,
|
|
46042
46248
|
...backgroundTransforms,
|
|
@@ -47225,20 +47431,24 @@ function createPublicAppointmentReadOperations(deps) {
|
|
|
47225
47431
|
//#region src/client/publicEventReadOperations.ts
|
|
47226
47432
|
function createPublicEventReadOperations(deps) {
|
|
47227
47433
|
async function resolveEventSubroute(params, kind) {
|
|
47228
|
-
const { siteId, subject, segment, signal } = params;
|
|
47434
|
+
const { siteId, subject, segment, signal, preview = false } = params;
|
|
47229
47435
|
if (!siteId || !segment) throw new Error(`${kind === "event-run" ? "resolveEventRun" : "resolveEventOccurrence"}() requires siteId, subject, and segment`);
|
|
47230
47436
|
const subjectId = subject.kind === "eventOffering" ? subject.eventOfferingId : subject.eventSeriesId;
|
|
47231
|
-
return deps.resilientFetchData("resolveEventSubroute", `${kind}:${siteId}:${subject.kind}:${subjectId}:${segment}`, (requestSignal) => deps.apiClient({
|
|
47437
|
+
return deps.resilientFetchData("resolveEventSubroute", `${kind}:${siteId}:${subject.kind}:${subjectId}:${segment}:${preview ? "preview" : "published"}`, (requestSignal) => deps.apiClient({
|
|
47232
47438
|
endpoint: "resolveEventSubroute",
|
|
47233
47439
|
params: {
|
|
47234
47440
|
siteId,
|
|
47235
47441
|
kind,
|
|
47236
47442
|
subjectKind: subject.kind,
|
|
47237
47443
|
subjectId,
|
|
47238
|
-
segment
|
|
47444
|
+
segment,
|
|
47445
|
+
stage: preview ? "preview" : "published"
|
|
47239
47446
|
},
|
|
47240
47447
|
options: { signal: requestSignal }
|
|
47241
|
-
}), {
|
|
47448
|
+
}), {
|
|
47449
|
+
signal,
|
|
47450
|
+
preview
|
|
47451
|
+
});
|
|
47242
47452
|
}
|
|
47243
47453
|
return {
|
|
47244
47454
|
async listPublicEventCalendarWindow({ signal, ...params }) {
|