@riverbankcms/sdk 0.78.0 → 0.78.2

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 (152) hide show
  1. package/README.md +45 -43
  2. package/dist/{PreviewEditorSidebar-RIKFQ72L.mjs → PreviewEditorSidebar-4DXLYX2V.mjs} +29 -21
  3. package/dist/{PreviewEditorUI-XO7TUWKK.mjs → PreviewEditorUI-CS5P4N3P.mjs} +4 -4
  4. package/dist/SdkPreviewModeRuntime-IJDHTW4W.mjs +8 -0
  5. package/dist/_dts/ai/src/contracts/proposals.d.ts +36 -0
  6. package/dist/_dts/api/src/contentRuntime.d.ts +1 -0
  7. package/dist/_dts/api/src/endpoints.d.ts +9 -0
  8. package/dist/_dts/api/src/index.d.ts +3 -3
  9. package/dist/_dts/api/src/public/types.d.ts +1 -1
  10. package/dist/_dts/api/src/request.d.ts +3 -11
  11. package/dist/_dts/api/src/sdkConfig/contracts.d.ts +1 -0
  12. package/dist/_dts/api/src/sdkContracts.d.ts +7 -1
  13. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +10 -0
  14. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -0
  15. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +15 -19
  16. package/dist/_dts/api/src/types.d.ts +11 -26
  17. package/dist/_dts/block-form/src/fields/types.d.ts +6 -0
  18. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterList.d.ts +3 -2
  19. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRow.d.ts +6 -3
  20. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRowActions.d.ts +8 -3
  21. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/index.d.ts +1 -1
  22. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useLinearRepeaterDnd.d.ts +1 -0
  23. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useRepeaterPointerDragCapability.d.ts +1 -0
  24. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useResolvedItemLabel.d.ts +7 -0
  25. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/buildSummary.d.ts +1 -0
  26. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/index.d.ts +3 -1
  27. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterDndDomain.d.ts +1 -1
  28. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterLabelSource.d.ts +15 -0
  29. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterRowActionsDomain.d.ts +50 -0
  30. package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +591 -0
  31. package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +591 -0
  32. package/dist/_dts/blocks/src/system/blocks/cart.d.ts +591 -0
  33. package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +591 -0
  34. package/dist/_dts/blocks/src/system/blocks/collection.d.ts +591 -0
  35. package/dist/_dts/blocks/src/system/blocks/faq.d.ts +591 -0
  36. package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +591 -0
  37. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +2 -0
  38. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +47 -0
  39. package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +591 -0
  40. package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +591 -0
  41. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +591 -0
  42. package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +3 -0
  43. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +164 -0
  44. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +1 -1
  45. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +1 -1
  46. package/dist/_dts/content-editor/src/index.d.ts +1 -1
  47. package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +2 -2
  48. package/dist/_dts/content-model/src/content-types/schema.d.ts +14 -0
  49. package/dist/_dts/content-model/src/templates/bindingTypeCompatibility.d.ts +3 -1
  50. package/dist/_dts/content-model/src/templates/bindingValidation.d.ts +10 -4
  51. package/dist/_dts/content-model/src/templates/fieldPaths.d.ts +20 -0
  52. package/dist/_dts/content-model/src/templates/manifestAdapter.d.ts +5 -2
  53. package/dist/_dts/core/src/branded.d.ts +108 -85
  54. package/dist/_dts/core/src/csv-types.d.ts +2 -2
  55. package/dist/_dts/core/src/editor-state.d.ts +7 -7
  56. package/dist/_dts/core/src/participants.d.ts +2 -2
  57. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +11 -0
  58. package/dist/_dts/editor-blocks/src/blockPayload.d.ts +1 -1
  59. package/dist/_dts/media-editor/src/MediaEditor.d.ts +3 -1
  60. package/dist/_dts/media-editor/src/MediaPreview.d.ts +3 -1
  61. package/dist/_dts/media-editor/src/fieldUi.d.ts +5 -0
  62. package/dist/_dts/media-editor/src/index.d.ts +1 -1
  63. package/dist/_dts/sdk/src/cli/commands/push/consts.d.ts +1 -1
  64. package/dist/_dts/sdk/src/cli/commands/push/metadata.d.ts +2 -0
  65. package/dist/_dts/sdk/src/cli/commands/push/stale.d.ts +3 -3
  66. package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +7 -0
  67. package/dist/_dts/sdk/src/cli/commands/push.d.ts +2 -0
  68. package/dist/_dts/sdk/src/cli/content/reader.d.ts +13 -0
  69. package/dist/_dts/sdk/src/cli/content/writer.d.ts +2 -1
  70. package/dist/_dts/sdk/src/cli/helpers.d.ts +2 -0
  71. package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +6 -6
  72. package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +5 -0
  73. package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +4 -0
  74. package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +5 -2
  75. package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +10 -1
  76. package/dist/_dts/sdk/src/cli/site-commands/pushExecutionTypes.d.ts +1 -1
  77. package/dist/_dts/sdk/src/client/management/types.d.ts +6 -0
  78. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  79. package/dist/_dts/sdk/src/config/content-types.d.ts +7 -0
  80. package/dist/_dts/sdk/src/config/field-definitions.d.ts +2 -0
  81. package/dist/_dts/sdk/src/version.d.ts +1 -1
  82. package/dist/_dts/site-commands/src/commands.d.ts +3 -0
  83. package/dist/{altcha-B5XGSXP5.mjs → altcha-EKUEQ4RP.mjs} +1 -1
  84. package/dist/{chunk-NIDXI46P.mjs → chunk-4QEGTLK6.mjs} +1 -1
  85. package/dist/{chunk-TXDES5P2.mjs → chunk-6HYXHRAI.mjs} +5 -5
  86. package/dist/{chunk-SVMMM2NA.mjs → chunk-CR5HKAGU.mjs} +24 -5
  87. package/dist/{chunk-OECWLDHN.mjs → chunk-MCRQMPET.mjs} +1030 -588
  88. package/dist/{chunk-SXOLGNMX.mjs → chunk-OKMBEAXY.mjs} +1 -1
  89. package/dist/{chunk-XGB3TDIC.mjs → chunk-R7POPVJR.mjs} +2 -8
  90. package/dist/{chunk-F7RTCZYN.mjs → chunk-RGTOD4AJ.mjs} +20 -14
  91. package/dist/cli/index.mjs +681 -225
  92. package/dist/cli/init-docs/content/cli-reference.md +3 -2
  93. package/dist/cli/init-docs/content/content-management.md +2 -2
  94. package/dist/cli/init-docs/content/workflow-preview-mode.md +68 -2
  95. package/dist/client/{accordion-EVDEOUPR.mjs → accordion-PLYNJIIM.mjs} +2 -2
  96. package/dist/client/analytics.mjs +1 -1
  97. package/dist/client/{bookingForm-DIHBLC64.mjs → bookingForm-BXAP6AO7.mjs} +55 -48
  98. package/dist/client/bookings.mjs +62 -55
  99. package/dist/client/{carousel-FEBQHIWI.mjs → carousel-TRBXDHGF.mjs} +3 -3
  100. package/dist/client/{cart-7CKSXAE4.mjs → cart-Z7H3HJRS.mjs} +7 -7
  101. package/dist/client/{checkout-WKYCANLV.mjs → checkout-WAFCUBIX.mjs} +7 -7
  102. package/dist/client/{chunk-OFMSCGNY.mjs → chunk-75OUS5MT.mjs} +2 -2
  103. package/dist/client/{chunk-IVNCUVAV.mjs → chunk-AUJ5DBZJ.mjs} +18 -18
  104. package/dist/client/{chunk-36WJCERQ.mjs → chunk-CE7IBGVW.mjs} +3 -1
  105. package/dist/client/{chunk-RZDWX7QW.mjs → chunk-CWGTG37I.mjs} +1 -1
  106. package/dist/client/{chunk-YDSEG6GZ.mjs → chunk-DNRGY432.mjs} +2 -2
  107. package/dist/client/{chunk-RV6FX7UH.mjs → chunk-FUXW6VW2.mjs} +9 -9
  108. package/dist/client/{chunk-65F47D7Y.mjs → chunk-JGXPTEI2.mjs} +43 -36
  109. package/dist/client/{chunk-GUK2FPXQ.mjs → chunk-JRDUHZCT.mjs} +37 -15
  110. package/dist/client/{chunk-VPPMNXCF.mjs → chunk-UVQEJJTN.mjs} +2 -2
  111. package/dist/client/{chunk-F7LHOKEH.mjs → chunk-XSV6KW4D.mjs} +1 -1
  112. package/dist/client/{chunk-PD6NBCEY.mjs → chunk-ZFHRN6W2.mjs} +1 -1
  113. package/dist/client/{chunk-2SAVKN2M.mjs → chunk-ZI3LLBPZ.mjs} +2 -2
  114. package/dist/client/client.mjs +249 -160
  115. package/dist/client/{courseRegistration-5QF2PHKM.mjs → courseRegistration-AHFQHWIJ.mjs} +10 -10
  116. package/dist/client/{eventCalendar-4ZOSETDU.mjs → eventCalendar-LDXTV5R7.mjs} +9 -9
  117. package/dist/client/{eventCombined-WQGU7JUX.mjs → eventCombined-A4JGTNJO.mjs} +9 -9
  118. package/dist/client/{eventDetails-AYWVUJ5Y.mjs → eventDetails-4YXTZ7EG.mjs} +9 -9
  119. package/dist/client/{eventListing-NT7C6UT5.mjs → eventListing-P72TPFFM.mjs} +9 -9
  120. package/dist/client/{eventRegistration-OH24F4ZJ.mjs → eventRegistration-LSYJHGMT.mjs} +9 -9
  121. package/dist/client/{form-7L42SRBB.mjs → form-AOPYOKOW.mjs} +6 -3
  122. package/dist/client/{headerSection-OZRZNZ52.mjs → headerSection-5TFYDFVQ.mjs} +3 -3
  123. package/dist/client/hooks.mjs +78 -48
  124. package/dist/client/{locationMap-ZBXRPQ7C.mjs → locationMap-QSZ3ZVAZ.mjs} +3 -3
  125. package/dist/client/{newsletterForm-SNAGFF2I.mjs → newsletterForm-KTRHZY52.mjs} +2 -2
  126. package/dist/client/{productDetail-I46BOFGV.mjs → productDetail-N4E775RG.mjs} +7 -7
  127. package/dist/client/{productList-BOYHTYI6.mjs → productList-UGUQ2S45.mjs} +7 -7
  128. package/dist/client/rendering/client.mjs +173 -131
  129. package/dist/client/rendering/islands.mjs +19 -19
  130. package/dist/client/rendering.mjs +230 -150
  131. package/dist/client/{shop-XTXPZTKR.mjs → shop-VHSZEEQ2.mjs} +7 -7
  132. package/dist/preview-next/before-render.mjs +10 -1
  133. package/dist/preview-next/client/runtime.mjs +6 -6
  134. package/dist/preview-next/middleware.mjs +10 -1
  135. package/dist/preview-next/tailwind-sources.css +1 -0
  136. package/dist/sdk-runtime-WHPJEF5G.mjs +8 -0
  137. package/dist/server/components.mjs +101 -54
  138. package/dist/server/config-template-validation.mjs +221 -15
  139. package/dist/server/config-validation.mjs +76 -42
  140. package/dist/server/config.mjs +76 -42
  141. package/dist/server/data.mjs +77 -47
  142. package/dist/server/index.mjs +31 -10
  143. package/dist/server/next.mjs +133 -71
  144. package/dist/server/page-converter.mjs +60 -40
  145. package/dist/server/prebuild.mjs +1 -1
  146. package/dist/server/rendering/server.mjs +107 -60
  147. package/dist/server/rendering.mjs +111 -61
  148. package/dist/server/routing.mjs +93 -63
  149. package/dist/server/server.mjs +102 -57
  150. package/package.json +1 -1
  151. package/dist/SdkPreviewModeRuntime-LAGYMPNF.mjs +0 -8
  152. package/dist/sdk-runtime-ZJLKC6DR.mjs +0 -8
@@ -5015,12 +5015,12 @@ var personalitiesById = new Map(
5015
5015
  );
5016
5016
 
5017
5017
  // ../core/src/branded.ts
5018
- var asSiteId = (id) => id;
5019
- var asFormId = (id) => id;
5020
- var asPassId = (id) => id;
5021
- var asCustomerPassId = (id) => id;
5022
- var asAppointmentServiceId = (id) => id;
5023
- var asAppointmentResourceId = (id) => id;
5018
+ var unsafeAsSiteId = (id) => id;
5019
+ var unsafeAsFormId = (id) => id;
5020
+ var unsafeAsPassId = (id) => id;
5021
+ var unsafeAsCustomerPassId = (id) => id;
5022
+ var unsafeAsAppointmentServiceId = (id) => id;
5023
+ var unsafeAsAppointmentResourceId = (id) => id;
5024
5024
 
5025
5025
  // ../core/src/date-math.ts
5026
5026
  function addDaysToDate(date, dayCount) {
@@ -5389,6 +5389,8 @@ var accordionIconMotionValues = [
5389
5389
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
5390
5390
  function resolveColorStyle(color) {
5391
5391
  switch (color) {
5392
+ case void 0:
5393
+ return void 0;
5392
5394
  case "inherit":
5393
5395
  return { color: "inherit" };
5394
5396
  case "foreground":
@@ -9911,7 +9913,7 @@ function useAvailableDates({
9911
9913
  const endDate = formatLocalScheduleDate(
9912
9914
  addLocalScheduleDays(parseBookingLocalDate(today), initialDays)
9913
9915
  );
9914
- fetchDates(today, endDate, false);
9916
+ void fetchDates(today, endDate, false);
9915
9917
  }, [serviceId, fetchDates, initialDays]);
9916
9918
  useVisibleTabPolling({
9917
9919
  enabled: Boolean(serviceId && loadedRange),
@@ -9931,7 +9933,7 @@ function useAvailableDates({
9931
9933
  BOOKING_FETCH_CHUNK_DAYS
9932
9934
  )
9933
9935
  );
9934
- fetchDates(start, end, true);
9936
+ void fetchDates(start, end, true);
9935
9937
  }, [fetchDates, isLoading]);
9936
9938
  return {
9937
9939
  availableDates,
@@ -9994,7 +9996,7 @@ function useAvailableSlots({
9994
9996
  setSlots(
9995
9997
  result.slots.map((slot) => ({
9996
9998
  ...slot,
9997
- resourceId: asAppointmentResourceId(slot.resourceId)
9999
+ resourceId: unsafeAsAppointmentResourceId(slot.resourceId)
9998
10000
  }))
9999
10001
  );
10000
10002
  setHasLoaded(true);
@@ -10167,7 +10169,7 @@ function useDiscountCodeUi(options) {
10167
10169
  if (!cancelled) setDiscountsAvailableLoading(false);
10168
10170
  }
10169
10171
  }
10170
- checkDiscountAvailability();
10172
+ void checkDiscountAvailability();
10171
10173
  return () => {
10172
10174
  cancelled = true;
10173
10175
  };
@@ -10443,7 +10445,7 @@ function formatScheduleDate(isoString, locale) {
10443
10445
  }
10444
10446
 
10445
10447
  // ../blocks/src/system/runtime/nodes/booking-form.headless.state.ts
10446
- var asBookingFieldId = (id) => id;
10448
+ var unsafeAsBookingFieldId = (id) => id;
10447
10449
  function createEmptyBookingValidationErrors() {
10448
10450
  return { formError: null, fieldErrors: {} };
10449
10451
  }
@@ -10513,16 +10515,16 @@ function toOptionalBrandedId(value, brand) {
10513
10515
  return trimmed ? brand(trimmed) : void 0;
10514
10516
  }
10515
10517
  function toOptionalFormId(value) {
10516
- return toOptionalBrandedId(value, asFormId);
10518
+ return toOptionalBrandedId(value, unsafeAsFormId);
10517
10519
  }
10518
10520
  function toOptionalAppointmentServiceId(value) {
10519
- return toOptionalBrandedId(value, asAppointmentServiceId);
10521
+ return toOptionalBrandedId(value, unsafeAsAppointmentServiceId);
10520
10522
  }
10521
10523
  function toOptionalAppointmentResourceId(value) {
10522
- return toOptionalBrandedId(value, asAppointmentResourceId);
10524
+ return toOptionalBrandedId(value, unsafeAsAppointmentResourceId);
10523
10525
  }
10524
10526
  function toOptionalCustomerPassId(value) {
10525
- return toOptionalBrandedId(value, asCustomerPassId);
10527
+ return toOptionalBrandedId(value, unsafeAsCustomerPassId);
10526
10528
  }
10527
10529
  function isBookingFieldValue(value) {
10528
10530
  return value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean" || Array.isArray(value) && value.every((item) => typeof item === "string");
@@ -10676,7 +10678,7 @@ function toBookingSlotView(slot) {
10676
10678
  key: `${slot.startAt}|${slot.endAt}|${slot.resourceId}`,
10677
10679
  startAt: slot.startAt,
10678
10680
  endAt: slot.endAt,
10679
- resourceId: asAppointmentResourceId(slot.resourceId),
10681
+ resourceId: unsafeAsAppointmentResourceId(slot.resourceId),
10680
10682
  ...slot.resourceName ? { resourceName: slot.resourceName } : {},
10681
10683
  ...slot.label ? { label: slot.label } : {}
10682
10684
  };
@@ -10798,31 +10800,30 @@ function validateBookingField(field, value) {
10798
10800
  }
10799
10801
  if (isBlankFieldValue(value)) return null;
10800
10802
  const strValue = typeof value === "string" ? value : String(value);
10801
- switch (field.type) {
10802
- case "email":
10803
- return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(strValue) ? null : "Please enter a valid email address";
10804
- case "url":
10805
- try {
10806
- new URL(strValue);
10807
- return null;
10808
- } catch {
10809
- return "Please enter a valid URL";
10810
- }
10811
- case "tel":
10812
- return /^[+\d\s\-()]+$/.test(strValue) ? null : "Please enter a valid phone number";
10813
- case "number": {
10814
- const num = Number(value);
10815
- if (Number.isNaN(num)) return "Please enter a valid number";
10816
- if (field.min !== void 0 && num < field.min) {
10817
- return `Value must be at least ${field.min}`;
10818
- }
10819
- if (field.max !== void 0 && num > field.max) {
10820
- return `Value must be at most ${field.max}`;
10821
- }
10803
+ if (field.type === "email") {
10804
+ return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(strValue) ? null : "Please enter a valid email address";
10805
+ }
10806
+ if (field.type === "url") {
10807
+ try {
10808
+ new URL(strValue);
10822
10809
  return null;
10810
+ } catch {
10811
+ return "Please enter a valid URL";
10823
10812
  }
10824
- default:
10825
- break;
10813
+ }
10814
+ if (field.type === "tel") {
10815
+ return /^[+\d\s\-()]+$/.test(strValue) ? null : "Please enter a valid phone number";
10816
+ }
10817
+ if (field.type === "number") {
10818
+ const num = Number(value);
10819
+ if (Number.isNaN(num)) return "Please enter a valid number";
10820
+ if (field.min !== void 0 && num < field.min) {
10821
+ return `Value must be at least ${field.min}`;
10822
+ }
10823
+ if (field.max !== void 0 && num > field.max) {
10824
+ return `Value must be at most ${field.max}`;
10825
+ }
10826
+ return null;
10826
10827
  }
10827
10828
  if (typeof value === "string") {
10828
10829
  if (field.minLength && value.length < field.minLength) {
@@ -10922,7 +10923,7 @@ function buildBookingAvailabilityQuery(input) {
10922
10923
  }
10923
10924
  function deriveBookingFieldViews(input) {
10924
10925
  return (input.form?.schema?.fields ?? []).map((field) => {
10925
- const fieldId = asBookingFieldId(field.id);
10926
+ const fieldId = unsafeAsBookingFieldId(field.id);
10926
10927
  const inputId = `${input.idPrefix}-${fieldId}`;
10927
10928
  const helpTextId = field.helpText ? `${inputId}-help` : null;
10928
10929
  const fieldValue = input.values[field.id] ?? null;
@@ -11045,7 +11046,7 @@ function getAppointmentBookingOverrideInput(props) {
11045
11046
  return {
11046
11047
  ok: true,
11047
11048
  value: {
11048
- siteId: asSiteId(props.siteId),
11049
+ siteId: unsafeAsSiteId(props.siteId),
11049
11050
  apiBaseUrl: props.apiBaseUrl,
11050
11051
  portalToken: props.portalToken ?? null,
11051
11052
  formId,
@@ -11147,8 +11148,8 @@ function resolveAppointmentPackagesModel(input) {
11147
11148
  function toHeadlessEligibleAppointmentPackage(appointmentPackage) {
11148
11149
  return {
11149
11150
  ...appointmentPackage,
11150
- customerPassId: asCustomerPassId(appointmentPackage.customerPassId),
11151
- passId: asPassId(appointmentPackage.passId)
11151
+ customerPassId: unsafeAsCustomerPassId(appointmentPackage.customerPassId),
11152
+ passId: unsafeAsPassId(appointmentPackage.passId)
11152
11153
  };
11153
11154
  }
11154
11155
  function resolveHeadlessBookingStatus(input) {
@@ -11231,7 +11232,7 @@ function HeadlessBookingProvider({
11231
11232
  }
11232
11233
  function useHeadlessBookingFlow(options) {
11233
11234
  const viewerTimeZone = options.viewerTimeZone ?? getRuntimeTimeZone();
11234
- const formKey = asFormId(options.formId);
11235
+ const formKey = unsafeAsFormId(options.formId);
11235
11236
  const defaultServiceId = toOptionalAppointmentServiceId(
11236
11237
  options.initialServiceId ?? resolveDefaultBookingServiceId(options.form, options.services) ?? void 0
11237
11238
  );
@@ -11397,7 +11398,7 @@ function useHeadlessBookingFlow(options) {
11397
11398
  setResourcesState({
11398
11399
  tag: "loaded",
11399
11400
  value: (result.options ?? []).map((option) => ({
11400
- id: asAppointmentResourceId(option.id),
11401
+ id: unsafeAsAppointmentResourceId(option.id),
11401
11402
  label: option.label
11402
11403
  }))
11403
11404
  });
@@ -11613,11 +11614,11 @@ function useHeadlessBookingFlow(options) {
11613
11614
  () => ({
11614
11615
  selectService: (serviceId) => dispatch({
11615
11616
  type: "service-selected",
11616
- serviceId: asAppointmentServiceId(serviceId)
11617
+ serviceId: unsafeAsAppointmentServiceId(serviceId)
11617
11618
  }),
11618
11619
  selectResource: (resourceId) => dispatch({
11619
11620
  type: "resource-selected",
11620
- resourceId: resourceId ? asAppointmentResourceId(resourceId) : null
11621
+ resourceId: resourceId ? unsafeAsAppointmentResourceId(resourceId) : null
11621
11622
  }),
11622
11623
  selectDate: (date) => dispatch({ type: "date-selected", date }),
11623
11624
  selectSlot: (slot) => dispatch({
@@ -11626,14 +11627,14 @@ function useHeadlessBookingFlow(options) {
11626
11627
  }),
11627
11628
  updateField: (fieldId, value) => dispatch({
11628
11629
  type: "field-updated",
11629
- fieldId: asBookingFieldId(fieldId),
11630
+ fieldId: unsafeAsBookingFieldId(fieldId),
11630
11631
  value
11631
11632
  }),
11632
- markFieldTouched: (fieldId) => dispatch({ type: "field-touched", fieldId: asBookingFieldId(fieldId) }),
11633
+ markFieldTouched: (fieldId) => dispatch({ type: "field-touched", fieldId: unsafeAsBookingFieldId(fieldId) }),
11633
11634
  selectPaymentOption: (kind) => dispatch({ type: "payment-option-selected", kind }),
11634
11635
  selectAppointmentPackage: (packageId) => dispatch({
11635
11636
  type: "appointment-package-selected",
11636
- packageId: packageId ? asCustomerPassId(packageId) : null
11637
+ packageId: packageId ? unsafeAsCustomerPassId(packageId) : null
11637
11638
  }),
11638
11639
  setDiscountCode: (code) => {
11639
11640
  dispatch({ type: "discount-code-changed", code });
@@ -11976,7 +11977,7 @@ function usePolling(config) {
11976
11977
  timeoutRef.current = setTimeout(doPoll, pollInterval);
11977
11978
  }
11978
11979
  };
11979
- doPoll();
11980
+ void doPoll();
11980
11981
  }, [poll]);
11981
11982
  useEffect7(() => {
11982
11983
  if (!config) {
@@ -12825,7 +12826,7 @@ function DefaultFieldInput({
12825
12826
  ] }, option.value)) });
12826
12827
  case "checkbox":
12827
12828
  if (field.field.options && field.field.options.length > 1) {
12828
- const checkedValues = Array.isArray(value) ? value : [];
12829
+ const checkedValues = toStringArray(value);
12829
12830
  return /* @__PURE__ */ jsx10("div", { className: "rb-space-y-2", children: field.field.options.map((option) => /* @__PURE__ */ jsxs7("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
12830
12831
  /* @__PURE__ */ jsx10(
12831
12832
  "input",
@@ -12920,7 +12921,10 @@ function DefaultFieldInput({
12920
12921
  className: "form-input"
12921
12922
  }
12922
12923
  );
12923
- default:
12924
+ case "text":
12925
+ case "email":
12926
+ case "tel":
12927
+ case "url":
12924
12928
  return /* @__PURE__ */ jsx10(
12925
12929
  "input",
12926
12930
  {
@@ -12937,6 +12941,9 @@ function DefaultFieldInput({
12937
12941
  );
12938
12942
  }
12939
12943
  }
12944
+ function toStringArray(value) {
12945
+ return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
12946
+ }
12940
12947
  function DefaultBookingDiscount({
12941
12948
  booking
12942
12949
  }) {
@@ -13028,7 +13035,7 @@ function collapseHeadlessSlotsForDisplay(input) {
13028
13035
  visibleSlots.push({
13029
13036
  startAt: slot.startAt,
13030
13037
  endAt: slot.endAt,
13031
- resourceId: asAppointmentResourceId(slot.resourceId)
13038
+ resourceId: unsafeAsAppointmentResourceId(slot.resourceId)
13032
13039
  });
13033
13040
  }
13034
13041
  return visibleSlots;
@@ -13950,7 +13957,7 @@ function useBookingFormConfig(siteId, formId) {
13950
13957
  }
13951
13958
  }
13952
13959
  }
13953
- loadFormAndServices();
13960
+ void loadFormAndServices();
13954
13961
  return () => {
13955
13962
  mounted = false;
13956
13963
  };
@@ -1,7 +1,7 @@
1
- import { normalizeCarouselProps, CarouselNodeClient } from './chunk-OFMSCGNY.mjs';
1
+ import { normalizeCarouselProps, CarouselNodeClient } from './chunk-75OUS5MT.mjs';
2
2
  import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
3
- import { defineIslandPropsDecoder } from './chunk-65F47D7Y.mjs';
4
- import './chunk-IVNCUVAV.mjs';
3
+ import { defineIslandPropsDecoder } from './chunk-JGXPTEI2.mjs';
4
+ import './chunk-AUJ5DBZJ.mjs';
5
5
  import { jsx } from 'react/jsx-runtime';
6
6
 
7
7
  var decode = defineIslandPropsDecoder("carousel");
@@ -1,15 +1,15 @@
1
- import { mountShopBlockIsland, CartClient } from './chunk-RV6FX7UH.mjs';
2
- import './chunk-RZDWX7QW.mjs';
3
- import './chunk-OFMSCGNY.mjs';
1
+ import { mountShopBlockIsland, CartClient } from './chunk-FUXW6VW2.mjs';
2
+ import './chunk-CWGTG37I.mjs';
3
+ import './chunk-75OUS5MT.mjs';
4
4
  import './chunk-I2MMZO53.mjs';
5
- import './chunk-PD6NBCEY.mjs';
6
- import './chunk-VPPMNXCF.mjs';
5
+ import './chunk-ZFHRN6W2.mjs';
6
+ import './chunk-UVQEJJTN.mjs';
7
7
  import './chunk-3DCJ45Z2.mjs';
8
8
  import './chunk-3PEDD5KJ.mjs';
9
9
  import './chunk-UDNSI5PY.mjs';
10
10
  import './chunk-N7PBWBWQ.mjs';
11
- import { defineIslandPropsDecoder } from './chunk-65F47D7Y.mjs';
12
- import './chunk-IVNCUVAV.mjs';
11
+ import { defineIslandPropsDecoder } from './chunk-JGXPTEI2.mjs';
12
+ import './chunk-AUJ5DBZJ.mjs';
13
13
 
14
14
  // src/rendering/islands/enhancers/cart.tsx
15
15
  var decode = defineIslandPropsDecoder("cart");
@@ -1,15 +1,15 @@
1
- import { mountShopBlockIsland, CheckoutClient } from './chunk-RV6FX7UH.mjs';
2
- import './chunk-RZDWX7QW.mjs';
3
- import './chunk-OFMSCGNY.mjs';
1
+ import { mountShopBlockIsland, CheckoutClient } from './chunk-FUXW6VW2.mjs';
2
+ import './chunk-CWGTG37I.mjs';
3
+ import './chunk-75OUS5MT.mjs';
4
4
  import './chunk-I2MMZO53.mjs';
5
- import './chunk-PD6NBCEY.mjs';
6
- import './chunk-VPPMNXCF.mjs';
5
+ import './chunk-ZFHRN6W2.mjs';
6
+ import './chunk-UVQEJJTN.mjs';
7
7
  import './chunk-3DCJ45Z2.mjs';
8
8
  import './chunk-3PEDD5KJ.mjs';
9
9
  import './chunk-UDNSI5PY.mjs';
10
10
  import './chunk-N7PBWBWQ.mjs';
11
- import { defineIslandPropsDecoder } from './chunk-65F47D7Y.mjs';
12
- import './chunk-IVNCUVAV.mjs';
11
+ import { defineIslandPropsDecoder } from './chunk-JGXPTEI2.mjs';
12
+ import './chunk-AUJ5DBZJ.mjs';
13
13
 
14
14
  // src/rendering/islands/enhancers/checkout.tsx
15
15
  var decode = defineIslandPropsDecoder("checkout");
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { ChevronLeft, ChevronRight } from './chunk-65F47D7Y.mjs';
3
- import { clsx_default } from './chunk-IVNCUVAV.mjs';
2
+ import { ChevronLeft, ChevronRight } from './chunk-JGXPTEI2.mjs';
3
+ import { clsx_default } from './chunk-AUJ5DBZJ.mjs';
4
4
  import React, { useRef, useState, useCallback, useEffect } from 'react';
5
5
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
6
6
 
@@ -5,13 +5,21 @@ function assertNever(value, message = "Unexpected variant") {
5
5
  throw new Error(`${message}: ${String(value)}`);
6
6
  }
7
7
 
8
+ // ../core/src/result.ts
9
+ function ok(value) {
10
+ return { ok: true, value };
11
+ }
12
+ function err(error) {
13
+ return { ok: false, error };
14
+ }
15
+
8
16
  // ../core/src/branded.ts
9
- var asMediaAssetId = (id) => id;
10
- var asFormId = (id) => id;
11
- var asPassId = (id) => id;
12
- var asCustomerPassId = (id) => id;
13
- var asAppointmentServiceId = (id) => id;
14
- var asAppointmentResourceId = (id) => id;
17
+ var unsafeAsMediaAssetId = (id) => id;
18
+ var unsafeAsFormId = (id) => id;
19
+ var unsafeAsPassId = (id) => id;
20
+ var unsafeAsCustomerPassId = (id) => id;
21
+ var unsafeAsAppointmentServiceId = (id) => id;
22
+ var unsafeAsAppointmentResourceId = (id) => id;
15
23
 
16
24
  // ../core/src/date-math.ts
17
25
  function addDaysToDate(date, dayCount) {
@@ -148,14 +156,6 @@ function assertNever3(value) {
148
156
  throw new Error(`Unexpected value: ${String(value)}`);
149
157
  }
150
158
 
151
- // ../core/src/result.ts
152
- function ok(value) {
153
- return { ok: true, value };
154
- }
155
- function err(error) {
156
- return { ok: false, error };
157
- }
158
-
159
159
  // ../core/src/booking-date-time.ts
160
160
  var DEFAULT_LOCALE = "en-US";
161
161
  var FALLBACK_TIMEZONE = "UTC";
@@ -715,14 +715,14 @@ function rotateNormalizedPoint(point, rotation) {
715
715
  const x = point.x;
716
716
  const y = point.y;
717
717
  switch (rotation) {
718
+ case 0:
719
+ return { x, y };
718
720
  case 90:
719
721
  return { x: 1 - y, y: x };
720
722
  case 180:
721
723
  return { x: 1 - x, y: 1 - y };
722
724
  case 270:
723
725
  return { x: y, y: 1 - x };
724
- default:
725
- return { x, y };
726
726
  }
727
727
  }
728
728
 
@@ -1379,7 +1379,7 @@ function getProxyImageUrl(value, options, transformAspectRatio, resolved) {
1379
1379
  if (!shouldUseExplicitRectProxy(value, options, resolvedTransform, sourceWidth, sourceHeight)) return void 0;
1380
1380
  const params = buildProxyTransformParams(options, resolvedTransform);
1381
1381
  const proxyBasePath = getImageProxyBasePath();
1382
- const proxyUrl = getImageUrl({ id: asMediaAssetId(value.assetId) }, params, proxyBasePath);
1382
+ const proxyUrl = getImageUrl({ id: unsafeAsMediaAssetId(value.assetId) }, params, proxyBasePath);
1383
1383
  debugMediaNodeLog("resolve:proxy-img", { assetId: value.assetId, params, proxyBasePath, proxyUrl });
1384
1384
  return proxyUrl;
1385
1385
  }
@@ -1962,4 +1962,4 @@ function scaleCssLengthToken(token, factor) {
1962
1962
  return `${rounded}${unit}`;
1963
1963
  }
1964
1964
 
1965
- export { DEFAULT_BOOKING_TIME_ZONE, ImagePresets, MediaPlaceholder, addIntervalPreservingMonthAnchor, addLocalScheduleDays, asAppointmentResourceId, asAppointmentServiceId, asCustomerPassId, asFormId, asPassId, assertNever, backgroundColorStyle, borderColorStyle, buildResolveImageUrlContext, clampConfiguredAmount, clsx_default, computeMediaTransformStyle, err, formatBookingDate, formatBookingDateParts, formatBookingDateTime, formatBookingInstant, formatBookingTime, formatLocalScheduleDate, getBookingInstalmentDepositRefundability, getBookingInstalmentPlanIntervalCount, getBookingLocalDateKey, getCurrentResolveImageUrlContext, mergeStyles, normalizeLocationAddressText, ok, omitZeroAmountFutureRows, parseAspectRatioValue, parseBookingLocalDate, parseColorTokenParts, renderAudio, renderVideo, resolveBookingTimeZoneId, resolveFlexibleBalanceDueAt, resolveFlexibleBalanceInitialPaymentCents, resolveImageUrlWithContext, resolveMediaNodeResponsiveImage, resolvePlanningDateInput, rgbColorValue, setContextResolveImageUrlContext, splitAmountWithRemainderInFirst, textColorStyle, toBookingTimeZone, toLocationCoordinates, toScheduledBookingDateRange, toScheduledBookingDateTime };
1965
+ export { DEFAULT_BOOKING_TIME_ZONE, ImagePresets, MediaPlaceholder, addIntervalPreservingMonthAnchor, addLocalScheduleDays, assertNever, backgroundColorStyle, borderColorStyle, buildResolveImageUrlContext, clampConfiguredAmount, clsx_default, computeMediaTransformStyle, err, formatBookingDate, formatBookingDateParts, formatBookingDateTime, formatBookingInstant, formatBookingTime, formatLocalScheduleDate, getBookingInstalmentDepositRefundability, getBookingInstalmentPlanIntervalCount, getBookingLocalDateKey, getCurrentResolveImageUrlContext, mergeStyles, normalizeLocationAddressText, ok, omitZeroAmountFutureRows, parseAspectRatioValue, parseBookingLocalDate, parseColorTokenParts, renderAudio, renderVideo, resolveBookingTimeZoneId, resolveFlexibleBalanceDueAt, resolveFlexibleBalanceInitialPaymentCents, resolveImageUrlWithContext, resolveMediaNodeResponsiveImage, resolvePlanningDateInput, rgbColorValue, setContextResolveImageUrlContext, splitAmountWithRemainderInFirst, textColorStyle, toBookingTimeZone, toLocationCoordinates, toScheduledBookingDateRange, toScheduledBookingDateTime, unsafeAsAppointmentResourceId, unsafeAsAppointmentServiceId, unsafeAsCustomerPassId, unsafeAsFormId, unsafeAsPassId };
@@ -1,8 +1,10 @@
1
- import { clsx_default } from './chunk-IVNCUVAV.mjs';
1
+ import { clsx_default } from './chunk-AUJ5DBZJ.mjs';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
 
4
4
  function resolveColorStyle(color) {
5
5
  switch (color) {
6
+ case void 0:
7
+ return void 0;
6
8
  case "inherit":
7
9
  return { color: "inherit" };
8
10
  case "foreground":
@@ -1,4 +1,4 @@
1
- import { EMPTY_COMMERCE_CART_STATE, parseStoredCommerceCartState, reduceCommerceCart, buildPassCartItem } from './chunk-65F47D7Y.mjs';
1
+ import { EMPTY_COMMERCE_CART_STATE, parseStoredCommerceCartState, reduceCommerceCart, buildPassCartItem } from './chunk-JGXPTEI2.mjs';
2
2
  import * as React from 'react';
3
3
 
4
4
  var EMPTY_STATE = EMPTY_COMMERCE_CART_STATE;
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { assertNever11 } from './chunk-65F47D7Y.mjs';
2
+ import { assertNever11 } from './chunk-JGXPTEI2.mjs';
3
3
  import { useReducer, useRef, useCallback, useEffect } from 'react';
4
4
 
5
5
  // ../blocks/src/system/runtime/hooks/usePolling.state.ts
@@ -153,7 +153,7 @@ function usePolling(config) {
153
153
  timeoutRef.current = setTimeout(doPoll, pollInterval);
154
154
  }
155
155
  };
156
- doPoll();
156
+ void doPoll();
157
157
  }, [poll]);
158
158
  useEffect(() => {
159
159
  if (!config) {
@@ -1,14 +1,14 @@
1
1
  "use client";
2
- import { addPassToCommerceCart, useCommerceCart } from './chunk-RZDWX7QW.mjs';
3
- import { CarouselNodeClient } from './chunk-OFMSCGNY.mjs';
2
+ import { addPassToCommerceCart, useCommerceCart } from './chunk-CWGTG37I.mjs';
3
+ import { CarouselNodeClient } from './chunk-75OUS5MT.mjs';
4
4
  import { isRecord } from './chunk-I2MMZO53.mjs';
5
- import { useDiscountCodeUi } from './chunk-PD6NBCEY.mjs';
6
- import { createBodyThemePortalRoot, consumeSearchParams, scrollToBlock, TerminalPanel, StateIcon, CheckIcon, CrossIcon, ActionRow, DiscountCodeDisclosure, consumeSearchParam, buildCheckoutReturnUrls } from './chunk-VPPMNXCF.mjs';
5
+ import { useDiscountCodeUi } from './chunk-ZFHRN6W2.mjs';
6
+ import { createBodyThemePortalRoot, consumeSearchParams, scrollToBlock, TerminalPanel, StateIcon, CheckIcon, CrossIcon, ActionRow, DiscountCodeDisclosure, consumeSearchParam, buildCheckoutReturnUrls } from './chunk-UVQEJJTN.mjs';
7
7
  import { ModalShell, resolveDedicatedCheckoutPath } from './chunk-3PEDD5KJ.mjs';
8
8
  import { useBlockApi, FeedbackMessage, BlockApiProvider } from './chunk-UDNSI5PY.mjs';
9
9
  import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
10
- import { themeButtonClassName, formatCommercePrice, formatInterval, getShopDisplayForItems, deriveCommerceCheckoutState, buildProductDetailDisplay, productItemKey, buildProductCartItem, buildProductCardDisplay, assertNever11, reportWorkflowError, clearWorkflowFeedback } from './chunk-65F47D7Y.mjs';
11
- import { assertNever, ok, err, getCurrentResolveImageUrlContext, resolveImageUrlWithContext, ImagePresets } from './chunk-IVNCUVAV.mjs';
10
+ import { themeButtonClassName, formatCommercePrice, formatInterval, getShopDisplayForItems, deriveCommerceCheckoutState, buildProductDetailDisplay, productItemKey, buildProductCartItem, buildProductCardDisplay, assertNever11, reportWorkflowError, clearWorkflowFeedback } from './chunk-JGXPTEI2.mjs';
11
+ import { assertNever, ok, err, getCurrentResolveImageUrlContext, resolveImageUrlWithContext, ImagePresets } from './chunk-AUJ5DBZJ.mjs';
12
12
  import * as React3 from 'react';
13
13
  import React3__default, { useState, useRef, useCallback, useEffect } from 'react';
14
14
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -704,7 +704,7 @@ function useCartDiscountUiState(api, plan) {
704
704
  }
705
705
  }
706
706
  }
707
- loadCartDiscountAvailability();
707
+ void loadCartDiscountAvailability();
708
708
  return () => {
709
709
  cancelled = true;
710
710
  };
@@ -1549,10 +1549,10 @@ function PassesMembershipsController({ render }) {
1549
1549
  });
1550
1550
  const handleFormSubmit = useCallback((event) => {
1551
1551
  event.preventDefault();
1552
- submitCheckout(false);
1552
+ void submitCheckout(false);
1553
1553
  }, [submitCheckout]);
1554
1554
  const handleConfirmDuplicate = useCallback(() => {
1555
- submitCheckout(true);
1555
+ void submitCheckout(true);
1556
1556
  }, [submitCheckout]);
1557
1557
  return /* @__PURE__ */ jsxs(Fragment, { children: [
1558
1558
  /* @__PURE__ */ jsx("div", { ref: shopRootRef, children: /* @__PURE__ */ jsx(
@@ -1,4 +1,4 @@
1
- import { parseAspectRatioValue, parseColorTokenParts, toBookingTimeZone, resolvePlanningDateInput, formatBookingDate, toScheduledBookingDateTime, formatBookingTime, toScheduledBookingDateRange, formatBookingDateParts, ImagePresets, getCurrentResolveImageUrlContext, renderVideo, renderAudio, resolveMediaNodeResponsiveImage, MediaPlaceholder, computeMediaTransformStyle, rgbColorValue } from './chunk-IVNCUVAV.mjs';
1
+ import { parseAspectRatioValue, parseColorTokenParts, toBookingTimeZone, resolvePlanningDateInput, formatBookingDate, toScheduledBookingDateTime, formatBookingTime, toScheduledBookingDateRange, formatBookingDateParts, ImagePresets, getCurrentResolveImageUrlContext, renderVideo, renderAudio, resolveMediaNodeResponsiveImage, MediaPlaceholder, computeMediaTransformStyle, rgbColorValue } from './chunk-AUJ5DBZJ.mjs';
2
2
  import z2, { z } from 'zod';
3
3
  import { jsxs, jsx } from 'react/jsx-runtime';
4
4
  import { forwardRef, createElement } from 'react';
@@ -1899,8 +1899,8 @@ var eventSurfaceScopeValues = [
1899
1899
  "custom"
1900
1900
  ];
1901
1901
  var eventScheduleScopeValues = ["any", "recurring", "oneOff"];
1902
- var asEventCategoryId = (value) => value;
1903
- var asVenueId = (value) => value;
1902
+ var unsafeAsEventCategoryId = (value) => value;
1903
+ var unsafeAsVenueId = (value) => value;
1904
1904
  function normalizeEventBlockKind(value) {
1905
1905
  return value === "courses" || value === "events" ? value : "all";
1906
1906
  }
@@ -1926,10 +1926,10 @@ function normalizeEventCategoryIds(value) {
1926
1926
  if (Array.isArray(value)) {
1927
1927
  return normalizeIdList(
1928
1928
  value.filter((entry) => typeof entry === "string")
1929
- ).map(asEventCategoryId);
1929
+ ).map(unsafeAsEventCategoryId);
1930
1930
  }
1931
1931
  if (typeof value === "string") {
1932
- return normalizeIdList(value.split(",")).map(asEventCategoryId);
1932
+ return normalizeIdList(value.split(",")).map(unsafeAsEventCategoryId);
1933
1933
  }
1934
1934
  return [];
1935
1935
  }
@@ -1942,7 +1942,7 @@ function normalizeEventVenueId(value) {
1942
1942
  return null;
1943
1943
  }
1944
1944
  const trimmed = value.trim();
1945
- return trimmed ? asVenueId(trimmed) : null;
1945
+ return trimmed ? unsafeAsVenueId(trimmed) : null;
1946
1946
  }
1947
1947
  function normalizeEventStaffMemberId(value) {
1948
1948
  if (typeof value !== "string") {
@@ -2049,6 +2049,8 @@ var uiSchema = z.object({
2049
2049
  mediaPickerAutoOpen: z.boolean().optional(),
2050
2050
  showMediaPreview: z.boolean().optional(),
2051
2051
  showMediaOverlayActions: z.boolean().optional(),
2052
+ mediaPreviewMaxWidth: z.enum(["xs", "sm", "md", "none"]).optional(),
2053
+ preventMediaPreviewUpscale: z.boolean().optional(),
2052
2054
  mediaDelivery: mediaDeliverySchema.optional(),
2053
2055
  mediaDeliveryByVariant: z.record(z.string(), mediaDeliverySchema).optional(),
2054
2056
  // Optional input hints for validators/widgets
@@ -2298,6 +2300,9 @@ var repeaterFieldSchema = baseFieldSchema.extend({
2298
2300
  type: z.literal("repeater"),
2299
2301
  itemLabel: z.string().default("Item"),
2300
2302
  itemLabelSource: z.string().optional(),
2303
+ showSummary: z.boolean().optional(),
2304
+ summaryFields: z.string().array().optional(),
2305
+ summaryMaxChars: z.number().int().positive().optional(),
2301
2306
  minItems: z.number().int().min(0).default(0),
2302
2307
  maxItems: z.number().int().positive().optional(),
2303
2308
  // Monomorphic mode
@@ -2643,47 +2648,48 @@ function scopeFragmentLayout(fragment, scope) {
2643
2648
  function prefixFieldId(field, scope) {
2644
2649
  const cloned = cloneFieldDefinition(field);
2645
2650
  cloned.id = `${scope}.${field.id}`;
2646
- cloned.defaultValue = cloneUnknown(cloned.defaultValue);
2651
+ const defaultValue = cloned.defaultValue;
2652
+ cloned.defaultValue = cloneUnknown(defaultValue);
2647
2653
  cloned.visibleRoles = cloned.visibleRoles ? [...cloned.visibleRoles] : void 0;
2648
2654
  cloned.ui = cloneUnknown(cloned.ui);
2649
2655
  return cloned;
2650
2656
  }
2651
2657
  function cloneFieldDefinition(field) {
2652
- switch (field.type) {
2653
- case "repeater":
2654
- if (field.polymorphic && field.itemTypes) {
2655
- return {
2656
- ...field,
2657
- polymorphic: true,
2658
- itemTypes: Object.fromEntries(
2659
- Object.entries(field.itemTypes).map(([key, itemType]) => [
2660
- key,
2661
- {
2662
- ...itemType,
2663
- fields: itemType.fields.map(cloneFieldDefinition)
2664
- }
2665
- ])
2666
- )
2667
- };
2668
- } else if (field.schema) {
2669
- return {
2670
- ...field,
2671
- schema: {
2672
- fields: field.schema.fields.map(cloneFieldDefinition)
2673
- }
2674
- };
2675
- }
2676
- return { ...field };
2677
- case "group":
2658
+ if (field.type === "repeater") {
2659
+ if (field.polymorphic && field.itemTypes) {
2660
+ return {
2661
+ ...field,
2662
+ polymorphic: true,
2663
+ itemTypes: Object.fromEntries(
2664
+ Object.entries(field.itemTypes).map(([key, itemType]) => [
2665
+ key,
2666
+ {
2667
+ ...itemType,
2668
+ fields: itemType.fields.map(cloneFieldDefinition)
2669
+ }
2670
+ ])
2671
+ )
2672
+ };
2673
+ }
2674
+ if (field.schema) {
2678
2675
  return {
2679
2676
  ...field,
2680
2677
  schema: {
2681
2678
  fields: field.schema.fields.map(cloneFieldDefinition)
2682
2679
  }
2683
2680
  };
2684
- default:
2685
- return { ...field };
2681
+ }
2682
+ return { ...field };
2683
+ }
2684
+ if (field.type === "group") {
2685
+ return {
2686
+ ...field,
2687
+ schema: {
2688
+ fields: field.schema.fields.map(cloneFieldDefinition)
2689
+ }
2690
+ };
2686
2691
  }
2692
+ return { ...field };
2687
2693
  }
2688
2694
  function cloneUnknown(value) {
2689
2695
  if (value == null || typeof value !== "object") {
@@ -3466,7 +3472,8 @@ function createBlockManifest(config) {
3466
3472
  return augmentManifest(manifest);
3467
3473
  }
3468
3474
  function normalizeBlockLayout(layout) {
3469
- return Array.isArray(layout) ? [...layout] : layout;
3475
+ const rawLayout = layout;
3476
+ return Array.isArray(rawLayout) ? rawLayout : rawLayout;
3470
3477
  }
3471
3478
  function deriveComponentName(id) {
3472
3479
  const base = id.replace(/^block\./, "");