@riverbankcms/sdk 0.89.1 → 0.90.1
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/README.md +27 -4
- package/dist/{PreviewEditorSidebar-JDR64FEC.mjs → PreviewEditorSidebar-FNFRVSIM.mjs} +3 -3
- package/dist/{PreviewEditorUI-67TMJMAF.mjs → PreviewEditorUI-3WXJFQXG.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-2UCIMKUB.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +216 -0
- package/dist/_dts/altcha/src/AltchaWidget.d.ts +1 -1
- package/dist/_dts/api/src/bookingConfig.d.ts +3 -0
- package/dist/_dts/api/src/bookingOperations.d.ts +2 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +4 -2
- package/dist/_dts/api/src/bookings.d.ts +3 -1
- package/dist/_dts/api/src/event-listing-destination.d.ts +59 -0
- package/dist/_dts/api/src/index.d.ts +10 -5
- package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +0 -1
- package/dist/_dts/api/src/navigation.d.ts +2 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +18 -6
- package/dist/_dts/api/src/request.d.ts +21 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +3 -1
- package/dist/_dts/api/src/sdkContracts.d.ts +2 -0
- package/dist/_dts/api/src/settings/permissions.d.ts +273 -0
- package/dist/_dts/api/src/types.d.ts +4 -1
- package/dist/_dts/api/src/url.d.ts +6 -3
- package/dist/_dts/block-form/src/utils/visibleWhen.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterThumbnailCard.d.ts +5 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterThumbnailGrid.d.ts +9 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/index.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +7 -11
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +6 -0
- package/dist/_dts/blocks/src/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +14 -6
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +60 -2
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +16 -5
- package/dist/_dts/blocks/src/system/blocks/hero.d.ts +0 -2
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +9 -9
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/shop.shared.d.ts +8 -0
- package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +1 -1
- package/dist/_dts/blocks/src/system/constants/events.d.ts +4 -1
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +17 -5
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +51 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +1 -17
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +5 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +5 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +7 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +48 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.d.ts +50 -0
- 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 +21 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +11 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +11 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/calendarViewOptions.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/destination.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventProductEligibility.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/pricing.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/shop-checkout-form.d.ts +2 -2
- package/dist/_dts/content-model/src/entry-slots/index.d.ts +1 -0
- package/dist/_dts/content-model/src/entry-slots/sdkBlocks.d.ts +21 -0
- package/dist/_dts/content-model/src/entry-slots/types.d.ts +7 -0
- package/dist/_dts/core/src/event-pricing.d.ts +12 -2
- package/dist/_dts/core/src/money-input.d.ts +18 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +50 -0
- package/dist/_dts/media-editor/src/MediaEditor.d.ts +2 -1
- package/dist/_dts/media-editor/src/fieldUi.d.ts +6 -0
- package/dist/_dts/media-editor/src/index.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/index.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewThemedSiteDocument.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/SiteChromeEditableSurface.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/themeRuntime.d.ts +6 -0
- package/dist/_dts/preview-next/src/client/sdk/SdkPreviewMode.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/commands/pull-dated-offering-scope.d.ts +10 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +12 -5
- package/dist/_dts/sdk/src/client/management/types.d.ts +6 -55
- package/dist/_dts/sdk/src/components.d.ts +1 -0
- package/dist/_dts/sdk/src/config/field-definitions.d.ts +3 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +3 -1
- package/dist/_dts/sdk/src/next/types.d.ts +8 -11
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +1 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +11 -1
- package/dist/_dts/sdk/src/rendering/blocks-theme-scope.d.ts +2 -1
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +8 -7
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +5 -6
- package/dist/_dts/sdk/src/rendering/index.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +11 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/themeRuntime.d.ts +26 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +18 -0
- package/dist/_dts/theme-core/src/ResponsiveScope.d.ts +12 -0
- package/dist/_dts/theme-core/src/accordions/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/buttons/types.d.ts +5 -5
- package/dist/_dts/theme-core/src/cards/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/index.d.ts +2 -0
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +21 -21
- package/dist/_dts/theme-core/src/schema.d.ts +18 -18
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/logoBranding.d.ts +4 -4
- package/dist/_dts/theme-core/src/themeRuntime.d.ts +11 -0
- package/dist/{chunk-F645A5UV.mjs → chunk-BOQXMCSP.mjs} +129 -101
- package/dist/{chunk-7YUAXONX.mjs → chunk-CR2VX432.mjs} +1563 -877
- package/dist/{chunk-HKJQERFR.mjs → chunk-FA6LVZ7C.mjs} +91 -55
- package/dist/{chunk-TGBJWKMP.mjs → chunk-H6TT5ZXI.mjs} +9 -1
- package/dist/{chunk-ZQRBLCW5.mjs → chunk-SYYJZPKU.mjs} +2 -2
- package/dist/{chunk-7N46MZHI.mjs → chunk-UG7I7S7W.mjs} +1 -1
- package/dist/cli/index.mjs +1057 -632
- package/dist/cli/init-docs/content/cli-reference.md +6 -1
- package/dist/cli/init-docs/content/content-management.md +27 -0
- package/dist/client/{accordion-MUCVNGQ7.mjs → accordion-4K7VGZ3I.mjs} +2 -2
- package/dist/client/{bookingForm-PKD6EFIE.mjs → bookingForm-3QXA3CIS.mjs} +26 -271
- package/dist/client/bookings.mjs +1586 -825
- package/dist/client/{carousel-3TKQSNJC.mjs → carousel-BEJKNGQ7.mjs} +3 -3
- package/dist/client/{cart-6XHSZK23.mjs → cart-44BBM6XG.mjs} +7 -8
- package/dist/client/{checkout-FVSPM6FI.mjs → checkout-THMHEYKF.mjs} +7 -8
- package/dist/client/{chunk-25W2EQUN.mjs → chunk-3H5CLFKT.mjs} +8 -0
- package/dist/client/{chunk-ZJZZA5EP.mjs → chunk-4COPESPO.mjs} +13 -16
- package/dist/client/chunk-5AJIMWKS.mjs +436 -0
- package/dist/client/{chunk-UQFY4AHX.mjs → chunk-B4H6QMPY.mjs} +157 -49
- package/dist/client/{chunk-VGLXACVK.mjs → chunk-DQIRKNZE.mjs} +1 -1
- package/dist/client/{chunk-7DH35FGA.mjs → chunk-EJBHK74Y.mjs} +1 -1
- package/dist/client/{chunk-SDIYSQAY.mjs → chunk-HIHOQGIP.mjs} +2 -3
- package/dist/client/{chunk-CQKKFEQD.mjs → chunk-JV7ZNAOU.mjs} +378 -111
- package/dist/client/{chunk-FHU6PFPM.mjs → chunk-KNTLBQ3N.mjs} +1 -1
- package/dist/client/{chunk-RSQWWUAD.mjs → chunk-PEDNDLPB.mjs} +4 -4
- package/dist/client/{chunk-EY42X22F.mjs → chunk-SLY6UDAS.mjs} +157 -5
- package/dist/client/{chunk-STJ2NCQM.mjs → chunk-WHZQDPBZ.mjs} +19 -1
- package/dist/client/{chunk-ZT5XE7FK.mjs → chunk-ZIAF2DA4.mjs} +1 -1
- package/dist/client/client.mjs +3552 -2898
- package/dist/client/{courseRegistration-ATZSYDHM.mjs → courseRegistration-URX7RCCK.mjs} +20 -58
- package/dist/client/{eventCalendar-6T2UGKKP.mjs → eventCalendar-GTENOQCE.mjs} +10 -11
- package/dist/client/{eventCombined-Q4VANXVF.mjs → eventCombined-EZVB72MF.mjs} +10 -11
- package/dist/client/{eventDetails-DW37E7VW.mjs → eventDetails-CH4BJR5Z.mjs} +10 -11
- package/dist/client/{eventListing-XURTSAUW.mjs → eventListing-4BVOI5HS.mjs} +10 -11
- package/dist/client/{eventRegistration-MRKEVAXW.mjs → eventRegistration-37LPIKIE.mjs} +10 -11
- package/dist/client/{form-WZZFFGMU.mjs → form-FX3Y54YK.mjs} +7 -7
- package/dist/client/{headerSection-EQYVQBLM.mjs → headerSection-UOZZGVYL.mjs} +3 -3
- package/dist/client/hooks.mjs +1169 -1063
- package/dist/client/{locationMap-MFF5VAZR.mjs → locationMap-VSIPKV35.mjs} +3 -3
- package/dist/client/{newsletterForm-JQ77UYIE.mjs → newsletterForm-6FRJKNAF.mjs} +5 -5
- package/dist/client/{productDetail-25LMT3IZ.mjs → productDetail-6AHMLXCO.mjs} +7 -8
- package/dist/client/{productList-5ABEMKUG.mjs → productList-M2CYIZVH.mjs} +7 -8
- package/dist/client/rendering/client.mjs +2912 -2316
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +2874 -2230
- package/dist/client/{shop-OMMQZ6YO.mjs → shop-AUOT6GEX.mjs} +7 -8
- package/dist/client/spam-protection.mjs +4 -5
- package/dist/preview-next/before-render.mjs +2 -2
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/{sdk-runtime-WNLBZ3ZH.mjs → sdk-runtime-6GPJNLU6.mjs} +6 -6
- package/dist/server/components.mjs +1856 -1509
- package/dist/server/config-validation.mjs +1394 -1288
- package/dist/server/config.mjs +1394 -1288
- package/dist/server/data.mjs +1169 -1063
- package/dist/server/index.mjs +135 -100
- package/dist/server/navigation.mjs +20 -30
- package/dist/server/next.mjs +1936 -1576
- package/dist/server/page-converter.mjs +1081 -967
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1868 -1521
- package/dist/server/rendering.mjs +1878 -1531
- package/dist/server/routing.mjs +1248 -1089
- package/dist/server/server.mjs +1312 -1171
- package/dist/server/theme-bridge.mjs +8 -5
- package/package.json +3 -3
- package/dist/SdkPreviewModeRuntime-ZBEMRV7N.mjs +0 -8
- package/dist/client/chunk-LQFDYWPJ.mjs +0 -184
- package/dist/client/chunk-ZFHRN6W2.mjs +0 -66
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/config/validation.ts
|
|
2
|
-
import { z as
|
|
2
|
+
import { z as z72 } from "zod";
|
|
3
3
|
|
|
4
4
|
// ../api/src/apiEndpointTypes.ts
|
|
5
5
|
function blockedDemoMutationPolicy(classification, publicMessage) {
|
|
@@ -6495,6 +6495,8 @@ function publicEventPricingType(pricing) {
|
|
|
6495
6495
|
case "ticket_types":
|
|
6496
6496
|
case "course":
|
|
6497
6497
|
return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
|
|
6498
|
+
case "external":
|
|
6499
|
+
return "external";
|
|
6498
6500
|
}
|
|
6499
6501
|
}
|
|
6500
6502
|
function isFreePublicEventPriceDisplay(display) {
|
|
@@ -6508,6 +6510,7 @@ function isFreePublicEventPriceDisplay(display) {
|
|
|
6508
6510
|
case "range":
|
|
6509
6511
|
case "mixed":
|
|
6510
6512
|
case "unavailable":
|
|
6513
|
+
case "external":
|
|
6511
6514
|
return false;
|
|
6512
6515
|
}
|
|
6513
6516
|
}
|
|
@@ -6768,7 +6771,7 @@ var navigationLinkInputSchema = z2.discriminatedUnion(
|
|
|
6768
6771
|
);
|
|
6769
6772
|
|
|
6770
6773
|
// ../api/src/sdkConfig/contracts.ts
|
|
6771
|
-
import { z as
|
|
6774
|
+
import { z as z63 } from "zod";
|
|
6772
6775
|
|
|
6773
6776
|
// ../blocks/src/system/manifest/augmentManifest.ts
|
|
6774
6777
|
function augmentManifest(manifest) {
|
|
@@ -7196,12 +7199,17 @@ var visibleWhenPredicateSchema = z4.object({
|
|
|
7196
7199
|
minItems: z4.number().int().nonnegative().optional(),
|
|
7197
7200
|
maxItems: z4.number().int().nonnegative().optional()
|
|
7198
7201
|
});
|
|
7199
|
-
var visibleWhenSchema = z4.
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
|
|
7203
|
-
|
|
7204
|
-
|
|
7202
|
+
var visibleWhenSchema = z4.lazy(
|
|
7203
|
+
() => z4.union([
|
|
7204
|
+
visibleWhenPredicateSchema,
|
|
7205
|
+
z4.object({
|
|
7206
|
+
allOf: z4.array(visibleWhenSchema).min(1)
|
|
7207
|
+
}),
|
|
7208
|
+
z4.object({
|
|
7209
|
+
anyOf: z4.array(visibleWhenSchema).min(1)
|
|
7210
|
+
})
|
|
7211
|
+
])
|
|
7212
|
+
);
|
|
7205
7213
|
var uiSchema = z4.object({
|
|
7206
7214
|
widget: z4.string().optional(),
|
|
7207
7215
|
// Container/widget presets (used by Group/Repeater widgets themselves, not for widget selection)
|
|
@@ -20106,9 +20114,6 @@ var heroCopyFragment = defineFragment({
|
|
|
20106
20114
|
maxLength: 600
|
|
20107
20115
|
}
|
|
20108
20116
|
],
|
|
20109
|
-
// Layout order is [eyebrow, headline, subheadline]. The hero block's
|
|
20110
|
-
// `splitEditorial` variant reads these nodes by index; keep the order stable
|
|
20111
|
-
// (it fails fast at import if the count changes).
|
|
20112
20117
|
layout: [
|
|
20113
20118
|
text(
|
|
20114
20119
|
{
|
|
@@ -22346,32 +22351,6 @@ var splitReverseLayout = splitLayoutWith([
|
|
|
22346
22351
|
splitContentColumn,
|
|
22347
22352
|
splitImageColumn
|
|
22348
22353
|
]);
|
|
22349
|
-
var heroEyebrowNode = heroCopyFragment.layout[0];
|
|
22350
|
-
var heroHeadlineNode = heroCopyFragment.layout[1];
|
|
22351
|
-
var heroSubheadlineNode = heroCopyFragment.layout[2];
|
|
22352
|
-
var heroCtaRowNode = heroCtaRowFragment.layout[0];
|
|
22353
|
-
if (!heroEyebrowNode || !heroHeadlineNode || !heroSubheadlineNode || !heroCtaRowNode) {
|
|
22354
|
-
throw new Error("Hero copy/CTA fragments are missing their expected layout nodes.");
|
|
22355
|
-
}
|
|
22356
|
-
var heroEditorialBottomRow = inline(
|
|
22357
|
-
{
|
|
22358
|
-
gap: "lg",
|
|
22359
|
-
align: "end",
|
|
22360
|
-
justify: "start",
|
|
22361
|
-
wrap: true,
|
|
22362
|
-
className: "rb-w-full"
|
|
22363
|
-
},
|
|
22364
|
-
[heroSubheadlineNode, heroCtaRowNode]
|
|
22365
|
-
);
|
|
22366
|
-
var splitEditorialContentColumn = heroContentWrapper(
|
|
22367
|
-
[heroEyebrowNode, heroHeadlineNode, heroEditorialBottomRow],
|
|
22368
|
-
"md",
|
|
22369
|
-
"rb-w-full rb-text-left"
|
|
22370
|
-
);
|
|
22371
|
-
var splitEditorialLayout = splitLayoutWith([
|
|
22372
|
-
splitEditorialContentColumn,
|
|
22373
|
-
splitImageColumn
|
|
22374
|
-
]);
|
|
22375
22354
|
var heroConfig = {
|
|
22376
22355
|
id: "block.hero",
|
|
22377
22356
|
title: "Hero",
|
|
@@ -22395,7 +22374,8 @@ var heroConfig = {
|
|
|
22395
22374
|
id: "imageShape",
|
|
22396
22375
|
label: "Image shape",
|
|
22397
22376
|
defaultValue: "default",
|
|
22398
|
-
uiIntent: "display"
|
|
22377
|
+
uiIntent: "display",
|
|
22378
|
+
visibleWhen: { field: "variant", oneOf: ["split", "splitReverse"] }
|
|
22399
22379
|
})
|
|
22400
22380
|
],
|
|
22401
22381
|
layout: classicLayout,
|
|
@@ -22403,8 +22383,7 @@ var heroConfig = {
|
|
|
22403
22383
|
classic: classicLayout,
|
|
22404
22384
|
micro: microLayout,
|
|
22405
22385
|
split: splitLayout,
|
|
22406
|
-
splitReverse: splitReverseLayout
|
|
22407
|
-
splitEditorial: splitEditorialLayout
|
|
22386
|
+
splitReverse: splitReverseLayout
|
|
22408
22387
|
},
|
|
22409
22388
|
defaultVariant: "classic",
|
|
22410
22389
|
description: "Hero section with headline, subtitle, and repeatable CTAs.",
|
|
@@ -24280,8 +24259,10 @@ function resolveGeneratedHeroLayoutStyles(content) {
|
|
|
24280
24259
|
return isPlainObject(raw) ? raw : null;
|
|
24281
24260
|
}
|
|
24282
24261
|
function readHeroLayoutString(content, generatedKey, fallbackKey = generatedKey) {
|
|
24262
|
+
const explicitValue = readString(content, fallbackKey);
|
|
24263
|
+
if (explicitValue !== void 0) return explicitValue;
|
|
24283
24264
|
const generated = resolveGeneratedHeroLayoutStyles(content);
|
|
24284
|
-
return generated && typeof generated[generatedKey] === "string" ? generated[generatedKey] :
|
|
24265
|
+
return generated && typeof generated[generatedKey] === "string" ? generated[generatedKey] : void 0;
|
|
24285
24266
|
}
|
|
24286
24267
|
function resolveHeroVariant(content) {
|
|
24287
24268
|
const variant = readString(content, "variant");
|
|
@@ -24294,7 +24275,7 @@ function resolveHeroContentAlignment(content) {
|
|
|
24294
24275
|
const raw = readHeroLayoutString(content, "contentAlignment");
|
|
24295
24276
|
if (raw === "left" || raw === "center" || raw === "right") return raw;
|
|
24296
24277
|
const variant = resolveHeroVariant(content);
|
|
24297
|
-
if (variant === "split" || variant === "splitReverse"
|
|
24278
|
+
if (variant === "split" || variant === "splitReverse") return "left";
|
|
24298
24279
|
return "center";
|
|
24299
24280
|
}
|
|
24300
24281
|
function resolveHeroVerticalAlignment(content) {
|
|
@@ -24304,7 +24285,7 @@ function resolveHeroVerticalAlignment(content) {
|
|
|
24304
24285
|
const minHeight = sectionStyles?.minHeight;
|
|
24305
24286
|
if (minHeight === "banner" || minHeight === "hero" || minHeight === "immersive") return "center";
|
|
24306
24287
|
const variant = resolveHeroVariant(content);
|
|
24307
|
-
if (variant === "split" || variant === "splitReverse"
|
|
24288
|
+
if (variant === "split" || variant === "splitReverse") return "center";
|
|
24308
24289
|
return "top";
|
|
24309
24290
|
}
|
|
24310
24291
|
function resolveHeroContentMaxWidth(content) {
|
|
@@ -27870,9 +27851,6 @@ var appointmentBookingBlockDefinition = {
|
|
|
27870
27851
|
}
|
|
27871
27852
|
};
|
|
27872
27853
|
|
|
27873
|
-
// ../blocks/src/system/blocks/event-registration.ts
|
|
27874
|
-
import { z as z47 } from "zod";
|
|
27875
|
-
|
|
27876
27854
|
// ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
27877
27855
|
import { z as z43 } from "zod";
|
|
27878
27856
|
|
|
@@ -28113,6 +28091,18 @@ var publicCoursesArraySchema = z42.array(publicCourseSchema);
|
|
|
28113
28091
|
var eventPresetSchema = z43.enum(["event", "class", "workshop", "retreat", "performance"]);
|
|
28114
28092
|
var eventScheduleScopeSchema = z43.enum(["recurring", "oneOff"]);
|
|
28115
28093
|
var eventDestinationModeSchema = z43.enum(["cms-managed", "system-managed"]);
|
|
28094
|
+
var publicEventDestinationSchema = z43.discriminatedUnion("kind", [
|
|
28095
|
+
z43.object({
|
|
28096
|
+
kind: z43.literal("native"),
|
|
28097
|
+
mode: eventDestinationModeSchema,
|
|
28098
|
+
path: z43.string()
|
|
28099
|
+
}),
|
|
28100
|
+
z43.object({
|
|
28101
|
+
kind: z43.literal("external"),
|
|
28102
|
+
url: z43.string(),
|
|
28103
|
+
label: z43.string()
|
|
28104
|
+
})
|
|
28105
|
+
]);
|
|
28116
28106
|
var eventVenueSchema = z43.object({
|
|
28117
28107
|
id: z43.string(),
|
|
28118
28108
|
name: z43.string(),
|
|
@@ -28127,7 +28117,7 @@ var eventCategorySchema = z43.object({
|
|
|
28127
28117
|
name: z43.string(),
|
|
28128
28118
|
color: z43.string().nullable()
|
|
28129
28119
|
});
|
|
28130
|
-
var pricingTypeSchema = z43.enum(["free", "paid"]);
|
|
28120
|
+
var pricingTypeSchema = z43.enum(["free", "paid", "external"]);
|
|
28131
28121
|
var accessRestrictionSchema = z43.enum(["none", "category"]);
|
|
28132
28122
|
var eventPricingModeSchema = z43.enum(["single", "ticket_types"]);
|
|
28133
28123
|
var publicCoursePriceDisplaySchema = z43.discriminatedUnion("kind", [
|
|
@@ -28148,6 +28138,7 @@ var publicEventPriceDisplaySchema = z43.discriminatedUnion("kind", [
|
|
|
28148
28138
|
currency: z43.string()
|
|
28149
28139
|
}),
|
|
28150
28140
|
z43.object({ kind: z43.literal("unavailable"), currency: z43.string() }),
|
|
28141
|
+
z43.object({ kind: z43.literal("external"), label: z43.string() }),
|
|
28151
28142
|
z43.object({ kind: z43.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
28152
28143
|
]);
|
|
28153
28144
|
var publicEventTicketTypePriceDisplaySchema = z43.union([
|
|
@@ -28226,6 +28217,10 @@ var publicEventPricingSchema = z43.discriminatedUnion("kind", [
|
|
|
28226
28217
|
z43.object({
|
|
28227
28218
|
kind: z43.literal("course"),
|
|
28228
28219
|
display: z43.object({ kind: z43.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
28220
|
+
}),
|
|
28221
|
+
z43.object({
|
|
28222
|
+
kind: z43.literal("external"),
|
|
28223
|
+
display: z43.object({ kind: z43.literal("external"), label: z43.string() })
|
|
28229
28224
|
})
|
|
28230
28225
|
]);
|
|
28231
28226
|
var publicTeamMemberSummarySchema = z43.object({
|
|
@@ -28254,7 +28249,8 @@ var publicEventSchema = z43.object({
|
|
|
28254
28249
|
image: mediaSchema2.nullable().optional()
|
|
28255
28250
|
}).optional(),
|
|
28256
28251
|
slug: z43.string(),
|
|
28257
|
-
path: z43.string(),
|
|
28252
|
+
path: z43.string().nullable(),
|
|
28253
|
+
destination: publicEventDestinationSchema,
|
|
28258
28254
|
requiresRegistration: z43.boolean(),
|
|
28259
28255
|
deliveryMode: z43.enum(["in_person", "online", "hybrid"]),
|
|
28260
28256
|
attendanceModes: z43.array(publicEventAttendanceModeAvailabilitySchema),
|
|
@@ -28487,24 +28483,57 @@ function normalizeEventStaffMemberId(value) {
|
|
|
28487
28483
|
return trimmed ? trimmed : null;
|
|
28488
28484
|
}
|
|
28489
28485
|
|
|
28490
|
-
// ../blocks/src/system/blocks/
|
|
28486
|
+
// ../blocks/src/system/blocks/shop.shared.ts
|
|
28491
28487
|
import { z as z44 } from "zod";
|
|
28492
|
-
var
|
|
28488
|
+
var publicPassProductSchema = z44.object({
|
|
28493
28489
|
id: z44.string(),
|
|
28494
|
-
|
|
28495
|
-
|
|
28496
|
-
|
|
28497
|
-
|
|
28498
|
-
|
|
28499
|
-
|
|
28490
|
+
productUseCase: z44.enum(["event_pass", "appointment_package"]).default("event_pass"),
|
|
28491
|
+
name: z44.string(),
|
|
28492
|
+
description: z44.string().nullable(),
|
|
28493
|
+
price: z44.number(),
|
|
28494
|
+
currency: z44.string(),
|
|
28495
|
+
creditsTotal: z44.number(),
|
|
28496
|
+
pricePerCredit: z44.number(),
|
|
28497
|
+
validDays: z44.number().nullable(),
|
|
28498
|
+
eligibleCategoryIds: z44.array(z44.string()),
|
|
28499
|
+
eligibleCategoryNames: z44.array(z44.string())
|
|
28500
|
+
});
|
|
28501
|
+
var publicPassProductCollectionSchema = z44.object({
|
|
28502
|
+
passes: z44.array(publicPassProductSchema)
|
|
28503
|
+
});
|
|
28504
|
+
var publicMembershipProductSchema = z44.object({
|
|
28505
|
+
id: z44.string(),
|
|
28506
|
+
name: z44.string(),
|
|
28507
|
+
description: z44.string().nullable(),
|
|
28508
|
+
price: z44.number(),
|
|
28509
|
+
currency: z44.string(),
|
|
28510
|
+
billingInterval: z44.enum(["month", "year"]),
|
|
28511
|
+
eligibleCategoryIds: z44.array(z44.string()),
|
|
28512
|
+
eligibleCategoryNames: z44.array(z44.string())
|
|
28513
|
+
});
|
|
28514
|
+
var publicMembershipProductCollectionSchema = z44.object({
|
|
28515
|
+
memberships: z44.array(publicMembershipProductSchema)
|
|
28516
|
+
});
|
|
28517
|
+
|
|
28518
|
+
// ../blocks/src/system/blocks/event-registration.shared.ts
|
|
28519
|
+
import { z as z45 } from "zod";
|
|
28520
|
+
var occurrenceContextSchema = z45.object({
|
|
28521
|
+
id: z45.string(),
|
|
28522
|
+
seriesId: z45.string(),
|
|
28523
|
+
startsAt: z45.string(),
|
|
28524
|
+
endsAt: z45.string(),
|
|
28525
|
+
timeZone: z45.string(),
|
|
28526
|
+
capacityOverride: z45.number().nullable().optional(),
|
|
28527
|
+
overrides: z45.record(z45.string(), z45.unknown()).nullable().optional()
|
|
28500
28528
|
}).nullable();
|
|
28501
28529
|
|
|
28502
28530
|
// ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
28503
|
-
import { z as
|
|
28531
|
+
import { z as z47 } from "zod";
|
|
28504
28532
|
|
|
28505
28533
|
// ../blocks/src/system/constants/events.ts
|
|
28506
28534
|
var EVENT_CONTENT_TYPE_SLUGS = ["event", "events"];
|
|
28507
|
-
var eventCalendarDisplayModeValues = ["combined", "
|
|
28535
|
+
var eventCalendarDisplayModeValues = ["combined", "calendar", "list", "timetable"];
|
|
28536
|
+
var eventCalendarDefaultViewValues = ["month", "week"];
|
|
28508
28537
|
var eventCalendarListLayoutValues = ["stack", "grid", "compact"];
|
|
28509
28538
|
var eventCalendarListLayoutOptions = [
|
|
28510
28539
|
{ id: "stack", label: "Stack" },
|
|
@@ -28514,6 +28543,9 @@ var eventCalendarListLayoutOptions = [
|
|
|
28514
28543
|
function isEventCalendarDisplayMode(value) {
|
|
28515
28544
|
return typeof value === "string" && eventCalendarDisplayModeValues.includes(value);
|
|
28516
28545
|
}
|
|
28546
|
+
function isEventCalendarDefaultView(value) {
|
|
28547
|
+
return typeof value === "string" && eventCalendarDefaultViewValues.includes(value);
|
|
28548
|
+
}
|
|
28517
28549
|
function isEventCalendarListLayout(value) {
|
|
28518
28550
|
return typeof value === "string" && eventCalendarListLayoutValues.includes(value);
|
|
28519
28551
|
}
|
|
@@ -28522,12 +28554,41 @@ function isEventContentType(slug) {
|
|
|
28522
28554
|
return EVENT_CONTENT_TYPE_SLUGS.includes(slug);
|
|
28523
28555
|
}
|
|
28524
28556
|
|
|
28557
|
+
// ../blocks/src/system/runtime/nodes/events/shared/destination.ts
|
|
28558
|
+
function isRecord3(value) {
|
|
28559
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
28560
|
+
}
|
|
28561
|
+
function isRuntimeEventDestination(value) {
|
|
28562
|
+
if (!isRecord3(value) || typeof value.kind !== "string") return false;
|
|
28563
|
+
if (value.kind === "native") {
|
|
28564
|
+
return (value.mode === "cms-managed" || value.mode === "system-managed") && typeof value.path === "string";
|
|
28565
|
+
}
|
|
28566
|
+
return value.kind === "external" && typeof value.url === "string" && typeof value.label === "string";
|
|
28567
|
+
}
|
|
28568
|
+
function resolveRuntimeEventDestination(event) {
|
|
28569
|
+
if (isRuntimeEventDestination(event.destination)) {
|
|
28570
|
+
return event.destination;
|
|
28571
|
+
}
|
|
28572
|
+
return {
|
|
28573
|
+
kind: "native",
|
|
28574
|
+
mode: event.eventDestinationMode === "system-managed" ? "system-managed" : "cms-managed",
|
|
28575
|
+
path: typeof event.path === "string" ? event.path : ""
|
|
28576
|
+
};
|
|
28577
|
+
}
|
|
28578
|
+
|
|
28525
28579
|
// ../blocks/src/system/runtime/nodes/events/shared/pricing.ts
|
|
28526
28580
|
var DEFAULT_EVENT_CURRENCY = "USD";
|
|
28527
28581
|
function resolveRuntimeEventPricing(event) {
|
|
28528
28582
|
if (isPublicEventPricing(event.pricing)) {
|
|
28529
28583
|
return event.pricing;
|
|
28530
28584
|
}
|
|
28585
|
+
const destination = resolveRuntimeEventDestination(event);
|
|
28586
|
+
if (destination.kind === "external") {
|
|
28587
|
+
return {
|
|
28588
|
+
kind: "external",
|
|
28589
|
+
display: { kind: "external", label: "External registration" }
|
|
28590
|
+
};
|
|
28591
|
+
}
|
|
28531
28592
|
const legacy = event;
|
|
28532
28593
|
const currency = readCurrency(legacy.currency);
|
|
28533
28594
|
if (event.requiresRegistration === false) {
|
|
@@ -28564,22 +28625,22 @@ function resolveRuntimeEventPricing(event) {
|
|
|
28564
28625
|
function readCurrency(value) {
|
|
28565
28626
|
return typeof value === "string" && value.trim().length > 0 ? value : DEFAULT_EVENT_CURRENCY;
|
|
28566
28627
|
}
|
|
28567
|
-
function
|
|
28628
|
+
function isRecord4(value) {
|
|
28568
28629
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
28569
28630
|
}
|
|
28570
28631
|
function isPublicEventPricing(value) {
|
|
28571
|
-
if (!
|
|
28572
|
-
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course";
|
|
28632
|
+
if (!isRecord4(value) || typeof value.kind !== "string") return false;
|
|
28633
|
+
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course" || value.kind === "external";
|
|
28573
28634
|
}
|
|
28574
28635
|
function isPublicEventTicketType(value) {
|
|
28575
|
-
return
|
|
28636
|
+
return isRecord4(value) && typeof value.id === "string";
|
|
28576
28637
|
}
|
|
28577
28638
|
function readTicketTypePriceDisplay(value, currency) {
|
|
28578
28639
|
const display = readLegacyPriceDisplay(value, currency);
|
|
28579
|
-
return display.kind === "course" ? { kind: "unavailable", currency } : display;
|
|
28640
|
+
return display.kind === "course" || display.kind === "external" ? { kind: "unavailable", currency } : display;
|
|
28580
28641
|
}
|
|
28581
28642
|
function readLegacyPriceDisplay(value, currency) {
|
|
28582
|
-
if (!
|
|
28643
|
+
if (!isRecord4(value) || typeof value.kind !== "string") {
|
|
28583
28644
|
return { kind: "unavailable", currency };
|
|
28584
28645
|
}
|
|
28585
28646
|
const displayCurrency = readCurrency(value.currency);
|
|
@@ -28618,7 +28679,7 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
28618
28679
|
case "unavailable":
|
|
28619
28680
|
return { kind: "unavailable", currency: displayCurrency };
|
|
28620
28681
|
case "course":
|
|
28621
|
-
return
|
|
28682
|
+
return isRecord4(value.display) ? {
|
|
28622
28683
|
kind: "course",
|
|
28623
28684
|
display: readCoursePriceDisplay(value.display, displayCurrency)
|
|
28624
28685
|
} : {
|
|
@@ -28654,16 +28715,17 @@ function readAmount(value) {
|
|
|
28654
28715
|
}
|
|
28655
28716
|
|
|
28656
28717
|
// ../blocks/src/system/runtime/nodes/shared/contract-schemas.ts
|
|
28657
|
-
import { z as
|
|
28658
|
-
var previewStageSchema =
|
|
28659
|
-
var registrationButtonVariantSchema =
|
|
28660
|
-
var eventButtonVariantSchema =
|
|
28661
|
-
var eventLayoutSchema =
|
|
28662
|
-
var eventCalendarDisplayModeSchema =
|
|
28663
|
-
var
|
|
28664
|
-
var
|
|
28665
|
-
var
|
|
28666
|
-
var
|
|
28718
|
+
import { z as z46 } from "zod";
|
|
28719
|
+
var previewStageSchema = z46.enum(["preview", "published"]);
|
|
28720
|
+
var registrationButtonVariantSchema = z46.enum(["primary", "secondary", "outline"]);
|
|
28721
|
+
var eventButtonVariantSchema = z46.enum(["primary", "secondary", "outline", "link"]);
|
|
28722
|
+
var eventLayoutSchema = z46.enum(eventCalendarListLayoutValues);
|
|
28723
|
+
var eventCalendarDisplayModeSchema = z46.enum(eventCalendarDisplayModeValues);
|
|
28724
|
+
var eventCalendarDefaultViewSchema = z46.enum(eventCalendarDefaultViewValues);
|
|
28725
|
+
var columnOptionSchema = z46.enum(["2", "3", "4"]);
|
|
28726
|
+
var weekStartSchema = z46.enum(["sunday", "monday"]);
|
|
28727
|
+
var filterAutoShowSchema = z46.enum(["auto", "always", "never"]);
|
|
28728
|
+
var calendarTabViewsSchema = z46.enum(["both", "month", "week"]);
|
|
28667
28729
|
|
|
28668
28730
|
// ../blocks/src/system/runtime/nodes/event-registration/wizardSteps.ts
|
|
28669
28731
|
function getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep) {
|
|
@@ -28681,7 +28743,7 @@ function eventMatchesOccurrenceId(event, occurrenceId) {
|
|
|
28681
28743
|
function findPreSelectedEvent(input) {
|
|
28682
28744
|
const occurrenceContext = input.occurrenceContext;
|
|
28683
28745
|
if (!occurrenceContext) {
|
|
28684
|
-
return null;
|
|
28746
|
+
return input.scopedEvents.length === 1 ? input.scopedEvents[0] ?? null : null;
|
|
28685
28747
|
}
|
|
28686
28748
|
const contextDate = getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
28687
28749
|
startsAt: occurrenceContext.startsAt,
|
|
@@ -28704,7 +28766,7 @@ function resolveEventRequiresPayment(input) {
|
|
|
28704
28766
|
if (!input.event) {
|
|
28705
28767
|
return false;
|
|
28706
28768
|
}
|
|
28707
|
-
return publicEventPricingType(resolveRuntimeEventPricing(input.event))
|
|
28769
|
+
return publicEventPricingType(resolveRuntimeEventPricing(input.event)) === "paid";
|
|
28708
28770
|
}
|
|
28709
28771
|
|
|
28710
28772
|
// ../blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.ts
|
|
@@ -28723,68 +28785,72 @@ function toRegistrationEvents(events) {
|
|
|
28723
28785
|
// ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
28724
28786
|
var EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS = ["Date", "Tickets", "Details"];
|
|
28725
28787
|
var EVENT_REGISTRATION_SHELL_STEP_LABELS = ["Event", "Date", "Tickets", "Details", "Payment"];
|
|
28726
|
-
var contentEntrySchema =
|
|
28727
|
-
id:
|
|
28728
|
-
slug:
|
|
28729
|
-
contentTypeSlug:
|
|
28788
|
+
var contentEntrySchema = z47.object({
|
|
28789
|
+
id: z47.string(),
|
|
28790
|
+
slug: z47.string(),
|
|
28791
|
+
contentTypeSlug: z47.string()
|
|
28730
28792
|
});
|
|
28731
|
-
var eventRegistrationPublicEventSchema =
|
|
28793
|
+
var eventRegistrationPublicEventSchema = z47.preprocess(
|
|
28732
28794
|
normalizeEventRegistrationEventInput,
|
|
28733
28795
|
publicEventSchema
|
|
28734
28796
|
);
|
|
28735
|
-
var eventRegistrationSourceSchema =
|
|
28736
|
-
siteId:
|
|
28737
|
-
apiBaseUrl:
|
|
28738
|
-
portalToken:
|
|
28739
|
-
previewToken:
|
|
28797
|
+
var eventRegistrationSourceSchema = z47.object({
|
|
28798
|
+
siteId: z47.string().optional(),
|
|
28799
|
+
apiBaseUrl: z47.string().optional(),
|
|
28800
|
+
portalToken: z47.string().nullable().optional(),
|
|
28801
|
+
previewToken: z47.string().nullable().optional(),
|
|
28740
28802
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
28741
28803
|
contentEntry: contentEntrySchema.nullable().optional(),
|
|
28742
|
-
events:
|
|
28743
|
-
className:
|
|
28744
|
-
buttonText:
|
|
28745
|
-
maxTickets:
|
|
28746
|
-
showVenue:
|
|
28747
|
-
showCapacity:
|
|
28748
|
-
successMessage:
|
|
28749
|
-
waitlistMessage:
|
|
28804
|
+
events: z47.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
28805
|
+
className: z47.string().nullable().optional(),
|
|
28806
|
+
buttonText: z47.string().nullable().optional(),
|
|
28807
|
+
maxTickets: z47.string().nullable().optional(),
|
|
28808
|
+
showVenue: z47.boolean().optional(),
|
|
28809
|
+
showCapacity: z47.boolean().optional(),
|
|
28810
|
+
successMessage: z47.string().optional(),
|
|
28811
|
+
waitlistMessage: z47.string().optional(),
|
|
28750
28812
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
28751
|
-
overlayEnabled:
|
|
28752
|
-
spamProtectionEnabled:
|
|
28813
|
+
overlayEnabled: z47.boolean().optional(),
|
|
28814
|
+
spamProtectionEnabled: z47.boolean().optional(),
|
|
28753
28815
|
stage: previewStageSchema.optional(),
|
|
28754
|
-
supportEmail:
|
|
28755
|
-
|
|
28756
|
-
|
|
28757
|
-
|
|
28758
|
-
|
|
28759
|
-
|
|
28760
|
-
|
|
28761
|
-
|
|
28762
|
-
|
|
28763
|
-
|
|
28764
|
-
|
|
28765
|
-
|
|
28816
|
+
supportEmail: z47.string().optional(),
|
|
28817
|
+
sitePasses: publicPassProductCollectionSchema.nullable().optional(),
|
|
28818
|
+
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
|
|
28819
|
+
});
|
|
28820
|
+
var eventRegistrationDisplaySchema = z47.object({
|
|
28821
|
+
kind: z47.literal("event-registration"),
|
|
28822
|
+
state: z47.literal("generic-shell"),
|
|
28823
|
+
className: z47.string().nullable(),
|
|
28824
|
+
titleText: z47.string(),
|
|
28825
|
+
bodyText: z47.string(),
|
|
28826
|
+
stepLabels: z47.array(z47.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
28827
|
+
summaryButtonText: z47.string()
|
|
28828
|
+
});
|
|
28829
|
+
var eventRegistrationHydrationSchema = z47.object({
|
|
28766
28830
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
28767
28831
|
contentEntry: contentEntrySchema.nullable().optional(),
|
|
28768
|
-
events:
|
|
28769
|
-
maxTickets:
|
|
28770
|
-
showVenue:
|
|
28771
|
-
showCapacity:
|
|
28772
|
-
successMessage:
|
|
28773
|
-
waitlistMessage:
|
|
28832
|
+
events: z47.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
28833
|
+
maxTickets: z47.string().optional(),
|
|
28834
|
+
showVenue: z47.boolean().optional(),
|
|
28835
|
+
showCapacity: z47.boolean().optional(),
|
|
28836
|
+
successMessage: z47.string().optional(),
|
|
28837
|
+
waitlistMessage: z47.string().optional(),
|
|
28774
28838
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
28775
|
-
overlayEnabled:
|
|
28776
|
-
spamProtectionEnabled:
|
|
28777
|
-
supportEmail:
|
|
28839
|
+
overlayEnabled: z47.boolean().optional(),
|
|
28840
|
+
spamProtectionEnabled: z47.boolean().optional(),
|
|
28841
|
+
supportEmail: z47.string().optional(),
|
|
28842
|
+
sitePasses: publicPassProductCollectionSchema.nullable().optional(),
|
|
28843
|
+
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
|
|
28778
28844
|
});
|
|
28779
|
-
var eventRegistrationRenderSchema =
|
|
28845
|
+
var eventRegistrationRenderSchema = z47.object({
|
|
28780
28846
|
display: eventRegistrationDisplaySchema,
|
|
28781
28847
|
hydration: eventRegistrationHydrationSchema
|
|
28782
28848
|
});
|
|
28783
|
-
var eventRegistrationIslandMetaCodec = createZodCodec(
|
|
28784
|
-
siteId:
|
|
28785
|
-
apiBaseUrl:
|
|
28786
|
-
portalToken:
|
|
28787
|
-
previewToken:
|
|
28849
|
+
var eventRegistrationIslandMetaCodec = createZodCodec(z47.object({
|
|
28850
|
+
siteId: z47.string().optional(),
|
|
28851
|
+
apiBaseUrl: z47.string().optional(),
|
|
28852
|
+
portalToken: z47.string().nullable().optional(),
|
|
28853
|
+
previewToken: z47.string().nullable().optional(),
|
|
28788
28854
|
stage: previewStageSchema.optional()
|
|
28789
28855
|
}));
|
|
28790
28856
|
var eventRegistrationIslandMetaKeys = defineInteractiveIslandMetaKeys(
|
|
@@ -28890,20 +28956,23 @@ var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
28890
28956
|
buttonVariant: source.buttonVariant,
|
|
28891
28957
|
overlayEnabled: source.overlayEnabled,
|
|
28892
28958
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
28893
|
-
supportEmail: source.supportEmail
|
|
28959
|
+
supportEmail: source.supportEmail,
|
|
28960
|
+
sitePasses: source.sitePasses ?? null,
|
|
28961
|
+
siteMemberships: source.siteMemberships ?? null
|
|
28894
28962
|
}
|
|
28895
28963
|
})
|
|
28896
28964
|
});
|
|
28897
28965
|
function normalizeEventRegistrationEventInput(value) {
|
|
28898
|
-
if (!
|
|
28966
|
+
if (!isRecord5(value)) {
|
|
28899
28967
|
return value;
|
|
28900
28968
|
}
|
|
28901
28969
|
return {
|
|
28902
28970
|
...value,
|
|
28971
|
+
destination: resolveRuntimeEventDestination(value),
|
|
28903
28972
|
pricing: resolveRuntimeEventPricing(value)
|
|
28904
28973
|
};
|
|
28905
28974
|
}
|
|
28906
|
-
function
|
|
28975
|
+
function isRecord5(value) {
|
|
28907
28976
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
28908
28977
|
}
|
|
28909
28978
|
var eventRegistrationInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
@@ -29072,6 +29141,8 @@ var eventRegistrationManifest = createBlockManifest({
|
|
|
29072
29141
|
},
|
|
29073
29142
|
// Event data from loader
|
|
29074
29143
|
events: { $bind: { from: "data.events" } },
|
|
29144
|
+
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
29145
|
+
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
29075
29146
|
// Stage for preview mode (allows registering for draft events)
|
|
29076
29147
|
stage: {
|
|
29077
29148
|
$bind: { from: "$root.previewStage", fallback: "published" }
|
|
@@ -29090,7 +29161,9 @@ var eventRegistrationBlockDefinition = {
|
|
|
29090
29161
|
manifest: eventRegistrationManifest,
|
|
29091
29162
|
runtime: eventRegistrationBlockRuntime,
|
|
29092
29163
|
dataSchemas: {
|
|
29093
|
-
events:
|
|
29164
|
+
events: publicEventsArraySchema.optional(),
|
|
29165
|
+
sitePasses: publicPassProductCollectionSchema.optional(),
|
|
29166
|
+
siteMemberships: publicMembershipProductCollectionSchema.optional(),
|
|
29094
29167
|
occurrenceContext: occurrenceContextSchema.optional()
|
|
29095
29168
|
},
|
|
29096
29169
|
dataLoaders: {
|
|
@@ -29109,6 +29182,20 @@ var eventRegistrationBlockDefinition = {
|
|
|
29109
29182
|
entryId: { $bind: { from: "$root.contentEntry._entryId", fallback: "" } }
|
|
29110
29183
|
},
|
|
29111
29184
|
mode: "server"
|
|
29185
|
+
},
|
|
29186
|
+
sitePasses: {
|
|
29187
|
+
endpoint: "listPublicPasses",
|
|
29188
|
+
params: {
|
|
29189
|
+
siteId: { $bind: { from: "$root.siteId" } }
|
|
29190
|
+
},
|
|
29191
|
+
mode: "server"
|
|
29192
|
+
},
|
|
29193
|
+
siteMemberships: {
|
|
29194
|
+
endpoint: "listPublicMemberships",
|
|
29195
|
+
params: {
|
|
29196
|
+
siteId: { $bind: { from: "$root.siteId" } }
|
|
29197
|
+
},
|
|
29198
|
+
mode: "server"
|
|
29112
29199
|
}
|
|
29113
29200
|
}
|
|
29114
29201
|
};
|
|
@@ -29440,35 +29527,7 @@ var courseRegistrationBlockDefinition = {
|
|
|
29440
29527
|
};
|
|
29441
29528
|
|
|
29442
29529
|
// ../blocks/src/system/blocks/event-details.ts
|
|
29443
|
-
import { z as z50 } from "zod";
|
|
29444
|
-
|
|
29445
|
-
// ../blocks/src/system/blocks/shop.shared.ts
|
|
29446
29530
|
import { z as z49 } from "zod";
|
|
29447
|
-
var publicPassProductSchema = z49.object({
|
|
29448
|
-
id: z49.string(),
|
|
29449
|
-
productUseCase: z49.enum(["event_pass", "appointment_package"]).default("event_pass"),
|
|
29450
|
-
name: z49.string(),
|
|
29451
|
-
description: z49.string().nullable(),
|
|
29452
|
-
price: z49.number(),
|
|
29453
|
-
currency: z49.string(),
|
|
29454
|
-
creditsTotal: z49.number(),
|
|
29455
|
-
pricePerCredit: z49.number(),
|
|
29456
|
-
validDays: z49.number().nullable(),
|
|
29457
|
-
eligibleCategoryIds: z49.array(z49.string()),
|
|
29458
|
-
eligibleCategoryNames: z49.array(z49.string())
|
|
29459
|
-
});
|
|
29460
|
-
var publicMembershipProductSchema = z49.object({
|
|
29461
|
-
id: z49.string(),
|
|
29462
|
-
name: z49.string(),
|
|
29463
|
-
description: z49.string().nullable(),
|
|
29464
|
-
price: z49.number(),
|
|
29465
|
-
currency: z49.string(),
|
|
29466
|
-
billingInterval: z49.enum(["month", "year"]),
|
|
29467
|
-
eligibleCategoryIds: z49.array(z49.string()),
|
|
29468
|
-
eligibleCategoryNames: z49.array(z49.string())
|
|
29469
|
-
});
|
|
29470
|
-
|
|
29471
|
-
// ../blocks/src/system/blocks/event-details.ts
|
|
29472
29531
|
var eventDetailsManifest = createBlockManifest({
|
|
29473
29532
|
id: "block.event-details",
|
|
29474
29533
|
version: "1.0.0",
|
|
@@ -29600,40 +29659,40 @@ var eventDetailsManifest = createBlockManifest({
|
|
|
29600
29659
|
})
|
|
29601
29660
|
]
|
|
29602
29661
|
});
|
|
29603
|
-
var occurrenceContextSchema2 =
|
|
29604
|
-
id:
|
|
29605
|
-
seriesId:
|
|
29606
|
-
startsAt:
|
|
29607
|
-
endsAt:
|
|
29608
|
-
timeZone:
|
|
29609
|
-
capacityOverride:
|
|
29610
|
-
overrides:
|
|
29662
|
+
var occurrenceContextSchema2 = z49.object({
|
|
29663
|
+
id: z49.string(),
|
|
29664
|
+
seriesId: z49.string(),
|
|
29665
|
+
startsAt: z49.string(),
|
|
29666
|
+
endsAt: z49.string(),
|
|
29667
|
+
timeZone: z49.string(),
|
|
29668
|
+
capacityOverride: z49.number().nullable().optional(),
|
|
29669
|
+
overrides: z49.record(z49.string(), z49.unknown()).nullable().optional()
|
|
29611
29670
|
}).nullable();
|
|
29612
|
-
var eventAutoApplyDiscountPreviewBaseSchema =
|
|
29613
|
-
id:
|
|
29614
|
-
publicLabel:
|
|
29615
|
-
description:
|
|
29616
|
-
minTicketsRequired:
|
|
29671
|
+
var eventAutoApplyDiscountPreviewBaseSchema = z49.object({
|
|
29672
|
+
id: z49.string(),
|
|
29673
|
+
publicLabel: z49.string(),
|
|
29674
|
+
description: z49.string().nullable(),
|
|
29675
|
+
minTicketsRequired: z49.number().nullable()
|
|
29617
29676
|
});
|
|
29618
|
-
var eventAutoApplyDiscountPreviewSchema =
|
|
29677
|
+
var eventAutoApplyDiscountPreviewSchema = z49.discriminatedUnion("discountType", [
|
|
29619
29678
|
eventAutoApplyDiscountPreviewBaseSchema.extend({
|
|
29620
|
-
discountType:
|
|
29621
|
-
discountPercent:
|
|
29622
|
-
discountAmountCents:
|
|
29679
|
+
discountType: z49.literal("percent"),
|
|
29680
|
+
discountPercent: z49.number(),
|
|
29681
|
+
discountAmountCents: z49.null()
|
|
29623
29682
|
}),
|
|
29624
29683
|
eventAutoApplyDiscountPreviewBaseSchema.extend({
|
|
29625
|
-
discountType:
|
|
29626
|
-
discountPercent:
|
|
29627
|
-
discountAmountCents:
|
|
29684
|
+
discountType: z49.literal("fixed"),
|
|
29685
|
+
discountPercent: z49.null(),
|
|
29686
|
+
discountAmountCents: z49.number()
|
|
29628
29687
|
})
|
|
29629
29688
|
]);
|
|
29630
29689
|
var eventDetailsBlockDefinition = {
|
|
29631
29690
|
manifest: eventDetailsManifest,
|
|
29632
29691
|
dataSchemas: {
|
|
29633
|
-
eventDetailsData:
|
|
29692
|
+
eventDetailsData: z49.object({
|
|
29634
29693
|
events: publicEventsArraySchema,
|
|
29635
|
-
sitePasses:
|
|
29636
|
-
siteMemberships:
|
|
29694
|
+
sitePasses: publicPassProductCollectionSchema,
|
|
29695
|
+
siteMemberships: publicMembershipProductCollectionSchema,
|
|
29637
29696
|
autoApplyDiscount: eventAutoApplyDiscountPreviewSchema.nullable().optional().default(null)
|
|
29638
29697
|
}).optional(),
|
|
29639
29698
|
occurrenceContext: occurrenceContextSchema2.optional()
|
|
@@ -29957,7 +30016,7 @@ var eventSpotlightBlockDefinition = {
|
|
|
29957
30016
|
};
|
|
29958
30017
|
|
|
29959
30018
|
// ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
29960
|
-
import { z as
|
|
30019
|
+
import { z as z51 } from "zod";
|
|
29961
30020
|
|
|
29962
30021
|
// ../blocks/src/system/runtime/nodes/events/shared/utils.ts
|
|
29963
30022
|
var COLUMN_CLASSES = {
|
|
@@ -30065,16 +30124,16 @@ function computeMediaTransformStyle(value, style, targetAspectRatio, options) {
|
|
|
30065
30124
|
}
|
|
30066
30125
|
|
|
30067
30126
|
// ../blocks/src/system/runtime/nodes/events/shared/listOptions.ts
|
|
30068
|
-
import { z as
|
|
30127
|
+
import { z as z50 } from "zod";
|
|
30069
30128
|
var eventPageSizeValues = [3, 6, 10, 12, 20, 24, 30];
|
|
30070
|
-
var eventPageSizeSchema =
|
|
30071
|
-
|
|
30072
|
-
|
|
30073
|
-
|
|
30074
|
-
|
|
30075
|
-
|
|
30076
|
-
|
|
30077
|
-
|
|
30129
|
+
var eventPageSizeSchema = z50.union([
|
|
30130
|
+
z50.literal(3),
|
|
30131
|
+
z50.literal(6),
|
|
30132
|
+
z50.literal(10),
|
|
30133
|
+
z50.literal(12),
|
|
30134
|
+
z50.literal(20),
|
|
30135
|
+
z50.literal(24),
|
|
30136
|
+
z50.literal(30)
|
|
30078
30137
|
]);
|
|
30079
30138
|
var eventPageSizeSet = new Set(eventPageSizeValues);
|
|
30080
30139
|
function resolveEventPageSize(value, fallback = 12) {
|
|
@@ -30084,15 +30143,15 @@ function resolveEventPageSize(value, fallback = 12) {
|
|
|
30084
30143
|
function resolveEventCalendarListPageSize(input) {
|
|
30085
30144
|
return resolveEventPageSize(input.eventsPerPage);
|
|
30086
30145
|
}
|
|
30087
|
-
var eventListPaginationActionSchema =
|
|
30088
|
-
|
|
30089
|
-
kind:
|
|
30090
|
-
label:
|
|
30146
|
+
var eventListPaginationActionSchema = z50.discriminatedUnion("kind", [
|
|
30147
|
+
z50.object({
|
|
30148
|
+
kind: z50.literal("loadMore"),
|
|
30149
|
+
label: z50.string()
|
|
30091
30150
|
}),
|
|
30092
|
-
|
|
30093
|
-
kind:
|
|
30094
|
-
label:
|
|
30095
|
-
href:
|
|
30151
|
+
z50.object({
|
|
30152
|
+
kind: z50.literal("seeAllLink"),
|
|
30153
|
+
label: z50.string(),
|
|
30154
|
+
href: z50.string()
|
|
30096
30155
|
})
|
|
30097
30156
|
]);
|
|
30098
30157
|
function resolveEventListPaginationAction(input) {
|
|
@@ -30105,89 +30164,89 @@ function resolveEventListPaginationAction(input) {
|
|
|
30105
30164
|
}
|
|
30106
30165
|
|
|
30107
30166
|
// ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
30108
|
-
var legacyEventCardVariantSchema =
|
|
30109
|
-
var eventCardVariantInputSchema =
|
|
30167
|
+
var legacyEventCardVariantSchema = z51.enum(["variant1", "variant2"]);
|
|
30168
|
+
var eventCardVariantInputSchema = z51.union([
|
|
30110
30169
|
cardVariantRoleSchema,
|
|
30111
30170
|
legacyEventCardVariantSchema
|
|
30112
30171
|
]);
|
|
30113
|
-
var cardOrientationSchema =
|
|
30114
|
-
var eventBlockKindSchema =
|
|
30115
|
-
var eventSurfaceScopeSchema =
|
|
30116
|
-
var eventScheduleScopeSchema2 =
|
|
30117
|
-
var eventListingSourceSchema =
|
|
30118
|
-
events:
|
|
30119
|
-
siteId:
|
|
30120
|
-
apiBaseUrl:
|
|
30172
|
+
var cardOrientationSchema = z51.enum(["vertical", "horizontal"]);
|
|
30173
|
+
var eventBlockKindSchema = z51.enum(eventBlockKindValues);
|
|
30174
|
+
var eventSurfaceScopeSchema = z51.enum(eventSurfaceScopeValues);
|
|
30175
|
+
var eventScheduleScopeSchema2 = z51.enum(eventScheduleScopeValues);
|
|
30176
|
+
var eventListingSourceSchema = z51.object({
|
|
30177
|
+
events: z51.array(publicEventSchema).nullable().optional(),
|
|
30178
|
+
siteId: z51.string(),
|
|
30179
|
+
apiBaseUrl: z51.string().optional(),
|
|
30121
30180
|
stage: previewStageSchema.optional(),
|
|
30122
30181
|
layout: eventLayoutSchema.optional(),
|
|
30123
30182
|
columns: columnOptionSchema.optional(),
|
|
30124
|
-
eventsPerPage:
|
|
30125
|
-
paginationMode:
|
|
30126
|
-
seeAllUrl:
|
|
30127
|
-
loadMoreText:
|
|
30183
|
+
eventsPerPage: z51.string().optional(),
|
|
30184
|
+
paginationMode: z51.enum(["loadMore", "seeAllLink"]).optional(),
|
|
30185
|
+
seeAllUrl: z51.string().optional(),
|
|
30186
|
+
loadMoreText: z51.string().optional(),
|
|
30128
30187
|
cardVariant: eventCardVariantInputSchema.optional(),
|
|
30129
30188
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
30130
|
-
buttonText:
|
|
30131
|
-
showVenue:
|
|
30132
|
-
showMap:
|
|
30133
|
-
showCapacity:
|
|
30134
|
-
emptyMessage:
|
|
30135
|
-
className:
|
|
30136
|
-
showFilters:
|
|
30189
|
+
buttonText: z51.string().optional(),
|
|
30190
|
+
showVenue: z51.boolean().optional(),
|
|
30191
|
+
showMap: z51.boolean().optional(),
|
|
30192
|
+
showCapacity: z51.boolean().optional(),
|
|
30193
|
+
emptyMessage: z51.string().optional(),
|
|
30194
|
+
className: z51.string().optional(),
|
|
30195
|
+
showFilters: z51.boolean().nullable().optional(),
|
|
30137
30196
|
showCategoryFilter: filterAutoShowSchema.optional(),
|
|
30138
|
-
showVenueFilter:
|
|
30139
|
-
showStaffFilter:
|
|
30197
|
+
showVenueFilter: z51.boolean().nullable().optional(),
|
|
30198
|
+
showStaffFilter: z51.boolean().nullable().optional(),
|
|
30140
30199
|
eventKind: eventBlockKindSchema.nullable().optional(),
|
|
30141
30200
|
eventSurface: eventSurfaceScopeSchema.nullable().optional(),
|
|
30142
|
-
filterEventPresets:
|
|
30201
|
+
filterEventPresets: z51.union([z51.string(), z51.array(z51.string())]).nullable().optional(),
|
|
30143
30202
|
scheduleScope: eventScheduleScopeSchema2.nullable().optional(),
|
|
30144
|
-
filterCategoryIds:
|
|
30145
|
-
filterStaffMemberId:
|
|
30146
|
-
filterVenueId:
|
|
30203
|
+
filterCategoryIds: z51.string().nullable().optional(),
|
|
30204
|
+
filterStaffMemberId: z51.string().nullable().optional(),
|
|
30205
|
+
filterVenueId: z51.string().nullable().optional()
|
|
30147
30206
|
});
|
|
30148
|
-
var eventListingDisplaySchema =
|
|
30149
|
-
kind:
|
|
30150
|
-
state:
|
|
30207
|
+
var eventListingDisplaySchema = z51.object({
|
|
30208
|
+
kind: z51.literal("event-listing"),
|
|
30209
|
+
state: z51.enum(["loading", "empty", "ready"]),
|
|
30151
30210
|
listLayout: eventLayoutSchema,
|
|
30152
|
-
className:
|
|
30153
|
-
emptyMessage:
|
|
30154
|
-
loadingMessage:
|
|
30155
|
-
containerClass:
|
|
30211
|
+
className: z51.string().nullable(),
|
|
30212
|
+
emptyMessage: z51.string(),
|
|
30213
|
+
loadingMessage: z51.string(),
|
|
30214
|
+
containerClass: z51.string(),
|
|
30156
30215
|
cardVariant: cardVariantRoleSchema,
|
|
30157
30216
|
buttonVariant: eventButtonVariantSchema,
|
|
30158
|
-
buttonText:
|
|
30159
|
-
showVenue:
|
|
30160
|
-
showMap:
|
|
30161
|
-
showCapacity:
|
|
30217
|
+
buttonText: z51.string(),
|
|
30218
|
+
showVenue: z51.boolean(),
|
|
30219
|
+
showMap: z51.boolean(),
|
|
30220
|
+
showCapacity: z51.boolean(),
|
|
30162
30221
|
orientation: cardOrientationSchema,
|
|
30163
|
-
events:
|
|
30222
|
+
events: z51.array(publicEventSchema)
|
|
30164
30223
|
});
|
|
30165
|
-
var eventListingHydrationSchema =
|
|
30166
|
-
siteId:
|
|
30224
|
+
var eventListingHydrationSchema = z51.object({
|
|
30225
|
+
siteId: z51.string(),
|
|
30167
30226
|
stage: previewStageSchema.optional(),
|
|
30168
30227
|
eventsPerPage: eventPageSizeSchema,
|
|
30169
30228
|
paginationAction: eventListPaginationActionSchema,
|
|
30170
|
-
showFilters:
|
|
30229
|
+
showFilters: z51.boolean(),
|
|
30171
30230
|
showCategoryFilter: filterAutoShowSchema,
|
|
30172
|
-
showVenueFilter:
|
|
30173
|
-
showStaffFilter:
|
|
30231
|
+
showVenueFilter: z51.boolean(),
|
|
30232
|
+
showStaffFilter: z51.boolean(),
|
|
30174
30233
|
eventKind: eventBlockKindSchema,
|
|
30175
30234
|
eventSurface: eventSurfaceScopeSchema,
|
|
30176
|
-
filterEventPresets:
|
|
30235
|
+
filterEventPresets: z51.string().nullable(),
|
|
30177
30236
|
scheduleScope: eventScheduleScopeSchema2,
|
|
30178
|
-
filterCategoryIds:
|
|
30179
|
-
filterStaffMemberId:
|
|
30180
|
-
filterVenueId:
|
|
30181
|
-
fetchInitialEventsOnMount:
|
|
30237
|
+
filterCategoryIds: z51.string().nullable().optional(),
|
|
30238
|
+
filterStaffMemberId: z51.string().nullable().optional(),
|
|
30239
|
+
filterVenueId: z51.string().nullable().optional(),
|
|
30240
|
+
fetchInitialEventsOnMount: z51.boolean()
|
|
30182
30241
|
});
|
|
30183
|
-
var eventListingRenderSchema =
|
|
30242
|
+
var eventListingRenderSchema = z51.object({
|
|
30184
30243
|
display: eventListingDisplaySchema,
|
|
30185
30244
|
hydration: eventListingHydrationSchema
|
|
30186
30245
|
});
|
|
30187
30246
|
var eventListingIslandMetaCodec = createZodCodec(
|
|
30188
|
-
|
|
30189
|
-
siteId:
|
|
30190
|
-
apiBaseUrl:
|
|
30247
|
+
z51.object({
|
|
30248
|
+
siteId: z51.string(),
|
|
30249
|
+
apiBaseUrl: z51.string().optional(),
|
|
30191
30250
|
stage: previewStageSchema.optional()
|
|
30192
30251
|
})
|
|
30193
30252
|
);
|
|
@@ -30554,15 +30613,15 @@ var eventListingBlockDefinition = {
|
|
|
30554
30613
|
};
|
|
30555
30614
|
|
|
30556
30615
|
// ../blocks/src/system/runtime/nodes/events/EventCalendar.interactive.ts
|
|
30557
|
-
import { z as
|
|
30558
|
-
var eventBlockKindSchema2 =
|
|
30559
|
-
var eventSurfaceScopeSchema2 =
|
|
30560
|
-
var eventScheduleScopeSchema3 =
|
|
30561
|
-
var eventCalendarSourceSchema =
|
|
30616
|
+
import { z as z52 } from "zod";
|
|
30617
|
+
var eventBlockKindSchema2 = z52.enum(eventBlockKindValues);
|
|
30618
|
+
var eventSurfaceScopeSchema2 = z52.enum(eventSurfaceScopeValues);
|
|
30619
|
+
var eventScheduleScopeSchema3 = z52.enum(eventScheduleScopeValues);
|
|
30620
|
+
var eventCalendarSourceSchema = z52.object(
|
|
30562
30621
|
{
|
|
30563
|
-
events:
|
|
30564
|
-
siteId:
|
|
30565
|
-
apiBaseUrl:
|
|
30622
|
+
events: z52.array(publicEventSchema).nullable().optional(),
|
|
30623
|
+
siteId: z52.string(),
|
|
30624
|
+
apiBaseUrl: z52.string().optional(),
|
|
30566
30625
|
stage: previewStageSchema.optional(),
|
|
30567
30626
|
variant: eventCalendarDisplayModeSchema.nullable().optional(),
|
|
30568
30627
|
displayMode: eventCalendarDisplayModeSchema.nullable().optional(),
|
|
@@ -30570,78 +30629,80 @@ var eventCalendarSourceSchema = z53.object(
|
|
|
30570
30629
|
listColumns: columnOptionSchema.optional(),
|
|
30571
30630
|
layout: eventLayoutSchema.optional(),
|
|
30572
30631
|
columns: columnOptionSchema.optional(),
|
|
30573
|
-
eventsPerPage:
|
|
30574
|
-
paginationMode:
|
|
30575
|
-
seeAllUrl:
|
|
30576
|
-
loadMoreText:
|
|
30632
|
+
eventsPerPage: z52.string().optional(),
|
|
30633
|
+
paginationMode: z52.enum(["loadMore", "seeAllLink"]).optional(),
|
|
30634
|
+
seeAllUrl: z52.string().optional(),
|
|
30635
|
+
loadMoreText: z52.string().optional(),
|
|
30577
30636
|
startOfWeek: weekStartSchema.optional(),
|
|
30578
30637
|
calendarTabViews: calendarTabViewsSchema.optional(),
|
|
30579
|
-
|
|
30638
|
+
defaultCalendarView: eventCalendarDefaultViewSchema.optional(),
|
|
30639
|
+
showFilters: z52.boolean().nullable().optional(),
|
|
30580
30640
|
showCategoryFilter: filterAutoShowSchema.optional(),
|
|
30581
|
-
showVenueFilter:
|
|
30582
|
-
showStaffFilter:
|
|
30641
|
+
showVenueFilter: z52.boolean().nullable().optional(),
|
|
30642
|
+
showStaffFilter: z52.boolean().nullable().optional(),
|
|
30583
30643
|
kind: eventBlockKindSchema2.nullable().optional(),
|
|
30584
30644
|
eventSurface: eventSurfaceScopeSchema2.nullable().optional(),
|
|
30585
|
-
filterEventPresets:
|
|
30645
|
+
filterEventPresets: z52.union([z52.string(), z52.array(z52.string())]).nullable().optional(),
|
|
30586
30646
|
scheduleScope: eventScheduleScopeSchema3.nullable().optional(),
|
|
30587
|
-
filterCategoryIds:
|
|
30588
|
-
filterStaffMemberId:
|
|
30589
|
-
filterVenueId:
|
|
30647
|
+
filterCategoryIds: z52.union([z52.string(), z52.array(z52.string())]).nullable().optional(),
|
|
30648
|
+
filterStaffMemberId: z52.string().nullable().optional(),
|
|
30649
|
+
filterVenueId: z52.string().nullable().optional(),
|
|
30590
30650
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
30591
|
-
buttonText:
|
|
30592
|
-
showVenue:
|
|
30593
|
-
showMap:
|
|
30594
|
-
showCapacity:
|
|
30595
|
-
emptyMessage:
|
|
30596
|
-
className:
|
|
30651
|
+
buttonText: z52.string().optional(),
|
|
30652
|
+
showVenue: z52.boolean().nullable().optional(),
|
|
30653
|
+
showMap: z52.boolean().nullable().optional(),
|
|
30654
|
+
showCapacity: z52.boolean().nullable().optional(),
|
|
30655
|
+
emptyMessage: z52.string().optional(),
|
|
30656
|
+
className: z52.string().optional()
|
|
30597
30657
|
}
|
|
30598
30658
|
);
|
|
30599
|
-
var eventCalendarDisplaySchema =
|
|
30600
|
-
kind:
|
|
30659
|
+
var eventCalendarDisplaySchema = z52.object({
|
|
30660
|
+
kind: z52.literal("event-calendar"),
|
|
30601
30661
|
displayMode: eventCalendarDisplayModeSchema,
|
|
30602
|
-
className:
|
|
30603
|
-
events:
|
|
30662
|
+
className: z52.string().nullable(),
|
|
30663
|
+
events: z52.array(publicEventSchema),
|
|
30604
30664
|
listLayout: eventLayoutSchema,
|
|
30605
30665
|
listColumns: columnOptionSchema,
|
|
30606
30666
|
eventsPerPage: eventPageSizeSchema,
|
|
30607
30667
|
paginationAction: eventListPaginationActionSchema,
|
|
30608
30668
|
startOfWeek: weekStartSchema,
|
|
30609
30669
|
calendarTabViews: calendarTabViewsSchema,
|
|
30610
|
-
|
|
30670
|
+
defaultCalendarView: eventCalendarDefaultViewSchema,
|
|
30671
|
+
showFilters: z52.boolean(),
|
|
30611
30672
|
showCategoryFilter: filterAutoShowSchema,
|
|
30612
|
-
showVenueFilter:
|
|
30613
|
-
showStaffFilter:
|
|
30673
|
+
showVenueFilter: z52.boolean(),
|
|
30674
|
+
showStaffFilter: z52.boolean(),
|
|
30614
30675
|
eventKind: eventBlockKindSchema2,
|
|
30615
30676
|
eventSurface: eventSurfaceScopeSchema2,
|
|
30616
|
-
filterEventPresets:
|
|
30677
|
+
filterEventPresets: z52.string().nullable(),
|
|
30617
30678
|
scheduleScope: eventScheduleScopeSchema3,
|
|
30618
|
-
filterCategoryIds:
|
|
30619
|
-
filterStaffMemberId:
|
|
30620
|
-
filterVenueId:
|
|
30679
|
+
filterCategoryIds: z52.string().nullable(),
|
|
30680
|
+
filterStaffMemberId: z52.string().nullable(),
|
|
30681
|
+
filterVenueId: z52.string().nullable(),
|
|
30621
30682
|
buttonVariant: eventButtonVariantSchema,
|
|
30622
|
-
buttonText:
|
|
30623
|
-
showVenue:
|
|
30624
|
-
showMap:
|
|
30625
|
-
showCapacity:
|
|
30626
|
-
emptyMessage:
|
|
30627
|
-
});
|
|
30628
|
-
var eventCalendarHydrationSchema =
|
|
30629
|
-
siteId:
|
|
30683
|
+
buttonText: z52.string(),
|
|
30684
|
+
showVenue: z52.boolean(),
|
|
30685
|
+
showMap: z52.boolean(),
|
|
30686
|
+
showCapacity: z52.boolean(),
|
|
30687
|
+
emptyMessage: z52.string()
|
|
30688
|
+
});
|
|
30689
|
+
var eventCalendarHydrationSchema = z52.object({
|
|
30690
|
+
siteId: z52.string(),
|
|
30630
30691
|
stage: previewStageSchema.optional(),
|
|
30631
|
-
prefetchedEvents:
|
|
30692
|
+
prefetchedEvents: z52.boolean(),
|
|
30632
30693
|
eventKind: eventBlockKindSchema2,
|
|
30633
30694
|
eventSurface: eventSurfaceScopeSchema2,
|
|
30634
|
-
filterEventPresets:
|
|
30695
|
+
filterEventPresets: z52.string().nullable(),
|
|
30635
30696
|
scheduleScope: eventScheduleScopeSchema3
|
|
30636
30697
|
});
|
|
30637
|
-
var eventCalendarRenderSchema =
|
|
30698
|
+
var eventCalendarRenderSchema = z52.object({
|
|
30638
30699
|
display: eventCalendarDisplaySchema,
|
|
30639
30700
|
hydration: eventCalendarHydrationSchema
|
|
30640
30701
|
});
|
|
30641
30702
|
var eventCalendarIslandMetaCodec = createZodCodec(
|
|
30642
|
-
|
|
30643
|
-
siteId:
|
|
30644
|
-
apiBaseUrl:
|
|
30703
|
+
z52.object({
|
|
30704
|
+
siteId: z52.string(),
|
|
30705
|
+
apiBaseUrl: z52.string().optional(),
|
|
30645
30706
|
stage: previewStageSchema.optional()
|
|
30646
30707
|
})
|
|
30647
30708
|
);
|
|
@@ -30671,6 +30732,7 @@ function buildEventCalendarDisplay(source) {
|
|
|
30671
30732
|
}),
|
|
30672
30733
|
startOfWeek: source.startOfWeek ?? "monday",
|
|
30673
30734
|
calendarTabViews: source.calendarTabViews ?? "both",
|
|
30735
|
+
defaultCalendarView: source.defaultCalendarView ?? "month",
|
|
30674
30736
|
showFilters: source.showFilters ?? true,
|
|
30675
30737
|
showCategoryFilter: source.showCategoryFilter ?? "auto",
|
|
30676
30738
|
showVenueFilter: source.showVenueFilter ?? false,
|
|
@@ -30733,6 +30795,9 @@ function normalizeEventCalendarContent(content) {
|
|
|
30733
30795
|
...variant ? { variant } : {},
|
|
30734
30796
|
displayMode: normalizeEventCalendarDisplayMode(record.displayMode),
|
|
30735
30797
|
listLayout: normalizeEventCalendarListLayout(record.listLayout),
|
|
30798
|
+
defaultCalendarView: normalizeEventCalendarDefaultView(
|
|
30799
|
+
record.defaultCalendarView
|
|
30800
|
+
),
|
|
30736
30801
|
kind,
|
|
30737
30802
|
eventSurface: normalizeEventSurfaceScope(record.eventSurface),
|
|
30738
30803
|
filterEventPresets: normalizeEventSurfacePresets(record.filterEventPresets),
|
|
@@ -30750,6 +30815,9 @@ function normalizeEventCalendarDisplayMode(value) {
|
|
|
30750
30815
|
function normalizeEventCalendarListLayout(value) {
|
|
30751
30816
|
return isEventCalendarListLayout(value) ? value : void 0;
|
|
30752
30817
|
}
|
|
30818
|
+
function normalizeEventCalendarDefaultView(value) {
|
|
30819
|
+
return isEventCalendarDefaultView(value) ? value : void 0;
|
|
30820
|
+
}
|
|
30753
30821
|
var eventCalendarLayout = [
|
|
30754
30822
|
styledSection({
|
|
30755
30823
|
children: sectionContainer(
|
|
@@ -30809,6 +30877,9 @@ var eventCalendarLayout = [
|
|
|
30809
30877
|
calendarTabViews: {
|
|
30810
30878
|
$bind: { from: "content.calendarTabViews", fallback: "both" }
|
|
30811
30879
|
},
|
|
30880
|
+
defaultCalendarView: {
|
|
30881
|
+
$bind: { from: "content.defaultCalendarView", fallback: "month" }
|
|
30882
|
+
},
|
|
30812
30883
|
// Filtering options
|
|
30813
30884
|
showFilters: {
|
|
30814
30885
|
$bind: { from: "content.showFilters", fallback: true }
|
|
@@ -30875,8 +30946,7 @@ var eventCalendarAdditionalFields = [
|
|
|
30875
30946
|
defaultValue: "combined",
|
|
30876
30947
|
options: [
|
|
30877
30948
|
{ value: "combined", label: "Combined (List + Calendar tabs)" },
|
|
30878
|
-
{ value: "
|
|
30879
|
-
{ value: "week", label: "Week agenda" },
|
|
30949
|
+
{ value: "calendar", label: "Calendar" },
|
|
30880
30950
|
{ value: "timetable", label: "Timetable" },
|
|
30881
30951
|
{ value: "list", label: "List" }
|
|
30882
30952
|
],
|
|
@@ -30915,7 +30985,12 @@ var eventCalendarAdditionalFields = [
|
|
|
30915
30985
|
],
|
|
30916
30986
|
ui: {
|
|
30917
30987
|
intent: "display",
|
|
30918
|
-
visibleWhen: {
|
|
30988
|
+
visibleWhen: {
|
|
30989
|
+
allOf: [
|
|
30990
|
+
{ field: "variant", oneOf: ["combined", "list"] },
|
|
30991
|
+
{ field: "listLayout", equals: "grid" }
|
|
30992
|
+
]
|
|
30993
|
+
}
|
|
30919
30994
|
}
|
|
30920
30995
|
},
|
|
30921
30996
|
{
|
|
@@ -30963,7 +31038,12 @@ var eventCalendarAdditionalFields = [
|
|
|
30963
31038
|
required: false,
|
|
30964
31039
|
ui: {
|
|
30965
31040
|
intent: "display",
|
|
30966
|
-
visibleWhen: {
|
|
31041
|
+
visibleWhen: {
|
|
31042
|
+
allOf: [
|
|
31043
|
+
{ field: "variant", oneOf: ["combined", "list"] },
|
|
31044
|
+
{ field: "paginationMode", equals: "seeAllLink" }
|
|
31045
|
+
]
|
|
31046
|
+
}
|
|
30967
31047
|
}
|
|
30968
31048
|
},
|
|
30969
31049
|
{
|
|
@@ -30996,7 +31076,7 @@ var eventCalendarAdditionalFields = [
|
|
|
30996
31076
|
intent: "display",
|
|
30997
31077
|
visibleWhen: {
|
|
30998
31078
|
field: "variant",
|
|
30999
|
-
oneOf: ["combined", "
|
|
31079
|
+
oneOf: ["combined", "calendar", "timetable"]
|
|
31000
31080
|
}
|
|
31001
31081
|
}
|
|
31002
31082
|
},
|
|
@@ -31019,6 +31099,33 @@ var eventCalendarAdditionalFields = [
|
|
|
31019
31099
|
visibleWhen: { field: "variant", equals: "combined" }
|
|
31020
31100
|
}
|
|
31021
31101
|
},
|
|
31102
|
+
{
|
|
31103
|
+
id: "defaultCalendarView",
|
|
31104
|
+
type: "select",
|
|
31105
|
+
label: "Calendar view",
|
|
31106
|
+
description: "Choose the standalone calendar view, or the first view in combined mode",
|
|
31107
|
+
required: false,
|
|
31108
|
+
multiple: false,
|
|
31109
|
+
defaultValue: "month",
|
|
31110
|
+
options: [
|
|
31111
|
+
{ value: "month", label: "Month" },
|
|
31112
|
+
{ value: "week", label: "Week" }
|
|
31113
|
+
],
|
|
31114
|
+
ui: {
|
|
31115
|
+
intent: "display",
|
|
31116
|
+
visibleWhen: {
|
|
31117
|
+
anyOf: [
|
|
31118
|
+
{ field: "variant", equals: "calendar" },
|
|
31119
|
+
{
|
|
31120
|
+
allOf: [
|
|
31121
|
+
{ field: "variant", equals: "combined" },
|
|
31122
|
+
{ field: "calendarTabViews", equals: "both" }
|
|
31123
|
+
]
|
|
31124
|
+
}
|
|
31125
|
+
]
|
|
31126
|
+
}
|
|
31127
|
+
}
|
|
31128
|
+
},
|
|
31022
31129
|
// Filtering options
|
|
31023
31130
|
{
|
|
31024
31131
|
id: "kind",
|
|
@@ -31046,7 +31153,7 @@ var eventCalendarAdditionalFields = [
|
|
|
31046
31153
|
intent: "display",
|
|
31047
31154
|
visibleWhen: {
|
|
31048
31155
|
field: "variant",
|
|
31049
|
-
oneOf: ["combined", "list", "timetable"]
|
|
31156
|
+
oneOf: ["combined", "calendar", "list", "timetable"]
|
|
31050
31157
|
}
|
|
31051
31158
|
}
|
|
31052
31159
|
},
|
|
@@ -31066,8 +31173,10 @@ var eventCalendarAdditionalFields = [
|
|
|
31066
31173
|
ui: {
|
|
31067
31174
|
intent: "display",
|
|
31068
31175
|
visibleWhen: {
|
|
31069
|
-
|
|
31070
|
-
|
|
31176
|
+
allOf: [
|
|
31177
|
+
{ field: "variant", oneOf: ["combined", "calendar", "list", "timetable"] },
|
|
31178
|
+
{ field: "showFilters", equals: true }
|
|
31179
|
+
]
|
|
31071
31180
|
}
|
|
31072
31181
|
}
|
|
31073
31182
|
},
|
|
@@ -31081,8 +31190,10 @@ var eventCalendarAdditionalFields = [
|
|
|
31081
31190
|
ui: {
|
|
31082
31191
|
intent: "display",
|
|
31083
31192
|
visibleWhen: {
|
|
31084
|
-
|
|
31085
|
-
|
|
31193
|
+
allOf: [
|
|
31194
|
+
{ field: "variant", oneOf: ["combined", "calendar", "list", "timetable"] },
|
|
31195
|
+
{ field: "showFilters", equals: true }
|
|
31196
|
+
]
|
|
31086
31197
|
}
|
|
31087
31198
|
}
|
|
31088
31199
|
},
|
|
@@ -31096,8 +31207,10 @@ var eventCalendarAdditionalFields = [
|
|
|
31096
31207
|
ui: {
|
|
31097
31208
|
intent: "display",
|
|
31098
31209
|
visibleWhen: {
|
|
31099
|
-
|
|
31100
|
-
|
|
31210
|
+
allOf: [
|
|
31211
|
+
{ field: "variant", oneOf: ["combined", "calendar", "list", "timetable"] },
|
|
31212
|
+
{ field: "showFilters", equals: true }
|
|
31213
|
+
]
|
|
31101
31214
|
}
|
|
31102
31215
|
}
|
|
31103
31216
|
},
|
|
@@ -31111,8 +31224,15 @@ var eventCalendarAdditionalFields = [
|
|
|
31111
31224
|
ui: {
|
|
31112
31225
|
intent: "display",
|
|
31113
31226
|
visibleWhen: {
|
|
31114
|
-
|
|
31115
|
-
|
|
31227
|
+
anyOf: [
|
|
31228
|
+
{ field: "variant", oneOf: ["combined", "list", "timetable"] },
|
|
31229
|
+
{
|
|
31230
|
+
allOf: [
|
|
31231
|
+
{ field: "variant", equals: "calendar" },
|
|
31232
|
+
{ field: "defaultCalendarView", equals: "week" }
|
|
31233
|
+
]
|
|
31234
|
+
}
|
|
31235
|
+
]
|
|
31116
31236
|
}
|
|
31117
31237
|
}
|
|
31118
31238
|
},
|
|
@@ -31228,8 +31348,7 @@ var eventCalendarAdditionalFields = [
|
|
|
31228
31348
|
];
|
|
31229
31349
|
var eventCalendarVariants = {
|
|
31230
31350
|
combined: eventCalendarLayout[0],
|
|
31231
|
-
|
|
31232
|
-
week: eventCalendarLayout[0],
|
|
31351
|
+
calendar: eventCalendarLayout[0],
|
|
31233
31352
|
timetable: eventCalendarLayout[0],
|
|
31234
31353
|
list: eventCalendarLayout[0]
|
|
31235
31354
|
};
|
|
@@ -31241,8 +31360,7 @@ var eventCalendarDerivedFields = [
|
|
|
31241
31360
|
multiple: false,
|
|
31242
31361
|
options: [
|
|
31243
31362
|
{ value: "combined" },
|
|
31244
|
-
{ value: "
|
|
31245
|
-
{ value: "week" },
|
|
31363
|
+
{ value: "calendar" },
|
|
31246
31364
|
{ value: "timetable" },
|
|
31247
31365
|
{ value: "list" }
|
|
31248
31366
|
]
|
|
@@ -31255,6 +31373,13 @@ var eventCalendarDerivedFields = [
|
|
|
31255
31373
|
options: eventCalendarListLayoutOptions.map((option) => ({
|
|
31256
31374
|
value: option.id
|
|
31257
31375
|
}))
|
|
31376
|
+
},
|
|
31377
|
+
{
|
|
31378
|
+
id: "defaultCalendarView",
|
|
31379
|
+
type: "select",
|
|
31380
|
+
required: false,
|
|
31381
|
+
multiple: false,
|
|
31382
|
+
options: [{ value: "month" }, { value: "week" }]
|
|
31258
31383
|
}
|
|
31259
31384
|
];
|
|
31260
31385
|
var eventCalendarContentShape = {
|
|
@@ -31303,8 +31428,7 @@ var eventCalendarConfig = {
|
|
|
31303
31428
|
defaultVariant: "combined",
|
|
31304
31429
|
variantOptions: {
|
|
31305
31430
|
combined: { label: "Combined" },
|
|
31306
|
-
|
|
31307
|
-
week: { label: "Week" },
|
|
31431
|
+
calendar: { label: "Calendar" },
|
|
31308
31432
|
timetable: { label: "Timetable" },
|
|
31309
31433
|
list: { label: "List" }
|
|
31310
31434
|
}
|
|
@@ -31350,7 +31474,7 @@ var eventCalendarBlockDefinition = {
|
|
|
31350
31474
|
};
|
|
31351
31475
|
|
|
31352
31476
|
// ../blocks/src/system/blocks/offerings-preview/index.ts
|
|
31353
|
-
import { z as
|
|
31477
|
+
import { z as z53 } from "zod";
|
|
31354
31478
|
|
|
31355
31479
|
// ../blocks/src/system/blocks/offerings-preview/model.ts
|
|
31356
31480
|
var OFFERINGS_PREVIEW_DEFAULT_ITEM_LIMIT = "3";
|
|
@@ -31410,7 +31534,7 @@ function inferLegacyOfferingsPreviewGroupOrder(overrides) {
|
|
|
31410
31534
|
return keys.length >= 2 ? keys : [];
|
|
31411
31535
|
}
|
|
31412
31536
|
function normalizeOfferingsPreviewContentForWrite(value) {
|
|
31413
|
-
if (!
|
|
31537
|
+
if (!isRecord6(value)) return null;
|
|
31414
31538
|
const groupOrderValue = value.groupOrder;
|
|
31415
31539
|
if (Array.isArray(groupOrderValue)) {
|
|
31416
31540
|
const normalized = normalizeOfferingsPreviewGroupOrder(groupOrderValue);
|
|
@@ -31423,7 +31547,7 @@ function normalizeOfferingsPreviewContentForWrite(value) {
|
|
|
31423
31547
|
return { ...value, groupOrder: [] };
|
|
31424
31548
|
}
|
|
31425
31549
|
const legacyOrder = inferLegacyOfferingsPreviewGroupOrder(
|
|
31426
|
-
Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(
|
|
31550
|
+
Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord6) : []
|
|
31427
31551
|
);
|
|
31428
31552
|
return legacyOrder.length > 0 ? { ...value, groupOrder: legacyOrder } : value;
|
|
31429
31553
|
}
|
|
@@ -31437,18 +31561,18 @@ function uniqueOfferingsPreviewSourceKeys(values) {
|
|
|
31437
31561
|
}
|
|
31438
31562
|
return keys;
|
|
31439
31563
|
}
|
|
31440
|
-
function
|
|
31564
|
+
function isRecord6(value) {
|
|
31441
31565
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
31442
31566
|
}
|
|
31443
31567
|
|
|
31444
31568
|
// ../blocks/src/system/blocks/offerings-preview/index.ts
|
|
31445
|
-
var publicRouteCandidatesSchema =
|
|
31446
|
-
routes:
|
|
31447
|
-
entityId:
|
|
31448
|
-
path:
|
|
31449
|
-
title:
|
|
31450
|
-
kind:
|
|
31451
|
-
contentTypeKey:
|
|
31569
|
+
var publicRouteCandidatesSchema = z53.object({
|
|
31570
|
+
routes: z53.array(z53.object({
|
|
31571
|
+
entityId: z53.string(),
|
|
31572
|
+
path: z53.string(),
|
|
31573
|
+
title: z53.string(),
|
|
31574
|
+
kind: z53.enum(["page", "content"]),
|
|
31575
|
+
contentTypeKey: z53.string().nullable().optional()
|
|
31452
31576
|
}))
|
|
31453
31577
|
});
|
|
31454
31578
|
var groupOverrideFields = [
|
|
@@ -31804,7 +31928,7 @@ function isOfferingsPreviewItemLimit(value) {
|
|
|
31804
31928
|
return value === "1" || value === "2" || value === "3" || value === "4" || value === "5" || value === "6" || value === null;
|
|
31805
31929
|
}
|
|
31806
31930
|
function normalizeOfferingsPreviewGroupOverride(value) {
|
|
31807
|
-
if (!
|
|
31931
|
+
if (!isRecord7(value)) return [];
|
|
31808
31932
|
const override = {};
|
|
31809
31933
|
if (isOfferingsPreviewSourceKey(value.sourceKey) || value.sourceKey === null) {
|
|
31810
31934
|
override.sourceKey = value.sourceKey;
|
|
@@ -31836,17 +31960,17 @@ function isButtonVariant(value) {
|
|
|
31836
31960
|
return value === "primary" || value === "secondary" || value === "outline" || value === "link" || value === null;
|
|
31837
31961
|
}
|
|
31838
31962
|
function normalizeCardStylesContent(value) {
|
|
31839
|
-
return
|
|
31963
|
+
return isRecord7(value) || value === null ? value : void 0;
|
|
31840
31964
|
}
|
|
31841
31965
|
function normalizeSectionStylesContent(value) {
|
|
31842
|
-
return
|
|
31966
|
+
return isRecord7(value) || value === null ? value : void 0;
|
|
31843
31967
|
}
|
|
31844
|
-
function
|
|
31968
|
+
function isRecord7(value) {
|
|
31845
31969
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
31846
31970
|
}
|
|
31847
31971
|
|
|
31848
31972
|
// ../blocks/src/system/blocks/embed.ts
|
|
31849
|
-
import { z as
|
|
31973
|
+
import { z as z54 } from "zod";
|
|
31850
31974
|
var embedFields = [
|
|
31851
31975
|
// Section heading
|
|
31852
31976
|
parseFieldDefinition({
|
|
@@ -32077,18 +32201,18 @@ var embedManifest = createBlockManifest({
|
|
|
32077
32201
|
spacing: "lg"
|
|
32078
32202
|
}
|
|
32079
32203
|
});
|
|
32080
|
-
var embedEntrySchema =
|
|
32081
|
-
id:
|
|
32082
|
-
identifier:
|
|
32083
|
-
title:
|
|
32084
|
-
slug:
|
|
32085
|
-
content:
|
|
32086
|
-
publishedAt:
|
|
32204
|
+
var embedEntrySchema = z54.object({
|
|
32205
|
+
id: z54.string(),
|
|
32206
|
+
identifier: z54.string(),
|
|
32207
|
+
title: z54.string(),
|
|
32208
|
+
slug: z54.string().nullable().optional(),
|
|
32209
|
+
content: z54.record(z54.string(), z54.unknown()).optional(),
|
|
32210
|
+
publishedAt: z54.string().nullable().optional()
|
|
32087
32211
|
});
|
|
32088
32212
|
var embedBlockDefinition = {
|
|
32089
32213
|
manifest: embedManifest,
|
|
32090
32214
|
dataSchemas: {
|
|
32091
|
-
entries:
|
|
32215
|
+
entries: z54.array(embedEntrySchema).optional()
|
|
32092
32216
|
},
|
|
32093
32217
|
dataLoaders: {
|
|
32094
32218
|
entries: {
|
|
@@ -33271,53 +33395,50 @@ var fileDownloadBlockDefinition = {
|
|
|
33271
33395
|
manifest: fileDownloadManifest
|
|
33272
33396
|
};
|
|
33273
33397
|
|
|
33274
|
-
// ../blocks/src/system/blocks/shop.ts
|
|
33275
|
-
import { z as z59 } from "zod";
|
|
33276
|
-
|
|
33277
33398
|
// ../blocks/src/system/runtime/nodes/shop.interactive.ts
|
|
33278
|
-
import { z as
|
|
33399
|
+
import { z as z57 } from "zod";
|
|
33279
33400
|
|
|
33280
33401
|
// ../blocks/src/system/blocks/products/shared.ts
|
|
33281
|
-
import { z as
|
|
33282
|
-
var publicProductVariantSchema =
|
|
33283
|
-
id:
|
|
33284
|
-
title:
|
|
33285
|
-
sku:
|
|
33286
|
-
priceCents:
|
|
33287
|
-
stockQuantity:
|
|
33288
|
-
soldOut:
|
|
33289
|
-
});
|
|
33290
|
-
var publicProductSchema =
|
|
33291
|
-
id:
|
|
33292
|
-
contentEntryId:
|
|
33293
|
-
title:
|
|
33294
|
-
slug:
|
|
33295
|
-
path:
|
|
33296
|
-
status:
|
|
33297
|
-
priceCents:
|
|
33298
|
-
currency:
|
|
33299
|
-
productType:
|
|
33300
|
-
requiresShipping:
|
|
33301
|
-
hasVariants:
|
|
33302
|
-
trackInventory:
|
|
33303
|
-
soldOut:
|
|
33304
|
-
category:
|
|
33305
|
-
id:
|
|
33306
|
-
name:
|
|
33307
|
-
slug:
|
|
33402
|
+
import { z as z55 } from "zod";
|
|
33403
|
+
var publicProductVariantSchema = z55.object({
|
|
33404
|
+
id: z55.string(),
|
|
33405
|
+
title: z55.string(),
|
|
33406
|
+
sku: z55.string().nullable(),
|
|
33407
|
+
priceCents: z55.number(),
|
|
33408
|
+
stockQuantity: z55.number().nullable(),
|
|
33409
|
+
soldOut: z55.boolean()
|
|
33410
|
+
});
|
|
33411
|
+
var publicProductSchema = z55.object({
|
|
33412
|
+
id: z55.string(),
|
|
33413
|
+
contentEntryId: z55.string().nullable(),
|
|
33414
|
+
title: z55.string(),
|
|
33415
|
+
slug: z55.string(),
|
|
33416
|
+
path: z55.string().nullable(),
|
|
33417
|
+
status: z55.enum(["draft", "active"]),
|
|
33418
|
+
priceCents: z55.number(),
|
|
33419
|
+
currency: z55.string(),
|
|
33420
|
+
productType: z55.enum(["physical", "digital"]),
|
|
33421
|
+
requiresShipping: z55.boolean(),
|
|
33422
|
+
hasVariants: z55.boolean(),
|
|
33423
|
+
trackInventory: z55.boolean(),
|
|
33424
|
+
soldOut: z55.boolean(),
|
|
33425
|
+
category: z55.object({
|
|
33426
|
+
id: z55.string(),
|
|
33427
|
+
name: z55.string(),
|
|
33428
|
+
slug: z55.string()
|
|
33308
33429
|
}).nullable(),
|
|
33309
|
-
summary:
|
|
33310
|
-
body:
|
|
33311
|
-
gallery:
|
|
33312
|
-
|
|
33313
|
-
url:
|
|
33314
|
-
alt:
|
|
33430
|
+
summary: z55.string().nullable(),
|
|
33431
|
+
body: z55.unknown().nullable(),
|
|
33432
|
+
gallery: z55.array(
|
|
33433
|
+
z55.object({
|
|
33434
|
+
url: z55.string(),
|
|
33435
|
+
alt: z55.string().nullable()
|
|
33315
33436
|
})
|
|
33316
33437
|
),
|
|
33317
|
-
variants:
|
|
33438
|
+
variants: z55.array(publicProductVariantSchema)
|
|
33318
33439
|
});
|
|
33319
|
-
var publicProductsResponseSchema =
|
|
33320
|
-
products:
|
|
33440
|
+
var publicProductsResponseSchema = z55.object({
|
|
33441
|
+
products: z55.array(publicProductSchema)
|
|
33321
33442
|
});
|
|
33322
33443
|
|
|
33323
33444
|
// ../blocks/src/system/runtime/api/creditProducts.ts
|
|
@@ -33381,27 +33502,27 @@ function deriveCreditProductLabels(products, options = {}) {
|
|
|
33381
33502
|
}
|
|
33382
33503
|
|
|
33383
33504
|
// ../blocks/src/system/runtime/nodes/shop-commerce.shared.ts
|
|
33384
|
-
import { z as
|
|
33385
|
-
var storedProductCartItemSchema =
|
|
33386
|
-
kind:
|
|
33387
|
-
productId:
|
|
33388
|
-
productCategoryId:
|
|
33389
|
-
variantId:
|
|
33390
|
-
title:
|
|
33391
|
-
variantTitle:
|
|
33392
|
-
quantity:
|
|
33393
|
-
unitPriceCents:
|
|
33394
|
-
currency:
|
|
33395
|
-
imageUrl:
|
|
33396
|
-
soldOut:
|
|
33397
|
-
});
|
|
33398
|
-
var storedPassCartItemSchema =
|
|
33399
|
-
kind:
|
|
33400
|
-
passId:
|
|
33401
|
-
title:
|
|
33402
|
-
quantity:
|
|
33403
|
-
unitPriceCents:
|
|
33404
|
-
currency:
|
|
33505
|
+
import { z as z56 } from "zod";
|
|
33506
|
+
var storedProductCartItemSchema = z56.object({
|
|
33507
|
+
kind: z56.literal("product"),
|
|
33508
|
+
productId: z56.string().min(1),
|
|
33509
|
+
productCategoryId: z56.string().min(1).optional().nullable(),
|
|
33510
|
+
variantId: z56.string().min(1).optional().nullable(),
|
|
33511
|
+
title: z56.string().min(1),
|
|
33512
|
+
variantTitle: z56.string().optional().nullable(),
|
|
33513
|
+
quantity: z56.number().finite(),
|
|
33514
|
+
unitPriceCents: z56.number().finite(),
|
|
33515
|
+
currency: z56.string().min(1),
|
|
33516
|
+
imageUrl: z56.string().optional().nullable(),
|
|
33517
|
+
soldOut: z56.boolean().optional()
|
|
33518
|
+
});
|
|
33519
|
+
var storedPassCartItemSchema = z56.object({
|
|
33520
|
+
kind: z56.literal("pass"),
|
|
33521
|
+
passId: z56.string().min(1),
|
|
33522
|
+
title: z56.string().min(1),
|
|
33523
|
+
quantity: z56.number().finite().optional(),
|
|
33524
|
+
unitPriceCents: z56.number().finite(),
|
|
33525
|
+
currency: z56.string().min(1)
|
|
33405
33526
|
});
|
|
33406
33527
|
function deriveCommerceCheckoutState(state) {
|
|
33407
33528
|
if (state.items.length === 0) {
|
|
@@ -33635,214 +33756,214 @@ function formatValidity(days) {
|
|
|
33635
33756
|
}
|
|
33636
33757
|
|
|
33637
33758
|
// ../blocks/src/system/runtime/nodes/shop.interactive.ts
|
|
33638
|
-
var shopModeSchema =
|
|
33639
|
-
var contentEntrySchema3 =
|
|
33640
|
-
id:
|
|
33641
|
-
slug:
|
|
33759
|
+
var shopModeSchema = z57.enum(["passes-memberships", "product-list", "product-detail", "cart", "checkout"]);
|
|
33760
|
+
var contentEntrySchema3 = z57.object({
|
|
33761
|
+
id: z57.string().nullable().optional(),
|
|
33762
|
+
slug: z57.string().nullable().optional()
|
|
33642
33763
|
}).nullable();
|
|
33643
|
-
var shopSourceSchema =
|
|
33644
|
-
className:
|
|
33764
|
+
var shopSourceSchema = z57.object({
|
|
33765
|
+
className: z57.string().nullable().optional(),
|
|
33645
33766
|
mode: shopModeSchema.optional(),
|
|
33646
|
-
heading:
|
|
33647
|
-
productSlug:
|
|
33648
|
-
showPasses:
|
|
33649
|
-
showMemberships:
|
|
33650
|
-
layout:
|
|
33651
|
-
columns:
|
|
33652
|
-
showDescriptions:
|
|
33653
|
-
showSummary:
|
|
33654
|
-
showBody:
|
|
33655
|
-
showPrices:
|
|
33656
|
-
showValidityPeriod:
|
|
33657
|
-
showPricePerCredit:
|
|
33658
|
-
passesHeading:
|
|
33659
|
-
membershipsHeading:
|
|
33660
|
-
buyButtonText:
|
|
33661
|
-
addButtonText:
|
|
33662
|
-
passPurchaseMode:
|
|
33663
|
-
subscribeButtonText:
|
|
33664
|
-
emptyStateText:
|
|
33665
|
-
checkoutButtonText:
|
|
33666
|
-
clearButtonText:
|
|
33667
|
-
submitButtonText:
|
|
33767
|
+
heading: z57.string().nullable().optional(),
|
|
33768
|
+
productSlug: z57.string().nullable().optional(),
|
|
33769
|
+
showPasses: z57.boolean().optional(),
|
|
33770
|
+
showMemberships: z57.boolean().optional(),
|
|
33771
|
+
layout: z57.enum(["grid", "list"]).optional(),
|
|
33772
|
+
columns: z57.string().optional(),
|
|
33773
|
+
showDescriptions: z57.boolean().optional(),
|
|
33774
|
+
showSummary: z57.boolean().optional(),
|
|
33775
|
+
showBody: z57.boolean().optional(),
|
|
33776
|
+
showPrices: z57.boolean().optional(),
|
|
33777
|
+
showValidityPeriod: z57.boolean().optional(),
|
|
33778
|
+
showPricePerCredit: z57.boolean().nullable().optional(),
|
|
33779
|
+
passesHeading: z57.string().optional(),
|
|
33780
|
+
membershipsHeading: z57.string().optional(),
|
|
33781
|
+
buyButtonText: z57.string().optional(),
|
|
33782
|
+
addButtonText: z57.string().optional(),
|
|
33783
|
+
passPurchaseMode: z57.enum(["add_to_cart", "buy_now"]).optional(),
|
|
33784
|
+
subscribeButtonText: z57.string().optional(),
|
|
33785
|
+
emptyStateText: z57.string().optional(),
|
|
33786
|
+
checkoutButtonText: z57.string().optional(),
|
|
33787
|
+
clearButtonText: z57.string().optional(),
|
|
33788
|
+
submitButtonText: z57.string().optional(),
|
|
33668
33789
|
contentEntry: contentEntrySchema3.optional(),
|
|
33669
|
-
passes:
|
|
33670
|
-
memberships:
|
|
33671
|
-
products:
|
|
33672
|
-
siteId:
|
|
33673
|
-
apiBaseUrl:
|
|
33790
|
+
passes: z57.array(publicPassProductSchema).nullable().optional(),
|
|
33791
|
+
memberships: z57.array(publicMembershipProductSchema).nullable().optional(),
|
|
33792
|
+
products: z57.array(publicProductSchema).nullable().optional(),
|
|
33793
|
+
siteId: z57.string().optional(),
|
|
33794
|
+
apiBaseUrl: z57.string().optional(),
|
|
33674
33795
|
stage: previewStageSchema.optional()
|
|
33675
33796
|
});
|
|
33676
|
-
var productVariantOptionDisplaySchema =
|
|
33677
|
-
id:
|
|
33678
|
-
label:
|
|
33679
|
-
soldOut:
|
|
33680
|
-
});
|
|
33681
|
-
var productCardDisplaySchema =
|
|
33682
|
-
productId:
|
|
33683
|
-
title:
|
|
33684
|
-
path:
|
|
33685
|
-
summary:
|
|
33686
|
-
priceLabel:
|
|
33687
|
-
image:
|
|
33688
|
-
url:
|
|
33689
|
-
alt:
|
|
33797
|
+
var productVariantOptionDisplaySchema = z57.object({
|
|
33798
|
+
id: z57.string(),
|
|
33799
|
+
label: z57.string(),
|
|
33800
|
+
soldOut: z57.boolean()
|
|
33801
|
+
});
|
|
33802
|
+
var productCardDisplaySchema = z57.object({
|
|
33803
|
+
productId: z57.string(),
|
|
33804
|
+
title: z57.string(),
|
|
33805
|
+
path: z57.string().nullable(),
|
|
33806
|
+
summary: z57.string().nullable(),
|
|
33807
|
+
priceLabel: z57.string().nullable(),
|
|
33808
|
+
image: z57.object({
|
|
33809
|
+
url: z57.string(),
|
|
33810
|
+
alt: z57.string().nullable()
|
|
33690
33811
|
}).nullable(),
|
|
33691
|
-
variantOptions:
|
|
33692
|
-
selectedVariantId:
|
|
33693
|
-
selectionLabel:
|
|
33694
|
-
actionLabel:
|
|
33695
|
-
soldOut:
|
|
33696
|
-
});
|
|
33697
|
-
var productListDisplaySchema =
|
|
33698
|
-
kind:
|
|
33699
|
-
state:
|
|
33700
|
-
heading:
|
|
33701
|
-
className:
|
|
33702
|
-
layout:
|
|
33703
|
-
columns:
|
|
33704
|
-
emptyMessage:
|
|
33705
|
-
cards:
|
|
33706
|
-
});
|
|
33707
|
-
var productDetailDisplaySchema =
|
|
33708
|
-
|
|
33709
|
-
kind:
|
|
33710
|
-
state:
|
|
33711
|
-
heading:
|
|
33712
|
-
className:
|
|
33713
|
-
emptyMessage:
|
|
33812
|
+
variantOptions: z57.array(productVariantOptionDisplaySchema),
|
|
33813
|
+
selectedVariantId: z57.string().nullable(),
|
|
33814
|
+
selectionLabel: z57.string(),
|
|
33815
|
+
actionLabel: z57.string(),
|
|
33816
|
+
soldOut: z57.boolean()
|
|
33817
|
+
});
|
|
33818
|
+
var productListDisplaySchema = z57.object({
|
|
33819
|
+
kind: z57.literal("product-list"),
|
|
33820
|
+
state: z57.enum(["empty", "ready"]),
|
|
33821
|
+
heading: z57.string().nullable(),
|
|
33822
|
+
className: z57.string().nullable(),
|
|
33823
|
+
layout: z57.enum(["grid", "list"]),
|
|
33824
|
+
columns: z57.string(),
|
|
33825
|
+
emptyMessage: z57.string(),
|
|
33826
|
+
cards: z57.array(productCardDisplaySchema)
|
|
33827
|
+
});
|
|
33828
|
+
var productDetailDisplaySchema = z57.discriminatedUnion("state", [
|
|
33829
|
+
z57.object({
|
|
33830
|
+
kind: z57.literal("product-detail"),
|
|
33831
|
+
state: z57.literal("empty"),
|
|
33832
|
+
heading: z57.string().nullable(),
|
|
33833
|
+
className: z57.string().nullable(),
|
|
33834
|
+
emptyMessage: z57.string()
|
|
33714
33835
|
}),
|
|
33715
|
-
|
|
33716
|
-
kind:
|
|
33717
|
-
state:
|
|
33718
|
-
heading:
|
|
33719
|
-
className:
|
|
33720
|
-
title:
|
|
33721
|
-
priceLabel:
|
|
33722
|
-
summary:
|
|
33723
|
-
categoryLabel:
|
|
33724
|
-
gallery:
|
|
33725
|
-
url:
|
|
33726
|
-
alt:
|
|
33836
|
+
z57.object({
|
|
33837
|
+
kind: z57.literal("product-detail"),
|
|
33838
|
+
state: z57.literal("ready"),
|
|
33839
|
+
heading: z57.string().nullable(),
|
|
33840
|
+
className: z57.string().nullable(),
|
|
33841
|
+
title: z57.string(),
|
|
33842
|
+
priceLabel: z57.string(),
|
|
33843
|
+
summary: z57.string().nullable(),
|
|
33844
|
+
categoryLabel: z57.string().nullable(),
|
|
33845
|
+
gallery: z57.array(z57.object({
|
|
33846
|
+
url: z57.string(),
|
|
33847
|
+
alt: z57.string().nullable()
|
|
33727
33848
|
})),
|
|
33728
|
-
variantOptions:
|
|
33729
|
-
selectedVariantId:
|
|
33730
|
-
selectionLabel:
|
|
33731
|
-
actionLabel:
|
|
33732
|
-
soldOut:
|
|
33733
|
-
body:
|
|
33849
|
+
variantOptions: z57.array(productVariantOptionDisplaySchema),
|
|
33850
|
+
selectedVariantId: z57.string().nullable(),
|
|
33851
|
+
selectionLabel: z57.string(),
|
|
33852
|
+
actionLabel: z57.string(),
|
|
33853
|
+
soldOut: z57.boolean(),
|
|
33854
|
+
body: z57.unknown().nullable()
|
|
33734
33855
|
})
|
|
33735
33856
|
]);
|
|
33736
|
-
var passCardDisplaySchema =
|
|
33737
|
-
id:
|
|
33738
|
-
title:
|
|
33739
|
-
description:
|
|
33740
|
-
priceLabel:
|
|
33741
|
-
creditsLabel:
|
|
33742
|
-
perCreditLabel:
|
|
33743
|
-
validityLabel:
|
|
33744
|
-
actionLabel:
|
|
33745
|
-
});
|
|
33746
|
-
var membershipCardDisplaySchema =
|
|
33747
|
-
id:
|
|
33748
|
-
title:
|
|
33749
|
-
description:
|
|
33750
|
-
priceLabel:
|
|
33751
|
-
intervalLabel:
|
|
33752
|
-
actionLabel:
|
|
33753
|
-
});
|
|
33754
|
-
var passesMembershipsDisplaySchema =
|
|
33755
|
-
kind:
|
|
33756
|
-
state:
|
|
33757
|
-
className:
|
|
33758
|
-
layout:
|
|
33759
|
-
columns:
|
|
33760
|
-
emptyMessage:
|
|
33761
|
-
passesHeading:
|
|
33762
|
-
membershipsHeading:
|
|
33763
|
-
passes:
|
|
33764
|
-
memberships:
|
|
33765
|
-
});
|
|
33766
|
-
var cartLineDisplaySchema =
|
|
33767
|
-
key:
|
|
33768
|
-
title:
|
|
33769
|
-
priceLabel:
|
|
33770
|
-
quantity:
|
|
33771
|
-
quantityEditable:
|
|
33772
|
-
});
|
|
33773
|
-
var cartDisplaySchema =
|
|
33774
|
-
kind:
|
|
33775
|
-
state:
|
|
33776
|
-
heading:
|
|
33777
|
-
className:
|
|
33778
|
-
emptyMessage:
|
|
33779
|
-
supportText:
|
|
33780
|
-
items:
|
|
33781
|
-
subtotalLabel:
|
|
33782
|
-
checkoutButtonText:
|
|
33783
|
-
clearButtonText:
|
|
33784
|
-
});
|
|
33785
|
-
var checkoutDisplaySchema =
|
|
33786
|
-
kind:
|
|
33787
|
-
state:
|
|
33788
|
-
heading:
|
|
33789
|
-
className:
|
|
33790
|
-
message:
|
|
33791
|
-
submitButtonText:
|
|
33792
|
-
});
|
|
33793
|
-
var passesMembershipsHydrationSchema =
|
|
33794
|
-
passes:
|
|
33795
|
-
memberships:
|
|
33796
|
-
passPurchaseMode:
|
|
33797
|
-
});
|
|
33798
|
-
var productListHydrationSchema =
|
|
33799
|
-
products:
|
|
33800
|
-
showSummary:
|
|
33801
|
-
showPrices:
|
|
33802
|
-
addButtonText:
|
|
33803
|
-
});
|
|
33804
|
-
var productDetailHydrationSchema =
|
|
33805
|
-
products:
|
|
33806
|
-
productId:
|
|
33807
|
-
showSummary:
|
|
33808
|
-
showBody:
|
|
33809
|
-
addButtonText:
|
|
33810
|
-
});
|
|
33811
|
-
var cartHydrationSchema =
|
|
33812
|
-
emptyStateText:
|
|
33813
|
-
checkoutButtonText:
|
|
33814
|
-
clearButtonText:
|
|
33815
|
-
});
|
|
33816
|
-
var checkoutHydrationSchema =
|
|
33817
|
-
emptyStateText:
|
|
33818
|
-
submitButtonText:
|
|
33819
|
-
});
|
|
33820
|
-
var passesMembershipsRenderSchema =
|
|
33857
|
+
var passCardDisplaySchema = z57.object({
|
|
33858
|
+
id: z57.string(),
|
|
33859
|
+
title: z57.string(),
|
|
33860
|
+
description: z57.string().nullable(),
|
|
33861
|
+
priceLabel: z57.string(),
|
|
33862
|
+
creditsLabel: z57.string(),
|
|
33863
|
+
perCreditLabel: z57.string().nullable(),
|
|
33864
|
+
validityLabel: z57.string().nullable(),
|
|
33865
|
+
actionLabel: z57.string()
|
|
33866
|
+
});
|
|
33867
|
+
var membershipCardDisplaySchema = z57.object({
|
|
33868
|
+
id: z57.string(),
|
|
33869
|
+
title: z57.string(),
|
|
33870
|
+
description: z57.string().nullable(),
|
|
33871
|
+
priceLabel: z57.string(),
|
|
33872
|
+
intervalLabel: z57.string(),
|
|
33873
|
+
actionLabel: z57.string()
|
|
33874
|
+
});
|
|
33875
|
+
var passesMembershipsDisplaySchema = z57.object({
|
|
33876
|
+
kind: z57.literal("passes-memberships"),
|
|
33877
|
+
state: z57.enum(["empty", "ready"]),
|
|
33878
|
+
className: z57.string().nullable(),
|
|
33879
|
+
layout: z57.enum(["grid", "list"]),
|
|
33880
|
+
columns: z57.string(),
|
|
33881
|
+
emptyMessage: z57.string(),
|
|
33882
|
+
passesHeading: z57.string(),
|
|
33883
|
+
membershipsHeading: z57.string(),
|
|
33884
|
+
passes: z57.array(passCardDisplaySchema),
|
|
33885
|
+
memberships: z57.array(membershipCardDisplaySchema)
|
|
33886
|
+
});
|
|
33887
|
+
var cartLineDisplaySchema = z57.object({
|
|
33888
|
+
key: z57.string(),
|
|
33889
|
+
title: z57.string(),
|
|
33890
|
+
priceLabel: z57.string(),
|
|
33891
|
+
quantity: z57.number(),
|
|
33892
|
+
quantityEditable: z57.boolean()
|
|
33893
|
+
});
|
|
33894
|
+
var cartDisplaySchema = z57.object({
|
|
33895
|
+
kind: z57.literal("cart"),
|
|
33896
|
+
state: z57.enum(["empty", "ready"]),
|
|
33897
|
+
heading: z57.string().nullable(),
|
|
33898
|
+
className: z57.string().nullable(),
|
|
33899
|
+
emptyMessage: z57.string(),
|
|
33900
|
+
supportText: z57.string().nullable(),
|
|
33901
|
+
items: z57.array(cartLineDisplaySchema),
|
|
33902
|
+
subtotalLabel: z57.string().nullable(),
|
|
33903
|
+
checkoutButtonText: z57.string(),
|
|
33904
|
+
clearButtonText: z57.string()
|
|
33905
|
+
});
|
|
33906
|
+
var checkoutDisplaySchema = z57.object({
|
|
33907
|
+
kind: z57.literal("checkout"),
|
|
33908
|
+
state: z57.enum(["empty", "blocked", "ready"]),
|
|
33909
|
+
heading: z57.string().nullable(),
|
|
33910
|
+
className: z57.string().nullable(),
|
|
33911
|
+
message: z57.string().nullable(),
|
|
33912
|
+
submitButtonText: z57.string()
|
|
33913
|
+
});
|
|
33914
|
+
var passesMembershipsHydrationSchema = z57.object({
|
|
33915
|
+
passes: z57.array(publicPassProductSchema),
|
|
33916
|
+
memberships: z57.array(publicMembershipProductSchema),
|
|
33917
|
+
passPurchaseMode: z57.enum(["add_to_cart", "buy_now"])
|
|
33918
|
+
});
|
|
33919
|
+
var productListHydrationSchema = z57.object({
|
|
33920
|
+
products: z57.array(publicProductSchema),
|
|
33921
|
+
showSummary: z57.boolean(),
|
|
33922
|
+
showPrices: z57.boolean(),
|
|
33923
|
+
addButtonText: z57.string()
|
|
33924
|
+
});
|
|
33925
|
+
var productDetailHydrationSchema = z57.object({
|
|
33926
|
+
products: z57.array(publicProductSchema),
|
|
33927
|
+
productId: z57.string().nullable(),
|
|
33928
|
+
showSummary: z57.boolean(),
|
|
33929
|
+
showBody: z57.boolean(),
|
|
33930
|
+
addButtonText: z57.string()
|
|
33931
|
+
});
|
|
33932
|
+
var cartHydrationSchema = z57.object({
|
|
33933
|
+
emptyStateText: z57.string(),
|
|
33934
|
+
checkoutButtonText: z57.string(),
|
|
33935
|
+
clearButtonText: z57.string()
|
|
33936
|
+
});
|
|
33937
|
+
var checkoutHydrationSchema = z57.object({
|
|
33938
|
+
emptyStateText: z57.string(),
|
|
33939
|
+
submitButtonText: z57.string()
|
|
33940
|
+
});
|
|
33941
|
+
var passesMembershipsRenderSchema = z57.object({
|
|
33821
33942
|
display: passesMembershipsDisplaySchema,
|
|
33822
33943
|
hydration: passesMembershipsHydrationSchema
|
|
33823
33944
|
});
|
|
33824
|
-
var productListRenderSchema =
|
|
33945
|
+
var productListRenderSchema = z57.object({
|
|
33825
33946
|
display: productListDisplaySchema,
|
|
33826
33947
|
hydration: productListHydrationSchema
|
|
33827
33948
|
});
|
|
33828
|
-
var productDetailRenderSchema =
|
|
33949
|
+
var productDetailRenderSchema = z57.object({
|
|
33829
33950
|
display: productDetailDisplaySchema,
|
|
33830
33951
|
hydration: productDetailHydrationSchema
|
|
33831
33952
|
});
|
|
33832
|
-
var cartRenderSchema =
|
|
33953
|
+
var cartRenderSchema = z57.object({
|
|
33833
33954
|
display: cartDisplaySchema,
|
|
33834
33955
|
hydration: cartHydrationSchema
|
|
33835
33956
|
});
|
|
33836
|
-
var checkoutRenderSchema =
|
|
33957
|
+
var checkoutRenderSchema = z57.object({
|
|
33837
33958
|
display: checkoutDisplaySchema,
|
|
33838
33959
|
hydration: checkoutHydrationSchema
|
|
33839
33960
|
});
|
|
33840
33961
|
function resolveShowPricePerCredit(source) {
|
|
33841
33962
|
return source.showPricePerCredit ?? true;
|
|
33842
33963
|
}
|
|
33843
|
-
var shopIslandMetaCodec = createZodCodec(
|
|
33844
|
-
siteId:
|
|
33845
|
-
apiBaseUrl:
|
|
33964
|
+
var shopIslandMetaCodec = createZodCodec(z57.object({
|
|
33965
|
+
siteId: z57.string().optional(),
|
|
33966
|
+
apiBaseUrl: z57.string().optional(),
|
|
33846
33967
|
stage: previewStageSchema.optional()
|
|
33847
33968
|
}));
|
|
33848
33969
|
var shopIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "stage");
|
|
@@ -34220,9 +34341,9 @@ var shopBlockDefinition = {
|
|
|
34220
34341
|
runtime: shopBlockRuntime,
|
|
34221
34342
|
dataSchemas: {
|
|
34222
34343
|
// listPublicPasses returns { passes: [...] }
|
|
34223
|
-
passes:
|
|
34344
|
+
passes: publicPassProductCollectionSchema.optional(),
|
|
34224
34345
|
// listPublicMemberships returns { memberships: [...] }
|
|
34225
|
-
memberships:
|
|
34346
|
+
memberships: publicMembershipProductCollectionSchema.optional()
|
|
34226
34347
|
},
|
|
34227
34348
|
dataLoaders: {
|
|
34228
34349
|
// Load passes for display
|
|
@@ -34245,7 +34366,7 @@ var shopBlockDefinition = {
|
|
|
34245
34366
|
};
|
|
34246
34367
|
|
|
34247
34368
|
// ../blocks/src/system/blocks/product-list.ts
|
|
34248
|
-
import { z as
|
|
34369
|
+
import { z as z58 } from "zod";
|
|
34249
34370
|
var productListManifest = createBlockManifest({
|
|
34250
34371
|
id: "block.product-list",
|
|
34251
34372
|
version: "1.0.0",
|
|
@@ -34378,7 +34499,7 @@ var productListBlockDefinition = {
|
|
|
34378
34499
|
}
|
|
34379
34500
|
}
|
|
34380
34501
|
};
|
|
34381
|
-
var productListDataSchema =
|
|
34502
|
+
var productListDataSchema = z58.object({
|
|
34382
34503
|
products: publicProductsResponseSchema.optional()
|
|
34383
34504
|
});
|
|
34384
34505
|
|
|
@@ -34639,72 +34760,72 @@ var checkoutBlockDefinition = {
|
|
|
34639
34760
|
};
|
|
34640
34761
|
|
|
34641
34762
|
// ../blocks/src/system/runtime/nodes/gifting.interactive.ts
|
|
34642
|
-
import { z as
|
|
34643
|
-
var publicGiftCardOfferSchema =
|
|
34644
|
-
id:
|
|
34645
|
-
kind:
|
|
34646
|
-
title:
|
|
34647
|
-
description:
|
|
34648
|
-
sortOrder:
|
|
34649
|
-
giftCard:
|
|
34650
|
-
fixedDenominations:
|
|
34651
|
-
customAmountEnabled:
|
|
34652
|
-
customAmountMinCents:
|
|
34653
|
-
customAmountMaxCents:
|
|
34763
|
+
import { z as z59 } from "zod";
|
|
34764
|
+
var publicGiftCardOfferSchema = z59.object({
|
|
34765
|
+
id: z59.string(),
|
|
34766
|
+
kind: z59.literal("gift_card"),
|
|
34767
|
+
title: z59.string(),
|
|
34768
|
+
description: z59.string().nullable(),
|
|
34769
|
+
sortOrder: z59.number().int(),
|
|
34770
|
+
giftCard: z59.object({
|
|
34771
|
+
fixedDenominations: z59.array(z59.number().int().positive()),
|
|
34772
|
+
customAmountEnabled: z59.boolean(),
|
|
34773
|
+
customAmountMinCents: z59.number().int().positive(),
|
|
34774
|
+
customAmountMaxCents: z59.number().int().positive()
|
|
34654
34775
|
}),
|
|
34655
|
-
voucher:
|
|
34656
|
-
});
|
|
34657
|
-
var publicVoucherOfferSchema =
|
|
34658
|
-
id:
|
|
34659
|
-
kind:
|
|
34660
|
-
title:
|
|
34661
|
-
description:
|
|
34662
|
-
sortOrder:
|
|
34663
|
-
giftCard:
|
|
34664
|
-
voucher:
|
|
34665
|
-
purchaseAmountCents:
|
|
34776
|
+
voucher: z59.null()
|
|
34777
|
+
});
|
|
34778
|
+
var publicVoucherOfferSchema = z59.object({
|
|
34779
|
+
id: z59.string(),
|
|
34780
|
+
kind: z59.literal("voucher"),
|
|
34781
|
+
title: z59.string(),
|
|
34782
|
+
description: z59.string().nullable(),
|
|
34783
|
+
sortOrder: z59.number().int(),
|
|
34784
|
+
giftCard: z59.null(),
|
|
34785
|
+
voucher: z59.object({
|
|
34786
|
+
purchaseAmountCents: z59.number().int().positive()
|
|
34666
34787
|
})
|
|
34667
34788
|
});
|
|
34668
|
-
var publicGiftingOffersResponseSchema =
|
|
34669
|
-
currency:
|
|
34670
|
-
giftCards:
|
|
34671
|
-
vouchers:
|
|
34789
|
+
var publicGiftingOffersResponseSchema = z59.object({
|
|
34790
|
+
currency: z59.string(),
|
|
34791
|
+
giftCards: z59.array(publicGiftCardOfferSchema),
|
|
34792
|
+
vouchers: z59.array(publicVoucherOfferSchema)
|
|
34672
34793
|
});
|
|
34673
|
-
var giftingSourceSchema =
|
|
34674
|
-
siteId:
|
|
34675
|
-
apiBaseUrl:
|
|
34794
|
+
var giftingSourceSchema = z59.object({
|
|
34795
|
+
siteId: z59.string().optional(),
|
|
34796
|
+
apiBaseUrl: z59.string().optional(),
|
|
34676
34797
|
offers: publicGiftingOffersResponseSchema.nullable().optional(),
|
|
34677
|
-
className:
|
|
34678
|
-
heading:
|
|
34679
|
-
intro:
|
|
34680
|
-
giftCardsHeading:
|
|
34681
|
-
vouchersHeading:
|
|
34682
|
-
emptyStateText:
|
|
34683
|
-
checkoutButtonText:
|
|
34684
|
-
successMessage:
|
|
34685
|
-
});
|
|
34686
|
-
var giftingDisplaySchema =
|
|
34687
|
-
kind:
|
|
34688
|
-
state:
|
|
34689
|
-
className:
|
|
34690
|
-
heading:
|
|
34691
|
-
intro:
|
|
34692
|
-
giftCardsHeading:
|
|
34693
|
-
vouchersHeading:
|
|
34694
|
-
emptyStateText:
|
|
34695
|
-
});
|
|
34696
|
-
var giftingHydrationSchema =
|
|
34798
|
+
className: z59.string().nullable().optional(),
|
|
34799
|
+
heading: z59.string().nullable().optional(),
|
|
34800
|
+
intro: z59.string().nullable().optional(),
|
|
34801
|
+
giftCardsHeading: z59.string().nullable().optional(),
|
|
34802
|
+
vouchersHeading: z59.string().nullable().optional(),
|
|
34803
|
+
emptyStateText: z59.string().nullable().optional(),
|
|
34804
|
+
checkoutButtonText: z59.string().nullable().optional(),
|
|
34805
|
+
successMessage: z59.string().nullable().optional()
|
|
34806
|
+
});
|
|
34807
|
+
var giftingDisplaySchema = z59.object({
|
|
34808
|
+
kind: z59.literal("gifting"),
|
|
34809
|
+
state: z59.literal("ready"),
|
|
34810
|
+
className: z59.string().nullable(),
|
|
34811
|
+
heading: z59.string(),
|
|
34812
|
+
intro: z59.string().nullable(),
|
|
34813
|
+
giftCardsHeading: z59.string(),
|
|
34814
|
+
vouchersHeading: z59.string(),
|
|
34815
|
+
emptyStateText: z59.string()
|
|
34816
|
+
});
|
|
34817
|
+
var giftingHydrationSchema = z59.object({
|
|
34697
34818
|
offers: publicGiftingOffersResponseSchema.nullable(),
|
|
34698
|
-
checkoutButtonText:
|
|
34699
|
-
successMessage:
|
|
34819
|
+
checkoutButtonText: z59.string(),
|
|
34820
|
+
successMessage: z59.string()
|
|
34700
34821
|
});
|
|
34701
|
-
var giftingRenderSchema =
|
|
34822
|
+
var giftingRenderSchema = z59.object({
|
|
34702
34823
|
display: giftingDisplaySchema,
|
|
34703
34824
|
hydration: giftingHydrationSchema
|
|
34704
34825
|
});
|
|
34705
|
-
var giftingIslandMetaCodec = createZodCodec(
|
|
34706
|
-
siteId:
|
|
34707
|
-
apiBaseUrl:
|
|
34826
|
+
var giftingIslandMetaCodec = createZodCodec(z59.object({
|
|
34827
|
+
siteId: z59.string().optional(),
|
|
34828
|
+
apiBaseUrl: z59.string().optional()
|
|
34708
34829
|
}));
|
|
34709
34830
|
var giftingIslandMetaKeys = defineInteractiveIslandMetaKeys(
|
|
34710
34831
|
"siteId",
|
|
@@ -34875,7 +34996,7 @@ var giftingBlockDefinition = {
|
|
|
34875
34996
|
};
|
|
34876
34997
|
|
|
34877
34998
|
// ../blocks/src/system/runtime/nodes/newsletter-form.interactive.ts
|
|
34878
|
-
import { z as
|
|
34999
|
+
import { z as z60 } from "zod";
|
|
34879
35000
|
|
|
34880
35001
|
// ../blocks/src/system/blocks/newsletter-signup-destination.ts
|
|
34881
35002
|
function parseNewsletterSignupBlockId(value) {
|
|
@@ -34982,65 +35103,65 @@ function withOptionalPhone(fields3, includePhone) {
|
|
|
34982
35103
|
}
|
|
34983
35104
|
|
|
34984
35105
|
// ../blocks/src/system/runtime/nodes/newsletter-form.interactive.ts
|
|
34985
|
-
var newsletterPresetSchema =
|
|
34986
|
-
var newsletterDestinationProviderSchema =
|
|
34987
|
-
var newsletterFieldSchema =
|
|
34988
|
-
id:
|
|
34989
|
-
type:
|
|
34990
|
-
label:
|
|
34991
|
-
required:
|
|
34992
|
-
placeholder:
|
|
34993
|
-
});
|
|
34994
|
-
var newsletterSignupBlockIdSchema =
|
|
34995
|
-
var signedNewsletterDestinationRefSchema =
|
|
34996
|
-
var newsletterPublicDestinationRefSchema =
|
|
34997
|
-
|
|
34998
|
-
tag:
|
|
35106
|
+
var newsletterPresetSchema = z60.enum(["emailOnly", "emailName", "emailFirstLast", "emailNameCompany"]);
|
|
35107
|
+
var newsletterDestinationProviderSchema = z60.enum(["riverbank", "mailchimp"]);
|
|
35108
|
+
var newsletterFieldSchema = z60.object({
|
|
35109
|
+
id: z60.string(),
|
|
35110
|
+
type: z60.enum(["email", "text"]),
|
|
35111
|
+
label: z60.string(),
|
|
35112
|
+
required: z60.boolean(),
|
|
35113
|
+
placeholder: z60.string().optional()
|
|
35114
|
+
});
|
|
35115
|
+
var newsletterSignupBlockIdSchema = z60.string().trim().min(1).transform(parseRequiredNewsletterSignupBlockId);
|
|
35116
|
+
var signedNewsletterDestinationRefSchema = z60.string().trim().min(1).transform(parseRequiredSignedNewsletterDestinationRef);
|
|
35117
|
+
var newsletterPublicDestinationRefSchema = z60.discriminatedUnion("tag", [
|
|
35118
|
+
z60.object({
|
|
35119
|
+
tag: z60.literal("block_ref"),
|
|
34999
35120
|
blockId: newsletterSignupBlockIdSchema
|
|
35000
35121
|
}),
|
|
35001
|
-
|
|
35002
|
-
tag:
|
|
35122
|
+
z60.object({
|
|
35123
|
+
tag: z60.literal("signed_destination_ref"),
|
|
35003
35124
|
token: signedNewsletterDestinationRefSchema
|
|
35004
35125
|
})
|
|
35005
35126
|
]);
|
|
35006
|
-
var newsletterSourceSchema =
|
|
35007
|
-
blockId:
|
|
35008
|
-
siteId:
|
|
35009
|
-
apiBaseUrl:
|
|
35010
|
-
listId:
|
|
35127
|
+
var newsletterSourceSchema = z60.object({
|
|
35128
|
+
blockId: z60.string().nullable().optional(),
|
|
35129
|
+
siteId: z60.string().optional(),
|
|
35130
|
+
apiBaseUrl: z60.string().optional(),
|
|
35131
|
+
listId: z60.string().nullable().optional(),
|
|
35011
35132
|
destinationProvider: newsletterDestinationProviderSchema.nullable().optional(),
|
|
35012
35133
|
preset: newsletterPresetSchema.optional(),
|
|
35013
|
-
includePhone:
|
|
35014
|
-
buttonLabel:
|
|
35015
|
-
successMessage:
|
|
35016
|
-
privacyNote:
|
|
35017
|
-
tags:
|
|
35018
|
-
spamProtectionEnabled:
|
|
35019
|
-
className:
|
|
35020
|
-
});
|
|
35021
|
-
var newsletterDisplaySchema =
|
|
35022
|
-
kind:
|
|
35023
|
-
className:
|
|
35024
|
-
buttonLabel:
|
|
35025
|
-
successMessage:
|
|
35026
|
-
privacyNote:
|
|
35027
|
-
fields:
|
|
35028
|
-
});
|
|
35029
|
-
var newsletterHydrationSchema =
|
|
35134
|
+
includePhone: z60.boolean().optional(),
|
|
35135
|
+
buttonLabel: z60.string().nullable().optional(),
|
|
35136
|
+
successMessage: z60.string().nullable().optional(),
|
|
35137
|
+
privacyNote: z60.string().nullable().optional(),
|
|
35138
|
+
tags: z60.string().nullable().optional(),
|
|
35139
|
+
spamProtectionEnabled: z60.boolean().optional(),
|
|
35140
|
+
className: z60.string().nullable().optional()
|
|
35141
|
+
});
|
|
35142
|
+
var newsletterDisplaySchema = z60.object({
|
|
35143
|
+
kind: z60.literal("newsletter-form"),
|
|
35144
|
+
className: z60.string().nullable(),
|
|
35145
|
+
buttonLabel: z60.string(),
|
|
35146
|
+
successMessage: z60.string().nullable(),
|
|
35147
|
+
privacyNote: z60.string().nullable(),
|
|
35148
|
+
fields: z60.array(newsletterFieldSchema)
|
|
35149
|
+
});
|
|
35150
|
+
var newsletterHydrationSchema = z60.object({
|
|
35030
35151
|
destinationRef: newsletterPublicDestinationRefSchema.nullable().optional(),
|
|
35031
|
-
listId:
|
|
35152
|
+
listId: z60.string().nullable().optional(),
|
|
35032
35153
|
preset: newsletterPresetSchema,
|
|
35033
|
-
includePhone:
|
|
35034
|
-
tags:
|
|
35035
|
-
spamProtectionEnabled:
|
|
35154
|
+
includePhone: z60.boolean(),
|
|
35155
|
+
tags: z60.string().nullable().optional(),
|
|
35156
|
+
spamProtectionEnabled: z60.boolean().optional()
|
|
35036
35157
|
});
|
|
35037
|
-
var newsletterRenderSchema =
|
|
35158
|
+
var newsletterRenderSchema = z60.object({
|
|
35038
35159
|
display: newsletterDisplaySchema,
|
|
35039
35160
|
hydration: newsletterHydrationSchema
|
|
35040
35161
|
});
|
|
35041
|
-
var newsletterIslandMetaCodec = createZodCodec(
|
|
35042
|
-
siteId:
|
|
35043
|
-
apiBaseUrl:
|
|
35162
|
+
var newsletterIslandMetaCodec = createZodCodec(z60.object({
|
|
35163
|
+
siteId: z60.string().optional(),
|
|
35164
|
+
apiBaseUrl: z60.string().optional()
|
|
35044
35165
|
}));
|
|
35045
35166
|
var newsletterIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl");
|
|
35046
35167
|
function buildNewsletterDisplay(source) {
|
|
@@ -35179,23 +35300,23 @@ var newsletterSignupBlockDefinition = {
|
|
|
35179
35300
|
};
|
|
35180
35301
|
|
|
35181
35302
|
// ../blocks/src/system/blocks/team-members.ts
|
|
35182
|
-
import { z as
|
|
35303
|
+
import { z as z61 } from "zod";
|
|
35183
35304
|
var ITEM_NAME2 = "member";
|
|
35184
35305
|
var teamMemberPhotoSchema = mediaSchema2.refine((media2) => media2.type === "image", {
|
|
35185
35306
|
message: "Team member photos must be image media"
|
|
35186
35307
|
}).nullable();
|
|
35187
|
-
var teamMemberDataSchema =
|
|
35188
|
-
_type:
|
|
35189
|
-
id:
|
|
35190
|
-
name:
|
|
35191
|
-
role:
|
|
35192
|
-
roleLabel:
|
|
35193
|
-
bio:
|
|
35194
|
-
summary:
|
|
35308
|
+
var teamMemberDataSchema = z61.object({
|
|
35309
|
+
_type: z61.literal("teamMember"),
|
|
35310
|
+
id: z61.string(),
|
|
35311
|
+
name: z61.string(),
|
|
35312
|
+
role: z61.string().nullable(),
|
|
35313
|
+
roleLabel: z61.string().nullable(),
|
|
35314
|
+
bio: z61.string().nullable(),
|
|
35315
|
+
summary: z61.string().nullable(),
|
|
35195
35316
|
photo: teamMemberPhotoSchema,
|
|
35196
|
-
profilePath:
|
|
35317
|
+
profilePath: z61.string().nullable()
|
|
35197
35318
|
});
|
|
35198
|
-
var teamMembersDataSchema =
|
|
35319
|
+
var teamMembersDataSchema = z61.array(teamMemberDataSchema);
|
|
35199
35320
|
var dynamicSourceWhen = { equals: "site_staff" };
|
|
35200
35321
|
var manualSourceWhen = { equals: "site_staff", not: true };
|
|
35201
35322
|
var headingNode = text(
|
|
@@ -36087,13 +36208,6 @@ var systemBlockDefinitionsRaw = [
|
|
|
36087
36208
|
weight: "featured",
|
|
36088
36209
|
bias: "clear",
|
|
36089
36210
|
surfaces: heroSectionSurfaces
|
|
36090
|
-
}),
|
|
36091
|
-
layoutProfile({
|
|
36092
|
-
variantKey: "splitEditorial",
|
|
36093
|
-
family: "split",
|
|
36094
|
-
weight: "featured",
|
|
36095
|
-
bias: "clear",
|
|
36096
|
-
surfaces: heroSectionSurfaces
|
|
36097
36211
|
})
|
|
36098
36212
|
]
|
|
36099
36213
|
})),
|
|
@@ -36337,9 +36451,8 @@ var systemBlockDefinitionsRaw = [
|
|
|
36337
36451
|
flow: offeringsFlow,
|
|
36338
36452
|
layoutProfiles: [
|
|
36339
36453
|
layoutProfile({ variantKey: "combined", family: "grid", weight: "standard" }),
|
|
36454
|
+
layoutProfile({ variantKey: "calendar", family: "stack", weight: "standard" }),
|
|
36340
36455
|
layoutProfile({ variantKey: "list", family: "stack", weight: "standard" }),
|
|
36341
|
-
layoutProfile({ variantKey: "month", family: "grid", weight: "standard" }),
|
|
36342
|
-
layoutProfile({ variantKey: "week", family: "stack", weight: "standard" }),
|
|
36343
36456
|
layoutProfile({ variantKey: "timetable", family: "stack", weight: "standard" })
|
|
36344
36457
|
]
|
|
36345
36458
|
})),
|
|
@@ -36902,10 +37015,7 @@ function normalizeRenderStage(stage) {
|
|
|
36902
37015
|
return stage === "preview" ? "preview" : "published";
|
|
36903
37016
|
}
|
|
36904
37017
|
function isRouteVisibleInStage(routeEntry, stageInput) {
|
|
36905
|
-
|
|
36906
|
-
if (stage === "preview" || !isRouteRecord(routeEntry)) {
|
|
36907
|
-
return true;
|
|
36908
|
-
}
|
|
37018
|
+
if (normalizeRenderStage(stageInput) === "preview" || !isRouteRecord(routeEntry)) return true;
|
|
36909
37019
|
const status = routeEntry.status;
|
|
36910
37020
|
return !(typeof status === "string" && status !== "published");
|
|
36911
37021
|
}
|
|
@@ -36914,52 +37024,45 @@ function extractRouteHref(candidate, stageInput = "published") {
|
|
|
36914
37024
|
const trimmed = candidate.trim();
|
|
36915
37025
|
return trimmed.length > 0 ? trimmed : null;
|
|
36916
37026
|
}
|
|
36917
|
-
if (!isRouteRecord(candidate))
|
|
36918
|
-
|
|
36919
|
-
|
|
36920
|
-
|
|
36921
|
-
|
|
37027
|
+
if (!isRouteRecord(candidate)) return null;
|
|
37028
|
+
const fields3 = normalizeRenderStage(stageInput) === "preview" ? [
|
|
37029
|
+
"draftPath",
|
|
37030
|
+
"path",
|
|
37031
|
+
"href",
|
|
37032
|
+
"url"
|
|
37033
|
+
] : [
|
|
37034
|
+
"path",
|
|
37035
|
+
"href",
|
|
37036
|
+
"url"
|
|
37037
|
+
];
|
|
36922
37038
|
for (const field of fields3) {
|
|
36923
37039
|
const value = candidate[field];
|
|
36924
|
-
if (typeof value === "string" && value.trim().length > 0)
|
|
36925
|
-
return value.trim();
|
|
36926
|
-
}
|
|
37040
|
+
if (typeof value === "string" && value.trim().length > 0) return value.trim();
|
|
36927
37041
|
}
|
|
36928
37042
|
return null;
|
|
36929
37043
|
}
|
|
36930
37044
|
function extractRouteUpdatedAt(candidate) {
|
|
36931
|
-
if (!isRouteRecord(candidate))
|
|
36932
|
-
|
|
36933
|
-
}
|
|
36934
|
-
const fields3 = [
|
|
37045
|
+
if (!isRouteRecord(candidate)) return null;
|
|
37046
|
+
for (const field of [
|
|
36935
37047
|
"updatedAt",
|
|
36936
37048
|
"updated_at",
|
|
36937
37049
|
"publishedAt",
|
|
36938
37050
|
"published_at",
|
|
36939
37051
|
"modifiedAt",
|
|
36940
37052
|
"modified_at"
|
|
36941
|
-
]
|
|
36942
|
-
for (const field of fields3) {
|
|
37053
|
+
]) {
|
|
36943
37054
|
const value = candidate[field];
|
|
36944
|
-
if (typeof value === "string" && value.length > 0)
|
|
36945
|
-
return value;
|
|
36946
|
-
}
|
|
37055
|
+
if (typeof value === "string" && value.length > 0) return value;
|
|
36947
37056
|
}
|
|
36948
37057
|
return null;
|
|
36949
37058
|
}
|
|
36950
37059
|
function resolveRouteTargetForStage(routeIdValue, routes, stageInput) {
|
|
36951
37060
|
const routeId = typeof routeIdValue === "string" ? routeIdValue : null;
|
|
36952
|
-
if (!routeId || !routes)
|
|
36953
|
-
return null;
|
|
36954
|
-
}
|
|
37061
|
+
if (!routeId || !routes) return null;
|
|
36955
37062
|
const routeEntry = routes[routeId];
|
|
36956
|
-
if (!isRouteVisibleInStage(routeEntry, stageInput))
|
|
36957
|
-
return null;
|
|
36958
|
-
}
|
|
37063
|
+
if (!isRouteVisibleInStage(routeEntry, stageInput)) return null;
|
|
36959
37064
|
const href = extractRouteHref(routeEntry, stageInput);
|
|
36960
|
-
if (!href)
|
|
36961
|
-
return null;
|
|
36962
|
-
}
|
|
37065
|
+
if (!href) return null;
|
|
36963
37066
|
return {
|
|
36964
37067
|
routeId,
|
|
36965
37068
|
href,
|
|
@@ -37889,42 +37992,45 @@ import { jsx as jsx5 } from "react/jsx-runtime";
|
|
|
37889
37992
|
import * as React from "react";
|
|
37890
37993
|
import { Fragment, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
37891
37994
|
|
|
37995
|
+
// ../theme-core/src/ResponsiveScope.tsx
|
|
37996
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
37997
|
+
|
|
37892
37998
|
// ../theme-core/src/fonts/uploadFormat.ts
|
|
37893
37999
|
var MAX_FONT_UPLOAD_BYTES = 5 * 1024 * 1024;
|
|
37894
38000
|
|
|
37895
38001
|
// ../theme-core/src/runtime/buildThemeRuntimeFromBridge.ts
|
|
37896
|
-
import { z as
|
|
37897
|
-
var themeBridgeConfigSchema =
|
|
37898
|
-
tokens:
|
|
37899
|
-
typography:
|
|
37900
|
-
headingFamily:
|
|
37901
|
-
bodyFamily:
|
|
37902
|
-
headingWeight:
|
|
37903
|
-
bodyWeight:
|
|
38002
|
+
import { z as z62 } from "zod";
|
|
38003
|
+
var themeBridgeConfigSchema = z62.object({
|
|
38004
|
+
tokens: z62.record(z62.string(), z62.string()),
|
|
38005
|
+
typography: z62.object({
|
|
38006
|
+
headingFamily: z62.string().optional(),
|
|
38007
|
+
bodyFamily: z62.string().optional(),
|
|
38008
|
+
headingWeight: z62.number().optional(),
|
|
38009
|
+
bodyWeight: z62.number().optional()
|
|
37904
38010
|
}).optional(),
|
|
37905
|
-
spacing:
|
|
37906
|
-
corners:
|
|
37907
|
-
shadows:
|
|
37908
|
-
components:
|
|
37909
|
-
buttons:
|
|
37910
|
-
|
|
37911
|
-
|
|
37912
|
-
variants:
|
|
38011
|
+
spacing: z62.enum(["comfortable", "standard", "dense"]).optional(),
|
|
38012
|
+
corners: z62.enum(["square", "soft", "rounded", "pill"]).optional(),
|
|
38013
|
+
shadows: z62.enum(["none", "low", "medium", "high"]).optional(),
|
|
38014
|
+
components: z62.object({
|
|
38015
|
+
buttons: z62.union([
|
|
38016
|
+
z62.boolean(),
|
|
38017
|
+
z62.object({
|
|
38018
|
+
variants: z62.array(z62.enum(["primary", "secondary", "outline", "ghost"])).optional()
|
|
37913
38019
|
})
|
|
37914
38020
|
]).optional(),
|
|
37915
|
-
cards:
|
|
37916
|
-
|
|
37917
|
-
|
|
37918
|
-
variants:
|
|
38021
|
+
cards: z62.union([
|
|
38022
|
+
z62.boolean(),
|
|
38023
|
+
z62.object({
|
|
38024
|
+
variants: z62.array(z62.enum(["default", "elevated", "outlined"])).optional()
|
|
37919
38025
|
})
|
|
37920
38026
|
]).optional(),
|
|
37921
|
-
inputs:
|
|
38027
|
+
inputs: z62.boolean().optional()
|
|
37922
38028
|
}).optional(),
|
|
37923
|
-
overrides:
|
|
38029
|
+
overrides: z62.record(z62.string(), z62.string()).optional()
|
|
37924
38030
|
}).passthrough();
|
|
37925
38031
|
|
|
37926
38032
|
// ../theme-core/src/siteChrome.tsx
|
|
37927
|
-
import { Fragment as Fragment2, jsx as
|
|
38033
|
+
import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
37928
38034
|
|
|
37929
38035
|
// ../blocks/src/system/data/loaderEndpoints.ts
|
|
37930
38036
|
var SUPPORTED_LOADER_ENDPOINTS = [
|
|
@@ -37946,17 +38052,17 @@ var SUPPORTED_LOADER_ENDPOINTS = [
|
|
|
37946
38052
|
function unsafeRetypeZodSchema(schema) {
|
|
37947
38053
|
return schema;
|
|
37948
38054
|
}
|
|
37949
|
-
var navIdListSchema =
|
|
38055
|
+
var navIdListSchema = z63.preprocess((value) => {
|
|
37950
38056
|
if (!Array.isArray(value)) return void 0;
|
|
37951
38057
|
const filtered = value.filter((v) => typeof v === "string" && v.trim().length > 0);
|
|
37952
38058
|
return filtered.length > 0 ? filtered : void 0;
|
|
37953
|
-
},
|
|
37954
|
-
var dashboardNavVisibilityBaseSchema =
|
|
37955
|
-
mode:
|
|
38059
|
+
}, z63.array(z63.string()).max(200).optional());
|
|
38060
|
+
var dashboardNavVisibilityBaseSchema = z63.object({
|
|
38061
|
+
mode: z63.enum(["augment", "restrict"]).optional(),
|
|
37956
38062
|
allowIds: navIdListSchema,
|
|
37957
38063
|
denyIds: navIdListSchema
|
|
37958
38064
|
}).strip();
|
|
37959
|
-
var dashboardNavVisibilityRolesSchema =
|
|
38065
|
+
var dashboardNavVisibilityRolesSchema = z63.object({
|
|
37960
38066
|
administrator: dashboardNavVisibilityBaseSchema.optional(),
|
|
37961
38067
|
editor: dashboardNavVisibilityBaseSchema.optional(),
|
|
37962
38068
|
team_member: dashboardNavVisibilityBaseSchema.optional()
|
|
@@ -37964,63 +38070,63 @@ var dashboardNavVisibilityRolesSchema = z65.object({
|
|
|
37964
38070
|
var dashboardNavVisibilitySchema = dashboardNavVisibilityBaseSchema.extend({
|
|
37965
38071
|
roles: dashboardNavVisibilityRolesSchema
|
|
37966
38072
|
}).strip();
|
|
37967
|
-
var dashboardNavigationConfigSchema =
|
|
38073
|
+
var dashboardNavigationConfigSchema = z63.object({
|
|
37968
38074
|
siteNav: dashboardNavVisibilitySchema.optional(),
|
|
37969
38075
|
settingsNav: dashboardNavVisibilitySchema.optional()
|
|
37970
38076
|
}).strip();
|
|
37971
|
-
var dashboardConfigSchema =
|
|
37972
|
-
previewEditingEnabled:
|
|
38077
|
+
var dashboardConfigSchema = z63.object({
|
|
38078
|
+
previewEditingEnabled: z63.boolean().optional(),
|
|
37973
38079
|
navigation: dashboardNavigationConfigSchema.optional()
|
|
37974
38080
|
}).strip();
|
|
37975
38081
|
var fieldDefinitionInputSchema = unsafeRetypeZodSchema(fieldSchema);
|
|
37976
38082
|
var nodeDefinitionSchema = unsafeRetypeZodSchema(NodeSchema);
|
|
37977
|
-
var sdkLoaderEndpointSchema =
|
|
37978
|
-
var loaderFallbackScalarSchema =
|
|
37979
|
-
|
|
37980
|
-
|
|
37981
|
-
|
|
37982
|
-
|
|
38083
|
+
var sdkLoaderEndpointSchema = z63.enum(SUPPORTED_LOADER_ENDPOINTS);
|
|
38084
|
+
var loaderFallbackScalarSchema = z63.union([
|
|
38085
|
+
z63.string(),
|
|
38086
|
+
z63.number(),
|
|
38087
|
+
z63.boolean(),
|
|
38088
|
+
z63.null()
|
|
37983
38089
|
]);
|
|
37984
|
-
var loaderParamBindingSchema =
|
|
37985
|
-
$bind:
|
|
37986
|
-
from:
|
|
38090
|
+
var loaderParamBindingSchema = z63.object({
|
|
38091
|
+
$bind: z63.object({
|
|
38092
|
+
from: z63.string().min(1, "Binding path is required"),
|
|
37987
38093
|
fallback: loaderFallbackScalarSchema.optional()
|
|
37988
38094
|
})
|
|
37989
38095
|
});
|
|
37990
|
-
var loaderParamValueSchema =
|
|
37991
|
-
|
|
37992
|
-
|
|
37993
|
-
|
|
38096
|
+
var loaderParamValueSchema = z63.union([
|
|
38097
|
+
z63.string(),
|
|
38098
|
+
z63.number(),
|
|
38099
|
+
z63.boolean(),
|
|
37994
38100
|
loaderParamBindingSchema
|
|
37995
38101
|
]);
|
|
37996
|
-
var sdkConfigLoaderSchema =
|
|
38102
|
+
var sdkConfigLoaderSchema = z63.object({
|
|
37997
38103
|
endpoint: sdkLoaderEndpointSchema,
|
|
37998
|
-
params:
|
|
37999
|
-
mode:
|
|
38104
|
+
params: z63.record(z63.string(), loaderParamValueSchema),
|
|
38105
|
+
mode: z63.enum(["server", "client"]).default("server")
|
|
38000
38106
|
});
|
|
38001
|
-
var sdkDataLoadersSchema =
|
|
38002
|
-
var sdkCustomBlockIdSchema =
|
|
38107
|
+
var sdkDataLoadersSchema = z63.record(z63.string(), sdkConfigLoaderSchema).refine((loaders) => Object.keys(loaders).length <= 5, { message: "Maximum 5 data loaders per block" }).optional();
|
|
38108
|
+
var sdkCustomBlockIdSchema = z63.string().min(8).regex(/^custom\.[a-z][a-z0-9-]*$/, {
|
|
38003
38109
|
message: "Block ID must start with 'custom.' followed by lowercase letters, numbers, or hyphens"
|
|
38004
38110
|
}).transform((value) => value);
|
|
38005
|
-
var sdkCustomBlockInputSchema =
|
|
38111
|
+
var sdkCustomBlockInputSchema = z63.object({
|
|
38006
38112
|
id: sdkCustomBlockIdSchema,
|
|
38007
|
-
title:
|
|
38008
|
-
titleSource:
|
|
38009
|
-
description:
|
|
38113
|
+
title: z63.string().min(1),
|
|
38114
|
+
titleSource: z63.union([z63.string().min(1), z63.array(z63.string().min(1)).min(1)]).optional(),
|
|
38115
|
+
description: z63.string().optional(),
|
|
38010
38116
|
category: blockCategoryEnum,
|
|
38011
|
-
icon:
|
|
38012
|
-
tags:
|
|
38117
|
+
icon: z63.string().optional(),
|
|
38118
|
+
tags: z63.array(z63.string()).optional(),
|
|
38013
38119
|
fields: fieldDefinitionInputSchema.array().min(1),
|
|
38014
38120
|
dataLoaders: sdkDataLoadersSchema,
|
|
38015
38121
|
layout: NodeSchema.optional(),
|
|
38016
|
-
variants:
|
|
38017
|
-
defaultVariant:
|
|
38018
|
-
variantOptions:
|
|
38019
|
-
|
|
38020
|
-
|
|
38021
|
-
label:
|
|
38022
|
-
description:
|
|
38023
|
-
icon:
|
|
38122
|
+
variants: z63.record(z63.string().min(1), NodeSchema).optional(),
|
|
38123
|
+
defaultVariant: z63.string().min(1).optional(),
|
|
38124
|
+
variantOptions: z63.record(
|
|
38125
|
+
z63.string().min(1),
|
|
38126
|
+
z63.object({
|
|
38127
|
+
label: z63.string().min(1).optional(),
|
|
38128
|
+
description: z63.string().min(1).optional(),
|
|
38129
|
+
icon: z63.string().min(1).optional()
|
|
38024
38130
|
})
|
|
38025
38131
|
).optional(),
|
|
38026
38132
|
previewCustomize: previewCustomizeManifestCurationSchema.optional()
|
|
@@ -38031,7 +38137,7 @@ var sdkCustomBlockInputSchema = z65.object({
|
|
|
38031
38137
|
const exists = data.fields.some((field) => field.id === source);
|
|
38032
38138
|
if (!exists) {
|
|
38033
38139
|
ctx.addIssue({
|
|
38034
|
-
code:
|
|
38140
|
+
code: z63.ZodIssueCode.custom,
|
|
38035
38141
|
message: `titleSource must reference a valid field ID (got "${source}")`,
|
|
38036
38142
|
path: Array.isArray(data.titleSource) ? ["titleSource", index] : ["titleSource"]
|
|
38037
38143
|
});
|
|
@@ -38040,7 +38146,7 @@ var sdkCustomBlockInputSchema = z65.object({
|
|
|
38040
38146
|
}
|
|
38041
38147
|
if (data.layout && data.variants) {
|
|
38042
38148
|
ctx.addIssue({
|
|
38043
|
-
code:
|
|
38149
|
+
code: z63.ZodIssueCode.custom,
|
|
38044
38150
|
message: "Custom block must define either `layout` or `variants`, not both",
|
|
38045
38151
|
path: ["variants"]
|
|
38046
38152
|
});
|
|
@@ -38049,14 +38155,14 @@ var sdkCustomBlockInputSchema = z65.object({
|
|
|
38049
38155
|
const keys = Object.keys(data.variants);
|
|
38050
38156
|
if (keys.length === 0) {
|
|
38051
38157
|
ctx.addIssue({
|
|
38052
|
-
code:
|
|
38158
|
+
code: z63.ZodIssueCode.custom,
|
|
38053
38159
|
message: "`variants` must contain at least one variant key",
|
|
38054
38160
|
path: ["variants"]
|
|
38055
38161
|
});
|
|
38056
38162
|
}
|
|
38057
38163
|
if (data.defaultVariant && !Object.prototype.hasOwnProperty.call(data.variants, data.defaultVariant)) {
|
|
38058
38164
|
ctx.addIssue({
|
|
38059
|
-
code:
|
|
38165
|
+
code: z63.ZodIssueCode.custom,
|
|
38060
38166
|
message: "`defaultVariant` must be a key present in `variants`",
|
|
38061
38167
|
path: ["defaultVariant"]
|
|
38062
38168
|
});
|
|
@@ -38065,7 +38171,7 @@ var sdkCustomBlockInputSchema = z65.object({
|
|
|
38065
38171
|
for (const key of Object.keys(data.variantOptions)) {
|
|
38066
38172
|
if (!Object.prototype.hasOwnProperty.call(data.variants, key)) {
|
|
38067
38173
|
ctx.addIssue({
|
|
38068
|
-
code:
|
|
38174
|
+
code: z63.ZodIssueCode.custom,
|
|
38069
38175
|
message: "`variantOptions` key must exist in `variants`",
|
|
38070
38176
|
path: ["variantOptions", key]
|
|
38071
38177
|
});
|
|
@@ -38074,78 +38180,78 @@ var sdkCustomBlockInputSchema = z65.object({
|
|
|
38074
38180
|
}
|
|
38075
38181
|
}
|
|
38076
38182
|
});
|
|
38077
|
-
var sdkBlockFieldExtensionInputSchema =
|
|
38183
|
+
var sdkBlockFieldExtensionInputSchema = z63.object({
|
|
38078
38184
|
fields: fieldDefinitionInputSchema.array().min(1)
|
|
38079
38185
|
});
|
|
38080
|
-
var sdkBlockFieldExtensionsInputSchema =
|
|
38081
|
-
|
|
38186
|
+
var sdkBlockFieldExtensionsInputSchema = z63.record(
|
|
38187
|
+
z63.string().min(1),
|
|
38082
38188
|
sdkBlockFieldExtensionInputSchema
|
|
38083
38189
|
);
|
|
38084
|
-
var sdkThemePaletteSchema =
|
|
38085
|
-
var sdkThemeConfigSchema =
|
|
38190
|
+
var sdkThemePaletteSchema = z63.record(z63.string(), z63.string());
|
|
38191
|
+
var sdkThemeConfigSchema = z63.object({
|
|
38086
38192
|
palette: sdkThemePaletteSchema
|
|
38087
38193
|
});
|
|
38088
|
-
var sdkSectionBackgroundSchema =
|
|
38089
|
-
id:
|
|
38090
|
-
label:
|
|
38091
|
-
token:
|
|
38194
|
+
var sdkSectionBackgroundSchema = z63.object({
|
|
38195
|
+
id: z63.string().min(1),
|
|
38196
|
+
label: z63.string().min(1),
|
|
38197
|
+
token: z63.string().min(1)
|
|
38092
38198
|
});
|
|
38093
|
-
var sdkSectionOptionsConfigSchema =
|
|
38094
|
-
backgroundColor:
|
|
38095
|
-
backgroundImage:
|
|
38096
|
-
backgroundGradient:
|
|
38097
|
-
spacing:
|
|
38098
|
-
textColor:
|
|
38199
|
+
var sdkSectionOptionsConfigSchema = z63.object({
|
|
38200
|
+
backgroundColor: z63.boolean().optional(),
|
|
38201
|
+
backgroundImage: z63.boolean().optional(),
|
|
38202
|
+
backgroundGradient: z63.boolean().optional(),
|
|
38203
|
+
spacing: z63.union([z63.array(z63.enum(["compact", "default", "spacious"])), z63.boolean()]).optional(),
|
|
38204
|
+
textColor: z63.boolean().optional()
|
|
38099
38205
|
});
|
|
38100
|
-
var sdkContainerOptionsConfigSchema =
|
|
38101
|
-
maxWidth:
|
|
38102
|
-
alignment:
|
|
38206
|
+
var sdkContainerOptionsConfigSchema = z63.object({
|
|
38207
|
+
maxWidth: z63.union([z63.array(z63.enum(["narrow", "default", "wide", "full"])), z63.boolean()]).optional(),
|
|
38208
|
+
alignment: z63.union([z63.array(z63.enum(["left", "center", "right"])), z63.boolean()]).optional()
|
|
38103
38209
|
});
|
|
38104
|
-
var sdkSiteStyleConfigSchema =
|
|
38105
|
-
sectionBackgrounds:
|
|
38210
|
+
var sdkSiteStyleConfigSchema = z63.object({
|
|
38211
|
+
sectionBackgrounds: z63.array(sdkSectionBackgroundSchema).optional(),
|
|
38106
38212
|
sectionOptions: sdkSectionOptionsConfigSchema.optional(),
|
|
38107
38213
|
containerOptions: sdkContainerOptionsConfigSchema.optional()
|
|
38108
38214
|
});
|
|
38109
|
-
var sdkSiteLayoutConfigSchema =
|
|
38110
|
-
footerBlocks:
|
|
38111
|
-
|
|
38112
|
-
id:
|
|
38113
|
-
kind:
|
|
38114
|
-
content:
|
|
38215
|
+
var sdkSiteLayoutConfigSchema = z63.object({
|
|
38216
|
+
footerBlocks: z63.array(
|
|
38217
|
+
z63.object({
|
|
38218
|
+
id: z63.string().min(1).optional(),
|
|
38219
|
+
kind: z63.string().min(1),
|
|
38220
|
+
content: z63.record(z63.string(), z63.unknown()).optional()
|
|
38115
38221
|
})
|
|
38116
38222
|
).optional()
|
|
38117
38223
|
});
|
|
38118
|
-
var sdkFieldSelectOptionSchema =
|
|
38119
|
-
value:
|
|
38120
|
-
label:
|
|
38224
|
+
var sdkFieldSelectOptionSchema = z63.object({
|
|
38225
|
+
value: z63.string(),
|
|
38226
|
+
label: z63.string()
|
|
38121
38227
|
});
|
|
38122
|
-
var sdkBlockFieldConfigSchema =
|
|
38123
|
-
options:
|
|
38228
|
+
var sdkBlockFieldConfigSchema = z63.object({
|
|
38229
|
+
options: z63.array(sdkFieldSelectOptionSchema).optional()
|
|
38124
38230
|
});
|
|
38125
|
-
var sdkBlockFieldOptionsMapSchema =
|
|
38126
|
-
|
|
38231
|
+
var sdkBlockFieldOptionsMapSchema = z63.record(
|
|
38232
|
+
z63.string().regex(/^(block\.|custom\.)[a-z][a-z0-9-]*$/, {
|
|
38127
38233
|
message: "Block ID must be 'block.*' or 'custom.*' format"
|
|
38128
38234
|
}),
|
|
38129
|
-
|
|
38235
|
+
z63.record(z63.string().min(1), sdkBlockFieldConfigSchema)
|
|
38130
38236
|
).optional();
|
|
38131
|
-
var sdkContentTypeTemplateConfigSchema =
|
|
38132
|
-
blocks:
|
|
38237
|
+
var sdkContentTypeTemplateConfigSchema = z63.object({
|
|
38238
|
+
blocks: z63.array(z63.unknown())
|
|
38133
38239
|
}).passthrough();
|
|
38134
|
-
var sdkContentTypeOrderingConfigSchema =
|
|
38135
|
-
mode:
|
|
38240
|
+
var sdkContentTypeOrderingConfigSchema = z63.object({
|
|
38241
|
+
mode: z63.enum(["default", "manual"]).optional()
|
|
38136
38242
|
}).optional();
|
|
38137
|
-
var sdkContentTypeConfigSchema =
|
|
38138
|
-
key:
|
|
38139
|
-
fields:
|
|
38243
|
+
var sdkContentTypeConfigSchema = z63.object({
|
|
38244
|
+
key: z63.string().min(1),
|
|
38245
|
+
fields: z63.array(z63.unknown()),
|
|
38140
38246
|
ordering: sdkContentTypeOrderingConfigSchema,
|
|
38141
38247
|
template: sdkContentTypeTemplateConfigSchema.nullable().optional()
|
|
38142
38248
|
}).passthrough();
|
|
38143
|
-
var sdkContentConfigSchema =
|
|
38144
|
-
contentTypes:
|
|
38145
|
-
pages:
|
|
38146
|
-
entries:
|
|
38147
|
-
navigationMenus:
|
|
38148
|
-
settings:
|
|
38249
|
+
var sdkContentConfigSchema = z63.object({
|
|
38250
|
+
contentTypes: z63.array(sdkContentTypeConfigSchema).optional(),
|
|
38251
|
+
pages: z63.array(z63.unknown()).optional(),
|
|
38252
|
+
entries: z63.array(z63.unknown()).optional(),
|
|
38253
|
+
navigationMenus: z63.array(z63.unknown()).optional(),
|
|
38254
|
+
settings: z63.unknown().optional()
|
|
38149
38255
|
}).passthrough();
|
|
38150
38256
|
var SDK_WORKFLOW_ID_MAX_LENGTH = 120;
|
|
38151
38257
|
var SDK_WORKFLOW_TITLE_MAX_LENGTH = 120;
|
|
@@ -38160,62 +38266,62 @@ var SDK_WORKFLOW_CONFIRMATION_TITLE_MAX_LENGTH = 120;
|
|
|
38160
38266
|
var SDK_WORKFLOW_CONFIRMATION_BODY_MAX_LENGTH = 500;
|
|
38161
38267
|
var SDK_WORKFLOW_ID_PATTERN = /^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$/;
|
|
38162
38268
|
var SDK_WORKFLOW_ENDPOINT_PATTERN = /^\//;
|
|
38163
|
-
var sdkWorkflowIdSchema =
|
|
38269
|
+
var sdkWorkflowIdSchema = z63.string().min(1).max(SDK_WORKFLOW_ID_MAX_LENGTH).regex(SDK_WORKFLOW_ID_PATTERN, {
|
|
38164
38270
|
message: "Workflow ID must start with a lowercase letter and use lowercase letters, numbers, dots, underscores, or hyphens"
|
|
38165
38271
|
});
|
|
38166
|
-
var sdkWorkflowEndpointSchema =
|
|
38167
|
-
var sdkWorkflowManualTriggerSchema =
|
|
38168
|
-
type:
|
|
38272
|
+
var sdkWorkflowEndpointSchema = z63.string().min(1).max(SDK_WORKFLOW_ENDPOINT_MAX_LENGTH).regex(SDK_WORKFLOW_ENDPOINT_PATTERN, { message: 'Workflow endpoint must be a site-relative path starting with "/"' });
|
|
38273
|
+
var sdkWorkflowManualTriggerSchema = z63.object({
|
|
38274
|
+
type: z63.literal("manual")
|
|
38169
38275
|
}).strict();
|
|
38170
|
-
var sdkWorkflowTriggerFieldSchema =
|
|
38276
|
+
var sdkWorkflowTriggerFieldSchema = z63.string().trim().min(1).max(SDK_WORKFLOW_TRIGGER_FIELD_MAX_LENGTH).refine((field) => !field.includes("."), {
|
|
38171
38277
|
message: "Workflow trigger fields must be top-level content field IDs, not paths"
|
|
38172
38278
|
});
|
|
38173
|
-
var sdkWorkflowFieldChangedConditionSchema =
|
|
38279
|
+
var sdkWorkflowFieldChangedConditionSchema = z63.object({
|
|
38174
38280
|
field: sdkWorkflowTriggerFieldSchema,
|
|
38175
|
-
changed:
|
|
38281
|
+
changed: z63.literal(true)
|
|
38176
38282
|
}).strict();
|
|
38177
|
-
var sdkWorkflowFieldEmptyConditionSchema =
|
|
38283
|
+
var sdkWorkflowFieldEmptyConditionSchema = z63.object({
|
|
38178
38284
|
field: sdkWorkflowTriggerFieldSchema,
|
|
38179
|
-
isEmpty:
|
|
38285
|
+
isEmpty: z63.boolean()
|
|
38180
38286
|
}).strict();
|
|
38181
|
-
var sdkWorkflowEntryDraftUpdatedTriggerSchema =
|
|
38182
|
-
type:
|
|
38183
|
-
when:
|
|
38184
|
-
|
|
38287
|
+
var sdkWorkflowEntryDraftUpdatedTriggerSchema = z63.object({
|
|
38288
|
+
type: z63.literal("entry.draft.updated"),
|
|
38289
|
+
when: z63.array(
|
|
38290
|
+
z63.union([
|
|
38185
38291
|
sdkWorkflowFieldChangedConditionSchema,
|
|
38186
38292
|
sdkWorkflowFieldEmptyConditionSchema
|
|
38187
38293
|
])
|
|
38188
38294
|
).min(1).max(SDK_WORKFLOW_TRIGGER_CONDITION_MAX_COUNT)
|
|
38189
38295
|
}).strict();
|
|
38190
|
-
var sdkWorkflowTriggerSchema =
|
|
38296
|
+
var sdkWorkflowTriggerSchema = z63.discriminatedUnion("type", [
|
|
38191
38297
|
sdkWorkflowManualTriggerSchema,
|
|
38192
38298
|
sdkWorkflowEntryDraftUpdatedTriggerSchema
|
|
38193
38299
|
]);
|
|
38194
|
-
var sdkWorkflowConfirmationSchema =
|
|
38195
|
-
title:
|
|
38196
|
-
body:
|
|
38300
|
+
var sdkWorkflowConfirmationSchema = z63.object({
|
|
38301
|
+
title: z63.string().trim().min(1).max(SDK_WORKFLOW_CONFIRMATION_TITLE_MAX_LENGTH),
|
|
38302
|
+
body: z63.string().trim().min(1).max(SDK_WORKFLOW_CONFIRMATION_BODY_MAX_LENGTH).optional()
|
|
38197
38303
|
}).strict();
|
|
38198
|
-
var sdkWorkflowConfigSchema =
|
|
38304
|
+
var sdkWorkflowConfigSchema = z63.object({
|
|
38199
38305
|
id: sdkWorkflowIdSchema,
|
|
38200
|
-
title:
|
|
38201
|
-
description:
|
|
38202
|
-
contentType:
|
|
38306
|
+
title: z63.string().trim().min(1).max(SDK_WORKFLOW_TITLE_MAX_LENGTH),
|
|
38307
|
+
description: z63.string().trim().min(1).max(SDK_WORKFLOW_DESCRIPTION_MAX_LENGTH).optional(),
|
|
38308
|
+
contentType: z63.string().trim().min(1).max(SDK_WORKFLOW_CONTENT_TYPE_MAX_LENGTH),
|
|
38203
38309
|
endpoint: sdkWorkflowEndpointSchema,
|
|
38204
|
-
triggers:
|
|
38310
|
+
triggers: z63.array(sdkWorkflowTriggerSchema).min(1).max(SDK_WORKFLOW_TRIGGER_MAX_COUNT),
|
|
38205
38311
|
confirmation: sdkWorkflowConfirmationSchema.optional()
|
|
38206
38312
|
}).strict();
|
|
38207
|
-
var sdkWorkflowsSchema =
|
|
38313
|
+
var sdkWorkflowsSchema = z63.array(sdkWorkflowConfigSchema).max(SDK_WORKFLOW_MAX_COUNT, "Maximum 50 workflows per site").refine((workflows) => {
|
|
38208
38314
|
const ids = workflows.map((workflow) => workflow.id);
|
|
38209
38315
|
return ids.length === new Set(ids).size;
|
|
38210
38316
|
}, { message: "Workflow IDs must be unique" }).optional();
|
|
38211
|
-
var riverbankSiteConfigInputSchema =
|
|
38212
|
-
siteId:
|
|
38213
|
-
previewUrl:
|
|
38214
|
-
liveUrl:
|
|
38317
|
+
var riverbankSiteConfigInputSchema = z63.object({
|
|
38318
|
+
siteId: z63.string().uuid(),
|
|
38319
|
+
previewUrl: z63.string().url().optional(),
|
|
38320
|
+
liveUrl: z63.string().url().optional(),
|
|
38215
38321
|
theme: sdkThemeConfigSchema.optional(),
|
|
38216
38322
|
styles: sdkSiteStyleConfigSchema.optional(),
|
|
38217
38323
|
layout: sdkSiteLayoutConfigSchema.optional(),
|
|
38218
|
-
customBlocks:
|
|
38324
|
+
customBlocks: z63.array(sdkCustomBlockInputSchema).max(100, "Maximum 100 custom blocks per site").refine((blocks) => {
|
|
38219
38325
|
const ids = blocks.map((b) => b.id);
|
|
38220
38326
|
return ids.length === new Set(ids).size;
|
|
38221
38327
|
}, { message: "Block IDs must be unique" }).optional(),
|
|
@@ -38223,50 +38329,50 @@ var riverbankSiteConfigInputSchema = z65.object({
|
|
|
38223
38329
|
blockFieldExtensions: sdkBlockFieldExtensionsInputSchema.optional(),
|
|
38224
38330
|
workflows: sdkWorkflowsSchema,
|
|
38225
38331
|
content: sdkContentConfigSchema.optional(),
|
|
38226
|
-
contentDir:
|
|
38227
|
-
sync:
|
|
38228
|
-
existingEntries:
|
|
38332
|
+
contentDir: z63.string().optional(),
|
|
38333
|
+
sync: z63.object({
|
|
38334
|
+
existingEntries: z63.enum(["skip", "update"]).optional()
|
|
38229
38335
|
}).optional(),
|
|
38230
|
-
deploy:
|
|
38231
|
-
verifyCommand:
|
|
38232
|
-
prebuildOutput:
|
|
38336
|
+
deploy: z63.object({
|
|
38337
|
+
verifyCommand: z63.string().optional(),
|
|
38338
|
+
prebuildOutput: z63.string().optional()
|
|
38233
38339
|
}).optional(),
|
|
38234
|
-
themeSource:
|
|
38235
|
-
activeTheme:
|
|
38236
|
-
enablePortal:
|
|
38340
|
+
themeSource: z63.enum(["local", "cms"]).optional(),
|
|
38341
|
+
activeTheme: z63.string().optional(),
|
|
38342
|
+
enablePortal: z63.boolean().optional(),
|
|
38237
38343
|
dashboard: dashboardConfigSchema.optional()
|
|
38238
38344
|
}).strict();
|
|
38239
|
-
var pushSdkConfigBodySchema =
|
|
38345
|
+
var pushSdkConfigBodySchema = z63.object({
|
|
38240
38346
|
config: riverbankSiteConfigInputSchema,
|
|
38241
|
-
forceContentTypes:
|
|
38347
|
+
forceContentTypes: z63.boolean().optional()
|
|
38242
38348
|
}).strict();
|
|
38243
38349
|
|
|
38244
38350
|
// ../api/src/siteOnboarding.ts
|
|
38245
|
-
import { z as
|
|
38351
|
+
import { z as z64 } from "zod";
|
|
38246
38352
|
var LAUNCH_REQUIREMENT_OVERRIDE_DEFINITIONS = {
|
|
38247
38353
|
configure_appointments: {
|
|
38248
38354
|
requirementId: "configure_appointments",
|
|
38249
38355
|
reason: "launch_anyway"
|
|
38250
38356
|
}
|
|
38251
38357
|
};
|
|
38252
|
-
var acknowledgeLaunchRequirementRequestSchema =
|
|
38358
|
+
var acknowledgeLaunchRequirementRequestSchema = z64.discriminatedUnion(
|
|
38253
38359
|
"requirementId",
|
|
38254
38360
|
[
|
|
38255
|
-
|
|
38256
|
-
requirementId:
|
|
38361
|
+
z64.object({
|
|
38362
|
+
requirementId: z64.literal("review_generated_site")
|
|
38257
38363
|
}),
|
|
38258
|
-
|
|
38259
|
-
requirementId:
|
|
38364
|
+
z64.object({
|
|
38365
|
+
requirementId: z64.literal(
|
|
38260
38366
|
LAUNCH_REQUIREMENT_OVERRIDE_DEFINITIONS.configure_appointments.requirementId
|
|
38261
38367
|
),
|
|
38262
|
-
overrideReason:
|
|
38368
|
+
overrideReason: z64.literal(
|
|
38263
38369
|
LAUNCH_REQUIREMENT_OVERRIDE_DEFINITIONS.configure_appointments.reason
|
|
38264
38370
|
)
|
|
38265
38371
|
})
|
|
38266
38372
|
]
|
|
38267
38373
|
);
|
|
38268
|
-
var goLiveSiteRequestSchema =
|
|
38269
|
-
acceptExtraSiteCharge:
|
|
38374
|
+
var goLiveSiteRequestSchema = z64.object({
|
|
38375
|
+
acceptExtraSiteCharge: z64.boolean().optional()
|
|
38270
38376
|
});
|
|
38271
38377
|
|
|
38272
38378
|
// ../surfaces/src/index.ts
|
|
@@ -38350,7 +38456,7 @@ var COURSE_ENROLLMENT_REFUND_FAILED_CODES = [
|
|
|
38350
38456
|
];
|
|
38351
38457
|
|
|
38352
38458
|
// ../api/src/bookingVerticals.ts
|
|
38353
|
-
import { z as
|
|
38459
|
+
import { z as z65 } from "zod";
|
|
38354
38460
|
var VERTICAL_IDS = [
|
|
38355
38461
|
"yoga_wellness",
|
|
38356
38462
|
"fitness_pt",
|
|
@@ -38515,39 +38621,39 @@ function getSiteVerticalConfigIssues(rawConfig, config) {
|
|
|
38515
38621
|
}
|
|
38516
38622
|
return [...issues];
|
|
38517
38623
|
}
|
|
38518
|
-
var VerticalIdSchema =
|
|
38624
|
+
var VerticalIdSchema = z65.string().trim().transform((value, ctx) => {
|
|
38519
38625
|
const parsed = parseVerticalId(value);
|
|
38520
38626
|
if (!parsed) {
|
|
38521
38627
|
ctx.addIssue({
|
|
38522
|
-
code:
|
|
38628
|
+
code: z65.ZodIssueCode.custom,
|
|
38523
38629
|
message: "Unknown booking vertical"
|
|
38524
38630
|
});
|
|
38525
|
-
return
|
|
38631
|
+
return z65.NEVER;
|
|
38526
38632
|
}
|
|
38527
38633
|
return parsed;
|
|
38528
38634
|
});
|
|
38529
|
-
var VerticalPresetIdSchema =
|
|
38635
|
+
var VerticalPresetIdSchema = z65.string().trim().transform((value, ctx) => {
|
|
38530
38636
|
const parsed = parseVerticalPresetId(value);
|
|
38531
38637
|
if (!parsed) {
|
|
38532
38638
|
ctx.addIssue({
|
|
38533
|
-
code:
|
|
38639
|
+
code: z65.ZodIssueCode.custom,
|
|
38534
38640
|
message: "Unknown booking preset"
|
|
38535
38641
|
});
|
|
38536
|
-
return
|
|
38642
|
+
return z65.NEVER;
|
|
38537
38643
|
}
|
|
38538
38644
|
return parsed;
|
|
38539
38645
|
});
|
|
38540
|
-
var BookingVerticalConfigSchema =
|
|
38646
|
+
var BookingVerticalConfigSchema = z65.object({
|
|
38541
38647
|
verticalId: VerticalIdSchema.nullable(),
|
|
38542
|
-
selectedPresetIds:
|
|
38648
|
+
selectedPresetIds: z65.array(VerticalPresetIdSchema).max(20)
|
|
38543
38649
|
}).transform((value, ctx) => {
|
|
38544
38650
|
const resolved = resolveSiteVerticalBookingConfig(value);
|
|
38545
38651
|
if (resolved.kind === "invalid") {
|
|
38546
38652
|
ctx.addIssue({
|
|
38547
|
-
code:
|
|
38653
|
+
code: z65.ZodIssueCode.custom,
|
|
38548
38654
|
message: `Invalid booking vertical config: ${resolved.issues.join(", ")}`
|
|
38549
38655
|
});
|
|
38550
|
-
return
|
|
38656
|
+
return z65.NEVER;
|
|
38551
38657
|
}
|
|
38552
38658
|
return resolved.config;
|
|
38553
38659
|
});
|
|
@@ -38569,56 +38675,56 @@ function preset(id, verticalId, canonicalBehaviour, label, pluralLabel, descript
|
|
|
38569
38675
|
}
|
|
38570
38676
|
|
|
38571
38677
|
// ../api/src/utils/isRecord.ts
|
|
38572
|
-
function
|
|
38678
|
+
function isRecord8(value) {
|
|
38573
38679
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
38574
38680
|
}
|
|
38575
38681
|
|
|
38576
38682
|
// ../api/src/appointmentSetup.ts
|
|
38577
|
-
import { z as
|
|
38683
|
+
import { z as z66 } from "zod";
|
|
38578
38684
|
var APPOINTMENT_SETUP_MAX_MINUTES = 1440;
|
|
38579
|
-
var appointmentSetupRefSchema =
|
|
38580
|
-
|
|
38581
|
-
|
|
38685
|
+
var appointmentSetupRefSchema = z66.discriminatedUnion("kind", [
|
|
38686
|
+
z66.object({ kind: z66.literal("existing"), id: z66.string().min(1) }),
|
|
38687
|
+
z66.object({ kind: z66.literal("new"), draftId: z66.string().min(1) })
|
|
38582
38688
|
]);
|
|
38583
|
-
var appointmentSetupVenueChoiceSchema =
|
|
38584
|
-
|
|
38585
|
-
|
|
38586
|
-
|
|
38587
|
-
kind:
|
|
38588
|
-
draftId:
|
|
38589
|
-
title:
|
|
38590
|
-
description:
|
|
38591
|
-
timezone:
|
|
38592
|
-
addressJson:
|
|
38593
|
-
locationJson:
|
|
38689
|
+
var appointmentSetupVenueChoiceSchema = z66.discriminatedUnion("kind", [
|
|
38690
|
+
z66.object({ kind: z66.literal("none") }),
|
|
38691
|
+
z66.object({ kind: z66.literal("existing"), venueId: z66.string().min(1) }),
|
|
38692
|
+
z66.object({
|
|
38693
|
+
kind: z66.literal("create"),
|
|
38694
|
+
draftId: z66.string().min(1),
|
|
38695
|
+
title: z66.string().trim().min(1),
|
|
38696
|
+
description: z66.string().nullable(),
|
|
38697
|
+
timezone: z66.string().trim().min(1).nullable(),
|
|
38698
|
+
addressJson: z66.record(z66.string(), z66.unknown()),
|
|
38699
|
+
locationJson: z66.object({ lat: z66.number(), lng: z66.number() }).nullable()
|
|
38594
38700
|
})
|
|
38595
38701
|
]);
|
|
38596
|
-
var appointmentSetupPaymentDraftSchema =
|
|
38597
|
-
priceType:
|
|
38598
|
-
});
|
|
38599
|
-
var appointmentSetupServiceAssignmentDraftSchema =
|
|
38600
|
-
|
|
38601
|
-
|
|
38602
|
-
kind:
|
|
38603
|
-
resourceRefs:
|
|
38702
|
+
var appointmentSetupPaymentDraftSchema = z66.object({
|
|
38703
|
+
priceType: z66.union([z66.literal("free"), z66.literal("paid")])
|
|
38704
|
+
});
|
|
38705
|
+
var appointmentSetupServiceAssignmentDraftSchema = z66.discriminatedUnion("kind", [
|
|
38706
|
+
z66.object({ kind: z66.literal("all_practitioners") }),
|
|
38707
|
+
z66.object({
|
|
38708
|
+
kind: z66.literal("selected_practitioners"),
|
|
38709
|
+
resourceRefs: z66.array(appointmentSetupRefSchema)
|
|
38604
38710
|
})
|
|
38605
38711
|
]);
|
|
38606
|
-
var appointmentSetupServiceDraftSchema =
|
|
38712
|
+
var appointmentSetupServiceDraftSchema = z66.object({
|
|
38607
38713
|
ref: appointmentSetupRefSchema,
|
|
38608
|
-
title:
|
|
38609
|
-
description:
|
|
38610
|
-
durationMinutes:
|
|
38611
|
-
prepMinutes:
|
|
38612
|
-
cleanupMinutes:
|
|
38613
|
-
priceAmount:
|
|
38614
|
-
isActive:
|
|
38615
|
-
locationType:
|
|
38616
|
-
|
|
38617
|
-
|
|
38618
|
-
|
|
38714
|
+
title: z66.string().trim().min(1),
|
|
38715
|
+
description: z66.string().nullable(),
|
|
38716
|
+
durationMinutes: z66.number().int().positive().max(APPOINTMENT_SETUP_MAX_MINUTES),
|
|
38717
|
+
prepMinutes: z66.number().int().nonnegative().max(APPOINTMENT_SETUP_MAX_MINUTES).default(0),
|
|
38718
|
+
cleanupMinutes: z66.number().int().nonnegative().max(APPOINTMENT_SETUP_MAX_MINUTES).default(0),
|
|
38719
|
+
priceAmount: z66.number().int().nonnegative().nullable(),
|
|
38720
|
+
isActive: z66.boolean(),
|
|
38721
|
+
locationType: z66.union([
|
|
38722
|
+
z66.literal("virtual"),
|
|
38723
|
+
z66.literal("in_person"),
|
|
38724
|
+
z66.literal("hybrid")
|
|
38619
38725
|
]),
|
|
38620
38726
|
venue: appointmentSetupVenueChoiceSchema,
|
|
38621
|
-
timezone:
|
|
38727
|
+
timezone: z66.string().trim().min(1).nullable(),
|
|
38622
38728
|
payment: appointmentSetupPaymentDraftSchema,
|
|
38623
38729
|
assignment: appointmentSetupServiceAssignmentDraftSchema
|
|
38624
38730
|
}).superRefine((service, ctx) => {
|
|
@@ -38637,49 +38743,49 @@ var appointmentSetupServiceDraftSchema = z68.object({
|
|
|
38637
38743
|
});
|
|
38638
38744
|
}
|
|
38639
38745
|
});
|
|
38640
|
-
var appointmentSetupPractitionerDraftSchema =
|
|
38746
|
+
var appointmentSetupPractitionerDraftSchema = z66.object({
|
|
38641
38747
|
ref: appointmentSetupRefSchema,
|
|
38642
|
-
displayName:
|
|
38643
|
-
bio:
|
|
38644
|
-
timezone:
|
|
38645
|
-
colorHex:
|
|
38646
|
-
});
|
|
38647
|
-
var appointmentSetupWeeklyWindowDraftSchema =
|
|
38648
|
-
weekday:
|
|
38649
|
-
startTime:
|
|
38650
|
-
endTime:
|
|
38651
|
-
});
|
|
38652
|
-
var appointmentSetupStartTimePolicyDraftSchema =
|
|
38653
|
-
|
|
38654
|
-
|
|
38655
|
-
kind:
|
|
38656
|
-
intervalMinutes:
|
|
38657
|
-
|
|
38658
|
-
|
|
38659
|
-
|
|
38660
|
-
|
|
38661
|
-
|
|
38662
|
-
|
|
38748
|
+
displayName: z66.string().trim().min(1),
|
|
38749
|
+
bio: z66.string().nullable(),
|
|
38750
|
+
timezone: z66.string().trim().min(1),
|
|
38751
|
+
colorHex: z66.string().nullable()
|
|
38752
|
+
});
|
|
38753
|
+
var appointmentSetupWeeklyWindowDraftSchema = z66.object({
|
|
38754
|
+
weekday: z66.number().int().min(0).max(6),
|
|
38755
|
+
startTime: z66.string(),
|
|
38756
|
+
endTime: z66.string()
|
|
38757
|
+
});
|
|
38758
|
+
var appointmentSetupStartTimePolicyDraftSchema = z66.discriminatedUnion("kind", [
|
|
38759
|
+
z66.object({ kind: z66.literal("automatic_spacing") }),
|
|
38760
|
+
z66.object({
|
|
38761
|
+
kind: z66.literal("regular_interval"),
|
|
38762
|
+
intervalMinutes: z66.union([
|
|
38763
|
+
z66.literal(10),
|
|
38764
|
+
z66.literal(15),
|
|
38765
|
+
z66.literal(20),
|
|
38766
|
+
z66.literal(30),
|
|
38767
|
+
z66.literal(45),
|
|
38768
|
+
z66.literal(60)
|
|
38663
38769
|
])
|
|
38664
38770
|
})
|
|
38665
38771
|
]);
|
|
38666
|
-
var appointmentSetupAvailabilityDraftSchema =
|
|
38667
|
-
kind:
|
|
38772
|
+
var appointmentSetupAvailabilityDraftSchema = z66.object({
|
|
38773
|
+
kind: z66.literal("weekly_windows"),
|
|
38668
38774
|
resourceRef: appointmentSetupRefSchema,
|
|
38669
38775
|
serviceRef: appointmentSetupRefSchema.nullable(),
|
|
38670
|
-
windows:
|
|
38776
|
+
windows: z66.array(appointmentSetupWeeklyWindowDraftSchema),
|
|
38671
38777
|
startTimePolicy: appointmentSetupStartTimePolicyDraftSchema.optional()
|
|
38672
38778
|
});
|
|
38673
38779
|
var APPOINTMENT_DEFAULT_MIN_LEAD_MINUTES_MAX = 28 * 24 * 60;
|
|
38674
38780
|
var APPOINTMENT_DEFAULT_MAX_BOOKING_NOTICE_MINUTES_MAX = 10 * 365 * 24 * 60;
|
|
38675
|
-
var appointmentSetupBookingNoticeSchema =
|
|
38676
|
-
minLeadMinutes:
|
|
38677
|
-
maxBookingNoticeMinutes:
|
|
38678
|
-
});
|
|
38679
|
-
var applyAppointmentSetupRequestSchema =
|
|
38680
|
-
services:
|
|
38681
|
-
practitioners:
|
|
38682
|
-
availability:
|
|
38781
|
+
var appointmentSetupBookingNoticeSchema = z66.object({
|
|
38782
|
+
minLeadMinutes: z66.number().int().nonnegative().max(APPOINTMENT_DEFAULT_MIN_LEAD_MINUTES_MAX),
|
|
38783
|
+
maxBookingNoticeMinutes: z66.number().int().nonnegative().max(APPOINTMENT_DEFAULT_MAX_BOOKING_NOTICE_MINUTES_MAX)
|
|
38784
|
+
});
|
|
38785
|
+
var applyAppointmentSetupRequestSchema = z66.object({
|
|
38786
|
+
services: z66.array(appointmentSetupServiceDraftSchema),
|
|
38787
|
+
practitioners: z66.array(appointmentSetupPractitionerDraftSchema),
|
|
38788
|
+
availability: z66.array(appointmentSetupAvailabilityDraftSchema),
|
|
38683
38789
|
bookingNotice: appointmentSetupBookingNoticeSchema
|
|
38684
38790
|
});
|
|
38685
38791
|
|
|
@@ -38712,24 +38818,24 @@ var STAFF_CANCELLATION_CONTEXT_CATEGORIES = [
|
|
|
38712
38818
|
];
|
|
38713
38819
|
|
|
38714
38820
|
// ../api/src/siteBanner.ts
|
|
38715
|
-
import { z as
|
|
38821
|
+
import { z as z67 } from "zod";
|
|
38716
38822
|
var SITE_BANNER_SCOPE_VALUES = ["homepage", "all-pages"];
|
|
38717
38823
|
var SITE_BANNER_TONE_VALUES = ["announcement", "promotion", "notice", "warning"];
|
|
38718
38824
|
var SITE_BANNER_MAX_TEXT_LENGTH = 320;
|
|
38719
38825
|
var SITE_BANNER_MAX_PARAGRAPHS = 2;
|
|
38720
|
-
var siteBannerScopeSchema =
|
|
38721
|
-
var siteBannerToneSchema =
|
|
38722
|
-
var siteBannerBodySchema =
|
|
38723
|
-
var siteBannerCtaSchema =
|
|
38724
|
-
label:
|
|
38826
|
+
var siteBannerScopeSchema = z67.enum(SITE_BANNER_SCOPE_VALUES);
|
|
38827
|
+
var siteBannerToneSchema = z67.enum(SITE_BANNER_TONE_VALUES);
|
|
38828
|
+
var siteBannerBodySchema = z67.unknown().transform(unwrapRichTextValue);
|
|
38829
|
+
var siteBannerCtaSchema = z67.object({
|
|
38830
|
+
label: z67.string().trim().min(1),
|
|
38725
38831
|
link: linkPayloadSchema
|
|
38726
38832
|
});
|
|
38727
|
-
var siteBannerSettingsSchema =
|
|
38728
|
-
|
|
38729
|
-
enabled:
|
|
38833
|
+
var siteBannerSettingsSchema = z67.discriminatedUnion("enabled", [
|
|
38834
|
+
z67.object({
|
|
38835
|
+
enabled: z67.literal(false)
|
|
38730
38836
|
}),
|
|
38731
|
-
|
|
38732
|
-
enabled:
|
|
38837
|
+
z67.object({
|
|
38838
|
+
enabled: z67.literal(true),
|
|
38733
38839
|
scope: siteBannerScopeSchema,
|
|
38734
38840
|
tone: siteBannerToneSchema,
|
|
38735
38841
|
body: siteBannerBodySchema,
|
|
@@ -38743,7 +38849,7 @@ var siteBannerSettingsInputSchema = siteBannerSettingsSchema.superRefine((value,
|
|
|
38743
38849
|
const analysis = analyzeSiteBannerBody(value.body);
|
|
38744
38850
|
for (const issue of analysis.issues) {
|
|
38745
38851
|
ctx.addIssue({
|
|
38746
|
-
code:
|
|
38852
|
+
code: z67.ZodIssueCode.custom,
|
|
38747
38853
|
path: ["body"],
|
|
38748
38854
|
message: siteBannerBodyIssueMessage(issue)
|
|
38749
38855
|
});
|
|
@@ -38876,7 +38982,7 @@ function sanitizeMarks(marks) {
|
|
|
38876
38982
|
if (mark.type === "bold" || mark.type === "strong" || mark.type === "italic" || mark.type === "em") {
|
|
38877
38983
|
return [{ type: mark.type }];
|
|
38878
38984
|
}
|
|
38879
|
-
if (mark.type === "link" &&
|
|
38985
|
+
if (mark.type === "link" && isRecord8(mark.attrs) && typeof mark.attrs.href === "string") {
|
|
38880
38986
|
const attrs = { href: mark.attrs.href };
|
|
38881
38987
|
if (typeof mark.attrs.target === "string" && mark.attrs.target.trim().length > 0) {
|
|
38882
38988
|
attrs.target = mark.attrs.target;
|
|
@@ -38891,10 +38997,10 @@ function sanitizeMarks(marks) {
|
|
|
38891
38997
|
return sanitized.length > 0 ? sanitized : void 0;
|
|
38892
38998
|
}
|
|
38893
38999
|
function unwrapRichTextValue(value) {
|
|
38894
|
-
if (
|
|
39000
|
+
if (isRecord8(value) && isRecord8(value.doc)) {
|
|
38895
39001
|
return unwrapRichTextValue(value.doc);
|
|
38896
39002
|
}
|
|
38897
|
-
if (
|
|
39003
|
+
if (isRecord8(value) && value.type === "doc") {
|
|
38898
39004
|
return {
|
|
38899
39005
|
type: "doc",
|
|
38900
39006
|
content: Array.isArray(value.content) ? value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) : []
|
|
@@ -38903,7 +39009,7 @@ function unwrapRichTextValue(value) {
|
|
|
38903
39009
|
return EMPTY_SITE_BANNER_BODY;
|
|
38904
39010
|
}
|
|
38905
39011
|
function isTipTapNodeLike(value) {
|
|
38906
|
-
return
|
|
39012
|
+
return isRecord8(value) && typeof value.type === "string";
|
|
38907
39013
|
}
|
|
38908
39014
|
function coerceTipTapNode(value) {
|
|
38909
39015
|
return {
|
|
@@ -38911,9 +39017,9 @@ function coerceTipTapNode(value) {
|
|
|
38911
39017
|
...Array.isArray(value.content) ? { content: value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) } : {},
|
|
38912
39018
|
...typeof value.text === "string" ? { text: value.text } : {},
|
|
38913
39019
|
...Array.isArray(value.marks) ? {
|
|
38914
|
-
marks: value.marks.filter((mark) =>
|
|
39020
|
+
marks: value.marks.filter((mark) => isRecord8(mark) && typeof mark.type === "string").map((mark) => ({
|
|
38915
39021
|
type: mark.type,
|
|
38916
|
-
...
|
|
39022
|
+
...isRecord8(mark.attrs) ? { attrs: mark.attrs } : {}
|
|
38917
39023
|
}))
|
|
38918
39024
|
} : {}
|
|
38919
39025
|
};
|
|
@@ -39007,7 +39113,7 @@ function collectCartLinkStats(items, depth = 0) {
|
|
|
39007
39113
|
return result;
|
|
39008
39114
|
}
|
|
39009
39115
|
function isNavigationMenuValidationItem(value) {
|
|
39010
|
-
if (!
|
|
39116
|
+
if (!isRecord8(value)) return false;
|
|
39011
39117
|
return typeof value.label === "string";
|
|
39012
39118
|
}
|
|
39013
39119
|
|
|
@@ -39050,75 +39156,75 @@ function unsafeAsNavigationMenuIdentifier(identifier) {
|
|
|
39050
39156
|
var MAIN_NAVIGATION_MENU_IDENTIFIER = unsafeAsNavigationMenuIdentifier("main");
|
|
39051
39157
|
|
|
39052
39158
|
// ../api/src/aiPlayground.ts
|
|
39053
|
-
import { z as
|
|
39054
|
-
var Rfc6902PatchOp =
|
|
39159
|
+
import { z as z68 } from "zod";
|
|
39160
|
+
var Rfc6902PatchOp = z68.discriminatedUnion("op", [
|
|
39055
39161
|
// Standard RFC-6902 operations
|
|
39056
|
-
|
|
39057
|
-
op:
|
|
39058
|
-
path:
|
|
39059
|
-
value:
|
|
39162
|
+
z68.object({
|
|
39163
|
+
op: z68.literal("add"),
|
|
39164
|
+
path: z68.string(),
|
|
39165
|
+
value: z68.unknown()
|
|
39060
39166
|
}),
|
|
39061
|
-
|
|
39062
|
-
op:
|
|
39063
|
-
path:
|
|
39167
|
+
z68.object({
|
|
39168
|
+
op: z68.literal("remove"),
|
|
39169
|
+
path: z68.string()
|
|
39064
39170
|
}),
|
|
39065
|
-
|
|
39066
|
-
op:
|
|
39067
|
-
path:
|
|
39068
|
-
value:
|
|
39171
|
+
z68.object({
|
|
39172
|
+
op: z68.literal("replace"),
|
|
39173
|
+
path: z68.string(),
|
|
39174
|
+
value: z68.unknown()
|
|
39069
39175
|
}),
|
|
39070
|
-
|
|
39071
|
-
op:
|
|
39072
|
-
from:
|
|
39073
|
-
path:
|
|
39176
|
+
z68.object({
|
|
39177
|
+
op: z68.literal("move"),
|
|
39178
|
+
from: z68.string(),
|
|
39179
|
+
path: z68.string()
|
|
39074
39180
|
}),
|
|
39075
|
-
|
|
39076
|
-
op:
|
|
39077
|
-
from:
|
|
39078
|
-
path:
|
|
39181
|
+
z68.object({
|
|
39182
|
+
op: z68.literal("copy"),
|
|
39183
|
+
from: z68.string(),
|
|
39184
|
+
path: z68.string()
|
|
39079
39185
|
}),
|
|
39080
39186
|
// Block-level operations (Phase 2)
|
|
39081
|
-
|
|
39082
|
-
op:
|
|
39083
|
-
blockKind:
|
|
39084
|
-
afterBlockId:
|
|
39085
|
-
content:
|
|
39086
|
-
rationale:
|
|
39187
|
+
z68.object({
|
|
39188
|
+
op: z68.literal("add_block"),
|
|
39189
|
+
blockKind: z68.string(),
|
|
39190
|
+
afterBlockId: z68.string().nullable(),
|
|
39191
|
+
content: z68.record(z68.string(), z68.unknown()),
|
|
39192
|
+
rationale: z68.string()
|
|
39087
39193
|
}),
|
|
39088
|
-
|
|
39089
|
-
op:
|
|
39090
|
-
blockId:
|
|
39091
|
-
rationale:
|
|
39194
|
+
z68.object({
|
|
39195
|
+
op: z68.literal("delete_block"),
|
|
39196
|
+
blockId: z68.string(),
|
|
39197
|
+
rationale: z68.string()
|
|
39092
39198
|
}),
|
|
39093
|
-
|
|
39094
|
-
op:
|
|
39095
|
-
blockId:
|
|
39096
|
-
afterBlockId:
|
|
39097
|
-
rationale:
|
|
39199
|
+
z68.object({
|
|
39200
|
+
op: z68.literal("reorder_block"),
|
|
39201
|
+
blockId: z68.string(),
|
|
39202
|
+
afterBlockId: z68.string().nullable(),
|
|
39203
|
+
rationale: z68.string()
|
|
39098
39204
|
})
|
|
39099
39205
|
]);
|
|
39100
|
-
var PlaygroundProposeRequest =
|
|
39101
|
-
request:
|
|
39206
|
+
var PlaygroundProposeRequest = z68.object({
|
|
39207
|
+
request: z68.string().min(1).max(2e3)
|
|
39102
39208
|
});
|
|
39103
|
-
var MultiPagePatchEnvelope =
|
|
39104
|
-
pageId:
|
|
39105
|
-
blockId:
|
|
39209
|
+
var MultiPagePatchEnvelope = z68.object({
|
|
39210
|
+
pageId: z68.string(),
|
|
39211
|
+
blockId: z68.string().optional(),
|
|
39106
39212
|
// Not present for page-level ops
|
|
39107
|
-
blockKind:
|
|
39108
|
-
blockPurpose:
|
|
39109
|
-
ops:
|
|
39110
|
-
rationale:
|
|
39111
|
-
currentContent:
|
|
39213
|
+
blockKind: z68.string().optional(),
|
|
39214
|
+
blockPurpose: z68.string().optional().nullable(),
|
|
39215
|
+
ops: z68.array(Rfc6902PatchOp),
|
|
39216
|
+
rationale: z68.string(),
|
|
39217
|
+
currentContent: z68.record(z68.string(), z68.unknown()).optional()
|
|
39112
39218
|
});
|
|
39113
|
-
var MultiPageUpdateResponse =
|
|
39114
|
-
patches:
|
|
39115
|
-
assistantMessage:
|
|
39116
|
-
pagesModified:
|
|
39117
|
-
toolCallsUsed:
|
|
39219
|
+
var MultiPageUpdateResponse = z68.object({
|
|
39220
|
+
patches: z68.array(MultiPagePatchEnvelope),
|
|
39221
|
+
assistantMessage: z68.string(),
|
|
39222
|
+
pagesModified: z68.number(),
|
|
39223
|
+
toolCallsUsed: z68.number()
|
|
39118
39224
|
});
|
|
39119
39225
|
|
|
39120
39226
|
// src/config/content-validation.ts
|
|
39121
|
-
import { z as
|
|
39227
|
+
import { z as z69 } from "zod";
|
|
39122
39228
|
|
|
39123
39229
|
// src/types/block-kinds.ts
|
|
39124
39230
|
var SYSTEM_BLOCK_KINDS = [
|
|
@@ -39274,36 +39380,36 @@ function describeInvalidBindingTransform(transform) {
|
|
|
39274
39380
|
}
|
|
39275
39381
|
|
|
39276
39382
|
// src/config/content-validation.ts
|
|
39277
|
-
var jsonDataSchema =
|
|
39278
|
-
var contentTypeKeySchema =
|
|
39383
|
+
var jsonDataSchema = z69.record(z69.string(), z69.any());
|
|
39384
|
+
var contentTypeKeySchema = z69.string().min(1).regex(
|
|
39279
39385
|
/^[a-z][a-z0-9-]*$/,
|
|
39280
39386
|
"Key must be lowercase, start with a letter, and contain only letters, numbers, and hyphens"
|
|
39281
39387
|
);
|
|
39282
|
-
var templateConfigSchemaForward =
|
|
39283
|
-
blocks:
|
|
39284
|
-
|
|
39285
|
-
identifier:
|
|
39286
|
-
kind:
|
|
39287
|
-
scope:
|
|
39288
|
-
bindings:
|
|
39289
|
-
content:
|
|
39388
|
+
var templateConfigSchemaForward = z69.object({
|
|
39389
|
+
blocks: z69.array(
|
|
39390
|
+
z69.object({
|
|
39391
|
+
identifier: z69.string().min(1),
|
|
39392
|
+
kind: z69.string(),
|
|
39393
|
+
scope: z69.enum(["entry", "template"]),
|
|
39394
|
+
bindings: z69.record(z69.string(), z69.any()).optional(),
|
|
39395
|
+
content: z69.record(z69.string(), z69.any()).optional()
|
|
39290
39396
|
})
|
|
39291
39397
|
)
|
|
39292
39398
|
}).optional();
|
|
39293
|
-
var contentTypeOrderingSchema =
|
|
39294
|
-
mode:
|
|
39399
|
+
var contentTypeOrderingSchema = z69.object({
|
|
39400
|
+
mode: z69.enum(["default", "manual"]).optional()
|
|
39295
39401
|
}).optional();
|
|
39296
|
-
var contentTypeConfigSchema =
|
|
39402
|
+
var contentTypeConfigSchema = z69.object({
|
|
39297
39403
|
key: contentTypeKeySchema,
|
|
39298
|
-
name:
|
|
39299
|
-
description:
|
|
39300
|
-
hasPages:
|
|
39301
|
-
routePattern:
|
|
39404
|
+
name: z69.string().min(1),
|
|
39405
|
+
description: z69.string().optional(),
|
|
39406
|
+
hasPages: z69.boolean(),
|
|
39407
|
+
routePattern: z69.string().optional(),
|
|
39302
39408
|
// Fields are validated as unknown[] here - deep field validation happens in @riverbankcms/blocks
|
|
39303
|
-
fields:
|
|
39304
|
-
titleField:
|
|
39409
|
+
fields: z69.array(z69.any()).min(1, "At least one field is required"),
|
|
39410
|
+
titleField: z69.string().optional(),
|
|
39305
39411
|
ordering: contentTypeOrderingSchema,
|
|
39306
|
-
isSingleton:
|
|
39412
|
+
isSingleton: z69.boolean().optional().default(false),
|
|
39307
39413
|
template: templateConfigSchemaForward
|
|
39308
39414
|
}).refine(
|
|
39309
39415
|
(data) => {
|
|
@@ -39325,7 +39431,7 @@ var contentTypeConfigSchema = z71.object({
|
|
|
39325
39431
|
}
|
|
39326
39432
|
if (!data.routePattern) {
|
|
39327
39433
|
ctx.addIssue({
|
|
39328
|
-
code:
|
|
39434
|
+
code: z69.ZodIssueCode.custom,
|
|
39329
39435
|
path: ["routePattern"],
|
|
39330
39436
|
message: "routePattern is required when hasPages is true. Non-singleton types must include {slug} placeholder."
|
|
39331
39437
|
});
|
|
@@ -39334,7 +39440,7 @@ var contentTypeConfigSchema = z71.object({
|
|
|
39334
39440
|
const parseResult = safeParseRouteTemplate(data.routePattern);
|
|
39335
39441
|
if (!parseResult.success) {
|
|
39336
39442
|
ctx.addIssue({
|
|
39337
|
-
code:
|
|
39443
|
+
code: z69.ZodIssueCode.custom,
|
|
39338
39444
|
path: ["routePattern"],
|
|
39339
39445
|
message: describeRouteTemplateParseError(parseResult.error)
|
|
39340
39446
|
});
|
|
@@ -39342,44 +39448,44 @@ var contentTypeConfigSchema = z71.object({
|
|
|
39342
39448
|
}
|
|
39343
39449
|
if (!data.isSingleton && parseResult.routeTemplate.kind !== "slug-template") {
|
|
39344
39450
|
ctx.addIssue({
|
|
39345
|
-
code:
|
|
39451
|
+
code: z69.ZodIssueCode.custom,
|
|
39346
39452
|
path: ["routePattern"],
|
|
39347
39453
|
message: "routePattern is required when hasPages is true. Non-singleton types must include {slug} placeholder."
|
|
39348
39454
|
});
|
|
39349
39455
|
}
|
|
39350
39456
|
});
|
|
39351
|
-
var fieldBindingSchema =
|
|
39352
|
-
source:
|
|
39353
|
-
path:
|
|
39457
|
+
var fieldBindingSchema = z69.object({
|
|
39458
|
+
source: z69.literal("field"),
|
|
39459
|
+
path: z69.string().min(1, "Field path is required")
|
|
39354
39460
|
});
|
|
39355
|
-
var metaBindingSchema =
|
|
39356
|
-
source:
|
|
39357
|
-
path:
|
|
39461
|
+
var metaBindingSchema = z69.object({
|
|
39462
|
+
source: z69.literal("meta"),
|
|
39463
|
+
path: z69.enum(TEMPLATE_BINDING_META_PATHS, {
|
|
39358
39464
|
error: (issue) => describeInvalidTemplateBindingMetaPath(String(issue.input))
|
|
39359
39465
|
})
|
|
39360
39466
|
});
|
|
39361
|
-
var literalBindingSchema =
|
|
39362
|
-
source:
|
|
39363
|
-
value:
|
|
39467
|
+
var literalBindingSchema = z69.object({
|
|
39468
|
+
source: z69.literal("literal"),
|
|
39469
|
+
value: z69.unknown()
|
|
39364
39470
|
});
|
|
39365
|
-
var transformBindingSchema =
|
|
39366
|
-
source:
|
|
39367
|
-
path:
|
|
39368
|
-
transform:
|
|
39471
|
+
var transformBindingSchema = z69.object({
|
|
39472
|
+
source: z69.literal("transform"),
|
|
39473
|
+
path: z69.string().min(1, "Transform path is required"),
|
|
39474
|
+
transform: z69.enum(BINDING_TRANSFORM_VALUES, {
|
|
39369
39475
|
error: (issue) => describeInvalidBindingTransform(String(issue.input))
|
|
39370
39476
|
})
|
|
39371
39477
|
});
|
|
39372
|
-
var baseBindingSchema =
|
|
39478
|
+
var baseBindingSchema = z69.discriminatedUnion("source", [
|
|
39373
39479
|
fieldBindingSchema,
|
|
39374
39480
|
metaBindingSchema,
|
|
39375
39481
|
literalBindingSchema,
|
|
39376
39482
|
transformBindingSchema
|
|
39377
39483
|
]);
|
|
39378
|
-
var fallbackBindingSchema =
|
|
39379
|
-
source:
|
|
39380
|
-
sources:
|
|
39484
|
+
var fallbackBindingSchema = z69.object({
|
|
39485
|
+
source: z69.literal("fallback"),
|
|
39486
|
+
sources: z69.array(z69.lazy(() => bindingSourceSchema)).min(1, "Fallback must have at least one source")
|
|
39381
39487
|
});
|
|
39382
|
-
var bindingSourceSchema =
|
|
39488
|
+
var bindingSourceSchema = z69.union([
|
|
39383
39489
|
baseBindingSchema,
|
|
39384
39490
|
fallbackBindingSchema
|
|
39385
39491
|
]);
|
|
@@ -39393,12 +39499,12 @@ function isValidBlockKind(kind) {
|
|
|
39393
39499
|
return false;
|
|
39394
39500
|
}
|
|
39395
39501
|
var BLOCK_KIND_ERROR_MESSAGE = 'Block kind must be a system block (e.g., "block.hero") or a custom block (e.g., "custom.myBlock")';
|
|
39396
|
-
var blockKindSchema =
|
|
39397
|
-
var templateBlockConfigSchema =
|
|
39398
|
-
identifier:
|
|
39502
|
+
var blockKindSchema = z69.string().refine(isValidBlockKind, { message: BLOCK_KIND_ERROR_MESSAGE });
|
|
39503
|
+
var templateBlockConfigSchema = z69.object({
|
|
39504
|
+
identifier: z69.string().min(1, "Block identifier is required"),
|
|
39399
39505
|
kind: blockKindSchema,
|
|
39400
|
-
scope:
|
|
39401
|
-
bindings:
|
|
39506
|
+
scope: z69.enum(["entry", "template"]),
|
|
39507
|
+
bindings: z69.record(z69.string(), bindingSourceSchema).optional(),
|
|
39402
39508
|
content: jsonDataSchema.optional()
|
|
39403
39509
|
}).refine(
|
|
39404
39510
|
(data) => {
|
|
@@ -39417,8 +39523,8 @@ var templateBlockConfigSchema = z71.object({
|
|
|
39417
39523
|
},
|
|
39418
39524
|
{ message: "Template-scoped blocks should define static content, not bindings" }
|
|
39419
39525
|
);
|
|
39420
|
-
var templateConfigSchema =
|
|
39421
|
-
blocks:
|
|
39526
|
+
var templateConfigSchema = z69.object({
|
|
39527
|
+
blocks: z69.array(templateBlockConfigSchema).min(1, "Template must have at least one block")
|
|
39422
39528
|
}).refine(
|
|
39423
39529
|
(data) => {
|
|
39424
39530
|
const identifiers = data.blocks.map((b) => b.identifier);
|
|
@@ -39427,77 +39533,77 @@ var templateConfigSchema = z71.object({
|
|
|
39427
39533
|
},
|
|
39428
39534
|
{ message: "Template block identifiers must be unique" }
|
|
39429
39535
|
);
|
|
39430
|
-
var blockConfigSchema =
|
|
39536
|
+
var blockConfigSchema = z69.object({
|
|
39431
39537
|
kind: blockKindSchema,
|
|
39432
39538
|
content: jsonDataSchema,
|
|
39433
|
-
orderIndex:
|
|
39434
|
-
});
|
|
39435
|
-
var pageConfigSchema =
|
|
39436
|
-
identifier:
|
|
39437
|
-
title:
|
|
39438
|
-
path:
|
|
39439
|
-
purpose:
|
|
39440
|
-
blocks:
|
|
39441
|
-
status:
|
|
39442
|
-
metaTitle:
|
|
39443
|
-
metaDescription:
|
|
39444
|
-
});
|
|
39445
|
-
var entryConfigSchema =
|
|
39446
|
-
identifier:
|
|
39447
|
-
contentType:
|
|
39539
|
+
orderIndex: z69.number().optional()
|
|
39540
|
+
});
|
|
39541
|
+
var pageConfigSchema = z69.object({
|
|
39542
|
+
identifier: z69.string().min(1, "Identifier is required"),
|
|
39543
|
+
title: z69.string().min(1, "Title is required"),
|
|
39544
|
+
path: z69.string().regex(/^\//, "Path must start with /"),
|
|
39545
|
+
purpose: z69.string().default("content"),
|
|
39546
|
+
blocks: z69.array(blockConfigSchema).optional(),
|
|
39547
|
+
status: z69.enum(["draft", "published"]).default("draft"),
|
|
39548
|
+
metaTitle: z69.string().optional(),
|
|
39549
|
+
metaDescription: z69.string().optional()
|
|
39550
|
+
});
|
|
39551
|
+
var entryConfigSchema = z69.object({
|
|
39552
|
+
identifier: z69.string().min(1, "Identifier is required"),
|
|
39553
|
+
contentType: z69.string().min(1, "Content type is required"),
|
|
39448
39554
|
data: jsonDataSchema,
|
|
39449
|
-
status:
|
|
39450
|
-
slug:
|
|
39451
|
-
summary:
|
|
39555
|
+
status: z69.enum(["draft", "published"]).default("draft"),
|
|
39556
|
+
slug: z69.string().optional(),
|
|
39557
|
+
summary: z69.string().optional(),
|
|
39452
39558
|
// Hard remove legacy config-only titles: titles must live in entry `data`.
|
|
39453
|
-
title:
|
|
39559
|
+
title: z69.any().optional().refine((value) => value === void 0, {
|
|
39454
39560
|
message: "Entry titles are now derived from entry data. Remove `title` and move it into `data` (e.g. `data.title`, or your configured `titleField`). Run `riverbankcms migrate entries` for guided migration."
|
|
39455
39561
|
}),
|
|
39456
|
-
metaTitle:
|
|
39457
|
-
metaDescription:
|
|
39562
|
+
metaTitle: z69.string().optional(),
|
|
39563
|
+
metaDescription: z69.string().optional()
|
|
39458
39564
|
});
|
|
39459
|
-
var dropdownLinkSchema =
|
|
39460
|
-
kind:
|
|
39565
|
+
var dropdownLinkSchema = z69.object({
|
|
39566
|
+
kind: z69.literal("dropdown")
|
|
39461
39567
|
});
|
|
39462
|
-
var navigationLinkSchema =
|
|
39568
|
+
var navigationLinkSchema = z69.discriminatedUnion("kind", [
|
|
39463
39569
|
...navigationLinkInputSchemaOptions,
|
|
39464
39570
|
dropdownLinkSchema
|
|
39465
39571
|
]);
|
|
39466
|
-
var baseNavigationItemSchema =
|
|
39467
|
-
label:
|
|
39572
|
+
var baseNavigationItemSchema = z69.object({
|
|
39573
|
+
label: z69.string().min(1, "Label is required"),
|
|
39468
39574
|
link: navigationLinkSchema,
|
|
39469
|
-
isCta:
|
|
39575
|
+
isCta: z69.boolean().optional()
|
|
39470
39576
|
});
|
|
39471
39577
|
var navigationItemConfigSchema = baseNavigationItemSchema.extend({
|
|
39472
|
-
children:
|
|
39473
|
-
});
|
|
39474
|
-
var navigationMenuConfigSchema =
|
|
39475
|
-
identifier:
|
|
39476
|
-
name:
|
|
39477
|
-
isPrimary:
|
|
39478
|
-
isFooter:
|
|
39479
|
-
items:
|
|
39578
|
+
children: z69.lazy(() => z69.array(navigationItemConfigSchema)).optional()
|
|
39579
|
+
});
|
|
39580
|
+
var navigationMenuConfigSchema = z69.object({
|
|
39581
|
+
identifier: z69.string().min(1, "Identifier is required"),
|
|
39582
|
+
name: z69.string().min(1, "Name is required"),
|
|
39583
|
+
isPrimary: z69.boolean().optional(),
|
|
39584
|
+
isFooter: z69.boolean().optional(),
|
|
39585
|
+
items: z69.array(navigationItemConfigSchema)
|
|
39480
39586
|
}).superRefine((menu, ctx) => {
|
|
39481
39587
|
const portalStats = collectPortalLinkStats(
|
|
39482
39588
|
menu.items
|
|
39483
39589
|
);
|
|
39484
39590
|
if (portalStats.count > 1) {
|
|
39485
39591
|
ctx.addIssue({
|
|
39486
|
-
code:
|
|
39592
|
+
code: z69.ZodIssueCode.custom,
|
|
39487
39593
|
message: "Only one portal link is allowed per navigation menu",
|
|
39488
39594
|
path: ["items"]
|
|
39489
39595
|
});
|
|
39490
39596
|
}
|
|
39491
39597
|
if (portalStats.nestedLabels.length > 0) {
|
|
39492
39598
|
ctx.addIssue({
|
|
39493
|
-
code:
|
|
39599
|
+
code: z69.ZodIssueCode.custom,
|
|
39494
39600
|
message: `Portal links must be root-level items: ${portalStats.nestedLabels.join(", ")}`,
|
|
39495
39601
|
path: ["items"]
|
|
39496
39602
|
});
|
|
39497
39603
|
}
|
|
39498
39604
|
if (portalStats.withChildrenLabels.length > 0) {
|
|
39499
39605
|
ctx.addIssue({
|
|
39500
|
-
code:
|
|
39606
|
+
code: z69.ZodIssueCode.custom,
|
|
39501
39607
|
message: `Portal links cannot contain child items: ${portalStats.withChildrenLabels.join(", ")}`,
|
|
39502
39608
|
path: ["items"]
|
|
39503
39609
|
});
|
|
@@ -39507,44 +39613,44 @@ var navigationMenuConfigSchema = z71.object({
|
|
|
39507
39613
|
);
|
|
39508
39614
|
if (cartStats.nestedLabels.length > 0) {
|
|
39509
39615
|
ctx.addIssue({
|
|
39510
|
-
code:
|
|
39616
|
+
code: z69.ZodIssueCode.custom,
|
|
39511
39617
|
message: `Cart links must be root-level items: ${cartStats.nestedLabels.join(", ")}`,
|
|
39512
39618
|
path: ["items"]
|
|
39513
39619
|
});
|
|
39514
39620
|
}
|
|
39515
39621
|
if (cartStats.withChildrenLabels.length > 0) {
|
|
39516
39622
|
ctx.addIssue({
|
|
39517
|
-
code:
|
|
39623
|
+
code: z69.ZodIssueCode.custom,
|
|
39518
39624
|
message: `Cart links cannot contain child items: ${cartStats.withChildrenLabels.join(", ")}`,
|
|
39519
39625
|
path: ["items"]
|
|
39520
39626
|
});
|
|
39521
39627
|
}
|
|
39522
39628
|
if (cartStats.ctaLabels.length > 0) {
|
|
39523
39629
|
ctx.addIssue({
|
|
39524
|
-
code:
|
|
39630
|
+
code: z69.ZodIssueCode.custom,
|
|
39525
39631
|
message: `Cart links cannot be marked as CTA: ${cartStats.ctaLabels.join(", ")}`,
|
|
39526
39632
|
path: ["items"]
|
|
39527
39633
|
});
|
|
39528
39634
|
}
|
|
39529
39635
|
if (cartStats.missingVisibleTextLabels.length > 0) {
|
|
39530
39636
|
ctx.addIssue({
|
|
39531
|
-
code:
|
|
39637
|
+
code: z69.ZodIssueCode.custom,
|
|
39532
39638
|
message: `Cart links with icon-with-label must provide a visible label: ${cartStats.missingVisibleTextLabels.join(", ")}`,
|
|
39533
39639
|
path: ["items"]
|
|
39534
39640
|
});
|
|
39535
39641
|
}
|
|
39536
39642
|
});
|
|
39537
|
-
var siteSettingsConfigSchema =
|
|
39538
|
-
homepagePath:
|
|
39539
|
-
siteTitle:
|
|
39540
|
-
siteDescription:
|
|
39541
|
-
defaultTemplates:
|
|
39643
|
+
var siteSettingsConfigSchema = z69.object({
|
|
39644
|
+
homepagePath: z69.string().optional(),
|
|
39645
|
+
siteTitle: z69.string().optional(),
|
|
39646
|
+
siteDescription: z69.string().optional(),
|
|
39647
|
+
defaultTemplates: z69.record(z69.string(), z69.string()).optional()
|
|
39542
39648
|
});
|
|
39543
|
-
var contentConfigBaseSchema =
|
|
39544
|
-
contentTypes:
|
|
39545
|
-
entries:
|
|
39546
|
-
pages:
|
|
39547
|
-
navigationMenus:
|
|
39649
|
+
var contentConfigBaseSchema = z69.object({
|
|
39650
|
+
contentTypes: z69.array(contentTypeConfigSchema).optional(),
|
|
39651
|
+
entries: z69.array(entryConfigSchema).optional(),
|
|
39652
|
+
pages: z69.array(pageConfigSchema).optional(),
|
|
39653
|
+
navigationMenus: z69.array(navigationMenuConfigSchema).optional(),
|
|
39548
39654
|
settings: siteSettingsConfigSchema.optional()
|
|
39549
39655
|
});
|
|
39550
39656
|
var contentConfigSchema = contentConfigBaseSchema.superRefine((data, ctx) => {
|
|
@@ -39553,7 +39659,7 @@ var contentConfigSchema = contentConfigBaseSchema.superRefine((data, ctx) => {
|
|
|
39553
39659
|
const duplicateKeys = keys.filter((key, i) => keys.indexOf(key) !== i);
|
|
39554
39660
|
if (duplicateKeys.length > 0) {
|
|
39555
39661
|
ctx.addIssue({
|
|
39556
|
-
code:
|
|
39662
|
+
code: z69.ZodIssueCode.custom,
|
|
39557
39663
|
message: `Content type keys must be unique. Duplicates: ${duplicateKeys.join(", ")}`,
|
|
39558
39664
|
path: ["contentTypes"]
|
|
39559
39665
|
});
|
|
@@ -39564,7 +39670,7 @@ var contentConfigSchema = contentConfigBaseSchema.superRefine((data, ctx) => {
|
|
|
39564
39670
|
const duplicateIds = identifiers.filter((id, i) => identifiers.indexOf(id) !== i);
|
|
39565
39671
|
if (duplicateIds.length > 0) {
|
|
39566
39672
|
ctx.addIssue({
|
|
39567
|
-
code:
|
|
39673
|
+
code: z69.ZodIssueCode.custom,
|
|
39568
39674
|
message: `Page identifiers must be unique. Duplicates: ${duplicateIds.join(", ")}`,
|
|
39569
39675
|
path: ["pages"]
|
|
39570
39676
|
});
|
|
@@ -39573,7 +39679,7 @@ var contentConfigSchema = contentConfigBaseSchema.superRefine((data, ctx) => {
|
|
|
39573
39679
|
const duplicatePaths = paths.filter((path, i) => paths.indexOf(path) !== i);
|
|
39574
39680
|
if (duplicatePaths.length > 0) {
|
|
39575
39681
|
ctx.addIssue({
|
|
39576
|
-
code:
|
|
39682
|
+
code: z69.ZodIssueCode.custom,
|
|
39577
39683
|
message: `Page paths must be unique. Duplicates: ${duplicatePaths.join(", ")}`,
|
|
39578
39684
|
path: ["pages"]
|
|
39579
39685
|
});
|
|
@@ -39584,7 +39690,7 @@ var contentConfigSchema = contentConfigBaseSchema.superRefine((data, ctx) => {
|
|
|
39584
39690
|
const duplicateIds = identifiers.filter((id, i) => identifiers.indexOf(id) !== i);
|
|
39585
39691
|
if (duplicateIds.length > 0) {
|
|
39586
39692
|
ctx.addIssue({
|
|
39587
|
-
code:
|
|
39693
|
+
code: z69.ZodIssueCode.custom,
|
|
39588
39694
|
message: `Entry identifiers must be unique. Duplicates: ${duplicateIds.join(", ")}`,
|
|
39589
39695
|
path: ["entries"]
|
|
39590
39696
|
});
|
|
@@ -39595,7 +39701,7 @@ var contentConfigSchema = contentConfigBaseSchema.superRefine((data, ctx) => {
|
|
|
39595
39701
|
const duplicateIds = identifiers.filter((id, i) => identifiers.indexOf(id) !== i);
|
|
39596
39702
|
if (duplicateIds.length > 0) {
|
|
39597
39703
|
ctx.addIssue({
|
|
39598
|
-
code:
|
|
39704
|
+
code: z69.ZodIssueCode.custom,
|
|
39599
39705
|
message: `Navigation menu identifiers must be unique. Duplicates: ${duplicateIds.join(", ")}`,
|
|
39600
39706
|
path: ["navigationMenus"]
|
|
39601
39707
|
});
|
|
@@ -39609,7 +39715,7 @@ var contentConfigSchema = contentConfigBaseSchema.superRefine((data, ctx) => {
|
|
|
39609
39715
|
const entriesForType = data.entries.filter((e) => e.contentType === singletonKey);
|
|
39610
39716
|
if (entriesForType.length > 1) {
|
|
39611
39717
|
ctx.addIssue({
|
|
39612
|
-
code:
|
|
39718
|
+
code: z69.ZodIssueCode.custom,
|
|
39613
39719
|
message: `Singleton content type "${singletonKey}" cannot have more than one entry. Found ${entriesForType.length} entries.`,
|
|
39614
39720
|
path: ["entries"]
|
|
39615
39721
|
});
|
|
@@ -39722,18 +39828,18 @@ function validateLayout(layout) {
|
|
|
39722
39828
|
}
|
|
39723
39829
|
|
|
39724
39830
|
// src/config/dashboard-validation.ts
|
|
39725
|
-
import { z as
|
|
39726
|
-
var navIdListSchema2 =
|
|
39831
|
+
import { z as z70 } from "zod";
|
|
39832
|
+
var navIdListSchema2 = z70.preprocess((value) => {
|
|
39727
39833
|
if (!Array.isArray(value)) return void 0;
|
|
39728
39834
|
const filtered = value.filter((v) => typeof v === "string" && v.trim().length > 0);
|
|
39729
39835
|
return filtered.length > 0 ? filtered : void 0;
|
|
39730
|
-
},
|
|
39731
|
-
var dashboardNavVisibilityBaseSchema2 =
|
|
39732
|
-
mode:
|
|
39836
|
+
}, z70.array(z70.string()).max(200, "Maximum 200 nav IDs").optional());
|
|
39837
|
+
var dashboardNavVisibilityBaseSchema2 = z70.object({
|
|
39838
|
+
mode: z70.enum(["augment", "restrict"]).optional(),
|
|
39733
39839
|
allowIds: navIdListSchema2,
|
|
39734
39840
|
denyIds: navIdListSchema2
|
|
39735
39841
|
}).strip();
|
|
39736
|
-
var dashboardNavVisibilityRolesSchema2 =
|
|
39842
|
+
var dashboardNavVisibilityRolesSchema2 = z70.object({
|
|
39737
39843
|
administrator: dashboardNavVisibilityBaseSchema2.optional(),
|
|
39738
39844
|
editor: dashboardNavVisibilityBaseSchema2.optional(),
|
|
39739
39845
|
team_member: dashboardNavVisibilityBaseSchema2.optional()
|
|
@@ -39741,28 +39847,28 @@ var dashboardNavVisibilityRolesSchema2 = z72.object({
|
|
|
39741
39847
|
var dashboardNavVisibilitySchema2 = dashboardNavVisibilityBaseSchema2.extend({
|
|
39742
39848
|
roles: dashboardNavVisibilityRolesSchema2
|
|
39743
39849
|
}).strip();
|
|
39744
|
-
var dashboardNavigationConfigSchema2 =
|
|
39850
|
+
var dashboardNavigationConfigSchema2 = z70.object({
|
|
39745
39851
|
siteNav: dashboardNavVisibilitySchema2.optional(),
|
|
39746
39852
|
settingsNav: dashboardNavVisibilitySchema2.optional()
|
|
39747
39853
|
}).strip();
|
|
39748
|
-
var dashboardConfigSchema2 =
|
|
39749
|
-
previewEditingEnabled:
|
|
39854
|
+
var dashboardConfigSchema2 = z70.object({
|
|
39855
|
+
previewEditingEnabled: z70.boolean().optional(),
|
|
39750
39856
|
navigation: dashboardNavigationConfigSchema2.optional()
|
|
39751
39857
|
}).strip();
|
|
39752
39858
|
|
|
39753
39859
|
// src/zod/titleSourceSchema.ts
|
|
39754
|
-
import { z as
|
|
39755
|
-
var titleSourceValueSchema =
|
|
39756
|
-
|
|
39757
|
-
|
|
39860
|
+
import { z as z71 } from "zod";
|
|
39861
|
+
var titleSourceValueSchema = z71.union([
|
|
39862
|
+
z71.string().min(1),
|
|
39863
|
+
z71.array(z71.string().min(1)).min(1)
|
|
39758
39864
|
]);
|
|
39759
39865
|
|
|
39760
39866
|
// src/config/validation.ts
|
|
39761
|
-
var sdkThemePaletteSchema2 =
|
|
39762
|
-
var sdkThemeConfigSchema2 =
|
|
39867
|
+
var sdkThemePaletteSchema2 = z72.record(z72.string(), z72.string());
|
|
39868
|
+
var sdkThemeConfigSchema2 = z72.object({
|
|
39763
39869
|
palette: sdkThemePaletteSchema2
|
|
39764
39870
|
});
|
|
39765
|
-
var sdkSiteUrlSchema =
|
|
39871
|
+
var sdkSiteUrlSchema = z72.string().url("Must be a valid URL").refine((url) => {
|
|
39766
39872
|
try {
|
|
39767
39873
|
const parsed = new URL(url);
|
|
39768
39874
|
const isLocal = parsed.hostname === "localhost" || parsed.hostname.endsWith(".localhost") || parsed.hostname.endsWith(".local") || parsed.hostname.endsWith(".test");
|
|
@@ -39771,97 +39877,97 @@ var sdkSiteUrlSchema = z74.string().url("Must be a valid URL").refine((url) => {
|
|
|
39771
39877
|
return false;
|
|
39772
39878
|
}
|
|
39773
39879
|
}, { message: "Production URLs must use HTTPS" }).transform((url) => url.replace(/\/$/, ""));
|
|
39774
|
-
var sectionBackgroundSchema =
|
|
39775
|
-
id:
|
|
39776
|
-
label:
|
|
39777
|
-
token:
|
|
39880
|
+
var sectionBackgroundSchema = z72.object({
|
|
39881
|
+
id: z72.string(),
|
|
39882
|
+
label: z72.string(),
|
|
39883
|
+
token: z72.string()
|
|
39778
39884
|
// Reference to theme palette token
|
|
39779
39885
|
});
|
|
39780
|
-
var sectionSpacingSchema =
|
|
39781
|
-
var containerMaxWidthSchema =
|
|
39782
|
-
var containerAlignmentSchema =
|
|
39783
|
-
var sectionOptionsSchema =
|
|
39784
|
-
backgroundColor:
|
|
39785
|
-
backgroundImage:
|
|
39786
|
-
backgroundGradient:
|
|
39787
|
-
spacing:
|
|
39788
|
-
|
|
39789
|
-
|
|
39886
|
+
var sectionSpacingSchema = z72.enum(["compact", "default", "spacious"]);
|
|
39887
|
+
var containerMaxWidthSchema = z72.enum(["narrow", "default", "wide", "full"]);
|
|
39888
|
+
var containerAlignmentSchema = z72.enum(["left", "center", "right"]);
|
|
39889
|
+
var sectionOptionsSchema = z72.object({
|
|
39890
|
+
backgroundColor: z72.boolean().optional(),
|
|
39891
|
+
backgroundImage: z72.boolean().optional(),
|
|
39892
|
+
backgroundGradient: z72.boolean().optional(),
|
|
39893
|
+
spacing: z72.union([
|
|
39894
|
+
z72.array(sectionSpacingSchema),
|
|
39895
|
+
z72.boolean()
|
|
39790
39896
|
]).optional(),
|
|
39791
|
-
textColor:
|
|
39897
|
+
textColor: z72.boolean().optional()
|
|
39792
39898
|
}).optional();
|
|
39793
|
-
var containerOptionsSchema =
|
|
39794
|
-
maxWidth:
|
|
39795
|
-
|
|
39796
|
-
|
|
39899
|
+
var containerOptionsSchema = z72.object({
|
|
39900
|
+
maxWidth: z72.union([
|
|
39901
|
+
z72.array(containerMaxWidthSchema),
|
|
39902
|
+
z72.boolean()
|
|
39797
39903
|
]).optional(),
|
|
39798
|
-
alignment:
|
|
39799
|
-
|
|
39800
|
-
|
|
39904
|
+
alignment: z72.union([
|
|
39905
|
+
z72.array(containerAlignmentSchema),
|
|
39906
|
+
z72.boolean()
|
|
39801
39907
|
]).optional()
|
|
39802
39908
|
}).optional();
|
|
39803
|
-
var siteStyleConfigSchema =
|
|
39804
|
-
sectionBackgrounds:
|
|
39909
|
+
var siteStyleConfigSchema = z72.object({
|
|
39910
|
+
sectionBackgrounds: z72.array(sectionBackgroundSchema).optional(),
|
|
39805
39911
|
sectionOptions: sectionOptionsSchema,
|
|
39806
39912
|
containerOptions: containerOptionsSchema
|
|
39807
39913
|
}).optional();
|
|
39808
|
-
var sdkLoaderEndpointSchema2 =
|
|
39914
|
+
var sdkLoaderEndpointSchema2 = z72.enum(SUPPORTED_LOADER_ENDPOINTS);
|
|
39809
39915
|
var allowedTransformIds = new Set(builtinTransformDefinitions.map((transform) => transform.id));
|
|
39810
|
-
var loaderTransformStepSchema =
|
|
39811
|
-
id:
|
|
39916
|
+
var loaderTransformStepSchema = z72.object({
|
|
39917
|
+
id: z72.string().refine((id) => allowedTransformIds.has(id), {
|
|
39812
39918
|
message: "Unknown transform id"
|
|
39813
39919
|
}),
|
|
39814
|
-
options:
|
|
39920
|
+
options: z72.record(z72.string(), z72.unknown()).optional()
|
|
39815
39921
|
});
|
|
39816
|
-
var loaderParamBindingSchema2 =
|
|
39817
|
-
$bind:
|
|
39818
|
-
from:
|
|
39922
|
+
var loaderParamBindingSchema2 = z72.object({
|
|
39923
|
+
$bind: z72.object({
|
|
39924
|
+
from: z72.string().min(1, "Binding path is required"),
|
|
39819
39925
|
// Loader params are ultimately string-normalized for query strings, so fallbacks should
|
|
39820
39926
|
// stay scalar. Use transforms (e.g. `value.jsonArray`) when you need to serialize
|
|
39821
39927
|
// more complex values into a string.
|
|
39822
39928
|
fallback: loaderFallbackScalarSchema.optional(),
|
|
39823
|
-
transforms:
|
|
39824
|
-
pick:
|
|
39825
|
-
coerce:
|
|
39929
|
+
transforms: z72.array(loaderTransformStepSchema).default([]),
|
|
39930
|
+
pick: z72.enum(["value", "collection", "context"]).default("value"),
|
|
39931
|
+
coerce: z72.enum(["number", "boolean", "string"]).optional()
|
|
39826
39932
|
})
|
|
39827
39933
|
});
|
|
39828
|
-
var loaderParamValueSchema2 =
|
|
39829
|
-
|
|
39830
|
-
|
|
39831
|
-
|
|
39934
|
+
var loaderParamValueSchema2 = z72.union([
|
|
39935
|
+
z72.string(),
|
|
39936
|
+
z72.number(),
|
|
39937
|
+
z72.boolean(),
|
|
39832
39938
|
loaderParamBindingSchema2
|
|
39833
39939
|
]);
|
|
39834
|
-
var loaderWhenValueSchema =
|
|
39835
|
-
|
|
39940
|
+
var loaderWhenValueSchema = z72.union([
|
|
39941
|
+
z72.boolean(),
|
|
39836
39942
|
loaderParamBindingSchema2
|
|
39837
39943
|
]);
|
|
39838
|
-
var sdkConfigLoaderSchema2 =
|
|
39944
|
+
var sdkConfigLoaderSchema2 = z72.object({
|
|
39839
39945
|
endpoint: sdkLoaderEndpointSchema2,
|
|
39840
|
-
params:
|
|
39841
|
-
mode:
|
|
39946
|
+
params: z72.record(z72.string(), loaderParamValueSchema2),
|
|
39947
|
+
mode: z72.enum(["server", "client"]).default("server"),
|
|
39842
39948
|
when: loaderWhenValueSchema.optional()
|
|
39843
39949
|
});
|
|
39844
|
-
var sdkDataLoadersSchema2 =
|
|
39950
|
+
var sdkDataLoadersSchema2 = z72.record(z72.string(), sdkConfigLoaderSchema2).refine(
|
|
39845
39951
|
(loaders) => Object.keys(loaders).length <= 5,
|
|
39846
39952
|
{ message: "Maximum 5 data loaders per block" }
|
|
39847
39953
|
).optional();
|
|
39848
|
-
var fieldSelectOptionSchema =
|
|
39849
|
-
value:
|
|
39850
|
-
label:
|
|
39954
|
+
var fieldSelectOptionSchema = z72.object({
|
|
39955
|
+
value: z72.string().min(1, "Option value is required"),
|
|
39956
|
+
label: z72.string().min(1, "Option label is required")
|
|
39851
39957
|
});
|
|
39852
|
-
var blockFieldConfigSchema =
|
|
39853
|
-
options:
|
|
39958
|
+
var blockFieldConfigSchema = z72.object({
|
|
39959
|
+
options: z72.array(fieldSelectOptionSchema).min(1, "At least one option is required").optional()
|
|
39854
39960
|
});
|
|
39855
|
-
var blockFieldOptionsSchema =
|
|
39856
|
-
|
|
39961
|
+
var blockFieldOptionsSchema = z72.record(
|
|
39962
|
+
z72.string().regex(/^(block\.|custom\.)[a-z][a-z0-9-]*$/, {
|
|
39857
39963
|
message: "Block ID must be 'block.*' or 'custom.*' format"
|
|
39858
39964
|
}),
|
|
39859
|
-
|
|
39860
|
-
|
|
39965
|
+
z72.record(
|
|
39966
|
+
z72.string().min(1, "Field ID is required"),
|
|
39861
39967
|
blockFieldConfigSchema
|
|
39862
39968
|
)
|
|
39863
39969
|
).optional();
|
|
39864
|
-
var blockFieldExtensionSchema =
|
|
39970
|
+
var blockFieldExtensionSchema = z72.object({
|
|
39865
39971
|
fields: fieldSchema.array().min(1, "At least one field is required")
|
|
39866
39972
|
}).refine(
|
|
39867
39973
|
(data) => {
|
|
@@ -39875,10 +39981,10 @@ var blockFieldExtensionSchema = z74.object({
|
|
|
39875
39981
|
message: "Required fields must have a defaultValue to support existing blocks"
|
|
39876
39982
|
}
|
|
39877
39983
|
);
|
|
39878
|
-
var blockFieldExtensionsMapSchema =
|
|
39984
|
+
var blockFieldExtensionsMapSchema = z72.record(
|
|
39879
39985
|
// System blocks are kebab-case: block.body-text, block.event-calendar, ...
|
|
39880
39986
|
// Enforce: lowercase alphanumerics with single hyphens (no trailing hyphen, no consecutive hyphens).
|
|
39881
|
-
|
|
39987
|
+
z72.string().regex(/^block\.[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/, {
|
|
39882
39988
|
message: "Block ID must be 'block.*' format (system blocks only)"
|
|
39883
39989
|
}),
|
|
39884
39990
|
blockFieldExtensionSchema
|
|
@@ -39894,7 +40000,7 @@ var blockFieldExtensionsMapSchema = z74.record(
|
|
|
39894
40000
|
(field) => field.id === collision.fieldId
|
|
39895
40001
|
);
|
|
39896
40002
|
ctx.addIssue({
|
|
39897
|
-
code:
|
|
40003
|
+
code: z72.ZodIssueCode.custom,
|
|
39898
40004
|
message: collision.message,
|
|
39899
40005
|
path: [
|
|
39900
40006
|
APPOINTMENT_BOOKING_BLOCK_ID,
|
|
@@ -39960,24 +40066,24 @@ function validateFieldIdConflicts(blockFieldExtensions) {
|
|
|
39960
40066
|
}
|
|
39961
40067
|
return conflicts;
|
|
39962
40068
|
}
|
|
39963
|
-
var syncConfigSchema =
|
|
39964
|
-
existingEntries:
|
|
40069
|
+
var syncConfigSchema = z72.object({
|
|
40070
|
+
existingEntries: z72.enum(["skip", "update"]).optional()
|
|
39965
40071
|
}).optional();
|
|
39966
|
-
var deployConfigSchema =
|
|
39967
|
-
verifyCommand:
|
|
39968
|
-
prebuildOutput:
|
|
40072
|
+
var deployConfigSchema = z72.object({
|
|
40073
|
+
verifyCommand: z72.string().optional(),
|
|
40074
|
+
prebuildOutput: z72.string().optional()
|
|
39969
40075
|
}).optional();
|
|
39970
|
-
var sdkCustomBlockSchema =
|
|
40076
|
+
var sdkCustomBlockSchema = z72.object({
|
|
39971
40077
|
// Block ID must start with 'custom.'
|
|
39972
|
-
id:
|
|
40078
|
+
id: z72.string().min(8).regex(/^custom\.[a-z][a-z0-9-]*$/, {
|
|
39973
40079
|
message: "Block ID must start with 'custom.' followed by lowercase letters, numbers, or hyphens"
|
|
39974
40080
|
}),
|
|
39975
|
-
title:
|
|
40081
|
+
title: z72.string().min(1, "Title is required"),
|
|
39976
40082
|
titleSource: titleSourceValueSchema.optional(),
|
|
39977
|
-
description:
|
|
40083
|
+
description: z72.string().optional(),
|
|
39978
40084
|
category: blockCategoryEnum,
|
|
39979
|
-
icon:
|
|
39980
|
-
tags:
|
|
40085
|
+
icon: z72.string().optional(),
|
|
40086
|
+
tags: z72.array(z72.string()).optional(),
|
|
39981
40087
|
// Reuse the exact field schema from @riverbankcms/blocks - all field types supported
|
|
39982
40088
|
fields: fieldSchema.array().min(1, "Custom blocks must have at least one field"),
|
|
39983
40089
|
// Data loaders for CMS endpoints
|
|
@@ -39985,14 +40091,14 @@ var sdkCustomBlockSchema = z74.object({
|
|
|
39985
40091
|
// Optional declarative layout - when present, block can render without React override
|
|
39986
40092
|
layout: NodeSchema.optional(),
|
|
39987
40093
|
// Optional variants system (preferred when a block has multiple structural layouts)
|
|
39988
|
-
variants:
|
|
39989
|
-
defaultVariant:
|
|
39990
|
-
variantOptions:
|
|
39991
|
-
|
|
39992
|
-
|
|
39993
|
-
label:
|
|
39994
|
-
description:
|
|
39995
|
-
icon:
|
|
40094
|
+
variants: z72.record(z72.string().min(1), NodeSchema).optional(),
|
|
40095
|
+
defaultVariant: z72.string().min(1).optional(),
|
|
40096
|
+
variantOptions: z72.record(
|
|
40097
|
+
z72.string().min(1),
|
|
40098
|
+
z72.object({
|
|
40099
|
+
label: z72.string().min(1).optional(),
|
|
40100
|
+
description: z72.string().min(1).optional(),
|
|
40101
|
+
icon: z72.string().min(1).optional()
|
|
39996
40102
|
})
|
|
39997
40103
|
).optional(),
|
|
39998
40104
|
previewCustomize: previewCustomizeManifestCurationSchema.optional()
|
|
@@ -40004,7 +40110,7 @@ var sdkCustomBlockSchema = z74.object({
|
|
|
40004
40110
|
const exists = fields3.some((field) => field.id === source);
|
|
40005
40111
|
if (!exists) {
|
|
40006
40112
|
ctx.addIssue({
|
|
40007
|
-
code:
|
|
40113
|
+
code: z72.ZodIssueCode.custom,
|
|
40008
40114
|
message: `titleSource must reference a valid field ID (got "${source}")`,
|
|
40009
40115
|
path: Array.isArray(data.titleSource) ? ["titleSource", index] : ["titleSource"]
|
|
40010
40116
|
});
|
|
@@ -40013,7 +40119,7 @@ var sdkCustomBlockSchema = z74.object({
|
|
|
40013
40119
|
}
|
|
40014
40120
|
if (data.layout && data.variants) {
|
|
40015
40121
|
ctx.addIssue({
|
|
40016
|
-
code:
|
|
40122
|
+
code: z72.ZodIssueCode.custom,
|
|
40017
40123
|
message: "Custom block must define either `layout` or `variants`, not both",
|
|
40018
40124
|
path: ["variants"]
|
|
40019
40125
|
});
|
|
@@ -40023,7 +40129,7 @@ var sdkCustomBlockSchema = z74.object({
|
|
|
40023
40129
|
if (!result.valid) {
|
|
40024
40130
|
for (const error of result.errors) {
|
|
40025
40131
|
ctx.addIssue({
|
|
40026
|
-
code:
|
|
40132
|
+
code: z72.ZodIssueCode.custom,
|
|
40027
40133
|
message: error.message,
|
|
40028
40134
|
path: ["layout"]
|
|
40029
40135
|
});
|
|
@@ -40034,14 +40140,14 @@ var sdkCustomBlockSchema = z74.object({
|
|
|
40034
40140
|
const keys = Object.keys(data.variants);
|
|
40035
40141
|
if (keys.length === 0) {
|
|
40036
40142
|
ctx.addIssue({
|
|
40037
|
-
code:
|
|
40143
|
+
code: z72.ZodIssueCode.custom,
|
|
40038
40144
|
message: "`variants` must contain at least one variant key",
|
|
40039
40145
|
path: ["variants"]
|
|
40040
40146
|
});
|
|
40041
40147
|
}
|
|
40042
40148
|
if (data.defaultVariant && !Object.prototype.hasOwnProperty.call(data.variants, data.defaultVariant)) {
|
|
40043
40149
|
ctx.addIssue({
|
|
40044
|
-
code:
|
|
40150
|
+
code: z72.ZodIssueCode.custom,
|
|
40045
40151
|
message: "`defaultVariant` must be a key present in `variants`",
|
|
40046
40152
|
path: ["defaultVariant"]
|
|
40047
40153
|
});
|
|
@@ -40051,7 +40157,7 @@ var sdkCustomBlockSchema = z74.object({
|
|
|
40051
40157
|
if (!result.valid) {
|
|
40052
40158
|
for (const error of result.errors) {
|
|
40053
40159
|
ctx.addIssue({
|
|
40054
|
-
code:
|
|
40160
|
+
code: z72.ZodIssueCode.custom,
|
|
40055
40161
|
message: `${key}: ${error.message}`,
|
|
40056
40162
|
path: ["variants", key]
|
|
40057
40163
|
});
|
|
@@ -40062,7 +40168,7 @@ var sdkCustomBlockSchema = z74.object({
|
|
|
40062
40168
|
for (const key of Object.keys(data.variantOptions)) {
|
|
40063
40169
|
if (!Object.prototype.hasOwnProperty.call(data.variants, key)) {
|
|
40064
40170
|
ctx.addIssue({
|
|
40065
|
-
code:
|
|
40171
|
+
code: z72.ZodIssueCode.custom,
|
|
40066
40172
|
message: "`variantOptions` key must exist in `variants`",
|
|
40067
40173
|
path: ["variantOptions", key]
|
|
40068
40174
|
});
|
|
@@ -40071,58 +40177,58 @@ var sdkCustomBlockSchema = z74.object({
|
|
|
40071
40177
|
}
|
|
40072
40178
|
}
|
|
40073
40179
|
});
|
|
40074
|
-
var themeSourceSchema =
|
|
40075
|
-
var activeThemeSchema =
|
|
40180
|
+
var themeSourceSchema = z72.enum(["local", "cms"]).optional();
|
|
40181
|
+
var activeThemeSchema = z72.string().regex(/^[a-z0-9][a-z0-9-_]*$/, {
|
|
40076
40182
|
message: "Theme name must be lowercase alphanumeric with hyphens/underscores"
|
|
40077
40183
|
}).max(64, "Theme name too long").optional();
|
|
40078
40184
|
function isValidConfigBlockKind(kind) {
|
|
40079
40185
|
if (getBlockDefinition(kind)) return true;
|
|
40080
40186
|
return /^custom\.[a-z][a-z0-9-]*$/.test(kind);
|
|
40081
40187
|
}
|
|
40082
|
-
var layoutBlockKindSchema =
|
|
40188
|
+
var layoutBlockKindSchema = z72.string().refine(isValidConfigBlockKind, {
|
|
40083
40189
|
message: 'Block kind must be a system block (e.g., "block.hero") or a custom block (e.g., "custom.my-block")'
|
|
40084
40190
|
});
|
|
40085
|
-
var layoutFooterBlockSchema =
|
|
40086
|
-
id:
|
|
40191
|
+
var layoutFooterBlockSchema = z72.object({
|
|
40192
|
+
id: z72.string().min(1).optional(),
|
|
40087
40193
|
kind: layoutBlockKindSchema,
|
|
40088
40194
|
// Allow omitted content for blocks that rely on defaults.
|
|
40089
|
-
content:
|
|
40195
|
+
content: z72.record(z72.string(), z72.unknown()).optional()
|
|
40090
40196
|
}).strict();
|
|
40091
|
-
var layoutConfigSchema =
|
|
40092
|
-
footerBlocks:
|
|
40197
|
+
var layoutConfigSchema = z72.object({
|
|
40198
|
+
footerBlocks: z72.array(layoutFooterBlockSchema).optional()
|
|
40093
40199
|
}).strict();
|
|
40094
|
-
var sdkWorkflowIdSchema2 =
|
|
40200
|
+
var sdkWorkflowIdSchema2 = z72.string().min(1).max(SDK_WORKFLOW_ID_MAX_LENGTH).regex(SDK_WORKFLOW_ID_PATTERN, {
|
|
40095
40201
|
message: "Workflow ID must start with a lowercase letter and use lowercase letters, numbers, dots, underscores, or hyphens"
|
|
40096
40202
|
});
|
|
40097
|
-
var sdkWorkflowEndpointSchema2 =
|
|
40098
|
-
var sdkWorkflowTriggerSchema2 =
|
|
40099
|
-
|
|
40203
|
+
var sdkWorkflowEndpointSchema2 = z72.string().min(1).max(SDK_WORKFLOW_ENDPOINT_MAX_LENGTH).regex(SDK_WORKFLOW_ENDPOINT_PATTERN, { message: 'Workflow endpoint must be a site-relative path starting with "/"' });
|
|
40204
|
+
var sdkWorkflowTriggerSchema2 = z72.discriminatedUnion("type", [
|
|
40205
|
+
z72.object({ type: z72.literal("manual") }).strict()
|
|
40100
40206
|
]);
|
|
40101
|
-
var sdkWorkflowConfirmationSchema2 =
|
|
40102
|
-
title:
|
|
40103
|
-
body:
|
|
40207
|
+
var sdkWorkflowConfirmationSchema2 = z72.object({
|
|
40208
|
+
title: z72.string().trim().min(1).max(SDK_WORKFLOW_CONFIRMATION_TITLE_MAX_LENGTH),
|
|
40209
|
+
body: z72.string().trim().min(1).max(SDK_WORKFLOW_CONFIRMATION_BODY_MAX_LENGTH).optional()
|
|
40104
40210
|
}).strict();
|
|
40105
|
-
var sdkWorkflowConfigSchema2 =
|
|
40211
|
+
var sdkWorkflowConfigSchema2 = z72.object({
|
|
40106
40212
|
id: sdkWorkflowIdSchema2,
|
|
40107
|
-
title:
|
|
40108
|
-
description:
|
|
40109
|
-
contentType:
|
|
40213
|
+
title: z72.string().trim().min(1).max(SDK_WORKFLOW_TITLE_MAX_LENGTH),
|
|
40214
|
+
description: z72.string().trim().min(1).max(SDK_WORKFLOW_DESCRIPTION_MAX_LENGTH).optional(),
|
|
40215
|
+
contentType: z72.string().trim().min(1).max(SDK_WORKFLOW_CONTENT_TYPE_MAX_LENGTH),
|
|
40110
40216
|
endpoint: sdkWorkflowEndpointSchema2,
|
|
40111
|
-
triggers:
|
|
40217
|
+
triggers: z72.array(sdkWorkflowTriggerSchema2).min(1).max(SDK_WORKFLOW_TRIGGER_MAX_COUNT),
|
|
40112
40218
|
confirmation: sdkWorkflowConfirmationSchema2.optional()
|
|
40113
40219
|
}).strict();
|
|
40114
|
-
var sdkWorkflowsSchema2 =
|
|
40220
|
+
var sdkWorkflowsSchema2 = z72.array(sdkWorkflowConfigSchema2).max(SDK_WORKFLOW_MAX_COUNT, "Maximum 50 workflows per site").refine((workflows) => {
|
|
40115
40221
|
const ids = workflows.map((workflow) => workflow.id);
|
|
40116
40222
|
return ids.length === new Set(ids).size;
|
|
40117
40223
|
}, { message: "Workflow IDs must be unique" }).optional();
|
|
40118
|
-
var riverbankSiteConfigSchema =
|
|
40119
|
-
siteId:
|
|
40224
|
+
var riverbankSiteConfigSchema = z72.object({
|
|
40225
|
+
siteId: z72.string().uuid(),
|
|
40120
40226
|
previewUrl: sdkSiteUrlSchema.optional(),
|
|
40121
40227
|
liveUrl: sdkSiteUrlSchema.optional(),
|
|
40122
40228
|
theme: sdkThemeConfigSchema2.optional(),
|
|
40123
40229
|
styles: siteStyleConfigSchema,
|
|
40124
40230
|
layout: layoutConfigSchema.optional(),
|
|
40125
|
-
customBlocks:
|
|
40231
|
+
customBlocks: z72.array(sdkCustomBlockSchema).max(100, "Maximum 100 custom blocks per site").refine(
|
|
40126
40232
|
// Ensure unique block IDs
|
|
40127
40233
|
(blocks) => {
|
|
40128
40234
|
const ids = blocks.map((b) => b.id);
|
|
@@ -40135,7 +40241,7 @@ var riverbankSiteConfigSchema = z74.object({
|
|
|
40135
40241
|
workflows: sdkWorkflowsSchema2,
|
|
40136
40242
|
content: contentConfigSchema.optional(),
|
|
40137
40243
|
// CLI-related configuration (Phase 4)
|
|
40138
|
-
contentDir:
|
|
40244
|
+
contentDir: z72.string().optional(),
|
|
40139
40245
|
sync: syncConfigSchema,
|
|
40140
40246
|
deploy: deployConfigSchema,
|
|
40141
40247
|
// Theme sync configuration (Phase 5)
|