@riverbankcms/sdk 0.90.0 → 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/dist/{PreviewEditorSidebar-KVXNF3VW.mjs → PreviewEditorSidebar-FNFRVSIM.mjs} +2 -2
- package/dist/{PreviewEditorUI-J3JN5Z7T.mjs → PreviewEditorUI-3WXJFQXG.mjs} +2 -2
- package/dist/SdkPreviewModeRuntime-2UCIMKUB.mjs +8 -0
- package/dist/_dts/api/src/bookingConfig.d.ts +3 -0
- package/dist/_dts/api/src/event-listing-destination.d.ts +59 -0
- package/dist/_dts/api/src/index.d.ts +4 -0
- 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 +3 -1
- package/dist/_dts/api/src/settings/permissions.d.ts +273 -0
- package/dist/_dts/api/src/types.d.ts +1 -0
- 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 +12 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +9 -9
- package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +24 -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/pricing.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +7 -0
- package/dist/_dts/core/src/event-pricing.d.ts +12 -2
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +11 -1
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +11 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/{chunk-PMBB6MQ7.mjs → chunk-CR2VX432.mjs} +297 -117
- package/dist/{chunk-AEOYWPE4.mjs → chunk-FA6LVZ7C.mjs} +5 -5
- package/dist/{chunk-RQ3XZ4SJ.mjs → chunk-H6TT5ZXI.mjs} +1 -1
- package/dist/{chunk-GSPFFUVB.mjs → chunk-SYYJZPKU.mjs} +1 -1
- package/dist/cli/index.mjs +160 -103
- package/dist/client/{accordion-GXQNWQ6O.mjs → accordion-4K7VGZ3I.mjs} +2 -2
- package/dist/client/{bookingForm-STLUJ36H.mjs → bookingForm-3QXA3CIS.mjs} +5 -5
- package/dist/client/bookings.mjs +1154 -556
- package/dist/client/{carousel-CVRN6EPP.mjs → carousel-BEJKNGQ7.mjs} +3 -3
- package/dist/client/{cart-IYIBA5CL.mjs → cart-44BBM6XG.mjs} +6 -6
- package/dist/client/{checkout-O3BGM4GS.mjs → checkout-THMHEYKF.mjs} +6 -6
- package/dist/client/{chunk-25W2EQUN.mjs → chunk-3H5CLFKT.mjs} +8 -0
- package/dist/client/{chunk-MFPKS6QS.mjs → chunk-4COPESPO.mjs} +5 -5
- package/dist/client/{chunk-4RTFGHZN.mjs → chunk-5AJIMWKS.mjs} +6 -3
- package/dist/client/{chunk-6DPXDOIL.mjs → chunk-B4H6QMPY.mjs} +93 -22
- package/dist/client/{chunk-VFHZLZAC.mjs → chunk-DQIRKNZE.mjs} +1 -1
- package/dist/client/{chunk-7DH35FGA.mjs → chunk-EJBHK74Y.mjs} +1 -1
- package/dist/client/{chunk-DAS5CIER.mjs → chunk-JV7ZNAOU.mjs} +118 -20
- package/dist/client/{chunk-FHU6PFPM.mjs → chunk-KNTLBQ3N.mjs} +1 -1
- package/dist/client/{chunk-Z62JYS5O.mjs → chunk-PEDNDLPB.mjs} +2 -2
- package/dist/client/{chunk-NBFRJ5NB.mjs → chunk-SLY6UDAS.mjs} +2 -2
- package/dist/client/{chunk-D3ETC2SU.mjs → chunk-ZIAF2DA4.mjs} +1 -1
- package/dist/client/client.mjs +272 -83
- package/dist/client/{courseRegistration-2D3ACMJR.mjs → courseRegistration-URX7RCCK.mjs} +5 -5
- package/dist/client/{eventCalendar-QY4UZUFF.mjs → eventCalendar-GTENOQCE.mjs} +8 -8
- package/dist/client/{eventCombined-RRCDKJC2.mjs → eventCombined-EZVB72MF.mjs} +8 -8
- package/dist/client/{eventDetails-YO335BUT.mjs → eventDetails-CH4BJR5Z.mjs} +8 -8
- package/dist/client/{eventListing-PXA6GFQ3.mjs → eventListing-4BVOI5HS.mjs} +8 -8
- package/dist/client/{eventRegistration-2ZHEDDXO.mjs → eventRegistration-37LPIKIE.mjs} +8 -8
- package/dist/client/{form-ZS6KX4U2.mjs → form-FX3Y54YK.mjs} +2 -2
- package/dist/client/{headerSection-QK5SLIIB.mjs → headerSection-UOZZGVYL.mjs} +3 -3
- package/dist/client/hooks.mjs +86 -35
- package/dist/client/{locationMap-GFNIUD2X.mjs → locationMap-VSIPKV35.mjs} +3 -3
- package/dist/client/{newsletterForm-PGLTTCUG.mjs → newsletterForm-6FRJKNAF.mjs} +2 -2
- package/dist/client/{productDetail-OPBE5ZPI.mjs → productDetail-6AHMLXCO.mjs} +6 -6
- package/dist/client/{productList-NI72Q62Z.mjs → productList-M2CYIZVH.mjs} +6 -6
- package/dist/client/rendering/client.mjs +231 -42
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +273 -84
- package/dist/client/{shop-3ZQPEWYI.mjs → shop-AUOT6GEX.mjs} +6 -6
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/{sdk-runtime-FSHXCWDS.mjs → sdk-runtime-6GPJNLU6.mjs} +4 -4
- package/dist/server/components.mjs +136 -58
- package/dist/server/config-validation.mjs +78 -27
- package/dist/server/config.mjs +78 -27
- package/dist/server/data.mjs +86 -35
- package/dist/server/index.mjs +1 -1
- package/dist/server/next.mjs +157 -79
- package/dist/server/page-converter.mjs +72 -21
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +148 -70
- package/dist/server/rendering.mjs +152 -74
- package/dist/server/routing.mjs +121 -44
- package/dist/server/server.mjs +95 -44
- package/package.json +2 -2
- package/dist/SdkPreviewModeRuntime-UBL6MSNP.mjs +0 -8
package/dist/server/next.mjs
CHANGED
|
@@ -6537,6 +6537,8 @@ function publicEventPricingType(pricing) {
|
|
|
6537
6537
|
case "ticket_types":
|
|
6538
6538
|
case "course":
|
|
6539
6539
|
return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
|
|
6540
|
+
case "external":
|
|
6541
|
+
return "external";
|
|
6540
6542
|
}
|
|
6541
6543
|
}
|
|
6542
6544
|
function publicEventPricingCurrency(pricing) {
|
|
@@ -6548,6 +6550,8 @@ function publicEventPricingCurrency(pricing) {
|
|
|
6548
6550
|
return pricing.currency;
|
|
6549
6551
|
case "course":
|
|
6550
6552
|
return pricing.display.display.currency;
|
|
6553
|
+
case "external":
|
|
6554
|
+
return null;
|
|
6551
6555
|
}
|
|
6552
6556
|
}
|
|
6553
6557
|
function isFreePublicEventPriceDisplay(display) {
|
|
@@ -6561,6 +6565,7 @@ function isFreePublicEventPriceDisplay(display) {
|
|
|
6561
6565
|
case "range":
|
|
6562
6566
|
case "mixed":
|
|
6563
6567
|
case "unavailable":
|
|
6568
|
+
case "external":
|
|
6564
6569
|
return false;
|
|
6565
6570
|
}
|
|
6566
6571
|
}
|
|
@@ -6591,6 +6596,8 @@ function formatBookingPriceDisplay(display, options = {}) {
|
|
|
6591
6596
|
return display.paidToAmount > display.paidFromAmount ? `Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)} - ${formatCurrencyAmount(display.paidToAmount, display.currency, options)}` : `Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)}`;
|
|
6592
6597
|
case "unavailable":
|
|
6593
6598
|
return "Pricing unavailable";
|
|
6599
|
+
case "external":
|
|
6600
|
+
return display.label;
|
|
6594
6601
|
case "course":
|
|
6595
6602
|
return formatCoursePriceDisplayLabel(display.display, options);
|
|
6596
6603
|
default:
|
|
@@ -32926,6 +32933,18 @@ var publicCoursesArraySchema = z45.array(publicCourseSchema);
|
|
|
32926
32933
|
var eventPresetSchema = z46.enum(["event", "class", "workshop", "retreat", "performance"]);
|
|
32927
32934
|
var eventScheduleScopeSchema = z46.enum(["recurring", "oneOff"]);
|
|
32928
32935
|
var eventDestinationModeSchema = z46.enum(["cms-managed", "system-managed"]);
|
|
32936
|
+
var publicEventDestinationSchema = z46.discriminatedUnion("kind", [
|
|
32937
|
+
z46.object({
|
|
32938
|
+
kind: z46.literal("native"),
|
|
32939
|
+
mode: eventDestinationModeSchema,
|
|
32940
|
+
path: z46.string()
|
|
32941
|
+
}),
|
|
32942
|
+
z46.object({
|
|
32943
|
+
kind: z46.literal("external"),
|
|
32944
|
+
url: z46.string(),
|
|
32945
|
+
label: z46.string()
|
|
32946
|
+
})
|
|
32947
|
+
]);
|
|
32929
32948
|
var eventVenueSchema = z46.object({
|
|
32930
32949
|
id: z46.string(),
|
|
32931
32950
|
name: z46.string(),
|
|
@@ -32940,7 +32959,7 @@ var eventCategorySchema = z46.object({
|
|
|
32940
32959
|
name: z46.string(),
|
|
32941
32960
|
color: z46.string().nullable()
|
|
32942
32961
|
});
|
|
32943
|
-
var pricingTypeSchema = z46.enum(["free", "paid"]);
|
|
32962
|
+
var pricingTypeSchema = z46.enum(["free", "paid", "external"]);
|
|
32944
32963
|
var accessRestrictionSchema = z46.enum(["none", "category"]);
|
|
32945
32964
|
var eventPricingModeSchema = z46.enum(["single", "ticket_types"]);
|
|
32946
32965
|
var publicCoursePriceDisplaySchema = z46.discriminatedUnion("kind", [
|
|
@@ -32961,6 +32980,7 @@ var publicEventPriceDisplaySchema = z46.discriminatedUnion("kind", [
|
|
|
32961
32980
|
currency: z46.string()
|
|
32962
32981
|
}),
|
|
32963
32982
|
z46.object({ kind: z46.literal("unavailable"), currency: z46.string() }),
|
|
32983
|
+
z46.object({ kind: z46.literal("external"), label: z46.string() }),
|
|
32964
32984
|
z46.object({ kind: z46.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
32965
32985
|
]);
|
|
32966
32986
|
var publicEventTicketTypePriceDisplaySchema = z46.union([
|
|
@@ -33039,6 +33059,10 @@ var publicEventPricingSchema = z46.discriminatedUnion("kind", [
|
|
|
33039
33059
|
z46.object({
|
|
33040
33060
|
kind: z46.literal("course"),
|
|
33041
33061
|
display: z46.object({ kind: z46.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
33062
|
+
}),
|
|
33063
|
+
z46.object({
|
|
33064
|
+
kind: z46.literal("external"),
|
|
33065
|
+
display: z46.object({ kind: z46.literal("external"), label: z46.string() })
|
|
33042
33066
|
})
|
|
33043
33067
|
]);
|
|
33044
33068
|
var publicTeamMemberSummarySchema = z46.object({
|
|
@@ -33067,7 +33091,8 @@ var publicEventSchema = z46.object({
|
|
|
33067
33091
|
image: mediaSchema2.nullable().optional()
|
|
33068
33092
|
}).optional(),
|
|
33069
33093
|
slug: z46.string(),
|
|
33070
|
-
path: z46.string(),
|
|
33094
|
+
path: z46.string().nullable(),
|
|
33095
|
+
destination: publicEventDestinationSchema,
|
|
33071
33096
|
requiresRegistration: z46.boolean(),
|
|
33072
33097
|
deliveryMode: z46.enum(["in_person", "online", "hybrid"]),
|
|
33073
33098
|
attendanceModes: z46.array(publicEventAttendanceModeAvailabilitySchema),
|
|
@@ -33371,12 +33396,41 @@ function isEventContentType(slug) {
|
|
|
33371
33396
|
return EVENT_CONTENT_TYPE_SLUGS.includes(slug);
|
|
33372
33397
|
}
|
|
33373
33398
|
|
|
33399
|
+
// ../blocks/src/system/runtime/nodes/events/shared/destination.ts
|
|
33400
|
+
function isRecord5(value) {
|
|
33401
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
33402
|
+
}
|
|
33403
|
+
function isRuntimeEventDestination(value) {
|
|
33404
|
+
if (!isRecord5(value) || typeof value.kind !== "string") return false;
|
|
33405
|
+
if (value.kind === "native") {
|
|
33406
|
+
return (value.mode === "cms-managed" || value.mode === "system-managed") && typeof value.path === "string";
|
|
33407
|
+
}
|
|
33408
|
+
return value.kind === "external" && typeof value.url === "string" && typeof value.label === "string";
|
|
33409
|
+
}
|
|
33410
|
+
function resolveRuntimeEventDestination(event) {
|
|
33411
|
+
if (isRuntimeEventDestination(event.destination)) {
|
|
33412
|
+
return event.destination;
|
|
33413
|
+
}
|
|
33414
|
+
return {
|
|
33415
|
+
kind: "native",
|
|
33416
|
+
mode: event.eventDestinationMode === "system-managed" ? "system-managed" : "cms-managed",
|
|
33417
|
+
path: typeof event.path === "string" ? event.path : ""
|
|
33418
|
+
};
|
|
33419
|
+
}
|
|
33420
|
+
|
|
33374
33421
|
// ../blocks/src/system/runtime/nodes/events/shared/pricing.ts
|
|
33375
33422
|
var DEFAULT_EVENT_CURRENCY = "USD";
|
|
33376
33423
|
function resolveRuntimeEventPricing(event) {
|
|
33377
33424
|
if (isPublicEventPricing(event.pricing)) {
|
|
33378
33425
|
return event.pricing;
|
|
33379
33426
|
}
|
|
33427
|
+
const destination = resolveRuntimeEventDestination(event);
|
|
33428
|
+
if (destination.kind === "external") {
|
|
33429
|
+
return {
|
|
33430
|
+
kind: "external",
|
|
33431
|
+
display: { kind: "external", label: "External registration" }
|
|
33432
|
+
};
|
|
33433
|
+
}
|
|
33380
33434
|
const legacy = event;
|
|
33381
33435
|
const currency = readCurrency(legacy.currency);
|
|
33382
33436
|
if (event.requiresRegistration === false) {
|
|
@@ -33413,22 +33467,22 @@ function resolveRuntimeEventPricing(event) {
|
|
|
33413
33467
|
function readCurrency(value) {
|
|
33414
33468
|
return typeof value === "string" && value.trim().length > 0 ? value : DEFAULT_EVENT_CURRENCY;
|
|
33415
33469
|
}
|
|
33416
|
-
function
|
|
33470
|
+
function isRecord6(value) {
|
|
33417
33471
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
33418
33472
|
}
|
|
33419
33473
|
function isPublicEventPricing(value) {
|
|
33420
|
-
if (!
|
|
33421
|
-
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course";
|
|
33474
|
+
if (!isRecord6(value) || typeof value.kind !== "string") return false;
|
|
33475
|
+
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course" || value.kind === "external";
|
|
33422
33476
|
}
|
|
33423
33477
|
function isPublicEventTicketType(value) {
|
|
33424
|
-
return
|
|
33478
|
+
return isRecord6(value) && typeof value.id === "string";
|
|
33425
33479
|
}
|
|
33426
33480
|
function readTicketTypePriceDisplay(value, currency) {
|
|
33427
33481
|
const display = readLegacyPriceDisplay(value, currency);
|
|
33428
|
-
return display.kind === "course" ? { kind: "unavailable", currency } : display;
|
|
33482
|
+
return display.kind === "course" || display.kind === "external" ? { kind: "unavailable", currency } : display;
|
|
33429
33483
|
}
|
|
33430
33484
|
function readLegacyPriceDisplay(value, currency) {
|
|
33431
|
-
if (!
|
|
33485
|
+
if (!isRecord6(value) || typeof value.kind !== "string") {
|
|
33432
33486
|
return { kind: "unavailable", currency };
|
|
33433
33487
|
}
|
|
33434
33488
|
const displayCurrency = readCurrency(value.currency);
|
|
@@ -33467,7 +33521,7 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
33467
33521
|
case "unavailable":
|
|
33468
33522
|
return { kind: "unavailable", currency: displayCurrency };
|
|
33469
33523
|
case "course":
|
|
33470
|
-
return
|
|
33524
|
+
return isRecord6(value.display) ? {
|
|
33471
33525
|
kind: "course",
|
|
33472
33526
|
display: readCoursePriceDisplay(value.display, displayCurrency)
|
|
33473
33527
|
} : {
|
|
@@ -33554,7 +33608,7 @@ function resolveEventRequiresPayment(input) {
|
|
|
33554
33608
|
if (!input.event) {
|
|
33555
33609
|
return false;
|
|
33556
33610
|
}
|
|
33557
|
-
return publicEventPricingType(resolveRuntimeEventPricing(input.event))
|
|
33611
|
+
return publicEventPricingType(resolveRuntimeEventPricing(input.event)) === "paid";
|
|
33558
33612
|
}
|
|
33559
33613
|
|
|
33560
33614
|
// ../blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.ts
|
|
@@ -33751,15 +33805,16 @@ var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
33751
33805
|
})
|
|
33752
33806
|
});
|
|
33753
33807
|
function normalizeEventRegistrationEventInput(value) {
|
|
33754
|
-
if (!
|
|
33808
|
+
if (!isRecord7(value)) {
|
|
33755
33809
|
return value;
|
|
33756
33810
|
}
|
|
33757
33811
|
return {
|
|
33758
33812
|
...value,
|
|
33813
|
+
destination: resolveRuntimeEventDestination(value),
|
|
33759
33814
|
pricing: resolveRuntimeEventPricing(value)
|
|
33760
33815
|
};
|
|
33761
33816
|
}
|
|
33762
|
-
function
|
|
33817
|
+
function isRecord7(value) {
|
|
33763
33818
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
33764
33819
|
}
|
|
33765
33820
|
var eventRegistrationInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
@@ -35552,16 +35607,28 @@ function groupEventsByDate(events) {
|
|
|
35552
35607
|
function formatEventPrice(event) {
|
|
35553
35608
|
return formatEventPricing(resolveRuntimeEventPricing(event), { decimals: "auto" });
|
|
35554
35609
|
}
|
|
35610
|
+
function resolveEventHref(event) {
|
|
35611
|
+
const destination = resolveRuntimeEventDestination(event);
|
|
35612
|
+
return destination.kind === "external" ? destination.url : destination.path;
|
|
35613
|
+
}
|
|
35614
|
+
function resolveEventLinkProps(event) {
|
|
35615
|
+
const href = resolveEventHref(event);
|
|
35616
|
+
const destination = resolveRuntimeEventDestination(event);
|
|
35617
|
+
return destination.kind === "external" ? { href, target: "_blank", rel: "noopener noreferrer" } : { href };
|
|
35618
|
+
}
|
|
35555
35619
|
function resolveEventCta(event, buttonText) {
|
|
35556
35620
|
const { isFull: isSoldOut } = getEventAvailability(event);
|
|
35557
|
-
const
|
|
35621
|
+
const destination = resolveRuntimeEventDestination(event);
|
|
35622
|
+
const isExternal = destination.kind === "external";
|
|
35623
|
+
const defaultButtonText = isExternal ? destination.label : event.kind === "course_session" ? "Book course" : "Book";
|
|
35558
35624
|
const effectiveButtonText = buttonText ?? defaultButtonText;
|
|
35559
|
-
|
|
35560
|
-
|
|
35625
|
+
const href = resolveEventHref(event);
|
|
35626
|
+
if (!isExternal && isSoldOut) {
|
|
35627
|
+
return { label: "Sold out", href, external: false, hidden: true };
|
|
35561
35628
|
}
|
|
35562
35629
|
const enrollmentOpen = event.kind === "course_session" ? event.course?.enrollmentOpen !== false : true;
|
|
35563
35630
|
const label = !enrollmentOpen ? "Registration closed" : effectiveButtonText;
|
|
35564
|
-
return { label, href:
|
|
35631
|
+
return { label, href, external: isExternal, hidden: false };
|
|
35565
35632
|
}
|
|
35566
35633
|
|
|
35567
35634
|
// ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
@@ -36996,6 +37063,8 @@ var EventCard = ({
|
|
|
36996
37063
|
"a",
|
|
36997
37064
|
{
|
|
36998
37065
|
href: cta.href,
|
|
37066
|
+
target: cta.external ? "_blank" : void 0,
|
|
37067
|
+
rel: cta.external ? "noopener noreferrer" : void 0,
|
|
36999
37068
|
className: `${buttonClass} event-card-cta`,
|
|
37000
37069
|
children: cta.label
|
|
37001
37070
|
}
|
|
@@ -37085,10 +37154,19 @@ var EventCompactRow = ({
|
|
|
37085
37154
|
formattedTime,
|
|
37086
37155
|
/* @__PURE__ */ jsx8("span", { className: "event-compact-row-action-price", children: price })
|
|
37087
37156
|
] }),
|
|
37088
|
-
cta.hidden ? /* @__PURE__ */ jsx8("span", { className: "event-compact-row-status", children: cta.label }) : /* @__PURE__ */ jsxs6(
|
|
37089
|
-
|
|
37090
|
-
|
|
37091
|
-
|
|
37157
|
+
cta.hidden ? /* @__PURE__ */ jsx8("span", { className: "event-compact-row-status", children: cta.label }) : /* @__PURE__ */ jsxs6(
|
|
37158
|
+
"a",
|
|
37159
|
+
{
|
|
37160
|
+
href: cta.href,
|
|
37161
|
+
target: cta.external ? "_blank" : void 0,
|
|
37162
|
+
rel: cta.external ? "noopener noreferrer" : void 0,
|
|
37163
|
+
className: `${buttonClass} event-compact-row-cta`,
|
|
37164
|
+
children: [
|
|
37165
|
+
/* @__PURE__ */ jsx8("span", { children: cta.label }),
|
|
37166
|
+
/* @__PURE__ */ jsx8(ArrowRightIcon, { "aria-hidden": "true" })
|
|
37167
|
+
]
|
|
37168
|
+
}
|
|
37169
|
+
)
|
|
37092
37170
|
] })
|
|
37093
37171
|
] })
|
|
37094
37172
|
] });
|
|
@@ -38678,7 +38756,7 @@ function inferLegacyOfferingsPreviewGroupOrder(overrides) {
|
|
|
38678
38756
|
return keys.length >= 2 ? keys : [];
|
|
38679
38757
|
}
|
|
38680
38758
|
function normalizeOfferingsPreviewContentForWrite(value) {
|
|
38681
|
-
if (!
|
|
38759
|
+
if (!isRecord8(value)) return null;
|
|
38682
38760
|
const groupOrderValue = value.groupOrder;
|
|
38683
38761
|
if (Array.isArray(groupOrderValue)) {
|
|
38684
38762
|
const normalized = normalizeOfferingsPreviewGroupOrder(groupOrderValue);
|
|
@@ -38691,7 +38769,7 @@ function normalizeOfferingsPreviewContentForWrite(value) {
|
|
|
38691
38769
|
return { ...value, groupOrder: [] };
|
|
38692
38770
|
}
|
|
38693
38771
|
const legacyOrder = inferLegacyOfferingsPreviewGroupOrder(
|
|
38694
|
-
Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(
|
|
38772
|
+
Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord8) : []
|
|
38695
38773
|
);
|
|
38696
38774
|
return legacyOrder.length > 0 ? { ...value, groupOrder: legacyOrder } : value;
|
|
38697
38775
|
}
|
|
@@ -38745,7 +38823,7 @@ function uniqueOfferingsPreviewSourceKeys(values) {
|
|
|
38745
38823
|
}
|
|
38746
38824
|
return keys;
|
|
38747
38825
|
}
|
|
38748
|
-
function
|
|
38826
|
+
function isRecord8(value) {
|
|
38749
38827
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
38750
38828
|
}
|
|
38751
38829
|
function mergeOrderedKeysWithDefaults(orderedKeys, defaultKeys) {
|
|
@@ -39207,7 +39285,7 @@ function isOfferingsPreviewItemLimit(value) {
|
|
|
39207
39285
|
return value === "1" || value === "2" || value === "3" || value === "4" || value === "5" || value === "6" || value === null;
|
|
39208
39286
|
}
|
|
39209
39287
|
function normalizeOfferingsPreviewGroupOverride(value) {
|
|
39210
|
-
if (!
|
|
39288
|
+
if (!isRecord9(value)) return [];
|
|
39211
39289
|
const override = {};
|
|
39212
39290
|
if (isOfferingsPreviewSourceKey(value.sourceKey) || value.sourceKey === null) {
|
|
39213
39291
|
override.sourceKey = value.sourceKey;
|
|
@@ -39239,12 +39317,12 @@ function isButtonVariant(value) {
|
|
|
39239
39317
|
return value === "primary" || value === "secondary" || value === "outline" || value === "link" || value === null;
|
|
39240
39318
|
}
|
|
39241
39319
|
function normalizeCardStylesContent(value) {
|
|
39242
|
-
return
|
|
39320
|
+
return isRecord9(value) || value === null ? value : void 0;
|
|
39243
39321
|
}
|
|
39244
39322
|
function normalizeSectionStylesContent(value) {
|
|
39245
|
-
return
|
|
39323
|
+
return isRecord9(value) || value === null ? value : void 0;
|
|
39246
39324
|
}
|
|
39247
|
-
function
|
|
39325
|
+
function isRecord9(value) {
|
|
39248
39326
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
39249
39327
|
}
|
|
39250
39328
|
|
|
@@ -42410,7 +42488,7 @@ function deriveNewsletterSignupRuntimeSource(values) {
|
|
|
42410
42488
|
};
|
|
42411
42489
|
}
|
|
42412
42490
|
function sanitizeNewsletterSignupPublicContent(content) {
|
|
42413
|
-
if (!
|
|
42491
|
+
if (!isRecord10(content)) return content;
|
|
42414
42492
|
const provider = parseNewsletterSignupDestinationProvider(content.destinationProvider) ?? getProviderFromExplicitDestination(content.destination);
|
|
42415
42493
|
const {
|
|
42416
42494
|
destination: _destination,
|
|
@@ -42429,7 +42507,7 @@ function sanitizeNewsletterSignupPublicContent(content) {
|
|
|
42429
42507
|
return mutablePublicContent;
|
|
42430
42508
|
}
|
|
42431
42509
|
function getProviderFromExplicitDestination(destination) {
|
|
42432
|
-
if (!
|
|
42510
|
+
if (!isRecord10(destination) || typeof destination.tag !== "string") return null;
|
|
42433
42511
|
if (destination.tag === "riverbank_list") return "riverbank";
|
|
42434
42512
|
if (destination.tag === "mailchimp_audience") return "mailchimp";
|
|
42435
42513
|
return null;
|
|
@@ -42441,7 +42519,7 @@ function parseTrimmedString(value) {
|
|
|
42441
42519
|
const trimmed = value.trim();
|
|
42442
42520
|
return trimmed.length > 0 ? trimmed : null;
|
|
42443
42521
|
}
|
|
42444
|
-
function
|
|
42522
|
+
function isRecord10(value) {
|
|
42445
42523
|
return typeof value === "object" && value !== null;
|
|
42446
42524
|
}
|
|
42447
42525
|
|
|
@@ -44637,7 +44715,7 @@ import React4 from "react";
|
|
|
44637
44715
|
// ../blocks/src/system/data/linkedContentEntries.ts
|
|
44638
44716
|
var LINKED_CONTENT_ENTRY_META_KEY = "__rbLinkedContentEntry";
|
|
44639
44717
|
function coerceLinkedContentEntriesPayload(payload) {
|
|
44640
|
-
if (!
|
|
44718
|
+
if (!isRecord11(payload)) return payload;
|
|
44641
44719
|
const response = payload;
|
|
44642
44720
|
if (!Array.isArray(response.entries)) return payload;
|
|
44643
44721
|
const contentType = parsePublicContentTypeMeta(response.contentType);
|
|
@@ -44645,16 +44723,16 @@ function coerceLinkedContentEntriesPayload(payload) {
|
|
|
44645
44723
|
return response.entries.map((entry) => enrichLinkedContentEntry(entry, contentType));
|
|
44646
44724
|
}
|
|
44647
44725
|
function getLinkedContentEntryMeta(value) {
|
|
44648
|
-
if (!
|
|
44726
|
+
if (!isRecord11(value)) return null;
|
|
44649
44727
|
const candidate = value[LINKED_CONTENT_ENTRY_META_KEY];
|
|
44650
44728
|
return isLinkedContentEntryMeta(candidate) ? candidate : null;
|
|
44651
44729
|
}
|
|
44652
44730
|
function buildLinkedContentEditTarget(input) {
|
|
44653
44731
|
const { entry, sourceBlockId, sourceBlockKind, itemIndex } = input;
|
|
44654
|
-
if (!
|
|
44732
|
+
if (!isRecord11(entry)) return null;
|
|
44655
44733
|
const meta = getLinkedContentEntryMeta(entry);
|
|
44656
44734
|
if (!meta || meta.support.kind !== "supported") return null;
|
|
44657
|
-
const content =
|
|
44735
|
+
const content = isRecord11(entry.content) ? entry.content : {};
|
|
44658
44736
|
return {
|
|
44659
44737
|
kind: "linked-content-entry",
|
|
44660
44738
|
entryId: meta.entryId,
|
|
@@ -44704,12 +44782,12 @@ function resolveLinkedEntryInlineFieldEligibility(input) {
|
|
|
44704
44782
|
};
|
|
44705
44783
|
}
|
|
44706
44784
|
function enrichLinkedContentEntry(entry, contentType) {
|
|
44707
|
-
if (!
|
|
44785
|
+
if (!isRecord11(entry)) return entry;
|
|
44708
44786
|
const entryId = typeof entry.id === "string" ? entry.id : null;
|
|
44709
44787
|
if (!entryId) return entry;
|
|
44710
44788
|
const title = typeof entry.title === "string" && entry.title.trim().length > 0 ? entry.title : entryId;
|
|
44711
44789
|
const optimisticHash = typeof entry.optimisticHash === "string" && entry.optimisticHash.length > 0 ? entry.optimisticHash : null;
|
|
44712
|
-
const content =
|
|
44790
|
+
const content = isRecord11(entry.content) ? entry.content : {};
|
|
44713
44791
|
const meta = {
|
|
44714
44792
|
kind: "linked-content-entry",
|
|
44715
44793
|
entryId,
|
|
@@ -44805,7 +44883,7 @@ function capitalize(value) {
|
|
|
44805
44883
|
return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
|
|
44806
44884
|
}
|
|
44807
44885
|
function parsePublicContentTypeMeta(value) {
|
|
44808
|
-
if (!
|
|
44886
|
+
if (!isRecord11(value)) return null;
|
|
44809
44887
|
if (typeof value.key !== "string" || value.key.trim().length === 0) return null;
|
|
44810
44888
|
return {
|
|
44811
44889
|
key: value.key,
|
|
@@ -44815,7 +44893,7 @@ function parsePublicContentTypeMeta(value) {
|
|
|
44815
44893
|
};
|
|
44816
44894
|
}
|
|
44817
44895
|
function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
44818
|
-
if (!
|
|
44896
|
+
if (!isRecord11(value) || typeof value.kind !== "string") return null;
|
|
44819
44897
|
switch (value.kind) {
|
|
44820
44898
|
case "generic":
|
|
44821
44899
|
return { kind: "generic" };
|
|
@@ -44829,7 +44907,7 @@ function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
|
44829
44907
|
}
|
|
44830
44908
|
}
|
|
44831
44909
|
function parsePublicContentTypeFieldMeta(value) {
|
|
44832
|
-
if (!
|
|
44910
|
+
if (!isRecord11(value)) return [];
|
|
44833
44911
|
if (typeof value.id !== "string" || typeof value.type !== "string") return [];
|
|
44834
44912
|
return [{
|
|
44835
44913
|
id: value.id,
|
|
@@ -44844,14 +44922,14 @@ function parseStringArray(value) {
|
|
|
44844
44922
|
return value.filter((item) => typeof item === "string");
|
|
44845
44923
|
}
|
|
44846
44924
|
function isLinkedContentEntryMeta(value) {
|
|
44847
|
-
if (!
|
|
44925
|
+
if (!isRecord11(value)) return false;
|
|
44848
44926
|
if (value.kind !== "linked-content-entry") return false;
|
|
44849
44927
|
if (typeof value.entryId !== "string") return false;
|
|
44850
44928
|
if (typeof value.contentTypeKey !== "string") return false;
|
|
44851
44929
|
if (typeof value.contentTypeLabel !== "string") return false;
|
|
44852
44930
|
if (typeof value.title !== "string") return false;
|
|
44853
44931
|
if (!(value.optimisticHash === null || typeof value.optimisticHash === "string")) return false;
|
|
44854
|
-
if (!
|
|
44932
|
+
if (!isRecord11(value.contentType)) return false;
|
|
44855
44933
|
if (!isLinkedEntryFieldSourceArray(value.fieldSources)) return false;
|
|
44856
44934
|
return isLinkedContentEditSupport(value.support);
|
|
44857
44935
|
}
|
|
@@ -44859,7 +44937,7 @@ function isLinkedEntryFieldSourceArray(value) {
|
|
|
44859
44937
|
return Array.isArray(value) && value.every(isLinkedEntryFieldSource);
|
|
44860
44938
|
}
|
|
44861
44939
|
function isLinkedEntryFieldSource(value) {
|
|
44862
|
-
if (!
|
|
44940
|
+
if (!isRecord11(value)) return false;
|
|
44863
44941
|
if (typeof value.displayPath !== "string") return false;
|
|
44864
44942
|
switch (value.kind) {
|
|
44865
44943
|
case "content-field":
|
|
@@ -44885,7 +44963,7 @@ function isLinkedEntryInlineFieldReadOnlyReason(value) {
|
|
|
44885
44963
|
}
|
|
44886
44964
|
}
|
|
44887
44965
|
function isLinkedContentEditSupport(value) {
|
|
44888
|
-
if (!
|
|
44966
|
+
if (!isRecord11(value) || typeof value.kind !== "string") return false;
|
|
44889
44967
|
switch (value.kind) {
|
|
44890
44968
|
case "supported":
|
|
44891
44969
|
return true;
|
|
@@ -44897,7 +44975,7 @@ function isLinkedContentEditSupport(value) {
|
|
|
44897
44975
|
return false;
|
|
44898
44976
|
}
|
|
44899
44977
|
}
|
|
44900
|
-
function
|
|
44978
|
+
function isRecord11(value) {
|
|
44901
44979
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
44902
44980
|
}
|
|
44903
44981
|
|
|
@@ -46353,12 +46431,12 @@ function toTrimmedString(value) {
|
|
|
46353
46431
|
return trimmed ? trimmed : void 0;
|
|
46354
46432
|
}
|
|
46355
46433
|
function normalizeBookingFormConfig(form2) {
|
|
46356
|
-
if (!
|
|
46434
|
+
if (!isRecord12(form2)) return null;
|
|
46357
46435
|
const id = readNonEmptyString(form2.id);
|
|
46358
46436
|
const name = readNonEmptyString(form2.name);
|
|
46359
46437
|
if (!id || !name) return null;
|
|
46360
|
-
const schemaSource =
|
|
46361
|
-
const settingsSource =
|
|
46438
|
+
const schemaSource = isRecord12(form2.schema) ? form2.schema : isRecord12(form2.schemaJson) ? form2.schemaJson : null;
|
|
46439
|
+
const settingsSource = isRecord12(form2.settings) ? form2.settings : isRecord12(form2.settingsJson) ? form2.settingsJson : null;
|
|
46362
46440
|
return {
|
|
46363
46441
|
id,
|
|
46364
46442
|
name,
|
|
@@ -46382,10 +46460,10 @@ function normalizeBookingServices(services) {
|
|
|
46382
46460
|
if (Array.isArray(services)) {
|
|
46383
46461
|
return services.filter(isBookingFormService).map(normalizeService);
|
|
46384
46462
|
}
|
|
46385
|
-
if (
|
|
46463
|
+
if (isRecord12(services) && "services" in services) {
|
|
46386
46464
|
return Array.isArray(services.services) ? services.services.filter(isBookingFormService).map(normalizeService) : [];
|
|
46387
46465
|
}
|
|
46388
|
-
return
|
|
46466
|
+
return isRecord12(services) ? Object.values(services).filter(isBookingFormService).map(normalizeService) : [];
|
|
46389
46467
|
}
|
|
46390
46468
|
function normalizeBookingSchema(value) {
|
|
46391
46469
|
if (!value) return void 0;
|
|
@@ -46397,7 +46475,7 @@ function normalizeBookingSchema(value) {
|
|
|
46397
46475
|
};
|
|
46398
46476
|
}
|
|
46399
46477
|
function readBookingFormField(value) {
|
|
46400
|
-
if (!
|
|
46478
|
+
if (!isRecord12(value)) return null;
|
|
46401
46479
|
const id = readNonEmptyString(value.id);
|
|
46402
46480
|
const label = readNonEmptyString(value.label);
|
|
46403
46481
|
const type = readBookingFieldType(value.type);
|
|
@@ -46443,7 +46521,7 @@ function readBookingFieldOptions(value) {
|
|
|
46443
46521
|
return options.length > 0 ? options : void 0;
|
|
46444
46522
|
}
|
|
46445
46523
|
function readBookingFieldOption(value) {
|
|
46446
|
-
if (!
|
|
46524
|
+
if (!isRecord12(value)) return null;
|
|
46447
46525
|
const optionValue = readNonEmptyString(value.value);
|
|
46448
46526
|
const label = readNonEmptyString(value.label);
|
|
46449
46527
|
return optionValue && label ? { value: optionValue, label } : null;
|
|
@@ -46460,7 +46538,7 @@ function normalizeBookingSettings(value) {
|
|
|
46460
46538
|
};
|
|
46461
46539
|
}
|
|
46462
46540
|
function isBookingFormService(value) {
|
|
46463
|
-
return
|
|
46541
|
+
return isRecord12(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string";
|
|
46464
46542
|
}
|
|
46465
46543
|
function readNonEmptyString(value) {
|
|
46466
46544
|
if (typeof value !== "string") return null;
|
|
@@ -46478,7 +46556,7 @@ function readStringArray(value) {
|
|
|
46478
46556
|
const strings = value.filter((item) => typeof item === "string");
|
|
46479
46557
|
return strings.length > 0 ? strings : void 0;
|
|
46480
46558
|
}
|
|
46481
|
-
function
|
|
46559
|
+
function isRecord12(value) {
|
|
46482
46560
|
return typeof value === "object" && value !== null;
|
|
46483
46561
|
}
|
|
46484
46562
|
|
|
@@ -47036,7 +47114,7 @@ function EventDetailsView({
|
|
|
47036
47114
|
"a",
|
|
47037
47115
|
{
|
|
47038
47116
|
className: "rb-tile rb-tile--interactive",
|
|
47039
|
-
|
|
47117
|
+
...resolveEventLinkProps(e),
|
|
47040
47118
|
children: /* @__PURE__ */ jsx30(
|
|
47041
47119
|
DateTimeTile,
|
|
47042
47120
|
{
|
|
@@ -48720,7 +48798,7 @@ var AgendaEventCard = ({
|
|
|
48720
48798
|
showCapacity,
|
|
48721
48799
|
onClick
|
|
48722
48800
|
}) => {
|
|
48723
|
-
const
|
|
48801
|
+
const eventLinkProps = resolveEventLinkProps(event);
|
|
48724
48802
|
const categoryColor = event.eventCategory?.color || "rgb(var(--tb-accent))";
|
|
48725
48803
|
const price = formatEventPrice(event);
|
|
48726
48804
|
const { available, isFull } = getEventAvailability(event);
|
|
@@ -48781,7 +48859,7 @@ var AgendaEventCard = ({
|
|
|
48781
48859
|
}
|
|
48782
48860
|
);
|
|
48783
48861
|
}
|
|
48784
|
-
return /* @__PURE__ */ jsx47("a", {
|
|
48862
|
+
return /* @__PURE__ */ jsx47("a", { ...eventLinkProps, className: "event-agenda-card", children: cardContent });
|
|
48785
48863
|
};
|
|
48786
48864
|
|
|
48787
48865
|
// ../blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.tsx
|
|
@@ -49024,7 +49102,7 @@ function renderCalendarSsr(display) {
|
|
|
49024
49102
|
dayEvents.slice(0, MAX_EVENTS_PER_DAY).map((event) => /* @__PURE__ */ jsxs35(
|
|
49025
49103
|
"a",
|
|
49026
49104
|
{
|
|
49027
|
-
|
|
49105
|
+
...resolveEventLinkProps(event),
|
|
49028
49106
|
className: "event-calendar-event",
|
|
49029
49107
|
title: `${event.title} at ${formatTime(event.startsAt, { timeZone: getEventTimeZone(event) })}`,
|
|
49030
49108
|
children: [
|
|
@@ -49152,7 +49230,7 @@ function renderTimetableSsr(display) {
|
|
|
49152
49230
|
day.events.length === 0 ? /* @__PURE__ */ jsx49("p", { className: "event-timetable-day-empty", children: "No classes" }) : day.events.map((cell) => /* @__PURE__ */ jsxs35(
|
|
49153
49231
|
"a",
|
|
49154
49232
|
{
|
|
49155
|
-
|
|
49233
|
+
...resolveEventLinkProps(cell.event),
|
|
49156
49234
|
className: "event-timetable-event",
|
|
49157
49235
|
title: `${cell.event.title}, ${cell.timeLabel}`,
|
|
49158
49236
|
style: {
|
|
@@ -49959,14 +50037,14 @@ function isDecoratedHeadingBlockKind(blockKind) {
|
|
|
49959
50037
|
return blockKind === "block.intro" || blockKind === "block.feature-cards" || blockKind === "block.testimonials" || blockKind === "block.faq";
|
|
49960
50038
|
}
|
|
49961
50039
|
function readVariant(blockContent) {
|
|
49962
|
-
if (!
|
|
50040
|
+
if (!isRecord13(blockContent)) return void 0;
|
|
49963
50041
|
const variant = blockContent.variant;
|
|
49964
50042
|
return typeof variant === "string" ? variant : void 0;
|
|
49965
50043
|
}
|
|
49966
50044
|
function isFaqDecoratedVariant(variant) {
|
|
49967
50045
|
return variant === "default" || variant === "question-columns";
|
|
49968
50046
|
}
|
|
49969
|
-
function
|
|
50047
|
+
function isRecord13(value) {
|
|
49970
50048
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
49971
50049
|
}
|
|
49972
50050
|
function buildHeadingDecorationWrapperClassName(className) {
|
|
@@ -68012,7 +68090,7 @@ function preset(id, verticalId, canonicalBehaviour, label, pluralLabel, descript
|
|
|
68012
68090
|
}
|
|
68013
68091
|
|
|
68014
68092
|
// ../api/src/utils/isRecord.ts
|
|
68015
|
-
function
|
|
68093
|
+
function isRecord14(value) {
|
|
68016
68094
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
68017
68095
|
}
|
|
68018
68096
|
|
|
@@ -68319,7 +68397,7 @@ function sanitizeMarks(marks) {
|
|
|
68319
68397
|
if (mark.type === "bold" || mark.type === "strong" || mark.type === "italic" || mark.type === "em") {
|
|
68320
68398
|
return [{ type: mark.type }];
|
|
68321
68399
|
}
|
|
68322
|
-
if (mark.type === "link" &&
|
|
68400
|
+
if (mark.type === "link" && isRecord14(mark.attrs) && typeof mark.attrs.href === "string") {
|
|
68323
68401
|
const attrs = { href: mark.attrs.href };
|
|
68324
68402
|
if (typeof mark.attrs.target === "string" && mark.attrs.target.trim().length > 0) {
|
|
68325
68403
|
attrs.target = mark.attrs.target;
|
|
@@ -68334,10 +68412,10 @@ function sanitizeMarks(marks) {
|
|
|
68334
68412
|
return sanitized.length > 0 ? sanitized : void 0;
|
|
68335
68413
|
}
|
|
68336
68414
|
function unwrapRichTextValue(value) {
|
|
68337
|
-
if (
|
|
68415
|
+
if (isRecord14(value) && isRecord14(value.doc)) {
|
|
68338
68416
|
return unwrapRichTextValue(value.doc);
|
|
68339
68417
|
}
|
|
68340
|
-
if (
|
|
68418
|
+
if (isRecord14(value) && value.type === "doc") {
|
|
68341
68419
|
return {
|
|
68342
68420
|
type: "doc",
|
|
68343
68421
|
content: Array.isArray(value.content) ? value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) : []
|
|
@@ -68346,7 +68424,7 @@ function unwrapRichTextValue(value) {
|
|
|
68346
68424
|
return EMPTY_SITE_BANNER_BODY;
|
|
68347
68425
|
}
|
|
68348
68426
|
function isTipTapNodeLike(value) {
|
|
68349
|
-
return
|
|
68427
|
+
return isRecord14(value) && typeof value.type === "string";
|
|
68350
68428
|
}
|
|
68351
68429
|
function coerceTipTapNode(value) {
|
|
68352
68430
|
return {
|
|
@@ -68354,9 +68432,9 @@ function coerceTipTapNode(value) {
|
|
|
68354
68432
|
...Array.isArray(value.content) ? { content: value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) } : {},
|
|
68355
68433
|
...typeof value.text === "string" ? { text: value.text } : {},
|
|
68356
68434
|
...Array.isArray(value.marks) ? {
|
|
68357
|
-
marks: value.marks.filter((mark) =>
|
|
68435
|
+
marks: value.marks.filter((mark) => isRecord14(mark) && typeof mark.type === "string").map((mark) => ({
|
|
68358
68436
|
type: mark.type,
|
|
68359
|
-
...
|
|
68437
|
+
...isRecord14(mark.attrs) ? { attrs: mark.attrs } : {}
|
|
68360
68438
|
}))
|
|
68361
68439
|
} : {}
|
|
68362
68440
|
};
|
|
@@ -68546,7 +68624,7 @@ var ENTRY_REF_KEYS = [
|
|
|
68546
68624
|
"entryId",
|
|
68547
68625
|
"slug"
|
|
68548
68626
|
];
|
|
68549
|
-
function
|
|
68627
|
+
function isRecord15(value) {
|
|
68550
68628
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
68551
68629
|
}
|
|
68552
68630
|
function extractManualEntryRef(item) {
|
|
@@ -68554,7 +68632,7 @@ function extractManualEntryRef(item) {
|
|
|
68554
68632
|
const trimmed = item.trim();
|
|
68555
68633
|
return trimmed.length > 0 ? trimmed : null;
|
|
68556
68634
|
}
|
|
68557
|
-
if (!
|
|
68635
|
+
if (!isRecord15(item)) return null;
|
|
68558
68636
|
for (const key of ENTRY_REF_KEYS) {
|
|
68559
68637
|
const raw = item[key];
|
|
68560
68638
|
if (typeof raw === "string" && raw.trim().length > 0) {
|
|
@@ -69079,7 +69157,7 @@ function collectMediaAssetSidecar(mediaAssets) {
|
|
|
69079
69157
|
return Array.isArray(mediaAssets) && mediaAssets.length > 0 ? mediaAssets : void 0;
|
|
69080
69158
|
}
|
|
69081
69159
|
function convertPageResponseBlock(block) {
|
|
69082
|
-
if (!
|
|
69160
|
+
if (!isRecord16(block)) {
|
|
69083
69161
|
throw new Error("Invalid block format in page API response");
|
|
69084
69162
|
}
|
|
69085
69163
|
if (typeof block.id !== "string" && block.id !== null) {
|
|
@@ -69110,20 +69188,20 @@ function buildPageOutline(input) {
|
|
|
69110
69188
|
blocks: input.blocks.map(convertPageResponseBlock)
|
|
69111
69189
|
};
|
|
69112
69190
|
}
|
|
69113
|
-
function
|
|
69191
|
+
function isRecord16(value) {
|
|
69114
69192
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
69115
69193
|
}
|
|
69116
69194
|
function readContentRecord(value) {
|
|
69117
|
-
return
|
|
69195
|
+
return isRecord16(value) ? value : void 0;
|
|
69118
69196
|
}
|
|
69119
69197
|
function readNestedContentRecord(value) {
|
|
69120
|
-
if (!
|
|
69198
|
+
if (!isRecord16(value)) return null;
|
|
69121
69199
|
return readContentRecord(value.data) ?? null;
|
|
69122
69200
|
}
|
|
69123
69201
|
function sanitizeSdkRuntimeBlockContent(blockKind, content) {
|
|
69124
69202
|
if (blockKind !== "block.newsletter-signup") return content;
|
|
69125
69203
|
const sanitized = sanitizeNewsletterSignupPublicContent(content);
|
|
69126
|
-
return
|
|
69204
|
+
return isRecord16(sanitized) ? sanitized : {};
|
|
69127
69205
|
}
|
|
69128
69206
|
function sanitizeNullableSdkRuntimeBlockContent(blockKind, content) {
|
|
69129
69207
|
return content ? sanitizeSdkRuntimeBlockContent(blockKind, content) : null;
|
|
@@ -69740,15 +69818,15 @@ function Page(props2) {
|
|
|
69740
69818
|
var lazyBlockOverrideSymbol = /* @__PURE__ */ Symbol.for("riverbankcms.sdk.lazyBlockOverride");
|
|
69741
69819
|
|
|
69742
69820
|
// src/rendering/overrideResolution.ts
|
|
69743
|
-
function
|
|
69821
|
+
function isRecord17(value) {
|
|
69744
69822
|
return typeof value === "object" && value !== null;
|
|
69745
69823
|
}
|
|
69746
69824
|
function isBlockOutlineLike(value) {
|
|
69747
69825
|
const id = value.id;
|
|
69748
|
-
return typeof value.kind === "string" && (typeof id === "string" || id === null) && (typeof value.purpose === "string" ||
|
|
69826
|
+
return typeof value.kind === "string" && (typeof id === "string" || id === null) && (typeof value.purpose === "string" || isRecord17(value.content) || isRecord17(value.draftContent) || isRecord17(value.bindings));
|
|
69749
69827
|
}
|
|
69750
69828
|
function collectBlockKindsFromValue(value, usedKinds, seen) {
|
|
69751
|
-
if (!
|
|
69829
|
+
if (!isRecord17(value)) return;
|
|
69752
69830
|
if (seen.has(value)) return;
|
|
69753
69831
|
seen.add(value);
|
|
69754
69832
|
if (isBlockOutlineLike(value)) {
|
|
@@ -69797,7 +69875,7 @@ function selectOverrideKeysForUsedKinds(usedKinds, entries) {
|
|
|
69797
69875
|
return selectedKeys;
|
|
69798
69876
|
}
|
|
69799
69877
|
function isLazyRegistration(registration) {
|
|
69800
|
-
return
|
|
69878
|
+
return isRecord17(registration) && registration[lazyBlockOverrideSymbol] === true;
|
|
69801
69879
|
}
|
|
69802
69880
|
async function resolveOverrideComponent(registration) {
|
|
69803
69881
|
if (isLazyRegistration(registration)) {
|
|
@@ -70799,7 +70877,7 @@ var CircuitOpenError = class extends Error {
|
|
|
70799
70877
|
};
|
|
70800
70878
|
|
|
70801
70879
|
// src/version.ts
|
|
70802
|
-
var SDK_VERSION = "0.90.
|
|
70880
|
+
var SDK_VERSION = "0.90.1";
|
|
70803
70881
|
|
|
70804
70882
|
// src/next/content-load-failure.ts
|
|
70805
70883
|
var SdkContentLoadError = RiverbankContentLoadError;
|