@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
@@ -1796,7 +1796,16 @@ var ENDPOINT_DEFINITIONS = {
1796
1796
  revalidate: 60,
1797
1797
  tags: ["site-{siteId}", "content-{siteId}-{type}"],
1798
1798
  auth: "user",
1799
- responseKind: "json"
1799
+ responseKind: "json",
1800
+ errors: ["validation:invalid_input", "resource:not_found", "resource:conflict", "server:internal_error"]
1801
+ },
1802
+ reorderContentEntries: {
1803
+ path: "/sites/{siteId}/content/{type}/order",
1804
+ method: "POST",
1805
+ tags: ["site-{siteId}", "content-{siteId}-{type}"],
1806
+ auth: "user",
1807
+ responseKind: "json",
1808
+ errors: ["validation:invalid_input", "resource:not_found", "resource:conflict", "server:internal_error"]
1800
1809
  },
1801
1810
  getContentTemplate: {
1802
1811
  path: "/sites/{siteId}/content/types/{type}/template",
@@ -6540,14 +6549,14 @@ function rotateNormalizedPoint(point, rotation) {
6540
6549
  const x = point.x;
6541
6550
  const y = point.y;
6542
6551
  switch (rotation) {
6552
+ case 0:
6553
+ return { x, y };
6543
6554
  case 90:
6544
6555
  return { x: 1 - y, y: x };
6545
6556
  case 180:
6546
6557
  return { x: 1 - x, y: 1 - y };
6547
6558
  case 270:
6548
6559
  return { x: y, y: 1 - x };
6549
- default:
6550
- return { x, y };
6551
6560
  }
6552
6561
  }
6553
6562
 
@@ -6840,6 +6849,8 @@ var uiSchema = z4.object({
6840
6849
  mediaPickerAutoOpen: z4.boolean().optional(),
6841
6850
  showMediaPreview: z4.boolean().optional(),
6842
6851
  showMediaOverlayActions: z4.boolean().optional(),
6852
+ mediaPreviewMaxWidth: z4.enum(["xs", "sm", "md", "none"]).optional(),
6853
+ preventMediaPreviewUpscale: z4.boolean().optional(),
6843
6854
  mediaDelivery: mediaDeliverySchema.optional(),
6844
6855
  mediaDeliveryByVariant: z4.record(z4.string(), mediaDeliverySchema).optional(),
6845
6856
  // Optional input hints for validators/widgets
@@ -7089,6 +7100,9 @@ var repeaterFieldSchema = baseFieldSchema.extend({
7089
7100
  type: z4.literal("repeater"),
7090
7101
  itemLabel: z4.string().default("Item"),
7091
7102
  itemLabelSource: z4.string().optional(),
7103
+ showSummary: z4.boolean().optional(),
7104
+ summaryFields: z4.string().array().optional(),
7105
+ summaryMaxChars: z4.number().int().positive().optional(),
7092
7106
  minItems: z4.number().int().min(0).default(0),
7093
7107
  maxItems: z4.number().int().positive().optional(),
7094
7108
  // Monomorphic mode
@@ -16133,47 +16147,48 @@ function validateFieldDefinitions(fields3, fragmentId) {
16133
16147
  function prefixFieldId(field, scope) {
16134
16148
  const cloned = cloneFieldDefinition2(field);
16135
16149
  cloned.id = `${scope}.${field.id}`;
16136
- cloned.defaultValue = cloneUnknown(cloned.defaultValue);
16150
+ const defaultValue = cloned.defaultValue;
16151
+ cloned.defaultValue = cloneUnknown(defaultValue);
16137
16152
  cloned.visibleRoles = cloned.visibleRoles ? [...cloned.visibleRoles] : void 0;
16138
16153
  cloned.ui = cloneUnknown(cloned.ui);
16139
16154
  return cloned;
16140
16155
  }
16141
16156
  function cloneFieldDefinition2(field) {
16142
- switch (field.type) {
16143
- case "repeater":
16144
- if (field.polymorphic && field.itemTypes) {
16145
- return {
16146
- ...field,
16147
- polymorphic: true,
16148
- itemTypes: Object.fromEntries(
16149
- Object.entries(field.itemTypes).map(([key, itemType]) => [
16150
- key,
16151
- {
16152
- ...itemType,
16153
- fields: itemType.fields.map(cloneFieldDefinition2)
16154
- }
16155
- ])
16156
- )
16157
- };
16158
- } else if (field.schema) {
16159
- return {
16160
- ...field,
16161
- schema: {
16162
- fields: field.schema.fields.map(cloneFieldDefinition2)
16163
- }
16164
- };
16165
- }
16166
- return { ...field };
16167
- case "group":
16157
+ if (field.type === "repeater") {
16158
+ if (field.polymorphic && field.itemTypes) {
16159
+ return {
16160
+ ...field,
16161
+ polymorphic: true,
16162
+ itemTypes: Object.fromEntries(
16163
+ Object.entries(field.itemTypes).map(([key, itemType]) => [
16164
+ key,
16165
+ {
16166
+ ...itemType,
16167
+ fields: itemType.fields.map(cloneFieldDefinition2)
16168
+ }
16169
+ ])
16170
+ )
16171
+ };
16172
+ }
16173
+ if (field.schema) {
16168
16174
  return {
16169
16175
  ...field,
16170
16176
  schema: {
16171
16177
  fields: field.schema.fields.map(cloneFieldDefinition2)
16172
16178
  }
16173
16179
  };
16174
- default:
16175
- return { ...field };
16180
+ }
16181
+ return { ...field };
16182
+ }
16183
+ if (field.type === "group") {
16184
+ return {
16185
+ ...field,
16186
+ schema: {
16187
+ fields: field.schema.fields.map(cloneFieldDefinition2)
16188
+ }
16189
+ };
16176
16190
  }
16191
+ return { ...field };
16177
16192
  }
16178
16193
  function cloneUnknown(value) {
16179
16194
  if (value == null || typeof value !== "object") {
@@ -18516,7 +18531,8 @@ function createBlockManifestWithContentShape(config, _contentShape) {
18516
18531
  return createBlockManifest(config);
18517
18532
  }
18518
18533
  function normalizeBlockLayout(layout) {
18519
- return Array.isArray(layout) ? [...layout] : layout;
18534
+ const rawLayout = layout;
18535
+ return Array.isArray(rawLayout) ? rawLayout : rawLayout;
18520
18536
  }
18521
18537
  function deriveComponentName(id) {
18522
18538
  const base = id.replace(/^block\./, "");
@@ -20062,16 +20078,20 @@ var marqueeLoopTransform = {
20062
20078
  summary: "Repeat an array to a minimum length, then duplicate it for seamless marquee looping",
20063
20079
  schema: marqueeLoopOptionsSchema,
20064
20080
  run: (value, options) => {
20065
- if (!Array.isArray(value) || value.length === 0) return [];
20081
+ const items = toUnknownArray(value);
20082
+ if (items.length === 0) return [];
20066
20083
  const minItems = options?.minItems ?? 10;
20067
20084
  const base = [];
20068
20085
  while (base.length < minItems) {
20069
- base.push(...value);
20086
+ base.push(...items);
20070
20087
  if (base.length > 1e3) break;
20071
20088
  }
20072
20089
  return [...base, ...base];
20073
20090
  }
20074
20091
  };
20092
+ function toUnknownArray(value) {
20093
+ return Array.isArray(value) ? value : [];
20094
+ }
20075
20095
  var formattingTransforms = [
20076
20096
  uppercaseTransform,
20077
20097
  fallbackTransform,
@@ -23738,8 +23758,8 @@ var eventSurfaceScopeValues = [
23738
23758
  "custom"
23739
23759
  ];
23740
23760
  var eventScheduleScopeValues = ["any", "recurring", "oneOff"];
23741
- var asEventCategoryId = (value) => value;
23742
- var asVenueId = (value) => value;
23761
+ var unsafeAsEventCategoryId = (value) => value;
23762
+ var unsafeAsVenueId = (value) => value;
23743
23763
  function normalizeEventBlockKind(value) {
23744
23764
  return value === "courses" || value === "events" ? value : "all";
23745
23765
  }
@@ -23765,10 +23785,10 @@ function normalizeEventCategoryIds(value) {
23765
23785
  if (Array.isArray(value)) {
23766
23786
  return normalizeIdList(
23767
23787
  value.filter((entry) => typeof entry === "string")
23768
- ).map(asEventCategoryId);
23788
+ ).map(unsafeAsEventCategoryId);
23769
23789
  }
23770
23790
  if (typeof value === "string") {
23771
- return normalizeIdList(value.split(",")).map(asEventCategoryId);
23791
+ return normalizeIdList(value.split(",")).map(unsafeAsEventCategoryId);
23772
23792
  }
23773
23793
  return [];
23774
23794
  }
@@ -23781,7 +23801,7 @@ function normalizeEventVenueId(value) {
23781
23801
  return null;
23782
23802
  }
23783
23803
  const trimmed = value.trim();
23784
- return trimmed ? asVenueId(trimmed) : null;
23804
+ return trimmed ? unsafeAsVenueId(trimmed) : null;
23785
23805
  }
23786
23806
  function normalizeEventStaffMemberId(value) {
23787
23807
  if (typeof value !== "string") {
@@ -33266,10 +33286,16 @@ var dashboardConfigSchema = z61.object({
33266
33286
  var fieldDefinitionInputSchema = unsafeRetypeZodSchema(fieldSchema);
33267
33287
  var nodeDefinitionSchema = unsafeRetypeZodSchema(NodeSchema);
33268
33288
  var sdkLoaderEndpointSchema = z61.enum(SUPPORTED_LOADER_ENDPOINTS);
33289
+ var loaderFallbackScalarSchema = z61.union([
33290
+ z61.string(),
33291
+ z61.number(),
33292
+ z61.boolean(),
33293
+ z61.null()
33294
+ ]);
33269
33295
  var loaderParamBindingSchema = z61.object({
33270
33296
  $bind: z61.object({
33271
33297
  from: z61.string().min(1, "Binding path is required"),
33272
- fallback: z61.string().optional()
33298
+ fallback: loaderFallbackScalarSchema.optional()
33273
33299
  })
33274
33300
  });
33275
33301
  var loaderParamValueSchema = z61.union([
@@ -33415,9 +33441,13 @@ var sdkBlockFieldOptionsMapSchema = z61.record(
33415
33441
  var sdkContentTypeTemplateConfigSchema = z61.object({
33416
33442
  blocks: z61.array(z61.unknown())
33417
33443
  }).passthrough();
33444
+ var sdkContentTypeOrderingConfigSchema = z61.object({
33445
+ mode: z61.enum(["default", "manual"]).optional()
33446
+ }).optional();
33418
33447
  var sdkContentTypeConfigSchema = z61.object({
33419
33448
  key: z61.string().min(1),
33420
33449
  fields: z61.array(z61.unknown()),
33450
+ ordering: sdkContentTypeOrderingConfigSchema,
33421
33451
  template: sdkContentTypeTemplateConfigSchema.nullable().optional()
33422
33452
  }).passthrough();
33423
33453
  var sdkContentConfigSchema = z61.object({
@@ -34551,6 +34581,9 @@ var templateConfigSchemaForward = z67.object({
34551
34581
  })
34552
34582
  )
34553
34583
  }).optional();
34584
+ var contentTypeOrderingSchema = z67.object({
34585
+ mode: z67.enum(["default", "manual"]).optional()
34586
+ }).optional();
34554
34587
  var contentTypeConfigSchema = z67.object({
34555
34588
  key: contentTypeKeySchema,
34556
34589
  name: z67.string().min(1),
@@ -34560,6 +34593,7 @@ var contentTypeConfigSchema = z67.object({
34560
34593
  // Fields are validated as unknown[] here - deep field validation happens in @riverbankcms/blocks
34561
34594
  fields: z67.array(z67.any()).min(1, "At least one field is required"),
34562
34595
  titleField: z67.string().optional(),
34596
+ ordering: contentTypeOrderingSchema,
34563
34597
  isSingleton: z67.boolean().optional().default(false),
34564
34598
  template: templateConfigSchemaForward
34565
34599
  }).refine(
@@ -35091,7 +35125,7 @@ var loaderParamBindingSchema2 = z70.object({
35091
35125
  // Loader params are ultimately string-normalized for query strings, so fallbacks should
35092
35126
  // stay scalar. Use transforms (e.g. `value.jsonArray`) when you need to serialize
35093
35127
  // more complex values into a string.
35094
- fallback: z70.union([z70.string(), z70.number(), z70.boolean(), z70.null()]).optional(),
35128
+ fallback: loaderFallbackScalarSchema.optional(),
35095
35129
  transforms: z70.array(loaderTransformStepSchema).default([]),
35096
35130
  pick: z70.enum(["value", "collection", "context"]).default("value"),
35097
35131
  coerce: z70.enum(["number", "boolean", "string"]).optional()
@@ -1748,7 +1748,16 @@ var ENDPOINT_DEFINITIONS = {
1748
1748
  revalidate: 60,
1749
1749
  tags: ["site-{siteId}", "content-{siteId}-{type}"],
1750
1750
  auth: "user",
1751
- responseKind: "json"
1751
+ responseKind: "json",
1752
+ errors: ["validation:invalid_input", "resource:not_found", "resource:conflict", "server:internal_error"]
1753
+ },
1754
+ reorderContentEntries: {
1755
+ path: "/sites/{siteId}/content/{type}/order",
1756
+ method: "POST",
1757
+ tags: ["site-{siteId}", "content-{siteId}-{type}"],
1758
+ auth: "user",
1759
+ responseKind: "json",
1760
+ errors: ["validation:invalid_input", "resource:not_found", "resource:conflict", "server:internal_error"]
1752
1761
  },
1753
1762
  getContentTemplate: {
1754
1763
  path: "/sites/{siteId}/content/types/{type}/template",
@@ -6492,14 +6501,14 @@ function rotateNormalizedPoint(point, rotation) {
6492
6501
  const x = point.x;
6493
6502
  const y = point.y;
6494
6503
  switch (rotation) {
6504
+ case 0:
6505
+ return { x, y };
6495
6506
  case 90:
6496
6507
  return { x: 1 - y, y: x };
6497
6508
  case 180:
6498
6509
  return { x: 1 - x, y: 1 - y };
6499
6510
  case 270:
6500
6511
  return { x: y, y: 1 - x };
6501
- default:
6502
- return { x, y };
6503
6512
  }
6504
6513
  }
6505
6514
 
@@ -6692,6 +6701,8 @@ var uiSchema = z4.object({
6692
6701
  mediaPickerAutoOpen: z4.boolean().optional(),
6693
6702
  showMediaPreview: z4.boolean().optional(),
6694
6703
  showMediaOverlayActions: z4.boolean().optional(),
6704
+ mediaPreviewMaxWidth: z4.enum(["xs", "sm", "md", "none"]).optional(),
6705
+ preventMediaPreviewUpscale: z4.boolean().optional(),
6695
6706
  mediaDelivery: mediaDeliverySchema.optional(),
6696
6707
  mediaDeliveryByVariant: z4.record(z4.string(), mediaDeliverySchema).optional(),
6697
6708
  // Optional input hints for validators/widgets
@@ -6941,6 +6952,9 @@ var repeaterFieldSchema = baseFieldSchema.extend({
6941
6952
  type: z4.literal("repeater"),
6942
6953
  itemLabel: z4.string().default("Item"),
6943
6954
  itemLabelSource: z4.string().optional(),
6955
+ showSummary: z4.boolean().optional(),
6956
+ summaryFields: z4.string().array().optional(),
6957
+ summaryMaxChars: z4.number().int().positive().optional(),
6944
6958
  minItems: z4.number().int().min(0).default(0),
6945
6959
  maxItems: z4.number().int().positive().optional(),
6946
6960
  // Monomorphic mode
@@ -15996,47 +16010,48 @@ function validateFieldDefinitions(fields3, fragmentId) {
15996
16010
  function prefixFieldId(field, scope) {
15997
16011
  const cloned = cloneFieldDefinition2(field);
15998
16012
  cloned.id = `${scope}.${field.id}`;
15999
- cloned.defaultValue = cloneUnknown(cloned.defaultValue);
16013
+ const defaultValue = cloned.defaultValue;
16014
+ cloned.defaultValue = cloneUnknown(defaultValue);
16000
16015
  cloned.visibleRoles = cloned.visibleRoles ? [...cloned.visibleRoles] : void 0;
16001
16016
  cloned.ui = cloneUnknown(cloned.ui);
16002
16017
  return cloned;
16003
16018
  }
16004
16019
  function cloneFieldDefinition2(field) {
16005
- switch (field.type) {
16006
- case "repeater":
16007
- if (field.polymorphic && field.itemTypes) {
16008
- return {
16009
- ...field,
16010
- polymorphic: true,
16011
- itemTypes: Object.fromEntries(
16012
- Object.entries(field.itemTypes).map(([key, itemType]) => [
16013
- key,
16014
- {
16015
- ...itemType,
16016
- fields: itemType.fields.map(cloneFieldDefinition2)
16017
- }
16018
- ])
16019
- )
16020
- };
16021
- } else if (field.schema) {
16022
- return {
16023
- ...field,
16024
- schema: {
16025
- fields: field.schema.fields.map(cloneFieldDefinition2)
16026
- }
16027
- };
16028
- }
16029
- return { ...field };
16030
- case "group":
16020
+ if (field.type === "repeater") {
16021
+ if (field.polymorphic && field.itemTypes) {
16022
+ return {
16023
+ ...field,
16024
+ polymorphic: true,
16025
+ itemTypes: Object.fromEntries(
16026
+ Object.entries(field.itemTypes).map(([key, itemType]) => [
16027
+ key,
16028
+ {
16029
+ ...itemType,
16030
+ fields: itemType.fields.map(cloneFieldDefinition2)
16031
+ }
16032
+ ])
16033
+ )
16034
+ };
16035
+ }
16036
+ if (field.schema) {
16031
16037
  return {
16032
16038
  ...field,
16033
16039
  schema: {
16034
16040
  fields: field.schema.fields.map(cloneFieldDefinition2)
16035
16041
  }
16036
16042
  };
16037
- default:
16038
- return { ...field };
16043
+ }
16044
+ return { ...field };
16045
+ }
16046
+ if (field.type === "group") {
16047
+ return {
16048
+ ...field,
16049
+ schema: {
16050
+ fields: field.schema.fields.map(cloneFieldDefinition2)
16051
+ }
16052
+ };
16039
16053
  }
16054
+ return { ...field };
16040
16055
  }
16041
16056
  function cloneUnknown(value) {
16042
16057
  if (value == null || typeof value !== "object") {
@@ -18379,7 +18394,8 @@ function createBlockManifestWithContentShape(config, _contentShape) {
18379
18394
  return createBlockManifest(config);
18380
18395
  }
18381
18396
  function normalizeBlockLayout(layout) {
18382
- return Array.isArray(layout) ? [...layout] : layout;
18397
+ const rawLayout = layout;
18398
+ return Array.isArray(rawLayout) ? rawLayout : rawLayout;
18383
18399
  }
18384
18400
  function deriveComponentName(id) {
18385
18401
  const base = id.replace(/^block\./, "");
@@ -19925,16 +19941,20 @@ var marqueeLoopTransform = {
19925
19941
  summary: "Repeat an array to a minimum length, then duplicate it for seamless marquee looping",
19926
19942
  schema: marqueeLoopOptionsSchema,
19927
19943
  run: (value, options) => {
19928
- if (!Array.isArray(value) || value.length === 0) return [];
19944
+ const items = toUnknownArray(value);
19945
+ if (items.length === 0) return [];
19929
19946
  const minItems = options?.minItems ?? 10;
19930
19947
  const base = [];
19931
19948
  while (base.length < minItems) {
19932
- base.push(...value);
19949
+ base.push(...items);
19933
19950
  if (base.length > 1e3) break;
19934
19951
  }
19935
19952
  return [...base, ...base];
19936
19953
  }
19937
19954
  };
19955
+ function toUnknownArray(value) {
19956
+ return Array.isArray(value) ? value : [];
19957
+ }
19938
19958
  var formattingTransforms = [
19939
19959
  uppercaseTransform,
19940
19960
  fallbackTransform,
@@ -23604,8 +23624,8 @@ var eventSurfaceScopeValues = [
23604
23624
  "custom"
23605
23625
  ];
23606
23626
  var eventScheduleScopeValues = ["any", "recurring", "oneOff"];
23607
- var asEventCategoryId = (value) => value;
23608
- var asVenueId = (value) => value;
23627
+ var unsafeAsEventCategoryId = (value) => value;
23628
+ var unsafeAsVenueId = (value) => value;
23609
23629
  function normalizeEventBlockKind(value) {
23610
23630
  return value === "courses" || value === "events" ? value : "all";
23611
23631
  }
@@ -23631,10 +23651,10 @@ function normalizeEventCategoryIds(value) {
23631
23651
  if (Array.isArray(value)) {
23632
23652
  return normalizeIdList(
23633
23653
  value.filter((entry) => typeof entry === "string")
23634
- ).map(asEventCategoryId);
23654
+ ).map(unsafeAsEventCategoryId);
23635
23655
  }
23636
23656
  if (typeof value === "string") {
23637
- return normalizeIdList(value.split(",")).map(asEventCategoryId);
23657
+ return normalizeIdList(value.split(",")).map(unsafeAsEventCategoryId);
23638
23658
  }
23639
23659
  return [];
23640
23660
  }
@@ -23647,7 +23667,7 @@ function normalizeEventVenueId(value) {
23647
23667
  return null;
23648
23668
  }
23649
23669
  const trimmed = value.trim();
23650
- return trimmed ? asVenueId(trimmed) : null;
23670
+ return trimmed ? unsafeAsVenueId(trimmed) : null;
23651
23671
  }
23652
23672
  function normalizeEventStaffMemberId(value) {
23653
23673
  if (typeof value !== "string") {
@@ -33271,11 +33291,11 @@ function normalizeContent(block) {
33271
33291
  }
33272
33292
  function normalizeParams(input) {
33273
33293
  if (!input || typeof input !== "object") return {};
33274
- const entries = Object.entries(input).map(([key, value]) => [
33275
- key,
33276
- coerceToString(value)
33277
- ]);
33278
- return Object.fromEntries(entries);
33294
+ const output = {};
33295
+ for (const [key, value] of Object.entries(input)) {
33296
+ output[key] = coerceToString(value);
33297
+ }
33298
+ return output;
33279
33299
  }
33280
33300
  function isNonArrayObject(value) {
33281
33301
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -33491,10 +33511,16 @@ var dashboardConfigSchema = z61.object({
33491
33511
  var fieldDefinitionInputSchema = unsafeRetypeZodSchema(fieldSchema);
33492
33512
  var nodeDefinitionSchema = unsafeRetypeZodSchema(NodeSchema);
33493
33513
  var sdkLoaderEndpointSchema = z61.enum(SUPPORTED_LOADER_ENDPOINTS);
33514
+ var loaderFallbackScalarSchema = z61.union([
33515
+ z61.string(),
33516
+ z61.number(),
33517
+ z61.boolean(),
33518
+ z61.null()
33519
+ ]);
33494
33520
  var loaderParamBindingSchema = z61.object({
33495
33521
  $bind: z61.object({
33496
33522
  from: z61.string().min(1, "Binding path is required"),
33497
- fallback: z61.string().optional()
33523
+ fallback: loaderFallbackScalarSchema.optional()
33498
33524
  })
33499
33525
  });
33500
33526
  var loaderParamValueSchema = z61.union([
@@ -33640,9 +33666,13 @@ var sdkBlockFieldOptionsMapSchema = z61.record(
33640
33666
  var sdkContentTypeTemplateConfigSchema = z61.object({
33641
33667
  blocks: z61.array(z61.unknown())
33642
33668
  }).passthrough();
33669
+ var sdkContentTypeOrderingConfigSchema = z61.object({
33670
+ mode: z61.enum(["default", "manual"]).optional()
33671
+ }).optional();
33643
33672
  var sdkContentTypeConfigSchema = z61.object({
33644
33673
  key: z61.string().min(1),
33645
33674
  fields: z61.array(z61.unknown()),
33675
+ ordering: sdkContentTypeOrderingConfigSchema,
33646
33676
  template: sdkContentTypeTemplateConfigSchema.nullable().optional()
33647
33677
  }).passthrough();
33648
33678
  var sdkContentConfigSchema = z61.object({
@@ -34642,7 +34672,7 @@ async function prefetchBlockData2(page, context, client, options) {
34642
34672
  throw new Error("listPublishedEntries requires siteId and type params");
34643
34673
  }
34644
34674
  const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
34645
- const order = orderBy === "newest" || orderBy === "oldest" || orderBy === "title" || orderBy === "order" ? orderBy : void 0;
34675
+ const order = orderBy === "order" ? "manual" : orderBy === "newest" || orderBy === "oldest" || orderBy === "title" ? orderBy : void 0;
34646
34676
  const parsedEntryIds = mode === "manual" ? parseManualEntryIds(entryIds) : void 0;
34647
34677
  if (mode === "manual" && (!parsedEntryIds || parsedEntryIds.length === 0)) {
34648
34678
  return { entries: [] };
@@ -1770,7 +1770,16 @@ var ENDPOINT_DEFINITIONS = {
1770
1770
  revalidate: 60,
1771
1771
  tags: ["site-{siteId}", "content-{siteId}-{type}"],
1772
1772
  auth: "user",
1773
- responseKind: "json"
1773
+ responseKind: "json",
1774
+ errors: ["validation:invalid_input", "resource:not_found", "resource:conflict", "server:internal_error"]
1775
+ },
1776
+ reorderContentEntries: {
1777
+ path: "/sites/{siteId}/content/{type}/order",
1778
+ method: "POST",
1779
+ tags: ["site-{siteId}", "content-{siteId}-{type}"],
1780
+ auth: "user",
1781
+ responseKind: "json",
1782
+ errors: ["validation:invalid_input", "resource:not_found", "resource:conflict", "server:internal_error"]
1774
1783
  },
1775
1784
  getContentTemplate: {
1776
1785
  path: "/sites/{siteId}/content/types/{type}/template",
@@ -6383,18 +6392,21 @@ function buildEndpointURL(baseURL, endpoint) {
6383
6392
  function isFormDataBody(value) {
6384
6393
  return typeof FormData !== "undefined" && value instanceof FormData;
6385
6394
  }
6395
+ function isUnknownArray(value) {
6396
+ return Array.isArray(value);
6397
+ }
6386
6398
  function appendQueryParam(queryParams, key, value) {
6387
6399
  if (value === void 0 || value === null) {
6388
6400
  return;
6389
6401
  }
6390
- if (Array.isArray(value)) {
6402
+ if (isUnknownArray(value)) {
6391
6403
  const stack = [...value].reverse();
6392
6404
  while (stack.length > 0) {
6393
6405
  const item = stack.pop();
6394
6406
  if (item === void 0 || item === null) {
6395
6407
  continue;
6396
6408
  }
6397
- if (Array.isArray(item)) {
6409
+ if (isUnknownArray(item)) {
6398
6410
  stack.push(...[...item].reverse());
6399
6411
  continue;
6400
6412
  }
@@ -6404,6 +6416,12 @@ function appendQueryParam(queryParams, key, value) {
6404
6416
  }
6405
6417
  queryParams.append(key, String(value));
6406
6418
  }
6419
+ function serializePathParam(endpoint, key, value) {
6420
+ if (typeof value === "string") {
6421
+ return value;
6422
+ }
6423
+ throw new Error(`Invalid path param for endpoint ${String(endpoint)}: ${key} must be a string`);
6424
+ }
6407
6425
  function invalidateCacheTags(tags, params) {
6408
6426
  const resolved = getRevalidateTag();
6409
6427
  if (typeof window !== "undefined" || !resolved || !tags) return;
@@ -6542,8 +6560,9 @@ function createRawCMSClient(headers = {}, baseUrl) {
6542
6560
  const bracePlaceholder = `{${key}}`;
6543
6561
  const colonPlaceholder = `:${key}`;
6544
6562
  if (originalPath.includes(bracePlaceholder) || originalPath.includes(colonPlaceholder)) {
6545
- url = url.replace(bracePlaceholder, value);
6546
- url = url.replace(colonPlaceholder, value);
6563
+ const stringValue = serializePathParam(endpoint, key, value);
6564
+ url = url.replace(bracePlaceholder, stringValue);
6565
+ url = url.replace(colonPlaceholder, stringValue);
6547
6566
  } else {
6548
6567
  unusedParams[key] = value;
6549
6568
  }
@@ -6817,7 +6836,7 @@ var SimpleCache = class {
6817
6836
  };
6818
6837
 
6819
6838
  // src/version.ts
6820
- var SDK_VERSION = "0.78.0";
6839
+ var SDK_VERSION = "0.78.2";
6821
6840
 
6822
6841
  // src/client/error.ts
6823
6842
  var RiverbankApiError = class _RiverbankApiError extends Error {
@@ -7236,9 +7255,10 @@ var CircuitOpenError = class extends Error {
7236
7255
  var prebuildModule = null;
7237
7256
  function tryRequire(modulePath) {
7238
7257
  try {
7239
- const req = Function(
7258
+ const getRequire = new Function(
7240
7259
  'return typeof require === "function" ? require : null'
7241
- )();
7260
+ );
7261
+ const req = getRequire();
7242
7262
  return req ? req(modulePath) : null;
7243
7263
  } catch {
7244
7264
  return null;
@@ -7751,8 +7771,7 @@ function createRiverbankClient(config) {
7751
7771
  async (sig) => {
7752
7772
  return await apiClient({
7753
7773
  endpoint: "getContentByPath",
7754
- params: { siteId },
7755
- body: { path: path3, preview },
7774
+ params: { siteId, path: path3, preview: String(preview) },
7756
7775
  options: { signal: sig }
7757
7776
  });
7758
7777
  },
@@ -7802,6 +7821,8 @@ function createRiverbankClient(config) {
7802
7821
  orderParam = "published_at.asc";
7803
7822
  } else if (order === "title") {
7804
7823
  orderParam = "title.asc";
7824
+ } else if (order === "manual") {
7825
+ orderParam = "manual.asc";
7805
7826
  }
7806
7827
  const apiParams = {
7807
7828
  siteId,