@riverbankcms/sdk 0.84.2 → 0.88.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PreviewEditorSidebar-4PH35ZIE.mjs → PreviewEditorSidebar-EVRS3C7T.mjs} +3 -3
- package/dist/{PreviewEditorUI-WHMCRJGM.mjs → PreviewEditorUI-54WD4IGE.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-ZALZDJEK.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +684 -0
- package/dist/_dts/api/src/endpoints.d.ts +58 -14
- package/dist/_dts/api/src/index.d.ts +4 -1
- package/dist/_dts/api/src/launchReadiness.d.ts +3 -3
- package/dist/_dts/api/src/mailchimpIntegration.d.ts +215 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +35 -15
- package/dist/_dts/api/src/siteInfrastructure.d.ts +0 -14
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -13
- package/dist/_dts/api/src/types.d.ts +6 -3
- package/dist/_dts/blocks/src/PageRenderer.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -0
- package/dist/_dts/blocks/src/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +42 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +42 -42
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup-destination.d.ts +300 -0
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +63 -3
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +288 -288
- package/dist/_dts/blocks/src/system/fragments/library/newsletterForm.d.ts +53 -1
- package/dist/_dts/blocks/src/system/manifest/richTextSchema.d.ts +27 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +23 -23
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +10 -2
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +11 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +15 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.submission.d.ts +32 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/ModalShell.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/shared/utils/formatting.d.ts +1 -1
- package/dist/_dts/content-model/src/referenceFields.d.ts +1 -1
- package/dist/_dts/core/src/currency-format.d.ts +37 -2
- package/dist/_dts/core/src/event-pricing.d.ts +24 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +551 -20
- package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +3 -1
- package/dist/_dts/sdk/src/cli/canonical-entry-policy.d.ts +53 -0
- package/dist/_dts/sdk/src/cli/commands/migrate.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/commands/pull.d.ts +7 -1
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/migrations/events.d.ts +73 -0
- package/dist/_dts/sdk/src/client/types.d.ts +9 -0
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +3 -0
- package/dist/_dts/sdk/src/data/prefetchBlockData.d.ts +3 -9
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +1 -1
- package/dist/_dts/sdk/src/manifest/three-pass-converter.d.ts +7 -18
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +7 -3
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +4 -24
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +45 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +57 -0
- package/dist/_dts/surfaces/src/index.d.ts +12 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +9 -9
- package/dist/_dts/theme-core/src/schema.d.ts +11 -11
- package/dist/{chunk-ZR2GQK2A.mjs → chunk-7KOO7RPP.mjs} +953 -315
- package/dist/{chunk-OCGTXHSO.mjs → chunk-ER4UIW4X.mjs} +7 -7
- package/dist/{chunk-WFPYN7KA.mjs → chunk-HVOBXA3Y.mjs} +2 -2
- package/dist/{chunk-NFWGLRZZ.mjs → chunk-K3JWH6HE.mjs} +37 -3
- package/dist/{chunk-4QNLOTES.mjs → chunk-O4LVYUVH.mjs} +58 -14
- package/dist/{chunk-PYDHOMEO.mjs → chunk-YDMBIIS5.mjs} +1 -1
- package/dist/cli/index.mjs +1858 -512
- package/dist/client/{accordion-2UZPBMYM.mjs → accordion-PT5CGW5N.mjs} +2 -2
- package/dist/client/{bookingForm-36CWQUMV.mjs → bookingForm-2HLRTEYS.mjs} +7 -7
- package/dist/client/bookings.mjs +51 -6
- package/dist/client/{carousel-QH77HR6X.mjs → carousel-Z2LKYSWA.mjs} +3 -3
- package/dist/client/cart-ND5IK4A6.mjs +18 -0
- package/dist/client/checkout-EYUSGAY7.mjs +18 -0
- package/dist/client/{chunk-SYIJ5JO2.mjs → chunk-6DVPO44G.mjs} +1 -1
- package/dist/client/{chunk-3C2VTPWI.mjs → chunk-BAWHZ5GM.mjs} +176 -13
- package/dist/client/{chunk-52CGCQ7B.mjs → chunk-BL66UWGD.mjs} +10 -80
- package/dist/client/{chunk-VGDBVNOO.mjs → chunk-DIRW2LNG.mjs} +241 -210
- package/dist/client/{chunk-UDNSI5PY.mjs → chunk-GOFO7HRH.mjs} +1 -2
- package/dist/client/{chunk-ZKUO52W3.mjs → chunk-H4MHEXYS.mjs} +1 -1
- package/dist/client/{chunk-ZE5G642V.mjs → chunk-LI2C6M5O.mjs} +75 -1
- package/dist/client/{chunk-3DTWLTXM.mjs → chunk-MHBEWDT7.mjs} +117 -3
- package/dist/client/{chunk-4OXKTA3D.mjs → chunk-O5JNI3E4.mjs} +2 -2
- package/dist/client/{chunk-XSV6KW4D.mjs → chunk-S4G65LGR.mjs} +1 -1
- package/dist/client/{chunk-DVNUDUVT.mjs → chunk-WBQG7VJA.mjs} +4 -1
- package/dist/client/{chunk-F5VRX5Y6.mjs → chunk-WCVK4MBJ.mjs} +1 -1
- package/dist/client/{chunk-7UCLJ5SP.mjs → chunk-X7GVFB7Y.mjs} +4 -7
- package/dist/client/client.mjs +2125 -1403
- package/dist/client/{courseRegistration-TMKU6ABO.mjs → courseRegistration-H3AZBUEG.mjs} +7 -7
- package/dist/client/{eventCalendar-G6TI32X6.mjs → eventCalendar-FPKJGLGS.mjs} +10 -11
- package/dist/client/{eventCombined-SCKEMNAR.mjs → eventCombined-QCGIZBUY.mjs} +10 -11
- package/dist/client/{eventDetails-XPIFXXPK.mjs → eventDetails-HIT3BJWU.mjs} +10 -11
- package/dist/client/{eventListing-7QFMEMGT.mjs → eventListing-R4HNWJDN.mjs} +10 -11
- package/dist/client/{eventRegistration-TOODSZUI.mjs → eventRegistration-Q7BYY5HF.mjs} +10 -11
- package/dist/client/{form-MTCMVCZT.mjs → form-NI6YOG6S.mjs} +3 -3
- package/dist/client/{headerSection-Y5TMR3TW.mjs → headerSection-SDYGII36.mjs} +4 -4
- package/dist/client/hooks.mjs +1682 -1412
- package/dist/client/{locationMap-RH2LG7FZ.mjs → locationMap-BDETEUQD.mjs} +3 -4
- package/dist/client/{newsletterForm-PCAIPFMA.mjs → newsletterForm-EKYIU67X.mjs} +70 -22
- package/dist/client/{productDetail-OIGDR4YE.mjs → productDetail-5UTGNN76.mjs} +8 -9
- package/dist/client/{productList-4MA5S2CX.mjs → productList-7YA5KXZQ.mjs} +8 -9
- package/dist/client/rendering/client.mjs +753 -329
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +3786 -3034
- package/dist/client/shop-AIMUMZYC.mjs +20 -0
- package/dist/preview-next/before-render.mjs +58 -14
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/editor-chrome.css +56 -9
- package/dist/preview-next/middleware.mjs +58 -14
- package/dist/{sdk-runtime-QLOCYKVU.mjs → sdk-runtime-NW472WNT.mjs} +6 -6
- package/dist/server/components.mjs +1518 -1015
- package/dist/server/config-validation.mjs +1719 -1461
- package/dist/server/config.mjs +1719 -1461
- package/dist/server/data.mjs +1683 -1413
- package/dist/server/index.mjs +79 -17
- package/dist/server/next.mjs +1902 -1311
- package/dist/server/page-converter.mjs +2193 -1169
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1709 -1209
- package/dist/server/rendering.mjs +1894 -1347
- package/dist/server/routing.mjs +1872 -1499
- package/dist/server/server.mjs +1571 -1264
- package/dist/server/theme-bridge.mjs +234 -0
- package/dist/styles/index.css +232 -0
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-4FGSVUYI.mjs +0 -8
- package/dist/client/cart-X4YK4FTW.mjs +0 -19
- package/dist/client/checkout-OM2BEPWD.mjs +0 -19
- package/dist/client/chunk-I2MMZO53.mjs +0 -6
- package/dist/client/shop-WXSYV5QO.mjs +0 -21
|
@@ -8,5 +8,5 @@ type EventRegistrationProps = EventRegistrationSourceProps & Readonly<{
|
|
|
8
8
|
* Server-safe placeholder for event registration.
|
|
9
9
|
* Provides a static container for island hydration without importing client hooks.
|
|
10
10
|
*/
|
|
11
|
-
export declare function EventRegistrationSSR({ blockId, siteId, apiBaseUrl, portalToken, previewToken, occurrenceContext, contentEntry, events, className, buttonText, maxTickets, showVenue, showCapacity, successMessage, waitlistMessage, buttonVariant, spamProtectionEnabled, stage, supportEmail, children, }: EventRegistrationProps): React.JSX.Element;
|
|
11
|
+
export declare function EventRegistrationSSR({ blockId, siteId, apiBaseUrl, portalToken, previewToken, occurrenceContext, contentEntry, events, className, buttonText, maxTickets, showVenue, showCapacity, successMessage, waitlistMessage, buttonVariant, overlayEnabled, spamProtectionEnabled, stage, supportEmail, children, }: EventRegistrationProps): React.JSX.Element;
|
|
12
12
|
export default EventRegistrationSSR;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared utility functions for event blocks
|
|
3
3
|
*/
|
|
4
|
+
import { type PublicEventPricing } from '../../../../../../../core/src/index';
|
|
4
5
|
import type { CardOrientation, EventLayout, PublicEvent } from '../../../../blocks/events/shared/types';
|
|
5
6
|
/** Day names starting from Sunday — kept for back-compat re-export. */
|
|
6
7
|
export { DAY_NAMES, MONTH_NAMES } from '../../../../../../../calendar/src/index';
|
|
@@ -63,9 +64,18 @@ export type { CalendarViewport, CalendarViewportKind, MonthCalendarViewport, Wee
|
|
|
63
64
|
export declare function groupEventsByDate(events: PublicEvent[]): Map<string, PublicEvent[]>;
|
|
64
65
|
/**
|
|
65
66
|
* Format event price for display.
|
|
66
|
-
* @returns "Free", "
|
|
67
|
+
* @returns "Free", "£25", "£12 - £25", "Free / £12 - £25", "Course (From £40)", etc.
|
|
68
|
+
*
|
|
69
|
+
* Events render compact amounts (no trailing ".00"); the actual ADT→string
|
|
70
|
+
* mapping lives in `formatBookingPriceDisplay` in @riverbankcms/core so all
|
|
71
|
+
* surfaces stay consistent.
|
|
67
72
|
*/
|
|
68
73
|
export declare function formatEventPrice(event: PublicEvent): string;
|
|
74
|
+
/**
|
|
75
|
+
* Format an event's price directly from its pricing value (without the full
|
|
76
|
+
* event). Same output as {@link formatEventPrice}.
|
|
77
|
+
*/
|
|
78
|
+
export declare function formatEventPriceDisplay(pricing: PublicEventPricing<unknown>): string;
|
|
69
79
|
export type ResolvedEventCta = {
|
|
70
80
|
label: string;
|
|
71
81
|
href: string;
|
|
@@ -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
|
-
|
|
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 */
|
|
@@ -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 {};
|
|
@@ -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
|
|
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;
|
|
@@ -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;
|
|
@@ -1,4 +1,39 @@
|
|
|
1
|
+
declare const currencyCodeBrand: unique symbol;
|
|
1
2
|
/**
|
|
2
|
-
*
|
|
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
|
|
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;
|