@riverbankcms/sdk 0.94.0 → 0.96.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 (189) hide show
  1. package/README.md +30 -4
  2. package/dist/{PreviewEditorSidebar-D3PAF7NW.mjs → PreviewEditorSidebar-46VT4QVU.mjs} +3 -3
  3. package/dist/{PreviewEditorUI-G5JVJEIJ.mjs → PreviewEditorUI-JD75GE5F.mjs} +3 -3
  4. package/dist/SdkPreviewModeRuntime-MJUSYUFB.mjs +8 -0
  5. package/dist/_dts/ai/src/contracts/proposals.d.ts +10 -10
  6. package/dist/_dts/api/src/bookingOperations.d.ts +7 -0
  7. package/dist/_dts/api/src/bookingRecords.d.ts +3 -0
  8. package/dist/_dts/api/src/cache-tags.d.ts +4 -0
  9. package/dist/_dts/api/src/contentRuntime.d.ts +14 -0
  10. package/dist/_dts/api/src/endpoints.d.ts +8 -0
  11. package/dist/_dts/api/src/event-presentation.d.ts +15 -0
  12. package/dist/_dts/api/src/index.d.ts +1 -1
  13. package/dist/_dts/api/src/public/endpoints.d.ts +1 -1
  14. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +17 -4
  15. package/dist/_dts/api/src/shared-contracts.d.ts +19 -9
  16. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +6 -1
  17. package/dist/_dts/block-form/src/client/index.d.ts +1 -1
  18. package/dist/_dts/block-form/src/fields/types.d.ts +9 -1
  19. package/dist/_dts/block-form/src/registry/schemas.d.ts +4 -0
  20. package/dist/_dts/block-form/src/registry/widgets.d.ts +1 -0
  21. package/dist/_dts/block-form/src/widgets/InlineTextField/InlineTextField.d.ts +4 -0
  22. package/dist/_dts/block-form/src/widgets/InlineTextField/index.d.ts +3 -0
  23. package/dist/_dts/block-form/src/widgets/InlineTextField/inlineTextFieldDefaults.d.ts +2 -0
  24. package/dist/_dts/block-form/src/widgets/InlineTextField/inlineTextFieldSchema.d.ts +3 -0
  25. package/dist/_dts/blocks/src/bindings/index.d.ts +1 -0
  26. package/dist/_dts/blocks/src/bindings/types.d.ts +1 -0
  27. package/dist/_dts/blocks/src/index.d.ts +2 -0
  28. package/dist/_dts/blocks/src/portal/types.d.ts +7 -0
  29. package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +2 -29631
  30. package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +2 -29614
  31. package/dist/_dts/blocks/src/system/blocks/cart.d.ts +2 -29634
  32. package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +2 -29627
  33. package/dist/_dts/blocks/src/system/blocks/collection.d.ts +2 -29585
  34. package/dist/_dts/blocks/src/system/blocks/faq.d.ts +2 -29677
  35. package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +2 -29655
  36. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +220 -0
  37. package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +2 -29655
  38. package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +2 -29685
  39. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +2 -29761
  40. package/dist/_dts/blocks/src/system/fragments/library/heroCopy.d.ts +9 -0
  41. package/dist/_dts/blocks/src/system/inlineText.d.ts +78 -0
  42. package/dist/_dts/blocks/src/system/manifest/derivedContent.d.ts +3 -1
  43. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +15 -3
  44. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +188 -7
  45. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
  46. package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +21 -6
  47. package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +2 -1
  48. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +5 -3
  49. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +5 -1
  50. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +2 -2
  51. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +9 -6
  52. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/ticketSelectionLines.d.ts +36 -0
  53. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +7 -1
  54. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +2 -2
  55. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +2 -3
  56. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +19 -4
  57. package/dist/_dts/blocks/src/system/runtime/nodes/renderInlineText.d.ts +3 -0
  58. package/dist/_dts/content-editor/src/index.d.ts +1 -0
  59. package/dist/_dts/content-editor/src/primitives/PreviewInlineTextEditor.d.ts +9 -0
  60. package/dist/_dts/content-model/src/entry-slots/types.d.ts +6 -0
  61. package/dist/_dts/content-model/src/templates/bindingTypeCompatibility.d.ts +1 -1
  62. package/dist/_dts/content-model/src/templates/defaults.d.ts +30 -0
  63. package/dist/_dts/content-model/src/templates/types.d.ts +1 -0
  64. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +163 -2
  65. package/dist/_dts/editor/src/inline/FloatingToolbar.d.ts +18 -0
  66. package/dist/_dts/editor/src/inline/InlineTextEditor.d.ts +18 -1
  67. package/dist/_dts/editor/src/inline/InlineTextEditorStyles.d.ts +1 -0
  68. package/dist/_dts/editor/src/inline/domParse.d.ts +3 -0
  69. package/dist/_dts/editor/src/inline/presentation.d.ts +48 -0
  70. package/dist/_dts/editor/src/inline/selection.d.ts +12 -0
  71. package/dist/_dts/editor-blocks/src/widgets/index.d.ts +1 -0
  72. package/dist/_dts/editor-blocks/src/widgets/inline-text/InlineTextField.d.ts +3 -0
  73. package/dist/_dts/editor-blocks/src/widgets/inline-text/index.d.ts +1 -0
  74. package/dist/_dts/media-core/src/assetsInUseSummary.d.ts +7 -0
  75. package/dist/_dts/media-core/src/mediaUsageProjection.d.ts +29 -1
  76. package/dist/_dts/path-utils/src/index.d.ts +1 -0
  77. package/dist/_dts/preview-next/src/client/widgets/widgetOverrides.d.ts +1 -0
  78. package/dist/_dts/sdk/src/cli/commands/content.d.ts +56 -0
  79. package/dist/_dts/sdk/src/cli/commands/push/options.d.ts +4 -0
  80. package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +2 -6
  81. package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +2 -0
  82. package/dist/_dts/sdk/src/cli/commands/push/verification.d.ts +56 -0
  83. package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +2 -1
  84. package/dist/_dts/sdk/src/cli/content/edit/format.d.ts +2 -0
  85. package/dist/_dts/sdk/src/cli/content/edit/path.d.ts +14 -0
  86. package/dist/_dts/sdk/src/cli/content/edit/planner.d.ts +46 -0
  87. package/dist/_dts/sdk/src/cli/content/fs-utils.d.ts +4 -0
  88. package/dist/_dts/sdk/src/cli/content/writer.d.ts +2 -0
  89. package/dist/_dts/sdk/src/cli/merge-remote/mergeFieldChanges.d.ts +22 -0
  90. package/dist/_dts/sdk/src/cli/merge-remote/pageLocal.d.ts +3 -0
  91. package/dist/_dts/sdk/src/cli/merge-remote/pageMerge.d.ts +78 -0
  92. package/dist/_dts/sdk/src/cli/merge-remote/pageMergePlan.d.ts +36 -0
  93. package/dist/_dts/sdk/src/cli/merge-remote/pageMergePush.d.ts +21 -0
  94. package/dist/_dts/sdk/src/cli/merge-remote/pageMergeReport.d.ts +29 -0
  95. package/dist/_dts/sdk/src/cli/merge-remote/pageSnapshots.d.ts +48 -0
  96. package/dist/_dts/sdk/src/cli/sync/diff.d.ts +3 -6
  97. package/dist/_dts/sdk/src/cli/sync/field-diff.d.ts +39 -0
  98. package/dist/_dts/sdk/src/cli/sync/index.d.ts +1 -0
  99. package/dist/_dts/sdk/src/client/types.d.ts +7 -2
  100. package/dist/_dts/sdk/src/config/field-definitions.d.ts +8 -3
  101. package/dist/_dts/sdk/src/config/typed-entries.d.ts +5 -3
  102. package/dist/_dts/sdk/src/contracts/bindings.d.ts +1 -0
  103. package/dist/_dts/sdk/src/contracts/content.d.ts +18 -0
  104. package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
  105. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +3 -2
  106. package/dist/_dts/sdk/src/next/middleware.d.ts +1 -0
  107. package/dist/_dts/sdk/src/next/redirect-destination.d.ts +3 -0
  108. package/dist/_dts/sdk/src/next/route-outcome-proxy.d.ts +22 -0
  109. package/dist/_dts/sdk/src/public-api/contracts.d.ts +20 -1
  110. package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
  111. package/dist/_dts/sdk/src/rendering/helpers/bindings.d.ts +1 -0
  112. package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +9 -1
  113. package/dist/_dts/sdk/src/version.d.ts +1 -1
  114. package/dist/_dts/theme-core/src/accordions/types.d.ts +1 -1
  115. package/dist/_dts/theme-core/src/buttons/types.d.ts +1 -1
  116. package/dist/_dts/theme-core/src/cards/types.d.ts +15 -15
  117. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  118. package/dist/_dts/theme-core/src/inputs/types.d.ts +1 -1
  119. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +42 -42
  120. package/dist/_dts/theme-core/src/palette/variants/types.d.ts +2 -2
  121. package/dist/_dts/theme-core/src/schema.d.ts +44 -44
  122. package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
  123. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +16 -16
  124. package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +4 -4
  125. package/dist/_dts/theme-core/src/site-styles/tokenRecipes.d.ts +1 -1
  126. package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +1 -1
  127. package/dist/{chunk-AQ6RT6LZ.mjs → chunk-4TLTV7OB.mjs} +2 -2
  128. package/dist/{chunk-NT76QGIJ.mjs → chunk-7ED5UNHL.mjs} +14 -0
  129. package/dist/{chunk-XIK2HYI3.mjs → chunk-EL55VV6Q.mjs} +49 -9
  130. package/dist/{chunk-A63UXN3P.mjs → chunk-VHIMXQ7Z.mjs} +106 -4
  131. package/dist/{chunk-AJZGT6YG.mjs → chunk-VTPPVAOL.mjs} +1 -1
  132. package/dist/{chunk-PCNCETBI.mjs → chunk-XMATDBXO.mjs} +2082 -408
  133. package/dist/cli/index.mjs +2809 -787
  134. package/dist/cli/init-docs/content/cli-reference.md +43 -4
  135. package/dist/cli/init-docs/content/content-management.md +22 -0
  136. package/dist/client/{accordion-RNQIPG55.mjs → accordion-GUNXIIZR.mjs} +1 -1
  137. package/dist/client/{bookingForm-HYEEVRLP.mjs → bookingForm-AOU4VHP5.mjs} +3 -3
  138. package/dist/client/bookings.mjs +211 -105
  139. package/dist/client/{carousel-W7DQ3YPU.mjs → carousel-4QSX2JPC.mjs} +1 -1
  140. package/dist/client/{cart-PXJ3SXXO.mjs → cart-JKN6C4ZB.mjs} +4 -4
  141. package/dist/client/{checkout-X3JYSOXI.mjs → checkout-YY6YMITW.mjs} +4 -4
  142. package/dist/client/{chunk-PICR3NTQ.mjs → chunk-6H27K6AA.mjs} +1 -1
  143. package/dist/client/{chunk-J6TMMMXW.mjs → chunk-A3YN7M3G.mjs} +1 -1
  144. package/dist/client/{chunk-YYVGSYBO.mjs → chunk-BFCJZODD.mjs} +3 -3
  145. package/dist/client/{chunk-IXDSXF2D.mjs → chunk-CPKMJVBD.mjs} +353 -187
  146. package/dist/client/{chunk-6SYGVVWA.mjs → chunk-GWCRCJLB.mjs} +9 -0
  147. package/dist/client/{chunk-Q47XGAGS.mjs → chunk-H7A6PUGM.mjs} +1 -1
  148. package/dist/client/{chunk-WERRJXNJ.mjs → chunk-SY543WZ3.mjs} +1 -1
  149. package/dist/client/{chunk-DUOHLWLF.mjs → chunk-VJROUYOQ.mjs} +2 -2
  150. package/dist/client/client.mjs +4495 -3855
  151. package/dist/client/{courseRegistration-QZ67PVHO.mjs → courseRegistration-UU2KMPSQ.mjs} +3 -3
  152. package/dist/client/{eventCalendar-V3BDHQNT.mjs → eventCalendar-WIVNS2TM.mjs} +6 -6
  153. package/dist/client/{eventCombined-XYFRN2RG.mjs → eventCombined-P3G5MW4J.mjs} +6 -6
  154. package/dist/client/{eventDetails-TFE5TWKV.mjs → eventDetails-2VHJ2RDG.mjs} +6 -6
  155. package/dist/client/{eventListing-IQ6AGWZ6.mjs → eventListing-TGO6JI3R.mjs} +6 -6
  156. package/dist/client/{eventRegistration-WGJVFKQJ.mjs → eventRegistration-B46HEJES.mjs} +6 -6
  157. package/dist/client/{form-6UZY6RUA.mjs → form-VKRTFUNQ.mjs} +1 -1
  158. package/dist/client/{headerSection-RSFXY6V3.mjs → headerSection-XUX4ZJLO.mjs} +2 -2
  159. package/dist/client/hooks.mjs +34 -3
  160. package/dist/client/{locationMap-24FH67I4.mjs → locationMap-NQFI5MJO.mjs} +2 -2
  161. package/dist/client/{newsletterForm-QVL3MLTN.mjs → newsletterForm-P2GETCQK.mjs} +1 -1
  162. package/dist/client/{productDetail-ZDYN3G4T.mjs → productDetail-7NQ7O5IF.mjs} +4 -4
  163. package/dist/client/{productList-4BMJLQHZ.mjs → productList-RX6ZJ7BL.mjs} +4 -4
  164. package/dist/client/rendering/client.mjs +4170 -3768
  165. package/dist/client/rendering/islands.mjs +18 -18
  166. package/dist/client/rendering.mjs +1700 -1065
  167. package/dist/client/{shop-U5C634FF.mjs → shop-BHN5AKY6.mjs} +4 -4
  168. package/dist/preview-next/before-render.mjs +14 -0
  169. package/dist/preview-next/client/runtime.mjs +5 -5
  170. package/dist/preview-next/middleware.mjs +14 -0
  171. package/dist/{sdk-runtime-VGV46WVB.mjs → sdk-runtime-X2LXQ5IC.mjs} +6 -6
  172. package/dist/server/components.mjs +3255 -2827
  173. package/dist/server/config-template-validation.mjs +29 -20
  174. package/dist/server/config-validation.mjs +36 -4
  175. package/dist/server/config.mjs +36 -4
  176. package/dist/server/data.mjs +34 -3
  177. package/dist/server/index.mjs +44 -1
  178. package/dist/server/next/middleware.mjs +120 -0
  179. package/dist/server/next.mjs +3405 -2859
  180. package/dist/server/page-converter.mjs +20 -3
  181. package/dist/server/prebuild.mjs +1 -1
  182. package/dist/server/rendering/server.mjs +3264 -2837
  183. package/dist/server/rendering.mjs +3295 -2844
  184. package/dist/server/routing.mjs +35 -4
  185. package/dist/server/server.mjs +2358 -2188
  186. package/dist/server/theme-bridge.mjs +140 -0
  187. package/dist/styles/index.css +139 -0
  188. package/package.json +5 -1
  189. package/dist/SdkPreviewModeRuntime-NHTLRNQD.mjs +0 -8
@@ -2,12 +2,14 @@
2
2
  var TEMPLATE_BINDING_TRANSFORMS = {
3
3
  RICHTEXT_FIRST_PARAGRAPH: "richtext.firstParagraph",
4
4
  DATE_FORMAT_SHORT: "date.formatShort",
5
- DATE_FORMAT_LONG: "date.formatLong"
5
+ DATE_FORMAT_LONG: "date.formatLong",
6
+ TEXT_INLINE_TEXT: "text.inlineText"
6
7
  };
7
8
 
8
9
  // ../content-model/src/templates/bindingTypeCompatibility.ts
9
10
  var SCALAR_BLOCK_FIELD_TYPES = [
10
11
  "text",
12
+ "inlineText",
11
13
  "number",
12
14
  "slug",
13
15
  "url",
@@ -26,15 +28,15 @@ function isScalarBlockFieldType(type) {
26
28
  }
27
29
  var CONTENT_TO_BLOCK_COMPATIBILITY = {
28
30
  // Simple text fields
29
- text: ["text", "slug", "url"],
31
+ text: ["text", "inlineText", "slug", "url"],
30
32
  // Multi-line text
31
- textarea: ["text"],
33
+ textarea: ["text", "inlineText"],
32
34
  // Numeric fields can bind to number inputs or text display fields.
33
- number: ["number", "text"],
35
+ number: ["number", "text", "inlineText"],
34
36
  // Date fields can bind to date/datetime inputs or text display fields.
35
- date: ["date", "datetime", "text"],
37
+ date: ["date", "datetime", "text", "inlineText"],
36
38
  // URL fields can bind to URL inputs or text display fields.
37
- url: ["url", "text"],
39
+ url: ["url", "text", "inlineText"],
38
40
  // Rich text (requires exact match or transform)
39
41
  richText: ["richText"],
40
42
  // Media fields
@@ -44,7 +46,7 @@ var CONTENT_TO_BLOCK_COMPATIBILITY = {
44
46
  // Boolean fields
45
47
  boolean: ["boolean"],
46
48
  // Select dropdowns (can map to text or select)
47
- select: ["text", "select"],
49
+ select: ["text", "inlineText", "select"],
48
50
  // Reference fields (object or link)
49
51
  reference: ["reference", "link"],
50
52
  // Link fields (CTA links, etc.)
@@ -56,7 +58,7 @@ var CONTENT_TO_BLOCK_COMPATIBILITY = {
56
58
  // Repeater fields (list structure - not directly bindable)
57
59
  repeater: ["repeater"],
58
60
  // Datetime fields can map to datetime/date inputs or text display fields.
59
- datetime: ["datetime", "date", "text"]
61
+ datetime: ["datetime", "date", "text", "inlineText"]
60
62
  };
61
63
  var META_FIELDS = {
62
64
  title: "text",
@@ -76,26 +78,26 @@ function isMetaFieldPath(path) {
76
78
  var META_FIELD_COMPATIBILITY = {
77
79
  // Text meta fields — title/slug carry the alias targets so editors can bind
78
80
  // them where the generic 'text' → ['text','slug','url'] would allow.
79
- title: ["text", "slug", "url"],
80
- slug: ["text", "slug", "url"],
81
+ title: ["text", "inlineText", "slug", "url"],
82
+ slug: ["text", "inlineText", "slug", "url"],
81
83
  // Enum/status fields
82
- status: ["text", "select"],
84
+ status: ["text", "inlineText", "select"],
83
85
  // Date meta fields
84
- publishedAt: ["text", "date", "datetime"],
85
- createdAt: ["text", "date", "datetime"],
86
- updatedAt: ["text", "date", "datetime"]
86
+ publishedAt: ["text", "inlineText", "date", "datetime"],
87
+ createdAt: ["text", "inlineText", "date", "datetime"],
88
+ updatedAt: ["text", "inlineText", "date", "datetime"]
87
89
  };
88
90
  var NESTED_PATH_COMPATIBILITY = {
89
91
  // richText nested paths
90
92
  "richText.doc": ["richText"],
91
- "richText.html": ["text"],
92
- "richText.plain": ["text"],
93
+ "richText.html": ["text", "inlineText"],
94
+ "richText.plain": ["text", "inlineText"],
93
95
  // media nested paths
94
- "media.url": ["text", "url"],
95
- "media.alt": ["text"],
96
+ "media.url": ["text", "inlineText", "url"],
97
+ "media.alt": ["text", "inlineText"],
96
98
  // file nested paths
97
- "file.url": ["text", "url"],
98
- "file.filename": ["text"]
99
+ "file.url": ["text", "inlineText", "url"],
100
+ "file.filename": ["text", "inlineText"]
99
101
  };
100
102
  function isCompatibleBinding(sourceType, targetType) {
101
103
  if (targetType === "repeater") {
@@ -331,6 +333,10 @@ var TRANSFORM_IO = {
331
333
  [TEMPLATE_BINDING_TRANSFORMS.DATE_FORMAT_LONG]: {
332
334
  acceptsInputTypes: ["date", "datetime"],
333
335
  outputType: "text"
336
+ },
337
+ [TEMPLATE_BINDING_TRANSFORMS.TEXT_INLINE_TEXT]: {
338
+ acceptsInputTypes: ["text", "textarea", "select"],
339
+ outputType: "text"
334
340
  }
335
341
  };
336
342
  function getTransformIO(name) {
@@ -728,6 +734,7 @@ function bindingValidationErrorMessage(error) {
728
734
  var FIELD_TYPE_CLASSIFICATION = {
729
735
  // Leaves — bindable, type maps cleanly into BlockFieldType.
730
736
  text: "leaf",
737
+ inlineText: "leaf",
731
738
  number: "leaf",
732
739
  slug: "leaf",
733
740
  url: "leaf",
@@ -852,6 +859,7 @@ function nestedSdkFields(field) {
852
859
  return field.tabs.flatMap((tab) => tab.fields);
853
860
  case "text":
854
861
  case "richText":
862
+ case "inlineText":
855
863
  case "media":
856
864
  case "file":
857
865
  case "boolean":
@@ -891,6 +899,7 @@ function toContentFieldType(type) {
891
899
  return type;
892
900
  case "slug":
893
901
  case "time":
902
+ case "inlineText":
894
903
  case "presetOrCustom":
895
904
  case "contentTypeSelect":
896
905
  case "entryPicker":
@@ -26,6 +26,8 @@ var TAG_TEMPLATES = {
26
26
  siteNewsletter: "riverbank:site:{siteId}:newsletter",
27
27
  // Pages/routes (routable content)
28
28
  siteRoutableContent: "riverbank:site:{siteId}:routable-content",
29
+ siteRedirects: "riverbank:site:{siteId}:redirects",
30
+ siteRouteOutcomes: "riverbank:site:{siteId}:route-outcomes",
29
31
  routeById: "riverbank:route:{routeId}",
30
32
  pageById: "riverbank:page:{pageId}",
31
33
  workflowRunById: "riverbank:workflow-run:{runId}",
@@ -3482,6 +3484,18 @@ var ENDPOINT_DEFINITIONS = {
3482
3484
  auth: "public",
3483
3485
  responseKind: "json"
3484
3486
  },
3487
+ resolveRouteOutcome: {
3488
+ path: "/sites/{siteId}/route-outcome",
3489
+ method: "GET",
3490
+ tags: [
3491
+ TAG_TEMPLATES.siteRoutableContent,
3492
+ TAG_TEMPLATES.siteRedirects,
3493
+ TAG_TEMPLATES.siteRouteOutcomes
3494
+ ],
3495
+ auth: "public",
3496
+ responseKind: "json",
3497
+ errors: ["validation:invalid_input", "server:internal_error"]
3498
+ },
3485
3499
  getPageByPath: {
3486
3500
  path: "/sites/{siteId}/pages",
3487
3501
  method: "GET",
@@ -7334,6 +7348,11 @@ var textFieldSchema = baseFieldSchema.extend({
7334
7348
  var richTextFieldSchema = baseFieldSchema.extend({
7335
7349
  type: z4.literal("richText")
7336
7350
  });
7351
+ var inlineTextFieldSchema = baseFieldSchema.extend({
7352
+ type: z4.literal("inlineText"),
7353
+ maxLength: z4.number().int().positive().optional(),
7354
+ plainTextField: z4.string().min(1).optional()
7355
+ });
7337
7356
  var mediaFieldSchema = baseFieldSchema.extend({
7338
7357
  type: z4.literal("media"),
7339
7358
  // Keep full MEDIA_KINDS parse compatibility for pre-file-field manifests.
@@ -7656,6 +7675,7 @@ function getFieldSchemaInternal() {
7656
7675
  _fieldSchemaInternal = z4.discriminatedUnion("type", [
7657
7676
  textFieldSchema,
7658
7677
  richTextFieldSchema,
7678
+ inlineTextFieldSchema,
7659
7679
  mediaFieldSchema,
7660
7680
  fileFieldSchema,
7661
7681
  booleanFieldSchema,
@@ -20104,8 +20124,16 @@ var heroCopyFragment = defineFragment({
20104
20124
  id: "headline",
20105
20125
  type: "text",
20106
20126
  label: "Headline",
20127
+ maxLength: 120,
20128
+ ui: { hidden: true }
20129
+ },
20130
+ {
20131
+ id: "headlineInline",
20132
+ type: "inlineText",
20133
+ label: "Headline",
20107
20134
  required: true,
20108
- maxLength: 120
20135
+ maxLength: 120,
20136
+ plainTextField: "headline"
20109
20137
  },
20110
20138
  {
20111
20139
  id: "subheadline",
@@ -20130,9 +20158,12 @@ var heroCopyFragment = defineFragment({
20130
20158
  as: "h1",
20131
20159
  // heading-display: uses fluid typography from theme (--fs-h1-display-fluid)
20132
20160
  // Color in blocks-static/index.css (.hero-headline)
20133
- className: "hero-headline heading-display"
20161
+ className: "hero-headline heading-display",
20162
+ // Resolved against top-level block content; keep this beside the sibling headline field.
20163
+ inlineTextFallbackPath: "headline",
20164
+ maxLength: 120
20134
20165
  },
20135
- bind("content.headline")
20166
+ bind("content.headlineInline")
20136
20167
  ),
20137
20168
  text(
20138
20169
  {
@@ -39424,7 +39455,8 @@ function isUnsupportedDynamicSegment(segment) {
39424
39455
  var BINDING_TRANSFORMS = {
39425
39456
  RICHTEXT_FIRST_PARAGRAPH: "richtext.firstParagraph",
39426
39457
  DATE_FORMAT_SHORT: "date.formatShort",
39427
- DATE_FORMAT_LONG: "date.formatLong"
39458
+ DATE_FORMAT_LONG: "date.formatLong",
39459
+ TEXT_INLINE_TEXT: "text.inlineText"
39428
39460
  };
39429
39461
  var BINDING_TRANSFORM_VALUES = Object.values(BINDING_TRANSFORMS);
39430
39462
  var BINDING_TRANSFORM_LIST = BINDING_TRANSFORM_VALUES.join(", ");
@@ -71,6 +71,8 @@ var TAG_TEMPLATES = {
71
71
  siteNewsletter: "riverbank:site:{siteId}:newsletter",
72
72
  // Pages/routes (routable content)
73
73
  siteRoutableContent: "riverbank:site:{siteId}:routable-content",
74
+ siteRedirects: "riverbank:site:{siteId}:redirects",
75
+ siteRouteOutcomes: "riverbank:site:{siteId}:route-outcomes",
74
76
  routeById: "riverbank:route:{routeId}",
75
77
  pageById: "riverbank:page:{pageId}",
76
78
  workflowRunById: "riverbank:workflow-run:{runId}",
@@ -3527,6 +3529,18 @@ var ENDPOINT_DEFINITIONS = {
3527
3529
  auth: "public",
3528
3530
  responseKind: "json"
3529
3531
  },
3532
+ resolveRouteOutcome: {
3533
+ path: "/sites/{siteId}/route-outcome",
3534
+ method: "GET",
3535
+ tags: [
3536
+ TAG_TEMPLATES.siteRoutableContent,
3537
+ TAG_TEMPLATES.siteRedirects,
3538
+ TAG_TEMPLATES.siteRouteOutcomes
3539
+ ],
3540
+ auth: "public",
3541
+ responseKind: "json",
3542
+ errors: ["validation:invalid_input", "server:internal_error"]
3543
+ },
3530
3544
  getPageByPath: {
3531
3545
  path: "/sites/{siteId}/pages",
3532
3546
  method: "GET",
@@ -7379,6 +7393,11 @@ var textFieldSchema = baseFieldSchema.extend({
7379
7393
  var richTextFieldSchema = baseFieldSchema.extend({
7380
7394
  type: z4.literal("richText")
7381
7395
  });
7396
+ var inlineTextFieldSchema = baseFieldSchema.extend({
7397
+ type: z4.literal("inlineText"),
7398
+ maxLength: z4.number().int().positive().optional(),
7399
+ plainTextField: z4.string().min(1).optional()
7400
+ });
7382
7401
  var mediaFieldSchema = baseFieldSchema.extend({
7383
7402
  type: z4.literal("media"),
7384
7403
  // Keep full MEDIA_KINDS parse compatibility for pre-file-field manifests.
@@ -7701,6 +7720,7 @@ function getFieldSchemaInternal() {
7701
7720
  _fieldSchemaInternal = z4.discriminatedUnion("type", [
7702
7721
  textFieldSchema,
7703
7722
  richTextFieldSchema,
7723
+ inlineTextFieldSchema,
7704
7724
  mediaFieldSchema,
7705
7725
  fileFieldSchema,
7706
7726
  booleanFieldSchema,
@@ -20149,8 +20169,16 @@ var heroCopyFragment = defineFragment({
20149
20169
  id: "headline",
20150
20170
  type: "text",
20151
20171
  label: "Headline",
20172
+ maxLength: 120,
20173
+ ui: { hidden: true }
20174
+ },
20175
+ {
20176
+ id: "headlineInline",
20177
+ type: "inlineText",
20178
+ label: "Headline",
20152
20179
  required: true,
20153
- maxLength: 120
20180
+ maxLength: 120,
20181
+ plainTextField: "headline"
20154
20182
  },
20155
20183
  {
20156
20184
  id: "subheadline",
@@ -20175,9 +20203,12 @@ var heroCopyFragment = defineFragment({
20175
20203
  as: "h1",
20176
20204
  // heading-display: uses fluid typography from theme (--fs-h1-display-fluid)
20177
20205
  // Color in blocks-static/index.css (.hero-headline)
20178
- className: "hero-headline heading-display"
20206
+ className: "hero-headline heading-display",
20207
+ // Resolved against top-level block content; keep this beside the sibling headline field.
20208
+ inlineTextFallbackPath: "headline",
20209
+ maxLength: 120
20179
20210
  },
20180
- bind("content.headline")
20211
+ bind("content.headlineInline")
20181
20212
  ),
20182
20213
  text(
20183
20214
  {
@@ -39457,7 +39488,8 @@ function isUnsupportedDynamicSegment(segment) {
39457
39488
  var BINDING_TRANSFORMS = {
39458
39489
  RICHTEXT_FIRST_PARAGRAPH: "richtext.firstParagraph",
39459
39490
  DATE_FORMAT_SHORT: "date.formatShort",
39460
- DATE_FORMAT_LONG: "date.formatLong"
39491
+ DATE_FORMAT_LONG: "date.formatLong",
39492
+ TEXT_INLINE_TEXT: "text.inlineText"
39461
39493
  };
39462
39494
  var BINDING_TRANSFORM_VALUES = Object.values(BINDING_TRANSFORMS);
39463
39495
  var BINDING_TRANSFORM_LIST = BINDING_TRANSFORM_VALUES.join(", ");
@@ -23,6 +23,8 @@ var TAG_TEMPLATES = {
23
23
  siteNewsletter: "riverbank:site:{siteId}:newsletter",
24
24
  // Pages/routes (routable content)
25
25
  siteRoutableContent: "riverbank:site:{siteId}:routable-content",
26
+ siteRedirects: "riverbank:site:{siteId}:redirects",
27
+ siteRouteOutcomes: "riverbank:site:{siteId}:route-outcomes",
26
28
  routeById: "riverbank:route:{routeId}",
27
29
  pageById: "riverbank:page:{pageId}",
28
30
  workflowRunById: "riverbank:workflow-run:{runId}",
@@ -3479,6 +3481,18 @@ var ENDPOINT_DEFINITIONS = {
3479
3481
  auth: "public",
3480
3482
  responseKind: "json"
3481
3483
  },
3484
+ resolveRouteOutcome: {
3485
+ path: "/sites/{siteId}/route-outcome",
3486
+ method: "GET",
3487
+ tags: [
3488
+ TAG_TEMPLATES.siteRoutableContent,
3489
+ TAG_TEMPLATES.siteRedirects,
3490
+ TAG_TEMPLATES.siteRouteOutcomes
3491
+ ],
3492
+ auth: "public",
3493
+ responseKind: "json",
3494
+ errors: ["validation:invalid_input", "server:internal_error"]
3495
+ },
3482
3496
  getPageByPath: {
3483
3497
  path: "/sites/{siteId}/pages",
3484
3498
  method: "GET",
@@ -7234,6 +7248,11 @@ var textFieldSchema = baseFieldSchema.extend({
7234
7248
  var richTextFieldSchema = baseFieldSchema.extend({
7235
7249
  type: z4.literal("richText")
7236
7250
  });
7251
+ var inlineTextFieldSchema = baseFieldSchema.extend({
7252
+ type: z4.literal("inlineText"),
7253
+ maxLength: z4.number().int().positive().optional(),
7254
+ plainTextField: z4.string().min(1).optional()
7255
+ });
7237
7256
  var mediaFieldSchema = baseFieldSchema.extend({
7238
7257
  type: z4.literal("media"),
7239
7258
  // Keep full MEDIA_KINDS parse compatibility for pre-file-field manifests.
@@ -7556,6 +7575,7 @@ function getFieldSchemaInternal() {
7556
7575
  _fieldSchemaInternal = z4.discriminatedUnion("type", [
7557
7576
  textFieldSchema,
7558
7577
  richTextFieldSchema,
7578
+ inlineTextFieldSchema,
7559
7579
  mediaFieldSchema,
7560
7580
  fileFieldSchema,
7561
7581
  booleanFieldSchema,
@@ -20085,8 +20105,16 @@ var heroCopyFragment = defineFragment({
20085
20105
  id: "headline",
20086
20106
  type: "text",
20087
20107
  label: "Headline",
20108
+ maxLength: 120,
20109
+ ui: { hidden: true }
20110
+ },
20111
+ {
20112
+ id: "headlineInline",
20113
+ type: "inlineText",
20114
+ label: "Headline",
20088
20115
  required: true,
20089
- maxLength: 120
20116
+ maxLength: 120,
20117
+ plainTextField: "headline"
20090
20118
  },
20091
20119
  {
20092
20120
  id: "subheadline",
@@ -20111,9 +20139,12 @@ var heroCopyFragment = defineFragment({
20111
20139
  as: "h1",
20112
20140
  // heading-display: uses fluid typography from theme (--fs-h1-display-fluid)
20113
20141
  // Color in blocks-static/index.css (.hero-headline)
20114
- className: "hero-headline heading-display"
20142
+ className: "hero-headline heading-display",
20143
+ // Resolved against top-level block content; keep this beside the sibling headline field.
20144
+ inlineTextFallbackPath: "headline",
20145
+ maxLength: 120
20115
20146
  },
20116
- bind("content.headline")
20147
+ bind("content.headlineInline")
20117
20148
  ),
20118
20149
  text(
20119
20150
  {
@@ -45,6 +45,8 @@ var TAG_TEMPLATES = {
45
45
  siteNewsletter: "riverbank:site:{siteId}:newsletter",
46
46
  // Pages/routes (routable content)
47
47
  siteRoutableContent: "riverbank:site:{siteId}:routable-content",
48
+ siteRedirects: "riverbank:site:{siteId}:redirects",
49
+ siteRouteOutcomes: "riverbank:site:{siteId}:route-outcomes",
48
50
  routeById: "riverbank:route:{routeId}",
49
51
  pageById: "riverbank:page:{pageId}",
50
52
  workflowRunById: "riverbank:workflow-run:{runId}",
@@ -3501,6 +3503,18 @@ var ENDPOINT_DEFINITIONS = {
3501
3503
  auth: "public",
3502
3504
  responseKind: "json"
3503
3505
  },
3506
+ resolveRouteOutcome: {
3507
+ path: "/sites/{siteId}/route-outcome",
3508
+ method: "GET",
3509
+ tags: [
3510
+ TAG_TEMPLATES.siteRoutableContent,
3511
+ TAG_TEMPLATES.siteRedirects,
3512
+ TAG_TEMPLATES.siteRouteOutcomes
3513
+ ],
3514
+ auth: "public",
3515
+ responseKind: "json",
3516
+ errors: ["validation:invalid_input", "server:internal_error"]
3517
+ },
3504
3518
  getPageByPath: {
3505
3519
  path: "/sites/{siteId}/pages",
3506
3520
  method: "GET",
@@ -7137,7 +7151,7 @@ var SimpleCache = class {
7137
7151
  };
7138
7152
 
7139
7153
  // src/version.ts
7140
- var SDK_VERSION = "0.94.0";
7154
+ var SDK_VERSION = "0.96.0";
7141
7155
 
7142
7156
  // src/client/error.ts
7143
7157
  var RiverbankApiError = class _RiverbankApiError extends Error {
@@ -7304,6 +7318,7 @@ function getResilienceStatusFromError(error) {
7304
7318
  var PUBLIC_ENDPOINT_NAMES2 = [
7305
7319
  "getSite",
7306
7320
  "getContentByPath",
7321
+ "resolveRouteOutcome",
7307
7322
  "listPublishedEntries",
7308
7323
  "getPublishedEntryPreview",
7309
7324
  "getPublicFormById",
@@ -7340,6 +7355,17 @@ var API_ENDPOINTS2 = Object.freeze({
7340
7355
  auth: "public",
7341
7356
  responseKind: "json"
7342
7357
  },
7358
+ resolveRouteOutcome: {
7359
+ path: "/sites/{siteId}/route-outcome",
7360
+ method: "GET",
7361
+ tags: [
7362
+ "riverbank:site:{siteId}:routable-content",
7363
+ "riverbank:site:{siteId}:redirects",
7364
+ "riverbank:site:{siteId}:route-outcomes"
7365
+ ],
7366
+ auth: "public",
7367
+ responseKind: "json"
7368
+ },
7343
7369
  listPublishedEntries: {
7344
7370
  path: "/public/content/{siteId}/{type}/entries",
7345
7371
  method: "GET",
@@ -7506,6 +7532,10 @@ var RUNTIME_CACHE_DURABILITY_OVERRIDES = {
7506
7532
  kind: "durable-public-stale",
7507
7533
  staleTtlSec: DEFAULT_STALE_TTL_SEC
7508
7534
  },
7535
+ resolveRouteOutcome: {
7536
+ kind: "memory-only",
7537
+ reason: "durable_rollout_pending"
7538
+ },
7509
7539
  listPublishedEntries: {
7510
7540
  kind: "memory-only",
7511
7541
  reason: "durable_rollout_pending"
@@ -9308,6 +9338,19 @@ function createRiverbankClient(config) {
9308
9338
  { signal }
9309
9339
  );
9310
9340
  },
9341
+ async resolveRouteOutcome(params) {
9342
+ const { siteId, path: path3, preview = false, signal } = params;
9343
+ if (!siteId || !path3) {
9344
+ throw new Error("resolveRouteOutcome() requires siteId and path");
9345
+ }
9346
+ return unwrapResponse(
9347
+ await apiClient({
9348
+ endpoint: "resolveRouteOutcome",
9349
+ params: { siteId, path: path3, preview: String(preview) },
9350
+ options: { signal }
9351
+ })
9352
+ );
9353
+ },
9311
9354
  async getAllPublishedRoutes(params) {
9312
9355
  const { siteId, signal } = params;
9313
9356
  if (!siteId) {
@@ -0,0 +1,120 @@
1
+ // src/next/route-outcome-proxy.ts
2
+ import { NextResponse } from "next/server";
3
+
4
+ // ../core/src/assert-never.ts
5
+ function assertNever(value, message = "Unexpected variant") {
6
+ throw new Error(`${message}: ${String(value)}`);
7
+ }
8
+
9
+ // src/next/redirect-destination.ts
10
+ function normalizeIncomingSearch(search) {
11
+ if (!search) return "";
12
+ if (typeof search === "string") {
13
+ return search.startsWith("?") ? search.slice(1) : search;
14
+ }
15
+ if (search instanceof URLSearchParams) {
16
+ return search.toString();
17
+ }
18
+ const params = new URLSearchParams();
19
+ for (const [key, value] of Object.entries(search)) {
20
+ if (value === void 0) continue;
21
+ if (Array.isArray(value)) {
22
+ for (const item of value) {
23
+ params.append(key, item);
24
+ }
25
+ continue;
26
+ }
27
+ params.set(key, value);
28
+ }
29
+ return params.toString();
30
+ }
31
+ function destinationHasSearch(destination) {
32
+ const queryIndex = destination.indexOf("?");
33
+ if (queryIndex === -1) return false;
34
+ const hashIndex = destination.indexOf("#");
35
+ return hashIndex === -1 || queryIndex < hashIndex;
36
+ }
37
+ function appendSearchToRedirectDestination(destination, incomingSearch) {
38
+ const search = normalizeIncomingSearch(incomingSearch);
39
+ if (!search || destinationHasSearch(destination)) {
40
+ return destination;
41
+ }
42
+ const hashIndex = destination.indexOf("#");
43
+ if (hashIndex === -1) {
44
+ return `${destination}?${search}`;
45
+ }
46
+ return `${destination.slice(0, hashIndex)}?${search}${destination.slice(hashIndex)}`;
47
+ }
48
+
49
+ // src/next/route-outcome-proxy.ts
50
+ var SKIP_PATH_PATTERNS = [
51
+ /^\/_next(?:\/|$)/,
52
+ /^\/api(?:\/|$)/,
53
+ /^\/favicon\.ico$/,
54
+ /^\/robots\.txt$/,
55
+ /^\/sitemap\.xml$/
56
+ ];
57
+ function shouldSkipPath(pathname) {
58
+ return SKIP_PATH_PATTERNS.some((pattern) => pattern.test(pathname));
59
+ }
60
+ function normalizeRedirectStatus(status) {
61
+ switch (status) {
62
+ case 302:
63
+ case 307:
64
+ case 308:
65
+ return status;
66
+ case 301:
67
+ case void 0:
68
+ default:
69
+ return 301;
70
+ }
71
+ }
72
+ function planRouteOutcomeRedirect(outcome) {
73
+ switch (outcome.type) {
74
+ case "redirect":
75
+ return {
76
+ kind: "redirect",
77
+ destination: outcome.destination,
78
+ status: normalizeRedirectStatus(outcome.status)
79
+ };
80
+ case "content":
81
+ case "notFound":
82
+ case "loadFailed":
83
+ return { kind: "passThrough" };
84
+ default:
85
+ return assertNever(outcome, "Unexpected route outcome");
86
+ }
87
+ }
88
+ async function handleRouteOutcomeRedirect(request, options) {
89
+ const { pathname, search } = request.nextUrl;
90
+ if (shouldSkipPath(pathname)) {
91
+ return null;
92
+ }
93
+ try {
94
+ const outcome = await options.client.resolveRouteOutcome({
95
+ siteId: options.siteId,
96
+ path: pathname,
97
+ preview: false
98
+ });
99
+ const plan = planRouteOutcomeRedirect(outcome);
100
+ if (plan.kind === "passThrough") {
101
+ return null;
102
+ }
103
+ const destination = new URL(
104
+ appendSearchToRedirectDestination(plan.destination, search),
105
+ request.url
106
+ );
107
+ return NextResponse.redirect(destination, plan.status);
108
+ } catch (error) {
109
+ options.onFailure?.(error, {
110
+ siteId: options.siteId,
111
+ path: pathname,
112
+ preview: false
113
+ });
114
+ return null;
115
+ }
116
+ }
117
+ export {
118
+ handleRouteOutcomeRedirect,
119
+ planRouteOutcomeRedirect
120
+ };