@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/data.mjs
CHANGED
|
@@ -2220,6 +2220,8 @@ const buttonSystemSchema = z.strictObject({
|
|
|
2220
2220
|
//#endregion
|
|
2221
2221
|
//#region ../theme-core/src/palette/utils/colorConversion.ts
|
|
2222
2222
|
const clamp01 = (x) => Math.max(0, Math.min(1, x));
|
|
2223
|
+
const mod = (a, n) => (a % n + n) % n;
|
|
2224
|
+
const deg = (x) => mod(x, 360);
|
|
2223
2225
|
function hexToRgb(hex) {
|
|
2224
2226
|
const h = hex.replace(/^#/, "");
|
|
2225
2227
|
const m = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
|
|
@@ -2242,6 +2244,45 @@ function srgbToLinear(u) {
|
|
|
2242
2244
|
function linearToSrgb(x) {
|
|
2243
2245
|
return clamp01(x <= .0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - .055) * 255;
|
|
2244
2246
|
}
|
|
2247
|
+
function rgbToHsl(r, g, b) {
|
|
2248
|
+
const R = r / 255, G = g / 255, B = b / 255;
|
|
2249
|
+
const max = Math.max(R, G, B), min = Math.min(R, G, B);
|
|
2250
|
+
const d = max - min;
|
|
2251
|
+
let h = 0;
|
|
2252
|
+
if (d !== 0) {
|
|
2253
|
+
switch (max) {
|
|
2254
|
+
case R:
|
|
2255
|
+
h = (G - B) / d + (G < B ? 6 : 0);
|
|
2256
|
+
break;
|
|
2257
|
+
case G:
|
|
2258
|
+
h = (B - R) / d + 2;
|
|
2259
|
+
break;
|
|
2260
|
+
case B:
|
|
2261
|
+
h = (R - G) / d + 4;
|
|
2262
|
+
break;
|
|
2263
|
+
}
|
|
2264
|
+
h *= 60;
|
|
2265
|
+
}
|
|
2266
|
+
const l = (max + min) / 2;
|
|
2267
|
+
const s = d === 0 ? 0 : d / (1 - Math.abs(2 * l - 1));
|
|
2268
|
+
return {
|
|
2269
|
+
h,
|
|
2270
|
+
s,
|
|
2271
|
+
l
|
|
2272
|
+
};
|
|
2273
|
+
}
|
|
2274
|
+
function srgbToOklab(r, g, b) {
|
|
2275
|
+
const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
|
|
2276
|
+
const l = .4122214708 * R + .5363325363 * G + .0514459929 * B;
|
|
2277
|
+
const m = .2119034982 * R + .6806995451 * G + .1073969566 * B;
|
|
2278
|
+
const s = .0883024619 * R + .2817188376 * G + .6299787005 * B;
|
|
2279
|
+
const l_ = Math.cbrt(l), m_ = Math.cbrt(m), s_ = Math.cbrt(s);
|
|
2280
|
+
return {
|
|
2281
|
+
L: .2104542553 * l_ + .793617785 * m_ - .0040720468 * s_,
|
|
2282
|
+
a: 1.9779984951 * l_ - 2.428592205 * m_ + .4505937099 * s_,
|
|
2283
|
+
b: .0259040371 * l_ + .7827717662 * m_ - .808675766 * s_
|
|
2284
|
+
};
|
|
2285
|
+
}
|
|
2245
2286
|
function oklabToSrgb(L, a, b) {
|
|
2246
2287
|
const l_ = Math.pow(L + .3963377774 * a + .2158037573 * b, 3);
|
|
2247
2288
|
const m_ = Math.pow(L - .1055613458 * a - .0638541728 * b, 3);
|
|
@@ -2255,6 +2296,14 @@ function oklabToSrgb(L, a, b) {
|
|
|
2255
2296
|
b: linearToSrgb(B)
|
|
2256
2297
|
};
|
|
2257
2298
|
}
|
|
2299
|
+
function oklabToOklch(L, a, b) {
|
|
2300
|
+
const C = Math.sqrt(a * a + b * b);
|
|
2301
|
+
return {
|
|
2302
|
+
L,
|
|
2303
|
+
C,
|
|
2304
|
+
h: C < 1e-7 ? 0 : deg(Math.atan2(b, a) * 180 / Math.PI)
|
|
2305
|
+
};
|
|
2306
|
+
}
|
|
2258
2307
|
function oklchToOklab(L, C, h) {
|
|
2259
2308
|
const hr = h * Math.PI / 180;
|
|
2260
2309
|
return {
|
|
@@ -2263,6 +2312,27 @@ function oklchToOklab(L, C, h) {
|
|
|
2263
2312
|
b: C * Math.sin(hr)
|
|
2264
2313
|
};
|
|
2265
2314
|
}
|
|
2315
|
+
function featuresFromHex(hex) {
|
|
2316
|
+
const { r, g, b } = hexToRgb(hex);
|
|
2317
|
+
const { h, s, l } = rgbToHsl(r, g, b);
|
|
2318
|
+
const { L, a, b: b2 } = srgbToOklab(r, g, b);
|
|
2319
|
+
const { L: okL, C: okC, h: okH } = oklabToOklch(L, a, b2);
|
|
2320
|
+
return {
|
|
2321
|
+
r,
|
|
2322
|
+
g,
|
|
2323
|
+
b,
|
|
2324
|
+
h,
|
|
2325
|
+
s,
|
|
2326
|
+
l,
|
|
2327
|
+
v: Math.max(r, g, b) / 255,
|
|
2328
|
+
Y: .2126 * srgbToLinear(r) + .7152 * srgbToLinear(g) + .0722 * srgbToLinear(b),
|
|
2329
|
+
chroma: s,
|
|
2330
|
+
okL,
|
|
2331
|
+
okC,
|
|
2332
|
+
okH,
|
|
2333
|
+
hex
|
|
2334
|
+
};
|
|
2335
|
+
}
|
|
2266
2336
|
function relativeLuminance(r, g, b) {
|
|
2267
2337
|
const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
|
|
2268
2338
|
return .2126 * R + .7152 * G + .0722 * B;
|
|
@@ -3312,6 +3382,36 @@ function normalizedReference(value) {
|
|
|
3312
3382
|
return normalized.length > 0 ? normalized : null;
|
|
3313
3383
|
}
|
|
3314
3384
|
//#endregion
|
|
3385
|
+
//#region ../theme-core/src/surfaces/logoVariant.ts
|
|
3386
|
+
/** Concrete hex behind a plain, opaque palette token, or null otherwise. */
|
|
3387
|
+
function opaquePaletteHexForToken(expandedPalette, token) {
|
|
3388
|
+
if (!token) return null;
|
|
3389
|
+
const parts = parseColorTokenParts(token);
|
|
3390
|
+
if (parts.kind !== "token" || parts.opacityPercent !== null) return null;
|
|
3391
|
+
return expandedPalette[parts.token] ?? null;
|
|
3392
|
+
}
|
|
3393
|
+
/**
|
|
3394
|
+
* Tone of the surface a foreground token was resolved for.
|
|
3395
|
+
*
|
|
3396
|
+
* A token with opacity has no known underlay to composite against, and a raw
|
|
3397
|
+
* or unrecognised token has no palette hex, so both are `unknown` rather than
|
|
3398
|
+
* a guess.
|
|
3399
|
+
*/
|
|
3400
|
+
function surfaceToneFromForegroundToken(expandedPalette, foregroundToken) {
|
|
3401
|
+
const hex = opaquePaletteHexForToken(expandedPalette, foregroundToken);
|
|
3402
|
+
if (!hex) return "unknown";
|
|
3403
|
+
return featuresFromHex(hex).Y >= .5 ? "dark" : "light";
|
|
3404
|
+
}
|
|
3405
|
+
/**
|
|
3406
|
+
* The logo to draw on a surface of the given tone. A missing variant falls
|
|
3407
|
+
* back to the other one, and an unknown tone uses the light-backgrounds logo,
|
|
3408
|
+
* which is what every site rendered before variants existed.
|
|
3409
|
+
*/
|
|
3410
|
+
function selectLogoVariant(tone, variants) {
|
|
3411
|
+
const { forLightBackgrounds, forDarkBackgrounds } = variants;
|
|
3412
|
+
return tone === "dark" ? forDarkBackgrounds ?? forLightBackgrounds : forLightBackgrounds ?? forDarkBackgrounds;
|
|
3413
|
+
}
|
|
3414
|
+
//#endregion
|
|
3315
3415
|
//#region ../theme-core/src/utils/colorStyles.ts
|
|
3316
3416
|
const COLOR_VAR_PREFIX = "--tb-";
|
|
3317
3417
|
function parseToken(source) {
|
|
@@ -3363,16 +3463,28 @@ function backgroundColorStyle(token) {
|
|
|
3363
3463
|
return { backgroundColor: rgbColorValue(token) };
|
|
3364
3464
|
}
|
|
3365
3465
|
/**
|
|
3466
|
+
* Converts a text color token to a CSS color value that follows the enclosing
|
|
3467
|
+
* surface. The semantic text tokens (`text`, `heading`, `mutedText`) resolve
|
|
3468
|
+
* to the surface foreground variables, so text adapts when a section's
|
|
3469
|
+
* background changes; any other token is a fixed theme color.
|
|
3470
|
+
*
|
|
3471
|
+
* @param token - Theme color token
|
|
3472
|
+
* @returns CSS color value
|
|
3473
|
+
*/
|
|
3474
|
+
function textColorValue(token) {
|
|
3475
|
+
const parsed = parseToken(token);
|
|
3476
|
+
const surfaceRole = parsed.raw ? null : surfaceRoleForTextToken(parsed.token);
|
|
3477
|
+
if (!surfaceRole) return rgbColorValue(token);
|
|
3478
|
+
return parsed.opacityPercent === void 0 ? surfaceForegroundValue(surfaceRole) : surfaceForegroundValueWithOpacity(surfaceRole, parsed.opacityPercent);
|
|
3479
|
+
}
|
|
3480
|
+
/**
|
|
3366
3481
|
* Creates a text color style object from a theme token.
|
|
3367
3482
|
*
|
|
3368
3483
|
* @param token - Theme color token
|
|
3369
3484
|
* @returns CSSProperties with color
|
|
3370
3485
|
*/
|
|
3371
3486
|
function textColorStyle(token) {
|
|
3372
|
-
|
|
3373
|
-
const surfaceRole = parsed.raw ? null : surfaceRoleForTextToken(parsed.token);
|
|
3374
|
-
if (surfaceRole) return { color: parsed.opacityPercent === void 0 ? surfaceForegroundValue(surfaceRole) : surfaceForegroundValueWithOpacity(surfaceRole, parsed.opacityPercent) };
|
|
3375
|
-
return { color: rgbColorValue(token) };
|
|
3487
|
+
return { color: textColorValue(token) };
|
|
3376
3488
|
}
|
|
3377
3489
|
/**
|
|
3378
3490
|
* Creates a border color style object from a theme token.
|
|
@@ -8267,6 +8379,33 @@ function normalizeEventCalendarDisplayMode$1(input) {
|
|
|
8267
8379
|
if (isEventCalendarDisplayMode(input.variant)) return input.variant;
|
|
8268
8380
|
return isEventCalendarDisplayMode(input.displayMode) ? input.displayMode : void 0;
|
|
8269
8381
|
}
|
|
8382
|
+
/** One closed authority for the projections required by each rendered mode. */
|
|
8383
|
+
function resolveEventCalendarReadPlan(input) {
|
|
8384
|
+
const mode = normalizeEventCalendarDisplayMode$1(input) ?? "combined";
|
|
8385
|
+
switch (mode) {
|
|
8386
|
+
case "combined": return {
|
|
8387
|
+
mode,
|
|
8388
|
+
jobs: "both",
|
|
8389
|
+
readProfile: "listing-card"
|
|
8390
|
+
};
|
|
8391
|
+
case "list": return {
|
|
8392
|
+
mode,
|
|
8393
|
+
jobs: "list",
|
|
8394
|
+
readProfile: "listing-card"
|
|
8395
|
+
};
|
|
8396
|
+
case "calendar": return {
|
|
8397
|
+
mode,
|
|
8398
|
+
jobs: "calendar",
|
|
8399
|
+
readProfile: "listing-card"
|
|
8400
|
+
};
|
|
8401
|
+
case "timetable":
|
|
8402
|
+
case "week-board": return {
|
|
8403
|
+
mode,
|
|
8404
|
+
jobs: "calendar",
|
|
8405
|
+
readProfile: "timetable"
|
|
8406
|
+
};
|
|
8407
|
+
}
|
|
8408
|
+
}
|
|
8270
8409
|
function isEventCalendarDefaultView(value) {
|
|
8271
8410
|
return typeof value === "string" && eventCalendarDefaultViewValues.includes(value);
|
|
8272
8411
|
}
|
|
@@ -8276,8 +8415,7 @@ function isEventCalendarListLayout(value) {
|
|
|
8276
8415
|
//#endregion
|
|
8277
8416
|
//#region ../blocks/src/system/blocks/events/shared/calendarWindow.ts
|
|
8278
8417
|
function resolveCalendarReadProfile(content) {
|
|
8279
|
-
|
|
8280
|
-
return mode === "timetable" || mode === "week-board" ? "timetable" : "listing-card";
|
|
8418
|
+
return resolveEventCalendarReadPlan(content).readProfile;
|
|
8281
8419
|
}
|
|
8282
8420
|
/** Runtime picker sentinels and bound loader IDs must describe the same query. */
|
|
8283
8421
|
function normalizeCalendarFilterId(value) {
|
|
@@ -9653,6 +9791,17 @@ const NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
9653
9791
|
//#endregion
|
|
9654
9792
|
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
9655
9793
|
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
9794
|
+
checkPublicEventRegistrationNextStep: {
|
|
9795
|
+
path: "/public/sites/{siteId}/events/registration-next-step",
|
|
9796
|
+
method: "POST",
|
|
9797
|
+
auth: "public",
|
|
9798
|
+
responseKind: "json",
|
|
9799
|
+
errors: [
|
|
9800
|
+
"validation:invalid_input",
|
|
9801
|
+
"auth:forbidden",
|
|
9802
|
+
"server:internal_error"
|
|
9803
|
+
]
|
|
9804
|
+
},
|
|
9656
9805
|
listPublicEventCalendarWindow: {
|
|
9657
9806
|
path: "/public/sites/{siteId}/events/calendar-window",
|
|
9658
9807
|
method: "GET",
|
|
@@ -19243,9 +19392,7 @@ function navRow(opts) {
|
|
|
19243
19392
|
rel: { $bind: { from: `${childItemName}.rel` } },
|
|
19244
19393
|
"data-active": { $bind: { from: `${childItemName}.active` } }
|
|
19245
19394
|
}, [text({ as: "span" }, bind(`${childItemName}.label`))], repeat(`${itemName}.children`, childItemName));
|
|
19246
|
-
const dropdown = el("div", { className: "nav-dropdown rb-relative" }, [
|
|
19247
|
-
type: "button",
|
|
19248
|
-
variantId: "",
|
|
19395
|
+
const dropdown = el("div", { className: "nav-dropdown rb-relative" }, [el("headerControl", {
|
|
19249
19396
|
className: prependClassName("nav-dropdown-trigger", linkClassName),
|
|
19250
19397
|
"aria-haspopup": "menu",
|
|
19251
19398
|
"aria-expanded": "false",
|
|
@@ -19313,9 +19460,7 @@ function navColumn(opts) {
|
|
|
19313
19460
|
const dropdown = el("div", {
|
|
19314
19461
|
className: "nav-mobile-dropdown",
|
|
19315
19462
|
"data-nav-mobile-dropdown": "true"
|
|
19316
|
-
}, [
|
|
19317
|
-
type: "button",
|
|
19318
|
-
variantId: "",
|
|
19463
|
+
}, [el("headerControl", {
|
|
19319
19464
|
className: triggerClassName,
|
|
19320
19465
|
"aria-expanded": "false",
|
|
19321
19466
|
"aria-controls": childrenId,
|
|
@@ -25631,6 +25776,49 @@ const layoutTransforms = [
|
|
|
25631
25776
|
footerLogoMediaClassTransform,
|
|
25632
25777
|
footerLogoTextVisibleTransform
|
|
25633
25778
|
];
|
|
25779
|
+
//#endregion
|
|
25780
|
+
//#region ../blocks/src/system/transforms/registry/chromeLogo.ts
|
|
25781
|
+
const chromeLogoSchema = z.object({ surface: z.enum([
|
|
25782
|
+
"header-root",
|
|
25783
|
+
"header-mobile-panel",
|
|
25784
|
+
"footer-root"
|
|
25785
|
+
]) });
|
|
25786
|
+
/** The brand foreground shares the logo's surface; navigation may own a separate capsule. */
|
|
25787
|
+
function chromeSurfaceTextToken(surface, theme, palette) {
|
|
25788
|
+
switch (surface) {
|
|
25789
|
+
case "header-root": {
|
|
25790
|
+
const header = theme.header;
|
|
25791
|
+
const foreground = resolveHeaderRootForeground(header, palette, resolveHeaderVisualStyles(header).isTransparent);
|
|
25792
|
+
return foreground.kind === "known" ? foreground.roles.text : resolveHeaderLeafTextColor(header);
|
|
25793
|
+
}
|
|
25794
|
+
case "header-mobile-panel": return theme.header?.dropdownStyle?.textColor ?? "text";
|
|
25795
|
+
case "footer-root": {
|
|
25796
|
+
const foreground = resolveFooterRootForeground(theme.footer, palette);
|
|
25797
|
+
return foreground.kind === "known" ? foreground.roles.text : void 0;
|
|
25798
|
+
}
|
|
25799
|
+
}
|
|
25800
|
+
}
|
|
25801
|
+
function readChromeTheme(viewModel) {
|
|
25802
|
+
return asPartialObject(asPartialObject(viewModel?.["$root"])?.theme) ?? {};
|
|
25803
|
+
}
|
|
25804
|
+
function resolveChromeSurfaceTone(surface, context) {
|
|
25805
|
+
return surfaceToneFromForegroundToken(context.theme.palette, chromeSurfaceTextToken(surface, readChromeTheme(context.viewModel), context.theme.palette));
|
|
25806
|
+
}
|
|
25807
|
+
const chromeLogoTransforms = [{
|
|
25808
|
+
id: "layout.chromeLogo",
|
|
25809
|
+
kind: "formatter",
|
|
25810
|
+
summary: "Select the light- or dark-background site logo for a header or footer surface",
|
|
25811
|
+
schema: chromeLogoSchema,
|
|
25812
|
+
run: (value, options, context) => {
|
|
25813
|
+
const content = asPartialObject(value);
|
|
25814
|
+
const variants = asPartialObject(content?.logoVariants);
|
|
25815
|
+
if (!variants) return content?.logo ?? null;
|
|
25816
|
+
return selectLogoVariant(resolveChromeSurfaceTone(options.surface, context), {
|
|
25817
|
+
forLightBackgrounds: variants.forLightBackgrounds ?? null,
|
|
25818
|
+
forDarkBackgrounds: variants.forDarkBackgrounds ?? null
|
|
25819
|
+
});
|
|
25820
|
+
}
|
|
25821
|
+
}];
|
|
25634
25822
|
const headerRuntimeTransforms = [{
|
|
25635
25823
|
id: "layout.headerRuntimeContract",
|
|
25636
25824
|
kind: "formatter",
|
|
@@ -25830,46 +26018,42 @@ const whenTransformed = (from, transformId, equals = true) => (node) => ({
|
|
|
25830
26018
|
equals
|
|
25831
26019
|
}
|
|
25832
26020
|
});
|
|
25833
|
-
|
|
26021
|
+
/** Draw whichever site logo suits the surface this row sits on. */
|
|
26022
|
+
const bindChromeLogo = (surface) => bind("content", { transforms: [{
|
|
26023
|
+
id: "layout.chromeLogo",
|
|
26024
|
+
options: { surface }
|
|
26025
|
+
}] });
|
|
26026
|
+
/**
|
|
26027
|
+
* The brand link. The logo is chosen per surface because the open mobile menu
|
|
26028
|
+
* paints its own background, which may be the opposite tone to the header.
|
|
26029
|
+
*/
|
|
26030
|
+
const createLogoRow = (surface) => link({
|
|
25834
26031
|
href: "/",
|
|
25835
26032
|
className: bindProp("$root.theme.header.logo", {
|
|
25836
26033
|
transforms: pipe(tx("layout.headerLogoClass")),
|
|
25837
26034
|
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"
|
|
25838
26035
|
})
|
|
25839
|
-
}, [
|
|
25840
|
-
|
|
25841
|
-
|
|
25842
|
-
|
|
25843
|
-
|
|
25844
|
-
|
|
25845
|
-
|
|
25846
|
-
|
|
25847
|
-
}) }, when("site.logo"), bind("site.logo"))], when("content.logo", { not: true })),
|
|
25848
|
-
text({
|
|
25849
|
-
as: "strong",
|
|
25850
|
-
className: "header-logo-text rb-truncate"
|
|
25851
|
-
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))
|
|
25852
|
-
]);
|
|
26036
|
+
}, [media({ className: bindProp("$root.theme.header.logo", {
|
|
26037
|
+
transforms: pipe(tx("layout.headerLogoMediaClass", { base: "rb-header-logo-sm rb-w-auto rb-transition-all rb-duration-300" })),
|
|
26038
|
+
fallback: "rb-header-logo-sm rb-w-auto rb-transition-all rb-duration-300"
|
|
26039
|
+
}) }, when("content.logo"), bindChromeLogo(surface)), text({
|
|
26040
|
+
as: "strong",
|
|
26041
|
+
className: "header-logo-text rb-truncate"
|
|
26042
|
+
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))]);
|
|
26043
|
+
const logoRow = createLogoRow("header-root");
|
|
25853
26044
|
const centeredLogoRow = link({
|
|
25854
26045
|
href: "/",
|
|
25855
26046
|
className: bindProp("$root.theme.header.logo", {
|
|
25856
26047
|
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" })),
|
|
25857
26048
|
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"
|
|
25858
26049
|
})
|
|
25859
|
-
}, [
|
|
25860
|
-
|
|
25861
|
-
|
|
25862
|
-
|
|
25863
|
-
|
|
25864
|
-
|
|
25865
|
-
|
|
25866
|
-
fallback: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300"
|
|
25867
|
-
}) }, when("site.logo"), bind("site.logo"))], when("content.logo", { not: true })),
|
|
25868
|
-
text({
|
|
25869
|
-
as: "strong",
|
|
25870
|
-
className: "header-logo-text"
|
|
25871
|
-
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))
|
|
25872
|
-
]);
|
|
26050
|
+
}, [media({ className: bindProp("$root.theme.header.logo", {
|
|
26051
|
+
transforms: pipe(tx("layout.headerLogoMediaClass", { base: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300" })),
|
|
26052
|
+
fallback: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300"
|
|
26053
|
+
}) }, when("content.logo"), bindChromeLogo("header-root")), text({
|
|
26054
|
+
as: "strong",
|
|
26055
|
+
className: "header-logo-text"
|
|
26056
|
+
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))]);
|
|
25873
26057
|
const createNavRow = (className, align = "end") => navRow({
|
|
25874
26058
|
className: `${className} header-nav-row`,
|
|
25875
26059
|
align,
|
|
@@ -25909,10 +26093,8 @@ const mobileToggleIcon = stack({
|
|
|
25909
26093
|
}
|
|
25910
26094
|
]);
|
|
25911
26095
|
const mobileToggleButton = {
|
|
25912
|
-
type: "
|
|
26096
|
+
type: "headerControl",
|
|
25913
26097
|
props: {
|
|
25914
|
-
type: "button",
|
|
25915
|
-
variantId: "",
|
|
25916
26098
|
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`,
|
|
25917
26099
|
"aria-label": "Open menu",
|
|
25918
26100
|
"aria-expanded": "false",
|
|
@@ -25922,10 +26104,8 @@ const mobileToggleButton = {
|
|
|
25922
26104
|
children: [mobileToggleIcon]
|
|
25923
26105
|
};
|
|
25924
26106
|
const mobileOverlayToggleButton = {
|
|
25925
|
-
type: "
|
|
26107
|
+
type: "headerControl",
|
|
25926
26108
|
props: {
|
|
25927
|
-
type: "button",
|
|
25928
|
-
variantId: "",
|
|
25929
26109
|
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",
|
|
25930
26110
|
"aria-label": "Open menu",
|
|
25931
26111
|
"aria-expanded": "false",
|
|
@@ -25949,7 +26129,7 @@ const mobileOverlayHeader = inline({
|
|
|
25949
26129
|
align: "center",
|
|
25950
26130
|
justify: "between",
|
|
25951
26131
|
style: borderColorStyle("border")
|
|
25952
|
-
}, [
|
|
26132
|
+
}, [createLogoRow("header-mobile-panel"), mobileOverlayToggleButton]);
|
|
25953
26133
|
const mobileOverlayBody = stack({
|
|
25954
26134
|
className: "rb-flex-1 rb-px-6 rb-py-6",
|
|
25955
26135
|
gap: "md",
|
|
@@ -26136,7 +26316,10 @@ const brandLogo = link({
|
|
|
26136
26316
|
options: { base: "rb-h-10 rb-w-auto" }
|
|
26137
26317
|
}],
|
|
26138
26318
|
fallback: "rb-h-10 rb-w-auto"
|
|
26139
|
-
} } }, when("module.showLogo", { equals: true }), when("content.logo"), bind("content
|
|
26319
|
+
} } }, when("module.showLogo", { equals: true }), when("content.logo"), bind("content", { transforms: [{
|
|
26320
|
+
id: "layout.chromeLogo",
|
|
26321
|
+
options: { surface: "footer-root" }
|
|
26322
|
+
}] })), text({
|
|
26140
26323
|
as: "strong",
|
|
26141
26324
|
className: "footer-logo-text rb-nav-text"
|
|
26142
26325
|
}, when("module.showTitle", { equals: true }), bind("site.title", { fallback: "Your Site" }))], when("module.kind", { equals: "brand" }));
|
|
@@ -28337,6 +28520,12 @@ const occurrenceContextSchema = z.object({
|
|
|
28337
28520
|
capacityOverride: z.number().nullable().optional(),
|
|
28338
28521
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
28339
28522
|
}).nullable();
|
|
28523
|
+
//#endregion
|
|
28524
|
+
//#region ../blocks/src/system/runtime/api/readAuthority.ts
|
|
28525
|
+
const browserReadAuthoritySchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("published") }).strict(), z.object({
|
|
28526
|
+
kind: z.literal("preview"),
|
|
28527
|
+
token: z.string().min(1)
|
|
28528
|
+
}).strict()]);
|
|
28340
28529
|
const unsupportedEventRegistrationPageSurfaceSubjectSchema = z.object({
|
|
28341
28530
|
kind: z.literal("unsupported"),
|
|
28342
28531
|
reason: z.enum([
|
|
@@ -28599,6 +28788,7 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
28599
28788
|
apiBaseUrl: z.string().optional(),
|
|
28600
28789
|
portalToken: z.string().nullable().optional(),
|
|
28601
28790
|
previewToken: z.string().nullable().optional(),
|
|
28791
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
28602
28792
|
...eventRegistrationHydrationSchemaShape,
|
|
28603
28793
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
28604
28794
|
wholeSeriesRunEvents: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
@@ -28636,6 +28826,7 @@ z.object({
|
|
|
28636
28826
|
apiBaseUrl: z.string().optional(),
|
|
28637
28827
|
portalToken: z.string().nullable().optional(),
|
|
28638
28828
|
previewToken: z.string().nullable().optional(),
|
|
28829
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
28639
28830
|
stage: previewStageSchema.optional()
|
|
28640
28831
|
});
|
|
28641
28832
|
function buildEventRegistrationDisplayFromScopedEvents(source, scopedSourceEvents) {
|
|
@@ -28711,6 +28902,7 @@ function shellLabelForRegistrationStep(step, events) {
|
|
|
28711
28902
|
case "redirecting":
|
|
28712
28903
|
case "verifying-payment":
|
|
28713
28904
|
case "verifying-timeout":
|
|
28905
|
+
case "payment-status":
|
|
28714
28906
|
case "payment-failed": return "Details";
|
|
28715
28907
|
}
|
|
28716
28908
|
}
|
|
@@ -28893,6 +29085,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
28893
29085
|
text({ as: "h2" }, bind("content.heading"), when("content.heading")),
|
|
28894
29086
|
richText({ className: "rb-prose rb-max-w-none" }, bind("content.description"), when("content.description")),
|
|
28895
29087
|
eventRegistration(withApiBindings({
|
|
29088
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
28896
29089
|
occurrenceContext: { $bind: { from: "$root.occurrenceContext" } },
|
|
28897
29090
|
subject: { $bind: { from: "$root.subject" } },
|
|
28898
29091
|
portalToken: { $bind: {
|
|
@@ -29544,6 +29737,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
29544
29737
|
events: z.array(publicEventSchema).nullable().optional(),
|
|
29545
29738
|
siteId: z.string(),
|
|
29546
29739
|
apiBaseUrl: z.string().optional(),
|
|
29740
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
29547
29741
|
stage: previewStageSchema.optional(),
|
|
29548
29742
|
listLayout: eventLayoutSchema.optional(),
|
|
29549
29743
|
listColumns: columnOptionSchema.optional(),
|
|
@@ -29596,7 +29790,6 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
29596
29790
|
const eventCollectionHydrationSchema = z.object({
|
|
29597
29791
|
siteId: z.string(),
|
|
29598
29792
|
calendarWindow: calendarWindowPageSchema.optional(),
|
|
29599
|
-
stage: previewStageSchema.optional(),
|
|
29600
29793
|
prefetchedEvents: z.boolean(),
|
|
29601
29794
|
eventSurface: eventSurfaceScopeSchema$1,
|
|
29602
29795
|
filterEventPresets: z.string().nullable(),
|
|
@@ -29671,7 +29864,6 @@ function buildEventCollectionHydration(source, now = /* @__PURE__ */ new Date())
|
|
|
29671
29864
|
return {
|
|
29672
29865
|
calendarWindow: source.calendarWindow ?? void 0,
|
|
29673
29866
|
siteId: source.siteId,
|
|
29674
|
-
stage: source.stage,
|
|
29675
29867
|
prefetchedEvents: source.events != null,
|
|
29676
29868
|
eventSurface: selected ? "all" : normalizeEventSurfaceScope(source.eventSurface),
|
|
29677
29869
|
filterEventPresets: selected ? null : normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
@@ -29691,6 +29883,7 @@ const eventListingSourceSchema = z.object({
|
|
|
29691
29883
|
events: z.array(publicEventSchema).nullable().optional(),
|
|
29692
29884
|
siteId: z.string(),
|
|
29693
29885
|
apiBaseUrl: z.string().optional(),
|
|
29886
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
29694
29887
|
stage: previewStageSchema.optional(),
|
|
29695
29888
|
layout: eventLayoutSchema.optional(),
|
|
29696
29889
|
columns: columnOptionSchema.optional(),
|
|
@@ -29731,7 +29924,6 @@ const eventListingDisplaySchema = z.object({
|
|
|
29731
29924
|
});
|
|
29732
29925
|
const eventListingHydrationSchema = z.object({
|
|
29733
29926
|
siteId: z.string(),
|
|
29734
|
-
stage: previewStageSchema.optional(),
|
|
29735
29927
|
eventsPerPage: eventPageSizeSchema,
|
|
29736
29928
|
paginationAction: eventListPaginationActionSchema,
|
|
29737
29929
|
showFilters: z.boolean(),
|
|
@@ -29754,6 +29946,7 @@ const eventListingRenderSchema = z.object({
|
|
|
29754
29946
|
z.object({
|
|
29755
29947
|
siteId: z.string(),
|
|
29756
29948
|
apiBaseUrl: z.string().optional(),
|
|
29949
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
29757
29950
|
stage: previewStageSchema.optional()
|
|
29758
29951
|
});
|
|
29759
29952
|
const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
@@ -29788,7 +29981,6 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
29788
29981
|
},
|
|
29789
29982
|
hydration: {
|
|
29790
29983
|
siteId: source.siteId,
|
|
29791
|
-
stage: source.stage,
|
|
29792
29984
|
eventsPerPage: pageSize,
|
|
29793
29985
|
paginationAction: resolveEventListPaginationAction({
|
|
29794
29986
|
paginationMode: source.paginationMode,
|
|
@@ -30070,6 +30262,7 @@ const eventListingBlockDefinition = {
|
|
|
30070
30262
|
rootType: "stack",
|
|
30071
30263
|
rootProps: { gap: "lg" },
|
|
30072
30264
|
children: [...eventSectionHeaderLayoutNodes(), el("event-listing", withApiBindings({
|
|
30265
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
30073
30266
|
events: { $bind: { from: "data.events" } },
|
|
30074
30267
|
stage: { $bind: {
|
|
30075
30268
|
from: "$root.previewStage",
|
|
@@ -30267,6 +30460,7 @@ const eventCalendarRenderSchema = z.object({
|
|
|
30267
30460
|
z.object({
|
|
30268
30461
|
siteId: z.string(),
|
|
30269
30462
|
apiBaseUrl: z.string().optional(),
|
|
30463
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
30270
30464
|
stage: previewStageSchema.optional()
|
|
30271
30465
|
});
|
|
30272
30466
|
/**
|
|
@@ -30288,7 +30482,7 @@ function buildEventCalendarDisplay(source) {
|
|
|
30288
30482
|
listColumns: source.listColumns ?? source.columns
|
|
30289
30483
|
}),
|
|
30290
30484
|
kind: "event-calendar",
|
|
30291
|
-
displayMode:
|
|
30485
|
+
displayMode: resolveEventCalendarReadPlan(source).mode,
|
|
30292
30486
|
className: source.className ?? null,
|
|
30293
30487
|
events: (source.events ?? []).slice().sort((left, right) => new Date(left.startsAt).getTime() - new Date(right.startsAt).getTime()),
|
|
30294
30488
|
boardTitle: normalizeOptionalText(source.boardTitle),
|
|
@@ -30305,13 +30499,16 @@ const eventCalendarBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
30305
30499
|
source: createZodCodec(eventCalendarSourceSchema),
|
|
30306
30500
|
render: createZodCodec(eventCalendarRenderSchema)
|
|
30307
30501
|
},
|
|
30308
|
-
buildRender: (source) =>
|
|
30309
|
-
|
|
30310
|
-
|
|
30311
|
-
|
|
30312
|
-
|
|
30313
|
-
|
|
30314
|
-
|
|
30502
|
+
buildRender: (source) => {
|
|
30503
|
+
const plan = resolveEventCalendarReadPlan(source);
|
|
30504
|
+
return {
|
|
30505
|
+
display: buildEventCalendarDisplay(source.calendarWindow && plan.jobs === "calendar" ? {
|
|
30506
|
+
...source,
|
|
30507
|
+
events: source.calendarWindow.events
|
|
30508
|
+
} : source),
|
|
30509
|
+
hydration: buildEventCollectionHydration(source)
|
|
30510
|
+
};
|
|
30511
|
+
}
|
|
30315
30512
|
});
|
|
30316
30513
|
//#endregion
|
|
30317
30514
|
//#region ../blocks/src/system/blocks/events/eventCalendarDataLoaders.ts
|
|
@@ -30461,6 +30658,7 @@ const eventCalendarLayout = [styledSection({
|
|
|
30461
30658
|
rootType: "stack",
|
|
30462
30659
|
rootProps: { gap: "lg" },
|
|
30463
30660
|
children: [...eventSectionHeaderLayoutNodes({ splitClassName: "event-section-head event-section-head--split" }), el("event-calendar", withApiBindings({
|
|
30661
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
30464
30662
|
events: { $bind: { from: "data.events" } },
|
|
30465
30663
|
calendarWindow: { $bind: { from: "data.calendarWindow" } },
|
|
30466
30664
|
stage: { $bind: {
|
|
@@ -34248,6 +34446,7 @@ const shopSourceSchema = z.object({
|
|
|
34248
34446
|
products: z.array(publicProductSchema).nullable().optional(),
|
|
34249
34447
|
siteId: z.string().optional(),
|
|
34250
34448
|
apiBaseUrl: z.string().optional(),
|
|
34449
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
34251
34450
|
stage: previewStageSchema.optional()
|
|
34252
34451
|
});
|
|
34253
34452
|
const productVariantOptionDisplaySchema = z.object({
|
|
@@ -34415,6 +34614,7 @@ function resolveShowPricePerCredit(source) {
|
|
|
34415
34614
|
z.object({
|
|
34416
34615
|
siteId: z.string().optional(),
|
|
34417
34616
|
apiBaseUrl: z.string().optional(),
|
|
34617
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
34418
34618
|
stage: previewStageSchema.optional()
|
|
34419
34619
|
});
|
|
34420
34620
|
const shopBlockRuntime = defineProgressiveBlockRuntime({
|
|
@@ -34755,6 +34955,7 @@ const shopBlockDefinition = {
|
|
|
34755
34955
|
baseClass: "",
|
|
34756
34956
|
spacing: "spacious",
|
|
34757
34957
|
children: sectionContainer([shop(withApiBindings({
|
|
34958
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
34758
34959
|
mode: "passes-memberships",
|
|
34759
34960
|
showPasses: { $bind: {
|
|
34760
34961
|
from: "content.showPasses",
|
|
@@ -34953,6 +35154,7 @@ const productListBlockDefinition = {
|
|
|
34953
35154
|
baseClass: "",
|
|
34954
35155
|
spacing: "spacious",
|
|
34955
35156
|
children: sectionContainer([productList(withApiBindings({
|
|
35157
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
34956
35158
|
mode: "product-list",
|
|
34957
35159
|
heading: { $bind: {
|
|
34958
35160
|
from: "content.heading",
|
|
@@ -35095,6 +35297,7 @@ const productDetailBlockDefinition = {
|
|
|
35095
35297
|
baseClass: "",
|
|
35096
35298
|
spacing: "spacious",
|
|
35097
35299
|
children: sectionContainer([productDetail(withApiBindings({
|
|
35300
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
35098
35301
|
mode: "product-detail",
|
|
35099
35302
|
heading: { $bind: {
|
|
35100
35303
|
from: "content.heading",
|
|
@@ -35211,6 +35414,7 @@ const cartBlockDefinition = {
|
|
|
35211
35414
|
baseClass: "",
|
|
35212
35415
|
spacing: "spacious",
|
|
35213
35416
|
children: sectionContainer([cart(withApiBindings({
|
|
35417
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
35214
35418
|
mode: "cart",
|
|
35215
35419
|
heading: { $bind: {
|
|
35216
35420
|
from: "content.heading",
|
|
@@ -35294,6 +35498,7 @@ const checkoutBlockDefinition = {
|
|
|
35294
35498
|
baseClass: "",
|
|
35295
35499
|
spacing: "spacious",
|
|
35296
35500
|
children: sectionContainer([checkout(withApiBindings({
|
|
35501
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
35297
35502
|
mode: "checkout",
|
|
35298
35503
|
heading: { $bind: {
|
|
35299
35504
|
from: "content.heading",
|
|
@@ -37952,8 +38157,8 @@ const defaultTransforms = createTransformRegistry([
|
|
|
37952
38157
|
summary: "Choose the read projection required by the calendar display mode",
|
|
37953
38158
|
schema: z.object({ job: z.enum(["list", "calendar"]) }),
|
|
37954
38159
|
run(value, options) {
|
|
37955
|
-
const
|
|
37956
|
-
return
|
|
38160
|
+
const plan = resolveEventCalendarReadPlan(asPartialObject(value) ?? {});
|
|
38161
|
+
return plan.jobs === "both" || plan.jobs === options.job;
|
|
37957
38162
|
}
|
|
37958
38163
|
},
|
|
37959
38164
|
{
|
|
@@ -37966,6 +38171,7 @@ const defaultTransforms = createTransformRegistry([
|
|
|
37966
38171
|
},
|
|
37967
38172
|
...formattingTransforms,
|
|
37968
38173
|
...layoutTransforms,
|
|
38174
|
+
...chromeLogoTransforms,
|
|
37969
38175
|
...uiTransforms,
|
|
37970
38176
|
...mediaTransforms,
|
|
37971
38177
|
...backgroundTransforms,
|