@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
@@ -6,7 +6,29 @@ export type NewsletterFormError = Readonly<{
6
6
  kind: 'form';
7
7
  message: string;
8
8
  }>;
9
+ export type NewsletterFormSubmissionState = Readonly<{
10
+ tag: 'idle';
11
+ }> | Readonly<{
12
+ tag: 'submitting';
13
+ }> | Readonly<{
14
+ tag: 'error';
15
+ error: NewsletterFormError;
16
+ }> | Readonly<{
17
+ tag: 'success';
18
+ }>;
19
+ export type NewsletterFormSubmissionAction = Readonly<{
20
+ type: 'submitted';
21
+ }> | Readonly<{
22
+ type: 'failed';
23
+ error: NewsletterFormError;
24
+ }> | Readonly<{
25
+ type: 'succeeded';
26
+ }>;
27
+ export declare const initialNewsletterFormSubmissionState: NewsletterFormSubmissionState;
28
+ export declare function newsletterFormSubmissionReducer(state: NewsletterFormSubmissionState, action: NewsletterFormSubmissionAction): NewsletterFormSubmissionState;
9
29
  export declare function newsletterFieldError(fieldId: string, message: string): NewsletterFormError;
10
30
  export declare function newsletterFormError(message: string): NewsletterFormError;
11
- export declare function getNewsletterFieldError(error: NewsletterFormError | null, fieldId: string): string | null;
12
- export declare function getNewsletterFormError(error: NewsletterFormError | null): string | null;
31
+ export declare function isNewsletterFormSubmitting(state: NewsletterFormSubmissionState): boolean;
32
+ export declare function isNewsletterFormSuccess(state: NewsletterFormSubmissionState): boolean;
33
+ export declare function getNewsletterSubmissionFieldError(state: NewsletterFormSubmissionState, fieldId: string): string | null;
34
+ export declare function getNewsletterSubmissionFormError(state: NewsletterFormSubmissionState): string | null;
@@ -1,9 +1,12 @@
1
1
  import { type InteractiveIslandProps } from '../../../contracts/islands';
2
+ import { type NewsletterSignupDestinationProvider, type NewsletterSignupPublicDestinationRef } from '../../blocks/newsletter-signup-destination';
2
3
  import { type NewsletterFieldDef, type NewsletterPreset } from './newsletter-form.types';
3
4
  export type NewsletterFormSourceProps = Readonly<{
5
+ blockId?: string | null;
4
6
  siteId?: string;
5
7
  apiBaseUrl?: string;
6
8
  listId?: string | null;
9
+ destinationProvider?: NewsletterSignupDestinationProvider | null;
7
10
  preset?: NewsletterPreset;
8
11
  includePhone?: boolean;
9
12
  buttonLabel?: string | null;
@@ -22,6 +25,7 @@ export type NewsletterFormDisplay = Readonly<{
22
25
  fields: readonly NewsletterFieldDef[];
23
26
  }>;
24
27
  export type NewsletterFormHydration = Readonly<{
28
+ destinationRef?: NewsletterSignupPublicDestinationRef | null;
25
29
  listId?: string | null;
26
30
  preset: NewsletterPreset;
27
31
  includePhone: boolean;
@@ -37,9 +41,11 @@ export type NewsletterFormInteractiveIslandProps = InteractiveIslandProps<Newsle
37
41
  export declare const newsletterFormBlockRuntime: Readonly<{
38
42
  kind: "progressive";
39
43
  buildRender: (source: Readonly<{
44
+ blockId?: string | null;
40
45
  siteId?: string;
41
46
  apiBaseUrl?: string;
42
47
  listId?: string | null;
48
+ destinationProvider?: NewsletterSignupDestinationProvider | null;
43
49
  preset?: NewsletterPreset;
44
50
  includePhone?: boolean;
45
51
  buttonLabel?: string | null;
@@ -58,6 +64,7 @@ export declare const newsletterFormBlockRuntime: Readonly<{
58
64
  fields: readonly NewsletterFieldDef[];
59
65
  }>;
60
66
  hydration: Readonly<{
67
+ destinationRef?: NewsletterSignupPublicDestinationRef | null;
61
68
  listId?: string | null;
62
69
  preset: NewsletterPreset;
63
70
  includePhone: boolean;
@@ -68,9 +75,11 @@ export declare const newsletterFormBlockRuntime: Readonly<{
68
75
  contracts: Readonly<{
69
76
  source: Readonly<{
70
77
  encode: (value: Readonly<{
78
+ blockId?: string | null;
71
79
  siteId?: string;
72
80
  apiBaseUrl?: string;
73
81
  listId?: string | null;
82
+ destinationProvider?: NewsletterSignupDestinationProvider | null;
74
83
  preset?: NewsletterPreset;
75
84
  includePhone?: boolean;
76
85
  buttonLabel?: string | null;
@@ -81,9 +90,11 @@ export declare const newsletterFormBlockRuntime: Readonly<{
81
90
  className?: string | null;
82
91
  }>) => unknown;
83
92
  decode: (input: unknown) => import("../../../contracts").DecodeResult<Readonly<{
93
+ blockId?: string | null;
84
94
  siteId?: string;
85
95
  apiBaseUrl?: string;
86
96
  listId?: string | null;
97
+ destinationProvider?: NewsletterSignupDestinationProvider | null;
87
98
  preset?: NewsletterPreset;
88
99
  includePhone?: boolean;
89
100
  buttonLabel?: string | null;
@@ -105,6 +116,7 @@ export declare const newsletterFormBlockRuntime: Readonly<{
105
116
  fields: readonly NewsletterFieldDef[];
106
117
  }>;
107
118
  hydration: Readonly<{
119
+ destinationRef?: NewsletterSignupPublicDestinationRef | null;
108
120
  listId?: string | null;
109
121
  preset: NewsletterPreset;
110
122
  includePhone: boolean;
@@ -122,6 +134,7 @@ export declare const newsletterFormBlockRuntime: Readonly<{
122
134
  fields: readonly NewsletterFieldDef[];
123
135
  }>;
124
136
  hydration: Readonly<{
137
+ destinationRef?: NewsletterSignupPublicDestinationRef | null;
125
138
  listId?: string | null;
126
139
  preset: NewsletterPreset;
127
140
  includePhone: boolean;
@@ -150,6 +163,7 @@ export declare const newsletterFormInteractiveIslandPropsCodec: Readonly<{
150
163
  fields: readonly NewsletterFieldDef[];
151
164
  }>;
152
165
  hydration: Readonly<{
166
+ destinationRef?: NewsletterSignupPublicDestinationRef | null;
153
167
  listId?: string | null;
154
168
  preset: NewsletterPreset;
155
169
  includePhone: boolean;
@@ -175,6 +189,7 @@ export declare const newsletterFormInteractiveIslandPropsCodec: Readonly<{
175
189
  fields: readonly NewsletterFieldDef[];
176
190
  }>;
177
191
  hydration: Readonly<{
192
+ destinationRef?: NewsletterSignupPublicDestinationRef | null;
178
193
  listId?: string | null;
179
194
  preset: NewsletterPreset;
180
195
  includePhone: boolean;
@@ -6,5 +6,5 @@ import type { NewsletterFormProps } from './newsletter-form.types';
6
6
  * Renders the newsletter signup form for SSR with hydration support.
7
7
  * Uses the islands architecture pattern to hydrate on the client.
8
8
  */
9
- export declare function NewsletterFormSSR({ blockId, siteId, apiBaseUrl, listId, preset, includePhone, buttonLabel, successMessage, privacyNote, tags, spamProtectionEnabled, className, }: NewsletterFormProps): React.JSX.Element;
9
+ export declare function NewsletterFormSSR({ blockId, siteId, apiBaseUrl, listId, destinationProvider, preset, includePhone, buttonLabel, successMessage, privacyNote, tags, spamProtectionEnabled, className, }: NewsletterFormProps): React.JSX.Element;
10
10
  export default NewsletterFormSSR;
@@ -0,0 +1,32 @@
1
+ import type { NewsletterSubscribeTarget } from '../api/types';
2
+ import type { NewsletterSignupPublicDestinationRef } from '../../blocks/newsletter-signup-destination';
3
+ export type NewsletterFormRawSubmissionFields = Readonly<{
4
+ email: FormDataEntryValue | null;
5
+ firstName: FormDataEntryValue | null;
6
+ lastName: FormDataEntryValue | null;
7
+ name: FormDataEntryValue | null;
8
+ company: FormDataEntryValue | null;
9
+ phone: FormDataEntryValue | null;
10
+ website: FormDataEntryValue | null;
11
+ }>;
12
+ export type NewsletterFormSubmissionFields = Readonly<{
13
+ email: string;
14
+ firstName?: string;
15
+ lastName?: string;
16
+ name?: string;
17
+ company?: string;
18
+ phone?: string;
19
+ honeypot: string;
20
+ }>;
21
+ export type NewsletterSubmitTargetResolution = Readonly<{
22
+ tag: 'ready';
23
+ target: NewsletterSubscribeTarget;
24
+ }> | Readonly<{
25
+ tag: 'unavailable';
26
+ reason: 'missing_legacy_list';
27
+ }>;
28
+ export declare function mapNewsletterFormFieldsToSubscriberInput(fields: NewsletterFormRawSubmissionFields): NewsletterFormSubmissionFields;
29
+ export declare function resolveNewsletterSubmitTarget(input: Readonly<{
30
+ listId?: string | null;
31
+ destinationRef?: NewsletterSignupPublicDestinationRef | null;
32
+ }>): NewsletterSubmitTargetResolution;
@@ -3,7 +3,8 @@
3
3
  *
4
4
  * Shared types for the newsletter form server and client components.
5
5
  */
6
- export type NewsletterPreset = 'emailOnly' | 'emailName' | 'emailFirstLast' | 'emailNameCompany';
6
+ import type { NewsletterSignupFieldPreset } from '../../blocks/newsletter-signup-destination';
7
+ export type NewsletterPreset = NewsletterSignupFieldPreset;
7
8
  export type NewsletterFieldDef = {
8
9
  id: string;
9
10
  type: 'email' | 'text';
@@ -11,6 +12,7 @@ export type NewsletterFieldDef = {
11
12
  required: boolean;
12
13
  placeholder?: string;
13
14
  };
15
+ export type NewsletterDestinationProvider = 'riverbank' | 'mailchimp';
14
16
  export type NewsletterFormProps = {
15
17
  /** Block ID for island hydration */
16
18
  blockId?: string | null;
@@ -20,6 +22,8 @@ export type NewsletterFormProps = {
20
22
  apiBaseUrl?: string;
21
23
  /** Newsletter list ID to subscribe users to */
22
24
  listId?: string | null;
25
+ /** Active signup destination provider */
26
+ destinationProvider?: NewsletterDestinationProvider | null;
23
27
  /** Field preset configuration */
24
28
  preset?: NewsletterPreset;
25
29
  /** Adds an optional phone field to the selected preset */
@@ -0,0 +1,24 @@
1
+ export type MagicLinkSubmissionState = Readonly<{
2
+ tag: 'idle';
3
+ }> | Readonly<{
4
+ tag: 'submitting';
5
+ }> | Readonly<{
6
+ tag: 'success';
7
+ }> | Readonly<{
8
+ tag: 'error';
9
+ message: string;
10
+ }>;
11
+ export type MagicLinkSubmissionAction = Readonly<{
12
+ type: 'submit-started';
13
+ }> | Readonly<{
14
+ type: 'submit-succeeded';
15
+ }> | Readonly<{
16
+ type: 'submit-failed';
17
+ message: string;
18
+ }> | Readonly<{
19
+ type: 'reset';
20
+ }>;
21
+ export declare const initialMagicLinkSubmissionState: MagicLinkSubmissionState;
22
+ export declare function magicLinkSubmissionReducer(state: MagicLinkSubmissionState, action: MagicLinkSubmissionAction): MagicLinkSubmissionState;
23
+ export declare function isMagicLinkSubmitting(state: MagicLinkSubmissionState): boolean;
24
+ export declare function getMagicLinkError(state: MagicLinkSubmissionState): string | null;
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ type ModalShellPortalWrapperProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'className'> & Partial<Record<`data-${string}`, string>>;
2
3
  export type ModalShellProps = Readonly<{
3
4
  title: string;
4
5
  titleId: string;
@@ -6,6 +7,8 @@ export type ModalShellProps = Readonly<{
6
7
  children: React.ReactNode;
7
8
  portalRoot?: HTMLElement | null;
8
9
  portal?: boolean;
10
+ portalWrapperClassName?: string;
11
+ portalWrapperProps?: ModalShellPortalWrapperProps;
9
12
  overlayClassName: string;
10
13
  modalClassName: string;
11
14
  renderSrOnlyTitle?: boolean;
@@ -27,4 +30,5 @@ export type ModalShellProps = Readonly<{
27
30
  * focus, escape handling, body-scroll locking, overlay clicks, and optional
28
31
  * portaling into a themed root.
29
32
  */
30
- export declare function ModalShell({ title, titleId, onClose, children, portalRoot, portal, overlayClassName, modalClassName, renderSrOnlyTitle, renderHeader, headerClassName, titleClassName, closeButtonClassName, closeIcon, }: ModalShellProps): React.ReactNode;
33
+ export declare function ModalShell({ title, titleId, onClose, children, portalRoot, portal, portalWrapperClassName, portalWrapperProps, overlayClassName, modalClassName, renderSrOnlyTitle, renderHeader, headerClassName, titleClassName, closeButtonClassName, closeIcon, }: ModalShellProps): React.ReactNode;
34
+ export {};
@@ -0,0 +1,35 @@
1
+ import type { ResolveWaitlistClaimResponse } from "../api/types";
2
+ export type WaitlistClaimResolveFailure = Readonly<{
3
+ kind: "portal-login-required";
4
+ message: string;
5
+ }> | Readonly<{
6
+ kind: "error";
7
+ message: string;
8
+ }>;
9
+ export type WaitlistClaimState = Readonly<{
10
+ kind: "idle";
11
+ }> | Readonly<{
12
+ kind: "resolving";
13
+ }> | Readonly<{
14
+ kind: "resolved";
15
+ claim: ResolveWaitlistClaimResponse;
16
+ }> | WaitlistClaimResolveFailure;
17
+ export type WaitlistClaimAction = Readonly<{
18
+ type: "cleared";
19
+ }> | Readonly<{
20
+ type: "started";
21
+ }> | Readonly<{
22
+ type: "resolved";
23
+ claim: ResolveWaitlistClaimResponse;
24
+ }> | Readonly<{
25
+ type: "failed";
26
+ failure: WaitlistClaimResolveFailure;
27
+ }>;
28
+ export declare function createInitialWaitlistClaimState(hasToken: boolean): WaitlistClaimState;
29
+ export declare function waitlistClaimReducer(_state: WaitlistClaimState, action: WaitlistClaimAction): WaitlistClaimState;
30
+ export declare function toWaitlistClaimResolveFailure(error: unknown): WaitlistClaimResolveFailure;
31
+ export declare function getWaitlistClaim(state: WaitlistClaimState): ResolveWaitlistClaimResponse | null;
32
+ export declare function getWaitlistClaimError(state: WaitlistClaimState): string | null;
33
+ export declare function getWaitlistClaimLoginMessage(state: WaitlistClaimState): string | null;
34
+ export declare function requiresWaitlistClaimPortalLogin(state: WaitlistClaimState): boolean;
35
+ export declare function isWaitlistClaimLoading(state: WaitlistClaimState): boolean;
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * @param cents - Price in cents
10
10
  * @param currency - ISO 4217 currency code (e.g., 'USD', 'GBP')
11
- * @param locale - Optional locale for formatting (defaults to browser locale)
11
+ * @param locale - Optional locale override (defaults to the currency's locale)
12
12
  * @returns Formatted price string (e.g., "£100.00")
13
13
  */
14
14
  export declare function formatPrice(cents: number, currency?: string, locale?: string): string;
@@ -320,6 +320,60 @@ export type SdkEntryBlocksPatchParseError = Readonly<{
320
320
  blockKind: string;
321
321
  }>;
322
322
  export declare function parseSdkEntryBlocksPatch(blocks: unknown): EntrySlotResult<SdkEntryBlocksPatch, SdkEntryBlocksPatchParseError>;
323
+ export type SlotContainerOwner = Readonly<{
324
+ kind: 'contentEntry';
325
+ contentEntryId: EntrySlotContentEntryId;
326
+ }>;
327
+ export type SlotContainerOwnerParseError = Readonly<{
328
+ kind: 'not-object';
329
+ }> | Readonly<{
330
+ kind: 'unsupported-owner-kind';
331
+ ownerKind: unknown;
332
+ }> | Readonly<{
333
+ kind: 'invalid-content-entry-id';
334
+ error: NonEmptyStringParseError;
335
+ }>;
336
+ export declare function parseSlotContainerOwner(input: unknown): EntrySlotResult<SlotContainerOwner, SlotContainerOwnerParseError>;
337
+ export declare function slotContainerOwnerToContentVersionOwner(owner: SlotContainerOwner): ContentVersionOwner;
338
+ export declare function slotContainerOwnerToEntrySlotLookup(owner: SlotContainerOwner): Readonly<{
339
+ contentEntryId: EntrySlotContentEntryId;
340
+ }>;
341
+ export type PlannedSlotCompositionBlockWrite = Readonly<{
342
+ identifier: string | null;
343
+ blockKind: string;
344
+ purpose: string;
345
+ content: Record<string, unknown>;
346
+ orderIndex: EntrySlotBlockOrderIndex;
347
+ }>;
348
+ export type SlotCompositionMutationInput = Readonly<{
349
+ kind: 'leaveUnchanged';
350
+ }> | Readonly<{
351
+ kind: 'replaceDraftComposition';
352
+ blocks: readonly PlannedSlotCompositionBlockWrite[];
353
+ }> | Readonly<{
354
+ kind: 'publishDraftComposition';
355
+ draftVersionId: EntrySlotContentVersionId;
356
+ }>;
357
+ export type SlotCompositionMutationPlan = Readonly<{
358
+ kind: 'noChange';
359
+ owner: SlotContainerOwner;
360
+ slotKey: SlotKey;
361
+ }> | Readonly<{
362
+ kind: 'replaceDraftComposition';
363
+ owner: SlotContainerOwner;
364
+ slotKey: SlotKey;
365
+ blocks: readonly PlannedSlotCompositionBlockWrite[];
366
+ }> | Readonly<{
367
+ kind: 'publishDraftComposition';
368
+ owner: SlotContainerOwner;
369
+ slotKey: SlotKey;
370
+ draftVersionId: EntrySlotContentVersionId;
371
+ }>;
372
+ export declare function planSlotCompositionMutation(input: Readonly<{
373
+ owner: SlotContainerOwner;
374
+ slotKey: SlotKey;
375
+ mutation: SlotCompositionMutationInput;
376
+ }>): SlotCompositionMutationPlan;
323
377
  export type ContentVersionOwner = Readonly<{
324
378
  kind: 'block';
325
379
  blockId: EntrySlotBlockId;
@@ -1,4 +1,4 @@
1
- export declare const BUILT_IN_REFERENCE_KINDS: readonly ["post", "form", "bookingForm", "appointmentService", "appointmentResource", "page", "newsletterList"];
1
+ export declare const BUILT_IN_REFERENCE_KINDS: readonly ["post", "form", "bookingForm", "appointmentService", "appointmentResource", "page", "newsletterList", "mailchimpAudience"];
2
2
  export type BuiltInReferenceKind = (typeof BUILT_IN_REFERENCE_KINDS)[number];
3
3
  export type EntryPickerValueFrom = 'id' | 'identifier' | 'slug';
4
4
  declare const referenceContentTypeKeyBrand: unique symbol;
@@ -24,7 +24,9 @@ export type BrandedIdParseError = {
24
24
  export declare function expectParsedBrandedId<TBrand>(result: Result<TBrand, BrandedIdParseError>): TBrand;
25
25
  export type EventInstanceId = Brand<string, 'EventInstanceId'>;
26
26
  export type SiteId = Brand<string, 'SiteId'>;
27
+ export type SiteRouteId = Brand<string, 'SiteRouteId'>;
27
28
  export type PageId = Brand<string, 'PageId'>;
29
+ export type PageSurfaceId = Brand<string, 'PageSurfaceId'>;
28
30
  export type OccurrenceId = Brand<string, 'OccurrenceId'>;
29
31
  export type EventSeriesId = Brand<string, 'EventSeriesId'>;
30
32
  export type TicketTypeId = Brand<string, 'TicketTypeId'>;
@@ -137,7 +139,9 @@ export declare const unsafeAsEntryId: (id: string) => EntryId;
137
139
  export declare const unsafeAsPreviewEntryId: (id: string) => PreviewEntryId;
138
140
  export declare const unsafeAsEventInstanceId: (id: string) => EventInstanceId;
139
141
  export declare const unsafeAsSiteId: (id: string) => SiteId;
142
+ export declare const unsafeAsSiteRouteId: (id: string) => SiteRouteId;
140
143
  export declare const unsafeAsPageId: (id: string) => PageId;
144
+ export declare const unsafeAsPageSurfaceId: (id: string) => PageSurfaceId;
141
145
  export declare const unsafeAsOccurrenceId: (id: string) => OccurrenceId;
142
146
  export declare const unsafeAsEventSeriesId: (id: string) => EventSeriesId;
143
147
  export declare const unsafeAsTicketTypeId: (id: string) => TicketTypeId;
@@ -224,6 +228,9 @@ export declare const unsafeAsEncounterRecordId: (id: string) => EncounterRecordI
224
228
  export declare const unsafeAsRecordEntryId: (id: string) => RecordEntryId;
225
229
  export declare const unsafeAsProtectedPayloadKeyVersion: (id: string) => ProtectedPayloadKeyVersion;
226
230
  export declare const parseSiteId: (value: unknown) => Result<SiteId, BrandedIdParseError>;
231
+ export declare const parseSiteRouteId: (value: unknown) => Result<SiteRouteId, BrandedIdParseError>;
232
+ export declare const parsePageId: (value: unknown) => Result<PageId, BrandedIdParseError>;
233
+ export declare const parsePageSurfaceId: (value: unknown) => Result<PageSurfaceId, BrandedIdParseError>;
227
234
  export declare const parseOccurrenceId: (value: unknown) => Result<OccurrenceId, BrandedIdParseError>;
228
235
  export declare const parseTicketTypeId: (value: unknown) => Result<TicketTypeId, BrandedIdParseError>;
229
236
  export declare const parsePricingOptionId: (value: unknown) => Result<PricingOptionId, BrandedIdParseError>;
@@ -1,4 +1,39 @@
1
+ declare const currencyCodeBrand: unique symbol;
1
2
  /**
2
- * Format minor currency units using the locale customers expect for that code.
3
+ * A validated currency code (three ASCII letters), normalized to upper-case.
4
+ * Branding stops arbitrary strings flowing into money formatting at boundaries.
3
5
  */
4
- export declare function formatCurrencyAmount(amountCents: number, currency: string): string;
6
+ export type CurrencyCode = string & {
7
+ readonly [currencyCodeBrand]: true;
8
+ };
9
+ export declare function isCurrencyCode(value: unknown): value is CurrencyCode;
10
+ /** Parse + normalize a currency code, or return null if it isn't a 3-letter code. */
11
+ export declare function parseCurrencyCode(value: string): CurrencyCode | null;
12
+ /**
13
+ * Brand an already-trusted currency code (DB column, generated constant, fixture).
14
+ * Use `parseCurrencyCode` for untrusted boundary values.
15
+ */
16
+ export declare function unsafeCurrencyCode(value: string): CurrencyCode;
17
+ /**
18
+ * Trailing-decimal policy for a formatted amount:
19
+ * - 'exact' : the currency's natural precision (usually 2) — "£25.00"
20
+ * - 'auto' : drop trailing zeros within the currency's natural precision — "£25", "£25.50"
21
+ */
22
+ export type CurrencyDecimals = 'exact' | 'auto';
23
+ export type FormatCurrencyOptions = Readonly<{
24
+ /** Defaults to 'exact'. */
25
+ decimals?: CurrencyDecimals;
26
+ /** Override the locale; defaults to the locale customers expect for the currency. */
27
+ locale?: string;
28
+ }>;
29
+ /**
30
+ * The single currency-amount formatter for the product: minor units in,
31
+ * localized string out.
32
+ *
33
+ * The locale is derived from the currency by default, so output is deterministic
34
+ * across server and client (no SSR/hydration mismatch). All other money
35
+ * formatters in the codebase should delegate here rather than constructing their
36
+ * own `Intl.NumberFormat`.
37
+ */
38
+ export declare function formatCurrencyAmount(amountCents: number, currency: string, options?: FormatCurrencyOptions): string;
39
+ export {};
@@ -1,3 +1,4 @@
1
+ import { type CurrencyDecimals } from "./currency-format";
1
2
  export declare const EVENT_PRICING_MODES: readonly ["single", "ticket_types"];
2
3
  export type EventPricingMode = (typeof EVENT_PRICING_MODES)[number];
3
4
  export type PublicEventPricingType = "free" | "paid";
@@ -29,9 +30,15 @@ export type PublicEventTicketTypePriceDisplay = PublicEventFreePriceDisplay | Pu
29
30
  kind: "from";
30
31
  amount: number;
31
32
  currency: string;
33
+ }> | Readonly<{
34
+ kind: "range";
35
+ minAmount: number;
36
+ maxAmount: number;
37
+ currency: string;
32
38
  }> | Readonly<{
33
39
  kind: "mixed";
34
40
  paidFromAmount: number;
41
+ paidToAmount: number;
35
42
  currency: string;
36
43
  }> | Readonly<{
37
44
  kind: "unavailable";
@@ -73,3 +80,20 @@ export declare function publicEventPricingCurrency(pricing: PublicEventPricing<u
73
80
  export declare function publicEventScalarPrice(pricing: PublicEventPricing<unknown>): number | null;
74
81
  export declare function publicEventPricingMode(pricing: PublicEventPricing<unknown>): EventPricingMode | undefined;
75
82
  export declare function publicEventTicketTypes<TTicketType>(pricing: PublicEventPricing<TTicketType>): readonly TTicketType[];
83
+ export type BookingPriceDisplay = PublicEventPriceDisplay;
84
+ export type FormatBookingPriceDisplayOptions = Readonly<{
85
+ /** Trailing-decimal policy passed through to the currency formatter. */
86
+ decimals?: CurrencyDecimals;
87
+ /** Locale override; defaults to the currency's expected locale. */
88
+ locale?: string;
89
+ }>;
90
+ /**
91
+ * The single renderer for a precomputed booking price `display` ADT. This is
92
+ * the one place booking price variants map to user-facing strings — every call
93
+ * site (booking entry, events calendar, event/course details, listings, portal)
94
+ * should route through here so labels never drift. Adding a variant to the ADT
95
+ * breaks compilation here (via `assertNever`) until it is handled.
96
+ */
97
+ export declare function formatBookingPriceDisplay(display: BookingPriceDisplay, options?: FormatBookingPriceDisplayOptions): string;
98
+ /** Render an event's price directly from its pricing value. */
99
+ export declare function formatEventPricing(pricing: PublicEventPricing<unknown>, options?: FormatBookingPriceDisplayOptions): string;
@@ -42,5 +42,6 @@ export * from "./slug";
42
42
  export * from "./string";
43
43
  export * from "./uuid";
44
44
  export * from "./stable-json";
45
+ export * from "./site-route-target";
45
46
  export { disabledSelection, enabledSelection, plannerNoChange, plannerPatch, plannerUpdate, resolvePlanningDateInput, resolvePlanningNow, resolvePlanningNowDate, systemPlanningClock, } from "./planner";
46
47
  export type { DisabledSelection, EnabledSelection, OptionalSelection, PlannerNoChange, PlannerPatch, PlannerUpdate, PlanningClock, PlanningDateInput, PlanningTimeOptions, } from "./planner";
@@ -0,0 +1,40 @@
1
+ import { type BrandedIdParseError, type ContentEntryId, type PageId, type PageSurfaceId } from './branded';
2
+ import { type Result } from './result';
3
+ export declare const SITE_ROUTE_NODE_TYPES: readonly ["page", "content_entry", "page_surface"];
4
+ export type SiteRouteNodeType = (typeof SITE_ROUTE_NODE_TYPES)[number];
5
+ export type SiteRouteTarget = Readonly<{
6
+ kind: 'page';
7
+ pageId: PageId;
8
+ }> | Readonly<{
9
+ kind: 'contentEntry';
10
+ entryId: ContentEntryId;
11
+ }> | Readonly<{
12
+ kind: 'pageSurface';
13
+ surfaceId: PageSurfaceId;
14
+ }>;
15
+ export type SiteRouteTargetParseError = Readonly<{
16
+ kind: 'invalid-node-type';
17
+ nodeType: unknown;
18
+ }> | Readonly<{
19
+ kind: 'unsupported-node-type';
20
+ nodeType: string;
21
+ }> | Readonly<{
22
+ kind: 'invalid-page-id';
23
+ error: BrandedIdParseError;
24
+ }> | Readonly<{
25
+ kind: 'invalid-content-entry-id';
26
+ error: BrandedIdParseError;
27
+ }> | Readonly<{
28
+ kind: 'invalid-page-surface-id';
29
+ error: BrandedIdParseError;
30
+ }>;
31
+ export declare function parseSiteRouteTarget(input: Readonly<{
32
+ nodeType: unknown;
33
+ nodeId: unknown;
34
+ }>): Result<SiteRouteTarget, SiteRouteTargetParseError>;
35
+ export declare function siteRouteTargetNodeType(target: SiteRouteTarget): SiteRouteNodeType;
36
+ export declare function foldSiteRouteTarget<TValue>(target: SiteRouteTarget, cases: Readonly<{
37
+ page: (pageId: PageId) => TValue;
38
+ contentEntry: (entryId: ContentEntryId) => TValue;
39
+ pageSurface: (surfaceId: PageSurfaceId) => TValue;
40
+ }>): TValue;