@riverbankcms/sdk 0.143.0 → 0.144.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PreviewEditorSidebar-DROGfMKi.mjs → PreviewEditorSidebar-CQZNnFiM.mjs} +19 -25
- package/dist/{PreviewEditorUI-BaRjhFu-.mjs → PreviewEditorUI-DCNxnmI0.mjs} +2 -2
- package/dist/{SdkPreviewModeRuntime-OIABYLES.mjs → SdkPreviewModeRuntime-BJolUbr1.mjs} +15 -6
- package/dist/{SiteChromeCustomizeContext-ohjTvZbc.mjs → SiteChromeCustomizeContext-CKgEpoxi.mjs} +1915 -1463
- package/dist/_dts/api/src/billing.d.ts +1 -1
- package/dist/_dts/api/src/billingEndpointTypes.d.ts +8 -2
- package/dist/_dts/api/src/bookingConfig.d.ts +3 -1
- package/dist/_dts/api/src/index.d.ts +1 -1
- package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +4 -4
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +1 -1
- package/dist/_dts/api/src/sdkSettingsContracts.d.ts +8 -0
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +2 -8
- package/dist/_dts/api/src/siteSettings.d.ts +17 -7
- package/dist/_dts/billing/src/membership/index.d.ts +3 -0
- package/dist/_dts/block-form/src/backend/types.d.ts +14 -0
- package/dist/_dts/block-form/src/client/index.d.ts +1 -0
- package/dist/_dts/block-form/src/context/RepeaterHostActionsContext.d.ts +30 -0
- package/dist/_dts/block-form/src/context/index.d.ts +1 -0
- package/dist/_dts/block-form/src/index.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterList.d.ts +4 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRow.d.ts +5 -2
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRowActions.d.ts +11 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/index.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useEmptyStateFocusAfterRemoval.d.ts +8 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/buildSummary.d.ts +15 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterRowActionsDomain.d.ts +5 -2
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +34 -10
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +3 -0
- package/dist/_dts/blocks/src/system/constants/events.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/api/context.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/api/readAuthority.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/core.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +7 -13
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +3 -6
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +9 -4
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.d.ts +1 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +7 -24
- package/dist/_dts/blocks/src/system/runtime/nodes/cart.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/checkout.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationBookingLayer.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardActions.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.override.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +4 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +7 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +7 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +5 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/header-control.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/layout.d.ts +6 -21
- package/dist/_dts/blocks/src/system/runtime/nodes/product-detail.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/product-list.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/ThemedButton.d.ts +58 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/transforms/registry/chromeLogo.d.ts +23 -0
- package/dist/_dts/blocks/src/system/transforms/registry/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +3 -1
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +4 -1
- package/dist/_dts/core/src/event-catalogue.d.ts +27 -0
- package/dist/_dts/core/src/event-preset-vocabulary.d.ts +7 -0
- package/dist/_dts/core/src/index.d.ts +2 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +13 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +286 -2
- package/dist/_dts/editor-blocks/src/block-editor/{BlockCardHeader.d.ts → BlockCardFrame.d.ts} +11 -3
- package/dist/_dts/logger/src/console.d.ts +3 -0
- package/dist/_dts/sdk/src/client/publicEventReadOperations.d.ts +1 -0
- package/dist/_dts/sdk/src/client/types.d.ts +3 -0
- package/dist/_dts/sdk/src/navigation/index.d.ts +27 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +15 -7
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/client.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +7 -1
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/routeIslandApiConfig.d.ts +3 -2
- package/dist/_dts/sdk/src/rendering/islands/enhancers/shopShared.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/overrides.d.ts +1 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/affordanceSuppression.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/classNames.d.ts +3 -13
- package/dist/_dts/theme-core/src/customCss/index.d.ts +1 -1
- package/dist/_dts/theme-core/src/customCss/patch.d.ts +0 -5
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/surfaces/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/surfaces/logoVariant.d.ts +26 -0
- package/dist/_dts/theme-core/src/utils/colorStyles.d.ts +10 -0
- package/dist/_dts/ui/src/editor-item-card.d.ts +116 -0
- package/dist/_dts/ui/src/index.d.ts +1 -0
- package/dist/client/{BookingConsentAgreement-BoCtvzzu.mjs → BookingConsentAgreement-DoAILrkN.mjs} +4 -55
- package/dist/client/{DiscountCodeDisclosure-B5S30nZk.mjs → DiscountCodeDisclosure-X528hUTf.mjs} +27 -17
- package/dist/client/{EventCombined.client-CeZ2-zSt.mjs → EventCombined.client-DSBVwq5m.mjs} +54 -46
- package/dist/client/{EventListing.client-DJN3j8B3.mjs → EventListing.client-DmFAX7Vb.mjs} +3 -4
- package/dist/client/{LeafletStaticMap-RjtGzDQT.mjs → LeafletStaticMap-BAqXdfhq.mjs} +1 -1
- package/dist/client/ThemedButton-BwNFVwi4.mjs +412 -0
- package/dist/client/{accordion-DOmnDoyg.mjs → accordion-DRhMdkbd.mjs} +1 -1
- package/dist/client/{bookingForm-C0vk7pgS.mjs → bookingForm-iJ_nCsNF.mjs} +26 -32
- package/dist/client/bookings.mjs +201 -118
- package/dist/client/{carousel-BZJ7pno3.mjs → carousel-D8zuffZr.mjs} +2 -2
- package/dist/client/{carousel.client-DQTjCVQT.mjs → carousel.client-jahpU9Vz.mjs} +1 -1
- package/dist/client/{cart-CaeVAHJl.mjs → cart-DeMGJViN.mjs} +3 -3
- package/dist/client/{checkout-7wmoNDtG.mjs → checkout-DXc06Km2.mjs} +3 -3
- package/dist/client/{checkoutUrls-FL6lRkrt.mjs → checkoutUrls-CW3-78uu.mjs} +1 -1
- package/dist/client/client.mjs +2271 -1983
- package/dist/client/{colorStyles-3013aRAY.mjs → colorStyles-CuJBiS-1.mjs} +16 -4
- package/dist/client/{context-BOimxE3U.mjs → context-CDLCfDep.mjs} +24 -8
- package/dist/client/{dates-BnzVksi4.mjs → dates-ClFx7Epy.mjs} +2 -2
- package/dist/client/{eventCalendar-l-fpaslC.mjs → eventCalendar-BaGpnOGN.mjs} +39 -50
- package/dist/client/{eventCombined-DGGvssK6.mjs → eventCombined-ywONOx2m.mjs} +5 -4
- package/dist/client/{eventDetails-DRiCm_hL.mjs → eventDetails-B2LlOTYY.mjs} +4 -4
- package/dist/client/{eventListing-dph8loYX.mjs → eventListing-CMgxWpqP.mjs} +5 -4
- package/dist/client/{eventRegistration-ClBohmbY.mjs → eventRegistration-BarLDNHR.mjs} +83 -68
- package/dist/client/{form-BLVVAnd3.mjs → form-BjqKaBJ7.mjs} +9 -10
- package/dist/client/{headerSection-DHy4C8Ix.mjs → headerSection-CP4XDwz1.mjs} +23 -30
- package/dist/client/hooks.mjs +257 -63
- package/dist/client/{locationMap-6HuS28ck.mjs → locationMap-C5gW-d-w.mjs} +9 -10
- package/dist/client/{media-DHpfFwd3.mjs → media-BtJ37tzS.mjs} +1 -1
- package/dist/client/{newsletterForm-xOdcOhZP.mjs → newsletterForm-afXlVSA0.mjs} +8 -9
- package/dist/client/{pricing-ChinRYFt.mjs → pricing-Bl1CAl28.mjs} +1 -1
- package/dist/client/{productDetail-0chA5gbK.mjs → productDetail-CvQ3jWQe.mjs} +3 -3
- package/dist/client/{productList-OoINA0h1.mjs → productList-U874PGO7.mjs} +3 -3
- package/dist/client/{propsDecoder-CIZ-hbIG.mjs → propsDecoder-DPXtCZWP.mjs} +87 -29
- package/dist/client/rendering/client.mjs +1891 -1740
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +2225 -1913
- package/dist/client/{routeIslandApiConfig-UNsfPcYq.mjs → routeIslandApiConfig-NGYiUWXu.mjs} +8 -1
- package/dist/client/{scrollToBlock-BPZl0gPZ.mjs → scrollToBlock-0-C3DVhK.mjs} +1 -1
- package/dist/client/{shop-CLJFqNIq.mjs → shop-BXjXhM9P.mjs} +45 -58
- package/dist/client/{shop-commerce-PpANg5wB.mjs → shop-commerce-BZ6UlWJ7.mjs} +42 -55
- package/dist/client/{shop-commerce-store-TA_Kz2ku.mjs → shop-commerce-store-DlSBXb3D.mjs} +1 -1
- package/dist/client/{shopShared-DzcFcA5g.mjs → shopShared-kkEOiLPA.mjs} +6 -5
- package/dist/client/{useEventFilters-CFU21QZo.mjs → useEventFilters-zvnnE1ro.mjs} +66 -355
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/editor-chrome.css +8 -0
- package/dist/{sdk-runtime-CDKl0Fr7.mjs → sdk-runtime-DFJlQt3q.mjs} +1 -1
- package/dist/{separator-BTp96X32.mjs → separator-o8GHb1xh.mjs} +1 -1
- package/dist/server/components.mjs +828 -623
- package/dist/server/config-validation.mjs +257 -63
- package/dist/server/config.mjs +257 -63
- package/dist/server/data.mjs +257 -63
- package/dist/server/index.mjs +9 -5
- package/dist/server/navigation.mjs +28 -1
- package/dist/server/next.mjs +14129 -13947
- package/dist/server/page-converter.mjs +110 -59
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +832 -624
- package/dist/server/rendering.mjs +830 -624
- package/dist/server/routing.mjs +294 -69
- package/dist/server/server.mjs +266 -68
- package/dist/server/theme-bridge.mjs +40 -1
- package/dist/styles/index.css +6 -0
- package/package.json +1 -1
package/dist/server/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) {
|
|
@@ -19254,9 +19392,7 @@ function navRow(opts) {
|
|
|
19254
19392
|
rel: { $bind: { from: `${childItemName}.rel` } },
|
|
19255
19393
|
"data-active": { $bind: { from: `${childItemName}.active` } }
|
|
19256
19394
|
}, [text({ as: "span" }, bind(`${childItemName}.label`))], repeat(`${itemName}.children`, childItemName));
|
|
19257
|
-
const dropdown = el("div", { className: "nav-dropdown rb-relative" }, [
|
|
19258
|
-
type: "button",
|
|
19259
|
-
variantId: "",
|
|
19395
|
+
const dropdown = el("div", { className: "nav-dropdown rb-relative" }, [el("headerControl", {
|
|
19260
19396
|
className: prependClassName("nav-dropdown-trigger", linkClassName),
|
|
19261
19397
|
"aria-haspopup": "menu",
|
|
19262
19398
|
"aria-expanded": "false",
|
|
@@ -19324,9 +19460,7 @@ function navColumn(opts) {
|
|
|
19324
19460
|
const dropdown = el("div", {
|
|
19325
19461
|
className: "nav-mobile-dropdown",
|
|
19326
19462
|
"data-nav-mobile-dropdown": "true"
|
|
19327
|
-
}, [
|
|
19328
|
-
type: "button",
|
|
19329
|
-
variantId: "",
|
|
19463
|
+
}, [el("headerControl", {
|
|
19330
19464
|
className: triggerClassName,
|
|
19331
19465
|
"aria-expanded": "false",
|
|
19332
19466
|
"aria-controls": childrenId,
|
|
@@ -25642,6 +25776,49 @@ const layoutTransforms = [
|
|
|
25642
25776
|
footerLogoMediaClassTransform,
|
|
25643
25777
|
footerLogoTextVisibleTransform
|
|
25644
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
|
+
}];
|
|
25645
25822
|
const headerRuntimeTransforms = [{
|
|
25646
25823
|
id: "layout.headerRuntimeContract",
|
|
25647
25824
|
kind: "formatter",
|
|
@@ -25841,46 +26018,42 @@ const whenTransformed = (from, transformId, equals = true) => (node) => ({
|
|
|
25841
26018
|
equals
|
|
25842
26019
|
}
|
|
25843
26020
|
});
|
|
25844
|
-
|
|
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({
|
|
25845
26031
|
href: "/",
|
|
25846
26032
|
className: bindProp("$root.theme.header.logo", {
|
|
25847
26033
|
transforms: pipe(tx("layout.headerLogoClass")),
|
|
25848
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"
|
|
25849
26035
|
})
|
|
25850
|
-
}, [
|
|
25851
|
-
|
|
25852
|
-
|
|
25853
|
-
|
|
25854
|
-
|
|
25855
|
-
|
|
25856
|
-
|
|
25857
|
-
|
|
25858
|
-
}) }, when("site.logo"), bind("site.logo"))], when("content.logo", { not: true })),
|
|
25859
|
-
text({
|
|
25860
|
-
as: "strong",
|
|
25861
|
-
className: "header-logo-text rb-truncate"
|
|
25862
|
-
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))
|
|
25863
|
-
]);
|
|
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");
|
|
25864
26044
|
const centeredLogoRow = link({
|
|
25865
26045
|
href: "/",
|
|
25866
26046
|
className: bindProp("$root.theme.header.logo", {
|
|
25867
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" })),
|
|
25868
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"
|
|
25869
26049
|
})
|
|
25870
|
-
}, [
|
|
25871
|
-
|
|
25872
|
-
|
|
25873
|
-
|
|
25874
|
-
|
|
25875
|
-
|
|
25876
|
-
|
|
25877
|
-
fallback: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300"
|
|
25878
|
-
}) }, when("site.logo"), bind("site.logo"))], when("content.logo", { not: true })),
|
|
25879
|
-
text({
|
|
25880
|
-
as: "strong",
|
|
25881
|
-
className: "header-logo-text"
|
|
25882
|
-
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))
|
|
25883
|
-
]);
|
|
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" }))]);
|
|
25884
26057
|
const createNavRow = (className, align = "end") => navRow({
|
|
25885
26058
|
className: `${className} header-nav-row`,
|
|
25886
26059
|
align,
|
|
@@ -25920,10 +26093,8 @@ const mobileToggleIcon = stack({
|
|
|
25920
26093
|
}
|
|
25921
26094
|
]);
|
|
25922
26095
|
const mobileToggleButton = {
|
|
25923
|
-
type: "
|
|
26096
|
+
type: "headerControl",
|
|
25924
26097
|
props: {
|
|
25925
|
-
type: "button",
|
|
25926
|
-
variantId: "",
|
|
25927
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`,
|
|
25928
26099
|
"aria-label": "Open menu",
|
|
25929
26100
|
"aria-expanded": "false",
|
|
@@ -25933,10 +26104,8 @@ const mobileToggleButton = {
|
|
|
25933
26104
|
children: [mobileToggleIcon]
|
|
25934
26105
|
};
|
|
25935
26106
|
const mobileOverlayToggleButton = {
|
|
25936
|
-
type: "
|
|
26107
|
+
type: "headerControl",
|
|
25937
26108
|
props: {
|
|
25938
|
-
type: "button",
|
|
25939
|
-
variantId: "",
|
|
25940
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",
|
|
25941
26110
|
"aria-label": "Open menu",
|
|
25942
26111
|
"aria-expanded": "false",
|
|
@@ -25960,7 +26129,7 @@ const mobileOverlayHeader = inline({
|
|
|
25960
26129
|
align: "center",
|
|
25961
26130
|
justify: "between",
|
|
25962
26131
|
style: borderColorStyle("border")
|
|
25963
|
-
}, [
|
|
26132
|
+
}, [createLogoRow("header-mobile-panel"), mobileOverlayToggleButton]);
|
|
25964
26133
|
const mobileOverlayBody = stack({
|
|
25965
26134
|
className: "rb-flex-1 rb-px-6 rb-py-6",
|
|
25966
26135
|
gap: "md",
|
|
@@ -26147,7 +26316,10 @@ const brandLogo = link({
|
|
|
26147
26316
|
options: { base: "rb-h-10 rb-w-auto" }
|
|
26148
26317
|
}],
|
|
26149
26318
|
fallback: "rb-h-10 rb-w-auto"
|
|
26150
|
-
} } }, 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({
|
|
26151
26323
|
as: "strong",
|
|
26152
26324
|
className: "footer-logo-text rb-nav-text"
|
|
26153
26325
|
}, when("module.showTitle", { equals: true }), bind("site.title", { fallback: "Your Site" }))], when("module.kind", { equals: "brand" }));
|
|
@@ -28348,6 +28520,12 @@ const occurrenceContextSchema = z.object({
|
|
|
28348
28520
|
capacityOverride: z.number().nullable().optional(),
|
|
28349
28521
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
28350
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()]);
|
|
28351
28529
|
const unsupportedEventRegistrationPageSurfaceSubjectSchema = z.object({
|
|
28352
28530
|
kind: z.literal("unsupported"),
|
|
28353
28531
|
reason: z.enum([
|
|
@@ -28610,6 +28788,7 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
28610
28788
|
apiBaseUrl: z.string().optional(),
|
|
28611
28789
|
portalToken: z.string().nullable().optional(),
|
|
28612
28790
|
previewToken: z.string().nullable().optional(),
|
|
28791
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
28613
28792
|
...eventRegistrationHydrationSchemaShape,
|
|
28614
28793
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
28615
28794
|
wholeSeriesRunEvents: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
@@ -28647,6 +28826,7 @@ z.object({
|
|
|
28647
28826
|
apiBaseUrl: z.string().optional(),
|
|
28648
28827
|
portalToken: z.string().nullable().optional(),
|
|
28649
28828
|
previewToken: z.string().nullable().optional(),
|
|
28829
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
28650
28830
|
stage: previewStageSchema.optional()
|
|
28651
28831
|
});
|
|
28652
28832
|
function buildEventRegistrationDisplayFromScopedEvents(source, scopedSourceEvents) {
|
|
@@ -28905,6 +29085,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
28905
29085
|
text({ as: "h2" }, bind("content.heading"), when("content.heading")),
|
|
28906
29086
|
richText({ className: "rb-prose rb-max-w-none" }, bind("content.description"), when("content.description")),
|
|
28907
29087
|
eventRegistration(withApiBindings({
|
|
29088
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
28908
29089
|
occurrenceContext: { $bind: { from: "$root.occurrenceContext" } },
|
|
28909
29090
|
subject: { $bind: { from: "$root.subject" } },
|
|
28910
29091
|
portalToken: { $bind: {
|
|
@@ -29556,6 +29737,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
29556
29737
|
events: z.array(publicEventSchema).nullable().optional(),
|
|
29557
29738
|
siteId: z.string(),
|
|
29558
29739
|
apiBaseUrl: z.string().optional(),
|
|
29740
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
29559
29741
|
stage: previewStageSchema.optional(),
|
|
29560
29742
|
listLayout: eventLayoutSchema.optional(),
|
|
29561
29743
|
listColumns: columnOptionSchema.optional(),
|
|
@@ -29608,7 +29790,6 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
29608
29790
|
const eventCollectionHydrationSchema = z.object({
|
|
29609
29791
|
siteId: z.string(),
|
|
29610
29792
|
calendarWindow: calendarWindowPageSchema.optional(),
|
|
29611
|
-
stage: previewStageSchema.optional(),
|
|
29612
29793
|
prefetchedEvents: z.boolean(),
|
|
29613
29794
|
eventSurface: eventSurfaceScopeSchema$1,
|
|
29614
29795
|
filterEventPresets: z.string().nullable(),
|
|
@@ -29683,7 +29864,6 @@ function buildEventCollectionHydration(source, now = /* @__PURE__ */ new Date())
|
|
|
29683
29864
|
return {
|
|
29684
29865
|
calendarWindow: source.calendarWindow ?? void 0,
|
|
29685
29866
|
siteId: source.siteId,
|
|
29686
|
-
stage: source.stage,
|
|
29687
29867
|
prefetchedEvents: source.events != null,
|
|
29688
29868
|
eventSurface: selected ? "all" : normalizeEventSurfaceScope(source.eventSurface),
|
|
29689
29869
|
filterEventPresets: selected ? null : normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
@@ -29703,6 +29883,7 @@ const eventListingSourceSchema = z.object({
|
|
|
29703
29883
|
events: z.array(publicEventSchema).nullable().optional(),
|
|
29704
29884
|
siteId: z.string(),
|
|
29705
29885
|
apiBaseUrl: z.string().optional(),
|
|
29886
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
29706
29887
|
stage: previewStageSchema.optional(),
|
|
29707
29888
|
layout: eventLayoutSchema.optional(),
|
|
29708
29889
|
columns: columnOptionSchema.optional(),
|
|
@@ -29743,7 +29924,6 @@ const eventListingDisplaySchema = z.object({
|
|
|
29743
29924
|
});
|
|
29744
29925
|
const eventListingHydrationSchema = z.object({
|
|
29745
29926
|
siteId: z.string(),
|
|
29746
|
-
stage: previewStageSchema.optional(),
|
|
29747
29927
|
eventsPerPage: eventPageSizeSchema,
|
|
29748
29928
|
paginationAction: eventListPaginationActionSchema,
|
|
29749
29929
|
showFilters: z.boolean(),
|
|
@@ -29766,6 +29946,7 @@ const eventListingRenderSchema = z.object({
|
|
|
29766
29946
|
z.object({
|
|
29767
29947
|
siteId: z.string(),
|
|
29768
29948
|
apiBaseUrl: z.string().optional(),
|
|
29949
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
29769
29950
|
stage: previewStageSchema.optional()
|
|
29770
29951
|
});
|
|
29771
29952
|
const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
@@ -29800,7 +29981,6 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
29800
29981
|
},
|
|
29801
29982
|
hydration: {
|
|
29802
29983
|
siteId: source.siteId,
|
|
29803
|
-
stage: source.stage,
|
|
29804
29984
|
eventsPerPage: pageSize,
|
|
29805
29985
|
paginationAction: resolveEventListPaginationAction({
|
|
29806
29986
|
paginationMode: source.paginationMode,
|
|
@@ -30082,6 +30262,7 @@ const eventListingBlockDefinition = {
|
|
|
30082
30262
|
rootType: "stack",
|
|
30083
30263
|
rootProps: { gap: "lg" },
|
|
30084
30264
|
children: [...eventSectionHeaderLayoutNodes(), el("event-listing", withApiBindings({
|
|
30265
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
30085
30266
|
events: { $bind: { from: "data.events" } },
|
|
30086
30267
|
stage: { $bind: {
|
|
30087
30268
|
from: "$root.previewStage",
|
|
@@ -30279,6 +30460,7 @@ const eventCalendarRenderSchema = z.object({
|
|
|
30279
30460
|
z.object({
|
|
30280
30461
|
siteId: z.string(),
|
|
30281
30462
|
apiBaseUrl: z.string().optional(),
|
|
30463
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
30282
30464
|
stage: previewStageSchema.optional()
|
|
30283
30465
|
});
|
|
30284
30466
|
/**
|
|
@@ -30300,7 +30482,7 @@ function buildEventCalendarDisplay(source) {
|
|
|
30300
30482
|
listColumns: source.listColumns ?? source.columns
|
|
30301
30483
|
}),
|
|
30302
30484
|
kind: "event-calendar",
|
|
30303
|
-
displayMode:
|
|
30485
|
+
displayMode: resolveEventCalendarReadPlan(source).mode,
|
|
30304
30486
|
className: source.className ?? null,
|
|
30305
30487
|
events: (source.events ?? []).slice().sort((left, right) => new Date(left.startsAt).getTime() - new Date(right.startsAt).getTime()),
|
|
30306
30488
|
boardTitle: normalizeOptionalText(source.boardTitle),
|
|
@@ -30317,13 +30499,16 @@ const eventCalendarBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
30317
30499
|
source: createZodCodec(eventCalendarSourceSchema),
|
|
30318
30500
|
render: createZodCodec(eventCalendarRenderSchema)
|
|
30319
30501
|
},
|
|
30320
|
-
buildRender: (source) =>
|
|
30321
|
-
|
|
30322
|
-
|
|
30323
|
-
|
|
30324
|
-
|
|
30325
|
-
|
|
30326
|
-
|
|
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
|
+
}
|
|
30327
30512
|
});
|
|
30328
30513
|
//#endregion
|
|
30329
30514
|
//#region ../blocks/src/system/blocks/events/eventCalendarDataLoaders.ts
|
|
@@ -30473,6 +30658,7 @@ const eventCalendarLayout = [styledSection({
|
|
|
30473
30658
|
rootType: "stack",
|
|
30474
30659
|
rootProps: { gap: "lg" },
|
|
30475
30660
|
children: [...eventSectionHeaderLayoutNodes({ splitClassName: "event-section-head event-section-head--split" }), el("event-calendar", withApiBindings({
|
|
30661
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
30476
30662
|
events: { $bind: { from: "data.events" } },
|
|
30477
30663
|
calendarWindow: { $bind: { from: "data.calendarWindow" } },
|
|
30478
30664
|
stage: { $bind: {
|
|
@@ -34260,6 +34446,7 @@ const shopSourceSchema = z.object({
|
|
|
34260
34446
|
products: z.array(publicProductSchema).nullable().optional(),
|
|
34261
34447
|
siteId: z.string().optional(),
|
|
34262
34448
|
apiBaseUrl: z.string().optional(),
|
|
34449
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
34263
34450
|
stage: previewStageSchema.optional()
|
|
34264
34451
|
});
|
|
34265
34452
|
const productVariantOptionDisplaySchema = z.object({
|
|
@@ -34427,6 +34614,7 @@ function resolveShowPricePerCredit(source) {
|
|
|
34427
34614
|
z.object({
|
|
34428
34615
|
siteId: z.string().optional(),
|
|
34429
34616
|
apiBaseUrl: z.string().optional(),
|
|
34617
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
34430
34618
|
stage: previewStageSchema.optional()
|
|
34431
34619
|
});
|
|
34432
34620
|
const shopBlockRuntime = defineProgressiveBlockRuntime({
|
|
@@ -34767,6 +34955,7 @@ const shopBlockDefinition = {
|
|
|
34767
34955
|
baseClass: "",
|
|
34768
34956
|
spacing: "spacious",
|
|
34769
34957
|
children: sectionContainer([shop(withApiBindings({
|
|
34958
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
34770
34959
|
mode: "passes-memberships",
|
|
34771
34960
|
showPasses: { $bind: {
|
|
34772
34961
|
from: "content.showPasses",
|
|
@@ -34965,6 +35154,7 @@ const productListBlockDefinition = {
|
|
|
34965
35154
|
baseClass: "",
|
|
34966
35155
|
spacing: "spacious",
|
|
34967
35156
|
children: sectionContainer([productList(withApiBindings({
|
|
35157
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
34968
35158
|
mode: "product-list",
|
|
34969
35159
|
heading: { $bind: {
|
|
34970
35160
|
from: "content.heading",
|
|
@@ -35107,6 +35297,7 @@ const productDetailBlockDefinition = {
|
|
|
35107
35297
|
baseClass: "",
|
|
35108
35298
|
spacing: "spacious",
|
|
35109
35299
|
children: sectionContainer([productDetail(withApiBindings({
|
|
35300
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
35110
35301
|
mode: "product-detail",
|
|
35111
35302
|
heading: { $bind: {
|
|
35112
35303
|
from: "content.heading",
|
|
@@ -35223,6 +35414,7 @@ const cartBlockDefinition = {
|
|
|
35223
35414
|
baseClass: "",
|
|
35224
35415
|
spacing: "spacious",
|
|
35225
35416
|
children: sectionContainer([cart(withApiBindings({
|
|
35417
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
35226
35418
|
mode: "cart",
|
|
35227
35419
|
heading: { $bind: {
|
|
35228
35420
|
from: "content.heading",
|
|
@@ -35306,6 +35498,7 @@ const checkoutBlockDefinition = {
|
|
|
35306
35498
|
baseClass: "",
|
|
35307
35499
|
spacing: "spacious",
|
|
35308
35500
|
children: sectionContainer([checkout(withApiBindings({
|
|
35501
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
35309
35502
|
mode: "checkout",
|
|
35310
35503
|
heading: { $bind: {
|
|
35311
35504
|
from: "content.heading",
|
|
@@ -37964,8 +38157,8 @@ const defaultTransforms = createTransformRegistry([
|
|
|
37964
38157
|
summary: "Choose the read projection required by the calendar display mode",
|
|
37965
38158
|
schema: z.object({ job: z.enum(["list", "calendar"]) }),
|
|
37966
38159
|
run(value, options) {
|
|
37967
|
-
const
|
|
37968
|
-
return
|
|
38160
|
+
const plan = resolveEventCalendarReadPlan(asPartialObject(value) ?? {});
|
|
38161
|
+
return plan.jobs === "both" || plan.jobs === options.job;
|
|
37969
38162
|
}
|
|
37970
38163
|
},
|
|
37971
38164
|
{
|
|
@@ -37978,6 +38171,7 @@ const defaultTransforms = createTransformRegistry([
|
|
|
37978
38171
|
},
|
|
37979
38172
|
...formattingTransforms,
|
|
37980
38173
|
...layoutTransforms,
|
|
38174
|
+
...chromeLogoTransforms,
|
|
37981
38175
|
...uiTransforms,
|
|
37982
38176
|
...mediaTransforms,
|
|
37983
38177
|
...backgroundTransforms,
|
package/dist/server/index.mjs
CHANGED
|
@@ -8254,7 +8254,7 @@ var SimpleCache = class {
|
|
|
8254
8254
|
* 1. This constant
|
|
8255
8255
|
* 2. The "version" field in package.json
|
|
8256
8256
|
*/
|
|
8257
|
-
const SDK_VERSION = "0.
|
|
8257
|
+
const SDK_VERSION = "0.144.0";
|
|
8258
8258
|
//#endregion
|
|
8259
8259
|
//#region src/client/error.ts
|
|
8260
8260
|
let _Symbol$for;
|
|
@@ -9215,20 +9215,24 @@ function createPublicAppointmentReadOperations(deps) {
|
|
|
9215
9215
|
//#region src/client/publicEventReadOperations.ts
|
|
9216
9216
|
function createPublicEventReadOperations(deps) {
|
|
9217
9217
|
async function resolveEventSubroute(params, kind) {
|
|
9218
|
-
const { siteId, subject, segment, signal } = params;
|
|
9218
|
+
const { siteId, subject, segment, signal, preview = false } = params;
|
|
9219
9219
|
if (!siteId || !segment) throw new Error(`${kind === "event-run" ? "resolveEventRun" : "resolveEventOccurrence"}() requires siteId, subject, and segment`);
|
|
9220
9220
|
const subjectId = subject.kind === "eventOffering" ? subject.eventOfferingId : subject.eventSeriesId;
|
|
9221
|
-
return deps.resilientFetchData("resolveEventSubroute", `${kind}:${siteId}:${subject.kind}:${subjectId}:${segment}`, (requestSignal) => deps.apiClient({
|
|
9221
|
+
return deps.resilientFetchData("resolveEventSubroute", `${kind}:${siteId}:${subject.kind}:${subjectId}:${segment}:${preview ? "preview" : "published"}`, (requestSignal) => deps.apiClient({
|
|
9222
9222
|
endpoint: "resolveEventSubroute",
|
|
9223
9223
|
params: {
|
|
9224
9224
|
siteId,
|
|
9225
9225
|
kind,
|
|
9226
9226
|
subjectKind: subject.kind,
|
|
9227
9227
|
subjectId,
|
|
9228
|
-
segment
|
|
9228
|
+
segment,
|
|
9229
|
+
stage: preview ? "preview" : "published"
|
|
9229
9230
|
},
|
|
9230
9231
|
options: { signal: requestSignal }
|
|
9231
|
-
}), {
|
|
9232
|
+
}), {
|
|
9233
|
+
signal,
|
|
9234
|
+
preview
|
|
9235
|
+
});
|
|
9232
9236
|
}
|
|
9233
9237
|
return {
|
|
9234
9238
|
async listPublicEventCalendarWindow({ signal, ...params }) {
|