@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.
Files changed (80) hide show
  1. package/dist/{PreviewEditorSidebar-KVXNF3VW.mjs → PreviewEditorSidebar-FNFRVSIM.mjs} +2 -2
  2. package/dist/{PreviewEditorUI-J3JN5Z7T.mjs → PreviewEditorUI-3WXJFQXG.mjs} +2 -2
  3. package/dist/SdkPreviewModeRuntime-2UCIMKUB.mjs +8 -0
  4. package/dist/_dts/api/src/bookingConfig.d.ts +3 -0
  5. package/dist/_dts/api/src/event-listing-destination.d.ts +59 -0
  6. package/dist/_dts/api/src/index.d.ts +4 -0
  7. package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +0 -1
  8. package/dist/_dts/api/src/navigation.d.ts +2 -0
  9. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +3 -1
  10. package/dist/_dts/api/src/settings/permissions.d.ts +273 -0
  11. package/dist/_dts/api/src/types.d.ts +1 -0
  12. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +60 -2
  13. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +12 -1
  14. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +9 -9
  15. package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +1 -1
  16. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +5 -0
  17. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +24 -0
  18. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/destination.d.ts +8 -0
  19. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/pricing.d.ts +3 -0
  20. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +7 -0
  21. package/dist/_dts/core/src/event-pricing.d.ts +12 -2
  22. package/dist/_dts/sdk/src/public-api/contracts.d.ts +11 -1
  23. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +11 -1
  24. package/dist/_dts/sdk/src/version.d.ts +1 -1
  25. package/dist/{chunk-PMBB6MQ7.mjs → chunk-CR2VX432.mjs} +297 -117
  26. package/dist/{chunk-AEOYWPE4.mjs → chunk-FA6LVZ7C.mjs} +5 -5
  27. package/dist/{chunk-RQ3XZ4SJ.mjs → chunk-H6TT5ZXI.mjs} +1 -1
  28. package/dist/{chunk-GSPFFUVB.mjs → chunk-SYYJZPKU.mjs} +1 -1
  29. package/dist/cli/index.mjs +160 -103
  30. package/dist/client/{accordion-GXQNWQ6O.mjs → accordion-4K7VGZ3I.mjs} +2 -2
  31. package/dist/client/{bookingForm-STLUJ36H.mjs → bookingForm-3QXA3CIS.mjs} +5 -5
  32. package/dist/client/bookings.mjs +1154 -556
  33. package/dist/client/{carousel-CVRN6EPP.mjs → carousel-BEJKNGQ7.mjs} +3 -3
  34. package/dist/client/{cart-IYIBA5CL.mjs → cart-44BBM6XG.mjs} +6 -6
  35. package/dist/client/{checkout-O3BGM4GS.mjs → checkout-THMHEYKF.mjs} +6 -6
  36. package/dist/client/{chunk-25W2EQUN.mjs → chunk-3H5CLFKT.mjs} +8 -0
  37. package/dist/client/{chunk-MFPKS6QS.mjs → chunk-4COPESPO.mjs} +5 -5
  38. package/dist/client/{chunk-4RTFGHZN.mjs → chunk-5AJIMWKS.mjs} +6 -3
  39. package/dist/client/{chunk-6DPXDOIL.mjs → chunk-B4H6QMPY.mjs} +93 -22
  40. package/dist/client/{chunk-VFHZLZAC.mjs → chunk-DQIRKNZE.mjs} +1 -1
  41. package/dist/client/{chunk-7DH35FGA.mjs → chunk-EJBHK74Y.mjs} +1 -1
  42. package/dist/client/{chunk-DAS5CIER.mjs → chunk-JV7ZNAOU.mjs} +118 -20
  43. package/dist/client/{chunk-FHU6PFPM.mjs → chunk-KNTLBQ3N.mjs} +1 -1
  44. package/dist/client/{chunk-Z62JYS5O.mjs → chunk-PEDNDLPB.mjs} +2 -2
  45. package/dist/client/{chunk-NBFRJ5NB.mjs → chunk-SLY6UDAS.mjs} +2 -2
  46. package/dist/client/{chunk-D3ETC2SU.mjs → chunk-ZIAF2DA4.mjs} +1 -1
  47. package/dist/client/client.mjs +272 -83
  48. package/dist/client/{courseRegistration-2D3ACMJR.mjs → courseRegistration-URX7RCCK.mjs} +5 -5
  49. package/dist/client/{eventCalendar-QY4UZUFF.mjs → eventCalendar-GTENOQCE.mjs} +8 -8
  50. package/dist/client/{eventCombined-RRCDKJC2.mjs → eventCombined-EZVB72MF.mjs} +8 -8
  51. package/dist/client/{eventDetails-YO335BUT.mjs → eventDetails-CH4BJR5Z.mjs} +8 -8
  52. package/dist/client/{eventListing-PXA6GFQ3.mjs → eventListing-4BVOI5HS.mjs} +8 -8
  53. package/dist/client/{eventRegistration-2ZHEDDXO.mjs → eventRegistration-37LPIKIE.mjs} +8 -8
  54. package/dist/client/{form-ZS6KX4U2.mjs → form-FX3Y54YK.mjs} +2 -2
  55. package/dist/client/{headerSection-QK5SLIIB.mjs → headerSection-UOZZGVYL.mjs} +3 -3
  56. package/dist/client/hooks.mjs +86 -35
  57. package/dist/client/{locationMap-GFNIUD2X.mjs → locationMap-VSIPKV35.mjs} +3 -3
  58. package/dist/client/{newsletterForm-PGLTTCUG.mjs → newsletterForm-6FRJKNAF.mjs} +2 -2
  59. package/dist/client/{productDetail-OPBE5ZPI.mjs → productDetail-6AHMLXCO.mjs} +6 -6
  60. package/dist/client/{productList-NI72Q62Z.mjs → productList-M2CYIZVH.mjs} +6 -6
  61. package/dist/client/rendering/client.mjs +231 -42
  62. package/dist/client/rendering/islands.mjs +19 -19
  63. package/dist/client/rendering.mjs +273 -84
  64. package/dist/client/{shop-3ZQPEWYI.mjs → shop-AUOT6GEX.mjs} +6 -6
  65. package/dist/preview-next/client/runtime.mjs +3 -3
  66. package/dist/{sdk-runtime-FSHXCWDS.mjs → sdk-runtime-6GPJNLU6.mjs} +4 -4
  67. package/dist/server/components.mjs +136 -58
  68. package/dist/server/config-validation.mjs +78 -27
  69. package/dist/server/config.mjs +78 -27
  70. package/dist/server/data.mjs +86 -35
  71. package/dist/server/index.mjs +1 -1
  72. package/dist/server/next.mjs +157 -79
  73. package/dist/server/page-converter.mjs +72 -21
  74. package/dist/server/prebuild.mjs +1 -1
  75. package/dist/server/rendering/server.mjs +148 -70
  76. package/dist/server/rendering.mjs +152 -74
  77. package/dist/server/routing.mjs +121 -44
  78. package/dist/server/server.mjs +95 -44
  79. package/package.json +2 -2
  80. package/dist/SdkPreviewModeRuntime-UBL6MSNP.mjs +0 -8
@@ -1,15 +1,15 @@
1
- import { mountShopBlockIsland, ShopClient } from './chunk-MFPKS6QS.mjs';
2
- import './chunk-VFHZLZAC.mjs';
3
- import './chunk-7DH35FGA.mjs';
1
+ import { mountShopBlockIsland, ShopClient } from './chunk-4COPESPO.mjs';
2
+ import './chunk-DQIRKNZE.mjs';
3
+ import './chunk-EJBHK74Y.mjs';
4
4
  import './chunk-6N7YRNYU.mjs';
5
5
  import './chunk-L4J5Y62O.mjs';
6
- import './chunk-NBFRJ5NB.mjs';
6
+ import './chunk-SLY6UDAS.mjs';
7
7
  import './chunk-3DCJ45Z2.mjs';
8
8
  import './chunk-WBQG7VJA.mjs';
9
9
  import './chunk-WHZQDPBZ.mjs';
10
10
  import './chunk-N7PBWBWQ.mjs';
11
- import { defineIslandPropsDecoder } from './chunk-6DPXDOIL.mjs';
12
- import './chunk-25W2EQUN.mjs';
11
+ import { defineIslandPropsDecoder } from './chunk-B4H6QMPY.mjs';
12
+ import './chunk-3H5CLFKT.mjs';
13
13
 
14
14
  // src/rendering/islands/enhancers/shop.tsx
15
15
  var decode = defineIslandPropsDecoder("shop");
@@ -6,19 +6,19 @@ import React from 'react';
6
6
  import { jsx } from 'react/jsx-runtime';
7
7
 
8
8
  var LazySdkPreviewMode = React.lazy(async () => {
9
- const mod = await import('../../SdkPreviewModeRuntime-UBL6MSNP.mjs');
9
+ const mod = await import('../../SdkPreviewModeRuntime-2UCIMKUB.mjs');
10
10
  return {
11
11
  default: mod.SdkPreviewModeRuntime
12
12
  };
13
13
  });
14
14
  var LazyPreviewShell = React.lazy(async () => {
15
- const mod = await import('../../sdk-runtime-FSHXCWDS.mjs');
15
+ const mod = await import('../../sdk-runtime-6GPJNLU6.mjs');
16
16
  return {
17
17
  default: mod.PreviewShell
18
18
  };
19
19
  });
20
20
  var LazyPreviewShellLayout = React.lazy(async () => {
21
- const mod = await import('../../sdk-runtime-FSHXCWDS.mjs');
21
+ const mod = await import('../../sdk-runtime-6GPJNLU6.mjs');
22
22
  return {
23
23
  default: mod.PreviewShellLayout
24
24
  };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- export { PreviewShell, PreviewShellLayout, SdkPreviewModeRuntime as SdkPreviewMode } from './chunk-AEOYWPE4.mjs';
2
+ export { PreviewShell, PreviewShellLayout, SdkPreviewModeRuntime as SdkPreviewMode } from './chunk-FA6LVZ7C.mjs';
3
3
  export { PreviewLayoutProvider, PreviewQueryProvider, createPreviewQueryClient, useOptionalPreviewLayout, usePreviewLayout } from './chunk-UG7I7S7W.mjs';
4
- import './chunk-RQ3XZ4SJ.mjs';
5
- import './chunk-GSPFFUVB.mjs';
6
- import './chunk-PMBB6MQ7.mjs';
4
+ import './chunk-H6TT5ZXI.mjs';
5
+ import './chunk-SYYJZPKU.mjs';
6
+ import './chunk-CR2VX432.mjs';
7
7
  import './chunk-BOQXMCSP.mjs';
8
8
  import './chunk-R7POPVJR.mjs';
@@ -182,6 +182,8 @@ function publicEventPricingType(pricing) {
182
182
  case "ticket_types":
183
183
  case "course":
184
184
  return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
185
+ case "external":
186
+ return "external";
185
187
  }
186
188
  }
187
189
  function publicEventPricingCurrency(pricing) {
@@ -193,6 +195,8 @@ function publicEventPricingCurrency(pricing) {
193
195
  return pricing.currency;
194
196
  case "course":
195
197
  return pricing.display.display.currency;
198
+ case "external":
199
+ return null;
196
200
  }
197
201
  }
198
202
  function isFreePublicEventPriceDisplay(display) {
@@ -206,6 +210,7 @@ function isFreePublicEventPriceDisplay(display) {
206
210
  case "range":
207
211
  case "mixed":
208
212
  case "unavailable":
213
+ case "external":
209
214
  return false;
210
215
  }
211
216
  }
@@ -236,6 +241,8 @@ function formatBookingPriceDisplay(display, options = {}) {
236
241
  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)}`;
237
242
  case "unavailable":
238
243
  return "Pricing unavailable";
244
+ case "external":
245
+ return display.label;
239
246
  case "course":
240
247
  return formatCoursePriceDisplayLabel(display.display, options);
241
248
  default:
@@ -26353,6 +26360,18 @@ var publicCoursesArraySchema = z43.array(publicCourseSchema);
26353
26360
  var eventPresetSchema = z44.enum(["event", "class", "workshop", "retreat", "performance"]);
26354
26361
  var eventScheduleScopeSchema = z44.enum(["recurring", "oneOff"]);
26355
26362
  var eventDestinationModeSchema = z44.enum(["cms-managed", "system-managed"]);
26363
+ var publicEventDestinationSchema = z44.discriminatedUnion("kind", [
26364
+ z44.object({
26365
+ kind: z44.literal("native"),
26366
+ mode: eventDestinationModeSchema,
26367
+ path: z44.string()
26368
+ }),
26369
+ z44.object({
26370
+ kind: z44.literal("external"),
26371
+ url: z44.string(),
26372
+ label: z44.string()
26373
+ })
26374
+ ]);
26356
26375
  var eventVenueSchema = z44.object({
26357
26376
  id: z44.string(),
26358
26377
  name: z44.string(),
@@ -26367,7 +26386,7 @@ var eventCategorySchema = z44.object({
26367
26386
  name: z44.string(),
26368
26387
  color: z44.string().nullable()
26369
26388
  });
26370
- var pricingTypeSchema = z44.enum(["free", "paid"]);
26389
+ var pricingTypeSchema = z44.enum(["free", "paid", "external"]);
26371
26390
  var accessRestrictionSchema = z44.enum(["none", "category"]);
26372
26391
  var eventPricingModeSchema = z44.enum(["single", "ticket_types"]);
26373
26392
  var publicCoursePriceDisplaySchema = z44.discriminatedUnion("kind", [
@@ -26388,6 +26407,7 @@ var publicEventPriceDisplaySchema = z44.discriminatedUnion("kind", [
26388
26407
  currency: z44.string()
26389
26408
  }),
26390
26409
  z44.object({ kind: z44.literal("unavailable"), currency: z44.string() }),
26410
+ z44.object({ kind: z44.literal("external"), label: z44.string() }),
26391
26411
  z44.object({ kind: z44.literal("course"), display: publicCoursePriceDisplaySchema })
26392
26412
  ]);
26393
26413
  var publicEventTicketTypePriceDisplaySchema = z44.union([
@@ -26466,6 +26486,10 @@ var publicEventPricingSchema = z44.discriminatedUnion("kind", [
26466
26486
  z44.object({
26467
26487
  kind: z44.literal("course"),
26468
26488
  display: z44.object({ kind: z44.literal("course"), display: publicCoursePriceDisplaySchema })
26489
+ }),
26490
+ z44.object({
26491
+ kind: z44.literal("external"),
26492
+ display: z44.object({ kind: z44.literal("external"), label: z44.string() })
26469
26493
  })
26470
26494
  ]);
26471
26495
  var publicTeamMemberSummarySchema = z44.object({
@@ -26494,7 +26518,8 @@ var publicEventSchema = z44.object({
26494
26518
  image: mediaSchema2.nullable().optional()
26495
26519
  }).optional(),
26496
26520
  slug: z44.string(),
26497
- path: z44.string(),
26521
+ path: z44.string().nullable(),
26522
+ destination: publicEventDestinationSchema,
26498
26523
  requiresRegistration: z44.boolean(),
26499
26524
  deliveryMode: z44.enum(["in_person", "online", "hybrid"]),
26500
26525
  attendanceModes: z44.array(publicEventAttendanceModeAvailabilitySchema),
@@ -26798,12 +26823,41 @@ function isEventContentType(slug) {
26798
26823
  return EVENT_CONTENT_TYPE_SLUGS.includes(slug);
26799
26824
  }
26800
26825
 
26826
+ // ../blocks/src/system/runtime/nodes/events/shared/destination.ts
26827
+ function isRecord5(value) {
26828
+ return typeof value === "object" && value !== null && !Array.isArray(value);
26829
+ }
26830
+ function isRuntimeEventDestination(value) {
26831
+ if (!isRecord5(value) || typeof value.kind !== "string") return false;
26832
+ if (value.kind === "native") {
26833
+ return (value.mode === "cms-managed" || value.mode === "system-managed") && typeof value.path === "string";
26834
+ }
26835
+ return value.kind === "external" && typeof value.url === "string" && typeof value.label === "string";
26836
+ }
26837
+ function resolveRuntimeEventDestination(event) {
26838
+ if (isRuntimeEventDestination(event.destination)) {
26839
+ return event.destination;
26840
+ }
26841
+ return {
26842
+ kind: "native",
26843
+ mode: event.eventDestinationMode === "system-managed" ? "system-managed" : "cms-managed",
26844
+ path: typeof event.path === "string" ? event.path : ""
26845
+ };
26846
+ }
26847
+
26801
26848
  // ../blocks/src/system/runtime/nodes/events/shared/pricing.ts
26802
26849
  var DEFAULT_EVENT_CURRENCY = "USD";
26803
26850
  function resolveRuntimeEventPricing(event) {
26804
26851
  if (isPublicEventPricing(event.pricing)) {
26805
26852
  return event.pricing;
26806
26853
  }
26854
+ const destination = resolveRuntimeEventDestination(event);
26855
+ if (destination.kind === "external") {
26856
+ return {
26857
+ kind: "external",
26858
+ display: { kind: "external", label: "External registration" }
26859
+ };
26860
+ }
26807
26861
  const legacy = event;
26808
26862
  const currency = readCurrency(legacy.currency);
26809
26863
  if (event.requiresRegistration === false) {
@@ -26840,22 +26894,22 @@ function resolveRuntimeEventPricing(event) {
26840
26894
  function readCurrency(value) {
26841
26895
  return typeof value === "string" && value.trim().length > 0 ? value : DEFAULT_EVENT_CURRENCY;
26842
26896
  }
26843
- function isRecord5(value) {
26897
+ function isRecord6(value) {
26844
26898
  return typeof value === "object" && value !== null && !Array.isArray(value);
26845
26899
  }
26846
26900
  function isPublicEventPricing(value) {
26847
- if (!isRecord5(value) || typeof value.kind !== "string") return false;
26848
- return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course";
26901
+ if (!isRecord6(value) || typeof value.kind !== "string") return false;
26902
+ return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course" || value.kind === "external";
26849
26903
  }
26850
26904
  function isPublicEventTicketType(value) {
26851
- return isRecord5(value) && typeof value.id === "string";
26905
+ return isRecord6(value) && typeof value.id === "string";
26852
26906
  }
26853
26907
  function readTicketTypePriceDisplay(value, currency) {
26854
26908
  const display = readLegacyPriceDisplay(value, currency);
26855
- return display.kind === "course" ? { kind: "unavailable", currency } : display;
26909
+ return display.kind === "course" || display.kind === "external" ? { kind: "unavailable", currency } : display;
26856
26910
  }
26857
26911
  function readLegacyPriceDisplay(value, currency) {
26858
- if (!isRecord5(value) || typeof value.kind !== "string") {
26912
+ if (!isRecord6(value) || typeof value.kind !== "string") {
26859
26913
  return { kind: "unavailable", currency };
26860
26914
  }
26861
26915
  const displayCurrency = readCurrency(value.currency);
@@ -26894,7 +26948,7 @@ function readLegacyPriceDisplay(value, currency) {
26894
26948
  case "unavailable":
26895
26949
  return { kind: "unavailable", currency: displayCurrency };
26896
26950
  case "course":
26897
- return isRecord5(value.display) ? {
26951
+ return isRecord6(value.display) ? {
26898
26952
  kind: "course",
26899
26953
  display: readCoursePriceDisplay(value.display, displayCurrency)
26900
26954
  } : {
@@ -26981,7 +27035,7 @@ function resolveEventRequiresPayment(input) {
26981
27035
  if (!input.event) {
26982
27036
  return false;
26983
27037
  }
26984
- return publicEventPricingType(resolveRuntimeEventPricing(input.event)) !== "free";
27038
+ return publicEventPricingType(resolveRuntimeEventPricing(input.event)) === "paid";
26985
27039
  }
26986
27040
 
26987
27041
  // ../blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.ts
@@ -27178,15 +27232,16 @@ var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
27178
27232
  })
27179
27233
  });
27180
27234
  function normalizeEventRegistrationEventInput(value) {
27181
- if (!isRecord6(value)) {
27235
+ if (!isRecord7(value)) {
27182
27236
  return value;
27183
27237
  }
27184
27238
  return {
27185
27239
  ...value,
27240
+ destination: resolveRuntimeEventDestination(value),
27186
27241
  pricing: resolveRuntimeEventPricing(value)
27187
27242
  };
27188
27243
  }
27189
- function isRecord6(value) {
27244
+ function isRecord7(value) {
27190
27245
  return typeof value === "object" && value !== null && !Array.isArray(value);
27191
27246
  }
27192
27247
  var eventRegistrationInteractiveIslandPropsCodec = createInteractiveIslandCodec({
@@ -28979,16 +29034,28 @@ function groupEventsByDate(events) {
28979
29034
  function formatEventPrice(event) {
28980
29035
  return formatEventPricing(resolveRuntimeEventPricing(event), { decimals: "auto" });
28981
29036
  }
29037
+ function resolveEventHref(event) {
29038
+ const destination = resolveRuntimeEventDestination(event);
29039
+ return destination.kind === "external" ? destination.url : destination.path;
29040
+ }
29041
+ function resolveEventLinkProps(event) {
29042
+ const href = resolveEventHref(event);
29043
+ const destination = resolveRuntimeEventDestination(event);
29044
+ return destination.kind === "external" ? { href, target: "_blank", rel: "noopener noreferrer" } : { href };
29045
+ }
28982
29046
  function resolveEventCta(event, buttonText) {
28983
29047
  const { isFull: isSoldOut } = getEventAvailability(event);
28984
- const defaultButtonText = event.kind === "course_session" ? "Book course" : "Book";
29048
+ const destination = resolveRuntimeEventDestination(event);
29049
+ const isExternal = destination.kind === "external";
29050
+ const defaultButtonText = isExternal ? destination.label : event.kind === "course_session" ? "Book course" : "Book";
28985
29051
  const effectiveButtonText = buttonText ?? defaultButtonText;
28986
- if (isSoldOut) {
28987
- return { label: "Sold out", href: event.path, hidden: true };
29052
+ const href = resolveEventHref(event);
29053
+ if (!isExternal && isSoldOut) {
29054
+ return { label: "Sold out", href, external: false, hidden: true };
28988
29055
  }
28989
29056
  const enrollmentOpen = event.kind === "course_session" ? event.course?.enrollmentOpen !== false : true;
28990
29057
  const label = !enrollmentOpen ? "Registration closed" : effectiveButtonText;
28991
- return { label, href: event.path, hidden: false };
29058
+ return { label, href, external: isExternal, hidden: false };
28992
29059
  }
28993
29060
 
28994
29061
  // ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
@@ -30426,6 +30493,8 @@ var EventCard = ({
30426
30493
  "a",
30427
30494
  {
30428
30495
  href: cta.href,
30496
+ target: cta.external ? "_blank" : void 0,
30497
+ rel: cta.external ? "noopener noreferrer" : void 0,
30429
30498
  className: `${buttonClass} event-card-cta`,
30430
30499
  children: cta.label
30431
30500
  }
@@ -30515,10 +30584,19 @@ var EventCompactRow = ({
30515
30584
  formattedTime,
30516
30585
  /* @__PURE__ */ jsx8("span", { className: "event-compact-row-action-price", children: price })
30517
30586
  ] }),
30518
- cta.hidden ? /* @__PURE__ */ jsx8("span", { className: "event-compact-row-status", children: cta.label }) : /* @__PURE__ */ jsxs6("a", { href: cta.href, className: `${buttonClass} event-compact-row-cta`, children: [
30519
- /* @__PURE__ */ jsx8("span", { children: cta.label }),
30520
- /* @__PURE__ */ jsx8(ArrowRightIcon, { "aria-hidden": "true" })
30521
- ] })
30587
+ cta.hidden ? /* @__PURE__ */ jsx8("span", { className: "event-compact-row-status", children: cta.label }) : /* @__PURE__ */ jsxs6(
30588
+ "a",
30589
+ {
30590
+ href: cta.href,
30591
+ target: cta.external ? "_blank" : void 0,
30592
+ rel: cta.external ? "noopener noreferrer" : void 0,
30593
+ className: `${buttonClass} event-compact-row-cta`,
30594
+ children: [
30595
+ /* @__PURE__ */ jsx8("span", { children: cta.label }),
30596
+ /* @__PURE__ */ jsx8(ArrowRightIcon, { "aria-hidden": "true" })
30597
+ ]
30598
+ }
30599
+ )
30522
30600
  ] })
30523
30601
  ] })
30524
30602
  ] });
@@ -32108,7 +32186,7 @@ function inferLegacyOfferingsPreviewGroupOrder(overrides) {
32108
32186
  return keys.length >= 2 ? keys : [];
32109
32187
  }
32110
32188
  function normalizeOfferingsPreviewContentForWrite(value) {
32111
- if (!isRecord7(value)) return null;
32189
+ if (!isRecord8(value)) return null;
32112
32190
  const groupOrderValue = value.groupOrder;
32113
32191
  if (Array.isArray(groupOrderValue)) {
32114
32192
  const normalized = normalizeOfferingsPreviewGroupOrder(groupOrderValue);
@@ -32121,7 +32199,7 @@ function normalizeOfferingsPreviewContentForWrite(value) {
32121
32199
  return { ...value, groupOrder: [] };
32122
32200
  }
32123
32201
  const legacyOrder = inferLegacyOfferingsPreviewGroupOrder(
32124
- Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord7) : []
32202
+ Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord8) : []
32125
32203
  );
32126
32204
  return legacyOrder.length > 0 ? { ...value, groupOrder: legacyOrder } : value;
32127
32205
  }
@@ -32175,7 +32253,7 @@ function uniqueOfferingsPreviewSourceKeys(values) {
32175
32253
  }
32176
32254
  return keys;
32177
32255
  }
32178
- function isRecord7(value) {
32256
+ function isRecord8(value) {
32179
32257
  return typeof value === "object" && value !== null && !Array.isArray(value);
32180
32258
  }
32181
32259
  function mergeOrderedKeysWithDefaults(orderedKeys, defaultKeys) {
@@ -32637,7 +32715,7 @@ function isOfferingsPreviewItemLimit(value) {
32637
32715
  return value === "1" || value === "2" || value === "3" || value === "4" || value === "5" || value === "6" || value === null;
32638
32716
  }
32639
32717
  function normalizeOfferingsPreviewGroupOverride(value) {
32640
- if (!isRecord8(value)) return [];
32718
+ if (!isRecord9(value)) return [];
32641
32719
  const override = {};
32642
32720
  if (isOfferingsPreviewSourceKey(value.sourceKey) || value.sourceKey === null) {
32643
32721
  override.sourceKey = value.sourceKey;
@@ -32669,12 +32747,12 @@ function isButtonVariant(value) {
32669
32747
  return value === "primary" || value === "secondary" || value === "outline" || value === "link" || value === null;
32670
32748
  }
32671
32749
  function normalizeCardStylesContent(value) {
32672
- return isRecord8(value) || value === null ? value : void 0;
32750
+ return isRecord9(value) || value === null ? value : void 0;
32673
32751
  }
32674
32752
  function normalizeSectionStylesContent(value) {
32675
- return isRecord8(value) || value === null ? value : void 0;
32753
+ return isRecord9(value) || value === null ? value : void 0;
32676
32754
  }
32677
- function isRecord8(value) {
32755
+ function isRecord9(value) {
32678
32756
  return typeof value === "object" && value !== null && !Array.isArray(value);
32679
32757
  }
32680
32758
 
@@ -38042,16 +38120,16 @@ import React4 from "react";
38042
38120
  // ../blocks/src/system/data/linkedContentEntries.ts
38043
38121
  var LINKED_CONTENT_ENTRY_META_KEY = "__rbLinkedContentEntry";
38044
38122
  function getLinkedContentEntryMeta(value) {
38045
- if (!isRecord9(value)) return null;
38123
+ if (!isRecord10(value)) return null;
38046
38124
  const candidate = value[LINKED_CONTENT_ENTRY_META_KEY];
38047
38125
  return isLinkedContentEntryMeta(candidate) ? candidate : null;
38048
38126
  }
38049
38127
  function buildLinkedContentEditTarget(input) {
38050
38128
  const { entry, sourceBlockId, sourceBlockKind, itemIndex } = input;
38051
- if (!isRecord9(entry)) return null;
38129
+ if (!isRecord10(entry)) return null;
38052
38130
  const meta = getLinkedContentEntryMeta(entry);
38053
38131
  if (!meta || meta.support.kind !== "supported") return null;
38054
- const content = isRecord9(entry.content) ? entry.content : {};
38132
+ const content = isRecord10(entry.content) ? entry.content : {};
38055
38133
  return {
38056
38134
  kind: "linked-content-entry",
38057
38135
  entryId: meta.entryId,
@@ -38109,14 +38187,14 @@ function resolvePreviewLinkedEntryInlineFieldType(fieldType) {
38109
38187
  return null;
38110
38188
  }
38111
38189
  function isLinkedContentEntryMeta(value) {
38112
- if (!isRecord9(value)) return false;
38190
+ if (!isRecord10(value)) return false;
38113
38191
  if (value.kind !== "linked-content-entry") return false;
38114
38192
  if (typeof value.entryId !== "string") return false;
38115
38193
  if (typeof value.contentTypeKey !== "string") return false;
38116
38194
  if (typeof value.contentTypeLabel !== "string") return false;
38117
38195
  if (typeof value.title !== "string") return false;
38118
38196
  if (!(value.optimisticHash === null || typeof value.optimisticHash === "string")) return false;
38119
- if (!isRecord9(value.contentType)) return false;
38197
+ if (!isRecord10(value.contentType)) return false;
38120
38198
  if (!isLinkedEntryFieldSourceArray(value.fieldSources)) return false;
38121
38199
  return isLinkedContentEditSupport(value.support);
38122
38200
  }
@@ -38124,7 +38202,7 @@ function isLinkedEntryFieldSourceArray(value) {
38124
38202
  return Array.isArray(value) && value.every(isLinkedEntryFieldSource);
38125
38203
  }
38126
38204
  function isLinkedEntryFieldSource(value) {
38127
- if (!isRecord9(value)) return false;
38205
+ if (!isRecord10(value)) return false;
38128
38206
  if (typeof value.displayPath !== "string") return false;
38129
38207
  switch (value.kind) {
38130
38208
  case "content-field":
@@ -38150,7 +38228,7 @@ function isLinkedEntryInlineFieldReadOnlyReason(value) {
38150
38228
  }
38151
38229
  }
38152
38230
  function isLinkedContentEditSupport(value) {
38153
- if (!isRecord9(value) || typeof value.kind !== "string") return false;
38231
+ if (!isRecord10(value) || typeof value.kind !== "string") return false;
38154
38232
  switch (value.kind) {
38155
38233
  case "supported":
38156
38234
  return true;
@@ -38162,7 +38240,7 @@ function isLinkedContentEditSupport(value) {
38162
38240
  return false;
38163
38241
  }
38164
38242
  }
38165
- function isRecord9(value) {
38243
+ function isRecord10(value) {
38166
38244
  return typeof value === "object" && value !== null && !Array.isArray(value);
38167
38245
  }
38168
38246
 
@@ -39618,12 +39696,12 @@ function toTrimmedString(value) {
39618
39696
  return trimmed ? trimmed : void 0;
39619
39697
  }
39620
39698
  function normalizeBookingFormConfig(form2) {
39621
- if (!isRecord10(form2)) return null;
39699
+ if (!isRecord11(form2)) return null;
39622
39700
  const id = readNonEmptyString(form2.id);
39623
39701
  const name = readNonEmptyString(form2.name);
39624
39702
  if (!id || !name) return null;
39625
- const schemaSource = isRecord10(form2.schema) ? form2.schema : isRecord10(form2.schemaJson) ? form2.schemaJson : null;
39626
- const settingsSource = isRecord10(form2.settings) ? form2.settings : isRecord10(form2.settingsJson) ? form2.settingsJson : null;
39703
+ const schemaSource = isRecord11(form2.schema) ? form2.schema : isRecord11(form2.schemaJson) ? form2.schemaJson : null;
39704
+ const settingsSource = isRecord11(form2.settings) ? form2.settings : isRecord11(form2.settingsJson) ? form2.settingsJson : null;
39627
39705
  return {
39628
39706
  id,
39629
39707
  name,
@@ -39647,10 +39725,10 @@ function normalizeBookingServices(services) {
39647
39725
  if (Array.isArray(services)) {
39648
39726
  return services.filter(isBookingFormService).map(normalizeService);
39649
39727
  }
39650
- if (isRecord10(services) && "services" in services) {
39728
+ if (isRecord11(services) && "services" in services) {
39651
39729
  return Array.isArray(services.services) ? services.services.filter(isBookingFormService).map(normalizeService) : [];
39652
39730
  }
39653
- return isRecord10(services) ? Object.values(services).filter(isBookingFormService).map(normalizeService) : [];
39731
+ return isRecord11(services) ? Object.values(services).filter(isBookingFormService).map(normalizeService) : [];
39654
39732
  }
39655
39733
  function normalizeBookingSchema(value) {
39656
39734
  if (!value) return void 0;
@@ -39662,7 +39740,7 @@ function normalizeBookingSchema(value) {
39662
39740
  };
39663
39741
  }
39664
39742
  function readBookingFormField(value) {
39665
- if (!isRecord10(value)) return null;
39743
+ if (!isRecord11(value)) return null;
39666
39744
  const id = readNonEmptyString(value.id);
39667
39745
  const label = readNonEmptyString(value.label);
39668
39746
  const type = readBookingFieldType(value.type);
@@ -39708,7 +39786,7 @@ function readBookingFieldOptions(value) {
39708
39786
  return options.length > 0 ? options : void 0;
39709
39787
  }
39710
39788
  function readBookingFieldOption(value) {
39711
- if (!isRecord10(value)) return null;
39789
+ if (!isRecord11(value)) return null;
39712
39790
  const optionValue = readNonEmptyString(value.value);
39713
39791
  const label = readNonEmptyString(value.label);
39714
39792
  return optionValue && label ? { value: optionValue, label } : null;
@@ -39725,7 +39803,7 @@ function normalizeBookingSettings(value) {
39725
39803
  };
39726
39804
  }
39727
39805
  function isBookingFormService(value) {
39728
- return isRecord10(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string";
39806
+ return isRecord11(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string";
39729
39807
  }
39730
39808
  function readNonEmptyString(value) {
39731
39809
  if (typeof value !== "string") return null;
@@ -39743,7 +39821,7 @@ function readStringArray(value) {
39743
39821
  const strings = value.filter((item) => typeof item === "string");
39744
39822
  return strings.length > 0 ? strings : void 0;
39745
39823
  }
39746
- function isRecord10(value) {
39824
+ function isRecord11(value) {
39747
39825
  return typeof value === "object" && value !== null;
39748
39826
  }
39749
39827
 
@@ -40301,7 +40379,7 @@ function EventDetailsView({
40301
40379
  "a",
40302
40380
  {
40303
40381
  className: "rb-tile rb-tile--interactive",
40304
- href: e.path,
40382
+ ...resolveEventLinkProps(e),
40305
40383
  children: /* @__PURE__ */ jsx30(
40306
40384
  DateTimeTile,
40307
40385
  {
@@ -41985,7 +42063,7 @@ var AgendaEventCard = ({
41985
42063
  showCapacity,
41986
42064
  onClick
41987
42065
  }) => {
41988
- const eventUrl = event.path;
42066
+ const eventLinkProps = resolveEventLinkProps(event);
41989
42067
  const categoryColor = event.eventCategory?.color || "rgb(var(--tb-accent))";
41990
42068
  const price = formatEventPrice(event);
41991
42069
  const { available, isFull } = getEventAvailability(event);
@@ -42046,7 +42124,7 @@ var AgendaEventCard = ({
42046
42124
  }
42047
42125
  );
42048
42126
  }
42049
- return /* @__PURE__ */ jsx47("a", { href: eventUrl, className: "event-agenda-card", children: cardContent });
42127
+ return /* @__PURE__ */ jsx47("a", { ...eventLinkProps, className: "event-agenda-card", children: cardContent });
42050
42128
  };
42051
42129
 
42052
42130
  // ../blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.tsx
@@ -42289,7 +42367,7 @@ function renderCalendarSsr(display) {
42289
42367
  dayEvents.slice(0, MAX_EVENTS_PER_DAY).map((event) => /* @__PURE__ */ jsxs35(
42290
42368
  "a",
42291
42369
  {
42292
- href: event.path,
42370
+ ...resolveEventLinkProps(event),
42293
42371
  className: "event-calendar-event",
42294
42372
  title: `${event.title} at ${formatTime(event.startsAt, { timeZone: getEventTimeZone(event) })}`,
42295
42373
  children: [
@@ -42417,7 +42495,7 @@ function renderTimetableSsr(display) {
42417
42495
  day.events.length === 0 ? /* @__PURE__ */ jsx49("p", { className: "event-timetable-day-empty", children: "No classes" }) : day.events.map((cell) => /* @__PURE__ */ jsxs35(
42418
42496
  "a",
42419
42497
  {
42420
- href: cell.event.path,
42498
+ ...resolveEventLinkProps(cell.event),
42421
42499
  className: "event-timetable-event",
42422
42500
  title: `${cell.event.title}, ${cell.timeLabel}`,
42423
42501
  style: {
@@ -43224,14 +43302,14 @@ function isDecoratedHeadingBlockKind(blockKind) {
43224
43302
  return blockKind === "block.intro" || blockKind === "block.feature-cards" || blockKind === "block.testimonials" || blockKind === "block.faq";
43225
43303
  }
43226
43304
  function readVariant(blockContent) {
43227
- if (!isRecord11(blockContent)) return void 0;
43305
+ if (!isRecord12(blockContent)) return void 0;
43228
43306
  const variant = blockContent.variant;
43229
43307
  return typeof variant === "string" ? variant : void 0;
43230
43308
  }
43231
43309
  function isFaqDecoratedVariant(variant) {
43232
43310
  return variant === "default" || variant === "question-columns";
43233
43311
  }
43234
- function isRecord11(value) {
43312
+ function isRecord12(value) {
43235
43313
  return typeof value === "object" && value !== null && !Array.isArray(value);
43236
43314
  }
43237
43315
  function buildHeadingDecorationWrapperClassName(className) {
@@ -67918,7 +67996,7 @@ function preset(id, verticalId, canonicalBehaviour, label, pluralLabel, descript
67918
67996
  }
67919
67997
 
67920
67998
  // ../api/src/utils/isRecord.ts
67921
- function isRecord12(value) {
67999
+ function isRecord13(value) {
67922
68000
  return typeof value === "object" && value !== null && !Array.isArray(value);
67923
68001
  }
67924
68002
 
@@ -68225,7 +68303,7 @@ function sanitizeMarks(marks) {
68225
68303
  if (mark.type === "bold" || mark.type === "strong" || mark.type === "italic" || mark.type === "em") {
68226
68304
  return [{ type: mark.type }];
68227
68305
  }
68228
- if (mark.type === "link" && isRecord12(mark.attrs) && typeof mark.attrs.href === "string") {
68306
+ if (mark.type === "link" && isRecord13(mark.attrs) && typeof mark.attrs.href === "string") {
68229
68307
  const attrs = { href: mark.attrs.href };
68230
68308
  if (typeof mark.attrs.target === "string" && mark.attrs.target.trim().length > 0) {
68231
68309
  attrs.target = mark.attrs.target;
@@ -68240,10 +68318,10 @@ function sanitizeMarks(marks) {
68240
68318
  return sanitized.length > 0 ? sanitized : void 0;
68241
68319
  }
68242
68320
  function unwrapRichTextValue(value) {
68243
- if (isRecord12(value) && isRecord12(value.doc)) {
68321
+ if (isRecord13(value) && isRecord13(value.doc)) {
68244
68322
  return unwrapRichTextValue(value.doc);
68245
68323
  }
68246
- if (isRecord12(value) && value.type === "doc") {
68324
+ if (isRecord13(value) && value.type === "doc") {
68247
68325
  return {
68248
68326
  type: "doc",
68249
68327
  content: Array.isArray(value.content) ? value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) : []
@@ -68252,7 +68330,7 @@ function unwrapRichTextValue(value) {
68252
68330
  return EMPTY_SITE_BANNER_BODY;
68253
68331
  }
68254
68332
  function isTipTapNodeLike(value) {
68255
- return isRecord12(value) && typeof value.type === "string";
68333
+ return isRecord13(value) && typeof value.type === "string";
68256
68334
  }
68257
68335
  function coerceTipTapNode(value) {
68258
68336
  return {
@@ -68260,9 +68338,9 @@ function coerceTipTapNode(value) {
68260
68338
  ...Array.isArray(value.content) ? { content: value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) } : {},
68261
68339
  ...typeof value.text === "string" ? { text: value.text } : {},
68262
68340
  ...Array.isArray(value.marks) ? {
68263
- marks: value.marks.filter((mark) => isRecord12(mark) && typeof mark.type === "string").map((mark) => ({
68341
+ marks: value.marks.filter((mark) => isRecord13(mark) && typeof mark.type === "string").map((mark) => ({
68264
68342
  type: mark.type,
68265
- ...isRecord12(mark.attrs) ? { attrs: mark.attrs } : {}
68343
+ ...isRecord13(mark.attrs) ? { attrs: mark.attrs } : {}
68266
68344
  }))
68267
68345
  } : {}
68268
68346
  };