@riverbankcms/sdk 0.90.0 → 0.91.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/{PreviewEditorSidebar-KVXNF3VW.mjs → PreviewEditorSidebar-3TT47WCF.mjs} +3 -3
  2. package/dist/{PreviewEditorUI-J3JN5Z7T.mjs → PreviewEditorUI-ORCLLUNZ.mjs} +3 -3
  3. package/dist/SdkPreviewModeRuntime-GMCDQPZZ.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/manifest/fieldValidation/index.d.ts +17 -0
  17. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +5 -0
  18. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +24 -0
  19. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/destination.d.ts +8 -0
  20. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/pricing.d.ts +3 -0
  21. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +7 -0
  22. package/dist/_dts/core/src/event-pricing.d.ts +12 -2
  23. package/dist/_dts/core/src/string.d.ts +12 -0
  24. package/dist/_dts/sdk/src/cli/sync/validation.d.ts +2 -2
  25. package/dist/_dts/sdk/src/public-api/contracts.d.ts +11 -1
  26. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +11 -1
  27. package/dist/_dts/sdk/src/version.d.ts +1 -1
  28. package/dist/{chunk-GSPFFUVB.mjs → chunk-AFPMCLS7.mjs} +2 -2
  29. package/dist/{chunk-RQ3XZ4SJ.mjs → chunk-GDT2QGIL.mjs} +1 -1
  30. package/dist/{chunk-PMBB6MQ7.mjs → chunk-RQUZYSES.mjs} +345 -153
  31. package/dist/{chunk-AEOYWPE4.mjs → chunk-S3YHJWEU.mjs} +7 -7
  32. package/dist/{chunk-UG7I7S7W.mjs → chunk-U5YM4AWE.mjs} +1 -1
  33. package/dist/{chunk-BOQXMCSP.mjs → chunk-ZA2S7H34.mjs} +3 -3
  34. package/dist/cli/index.mjs +363 -437
  35. package/dist/cli/init-docs/content/workflow-add-block.md +48 -0
  36. package/dist/cli/init-docs/content/workflow-custom-block.md +10 -0
  37. package/dist/client/{accordion-GXQNWQ6O.mjs → accordion-AFX37652.mjs} +2 -2
  38. package/dist/client/{bookingForm-STLUJ36H.mjs → bookingForm-32V5QCOW.mjs} +6 -6
  39. package/dist/client/bookings.mjs +1170 -571
  40. package/dist/client/{carousel-CVRN6EPP.mjs → carousel-TJGQJ7ER.mjs} +3 -3
  41. package/dist/client/{cart-IYIBA5CL.mjs → cart-JUU2JEW4.mjs} +6 -6
  42. package/dist/client/{checkout-O3BGM4GS.mjs → checkout-RD6BTFX4.mjs} +6 -6
  43. package/dist/client/{chunk-DAS5CIER.mjs → chunk-6QZIBNGV.mjs} +119 -21
  44. package/dist/client/{chunk-VFHZLZAC.mjs → chunk-6RN62XBV.mjs} +1 -1
  45. package/dist/client/{chunk-D3ETC2SU.mjs → chunk-C4LP6BPG.mjs} +1 -1
  46. package/dist/client/{chunk-NBFRJ5NB.mjs → chunk-CKXEUWWA.mjs} +2 -2
  47. package/dist/client/{chunk-4RTFGHZN.mjs → chunk-E6VIWZUG.mjs} +6 -3
  48. package/dist/client/{chunk-Z62JYS5O.mjs → chunk-FMZZHAIR.mjs} +2 -2
  49. package/dist/client/{chunk-FHU6PFPM.mjs → chunk-ISAUXU5R.mjs} +1 -1
  50. package/dist/client/{chunk-HIHOQGIP.mjs → chunk-LJCX6V7Q.mjs} +9 -9
  51. package/dist/client/{chunk-6DPXDOIL.mjs → chunk-MLBNVN4H.mjs} +99 -26
  52. package/dist/client/{chunk-7DH35FGA.mjs → chunk-PMNAV6LO.mjs} +1 -1
  53. package/dist/client/{chunk-MFPKS6QS.mjs → chunk-RMOFBBNA.mjs} +5 -5
  54. package/dist/client/{chunk-25W2EQUN.mjs → chunk-RWYFG625.mjs} +17 -8
  55. package/dist/client/client.mjs +305 -113
  56. package/dist/client/{courseRegistration-2D3ACMJR.mjs → courseRegistration-X63QAIVV.mjs} +6 -6
  57. package/dist/client/{eventCalendar-QY4UZUFF.mjs → eventCalendar-5T24GCZL.mjs} +9 -9
  58. package/dist/client/{eventCombined-RRCDKJC2.mjs → eventCombined-AZVTF22X.mjs} +9 -9
  59. package/dist/client/{eventDetails-YO335BUT.mjs → eventDetails-7GPFNLGF.mjs} +9 -9
  60. package/dist/client/{eventListing-PXA6GFQ3.mjs → eventListing-QEUMTMUM.mjs} +9 -9
  61. package/dist/client/{eventRegistration-2ZHEDDXO.mjs → eventRegistration-P2EDKCQZ.mjs} +9 -9
  62. package/dist/client/{form-ZS6KX4U2.mjs → form-NUJ7H4IN.mjs} +3 -3
  63. package/dist/client/{headerSection-QK5SLIIB.mjs → headerSection-JB7LECPL.mjs} +3 -3
  64. package/dist/client/hooks.mjs +93 -42
  65. package/dist/client/{locationMap-GFNIUD2X.mjs → locationMap-UEYWUCSW.mjs} +3 -3
  66. package/dist/client/{newsletterForm-PGLTTCUG.mjs → newsletterForm-S2YZQ2X7.mjs} +3 -3
  67. package/dist/client/{productDetail-OPBE5ZPI.mjs → productDetail-H5MADGG7.mjs} +6 -6
  68. package/dist/client/{productList-NI72Q62Z.mjs → productList-DK7YON7H.mjs} +6 -6
  69. package/dist/client/rendering/client.mjs +262 -70
  70. package/dist/client/rendering/islands.mjs +19 -19
  71. package/dist/client/rendering.mjs +306 -114
  72. package/dist/client/{shop-3ZQPEWYI.mjs → shop-6PA7RDRJ.mjs} +6 -6
  73. package/dist/client/spam-protection.mjs +10 -10
  74. package/dist/preview-next/client/runtime.mjs +5 -5
  75. package/dist/{sdk-runtime-FSHXCWDS.mjs → sdk-runtime-JP5347OB.mjs} +6 -6
  76. package/dist/server/components.mjs +149 -69
  77. package/dist/server/config-validation.mjs +85 -34
  78. package/dist/server/config.mjs +85 -34
  79. package/dist/server/data.mjs +93 -42
  80. package/dist/server/index.mjs +1 -1
  81. package/dist/server/navigation.mjs +2 -2
  82. package/dist/server/next.mjs +170 -90
  83. package/dist/server/page-converter.mjs +77 -26
  84. package/dist/server/prebuild.mjs +1 -1
  85. package/dist/server/rendering/server.mjs +161 -81
  86. package/dist/server/rendering.mjs +165 -85
  87. package/dist/server/routing.mjs +135 -58
  88. package/dist/server/server.mjs +102 -51
  89. package/package.json +2 -2
  90. package/dist/SdkPreviewModeRuntime-UBL6MSNP.mjs +0 -8
@@ -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
  }
@@ -6525,11 +6528,11 @@ function isValidTimeZone(timeZone) {
6525
6528
  }
6526
6529
  function getSafeTimeZone(timeZone) {
6527
6530
  const normalized = typeof timeZone === "string" ? timeZone.trim() : "";
6528
- return normalized && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
6531
+ return normalized.length > 0 && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
6529
6532
  }
6530
6533
  function parseStrictBookingTimeZone(timeZone) {
6531
6534
  const normalized = timeZone.trim();
6532
- if (!normalized || !isValidTimeZone(normalized)) {
6535
+ if (normalized.length === 0 || !isValidTimeZone(normalized)) {
6533
6536
  return null;
6534
6537
  }
6535
6538
  return normalized;
@@ -6603,7 +6606,7 @@ function parseScheduledBookingDateTime(input) {
6603
6606
  try {
6604
6607
  const startsAt = toUtcIsoDateTimeString(input.startsAt);
6605
6608
  const timeZone = parseStrictBookingTimeZone(input.timeZone);
6606
- if (!timeZone) {
6609
+ if (timeZone === null) {
6607
6610
  return {
6608
6611
  ok: false,
6609
6612
  field: "timeZone",
@@ -6649,10 +6652,10 @@ function normalizeLocationAddressText(value) {
6649
6652
  return null;
6650
6653
  }
6651
6654
  const trimmed = value.trim();
6652
- return trimmed ? trimmed : null;
6655
+ return trimmed.length > 0 ? trimmed : null;
6653
6656
  }
6654
6657
  function hasLocationCoordinates(value) {
6655
- return typeof value?.lat === "number" && typeof value?.lng === "number";
6658
+ return value != null && typeof value.lat === "number" && typeof value.lng === "number";
6656
6659
  }
6657
6660
  function toLocationCoordinates(value) {
6658
6661
  if (!hasLocationCoordinates(value)) {
@@ -28088,6 +28091,18 @@ var publicCoursesArraySchema = z42.array(publicCourseSchema);
28088
28091
  var eventPresetSchema = z43.enum(["event", "class", "workshop", "retreat", "performance"]);
28089
28092
  var eventScheduleScopeSchema = z43.enum(["recurring", "oneOff"]);
28090
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
+ ]);
28091
28106
  var eventVenueSchema = z43.object({
28092
28107
  id: z43.string(),
28093
28108
  name: z43.string(),
@@ -28102,7 +28117,7 @@ var eventCategorySchema = z43.object({
28102
28117
  name: z43.string(),
28103
28118
  color: z43.string().nullable()
28104
28119
  });
28105
- var pricingTypeSchema = z43.enum(["free", "paid"]);
28120
+ var pricingTypeSchema = z43.enum(["free", "paid", "external"]);
28106
28121
  var accessRestrictionSchema = z43.enum(["none", "category"]);
28107
28122
  var eventPricingModeSchema = z43.enum(["single", "ticket_types"]);
28108
28123
  var publicCoursePriceDisplaySchema = z43.discriminatedUnion("kind", [
@@ -28123,6 +28138,7 @@ var publicEventPriceDisplaySchema = z43.discriminatedUnion("kind", [
28123
28138
  currency: z43.string()
28124
28139
  }),
28125
28140
  z43.object({ kind: z43.literal("unavailable"), currency: z43.string() }),
28141
+ z43.object({ kind: z43.literal("external"), label: z43.string() }),
28126
28142
  z43.object({ kind: z43.literal("course"), display: publicCoursePriceDisplaySchema })
28127
28143
  ]);
28128
28144
  var publicEventTicketTypePriceDisplaySchema = z43.union([
@@ -28201,6 +28217,10 @@ var publicEventPricingSchema = z43.discriminatedUnion("kind", [
28201
28217
  z43.object({
28202
28218
  kind: z43.literal("course"),
28203
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() })
28204
28224
  })
28205
28225
  ]);
28206
28226
  var publicTeamMemberSummarySchema = z43.object({
@@ -28229,7 +28249,8 @@ var publicEventSchema = z43.object({
28229
28249
  image: mediaSchema2.nullable().optional()
28230
28250
  }).optional(),
28231
28251
  slug: z43.string(),
28232
- path: z43.string(),
28252
+ path: z43.string().nullable(),
28253
+ destination: publicEventDestinationSchema,
28233
28254
  requiresRegistration: z43.boolean(),
28234
28255
  deliveryMode: z43.enum(["in_person", "online", "hybrid"]),
28235
28256
  attendanceModes: z43.array(publicEventAttendanceModeAvailabilitySchema),
@@ -28533,12 +28554,41 @@ function isEventContentType(slug) {
28533
28554
  return EVENT_CONTENT_TYPE_SLUGS.includes(slug);
28534
28555
  }
28535
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
+
28536
28579
  // ../blocks/src/system/runtime/nodes/events/shared/pricing.ts
28537
28580
  var DEFAULT_EVENT_CURRENCY = "USD";
28538
28581
  function resolveRuntimeEventPricing(event) {
28539
28582
  if (isPublicEventPricing(event.pricing)) {
28540
28583
  return event.pricing;
28541
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
+ }
28542
28592
  const legacy = event;
28543
28593
  const currency = readCurrency(legacy.currency);
28544
28594
  if (event.requiresRegistration === false) {
@@ -28575,22 +28625,22 @@ function resolveRuntimeEventPricing(event) {
28575
28625
  function readCurrency(value) {
28576
28626
  return typeof value === "string" && value.trim().length > 0 ? value : DEFAULT_EVENT_CURRENCY;
28577
28627
  }
28578
- function isRecord3(value) {
28628
+ function isRecord4(value) {
28579
28629
  return typeof value === "object" && value !== null && !Array.isArray(value);
28580
28630
  }
28581
28631
  function isPublicEventPricing(value) {
28582
- if (!isRecord3(value) || typeof value.kind !== "string") return false;
28583
- 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";
28584
28634
  }
28585
28635
  function isPublicEventTicketType(value) {
28586
- return isRecord3(value) && typeof value.id === "string";
28636
+ return isRecord4(value) && typeof value.id === "string";
28587
28637
  }
28588
28638
  function readTicketTypePriceDisplay(value, currency) {
28589
28639
  const display = readLegacyPriceDisplay(value, currency);
28590
- return display.kind === "course" ? { kind: "unavailable", currency } : display;
28640
+ return display.kind === "course" || display.kind === "external" ? { kind: "unavailable", currency } : display;
28591
28641
  }
28592
28642
  function readLegacyPriceDisplay(value, currency) {
28593
- if (!isRecord3(value) || typeof value.kind !== "string") {
28643
+ if (!isRecord4(value) || typeof value.kind !== "string") {
28594
28644
  return { kind: "unavailable", currency };
28595
28645
  }
28596
28646
  const displayCurrency = readCurrency(value.currency);
@@ -28629,7 +28679,7 @@ function readLegacyPriceDisplay(value, currency) {
28629
28679
  case "unavailable":
28630
28680
  return { kind: "unavailable", currency: displayCurrency };
28631
28681
  case "course":
28632
- return isRecord3(value.display) ? {
28682
+ return isRecord4(value.display) ? {
28633
28683
  kind: "course",
28634
28684
  display: readCoursePriceDisplay(value.display, displayCurrency)
28635
28685
  } : {
@@ -28716,7 +28766,7 @@ function resolveEventRequiresPayment(input) {
28716
28766
  if (!input.event) {
28717
28767
  return false;
28718
28768
  }
28719
- return publicEventPricingType(resolveRuntimeEventPricing(input.event)) !== "free";
28769
+ return publicEventPricingType(resolveRuntimeEventPricing(input.event)) === "paid";
28720
28770
  }
28721
28771
 
28722
28772
  // ../blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.ts
@@ -28913,15 +28963,16 @@ var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
28913
28963
  })
28914
28964
  });
28915
28965
  function normalizeEventRegistrationEventInput(value) {
28916
- if (!isRecord4(value)) {
28966
+ if (!isRecord5(value)) {
28917
28967
  return value;
28918
28968
  }
28919
28969
  return {
28920
28970
  ...value,
28971
+ destination: resolveRuntimeEventDestination(value),
28921
28972
  pricing: resolveRuntimeEventPricing(value)
28922
28973
  };
28923
28974
  }
28924
- function isRecord4(value) {
28975
+ function isRecord5(value) {
28925
28976
  return typeof value === "object" && value !== null && !Array.isArray(value);
28926
28977
  }
28927
28978
  var eventRegistrationInteractiveIslandPropsCodec = createInteractiveIslandCodec({
@@ -31483,7 +31534,7 @@ function inferLegacyOfferingsPreviewGroupOrder(overrides) {
31483
31534
  return keys.length >= 2 ? keys : [];
31484
31535
  }
31485
31536
  function normalizeOfferingsPreviewContentForWrite(value) {
31486
- if (!isRecord5(value)) return null;
31537
+ if (!isRecord6(value)) return null;
31487
31538
  const groupOrderValue = value.groupOrder;
31488
31539
  if (Array.isArray(groupOrderValue)) {
31489
31540
  const normalized = normalizeOfferingsPreviewGroupOrder(groupOrderValue);
@@ -31496,7 +31547,7 @@ function normalizeOfferingsPreviewContentForWrite(value) {
31496
31547
  return { ...value, groupOrder: [] };
31497
31548
  }
31498
31549
  const legacyOrder = inferLegacyOfferingsPreviewGroupOrder(
31499
- Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord5) : []
31550
+ Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord6) : []
31500
31551
  );
31501
31552
  return legacyOrder.length > 0 ? { ...value, groupOrder: legacyOrder } : value;
31502
31553
  }
@@ -31510,7 +31561,7 @@ function uniqueOfferingsPreviewSourceKeys(values) {
31510
31561
  }
31511
31562
  return keys;
31512
31563
  }
31513
- function isRecord5(value) {
31564
+ function isRecord6(value) {
31514
31565
  return typeof value === "object" && value !== null && !Array.isArray(value);
31515
31566
  }
31516
31567
 
@@ -31877,7 +31928,7 @@ function isOfferingsPreviewItemLimit(value) {
31877
31928
  return value === "1" || value === "2" || value === "3" || value === "4" || value === "5" || value === "6" || value === null;
31878
31929
  }
31879
31930
  function normalizeOfferingsPreviewGroupOverride(value) {
31880
- if (!isRecord6(value)) return [];
31931
+ if (!isRecord7(value)) return [];
31881
31932
  const override = {};
31882
31933
  if (isOfferingsPreviewSourceKey(value.sourceKey) || value.sourceKey === null) {
31883
31934
  override.sourceKey = value.sourceKey;
@@ -31909,12 +31960,12 @@ function isButtonVariant(value) {
31909
31960
  return value === "primary" || value === "secondary" || value === "outline" || value === "link" || value === null;
31910
31961
  }
31911
31962
  function normalizeCardStylesContent(value) {
31912
- return isRecord6(value) || value === null ? value : void 0;
31963
+ return isRecord7(value) || value === null ? value : void 0;
31913
31964
  }
31914
31965
  function normalizeSectionStylesContent(value) {
31915
- return isRecord6(value) || value === null ? value : void 0;
31966
+ return isRecord7(value) || value === null ? value : void 0;
31916
31967
  }
31917
- function isRecord6(value) {
31968
+ function isRecord7(value) {
31918
31969
  return typeof value === "object" && value !== null && !Array.isArray(value);
31919
31970
  }
31920
31971
 
@@ -37007,11 +37058,11 @@ function extractRouteUpdatedAt(candidate) {
37007
37058
  }
37008
37059
  function resolveRouteTargetForStage(routeIdValue, routes, stageInput) {
37009
37060
  const routeId = typeof routeIdValue === "string" ? routeIdValue : null;
37010
- if (!routeId || !routes) return null;
37061
+ if (routeId === null || routeId.length === 0 || routes === void 0) return null;
37011
37062
  const routeEntry = routes[routeId];
37012
37063
  if (!isRouteVisibleInStage(routeEntry, stageInput)) return null;
37013
37064
  const href = extractRouteHref(routeEntry, stageInput);
37014
- if (!href) return null;
37065
+ if (href === null) return null;
37015
37066
  return {
37016
37067
  routeId,
37017
37068
  href,
@@ -38624,7 +38675,7 @@ function preset(id, verticalId, canonicalBehaviour, label, pluralLabel, descript
38624
38675
  }
38625
38676
 
38626
38677
  // ../api/src/utils/isRecord.ts
38627
- function isRecord7(value) {
38678
+ function isRecord8(value) {
38628
38679
  return typeof value === "object" && value !== null && !Array.isArray(value);
38629
38680
  }
38630
38681
 
@@ -38931,7 +38982,7 @@ function sanitizeMarks(marks) {
38931
38982
  if (mark.type === "bold" || mark.type === "strong" || mark.type === "italic" || mark.type === "em") {
38932
38983
  return [{ type: mark.type }];
38933
38984
  }
38934
- if (mark.type === "link" && isRecord7(mark.attrs) && typeof mark.attrs.href === "string") {
38985
+ if (mark.type === "link" && isRecord8(mark.attrs) && typeof mark.attrs.href === "string") {
38935
38986
  const attrs = { href: mark.attrs.href };
38936
38987
  if (typeof mark.attrs.target === "string" && mark.attrs.target.trim().length > 0) {
38937
38988
  attrs.target = mark.attrs.target;
@@ -38946,10 +38997,10 @@ function sanitizeMarks(marks) {
38946
38997
  return sanitized.length > 0 ? sanitized : void 0;
38947
38998
  }
38948
38999
  function unwrapRichTextValue(value) {
38949
- if (isRecord7(value) && isRecord7(value.doc)) {
39000
+ if (isRecord8(value) && isRecord8(value.doc)) {
38950
39001
  return unwrapRichTextValue(value.doc);
38951
39002
  }
38952
- if (isRecord7(value) && value.type === "doc") {
39003
+ if (isRecord8(value) && value.type === "doc") {
38953
39004
  return {
38954
39005
  type: "doc",
38955
39006
  content: Array.isArray(value.content) ? value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) : []
@@ -38958,7 +39009,7 @@ function unwrapRichTextValue(value) {
38958
39009
  return EMPTY_SITE_BANNER_BODY;
38959
39010
  }
38960
39011
  function isTipTapNodeLike(value) {
38961
- return isRecord7(value) && typeof value.type === "string";
39012
+ return isRecord8(value) && typeof value.type === "string";
38962
39013
  }
38963
39014
  function coerceTipTapNode(value) {
38964
39015
  return {
@@ -38966,9 +39017,9 @@ function coerceTipTapNode(value) {
38966
39017
  ...Array.isArray(value.content) ? { content: value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) } : {},
38967
39018
  ...typeof value.text === "string" ? { text: value.text } : {},
38968
39019
  ...Array.isArray(value.marks) ? {
38969
- marks: value.marks.filter((mark) => isRecord7(mark) && typeof mark.type === "string").map((mark) => ({
39020
+ marks: value.marks.filter((mark) => isRecord8(mark) && typeof mark.type === "string").map((mark) => ({
38970
39021
  type: mark.type,
38971
- ...isRecord7(mark.attrs) ? { attrs: mark.attrs } : {}
39022
+ ...isRecord8(mark.attrs) ? { attrs: mark.attrs } : {}
38972
39023
  }))
38973
39024
  } : {}
38974
39025
  };
@@ -39062,7 +39113,7 @@ function collectCartLinkStats(items, depth = 0) {
39062
39113
  return result;
39063
39114
  }
39064
39115
  function isNavigationMenuValidationItem(value) {
39065
- if (!isRecord7(value)) return false;
39116
+ if (!isRecord8(value)) return false;
39066
39117
  return typeof value.label === "string";
39067
39118
  }
39068
39119
 
@@ -6540,6 +6540,8 @@ function publicEventPricingType(pricing) {
6540
6540
  case "ticket_types":
6541
6541
  case "course":
6542
6542
  return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
6543
+ case "external":
6544
+ return "external";
6543
6545
  }
6544
6546
  }
6545
6547
  function isFreePublicEventPriceDisplay(display) {
@@ -6553,6 +6555,7 @@ function isFreePublicEventPriceDisplay(display) {
6553
6555
  case "range":
6554
6556
  case "mixed":
6555
6557
  case "unavailable":
6558
+ case "external":
6556
6559
  return false;
6557
6560
  }
6558
6561
  }
@@ -6570,11 +6573,11 @@ function isValidTimeZone(timeZone) {
6570
6573
  }
6571
6574
  function getSafeTimeZone(timeZone) {
6572
6575
  const normalized = typeof timeZone === "string" ? timeZone.trim() : "";
6573
- return normalized && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
6576
+ return normalized.length > 0 && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
6574
6577
  }
6575
6578
  function parseStrictBookingTimeZone(timeZone) {
6576
6579
  const normalized = timeZone.trim();
6577
- if (!normalized || !isValidTimeZone(normalized)) {
6580
+ if (normalized.length === 0 || !isValidTimeZone(normalized)) {
6578
6581
  return null;
6579
6582
  }
6580
6583
  return normalized;
@@ -6648,7 +6651,7 @@ function parseScheduledBookingDateTime(input) {
6648
6651
  try {
6649
6652
  const startsAt = toUtcIsoDateTimeString(input.startsAt);
6650
6653
  const timeZone = parseStrictBookingTimeZone(input.timeZone);
6651
- if (!timeZone) {
6654
+ if (timeZone === null) {
6652
6655
  return {
6653
6656
  ok: false,
6654
6657
  field: "timeZone",
@@ -6694,10 +6697,10 @@ function normalizeLocationAddressText(value) {
6694
6697
  return null;
6695
6698
  }
6696
6699
  const trimmed = value.trim();
6697
- return trimmed ? trimmed : null;
6700
+ return trimmed.length > 0 ? trimmed : null;
6698
6701
  }
6699
6702
  function hasLocationCoordinates(value) {
6700
- return typeof value?.lat === "number" && typeof value?.lng === "number";
6703
+ return value != null && typeof value.lat === "number" && typeof value.lng === "number";
6701
6704
  }
6702
6705
  function toLocationCoordinates(value) {
6703
6706
  if (!hasLocationCoordinates(value)) {
@@ -28133,6 +28136,18 @@ var publicCoursesArraySchema = z42.array(publicCourseSchema);
28133
28136
  var eventPresetSchema = z43.enum(["event", "class", "workshop", "retreat", "performance"]);
28134
28137
  var eventScheduleScopeSchema = z43.enum(["recurring", "oneOff"]);
28135
28138
  var eventDestinationModeSchema = z43.enum(["cms-managed", "system-managed"]);
28139
+ var publicEventDestinationSchema = z43.discriminatedUnion("kind", [
28140
+ z43.object({
28141
+ kind: z43.literal("native"),
28142
+ mode: eventDestinationModeSchema,
28143
+ path: z43.string()
28144
+ }),
28145
+ z43.object({
28146
+ kind: z43.literal("external"),
28147
+ url: z43.string(),
28148
+ label: z43.string()
28149
+ })
28150
+ ]);
28136
28151
  var eventVenueSchema = z43.object({
28137
28152
  id: z43.string(),
28138
28153
  name: z43.string(),
@@ -28147,7 +28162,7 @@ var eventCategorySchema = z43.object({
28147
28162
  name: z43.string(),
28148
28163
  color: z43.string().nullable()
28149
28164
  });
28150
- var pricingTypeSchema = z43.enum(["free", "paid"]);
28165
+ var pricingTypeSchema = z43.enum(["free", "paid", "external"]);
28151
28166
  var accessRestrictionSchema = z43.enum(["none", "category"]);
28152
28167
  var eventPricingModeSchema = z43.enum(["single", "ticket_types"]);
28153
28168
  var publicCoursePriceDisplaySchema = z43.discriminatedUnion("kind", [
@@ -28168,6 +28183,7 @@ var publicEventPriceDisplaySchema = z43.discriminatedUnion("kind", [
28168
28183
  currency: z43.string()
28169
28184
  }),
28170
28185
  z43.object({ kind: z43.literal("unavailable"), currency: z43.string() }),
28186
+ z43.object({ kind: z43.literal("external"), label: z43.string() }),
28171
28187
  z43.object({ kind: z43.literal("course"), display: publicCoursePriceDisplaySchema })
28172
28188
  ]);
28173
28189
  var publicEventTicketTypePriceDisplaySchema = z43.union([
@@ -28246,6 +28262,10 @@ var publicEventPricingSchema = z43.discriminatedUnion("kind", [
28246
28262
  z43.object({
28247
28263
  kind: z43.literal("course"),
28248
28264
  display: z43.object({ kind: z43.literal("course"), display: publicCoursePriceDisplaySchema })
28265
+ }),
28266
+ z43.object({
28267
+ kind: z43.literal("external"),
28268
+ display: z43.object({ kind: z43.literal("external"), label: z43.string() })
28249
28269
  })
28250
28270
  ]);
28251
28271
  var publicTeamMemberSummarySchema = z43.object({
@@ -28274,7 +28294,8 @@ var publicEventSchema = z43.object({
28274
28294
  image: mediaSchema2.nullable().optional()
28275
28295
  }).optional(),
28276
28296
  slug: z43.string(),
28277
- path: z43.string(),
28297
+ path: z43.string().nullable(),
28298
+ destination: publicEventDestinationSchema,
28278
28299
  requiresRegistration: z43.boolean(),
28279
28300
  deliveryMode: z43.enum(["in_person", "online", "hybrid"]),
28280
28301
  attendanceModes: z43.array(publicEventAttendanceModeAvailabilitySchema),
@@ -28578,12 +28599,41 @@ function isEventContentType(slug) {
28578
28599
  return EVENT_CONTENT_TYPE_SLUGS.includes(slug);
28579
28600
  }
28580
28601
 
28602
+ // ../blocks/src/system/runtime/nodes/events/shared/destination.ts
28603
+ function isRecord3(value) {
28604
+ return typeof value === "object" && value !== null && !Array.isArray(value);
28605
+ }
28606
+ function isRuntimeEventDestination(value) {
28607
+ if (!isRecord3(value) || typeof value.kind !== "string") return false;
28608
+ if (value.kind === "native") {
28609
+ return (value.mode === "cms-managed" || value.mode === "system-managed") && typeof value.path === "string";
28610
+ }
28611
+ return value.kind === "external" && typeof value.url === "string" && typeof value.label === "string";
28612
+ }
28613
+ function resolveRuntimeEventDestination(event) {
28614
+ if (isRuntimeEventDestination(event.destination)) {
28615
+ return event.destination;
28616
+ }
28617
+ return {
28618
+ kind: "native",
28619
+ mode: event.eventDestinationMode === "system-managed" ? "system-managed" : "cms-managed",
28620
+ path: typeof event.path === "string" ? event.path : ""
28621
+ };
28622
+ }
28623
+
28581
28624
  // ../blocks/src/system/runtime/nodes/events/shared/pricing.ts
28582
28625
  var DEFAULT_EVENT_CURRENCY = "USD";
28583
28626
  function resolveRuntimeEventPricing(event) {
28584
28627
  if (isPublicEventPricing(event.pricing)) {
28585
28628
  return event.pricing;
28586
28629
  }
28630
+ const destination = resolveRuntimeEventDestination(event);
28631
+ if (destination.kind === "external") {
28632
+ return {
28633
+ kind: "external",
28634
+ display: { kind: "external", label: "External registration" }
28635
+ };
28636
+ }
28587
28637
  const legacy = event;
28588
28638
  const currency = readCurrency(legacy.currency);
28589
28639
  if (event.requiresRegistration === false) {
@@ -28620,22 +28670,22 @@ function resolveRuntimeEventPricing(event) {
28620
28670
  function readCurrency(value) {
28621
28671
  return typeof value === "string" && value.trim().length > 0 ? value : DEFAULT_EVENT_CURRENCY;
28622
28672
  }
28623
- function isRecord3(value) {
28673
+ function isRecord4(value) {
28624
28674
  return typeof value === "object" && value !== null && !Array.isArray(value);
28625
28675
  }
28626
28676
  function isPublicEventPricing(value) {
28627
- if (!isRecord3(value) || typeof value.kind !== "string") return false;
28628
- return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course";
28677
+ if (!isRecord4(value) || typeof value.kind !== "string") return false;
28678
+ return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course" || value.kind === "external";
28629
28679
  }
28630
28680
  function isPublicEventTicketType(value) {
28631
- return isRecord3(value) && typeof value.id === "string";
28681
+ return isRecord4(value) && typeof value.id === "string";
28632
28682
  }
28633
28683
  function readTicketTypePriceDisplay(value, currency) {
28634
28684
  const display = readLegacyPriceDisplay(value, currency);
28635
- return display.kind === "course" ? { kind: "unavailable", currency } : display;
28685
+ return display.kind === "course" || display.kind === "external" ? { kind: "unavailable", currency } : display;
28636
28686
  }
28637
28687
  function readLegacyPriceDisplay(value, currency) {
28638
- if (!isRecord3(value) || typeof value.kind !== "string") {
28688
+ if (!isRecord4(value) || typeof value.kind !== "string") {
28639
28689
  return { kind: "unavailable", currency };
28640
28690
  }
28641
28691
  const displayCurrency = readCurrency(value.currency);
@@ -28674,7 +28724,7 @@ function readLegacyPriceDisplay(value, currency) {
28674
28724
  case "unavailable":
28675
28725
  return { kind: "unavailable", currency: displayCurrency };
28676
28726
  case "course":
28677
- return isRecord3(value.display) ? {
28727
+ return isRecord4(value.display) ? {
28678
28728
  kind: "course",
28679
28729
  display: readCoursePriceDisplay(value.display, displayCurrency)
28680
28730
  } : {
@@ -28761,7 +28811,7 @@ function resolveEventRequiresPayment(input) {
28761
28811
  if (!input.event) {
28762
28812
  return false;
28763
28813
  }
28764
- return publicEventPricingType(resolveRuntimeEventPricing(input.event)) !== "free";
28814
+ return publicEventPricingType(resolveRuntimeEventPricing(input.event)) === "paid";
28765
28815
  }
28766
28816
 
28767
28817
  // ../blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.ts
@@ -28958,15 +29008,16 @@ var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
28958
29008
  })
28959
29009
  });
28960
29010
  function normalizeEventRegistrationEventInput(value) {
28961
- if (!isRecord4(value)) {
29011
+ if (!isRecord5(value)) {
28962
29012
  return value;
28963
29013
  }
28964
29014
  return {
28965
29015
  ...value,
29016
+ destination: resolveRuntimeEventDestination(value),
28966
29017
  pricing: resolveRuntimeEventPricing(value)
28967
29018
  };
28968
29019
  }
28969
- function isRecord4(value) {
29020
+ function isRecord5(value) {
28970
29021
  return typeof value === "object" && value !== null && !Array.isArray(value);
28971
29022
  }
28972
29023
  var eventRegistrationInteractiveIslandPropsCodec = createInteractiveIslandCodec({
@@ -31528,7 +31579,7 @@ function inferLegacyOfferingsPreviewGroupOrder(overrides) {
31528
31579
  return keys.length >= 2 ? keys : [];
31529
31580
  }
31530
31581
  function normalizeOfferingsPreviewContentForWrite(value) {
31531
- if (!isRecord5(value)) return null;
31582
+ if (!isRecord6(value)) return null;
31532
31583
  const groupOrderValue = value.groupOrder;
31533
31584
  if (Array.isArray(groupOrderValue)) {
31534
31585
  const normalized = normalizeOfferingsPreviewGroupOrder(groupOrderValue);
@@ -31541,7 +31592,7 @@ function normalizeOfferingsPreviewContentForWrite(value) {
31541
31592
  return { ...value, groupOrder: [] };
31542
31593
  }
31543
31594
  const legacyOrder = inferLegacyOfferingsPreviewGroupOrder(
31544
- Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord5) : []
31595
+ Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord6) : []
31545
31596
  );
31546
31597
  return legacyOrder.length > 0 ? { ...value, groupOrder: legacyOrder } : value;
31547
31598
  }
@@ -31555,7 +31606,7 @@ function uniqueOfferingsPreviewSourceKeys(values) {
31555
31606
  }
31556
31607
  return keys;
31557
31608
  }
31558
- function isRecord5(value) {
31609
+ function isRecord6(value) {
31559
31610
  return typeof value === "object" && value !== null && !Array.isArray(value);
31560
31611
  }
31561
31612
 
@@ -31922,7 +31973,7 @@ function isOfferingsPreviewItemLimit(value) {
31922
31973
  return value === "1" || value === "2" || value === "3" || value === "4" || value === "5" || value === "6" || value === null;
31923
31974
  }
31924
31975
  function normalizeOfferingsPreviewGroupOverride(value) {
31925
- if (!isRecord6(value)) return [];
31976
+ if (!isRecord7(value)) return [];
31926
31977
  const override = {};
31927
31978
  if (isOfferingsPreviewSourceKey(value.sourceKey) || value.sourceKey === null) {
31928
31979
  override.sourceKey = value.sourceKey;
@@ -31954,12 +32005,12 @@ function isButtonVariant(value) {
31954
32005
  return value === "primary" || value === "secondary" || value === "outline" || value === "link" || value === null;
31955
32006
  }
31956
32007
  function normalizeCardStylesContent(value) {
31957
- return isRecord6(value) || value === null ? value : void 0;
32008
+ return isRecord7(value) || value === null ? value : void 0;
31958
32009
  }
31959
32010
  function normalizeSectionStylesContent(value) {
31960
- return isRecord6(value) || value === null ? value : void 0;
32011
+ return isRecord7(value) || value === null ? value : void 0;
31961
32012
  }
31962
- function isRecord6(value) {
32013
+ function isRecord7(value) {
31963
32014
  return typeof value === "object" && value !== null && !Array.isArray(value);
31964
32015
  }
31965
32016
 
@@ -37052,11 +37103,11 @@ function extractRouteUpdatedAt(candidate) {
37052
37103
  }
37053
37104
  function resolveRouteTargetForStage(routeIdValue, routes, stageInput) {
37054
37105
  const routeId = typeof routeIdValue === "string" ? routeIdValue : null;
37055
- if (!routeId || !routes) return null;
37106
+ if (routeId === null || routeId.length === 0 || routes === void 0) return null;
37056
37107
  const routeEntry = routes[routeId];
37057
37108
  if (!isRouteVisibleInStage(routeEntry, stageInput)) return null;
37058
37109
  const href = extractRouteHref(routeEntry, stageInput);
37059
- if (!href) return null;
37110
+ if (href === null) return null;
37060
37111
  return {
37061
37112
  routeId,
37062
37113
  href,
@@ -38669,7 +38720,7 @@ function preset(id, verticalId, canonicalBehaviour, label, pluralLabel, descript
38669
38720
  }
38670
38721
 
38671
38722
  // ../api/src/utils/isRecord.ts
38672
- function isRecord7(value) {
38723
+ function isRecord8(value) {
38673
38724
  return typeof value === "object" && value !== null && !Array.isArray(value);
38674
38725
  }
38675
38726
 
@@ -38976,7 +39027,7 @@ function sanitizeMarks(marks) {
38976
39027
  if (mark.type === "bold" || mark.type === "strong" || mark.type === "italic" || mark.type === "em") {
38977
39028
  return [{ type: mark.type }];
38978
39029
  }
38979
- if (mark.type === "link" && isRecord7(mark.attrs) && typeof mark.attrs.href === "string") {
39030
+ if (mark.type === "link" && isRecord8(mark.attrs) && typeof mark.attrs.href === "string") {
38980
39031
  const attrs = { href: mark.attrs.href };
38981
39032
  if (typeof mark.attrs.target === "string" && mark.attrs.target.trim().length > 0) {
38982
39033
  attrs.target = mark.attrs.target;
@@ -38991,10 +39042,10 @@ function sanitizeMarks(marks) {
38991
39042
  return sanitized.length > 0 ? sanitized : void 0;
38992
39043
  }
38993
39044
  function unwrapRichTextValue(value) {
38994
- if (isRecord7(value) && isRecord7(value.doc)) {
39045
+ if (isRecord8(value) && isRecord8(value.doc)) {
38995
39046
  return unwrapRichTextValue(value.doc);
38996
39047
  }
38997
- if (isRecord7(value) && value.type === "doc") {
39048
+ if (isRecord8(value) && value.type === "doc") {
38998
39049
  return {
38999
39050
  type: "doc",
39000
39051
  content: Array.isArray(value.content) ? value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) : []
@@ -39003,7 +39054,7 @@ function unwrapRichTextValue(value) {
39003
39054
  return EMPTY_SITE_BANNER_BODY;
39004
39055
  }
39005
39056
  function isTipTapNodeLike(value) {
39006
- return isRecord7(value) && typeof value.type === "string";
39057
+ return isRecord8(value) && typeof value.type === "string";
39007
39058
  }
39008
39059
  function coerceTipTapNode(value) {
39009
39060
  return {
@@ -39011,9 +39062,9 @@ function coerceTipTapNode(value) {
39011
39062
  ...Array.isArray(value.content) ? { content: value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) } : {},
39012
39063
  ...typeof value.text === "string" ? { text: value.text } : {},
39013
39064
  ...Array.isArray(value.marks) ? {
39014
- marks: value.marks.filter((mark) => isRecord7(mark) && typeof mark.type === "string").map((mark) => ({
39065
+ marks: value.marks.filter((mark) => isRecord8(mark) && typeof mark.type === "string").map((mark) => ({
39015
39066
  type: mark.type,
39016
- ...isRecord7(mark.attrs) ? { attrs: mark.attrs } : {}
39067
+ ...isRecord8(mark.attrs) ? { attrs: mark.attrs } : {}
39017
39068
  }))
39018
39069
  } : {}
39019
39070
  };
@@ -39107,7 +39158,7 @@ function collectCartLinkStats(items, depth = 0) {
39107
39158
  return result;
39108
39159
  }
39109
39160
  function isNavigationMenuValidationItem(value) {
39110
- if (!isRecord7(value)) return false;
39161
+ if (!isRecord8(value)) return false;
39111
39162
  return typeof value.label === "string";
39112
39163
  }
39113
39164