@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/client/hooks.mjs
CHANGED
|
@@ -2257,6 +2257,8 @@ const buttonSystemSchema = z.strictObject({
|
|
|
2257
2257
|
//#endregion
|
|
2258
2258
|
//#region ../theme-core/src/palette/utils/colorConversion.ts
|
|
2259
2259
|
const clamp01 = (x) => Math.max(0, Math.min(1, x));
|
|
2260
|
+
const mod = (a, n) => (a % n + n) % n;
|
|
2261
|
+
const deg = (x) => mod(x, 360);
|
|
2260
2262
|
function hexToRgb(hex) {
|
|
2261
2263
|
const h = hex.replace(/^#/, "");
|
|
2262
2264
|
const m = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
|
|
@@ -2279,6 +2281,45 @@ function srgbToLinear(u) {
|
|
|
2279
2281
|
function linearToSrgb(x) {
|
|
2280
2282
|
return clamp01(x <= .0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - .055) * 255;
|
|
2281
2283
|
}
|
|
2284
|
+
function rgbToHsl(r, g, b) {
|
|
2285
|
+
const R = r / 255, G = g / 255, B = b / 255;
|
|
2286
|
+
const max = Math.max(R, G, B), min = Math.min(R, G, B);
|
|
2287
|
+
const d = max - min;
|
|
2288
|
+
let h = 0;
|
|
2289
|
+
if (d !== 0) {
|
|
2290
|
+
switch (max) {
|
|
2291
|
+
case R:
|
|
2292
|
+
h = (G - B) / d + (G < B ? 6 : 0);
|
|
2293
|
+
break;
|
|
2294
|
+
case G:
|
|
2295
|
+
h = (B - R) / d + 2;
|
|
2296
|
+
break;
|
|
2297
|
+
case B:
|
|
2298
|
+
h = (R - G) / d + 4;
|
|
2299
|
+
break;
|
|
2300
|
+
}
|
|
2301
|
+
h *= 60;
|
|
2302
|
+
}
|
|
2303
|
+
const l = (max + min) / 2;
|
|
2304
|
+
const s = d === 0 ? 0 : d / (1 - Math.abs(2 * l - 1));
|
|
2305
|
+
return {
|
|
2306
|
+
h,
|
|
2307
|
+
s,
|
|
2308
|
+
l
|
|
2309
|
+
};
|
|
2310
|
+
}
|
|
2311
|
+
function srgbToOklab(r, g, b) {
|
|
2312
|
+
const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
|
|
2313
|
+
const l = .4122214708 * R + .5363325363 * G + .0514459929 * B;
|
|
2314
|
+
const m = .2119034982 * R + .6806995451 * G + .1073969566 * B;
|
|
2315
|
+
const s = .0883024619 * R + .2817188376 * G + .6299787005 * B;
|
|
2316
|
+
const l_ = Math.cbrt(l), m_ = Math.cbrt(m), s_ = Math.cbrt(s);
|
|
2317
|
+
return {
|
|
2318
|
+
L: .2104542553 * l_ + .793617785 * m_ - .0040720468 * s_,
|
|
2319
|
+
a: 1.9779984951 * l_ - 2.428592205 * m_ + .4505937099 * s_,
|
|
2320
|
+
b: .0259040371 * l_ + .7827717662 * m_ - .808675766 * s_
|
|
2321
|
+
};
|
|
2322
|
+
}
|
|
2282
2323
|
function oklabToSrgb(L, a, b) {
|
|
2283
2324
|
const l_ = Math.pow(L + .3963377774 * a + .2158037573 * b, 3);
|
|
2284
2325
|
const m_ = Math.pow(L - .1055613458 * a - .0638541728 * b, 3);
|
|
@@ -2292,6 +2333,14 @@ function oklabToSrgb(L, a, b) {
|
|
|
2292
2333
|
b: linearToSrgb(B)
|
|
2293
2334
|
};
|
|
2294
2335
|
}
|
|
2336
|
+
function oklabToOklch(L, a, b) {
|
|
2337
|
+
const C = Math.sqrt(a * a + b * b);
|
|
2338
|
+
return {
|
|
2339
|
+
L,
|
|
2340
|
+
C,
|
|
2341
|
+
h: C < 1e-7 ? 0 : deg(Math.atan2(b, a) * 180 / Math.PI)
|
|
2342
|
+
};
|
|
2343
|
+
}
|
|
2295
2344
|
function oklchToOklab(L, C, h) {
|
|
2296
2345
|
const hr = h * Math.PI / 180;
|
|
2297
2346
|
return {
|
|
@@ -2300,6 +2349,27 @@ function oklchToOklab(L, C, h) {
|
|
|
2300
2349
|
b: C * Math.sin(hr)
|
|
2301
2350
|
};
|
|
2302
2351
|
}
|
|
2352
|
+
function featuresFromHex(hex) {
|
|
2353
|
+
const { r, g, b } = hexToRgb(hex);
|
|
2354
|
+
const { h, s, l } = rgbToHsl(r, g, b);
|
|
2355
|
+
const { L, a, b: b2 } = srgbToOklab(r, g, b);
|
|
2356
|
+
const { L: okL, C: okC, h: okH } = oklabToOklch(L, a, b2);
|
|
2357
|
+
return {
|
|
2358
|
+
r,
|
|
2359
|
+
g,
|
|
2360
|
+
b,
|
|
2361
|
+
h,
|
|
2362
|
+
s,
|
|
2363
|
+
l,
|
|
2364
|
+
v: Math.max(r, g, b) / 255,
|
|
2365
|
+
Y: .2126 * srgbToLinear(r) + .7152 * srgbToLinear(g) + .0722 * srgbToLinear(b),
|
|
2366
|
+
chroma: s,
|
|
2367
|
+
okL,
|
|
2368
|
+
okC,
|
|
2369
|
+
okH,
|
|
2370
|
+
hex
|
|
2371
|
+
};
|
|
2372
|
+
}
|
|
2303
2373
|
function relativeLuminance(r, g, b) {
|
|
2304
2374
|
const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
|
|
2305
2375
|
return .2126 * R + .7152 * G + .0722 * B;
|
|
@@ -3349,6 +3419,36 @@ function normalizedReference(value) {
|
|
|
3349
3419
|
return normalized.length > 0 ? normalized : null;
|
|
3350
3420
|
}
|
|
3351
3421
|
//#endregion
|
|
3422
|
+
//#region ../theme-core/src/surfaces/logoVariant.ts
|
|
3423
|
+
/** Concrete hex behind a plain, opaque palette token, or null otherwise. */
|
|
3424
|
+
function opaquePaletteHexForToken(expandedPalette, token) {
|
|
3425
|
+
if (!token) return null;
|
|
3426
|
+
const parts = parseColorTokenParts(token);
|
|
3427
|
+
if (parts.kind !== "token" || parts.opacityPercent !== null) return null;
|
|
3428
|
+
return expandedPalette[parts.token] ?? null;
|
|
3429
|
+
}
|
|
3430
|
+
/**
|
|
3431
|
+
* Tone of the surface a foreground token was resolved for.
|
|
3432
|
+
*
|
|
3433
|
+
* A token with opacity has no known underlay to composite against, and a raw
|
|
3434
|
+
* or unrecognised token has no palette hex, so both are `unknown` rather than
|
|
3435
|
+
* a guess.
|
|
3436
|
+
*/
|
|
3437
|
+
function surfaceToneFromForegroundToken(expandedPalette, foregroundToken) {
|
|
3438
|
+
const hex = opaquePaletteHexForToken(expandedPalette, foregroundToken);
|
|
3439
|
+
if (!hex) return "unknown";
|
|
3440
|
+
return featuresFromHex(hex).Y >= .5 ? "dark" : "light";
|
|
3441
|
+
}
|
|
3442
|
+
/**
|
|
3443
|
+
* The logo to draw on a surface of the given tone. A missing variant falls
|
|
3444
|
+
* back to the other one, and an unknown tone uses the light-backgrounds logo,
|
|
3445
|
+
* which is what every site rendered before variants existed.
|
|
3446
|
+
*/
|
|
3447
|
+
function selectLogoVariant(tone, variants) {
|
|
3448
|
+
const { forLightBackgrounds, forDarkBackgrounds } = variants;
|
|
3449
|
+
return tone === "dark" ? forDarkBackgrounds ?? forLightBackgrounds : forLightBackgrounds ?? forDarkBackgrounds;
|
|
3450
|
+
}
|
|
3451
|
+
//#endregion
|
|
3352
3452
|
//#region ../theme-core/src/utils/colorStyles.ts
|
|
3353
3453
|
const COLOR_VAR_PREFIX = "--tb-";
|
|
3354
3454
|
function parseToken(source) {
|
|
@@ -3400,16 +3500,28 @@ function backgroundColorStyle(token) {
|
|
|
3400
3500
|
return { backgroundColor: rgbColorValue(token) };
|
|
3401
3501
|
}
|
|
3402
3502
|
/**
|
|
3503
|
+
* Converts a text color token to a CSS color value that follows the enclosing
|
|
3504
|
+
* surface. The semantic text tokens (`text`, `heading`, `mutedText`) resolve
|
|
3505
|
+
* to the surface foreground variables, so text adapts when a section's
|
|
3506
|
+
* background changes; any other token is a fixed theme color.
|
|
3507
|
+
*
|
|
3508
|
+
* @param token - Theme color token
|
|
3509
|
+
* @returns CSS color value
|
|
3510
|
+
*/
|
|
3511
|
+
function textColorValue(token) {
|
|
3512
|
+
const parsed = parseToken(token);
|
|
3513
|
+
const surfaceRole = parsed.raw ? null : surfaceRoleForTextToken(parsed.token);
|
|
3514
|
+
if (!surfaceRole) return rgbColorValue(token);
|
|
3515
|
+
return parsed.opacityPercent === void 0 ? surfaceForegroundValue(surfaceRole) : surfaceForegroundValueWithOpacity(surfaceRole, parsed.opacityPercent);
|
|
3516
|
+
}
|
|
3517
|
+
/**
|
|
3403
3518
|
* Creates a text color style object from a theme token.
|
|
3404
3519
|
*
|
|
3405
3520
|
* @param token - Theme color token
|
|
3406
3521
|
* @returns CSSProperties with color
|
|
3407
3522
|
*/
|
|
3408
3523
|
function textColorStyle(token) {
|
|
3409
|
-
|
|
3410
|
-
const surfaceRole = parsed.raw ? null : surfaceRoleForTextToken(parsed.token);
|
|
3411
|
-
if (surfaceRole) return { color: parsed.opacityPercent === void 0 ? surfaceForegroundValue(surfaceRole) : surfaceForegroundValueWithOpacity(surfaceRole, parsed.opacityPercent) };
|
|
3412
|
-
return { color: rgbColorValue(token) };
|
|
3524
|
+
return { color: textColorValue(token) };
|
|
3413
3525
|
}
|
|
3414
3526
|
/**
|
|
3415
3527
|
* Creates a border color style object from a theme token.
|
|
@@ -8313,6 +8425,33 @@ function normalizeEventCalendarDisplayMode$1(input) {
|
|
|
8313
8425
|
if (isEventCalendarDisplayMode(input.variant)) return input.variant;
|
|
8314
8426
|
return isEventCalendarDisplayMode(input.displayMode) ? input.displayMode : void 0;
|
|
8315
8427
|
}
|
|
8428
|
+
/** One closed authority for the projections required by each rendered mode. */
|
|
8429
|
+
function resolveEventCalendarReadPlan(input) {
|
|
8430
|
+
const mode = normalizeEventCalendarDisplayMode$1(input) ?? "combined";
|
|
8431
|
+
switch (mode) {
|
|
8432
|
+
case "combined": return {
|
|
8433
|
+
mode,
|
|
8434
|
+
jobs: "both",
|
|
8435
|
+
readProfile: "listing-card"
|
|
8436
|
+
};
|
|
8437
|
+
case "list": return {
|
|
8438
|
+
mode,
|
|
8439
|
+
jobs: "list",
|
|
8440
|
+
readProfile: "listing-card"
|
|
8441
|
+
};
|
|
8442
|
+
case "calendar": return {
|
|
8443
|
+
mode,
|
|
8444
|
+
jobs: "calendar",
|
|
8445
|
+
readProfile: "listing-card"
|
|
8446
|
+
};
|
|
8447
|
+
case "timetable":
|
|
8448
|
+
case "week-board": return {
|
|
8449
|
+
mode,
|
|
8450
|
+
jobs: "calendar",
|
|
8451
|
+
readProfile: "timetable"
|
|
8452
|
+
};
|
|
8453
|
+
}
|
|
8454
|
+
}
|
|
8316
8455
|
function isEventCalendarDefaultView(value) {
|
|
8317
8456
|
return typeof value === "string" && eventCalendarDefaultViewValues.includes(value);
|
|
8318
8457
|
}
|
|
@@ -8322,8 +8461,7 @@ function isEventCalendarListLayout(value) {
|
|
|
8322
8461
|
//#endregion
|
|
8323
8462
|
//#region ../blocks/src/system/blocks/events/shared/calendarWindow.ts
|
|
8324
8463
|
function resolveCalendarReadProfile(content) {
|
|
8325
|
-
|
|
8326
|
-
return mode === "timetable" || mode === "week-board" ? "timetable" : "listing-card";
|
|
8464
|
+
return resolveEventCalendarReadPlan(content).readProfile;
|
|
8327
8465
|
}
|
|
8328
8466
|
/** Runtime picker sentinels and bound loader IDs must describe the same query. */
|
|
8329
8467
|
function normalizeCalendarFilterId(value) {
|
|
@@ -21119,9 +21257,7 @@ function navRow(opts) {
|
|
|
21119
21257
|
rel: { $bind: { from: `${childItemName}.rel` } },
|
|
21120
21258
|
"data-active": { $bind: { from: `${childItemName}.active` } }
|
|
21121
21259
|
}, [text({ as: "span" }, bind(`${childItemName}.label`))], repeat(`${itemName}.children`, childItemName));
|
|
21122
|
-
const dropdown = el("div", { className: "nav-dropdown rb-relative" }, [
|
|
21123
|
-
type: "button",
|
|
21124
|
-
variantId: "",
|
|
21260
|
+
const dropdown = el("div", { className: "nav-dropdown rb-relative" }, [el("headerControl", {
|
|
21125
21261
|
className: prependClassName("nav-dropdown-trigger", linkClassName),
|
|
21126
21262
|
"aria-haspopup": "menu",
|
|
21127
21263
|
"aria-expanded": "false",
|
|
@@ -21189,9 +21325,7 @@ function navColumn(opts) {
|
|
|
21189
21325
|
const dropdown = el("div", {
|
|
21190
21326
|
className: "nav-mobile-dropdown",
|
|
21191
21327
|
"data-nav-mobile-dropdown": "true"
|
|
21192
|
-
}, [
|
|
21193
|
-
type: "button",
|
|
21194
|
-
variantId: "",
|
|
21328
|
+
}, [el("headerControl", {
|
|
21195
21329
|
className: triggerClassName,
|
|
21196
21330
|
"aria-expanded": "false",
|
|
21197
21331
|
"aria-controls": childrenId,
|
|
@@ -27503,6 +27637,49 @@ const layoutTransforms = [
|
|
|
27503
27637
|
footerLogoMediaClassTransform,
|
|
27504
27638
|
footerLogoTextVisibleTransform
|
|
27505
27639
|
];
|
|
27640
|
+
//#endregion
|
|
27641
|
+
//#region ../blocks/src/system/transforms/registry/chromeLogo.ts
|
|
27642
|
+
const chromeLogoSchema = z.object({ surface: z.enum([
|
|
27643
|
+
"header-root",
|
|
27644
|
+
"header-mobile-panel",
|
|
27645
|
+
"footer-root"
|
|
27646
|
+
]) });
|
|
27647
|
+
/** The brand foreground shares the logo's surface; navigation may own a separate capsule. */
|
|
27648
|
+
function chromeSurfaceTextToken(surface, theme, palette) {
|
|
27649
|
+
switch (surface) {
|
|
27650
|
+
case "header-root": {
|
|
27651
|
+
const header = theme.header;
|
|
27652
|
+
const foreground = resolveHeaderRootForeground(header, palette, resolveHeaderVisualStyles(header).isTransparent);
|
|
27653
|
+
return foreground.kind === "known" ? foreground.roles.text : resolveHeaderLeafTextColor(header);
|
|
27654
|
+
}
|
|
27655
|
+
case "header-mobile-panel": return theme.header?.dropdownStyle?.textColor ?? "text";
|
|
27656
|
+
case "footer-root": {
|
|
27657
|
+
const foreground = resolveFooterRootForeground(theme.footer, palette);
|
|
27658
|
+
return foreground.kind === "known" ? foreground.roles.text : void 0;
|
|
27659
|
+
}
|
|
27660
|
+
}
|
|
27661
|
+
}
|
|
27662
|
+
function readChromeTheme(viewModel) {
|
|
27663
|
+
return asPartialObject(asPartialObject(viewModel?.["$root"])?.theme) ?? {};
|
|
27664
|
+
}
|
|
27665
|
+
function resolveChromeSurfaceTone(surface, context) {
|
|
27666
|
+
return surfaceToneFromForegroundToken(context.theme.palette, chromeSurfaceTextToken(surface, readChromeTheme(context.viewModel), context.theme.palette));
|
|
27667
|
+
}
|
|
27668
|
+
const chromeLogoTransforms = [{
|
|
27669
|
+
id: "layout.chromeLogo",
|
|
27670
|
+
kind: "formatter",
|
|
27671
|
+
summary: "Select the light- or dark-background site logo for a header or footer surface",
|
|
27672
|
+
schema: chromeLogoSchema,
|
|
27673
|
+
run: (value, options, context) => {
|
|
27674
|
+
const content = asPartialObject(value);
|
|
27675
|
+
const variants = asPartialObject(content?.logoVariants);
|
|
27676
|
+
if (!variants) return content?.logo ?? null;
|
|
27677
|
+
return selectLogoVariant(resolveChromeSurfaceTone(options.surface, context), {
|
|
27678
|
+
forLightBackgrounds: variants.forLightBackgrounds ?? null,
|
|
27679
|
+
forDarkBackgrounds: variants.forDarkBackgrounds ?? null
|
|
27680
|
+
});
|
|
27681
|
+
}
|
|
27682
|
+
}];
|
|
27506
27683
|
const headerRuntimeTransforms = [{
|
|
27507
27684
|
id: "layout.headerRuntimeContract",
|
|
27508
27685
|
kind: "formatter",
|
|
@@ -27702,46 +27879,42 @@ const whenTransformed = (from, transformId, equals = true) => (node) => ({
|
|
|
27702
27879
|
equals
|
|
27703
27880
|
}
|
|
27704
27881
|
});
|
|
27705
|
-
|
|
27882
|
+
/** Draw whichever site logo suits the surface this row sits on. */
|
|
27883
|
+
const bindChromeLogo = (surface) => bind("content", { transforms: [{
|
|
27884
|
+
id: "layout.chromeLogo",
|
|
27885
|
+
options: { surface }
|
|
27886
|
+
}] });
|
|
27887
|
+
/**
|
|
27888
|
+
* The brand link. The logo is chosen per surface because the open mobile menu
|
|
27889
|
+
* paints its own background, which may be the opposite tone to the header.
|
|
27890
|
+
*/
|
|
27891
|
+
const createLogoRow = (surface) => link({
|
|
27706
27892
|
href: "/",
|
|
27707
27893
|
className: bindProp("$root.theme.header.logo", {
|
|
27708
27894
|
transforms: pipe(tx("layout.headerLogoClass")),
|
|
27709
27895
|
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"
|
|
27710
27896
|
})
|
|
27711
|
-
}, [
|
|
27712
|
-
|
|
27713
|
-
|
|
27714
|
-
|
|
27715
|
-
|
|
27716
|
-
|
|
27717
|
-
|
|
27718
|
-
|
|
27719
|
-
}) }, when("site.logo"), bind("site.logo"))], when("content.logo", { not: true })),
|
|
27720
|
-
text({
|
|
27721
|
-
as: "strong",
|
|
27722
|
-
className: "header-logo-text rb-truncate"
|
|
27723
|
-
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))
|
|
27724
|
-
]);
|
|
27897
|
+
}, [media({ className: bindProp("$root.theme.header.logo", {
|
|
27898
|
+
transforms: pipe(tx("layout.headerLogoMediaClass", { base: "rb-header-logo-sm rb-w-auto rb-transition-all rb-duration-300" })),
|
|
27899
|
+
fallback: "rb-header-logo-sm rb-w-auto rb-transition-all rb-duration-300"
|
|
27900
|
+
}) }, when("content.logo"), bindChromeLogo(surface)), text({
|
|
27901
|
+
as: "strong",
|
|
27902
|
+
className: "header-logo-text rb-truncate"
|
|
27903
|
+
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))]);
|
|
27904
|
+
const logoRow = createLogoRow("header-root");
|
|
27725
27905
|
const centeredLogoRow = link({
|
|
27726
27906
|
href: "/",
|
|
27727
27907
|
className: bindProp("$root.theme.header.logo", {
|
|
27728
27908
|
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" })),
|
|
27729
27909
|
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"
|
|
27730
27910
|
})
|
|
27731
|
-
}, [
|
|
27732
|
-
|
|
27733
|
-
|
|
27734
|
-
|
|
27735
|
-
|
|
27736
|
-
|
|
27737
|
-
|
|
27738
|
-
fallback: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300"
|
|
27739
|
-
}) }, when("site.logo"), bind("site.logo"))], when("content.logo", { not: true })),
|
|
27740
|
-
text({
|
|
27741
|
-
as: "strong",
|
|
27742
|
-
className: "header-logo-text"
|
|
27743
|
-
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))
|
|
27744
|
-
]);
|
|
27911
|
+
}, [media({ className: bindProp("$root.theme.header.logo", {
|
|
27912
|
+
transforms: pipe(tx("layout.headerLogoMediaClass", { base: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300" })),
|
|
27913
|
+
fallback: "rb-header-logo-lg rb-w-auto rb-transition-all rb-duration-300"
|
|
27914
|
+
}) }, when("content.logo"), bindChromeLogo("header-root")), text({
|
|
27915
|
+
as: "strong",
|
|
27916
|
+
className: "header-logo-text"
|
|
27917
|
+
}, whenTransformed("$root.theme.header.logo", "layout.headerLogoTextVisible"), bind("site.title", { fallback: "Your Site" }))]);
|
|
27745
27918
|
const createNavRow = (className, align = "end") => navRow({
|
|
27746
27919
|
className: `${className} header-nav-row`,
|
|
27747
27920
|
align,
|
|
@@ -27781,10 +27954,8 @@ const mobileToggleIcon = stack({
|
|
|
27781
27954
|
}
|
|
27782
27955
|
]);
|
|
27783
27956
|
const mobileToggleButton = {
|
|
27784
|
-
type: "
|
|
27957
|
+
type: "headerControl",
|
|
27785
27958
|
props: {
|
|
27786
|
-
type: "button",
|
|
27787
|
-
variantId: "",
|
|
27788
27959
|
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`,
|
|
27789
27960
|
"aria-label": "Open menu",
|
|
27790
27961
|
"aria-expanded": "false",
|
|
@@ -27794,10 +27965,8 @@ const mobileToggleButton = {
|
|
|
27794
27965
|
children: [mobileToggleIcon]
|
|
27795
27966
|
};
|
|
27796
27967
|
const mobileOverlayToggleButton = {
|
|
27797
|
-
type: "
|
|
27968
|
+
type: "headerControl",
|
|
27798
27969
|
props: {
|
|
27799
|
-
type: "button",
|
|
27800
|
-
variantId: "",
|
|
27801
27970
|
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",
|
|
27802
27971
|
"aria-label": "Open menu",
|
|
27803
27972
|
"aria-expanded": "false",
|
|
@@ -27821,7 +27990,7 @@ const mobileOverlayHeader = inline({
|
|
|
27821
27990
|
align: "center",
|
|
27822
27991
|
justify: "between",
|
|
27823
27992
|
style: borderColorStyle("border")
|
|
27824
|
-
}, [
|
|
27993
|
+
}, [createLogoRow("header-mobile-panel"), mobileOverlayToggleButton]);
|
|
27825
27994
|
const mobileOverlayBody = stack({
|
|
27826
27995
|
className: "rb-flex-1 rb-px-6 rb-py-6",
|
|
27827
27996
|
gap: "md",
|
|
@@ -28008,7 +28177,10 @@ const brandLogo = link({
|
|
|
28008
28177
|
options: { base: "rb-h-10 rb-w-auto" }
|
|
28009
28178
|
}],
|
|
28010
28179
|
fallback: "rb-h-10 rb-w-auto"
|
|
28011
|
-
} } }, when("module.showLogo", { equals: true }), when("content.logo"), bind("content
|
|
28180
|
+
} } }, when("module.showLogo", { equals: true }), when("content.logo"), bind("content", { transforms: [{
|
|
28181
|
+
id: "layout.chromeLogo",
|
|
28182
|
+
options: { surface: "footer-root" }
|
|
28183
|
+
}] })), text({
|
|
28012
28184
|
as: "strong",
|
|
28013
28185
|
className: "footer-logo-text rb-nav-text"
|
|
28014
28186
|
}, when("module.showTitle", { equals: true }), bind("site.title", { fallback: "Your Site" }))], when("module.kind", { equals: "brand" }));
|
|
@@ -30209,6 +30381,12 @@ const occurrenceContextSchema = z.object({
|
|
|
30209
30381
|
capacityOverride: z.number().nullable().optional(),
|
|
30210
30382
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
30211
30383
|
}).nullable();
|
|
30384
|
+
//#endregion
|
|
30385
|
+
//#region ../blocks/src/system/runtime/api/readAuthority.ts
|
|
30386
|
+
const browserReadAuthoritySchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("published") }).strict(), z.object({
|
|
30387
|
+
kind: z.literal("preview"),
|
|
30388
|
+
token: z.string().min(1)
|
|
30389
|
+
}).strict()]);
|
|
30212
30390
|
const unsupportedEventRegistrationPageSurfaceSubjectSchema = z.object({
|
|
30213
30391
|
kind: z.literal("unsupported"),
|
|
30214
30392
|
reason: z.enum([
|
|
@@ -30471,6 +30649,7 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
30471
30649
|
apiBaseUrl: z.string().optional(),
|
|
30472
30650
|
portalToken: z.string().nullable().optional(),
|
|
30473
30651
|
previewToken: z.string().nullable().optional(),
|
|
30652
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
30474
30653
|
...eventRegistrationHydrationSchemaShape,
|
|
30475
30654
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
30476
30655
|
wholeSeriesRunEvents: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
@@ -30508,6 +30687,7 @@ z.object({
|
|
|
30508
30687
|
apiBaseUrl: z.string().optional(),
|
|
30509
30688
|
portalToken: z.string().nullable().optional(),
|
|
30510
30689
|
previewToken: z.string().nullable().optional(),
|
|
30690
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
30511
30691
|
stage: previewStageSchema.optional()
|
|
30512
30692
|
});
|
|
30513
30693
|
function buildEventRegistrationDisplayFromScopedEvents(source, scopedSourceEvents) {
|
|
@@ -30766,6 +30946,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
30766
30946
|
text({ as: "h2" }, bind("content.heading"), when("content.heading")),
|
|
30767
30947
|
richText({ className: "rb-prose rb-max-w-none" }, bind("content.description"), when("content.description")),
|
|
30768
30948
|
eventRegistration(withApiBindings({
|
|
30949
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
30769
30950
|
occurrenceContext: { $bind: { from: "$root.occurrenceContext" } },
|
|
30770
30951
|
subject: { $bind: { from: "$root.subject" } },
|
|
30771
30952
|
portalToken: { $bind: {
|
|
@@ -31417,6 +31598,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
31417
31598
|
events: z.array(publicEventSchema).nullable().optional(),
|
|
31418
31599
|
siteId: z.string(),
|
|
31419
31600
|
apiBaseUrl: z.string().optional(),
|
|
31601
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
31420
31602
|
stage: previewStageSchema.optional(),
|
|
31421
31603
|
listLayout: eventLayoutSchema.optional(),
|
|
31422
31604
|
listColumns: columnOptionSchema.optional(),
|
|
@@ -31469,7 +31651,6 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
31469
31651
|
const eventCollectionHydrationSchema = z.object({
|
|
31470
31652
|
siteId: z.string(),
|
|
31471
31653
|
calendarWindow: calendarWindowPageSchema.optional(),
|
|
31472
|
-
stage: previewStageSchema.optional(),
|
|
31473
31654
|
prefetchedEvents: z.boolean(),
|
|
31474
31655
|
eventSurface: eventSurfaceScopeSchema$1,
|
|
31475
31656
|
filterEventPresets: z.string().nullable(),
|
|
@@ -31544,7 +31725,6 @@ function buildEventCollectionHydration(source, now = /* @__PURE__ */ new Date())
|
|
|
31544
31725
|
return {
|
|
31545
31726
|
calendarWindow: source.calendarWindow ?? void 0,
|
|
31546
31727
|
siteId: source.siteId,
|
|
31547
|
-
stage: source.stage,
|
|
31548
31728
|
prefetchedEvents: source.events != null,
|
|
31549
31729
|
eventSurface: selected ? "all" : normalizeEventSurfaceScope(source.eventSurface),
|
|
31550
31730
|
filterEventPresets: selected ? null : normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
@@ -31564,6 +31744,7 @@ const eventListingSourceSchema = z.object({
|
|
|
31564
31744
|
events: z.array(publicEventSchema).nullable().optional(),
|
|
31565
31745
|
siteId: z.string(),
|
|
31566
31746
|
apiBaseUrl: z.string().optional(),
|
|
31747
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
31567
31748
|
stage: previewStageSchema.optional(),
|
|
31568
31749
|
layout: eventLayoutSchema.optional(),
|
|
31569
31750
|
columns: columnOptionSchema.optional(),
|
|
@@ -31604,7 +31785,6 @@ const eventListingDisplaySchema = z.object({
|
|
|
31604
31785
|
});
|
|
31605
31786
|
const eventListingHydrationSchema = z.object({
|
|
31606
31787
|
siteId: z.string(),
|
|
31607
|
-
stage: previewStageSchema.optional(),
|
|
31608
31788
|
eventsPerPage: eventPageSizeSchema,
|
|
31609
31789
|
paginationAction: eventListPaginationActionSchema,
|
|
31610
31790
|
showFilters: z.boolean(),
|
|
@@ -31627,6 +31807,7 @@ const eventListingRenderSchema = z.object({
|
|
|
31627
31807
|
z.object({
|
|
31628
31808
|
siteId: z.string(),
|
|
31629
31809
|
apiBaseUrl: z.string().optional(),
|
|
31810
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
31630
31811
|
stage: previewStageSchema.optional()
|
|
31631
31812
|
});
|
|
31632
31813
|
const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
@@ -31661,7 +31842,6 @@ const eventListingBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
31661
31842
|
},
|
|
31662
31843
|
hydration: {
|
|
31663
31844
|
siteId: source.siteId,
|
|
31664
|
-
stage: source.stage,
|
|
31665
31845
|
eventsPerPage: pageSize,
|
|
31666
31846
|
paginationAction: resolveEventListPaginationAction({
|
|
31667
31847
|
paginationMode: source.paginationMode,
|
|
@@ -31943,6 +32123,7 @@ const eventListingBlockDefinition = {
|
|
|
31943
32123
|
rootType: "stack",
|
|
31944
32124
|
rootProps: { gap: "lg" },
|
|
31945
32125
|
children: [...eventSectionHeaderLayoutNodes(), el("event-listing", withApiBindings({
|
|
32126
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
31946
32127
|
events: { $bind: { from: "data.events" } },
|
|
31947
32128
|
stage: { $bind: {
|
|
31948
32129
|
from: "$root.previewStage",
|
|
@@ -32140,6 +32321,7 @@ const eventCalendarRenderSchema = z.object({
|
|
|
32140
32321
|
z.object({
|
|
32141
32322
|
siteId: z.string(),
|
|
32142
32323
|
apiBaseUrl: z.string().optional(),
|
|
32324
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
32143
32325
|
stage: previewStageSchema.optional()
|
|
32144
32326
|
});
|
|
32145
32327
|
/**
|
|
@@ -32161,7 +32343,7 @@ function buildEventCalendarDisplay(source) {
|
|
|
32161
32343
|
listColumns: source.listColumns ?? source.columns
|
|
32162
32344
|
}),
|
|
32163
32345
|
kind: "event-calendar",
|
|
32164
|
-
displayMode:
|
|
32346
|
+
displayMode: resolveEventCalendarReadPlan(source).mode,
|
|
32165
32347
|
className: source.className ?? null,
|
|
32166
32348
|
events: (source.events ?? []).slice().sort((left, right) => new Date(left.startsAt).getTime() - new Date(right.startsAt).getTime()),
|
|
32167
32349
|
boardTitle: normalizeOptionalText(source.boardTitle),
|
|
@@ -32178,13 +32360,16 @@ const eventCalendarBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
32178
32360
|
source: createZodCodec(eventCalendarSourceSchema),
|
|
32179
32361
|
render: createZodCodec(eventCalendarRenderSchema)
|
|
32180
32362
|
},
|
|
32181
|
-
buildRender: (source) =>
|
|
32182
|
-
|
|
32183
|
-
|
|
32184
|
-
|
|
32185
|
-
|
|
32186
|
-
|
|
32187
|
-
|
|
32363
|
+
buildRender: (source) => {
|
|
32364
|
+
const plan = resolveEventCalendarReadPlan(source);
|
|
32365
|
+
return {
|
|
32366
|
+
display: buildEventCalendarDisplay(source.calendarWindow && plan.jobs === "calendar" ? {
|
|
32367
|
+
...source,
|
|
32368
|
+
events: source.calendarWindow.events
|
|
32369
|
+
} : source),
|
|
32370
|
+
hydration: buildEventCollectionHydration(source)
|
|
32371
|
+
};
|
|
32372
|
+
}
|
|
32188
32373
|
});
|
|
32189
32374
|
//#endregion
|
|
32190
32375
|
//#region ../blocks/src/system/blocks/events/eventCalendarDataLoaders.ts
|
|
@@ -32334,6 +32519,7 @@ const eventCalendarLayout = [styledSection({
|
|
|
32334
32519
|
rootType: "stack",
|
|
32335
32520
|
rootProps: { gap: "lg" },
|
|
32336
32521
|
children: [...eventSectionHeaderLayoutNodes({ splitClassName: "event-section-head event-section-head--split" }), el("event-calendar", withApiBindings({
|
|
32522
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
32337
32523
|
events: { $bind: { from: "data.events" } },
|
|
32338
32524
|
calendarWindow: { $bind: { from: "data.calendarWindow" } },
|
|
32339
32525
|
stage: { $bind: {
|
|
@@ -36121,6 +36307,7 @@ const shopSourceSchema = z.object({
|
|
|
36121
36307
|
products: z.array(publicProductSchema).nullable().optional(),
|
|
36122
36308
|
siteId: z.string().optional(),
|
|
36123
36309
|
apiBaseUrl: z.string().optional(),
|
|
36310
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
36124
36311
|
stage: previewStageSchema.optional()
|
|
36125
36312
|
});
|
|
36126
36313
|
const productVariantOptionDisplaySchema = z.object({
|
|
@@ -36288,6 +36475,7 @@ function resolveShowPricePerCredit(source) {
|
|
|
36288
36475
|
z.object({
|
|
36289
36476
|
siteId: z.string().optional(),
|
|
36290
36477
|
apiBaseUrl: z.string().optional(),
|
|
36478
|
+
readAuthority: browserReadAuthoritySchema.optional(),
|
|
36291
36479
|
stage: previewStageSchema.optional()
|
|
36292
36480
|
});
|
|
36293
36481
|
const shopBlockRuntime = defineProgressiveBlockRuntime({
|
|
@@ -36628,6 +36816,7 @@ const shopBlockDefinition = {
|
|
|
36628
36816
|
baseClass: "",
|
|
36629
36817
|
spacing: "spacious",
|
|
36630
36818
|
children: sectionContainer([shop(withApiBindings({
|
|
36819
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
36631
36820
|
mode: "passes-memberships",
|
|
36632
36821
|
showPasses: { $bind: {
|
|
36633
36822
|
from: "content.showPasses",
|
|
@@ -36826,6 +37015,7 @@ const productListBlockDefinition = {
|
|
|
36826
37015
|
baseClass: "",
|
|
36827
37016
|
spacing: "spacious",
|
|
36828
37017
|
children: sectionContainer([productList(withApiBindings({
|
|
37018
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
36829
37019
|
mode: "product-list",
|
|
36830
37020
|
heading: { $bind: {
|
|
36831
37021
|
from: "content.heading",
|
|
@@ -36968,6 +37158,7 @@ const productDetailBlockDefinition = {
|
|
|
36968
37158
|
baseClass: "",
|
|
36969
37159
|
spacing: "spacious",
|
|
36970
37160
|
children: sectionContainer([productDetail(withApiBindings({
|
|
37161
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
36971
37162
|
mode: "product-detail",
|
|
36972
37163
|
heading: { $bind: {
|
|
36973
37164
|
from: "content.heading",
|
|
@@ -37084,6 +37275,7 @@ const cartBlockDefinition = {
|
|
|
37084
37275
|
baseClass: "",
|
|
37085
37276
|
spacing: "spacious",
|
|
37086
37277
|
children: sectionContainer([cart(withApiBindings({
|
|
37278
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
37087
37279
|
mode: "cart",
|
|
37088
37280
|
heading: { $bind: {
|
|
37089
37281
|
from: "content.heading",
|
|
@@ -37167,6 +37359,7 @@ const checkoutBlockDefinition = {
|
|
|
37167
37359
|
baseClass: "",
|
|
37168
37360
|
spacing: "spacious",
|
|
37169
37361
|
children: sectionContainer([checkout(withApiBindings({
|
|
37362
|
+
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
37170
37363
|
mode: "checkout",
|
|
37171
37364
|
heading: { $bind: {
|
|
37172
37365
|
from: "content.heading",
|
|
@@ -39839,8 +40032,8 @@ const defaultTransforms = createTransformRegistry([
|
|
|
39839
40032
|
summary: "Choose the read projection required by the calendar display mode",
|
|
39840
40033
|
schema: z.object({ job: z.enum(["list", "calendar"]) }),
|
|
39841
40034
|
run(value, options) {
|
|
39842
|
-
const
|
|
39843
|
-
return
|
|
40035
|
+
const plan = resolveEventCalendarReadPlan(asPartialObject(value) ?? {});
|
|
40036
|
+
return plan.jobs === "both" || plan.jobs === options.job;
|
|
39844
40037
|
}
|
|
39845
40038
|
},
|
|
39846
40039
|
{
|
|
@@ -39853,6 +40046,7 @@ const defaultTransforms = createTransformRegistry([
|
|
|
39853
40046
|
},
|
|
39854
40047
|
...formattingTransforms,
|
|
39855
40048
|
...layoutTransforms,
|
|
40049
|
+
...chromeLogoTransforms,
|
|
39856
40050
|
...uiTransforms,
|
|
39857
40051
|
...mediaTransforms,
|
|
39858
40052
|
...backgroundTransforms,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { i as textColorStyle } from "./colorStyles-
|
|
2
|
-
import {
|
|
1
|
+
import { i as textColorStyle } from "./colorStyles-CuJBiS-1.mjs";
|
|
2
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-DPXtCZWP.mjs";
|
|
3
|
+
import { n as ThemedButtonLink } from "./ThemedButton-BwNFVwi4.mjs";
|
|
3
4
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
4
|
-
import { t as LeafletStaticMap } from "./LeafletStaticMap-
|
|
5
|
+
import { t as LeafletStaticMap } from "./LeafletStaticMap-BAqXdfhq.mjs";
|
|
5
6
|
import "react";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
//#region ../core/src/location.ts
|
|
@@ -182,16 +183,14 @@ function LocationMapView({ addressText, location, zoom, heightPx, showAddressTex
|
|
|
182
183
|
style: textColorStyle("mutedText"),
|
|
183
184
|
children: addressText
|
|
184
185
|
}) : null,
|
|
185
|
-
showDirections && directionsUrl ? /* @__PURE__ */ jsx(
|
|
186
|
+
showDirections && directionsUrl ? /* @__PURE__ */ jsx(ThemedButtonLink, {
|
|
186
187
|
href: directionsUrl,
|
|
187
188
|
target: "_blank",
|
|
188
189
|
rel: "noreferrer",
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}),
|
|
194
|
-
children: directionsLabel
|
|
190
|
+
variant: "ghost",
|
|
191
|
+
size: "sm",
|
|
192
|
+
extraClassName: "rb-w-fit",
|
|
193
|
+
label: directionsLabel
|
|
195
194
|
}) : null
|
|
196
195
|
]
|
|
197
196
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as ok$1, E as err, O as clsx, S as unsafeAsMediaAssetId, T as unsafeAsStoragePath, f as isExplicitRectCrop, i as textColorStyle, m as resolveMediaTransformForAspect, n as mergeStyles, p as parseAspectRatioValue, t as backgroundColorStyle, w as unsafeAsStorageBucketName } from "./colorStyles-
|
|
1
|
+
import { D as ok$1, E as err, O as clsx, S as unsafeAsMediaAssetId, T as unsafeAsStoragePath, f as isExplicitRectCrop, i as textColorStyle, m as resolveMediaTransformForAspect, n as mergeStyles, p as parseAspectRatioValue, t as backgroundColorStyle, w as unsafeAsStorageBucketName } from "./colorStyles-CuJBiS-1.mjs";
|
|
2
2
|
import "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region ../media-core/src/fileSafety.ts
|