@riverbankcms/sdk 0.85.0 → 0.89.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/dist/{PreviewEditorSidebar-4PH35ZIE.mjs → PreviewEditorSidebar-JDR64FEC.mjs} +3 -3
  2. package/dist/{PreviewEditorUI-WHMCRJGM.mjs → PreviewEditorUI-67TMJMAF.mjs} +3 -3
  3. package/dist/SdkPreviewModeRuntime-ZBEMRV7N.mjs +8 -0
  4. package/dist/_dts/api/src/accessAdmin.d.ts +7 -0
  5. package/dist/_dts/api/src/endpoints.d.ts +66 -14
  6. package/dist/_dts/api/src/index.d.ts +5 -2
  7. package/dist/_dts/api/src/launchReadiness.d.ts +3 -3
  8. package/dist/_dts/api/src/mailchimpIntegration.d.ts +215 -0
  9. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +35 -15
  10. package/dist/_dts/api/src/siteInfrastructure.d.ts +0 -14
  11. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +5 -1
  12. package/dist/_dts/api/src/siteMembers.d.ts +6 -1
  13. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -13
  14. package/dist/_dts/api/src/types.d.ts +7 -4
  15. package/dist/_dts/blocks/src/PageRenderer.d.ts +1 -0
  16. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -0
  17. package/dist/_dts/blocks/src/index.d.ts +2 -1
  18. package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +288 -288
  19. package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +288 -288
  20. package/dist/_dts/blocks/src/system/blocks/cart.d.ts +288 -288
  21. package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +288 -288
  22. package/dist/_dts/blocks/src/system/blocks/collection.d.ts +288 -288
  23. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +42 -0
  24. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -0
  25. package/dist/_dts/blocks/src/system/blocks/faq.d.ts +288 -288
  26. package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +288 -288
  27. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +1 -1
  28. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +42 -42
  29. package/dist/_dts/blocks/src/system/blocks/newsletter-signup-destination.d.ts +300 -0
  30. package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +63 -3
  31. package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +288 -288
  32. package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +288 -288
  33. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +288 -288
  34. package/dist/_dts/blocks/src/system/fragments/library/newsletterForm.d.ts +53 -1
  35. package/dist/_dts/blocks/src/system/icons/cta.d.ts +3 -3
  36. package/dist/_dts/blocks/src/system/icons/index.d.ts +1 -0
  37. package/dist/_dts/blocks/src/system/icons/registry.d.ts +2 -2
  38. package/dist/_dts/blocks/src/system/icons/semantic.d.ts +3 -3
  39. package/dist/_dts/blocks/src/system/icons/svg.d.ts +72 -0
  40. package/dist/_dts/blocks/src/system/manifest/richTextSchema.d.ts +27 -0
  41. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +23 -23
  42. package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +11 -2
  43. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +24 -0
  44. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +12 -0
  45. package/dist/_dts/blocks/src/system/runtime/hooks/loadStateError.d.ts +1 -0
  46. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.d.ts +1 -1
  47. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.state.d.ts +55 -0
  48. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.state.d.ts +39 -0
  49. package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFormConfig.d.ts +4 -27
  50. package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFormConfig.state.d.ts +40 -0
  51. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +20 -0
  52. package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.state.d.ts +31 -0
  53. package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.d.ts +3 -3
  54. package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.state.d.ts +39 -0
  55. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +1 -0
  56. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +4 -0
  57. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +1 -1
  58. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventPaginatedListView.client.d.ts +1 -1
  59. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +11 -1
  60. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.state.d.ts +24 -2
  61. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +15 -0
  62. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.server.d.ts +1 -1
  63. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.submission.d.ts +32 -0
  64. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +5 -1
  65. package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.d.ts +24 -0
  66. package/dist/_dts/blocks/src/system/runtime/shared/components/ModalShell.d.ts +5 -1
  67. package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.state.d.ts +35 -0
  68. package/dist/_dts/blocks/src/system/runtime/shared/utils/formatting.d.ts +1 -1
  69. package/dist/_dts/content-model/src/entry-slots/types.d.ts +54 -0
  70. package/dist/_dts/content-model/src/referenceFields.d.ts +1 -1
  71. package/dist/_dts/core/src/branded.d.ts +7 -0
  72. package/dist/_dts/core/src/currency-format.d.ts +37 -2
  73. package/dist/_dts/core/src/event-pricing.d.ts +24 -0
  74. package/dist/_dts/core/src/index.d.ts +1 -0
  75. package/dist/_dts/core/src/site-route-target.d.ts +40 -0
  76. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +705 -17
  77. package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +3 -1
  78. package/dist/_dts/media-core/src/fileDomain.d.ts +4 -0
  79. package/dist/_dts/sdk/src/client/runtimeCachePolicy.d.ts +160 -0
  80. package/dist/_dts/sdk/src/client/types.d.ts +35 -1
  81. package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
  82. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +3 -0
  83. package/dist/_dts/sdk/src/data/prefetchBlockData.d.ts +3 -9
  84. package/dist/_dts/sdk/src/index.d.ts +3 -1
  85. package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +1 -1
  86. package/dist/_dts/sdk/src/manifest/three-pass-converter.d.ts +7 -18
  87. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
  88. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -1
  89. package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +7 -3
  90. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +4 -24
  91. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +45 -0
  92. package/dist/_dts/sdk/src/version.d.ts +1 -1
  93. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  94. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +9 -9
  95. package/dist/_dts/theme-core/src/schema.d.ts +11 -11
  96. package/dist/{chunk-PYDHOMEO.mjs → chunk-7N46MZHI.mjs} +1 -1
  97. package/dist/{chunk-ZR2GQK2A.mjs → chunk-7YUAXONX.mjs} +1880 -588
  98. package/dist/{chunk-4QNLOTES.mjs → chunk-F645A5UV.mjs} +76 -14
  99. package/dist/{chunk-OCGTXHSO.mjs → chunk-HKJQERFR.mjs} +7 -7
  100. package/dist/{chunk-NFWGLRZZ.mjs → chunk-TGBJWKMP.mjs} +37 -3
  101. package/dist/{chunk-WFPYN7KA.mjs → chunk-ZQRBLCW5.mjs} +2 -2
  102. package/dist/cli/index.mjs +1075 -126
  103. package/dist/client/{accordion-2UZPBMYM.mjs → accordion-MUCVNGQ7.mjs} +2 -2
  104. package/dist/client/{bookingForm-36CWQUMV.mjs → bookingForm-PKD6EFIE.mjs} +193 -77
  105. package/dist/client/bookings.mjs +487 -197
  106. package/dist/client/{carousel-QH77HR6X.mjs → carousel-3TKQSNJC.mjs} +4 -3
  107. package/dist/client/cart-6XHSZK23.mjs +19 -0
  108. package/dist/client/checkout-FVSPM6FI.mjs +19 -0
  109. package/dist/client/{chunk-ZE5G642V.mjs → chunk-25W2EQUN.mjs} +75 -1
  110. package/dist/client/chunk-6N7YRNYU.mjs +183 -0
  111. package/dist/client/{chunk-4OXKTA3D.mjs → chunk-7DH35FGA.mjs} +2 -2
  112. package/dist/client/{chunk-3C2VTPWI.mjs → chunk-CQKKFEQD.mjs} +363 -66
  113. package/dist/client/{chunk-7UCLJ5SP.mjs → chunk-EY42X22F.mjs} +4 -7
  114. package/dist/client/{chunk-SYIJ5JO2.mjs → chunk-FHU6PFPM.mjs} +1 -1
  115. package/dist/client/{chunk-ZKUO52W3.mjs → chunk-LQFDYWPJ.mjs} +1 -1
  116. package/dist/client/chunk-RSQWWUAD.mjs +390 -0
  117. package/dist/client/{chunk-UDNSI5PY.mjs → chunk-STJ2NCQM.mjs} +2 -3
  118. package/dist/client/{chunk-VGDBVNOO.mjs → chunk-UQFY4AHX.mjs} +511 -406
  119. package/dist/client/{chunk-F5VRX5Y6.mjs → chunk-VGLXACVK.mjs} +1 -1
  120. package/dist/client/{chunk-DVNUDUVT.mjs → chunk-WBQG7VJA.mjs} +4 -1
  121. package/dist/client/{chunk-52CGCQ7B.mjs → chunk-ZJZZA5EP.mjs} +10 -80
  122. package/dist/client/{chunk-XSV6KW4D.mjs → chunk-ZT5XE7FK.mjs} +1 -1
  123. package/dist/client/client.mjs +5820 -4782
  124. package/dist/client/{courseRegistration-TMKU6ABO.mjs → courseRegistration-ATZSYDHM.mjs} +7 -7
  125. package/dist/client/{eventCalendar-G6TI32X6.mjs → eventCalendar-6T2UGKKP.mjs} +11 -11
  126. package/dist/client/{eventCombined-SCKEMNAR.mjs → eventCombined-Q4VANXVF.mjs} +11 -11
  127. package/dist/client/{eventDetails-XPIFXXPK.mjs → eventDetails-DW37E7VW.mjs} +11 -11
  128. package/dist/client/{eventListing-7QFMEMGT.mjs → eventListing-XURTSAUW.mjs} +11 -11
  129. package/dist/client/{eventRegistration-TOODSZUI.mjs → eventRegistration-MRKEVAXW.mjs} +11 -11
  130. package/dist/client/{form-MTCMVCZT.mjs → form-WZZFFGMU.mjs} +3 -3
  131. package/dist/client/{headerSection-Y5TMR3TW.mjs → headerSection-EQYVQBLM.mjs} +4 -4
  132. package/dist/client/hooks.mjs +1700 -1412
  133. package/dist/client/{locationMap-RH2LG7FZ.mjs → locationMap-MFF5VAZR.mjs} +3 -4
  134. package/dist/client/{newsletterForm-PCAIPFMA.mjs → newsletterForm-JQ77UYIE.mjs} +127 -43
  135. package/dist/client/{productDetail-OIGDR4YE.mjs → productDetail-25LMT3IZ.mjs} +9 -9
  136. package/dist/client/{productList-4MA5S2CX.mjs → productList-5ABEMKUG.mjs} +9 -9
  137. package/dist/client/rendering/client.mjs +3884 -3722
  138. package/dist/client/rendering/islands.mjs +19 -19
  139. package/dist/client/rendering.mjs +6774 -6331
  140. package/dist/client/shop-OMMQZ6YO.mjs +21 -0
  141. package/dist/preview-next/before-render.mjs +76 -14
  142. package/dist/preview-next/client/runtime.mjs +5 -5
  143. package/dist/preview-next/editor-chrome.css +56 -9
  144. package/dist/preview-next/middleware.mjs +76 -14
  145. package/dist/{sdk-runtime-QLOCYKVU.mjs → sdk-runtime-WNLBZ3ZH.mjs} +6 -6
  146. package/dist/server/components.mjs +2579 -2548
  147. package/dist/server/config-validation.mjs +1737 -1461
  148. package/dist/server/config.mjs +1737 -1461
  149. package/dist/server/data.mjs +1701 -1413
  150. package/dist/server/index.mjs +1048 -400
  151. package/dist/server/next.mjs +3602 -2858
  152. package/dist/server/page-converter.mjs +2193 -1169
  153. package/dist/server/prebuild.mjs +1 -1
  154. package/dist/server/rendering/server.mjs +2770 -2742
  155. package/dist/server/rendering.mjs +2961 -2886
  156. package/dist/server/routing.mjs +2186 -1508
  157. package/dist/server/server.mjs +2237 -1287
  158. package/dist/server/theme-bridge.mjs +260 -0
  159. package/dist/styles/index.css +258 -0
  160. package/package.json +2 -1
  161. package/dist/SdkPreviewModeRuntime-4FGSVUYI.mjs +0 -8
  162. package/dist/client/cart-X4YK4FTW.mjs +0 -19
  163. package/dist/client/checkout-OM2BEPWD.mjs +0 -19
  164. package/dist/client/chunk-3DTWLTXM.mjs +0 -204
  165. package/dist/client/chunk-I2MMZO53.mjs +0 -6
  166. package/dist/client/shop-WXSYV5QO.mjs +0 -21
@@ -16,7 +16,7 @@
16
16
  */
17
17
  import type { ApiClient } from '../../../../api/src/request';
18
18
  import type { BuiltInReferenceKind, ReferenceContentTypeKey } from '../../../../content-model/src/index';
19
- import type { SiteId } from '../../../../core/src/index';
19
+ import { type SiteId } from '../../../../core/src/index';
20
20
  import type { ReferenceWidgetItem } from './types';
21
21
  export interface ReferenceLoaderArgs {
22
22
  apiClient: ApiClient;
@@ -38,6 +38,7 @@ export declare const loadAppointmentServiceReferenceItems: ReferenceLoader<"appo
38
38
  export declare const loadAppointmentResourceReferenceItems: ReferenceLoader<"appointmentResource">;
39
39
  export declare const loadPageReferenceItems: ReferenceLoader<"page">;
40
40
  export declare const loadNewsletterListReferenceItems: ReferenceLoader<"newsletterList">;
41
+ export declare const loadMailchimpAudienceReferenceItems: ReferenceLoader<"mailchimpAudience">;
41
42
  export declare function loadDynamicContentReferenceItems({ apiClient, siteId, contentTypeKey, }: DynamicContentReferenceLoaderArgs): Promise<ReferenceWidgetItem[]>;
42
43
  /**
43
44
  * Typed map keyed by `BuiltInReferenceKind`. Adding a new built-in kind fails to
@@ -54,4 +55,5 @@ export declare const referenceLoaders: {
54
55
  readonly appointmentResource: ReferenceLoader<"appointmentResource">;
55
56
  readonly page: ReferenceLoader<"page">;
56
57
  readonly newsletterList: ReferenceLoader<"newsletterList">;
58
+ readonly mailchimpAudience: ReferenceLoader<"mailchimpAudience">;
57
59
  };
@@ -429,9 +429,13 @@ export declare const FILE_SIZE_LIMITS: {
429
429
  export declare const DEFAULT_PRIVATE_FILE_SIGNED_URL_EXPIRY_SECONDS: PositiveSeconds;
430
430
  export declare const MAX_SAFE_DOWNLOAD_FILENAME_LENGTH = 180;
431
431
  export declare function asPositiveByteCount(value: number): Result<PositiveByteCount, 'not-positive-byte-count'>;
432
+ export declare const parsePositiveByteCount: typeof asPositiveByteCount;
432
433
  export declare function asPositiveSeconds(value: number): Result<PositiveSeconds, 'not-positive-seconds'>;
434
+ export declare const parsePositiveSeconds: typeof asPositiveSeconds;
433
435
  export declare function asFileChecksumSha256(value: string): Result<FileChecksumSha256, FileChecksumSha256Error>;
436
+ export declare const parseFileChecksumSha256: typeof asFileChecksumSha256;
434
437
  export declare function asSafeDownloadFilename(value: string): Result<SafeDownloadFilename, SafeDownloadFilenameError>;
438
+ export declare const parseSafeDownloadFilename: typeof asSafeDownloadFilename;
435
439
  export declare function deriveUploadPolicy(actor: FileActor, intent: UploadIntent): Result<UploadPolicy, UploadPolicyError>;
436
440
  export declare function classifyKnownMimeType(mimeType: string | DeclaredMimeType | DetectedMimeType | undefined | null): Result<FileKind, MimeTypeClassificationError>;
437
441
  export declare function isMimeTypeAllowedForPolicy(mimeType: string | DeclaredMimeType | DetectedMimeType | undefined | null, policy: UploadPolicy): boolean;
@@ -0,0 +1,160 @@
1
+ import type { PublicEndpointName } from '../public-api/contracts';
2
+ import type { GetPageParams, GetSiteParams } from './types';
3
+ declare const publishedRuntimeCacheKeyBrand: unique symbol;
4
+ declare const publishedRuntimeCachePayloadSchemaVersionBrand: unique symbol;
5
+ export type PublishedRuntimeCacheKey = string & {
6
+ readonly [publishedRuntimeCacheKeyBrand]: 'PublishedRuntimeCacheKey';
7
+ };
8
+ export type PublishedRuntimeCachePayloadSchemaVersion = number & {
9
+ readonly [publishedRuntimeCachePayloadSchemaVersionBrand]: 'PublishedRuntimeCachePayloadSchemaVersion';
10
+ };
11
+ export declare const DEFAULT_PUBLISHED_RUNTIME_CACHE_PAYLOAD_SCHEMA_VERSION: PublishedRuntimeCachePayloadSchemaVersion;
12
+ export type RuntimeCachePolicyKind = 'durable-public-stale' | 'memory-only' | 'live-only';
13
+ export type RuntimeCacheLiveOnlyReason = 'unknown_endpoint' | 'non_get_request' | 'preview_request' | 'force_refresh' | 'opaque_batch_loader' | 'challenge_endpoint' | 'auth_required' | 'safety_sensitive_booking';
14
+ export type RuntimeCachePolicy = Readonly<{
15
+ kind: 'durable-public-stale';
16
+ endpoint: PublicEndpointName;
17
+ freshTtlSec: number;
18
+ staleTtlSec: number;
19
+ }> | Readonly<{
20
+ kind: 'memory-only';
21
+ endpoint: PublicEndpointName;
22
+ freshTtlSec: number;
23
+ reason: 'durable_rollout_pending';
24
+ }> | Readonly<{
25
+ kind: 'live-only';
26
+ endpoint: string;
27
+ reason: RuntimeCacheLiveOnlyReason;
28
+ }>;
29
+ export type RuntimeCacheParams = Readonly<Record<string, string | number | boolean | null | undefined>>;
30
+ export type ResolveRuntimeCachePolicyInput = Readonly<{
31
+ endpoint: string;
32
+ method?: string;
33
+ params?: RuntimeCacheParams;
34
+ }>;
35
+ export declare function resolveRuntimeCachePolicy(input: ResolveRuntimeCachePolicyInput): RuntimeCachePolicy;
36
+ export type GetSiteRuntimeCacheParams = Readonly<Pick<GetSiteParams, 'id' | 'slug' | 'domain' | 'currentPath' | 'force'>>;
37
+ export type GetContentByPathRuntimeCacheParams = Readonly<Pick<GetPageParams, 'siteId' | 'path' | 'preview'>>;
38
+ type KeyDeriverInputByEndpoint = Readonly<{
39
+ getSite: GetSiteRuntimeCacheParams;
40
+ getContentByPath: GetContentByPathRuntimeCacheParams;
41
+ }>;
42
+ export type PublishedRuntimeCacheKeyEndpoint = keyof typeof DURABLE_RUNTIME_CACHE_KEY_DERIVERS;
43
+ export type ParsePublishedRuntimeCacheKeyResult = Readonly<{
44
+ ok: true;
45
+ key: PublishedRuntimeCacheKey;
46
+ endpoint: PublishedRuntimeCacheKeyEndpoint;
47
+ }> | Readonly<{
48
+ ok: false;
49
+ error: 'not_string' | 'invalid_prefix' | 'unknown_endpoint' | 'invalid_param_encoding';
50
+ }>;
51
+ export type ParsePublishedRuntimeCacheKeyDetailsResult = Readonly<{
52
+ ok: true;
53
+ key: PublishedRuntimeCacheKey;
54
+ endpoint: PublishedRuntimeCacheKeyEndpoint;
55
+ normalizedParams: PublishedRuntimeNormalizedParams;
56
+ }> | Readonly<{
57
+ ok: false;
58
+ error: 'not_string' | 'invalid_prefix' | 'unknown_endpoint' | 'invalid_param_encoding';
59
+ }>;
60
+ export type ParsePublishedRuntimeCachePayloadSchemaVersionResult = Readonly<{
61
+ ok: true;
62
+ value: PublishedRuntimeCachePayloadSchemaVersion;
63
+ }> | Readonly<{
64
+ ok: false;
65
+ error: 'not_number' | 'not_integer' | 'not_positive';
66
+ }>;
67
+ export type PublishedRuntimeCacheFreshness = Readonly<{
68
+ kind: 'fresh';
69
+ staleAgeSec: 0;
70
+ }> | Readonly<{
71
+ kind: 'stale';
72
+ staleAgeSec: number;
73
+ }> | Readonly<{
74
+ kind: 'expired';
75
+ }> | Readonly<{
76
+ kind: 'invalid_timestamp';
77
+ field: 'freshUntil' | 'staleUntil';
78
+ }>;
79
+ export type ClassifyPublishedRuntimeCacheFreshnessInput = Readonly<{
80
+ freshUntil: string;
81
+ staleUntil: string;
82
+ now: Date;
83
+ }>;
84
+ export type PublishedRuntimeCacheReadInput = Readonly<{
85
+ cacheKey: PublishedRuntimeCacheKey;
86
+ endpoint: PublishedRuntimeCacheKeyEndpoint;
87
+ payloadSchemaVersion?: PublishedRuntimeCachePayloadSchemaVersion;
88
+ }>;
89
+ export type PublishedRuntimeCacheReadResult<TPayload = unknown> = Readonly<{
90
+ kind: 'hit';
91
+ freshness: 'fresh' | 'stale';
92
+ payload: TPayload;
93
+ staleAgeSec: number;
94
+ }> | Readonly<{
95
+ kind: 'miss';
96
+ reason: 'not_found' | 'expired' | 'schema_mismatch';
97
+ }> | Readonly<{
98
+ kind: 'error';
99
+ error: Readonly<{
100
+ kind: PublishedRuntimeCacheAdapterErrorKind;
101
+ message: string;
102
+ }>;
103
+ }>;
104
+ export type PublishedRuntimeCacheAdapterErrorKind = 'read_failed' | 'corrupt_row' | 'adapter_exception';
105
+ export type PublishedRuntimeCacheWriteInput<TPayload = unknown> = Readonly<{
106
+ cacheKey: PublishedRuntimeCacheKey;
107
+ endpoint: PublishedRuntimeCacheKeyEndpoint;
108
+ normalizedParams: PublishedRuntimeNormalizedParams;
109
+ payload: TPayload;
110
+ siteId?: string | null;
111
+ freshTtlSec: number;
112
+ staleTtlSec: number;
113
+ payloadSchemaVersion?: PublishedRuntimeCachePayloadSchemaVersion;
114
+ writeReason?: string;
115
+ }>;
116
+ export type PublishedRuntimeCacheAdapter = Readonly<{
117
+ read?: <TPayload = unknown>(input: PublishedRuntimeCacheReadInput) => Promise<PublishedRuntimeCacheReadResult<TPayload>>;
118
+ write?: <TPayload = unknown>(input: PublishedRuntimeCacheWriteInput<TPayload>) => void | Promise<void>;
119
+ }>;
120
+ export type DerivePublishedRuntimeCacheKeyInput = {
121
+ [E in PublishedRuntimeCacheKeyEndpoint]: Readonly<{
122
+ endpoint: E;
123
+ params: KeyDeriverInputByEndpoint[E];
124
+ }>;
125
+ }[PublishedRuntimeCacheKeyEndpoint];
126
+ export type PublishedRuntimeNormalizedParams = Readonly<Record<string, string>>;
127
+ export type PublishedRuntimeCacheKeyError = Readonly<{
128
+ kind: 'not_durable_eligible';
129
+ policy: RuntimeCachePolicy;
130
+ }> | Readonly<{
131
+ kind: 'missing_site_identity';
132
+ acceptedParams: readonly ['slug', 'domain', 'id'];
133
+ }> | Readonly<{
134
+ kind: 'missing_required_param';
135
+ endpoint: PublishedRuntimeCacheKeyEndpoint;
136
+ param: 'siteId';
137
+ }>;
138
+ export type DerivePublishedRuntimeCacheKeyResult = Readonly<{
139
+ ok: true;
140
+ endpoint: PublishedRuntimeCacheKeyEndpoint;
141
+ key: PublishedRuntimeCacheKey;
142
+ normalizedParams: PublishedRuntimeNormalizedParams;
143
+ }> | Readonly<{
144
+ ok: false;
145
+ error: PublishedRuntimeCacheKeyError;
146
+ }>;
147
+ export declare function normalizeRuntimePublicPath(value: unknown): string;
148
+ declare function deriveGetSiteKey(params: GetSiteRuntimeCacheParams): DerivePublishedRuntimeCacheKeyResult;
149
+ declare function deriveGetContentByPathKey(params: GetContentByPathRuntimeCacheParams): DerivePublishedRuntimeCacheKeyResult;
150
+ declare const DURABLE_RUNTIME_CACHE_KEY_DERIVERS: {
151
+ readonly getSite: typeof deriveGetSiteKey;
152
+ readonly getContentByPath: typeof deriveGetContentByPathKey;
153
+ };
154
+ export declare function isPublishedRuntimeCacheKeyEndpoint(value: unknown): value is PublishedRuntimeCacheKeyEndpoint;
155
+ export declare function parsePublishedRuntimeCacheKey(value: unknown): ParsePublishedRuntimeCacheKeyResult;
156
+ export declare function parsePublishedRuntimeCacheKeyDetails(value: unknown): ParsePublishedRuntimeCacheKeyDetailsResult;
157
+ export declare function parsePublishedRuntimeCachePayloadSchemaVersion(value: unknown): ParsePublishedRuntimeCachePayloadSchemaVersionResult;
158
+ export declare function classifyPublishedRuntimeCacheFreshness(input: ClassifyPublishedRuntimeCacheFreshnessInput): PublishedRuntimeCacheFreshness;
159
+ export declare function derivePublishedRuntimeCacheKey(input: DerivePublishedRuntimeCacheKeyInput): DerivePublishedRuntimeCacheKeyResult;
160
+ export {};
@@ -1,4 +1,5 @@
1
1
  import type { CheckRedirectResponse, EntriesResponse, EntryResponse, PageResponse, PublicBookingServicesResponse, PublicCoursesResponse, PublicFormResponse, PublicFormsResponse, PublicProductsResponse, PublicTeamMembersResponse, PublicMembershipsResponse, PublicPassesResponse, PublicEventDetailsResponse, PublicEventsResponse, ResolveEntrySubrouteResponse, ResolveEventOccurrenceResponse, RoutableContentResponse, SiteResponse, SitemapRoutesResponse, PublicProductCategorySelector } from '../public-api/contracts';
2
+ import type { PublishedRuntimeCacheAdapter, PublishedRuntimeCacheAdapterErrorKind } from './runtimeCachePolicy';
2
3
  export type { CheckRedirectResponse, EntriesResponse, EntryResponse, PageResponse, PublicBookingServicesResponse, PublicCoursesResponse, PublicEventsResponse, PublicFormResponse, PublicFormsResponse, PublicProductsResponse, PublicTeamMembersResponse, PublicMembershipsResponse, PublicPassesResponse, PublicEventDetailsResponse, ResolveEntrySubrouteResponse, ResolveEventOccurrenceResponse, RoutableContentResponse, SiteResponse, SitemapRoutesResponse, } from '../public-api/contracts';
3
4
  /**
4
5
  * Pagination metadata returned when `includeMeta: true`
@@ -88,12 +89,27 @@ export type GetEntriesByIdentifiersParams = {
88
89
  * Source of the data returned by a resilient fetch
89
90
  */
90
91
  export type ResilienceSource = 'live' | 'cache' | 'stale' | 'prebuild' | 'error';
92
+ export type ResilienceCacheTier = 'memory-fresh' | 'memory-stale' | 'durable-fresh' | 'durable-stale' | 'prebuild';
93
+ export type ResilienceDurableCacheDiagnostic = Readonly<{
94
+ outcome: 'miss';
95
+ reason: 'not_found' | 'expired' | 'schema_mismatch';
96
+ }> | Readonly<{
97
+ outcome: 'error';
98
+ error: Readonly<{
99
+ kind: PublishedRuntimeCacheAdapterErrorKind;
100
+ message: string;
101
+ }>;
102
+ }>;
91
103
  /**
92
104
  * Status information from a resilient fetch operation
93
105
  */
94
106
  export interface ResilienceStatus {
95
107
  /** Where the data came from */
96
108
  source: ResilienceSource;
109
+ /** More precise cache tier when source is cache/stale/prebuild */
110
+ cacheTier?: ResilienceCacheTier;
111
+ /** Durable cache miss/error details when live origin failed and no durable hit was served */
112
+ durableCache?: ResilienceDurableCacheDiagnostic;
97
113
  /** Whether this was a preview request */
98
114
  isPreview: boolean;
99
115
  /** Cache key used for this request */
@@ -243,7 +259,8 @@ export type SdkAuthConfig = {
243
259
  };
244
260
  export declare const SDK_CORRELATION_HEADER_NAMES: readonly ["x-request-id", "x-correlation-id", "x-riverbank-monitor-run-id"];
245
261
  export type SdkCorrelationHeaderName = (typeof SDK_CORRELATION_HEADER_NAMES)[number];
246
- export type SdkCorrelationHeaders = Readonly<Partial<Record<SdkCorrelationHeaderName, string>>>;
262
+ export type SdkDefaultHeaderName = SdkCorrelationHeaderName | 'x-vercel-protection-bypass';
263
+ export type SdkCorrelationHeaders = Readonly<Partial<Record<SdkDefaultHeaderName, string>>>;
247
264
  /**
248
265
  * Configuration for creating a Riverbank CMS client
249
266
  */
@@ -286,6 +303,14 @@ export interface RiverbankClientConfig {
286
303
  * Per-request headers still win when an individual SDK method supplies `options.headers`.
287
304
  */
288
305
  defaultHeaders?: SdkCorrelationHeaders;
306
+ /**
307
+ * Optional durable published runtime cache adapter.
308
+ *
309
+ * Used only for default-closed, anonymous published endpoints that the SDK
310
+ * policy marks durable-stale eligible. The SDK owns fallback ordering and
311
+ * metadata; the app owns the storage implementation.
312
+ */
313
+ publishedRuntimeCache?: PublishedRuntimeCacheAdapter;
289
314
  /**
290
315
  * Cache configuration
291
316
  */
@@ -439,10 +464,16 @@ export interface RiverbankClient {
439
464
  limit?: number;
440
465
  from?: string;
441
466
  to?: string;
467
+ afterStartsAt?: string;
468
+ afterId?: string;
442
469
  stage?: string;
443
470
  categoryIds?: string;
444
471
  venueId?: string;
472
+ staffMemberId?: string;
445
473
  kind?: 'all' | 'courses' | 'events';
474
+ eventSurface?: string;
475
+ eventPresets?: string;
476
+ scheduleScope?: string;
446
477
  /** Optional: filter to a specific content entry (event series) */
447
478
  entryId?: string;
448
479
  /** Optional: filter to a specific seriesId */
@@ -465,6 +496,9 @@ export interface RiverbankClient {
465
496
  venueId?: string;
466
497
  staffMemberId?: string;
467
498
  kind?: string;
499
+ eventSurface?: string;
500
+ eventPresets?: string;
501
+ scheduleScope?: string;
468
502
  entryId?: string;
469
503
  seriesId?: string;
470
504
  includeOccurrenceId?: string;
@@ -144,6 +144,7 @@ export declare const sdkLoaderEndpointSchema: z.ZodEnum<{
144
144
  getPublishedEntryPreview: "getPublishedEntryPreview";
145
145
  listPublishedEntries: "listPublishedEntries";
146
146
  getPublicEventDetails: "getPublicEventDetails";
147
+ listPublicRouteCandidates: "listPublicRouteCandidates";
147
148
  }>;
148
149
  export declare const loaderParamBindingSchema: z.ZodObject<{
149
150
  $bind: z.ZodObject<{
@@ -231,6 +232,7 @@ export declare const sdkConfigLoaderSchema: z.ZodObject<{
231
232
  getPublishedEntryPreview: "getPublishedEntryPreview";
232
233
  listPublishedEntries: "listPublishedEntries";
233
234
  getPublicEventDetails: "getPublicEventDetails";
235
+ listPublicRouteCandidates: "listPublicRouteCandidates";
234
236
  }>;
235
237
  params: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
236
238
  $bind: z.ZodObject<{
@@ -294,6 +296,7 @@ export declare const sdkDataLoadersSchema: z.ZodOptional<z.ZodRecord<z.ZodString
294
296
  getPublishedEntryPreview: "getPublishedEntryPreview";
295
297
  listPublishedEntries: "listPublishedEntries";
296
298
  getPublicEventDetails: "getPublicEventDetails";
299
+ listPublicRouteCandidates: "listPublicRouteCandidates";
297
300
  }>;
298
301
  params: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
299
302
  $bind: z.ZodObject<{
@@ -455,10 +455,13 @@ export type NewsletterSignupPreset = 'emailOnly' | 'emailName' | 'emailFirstLast
455
455
  export type NewsletterSignupContent = {
456
456
  title?: string | null;
457
457
  subtitle?: RichTextDoc | null;
458
+ listId?: string | null;
458
459
  preset: NewsletterSignupPreset;
460
+ includePhone?: boolean | null;
459
461
  buttonLabel?: string | null;
460
462
  successMessage?: string | null;
461
463
  privacyNote?: string | null;
464
+ tags?: string | null;
462
465
  _sectionStyles?: SectionStylesContent;
463
466
  };
464
467
  export type ContactNewsletterContent = {
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import type { PageOutline } from '../contracts';
6
6
  import type { SdkCustomBlock } from '../config/types';
7
+ import { SUPPORTED_LOADER_ENDPOINTS, type SupportedLoaderEndpoint } from '../../../blocks/src/system/data/index';
7
8
  import type { RiverbankClient } from '../client/types';
8
9
  export type PrefetchContext = {
9
10
  siteId?: string;
@@ -12,15 +13,8 @@ export type PrefetchContext = {
12
13
  root?: Record<string, unknown>;
13
14
  };
14
15
  export type ResolvedBlockData = Record<string, Record<string, unknown>>;
15
- /**
16
- * Supported loader endpoints for SDK data fetching.
17
- * Only these endpoints can be used in block data loaders when using the SDK.
18
- *
19
- * This is the SDK's public contract for whitelisted endpoints.
20
- * In the monorepo we should keep it in sync with blocks' internal list.
21
- */
22
- export declare const SUPPORTED_LOADER_ENDPOINTS: readonly ["listPublishedEntries", "getPublishedEntryPreview", "listPublicEvents", "listPublicCourses", "listPublicTeamMembers", "listPublicProducts", "listPublicPasses", "listPublicMemberships", "getPublicFormById", "getPublicBookingServices", "getPublicEventDetails"];
23
- export type SupportedLoaderEndpoint = (typeof SUPPORTED_LOADER_ENDPOINTS)[number];
16
+ export { SUPPORTED_LOADER_ENDPOINTS };
17
+ export type { SupportedLoaderEndpoint };
24
18
  /**
25
19
  * Options for SDK block data prefetching.
26
20
  */
@@ -19,12 +19,14 @@
19
19
  */
20
20
  export { createRiverbankClient, getResilienceStatusFromError, RiverbankApiError, } from './client/index';
21
21
  export { SDK_CORRELATION_HEADER_NAMES } from './client/types';
22
- export type { RiverbankClient, RiverbankClientConfig, SdkCorrelationHeaderName, SdkCorrelationHeaders, SdkAuthConfig, SiteResponse, PageResponse, EntriesResponse, EntriesResponseWithMeta, GetEntriesByIdentifiersParams, GetPageParams, GetSiteParams, PaginationMeta, EntryResponse, ResilienceConfig, ResilienceStatus, ResilientData, ResilienceSource, CircuitState, RetryConfig, CircuitBreakerConfig, } from './client/types';
22
+ export type { RiverbankClient, RiverbankClientConfig, SdkCorrelationHeaderName, SdkCorrelationHeaders, SdkAuthConfig, SiteResponse, PageResponse, EntriesResponse, EntriesResponseWithMeta, GetEntriesByIdentifiersParams, GetPageParams, GetSiteParams, PaginationMeta, EntryResponse, ResilienceConfig, ResilienceDurableCacheDiagnostic, ResilienceStatus, ResilientData, ResilienceSource, CircuitState, RetryConfig, CircuitBreakerConfig, } from './client/types';
23
23
  export { prebuildCache } from './prebuild/index';
24
24
  export type { PrebuildOptions, PrebuildResult, PrebuildProgress, PrebuildManifest, PrebuildContentType, } from './prebuild/types';
25
25
  export { PrebuildLoader, createPrebuildLoader, canUsePrebuild, } from './prebuild/loader';
26
26
  export type { PrebuildLoaderConfig, LoadResult } from './prebuild/loader';
27
27
  export type { ApiClient } from './public-api/runtime';
28
28
  export { buildEndpointURL, API_ENDPOINTS } from './public-api/runtime';
29
+ export { DEFAULT_PUBLISHED_RUNTIME_CACHE_PAYLOAD_SCHEMA_VERSION, classifyPublishedRuntimeCacheFreshness, derivePublishedRuntimeCacheKey, isPublishedRuntimeCacheKeyEndpoint, normalizeRuntimePublicPath, parsePublishedRuntimeCacheKey, parsePublishedRuntimeCacheKeyDetails, parsePublishedRuntimeCachePayloadSchemaVersion, resolveRuntimeCachePolicy, } from './client/runtimeCachePolicy';
30
+ export type { ClassifyPublishedRuntimeCacheFreshnessInput, DerivePublishedRuntimeCacheKeyInput, DerivePublishedRuntimeCacheKeyResult, GetContentByPathRuntimeCacheParams, GetSiteRuntimeCacheParams, ParsePublishedRuntimeCacheKeyResult, ParsePublishedRuntimeCacheKeyDetailsResult, ParsePublishedRuntimeCachePayloadSchemaVersionResult, PublishedRuntimeCacheAdapter, PublishedRuntimeCacheAdapterErrorKind, PublishedRuntimeCacheFreshness, PublishedRuntimeCacheKey, PublishedRuntimeCacheKeyEndpoint, PublishedRuntimeCacheKeyError, PublishedRuntimeCachePayloadSchemaVersion, PublishedRuntimeCacheReadInput, PublishedRuntimeCacheReadResult, PublishedRuntimeCacheWriteInput, PublishedRuntimeNormalizedParams, ResolveRuntimeCachePolicyInput, RuntimeCacheLiveOnlyReason, RuntimeCacheParams, RuntimeCachePolicy, RuntimeCachePolicyKind, } from './client/runtimeCachePolicy';
29
31
  export type { RiverbankSiteConfig, SiteStyleConfig, SectionBackground, SectionOptionsConfig, ContainerOptionsConfig, SectionSpacing, ContainerMaxWidth, ContainerAlignment, } from './config';
30
32
  export { SYSTEM_BLOCK_KINDS, type SystemBlockKind, type CustomBlockKind, type BlockKind, } from './types';
@@ -291,4 +291,4 @@ export interface ContentTypeSummaryForPrompt {
291
291
  isRouted: boolean;
292
292
  }
293
293
  export declare function buildContentTypePromptSection(contentTypes: ContentTypeSummaryForPrompt[]): string;
294
- export declare const PASS1_SYSTEM_PROMPT = "You are an expert at analyzing HTML/JSX markup to extract editable content fields for a CMS.\n\nYour task: Analyze the HTML/JSX markup and identify ALL pieces of content that should be editable by a user.\n\n## FIELD ECONOMY PRINCIPLES\n\n**Prefer fewer, smarter fields. CMS editors should not face 25-field forms.**\n\n1. **Use richText for formatted lists and multi-line content:**\n - Opening hours \u2192 single richText with formatted list (not 6 separate text fields)\n - Address with line breaks \u2192 single richText (not address1, address2, city, postcode)\n - Feature lists, specs, ingredients \u2192 richText with bullet list\n\n RichText supports: paragraphs, bold, italic, bullet lists, numbered lists, links.\n The CMS editor can format content naturally without rigid field structure.\n\n2. **Use repeaters only when items need individual editing/reordering:**\n - Testimonials with avatar + name + quote \u2192 repeater (each item is distinct)\n - Team members with photo + bio \u2192 repeater\n - Social links where user adds/removes platforms \u2192 repeater\n\n3. **Anti-patterns to AVOID:**\n \u274C hoursMonFriDay, hoursMonFriTime, hoursSatDay... (6+ fields for hours table)\n \u274C socialInstagram, socialFacebook, socialTwitter (proliferating similar fields)\n \u274C address1, address2, city, state, zip (5 fields for one address)\n\n \u2705 openingHours: single richText field with formatted content\n \u2705 address: single richText field with line breaks\n \u2705 socialLinks: repeater with { platform, url } IF user needs to add/remove links\n\n## Field Type Rules\n\n### Simple Fields\n- **text**: Short text (<200 chars), headings, labels, button text\n - Set multiline: true for paragraphs or text with line breaks\n - Set multiline: false for single-line text\n- **richText**: Formatted content with HTML tags (p, strong, em, ul, etc.)\n- **media**: Images (<img>) or videos (<video>)\n - defaultValue: { \"src\": \"image-url\", \"alt\": \"description\" }\n- **link**: Anchors (<a>) or buttons that navigate\n - defaultValue: { \"label\": \"visible text\" }\n - Only extract the visible text - link destinations are configured in the CMS\n\n### Container Fields\n\n- **repeater**: List of similar items that editors can add/remove/reorder\n - Use when: Multiple similar items (social links, features, team members)\n - Requires: itemLabel (singular name for item), itemFields (array of nested fields)\n - Example: Social links \u2192 repeater with itemFields: [{ id: \"platform\", type: \"text\" }, { id: \"url\", type: \"link\" }]\n\n- **group**: Related fields grouped together (NOT repeating)\n - Use when: Logically related fields that should appear together in the CMS\n - Requires: groupFields (array of nested fields)\n - Example: Contact info \u2192 group with groupFields: [{ id: \"phone\", type: \"text\" }, { id: \"email\", type: \"text\" }]\n\n### When to use each type:\n- Single value \u2192 simple field (text, richText, media, link)\n- Formatted list where structure is static \u2192 richText (opening hours, address)\n- List where items can be added/removed/reordered \u2192 repeater\n- Related fields that belong together \u2192 group\n\n## Output Requirements\n\n1. Give each field a camelCase id (e.g., headline, ctaButton, heroImage)\n2. Extract the actual content as defaultValue\n3. Describe where each field appears in htmlContext\n4. Set required: true for primary content, false for optional\n\n## Examples\n\n### Example 1: Simple Fields\n\nInput HTML:\n```html\n<section>\n <h1>Welcome to Our Site</h1>\n <p>We build amazing products.</p>\n <a href=\"/start\">Get Started</a>\n</section>\n```\n\nOutput:\n```json\n{\n \"blockId\": \"custom.hero\",\n \"blockTitle\": \"Hero Section\",\n \"blockDescription\": \"Simple hero with headline, description, and CTA\",\n \"category\": \"marketing\",\n \"fields\": [\n { \"id\": \"headline\", \"type\": \"text\", \"label\": \"Headline\", \"required\": true, \"multiline\": false, \"defaultValue\": \"Welcome to Our Site\", \"htmlContext\": \"h1 main heading\" },\n { \"id\": \"description\", \"type\": \"text\", \"label\": \"Description\", \"required\": true, \"multiline\": false, \"defaultValue\": \"We build amazing products.\", \"htmlContext\": \"p below heading\" },\n { \"id\": \"cta\", \"type\": \"link\", \"label\": \"Call to Action\", \"required\": false, \"multiline\": null, \"defaultValue\": { \"label\": \"Get Started\" }, \"htmlContext\": \"a button at bottom\" }\n ],\n \"contentTypeApproach\": { \"approach\": \"none\", \"rationale\": \"Single hero section, not list data\" }\n}\n```\n\n### Example 2: Repeater Field\n\nInput HTML with repeating social links:\n```html\n<footer>\n <div class=\"social-links\">\n <a href=\"https://instagram.com/...\"><svg>Instagram</svg></a>\n <a href=\"https://facebook.com/...\"><svg>Facebook</svg></a>\n <a href=\"https://twitter.com/...\"><svg>Twitter</svg></a>\n </div>\n</footer>\n```\n\nOutput with repeater:\n```json\n{\n \"blockId\": \"custom.footer\",\n \"blockTitle\": \"Footer\",\n \"blockDescription\": \"Footer with social links\",\n \"category\": \"layout\",\n \"fields\": [\n {\n \"id\": \"socialLinks\",\n \"type\": \"repeater\",\n \"label\": \"Social Links\",\n \"required\": false,\n \"itemLabel\": \"Link\",\n \"itemFields\": [\n { \"id\": \"platform\", \"type\": \"text\", \"label\": \"Platform\", \"required\": true },\n { \"id\": \"url\", \"type\": \"link\", \"label\": \"URL\", \"required\": true }\n ],\n \"htmlContext\": \"Row of social media icon links\"\n }\n ],\n \"contentTypeApproach\": { \"approach\": \"repeater\", \"rationale\": \"Social links are page-specific and editors need to add/remove platforms\" }\n}\n```\n";
294
+ export declare const PASS1_SYSTEM_PROMPT = "You are an expert at analyzing HTML/JSX markup to extract editable content fields for a CMS.\n\nYour task: Analyze the HTML/JSX markup and identify ALL pieces of content that should be editable by a user.\n\n## FIELD ECONOMY PRINCIPLES\n\n**Prefer fewer, smarter fields. CMS editors should not face 25-field forms.**\n\n1. **Use richText for formatted lists and multi-line content:**\n - Opening hours \u2192 single richText with formatted list (not 6 separate text fields)\n - Address with line breaks \u2192 single richText with hard line breaks / Shift+Enter between lines (not address1, address2, city, postcode)\n - Feature lists, specs, ingredients \u2192 richText with bullet list\n\n RichText supports: paragraphs, hard line breaks, bold, italic, bullet lists, numbered lists, links.\n The CMS editor can format content naturally without rigid field structure.\n For line-oriented content like addresses, opening hours, and contact details, keep one logical paragraph and use hard line breaks between lines. In the CMS editor, authors create those line breaks with Shift+Enter; Enter creates a new paragraph.\n\n2. **Use repeaters only when items need individual editing/reordering:**\n - Testimonials with avatar + name + quote \u2192 repeater (each item is distinct)\n - Team members with photo + bio \u2192 repeater\n - Social links where user adds/removes platforms \u2192 repeater\n\n3. **Anti-patterns to AVOID:**\n \u274C hoursMonFriDay, hoursMonFriTime, hoursSatDay... (6+ fields for hours table)\n \u274C socialInstagram, socialFacebook, socialTwitter (proliferating similar fields)\n \u274C address1, address2, city, state, zip (5 fields for one address)\n\n \u2705 openingHours: single richText field with formatted content / hard line breaks\n \u2705 address: single richText field with hard line breaks (Shift+Enter in the editor)\n \u2705 socialLinks: repeater with { platform, url } IF user needs to add/remove links\n\n## Field Type Rules\n\n### Simple Fields\n- **text**: Short text (<200 chars), headings, labels, button text\n - Set multiline: true for paragraphs or text with line breaks\n - Set multiline: false for single-line text\n- **richText**: Formatted content with HTML tags (p, strong, em, ul, etc.)\n- **media**: Images (<img>) or videos (<video>)\n - defaultValue: { \"src\": \"image-url\", \"alt\": \"description\" }\n- **link**: Anchors (<a>) or buttons that navigate\n - defaultValue: { \"label\": \"visible text\" }\n - Only extract the visible text - link destinations are configured in the CMS\n\n### Container Fields\n\n- **repeater**: List of similar items that editors can add/remove/reorder\n - Use when: Multiple similar items (social links, features, team members)\n - Requires: itemLabel (singular name for item), itemFields (array of nested fields)\n - Example: Social links \u2192 repeater with itemFields: [{ id: \"platform\", type: \"text\" }, { id: \"url\", type: \"link\" }]\n\n- **group**: Related fields grouped together (NOT repeating)\n - Use when: Logically related fields that should appear together in the CMS\n - Requires: groupFields (array of nested fields)\n - Example: Contact info \u2192 group with groupFields: [{ id: \"phone\", type: \"text\" }, { id: \"email\", type: \"text\" }]\n\n### When to use each type:\n- Single value \u2192 simple field (text, richText, media, link)\n- Formatted list where structure is static \u2192 richText (opening hours, address; use hard line breaks / Shift+Enter for line-oriented text)\n- List where items can be added/removed/reordered \u2192 repeater\n- Related fields that belong together \u2192 group\n\n## Output Requirements\n\n1. Give each field a camelCase id (e.g., headline, ctaButton, heroImage)\n2. Extract the actual content as defaultValue\n3. Describe where each field appears in htmlContext\n4. Set required: true for primary content, false for optional\n\n## Examples\n\n### Example 1: Simple Fields\n\nInput HTML:\n```html\n<section>\n <h1>Welcome to Our Site</h1>\n <p>We build amazing products.</p>\n <a href=\"/start\">Get Started</a>\n</section>\n```\n\nOutput:\n```json\n{\n \"blockId\": \"custom.hero\",\n \"blockTitle\": \"Hero Section\",\n \"blockDescription\": \"Simple hero with headline, description, and CTA\",\n \"category\": \"marketing\",\n \"fields\": [\n { \"id\": \"headline\", \"type\": \"text\", \"label\": \"Headline\", \"required\": true, \"multiline\": false, \"defaultValue\": \"Welcome to Our Site\", \"htmlContext\": \"h1 main heading\" },\n { \"id\": \"description\", \"type\": \"text\", \"label\": \"Description\", \"required\": true, \"multiline\": false, \"defaultValue\": \"We build amazing products.\", \"htmlContext\": \"p below heading\" },\n { \"id\": \"cta\", \"type\": \"link\", \"label\": \"Call to Action\", \"required\": false, \"multiline\": null, \"defaultValue\": { \"label\": \"Get Started\" }, \"htmlContext\": \"a button at bottom\" }\n ],\n \"contentTypeApproach\": { \"approach\": \"none\", \"rationale\": \"Single hero section, not list data\" }\n}\n```\n\n### Example 2: Repeater Field\n\nInput HTML with repeating social links:\n```html\n<footer>\n <div class=\"social-links\">\n <a href=\"https://instagram.com/...\"><svg>Instagram</svg></a>\n <a href=\"https://facebook.com/...\"><svg>Facebook</svg></a>\n <a href=\"https://twitter.com/...\"><svg>Twitter</svg></a>\n </div>\n</footer>\n```\n\nOutput with repeater:\n```json\n{\n \"blockId\": \"custom.footer\",\n \"blockTitle\": \"Footer\",\n \"blockDescription\": \"Footer with social links\",\n \"category\": \"layout\",\n \"fields\": [\n {\n \"id\": \"socialLinks\",\n \"type\": \"repeater\",\n \"label\": \"Social Links\",\n \"required\": false,\n \"itemLabel\": \"Link\",\n \"itemFields\": [\n { \"id\": \"platform\", \"type\": \"text\", \"label\": \"Platform\", \"required\": true },\n { \"id\": \"url\", \"type\": \"link\", \"label\": \"URL\", \"required\": true }\n ],\n \"htmlContext\": \"Row of social media icon links\"\n }\n ],\n \"contentTypeApproach\": { \"approach\": \"repeater\", \"rationale\": \"Social links are page-specific and editors need to add/remove platforms\" }\n}\n```\n";
@@ -10,28 +10,16 @@
10
10
  * This approach ensures CSS rules reference classNames that actually exist
11
11
  * in the layout by applying patches programmatically between passes.
12
12
  */
13
+ import { parseRichTextInlineMarkdown, parseRichTextParagraphInlineMarkdown, type TipTapNode } from '../../../blocks/src/index';
13
14
  import type { HtmlToManifestInput, HtmlToManifestOutput, ConversionResult, ConverterOptions } from './types';
14
15
  import { DEFAULT_MANIFEST_MODEL } from './constants';
15
16
  export { DEFAULT_MANIFEST_MODEL };
16
- interface TipTapNode {
17
- type: string;
18
- content?: TipTapNode[];
19
- text?: string;
20
- marks?: Array<{
21
- type: string;
22
- }>;
23
- }
24
- /**
25
- * Parse inline markdown (bold only) into TipTap text nodes.
26
- *
27
- * Only bold (**text**) is supported because LLM-generated rich text defaults
28
- * typically only use bold for emphasis. Other markdown features (italic, links,
29
- * headings) are not expected in field default values and would add complexity
30
- * without meaningful benefit.
31
- */
32
- declare function parseInlineMarkdown(text: string): TipTapNode[];
33
17
  /**
34
18
  * Convert a plain string (or simple markdown) to TipTap doc format.
19
+ *
20
+ * Double newlines create semantic paragraphs. Single newlines remain inside the
21
+ * current paragraph as TipTap hardBreak nodes for line-oriented content such as
22
+ * addresses and opening hours.
35
23
  */
36
24
  declare function stringToTipTapDoc(text: string): TipTapNode;
37
25
  /**
@@ -70,7 +58,8 @@ export declare function validateManifestOutput(data: unknown): {
70
58
  * @internal
71
59
  */
72
60
  export declare const __testing: {
73
- parseInlineMarkdown: typeof parseInlineMarkdown;
61
+ parseInlineMarkdown: typeof parseRichTextInlineMarkdown;
62
+ parseParagraphInlineMarkdown: typeof parseRichTextParagraphInlineMarkdown;
74
63
  stringToTipTapDoc: typeof stringToTipTapDoc;
75
64
  coerceRichTextDefaultValue: typeof coerceRichTextDefaultValue;
76
65
  };
@@ -2,11 +2,13 @@ import * as React from 'react';
2
2
  import type { EntrySubrouteContextData, MediaAssetIndexItem, OccurrenceContextData, PageOutline, ResolveImageUrlContextInput, RouteMap, Theme, ThemeTokens } from '../contracts';
3
3
  import type { SdkCustomBlock } from '../config/types';
4
4
  import type { BlockOverrides } from './overrides';
5
+ import type { SiteBookingOfferingPresetSummary } from '../public-api/contracts';
5
6
  export type ComponentRegistry = Record<string, React.ElementType>;
6
7
  export type PageRendererDataContext = {
7
8
  siteId?: string;
8
9
  pageId?: string;
9
10
  resolvedData?: Record<string, Record<string, unknown>>;
11
+ bookingOfferingPresets?: readonly SiteBookingOfferingPresetSummary[];
10
12
  previewStage?: 'published' | 'preview';
11
13
  routes?: RouteMap;
12
14
  pagesByIdentifier?: Record<string, string>;
@@ -1,6 +1,7 @@
1
1
  import type { ReactElement } from 'react';
2
2
  import type { EntrySubrouteContextData, MediaAssetIndexItem, OccurrenceContextData, PageOutline, RouteMap, Theme, ThemeTokens } from '../../contracts';
3
3
  import type { ResolvedBlockData } from '../../data';
4
+ import type { SiteBookingOfferingPresetSummary } from '../../public-api/contracts';
4
5
  import type { RuntimeSdkConfig } from '../helpers/loadPage';
5
6
  import { type ComponentRegistry } from '../blocks-page-renderer';
6
7
  import type { BlockOverrides } from '../overrides';
@@ -11,6 +12,7 @@ export type PageProps = {
11
12
  siteId: string;
12
13
  themeTokens?: ThemeTokens;
13
14
  resolvedData?: ResolvedBlockData;
15
+ bookingOfferingPresets?: readonly SiteBookingOfferingPresetSummary[];
14
16
  routeMap?: RouteMap;
15
17
  /** Page identifier to routeId lookup for { kind: 'page' } CTA links */
16
18
  pagesByIdentifier?: Record<string, string>;
@@ -89,4 +91,4 @@ export type PageHydrationBootstrapConfig = {
89
91
  mediaAssets?: readonly MediaAssetIndexItem[];
90
92
  };
91
93
  export declare function toPageHydrationBootstrapConfig(props: Pick<PageProps, 'siteId' | 'supabaseUrl' | 'mediaAssets'>): PageHydrationBootstrapConfig;
92
- export declare function PageContent({ page, theme, themeTokens: providedTokens, siteId, resolvedData, routeMap, pagesByIdentifier, entriesByIdentifier, wrapBlock, registry, usePlaceholders, blockOverrides, sdkConfig, customBlocks, supabaseUrl, mediaAssets, apiBaseUrl, portalToken, previewToken, dataContext, useThemeScope, }: PageProps): ReactElement;
94
+ export declare function PageContent({ page, theme, themeTokens: providedTokens, siteId, resolvedData, bookingOfferingPresets, routeMap, pagesByIdentifier, entriesByIdentifier, wrapBlock, registry, usePlaceholders, blockOverrides, sdkConfig, customBlocks, supabaseUrl, mediaAssets, apiBaseUrl, portalToken, previewToken, dataContext, useThemeScope, }: PageProps): ReactElement;
@@ -8,8 +8,8 @@ import type { MediaAssetIndexItem, RouteMap, Theme } from '../../contracts';
8
8
  import type { RiverbankClient, SiteResponse } from '../../client/types';
9
9
  import type { PageProps } from '../components/Page';
10
10
  import type { ResolvedBlockData } from '../../data/prefetchBlockData';
11
- import type { RuntimeSdkConfig } from './loadPage';
12
11
  import type { SdkCustomBlock } from '../../config/types';
12
+ import { type RuntimeSdkConfig } from './pageRuntimeSupport';
13
13
  /**
14
14
  * Site data included in content results for metadata generation.
15
15
  */
@@ -92,6 +92,8 @@ export type PageContentResult = {
92
92
  customBlocks?: SdkCustomBlock[];
93
93
  /** Pre-fetched block data for data loaders */
94
94
  resolvedData: ResolvedBlockData;
95
+ /** Selected booking offering presets exposed to SSR blocks. */
96
+ bookingOfferingPresets?: PageProps['bookingOfferingPresets'];
95
97
  /** Site data for metadata generation */
96
98
  site: SiteData;
97
99
  /**
@@ -112,7 +114,7 @@ export type PageContentResult = {
112
114
  /** ContentType -> identifier -> routeId lookup for { kind: 'entry' } CTA links */
113
115
  entriesByIdentifier?: Record<string, Record<string, string>>;
114
116
  /** Canonical media assets for resolving identifier-only media values in preview/edit UIs. */
115
- mediaAssets?: MediaAssetIndexItem[];
117
+ mediaAssets?: readonly MediaAssetIndexItem[];
116
118
  };
117
119
  /**
118
120
  * Result when path resolves to a content entry
@@ -125,6 +127,8 @@ export type EntryContentResult = {
125
127
  templatePage: PageProps['page'] | null;
126
128
  /** Pre-fetched block data for template page data loaders */
127
129
  resolvedData: ResolvedBlockData;
130
+ /** Selected booking offering presets exposed to SSR blocks. */
131
+ bookingOfferingPresets?: PageProps['bookingOfferingPresets'];
128
132
  /** Data context for template blocks (includes entry content for bindings) */
129
133
  dataContext: {
130
134
  contentEntry: Record<string, unknown>;
@@ -155,7 +159,7 @@ export type EntryContentResult = {
155
159
  /** ContentType -> identifier -> routeId lookup for { kind: 'entry' } CTA links */
156
160
  entriesByIdentifier?: Record<string, Record<string, string>>;
157
161
  /** Canonical media assets for resolving identifier-only media values in preview/edit UIs. */
158
- mediaAssets?: MediaAssetIndexItem[];
162
+ mediaAssets?: readonly MediaAssetIndexItem[];
159
163
  };
160
164
  /**
161
165
  * Discriminated union result from loadContent
@@ -3,15 +3,15 @@
3
3
  *
4
4
  * Use this in server components, getServerSideProps, or API routes.
5
5
  */
6
- import type { RiverbankClient, SiteResponse } from '../../client/types';
7
- import type { MediaAssetIndexItem } from '../../contracts';
6
+ import type { RiverbankClient } from '../../client/types';
8
7
  import type { PageProps } from '../components/Page';
9
8
  import type { DataLoaderOverrides } from '../../data/types';
9
+ import { type RuntimeSdkConfig } from './pageRuntimeSupport';
10
10
  /**
11
11
  * SDK config from API response (without siteId which is stripped at storage).
12
12
  * This is the runtime representation - for defining configs, use RiverbankSiteConfig.
13
13
  */
14
- export type RuntimeSdkConfig = NonNullable<SiteResponse['sdkConfig']>;
14
+ export type { RuntimeSdkConfig } from './pageRuntimeSupport';
15
15
  export type LoadPageParams = {
16
16
  client: RiverbankClient;
17
17
  siteId: string;
@@ -77,32 +77,12 @@ export type LoadPageParams = {
77
77
  */
78
78
  searchParams?: Record<string, string | string[] | undefined>;
79
79
  };
80
- export type LoadPageResult = Omit<PageProps, 'registry' | 'wrapBlock' | 'usePlaceholders' | 'blockOverrides'> & {
80
+ export type LoadPageResult = Omit<PageProps, 'registry' | 'wrapBlock' | 'usePlaceholders' | 'blockOverrides' | 'sdkConfig'> & {
81
81
  /**
82
82
  * SDK site configuration, if available.
83
83
  * Contains SDK-defined theme palette, section backgrounds, and style options.
84
84
  */
85
85
  sdkConfig: RuntimeSdkConfig | null;
86
- /**
87
- * Supabase storage URL for direct image access.
88
- * SDK sites use this instead of NEXT_PUBLIC_SUPABASE_URL env var.
89
- */
90
- supabaseUrl?: string;
91
- /**
92
- * Canonical media sidecar for resolving identifier-only media values on first paint.
93
- */
94
- mediaAssets?: readonly MediaAssetIndexItem[];
95
- /**
96
- * Page identifier to routeId lookup for CTA link resolution.
97
- * Used to resolve { kind: 'page', identifier: '...' } links at render time.
98
- */
99
- pagesByIdentifier?: Record<string, string>;
100
- /**
101
- * Entry identifier to routeId lookup for CTA link resolution.
102
- * Maps contentTypeKey -> identifier -> routeId.
103
- * Used to resolve { kind: 'entry', contentType: '...', identifier: '...' } links at render time.
104
- */
105
- entriesByIdentifier?: Record<string, Record<string, string>>;
106
86
  };
107
87
  /**
108
88
  * Server-side helper to fetch all data needed for <Page> component.
@@ -0,0 +1,45 @@
1
+ import type { MediaAssetIndexItem, PageOutline, RouteMap, Theme } from '../../contracts';
2
+ import type { SiteBookingOfferingPresetSummary } from '../../public-api/contracts';
3
+ import type { SiteResponse } from '../../client/types';
4
+ import type { SdkCustomBlock } from '../../config/types';
5
+ export type RuntimeSdkConfig = NonNullable<SiteResponse['sdkConfig']>;
6
+ export type SiteData = SiteResponse['site'];
7
+ export type SiteRenderSupport = Readonly<{
8
+ theme: Theme;
9
+ site: SiteData;
10
+ sdkConfig: RuntimeSdkConfig | null;
11
+ bookingOfferingPresets: readonly SiteBookingOfferingPresetSummary[];
12
+ customBlocks?: SdkCustomBlock[];
13
+ supabaseUrl?: string;
14
+ routeMap?: RouteMap;
15
+ pagesByIdentifier?: Record<string, string>;
16
+ entriesByIdentifier?: Record<string, Record<string, string>>;
17
+ mediaAssets?: readonly MediaAssetIndexItem[];
18
+ }>;
19
+ export type PageRecordForPreview = Readonly<{
20
+ id: string;
21
+ routeId?: string | null;
22
+ name: string;
23
+ path: string | null;
24
+ purpose: string;
25
+ status?: string | null;
26
+ draftStatus?: string | null;
27
+ publishedAt?: string | null;
28
+ draftTitle?: string | null;
29
+ draftPath?: string | null;
30
+ draftMetaTitle?: string | null;
31
+ draftMetaDescription?: string | null;
32
+ publishedMetaTitle?: string | null;
33
+ publishedMetaDescription?: string | null;
34
+ ogImageId?: string | null;
35
+ }>;
36
+ export declare function buildSiteRenderSupport(site: SiteResponse, mediaAssets: readonly MediaAssetIndexItem[] | undefined): SiteRenderSupport;
37
+ export declare function collectMediaAssetSidecar(mediaAssets: readonly MediaAssetIndexItem[] | null | undefined): readonly MediaAssetIndexItem[] | undefined;
38
+ export declare function buildPageOutline(input: Readonly<{
39
+ name: string;
40
+ path: string | null | undefined;
41
+ fallbackPath: string;
42
+ purpose: string;
43
+ blocks: readonly unknown[];
44
+ }>): PageOutline;
45
+ export declare function sanitizeSdkRuntimeBlockContent(blockKind: string, content: Record<string, unknown>): Record<string, unknown>;
@@ -8,4 +8,4 @@
8
8
  * 1. This constant
9
9
  * 2. The "version" field in package.json
10
10
  */
11
- export declare const SDK_VERSION = "0.85.0";
11
+ export declare const SDK_VERSION = "0.89.1";