@riverbankcms/sdk 0.135.1 → 0.136.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/CHANGELOG.md +13 -0
- package/README.md +4 -8
- package/dist/{PreviewEditorSidebar-D4p_5TdY.mjs → PreviewEditorSidebar-BU5ZlhQR.mjs} +4 -4
- package/dist/{PreviewEditorUI-D0cRoTX1.mjs → PreviewEditorUI-9XkHL-bC.mjs} +3 -3
- package/dist/{PreviewQueryProvider-DcgaESkm.mjs → PreviewQueryProvider-wbEpXryy.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-BKLtM3Nz.mjs → SdkPreviewModeRuntime-CnWmj-2B.mjs} +50 -99
- package/dist/{SiteChromeCustomizeContext-61X2m7QV.mjs → SiteChromeCustomizeContext-B6d5zkog.mjs} +2299 -1149
- package/dist/_dts/ai/src/contracts/proposals.d.ts +8 -554
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +401 -2312
- package/dist/_dts/api/src/contentRuntime.d.ts +6 -0
- package/dist/_dts/api/src/endpoints.d.ts +7 -0
- package/dist/_dts/api/src/index.d.ts +1 -0
- package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +7 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +26 -0
- package/dist/_dts/api/src/sdkBlockContentAdmission.d.ts +5 -0
- package/dist/_dts/api/src/sdkThemeWire.d.ts +6 -432
- package/dist/_dts/block-form/src/blockDraftSaveability.d.ts +2 -3
- package/dist/_dts/block-form/src/utils/slug.d.ts +6 -0
- package/dist/_dts/blocks/src/PageRenderer.d.ts +12 -6
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +48 -0
- package/dist/_dts/blocks/src/definitions.d.ts +14 -0
- package/dist/_dts/blocks/src/index.d.ts +4 -3
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +40 -0
- package/dist/_dts/blocks/src/server.d.ts +2 -2
- package/dist/_dts/blocks/src/system/data/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/data/publicLoaderCachePolicy.d.ts +78 -0
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +2 -18
- package/dist/_dts/blocks/src/system/manifest/validation.d.ts +103 -16
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +19 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +52 -0
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +44 -18
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +20 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/VerifyingTimeoutStep.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.client.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +40 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +43 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarDayCell.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarNavigationChevron.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/DayEventsModal.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModalContext.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +31 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekTimetableView.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +9 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/timetableModel.d.ts +4 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +3 -3
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +0 -1
- package/dist/_dts/calendar/src/grid.d.ts +24 -66
- package/dist/_dts/calendar/src/index.d.ts +2 -2
- package/dist/_dts/calendar/src/timetable.d.ts +5 -9
- package/dist/_dts/commerce/src/purchase/allocation.d.ts +11 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/settlement.d.ts +33 -0
- package/dist/_dts/commerce/src/purchase/stripeCheckoutReturnUrl.d.ts +8 -0
- package/dist/_dts/content-model/src/templates/defaults.d.ts +6 -0
- package/dist/_dts/core/src/slug.d.ts +20 -5
- package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/headerInteractionPaletteSurfaceState.d.ts +2 -1
- package/dist/_dts/sdk/src/client/publicLoaderCacheAccess.d.ts +6 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -1
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +10 -6
- package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +0 -1
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/helpers/footerPageOutline.d.ts +3 -0
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +3 -0
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +17 -0
- package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +9 -3
- package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/index.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/overrideResolution.d.ts +7 -4
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/cards/types.d.ts +8 -8
- package/dist/_dts/theme-core/src/data.d.ts +12 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/legacyHeaderVariant.d.ts +2 -6
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +6 -807
- package/dist/_dts/theme-core/src/schema.d.ts +452 -1278
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +213 -1
- package/dist/_dts/theme-core/src/site-styles/headerLayoutCatalog.d.ts +0 -29
- package/dist/_dts/theme-core/src/site-styles/headerLayoutStyles.d.ts +10 -0
- package/dist/_dts/theme-core/src/site-styles/headerLayoutTypes.d.ts +8 -5
- package/dist/_dts/theme-core/src/site-styles/headerOpeningForeground.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/headerStyleCompiler.d.ts +16 -2
- package/dist/_dts/theme-core/src/site-styles/headerStyleDefaults.d.ts +465 -0
- package/dist/_dts/theme-core/src/site-styles/headerStyleRecipe.d.ts +161 -0
- package/dist/client/{BookingConsentAgreement-Bz9znbpn.mjs → BookingConsentAgreement-DCch21a6.mjs} +2 -2
- package/dist/client/{DiscountCodeDisclosure-35Ru8yB9.mjs → DiscountCodeDisclosure-DIj1T59K.mjs} +1 -1
- package/dist/client/{EventCombined.client-BKB0ZxRR.mjs → EventCombined.client-BWVNlXTx.mjs} +226 -206
- package/dist/client/{EventListing.client-Dx8I21ok.mjs → EventListing.client-DVFCDe3i.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-CEWx-Bhe.mjs → LeafletStaticMap-BY5mIHw9.mjs} +1 -1
- package/dist/client/{accordion-KIDsKTwS.mjs → accordion-CK29E8rG.mjs} +1 -1
- package/dist/client/{bookingForm-D96Rmp-5.mjs → bookingForm-DFvnet-N.mjs} +5 -5
- package/dist/client/bookings.mjs +86 -47
- package/dist/client/{carousel-YwUgyL66.mjs → carousel-BVU5NQlb.mjs} +1 -1
- package/dist/client/{cart-BbwuNrUT.mjs → cart-BNItcZVa.mjs} +3 -3
- package/dist/client/{checkout-hp1ucmEY.mjs → checkout-Bu6iCdkP.mjs} +3 -3
- package/dist/client/client.mjs +1950 -1031
- package/dist/client/{context-DljQn8L5.mjs → context-BImarOAq.mjs} +12 -0
- package/dist/client/{eventCalendar-DU4iNLpo.mjs → eventCalendar-DS2h-UXD.mjs} +256 -114
- package/dist/client/{eventCombined-CZuupW8m.mjs → eventCombined-Drt4Oq9p.mjs} +3 -3
- package/dist/client/{eventDetails-DPQWwCIi.mjs → eventDetails-Bl2vWgTX.mjs} +4 -3
- package/dist/client/{eventListing-C7oMidwS.mjs → eventListing-CS7PHY7v.mjs} +3 -3
- package/dist/client/{eventRegistration-zEiunlUs.mjs → eventRegistration-D-j8eNy2.mjs} +85 -41
- package/dist/client/{form-D2KIyCVJ.mjs → form-RMpoLTyr.mjs} +2 -2
- package/dist/client/{headerSection-CK5uChUK.mjs → headerSection-BYE3Lb3k.mjs} +2 -2
- package/dist/client/hooks.mjs +2225 -276
- package/dist/client/{locationMap-DLQNH1ln.mjs → locationMap-BxSr7Kkh.mjs} +2 -2
- package/dist/client/{newsletterForm-ZuhIG7fZ.mjs → newsletterForm-DerbXwFC.mjs} +2 -2
- package/dist/client/{productDetail-7hIcGeae.mjs → productDetail-4SZCLhAf.mjs} +3 -3
- package/dist/client/{productList-T4Cii1ot.mjs → productList-D7AP4GNq.mjs} +3 -3
- package/dist/client/{propsDecoder-mB0aC_Fi.mjs → propsDecoder-pzBeCh14.mjs} +94 -24
- package/dist/client/rendering/client.mjs +758 -464
- package/dist/client/rendering/islands.mjs +17 -17
- package/dist/client/rendering.mjs +2126 -1244
- package/dist/client/{scrollToBlock-Du5mHgvL.mjs → scrollToBlock-CduAKf8T.mjs} +1 -1
- package/dist/client/{shop-B5zAcKZn.mjs → shop-Cp5p_kGe.mjs} +6 -6
- package/dist/client/{shop-commerce-BKBZB6l5.mjs → shop-commerce-DicXYaYX.mjs} +5 -5
- package/dist/client/{shop-commerce-store-Cq4qlNtQ.mjs → shop-commerce-store-CGWnpY4K.mjs} +1 -1
- package/dist/client/{shopShared-DYGzEs9D.mjs → shopShared-BDf9ljkm.mjs} +3 -3
- package/dist/client/{useEventFilters-Bphkda8m.mjs → useEventFilters-DeeyGYuk.mjs} +3 -3
- package/dist/preview-next/before-render.mjs +7 -0
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +7 -0
- package/dist/preview-next/middleware.mjs +7 -0
- package/dist/{previewAuthStore-C7ksxt5b.mjs → previewAuthStore-DbqBol0V.mjs} +7 -0
- package/dist/{sdk-runtime-BbIC8G4J.mjs → sdk-runtime-19MO27F0.mjs} +2 -2
- package/dist/{separator-CadhAtI7.mjs → separator-DaPLtJ1f.mjs} +1 -1
- package/dist/server/components.mjs +1527 -893
- package/dist/server/config-validation.mjs +65 -113
- package/dist/server/config.mjs +65 -113
- package/dist/server/data.mjs +65 -112
- package/dist/server/index.mjs +122 -4
- package/dist/server/manifest.mjs +0 -1
- package/dist/server/next.mjs +1432 -708
- package/dist/server/page-converter.mjs +58 -91
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1682 -915
- package/dist/server/rendering.mjs +1694 -1020
- package/dist/server/routing.mjs +3230 -1843
- package/dist/server/server.mjs +21710 -19779
- package/dist/server/theme-bridge.mjs +656 -264
- package/dist/server/theme.mjs +2 -17
- package/dist/styles/index.css +609 -181
- package/package.json +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { CalendarDate } from '../../../../../../../calendar/src/index';
|
|
2
3
|
import type { PublicEvent, WeekStart } from '../../../../blocks/events/shared/types';
|
|
3
4
|
type WeekTimetableViewProps = {
|
|
4
|
-
viewDate:
|
|
5
|
+
viewDate: CalendarDate;
|
|
6
|
+
today: CalendarDate;
|
|
5
7
|
events: PublicEvent[];
|
|
6
8
|
startOfWeek: WeekStart;
|
|
7
9
|
showCapacity: boolean;
|
package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { type CardRole } from "../../../../../../../theme-core/src/cards/index";
|
|
3
|
+
import { type BookingTimeZone } from "../../../../../../../core/src/index";
|
|
4
|
+
import type { CalendarDate } from '../../../../../../../calendar/src/index';
|
|
3
5
|
import type { ButtonVariant, CalendarTabViews, CalendarView, ColumnOption, EventLayout, EventScheduleScope, EventSurfaceScope, FilterAutoShow, PublicEvent, WeekStart } from "../../../../blocks/events/shared/types";
|
|
4
6
|
import { type EventListPaginationAction, type EventListPaginationMode, type EventPageSize } from "./listOptions";
|
|
5
7
|
import type { EventListingDisplay } from "../EventListing.interactive";
|
|
@@ -35,6 +37,7 @@ export type EventCollectionSourceProps = Readonly<{
|
|
|
35
37
|
buttonText?: string;
|
|
36
38
|
emptyMessage?: string;
|
|
37
39
|
className?: string;
|
|
40
|
+
bookingTimeZone?: string;
|
|
38
41
|
}>;
|
|
39
42
|
export type EventCollectionDisplay = Readonly<{
|
|
40
43
|
events: readonly PublicEvent[];
|
|
@@ -70,6 +73,10 @@ export type EventCollectionHydration = Readonly<{
|
|
|
70
73
|
eventSurface: EventSurfaceScope;
|
|
71
74
|
filterEventPresets: string | null;
|
|
72
75
|
scheduleScope: EventScheduleScope;
|
|
76
|
+
calendarContext: Readonly<{
|
|
77
|
+
timeZone: BookingTimeZone;
|
|
78
|
+
initialToday: CalendarDate;
|
|
79
|
+
}>;
|
|
73
80
|
}>;
|
|
74
81
|
export declare const eventCollectionFilterSourceSchemaShape: {
|
|
75
82
|
readonly showFilters: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
@@ -116,6 +123,7 @@ export declare const eventCollectionSourceSchemaShape: {
|
|
|
116
123
|
readonly buttonText: z.ZodOptional<z.ZodString>;
|
|
117
124
|
readonly emptyMessage: z.ZodOptional<z.ZodString>;
|
|
118
125
|
readonly className: z.ZodOptional<z.ZodString>;
|
|
126
|
+
readonly bookingTimeZone: z.ZodOptional<z.ZodString>;
|
|
119
127
|
readonly showFilters: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
120
128
|
readonly showCategoryFilter: z.ZodOptional<z.ZodEnum<{
|
|
121
129
|
auto: "auto";
|
|
@@ -1658,5 +1666,5 @@ export declare const eventCollectionDisplaySchemaShape: {
|
|
|
1658
1666
|
};
|
|
1659
1667
|
export declare const eventCollectionHydrationSchema: z.ZodType<EventCollectionHydration>;
|
|
1660
1668
|
export declare function buildEventCollectionDisplay(source: EventCollectionSourceProps): EventCollectionDisplay;
|
|
1661
|
-
export declare function buildEventCollectionHydration(source: EventCollectionSourceProps): EventCollectionHydration;
|
|
1669
|
+
export declare function buildEventCollectionHydration(source: EventCollectionSourceProps, now?: Date): EventCollectionHydration;
|
|
1662
1670
|
export declare function buildEventCollectionListingDisplay(display: EventCollectionDisplay, prefetchedEvents: boolean, className: string | null): EventListingDisplay;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* categoryColor with theme fallback). Renderers (WeekTimetableView,
|
|
7
7
|
* EventCalendar.server) consume this shape.
|
|
8
8
|
*/
|
|
9
|
-
import { type WeekStart } from '../../../../../../../calendar/src/index';
|
|
9
|
+
import { type WeekStart, type CalendarDate } from '../../../../../../../calendar/src/index';
|
|
10
10
|
import type { PublicEvent } from '../../../../blocks/events/shared/types';
|
|
11
11
|
export type TimetableEventCell = {
|
|
12
12
|
event: PublicEvent;
|
|
@@ -24,7 +24,7 @@ export type TimetableEventCell = {
|
|
|
24
24
|
isFull: boolean;
|
|
25
25
|
};
|
|
26
26
|
export type TimetableDay = {
|
|
27
|
-
date:
|
|
27
|
+
date: CalendarDate;
|
|
28
28
|
dateKey: string;
|
|
29
29
|
label: string;
|
|
30
30
|
shortLabel: string;
|
|
@@ -41,7 +41,8 @@ export type TimetableModel = {
|
|
|
41
41
|
};
|
|
42
42
|
type BuildTimetableModelInput = {
|
|
43
43
|
events: readonly PublicEvent[];
|
|
44
|
-
viewDate:
|
|
44
|
+
viewDate: CalendarDate;
|
|
45
|
+
today: CalendarDate;
|
|
45
46
|
startOfWeek: WeekStart;
|
|
46
47
|
};
|
|
47
48
|
export declare function buildTimetableModel(input: BuildTimetableModelInput): TimetableModel;
|
|
@@ -57,14 +57,14 @@ export type EventCompactDateRail = Readonly<{
|
|
|
57
57
|
export declare function formatEventCompactDateRail(isoTimestamp: string, options?: DateTimeFormatOptions): EventCompactDateRail;
|
|
58
58
|
export declare function formatTeamMemberNames(names: readonly string[]): string | null;
|
|
59
59
|
export declare function formatEventTeacherLine(event: PublicEvent): string | null;
|
|
60
|
-
export { addDays, addMonths, buildCalendarViewport, formatCalendarTitle, formatDateKey, getEndOfMonth, getMonthCalendarDays, getOrderedDayNames, getStartOfMonth,
|
|
61
|
-
export type { CalendarViewport, CalendarViewportKind, MonthCalendarViewport, WeekCalendarDays, WeekCalendarViewport, } from '../../../../../../../calendar/src/index';
|
|
60
|
+
export { addDays, addMonths, buildCalendarViewport, formatCalendarTitle, formatDateKey, getEndOfMonth, getMonthCalendarDays, getOrderedDayNames, getStartOfMonth, getWeekCalendarDays, getWeekCalendarDayTuple, isToday, MAX_EVENTS_PER_DAY, shiftCalendarAnchorDate, } from '../../../../../../../calendar/src/index';
|
|
61
|
+
export type { CalendarDate, CalendarViewport, CalendarViewportKind, MonthCalendarViewport, WeekCalendarDays, WeekCalendarViewport, } from '../../../../../../../calendar/src/index';
|
|
62
62
|
/**
|
|
63
63
|
* Group events by their local date (YYYY-MM-DD key in each event's own
|
|
64
64
|
* timezone). Thin domain wrapper over `groupItemsByDate` from the calendar
|
|
65
65
|
* package; preserves the historical `Map<string, PublicEvent[]>` shape.
|
|
66
66
|
*/
|
|
67
|
-
export declare function groupEventsByDate(events: PublicEvent[]): Map<string, PublicEvent[]>;
|
|
67
|
+
export declare function groupEventsByDate(events: PublicEvent[], calendarTimeZone: string): Map<string, PublicEvent[]>;
|
|
68
68
|
/**
|
|
69
69
|
* Format event price for display.
|
|
70
70
|
* @returns "Free", "£25", "£12 - £25", "Free / £12 - £25", "Course (From £40)", etc.
|
|
@@ -17,7 +17,6 @@ export declare const headerLogoTextVisibleTransform: TransformDefinition;
|
|
|
17
17
|
* Consumed by the site-header block's `$when` gates so the two classic rows are
|
|
18
18
|
* mutually exclusive without introducing a new top-level header variant.
|
|
19
19
|
*/
|
|
20
|
-
export declare const classicNavModeTransform: TransformDefinition;
|
|
21
20
|
declare const maxWidthClassSchema: z.ZodObject<{
|
|
22
21
|
base: z.ZodOptional<z.ZodString>;
|
|
23
22
|
container: z.ZodOptional<z.ZodString>;
|
|
@@ -1,87 +1,45 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*/
|
|
1
|
+
/** Calendar grid helpers over date-only values. */
|
|
2
|
+
export type CalendarDate = Readonly<{
|
|
3
|
+
year: number;
|
|
4
|
+
month: number;
|
|
5
|
+
day: number;
|
|
6
|
+
}>;
|
|
8
7
|
export type WeekStart = 'sunday' | 'monday';
|
|
9
8
|
export type CalendarViewportKind = 'month' | 'week';
|
|
10
|
-
export type WeekCalendarDays = readonly [
|
|
9
|
+
export type WeekCalendarDays = readonly [CalendarDate, CalendarDate, CalendarDate, CalendarDate, CalendarDate, CalendarDate, CalendarDate];
|
|
11
10
|
export type MonthCalendarViewport = Readonly<{
|
|
12
11
|
kind: 'month';
|
|
13
|
-
anchorDate:
|
|
14
|
-
days: readonly
|
|
12
|
+
anchorDate: CalendarDate;
|
|
13
|
+
days: readonly CalendarDate[];
|
|
15
14
|
title: string;
|
|
16
15
|
}>;
|
|
17
16
|
export type WeekCalendarViewport = Readonly<{
|
|
18
17
|
kind: 'week';
|
|
19
|
-
anchorDate:
|
|
18
|
+
anchorDate: CalendarDate;
|
|
20
19
|
days: WeekCalendarDays;
|
|
21
20
|
title: string;
|
|
22
21
|
}>;
|
|
23
22
|
export type CalendarViewport = MonthCalendarViewport | WeekCalendarViewport;
|
|
24
23
|
export declare const DAY_NAMES: readonly ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
25
24
|
export declare const MONTH_NAMES: readonly ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
26
|
-
/**
|
|
27
|
-
* Convention default: maximum events to show per calendar day before a
|
|
28
|
-
* "+N more" overflow indicator. Renderers may override.
|
|
29
|
-
*/
|
|
30
25
|
export declare const MAX_EVENTS_PER_DAY = 3;
|
|
31
|
-
|
|
32
|
-
export declare function
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
export declare function
|
|
39
|
-
|
|
40
|
-
export declare function
|
|
41
|
-
export declare function
|
|
42
|
-
export declare function
|
|
43
|
-
/**
|
|
44
|
-
* Add (or subtract) months to a date, clamping the day-of-month to the
|
|
45
|
-
* target month's last day. Avoids JS Date overflow (Jan 29 + 1 month → Mar 1
|
|
46
|
-
* in non-leap years).
|
|
47
|
-
*/
|
|
48
|
-
export declare function addMonths(date: Date, months: number): Date;
|
|
49
|
-
/** Add (or subtract) days while preserving local time-of-day fields. */
|
|
50
|
-
export declare function addDays(date: Date, days: number): Date;
|
|
51
|
-
/** Shift a calendar anchor by the natural unit for a viewport kind. */
|
|
52
|
-
export declare function shiftCalendarAnchorDate(date: Date, view: CalendarViewportKind, steps: number): Date;
|
|
53
|
-
/**
|
|
54
|
-
* Get an inclusive 3-month window around `date`, returned as ISO strings
|
|
55
|
-
* with UTC midnight bounds. Suitable for prefetching event windows when
|
|
56
|
-
* the consumer handles timezone conversion downstream.
|
|
57
|
-
*/
|
|
58
|
-
export declare function getThreeMonthRange(date: Date): {
|
|
59
|
-
from: string;
|
|
60
|
-
to: string;
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Build the calendar days for a month view. Returns 42 dates (6 rows × 7
|
|
64
|
-
* days) including padding from prior/next months for a stable grid.
|
|
65
|
-
*/
|
|
66
|
-
export declare function getMonthCalendarDays(year: number, month: number, startOfWeek: WeekStart): Date[];
|
|
67
|
-
/** Build the 7 dates of the week containing `baseDate`. */
|
|
68
|
-
export declare function getWeekCalendarDays(baseDate: Date, startOfWeek: WeekStart): Date[];
|
|
69
|
-
/** Build the 7 dates of the week containing `baseDate` as a fixed-width tuple. */
|
|
70
|
-
export declare function getWeekCalendarDayTuple(baseDate: Date, startOfWeek: WeekStart): WeekCalendarDays;
|
|
71
|
-
/**
|
|
72
|
-
* Day-name labels reordered for the chosen week start. Pass a custom
|
|
73
|
-
* `dayNames` array (length 7, Sunday-first) to localize.
|
|
74
|
-
*/
|
|
26
|
+
export declare function formatDateKey(date: CalendarDate): string;
|
|
27
|
+
export declare function isToday(date: CalendarDate, today: CalendarDate): boolean;
|
|
28
|
+
export declare function isSameCalendarDay(left: CalendarDate, right: CalendarDate): boolean;
|
|
29
|
+
export declare function getStartOfMonth(date: CalendarDate): CalendarDate;
|
|
30
|
+
export declare function getEndOfMonth(date: CalendarDate): CalendarDate;
|
|
31
|
+
export declare function addMonths(date: CalendarDate, months: number): CalendarDate;
|
|
32
|
+
export declare function addDays(date: CalendarDate, days: number): CalendarDate;
|
|
33
|
+
export declare function shiftCalendarAnchorDate(date: CalendarDate, view: CalendarViewportKind, steps: number): CalendarDate;
|
|
34
|
+
export declare function getMonthCalendarDays(year: number, month: number, startOfWeek: WeekStart): CalendarDate[];
|
|
35
|
+
export declare function getWeekCalendarDays(baseDate: CalendarDate, startOfWeek: WeekStart): CalendarDate[];
|
|
36
|
+
export declare function getDayOfWeek(date: CalendarDate): number;
|
|
37
|
+
export declare function getWeekCalendarDayTuple(baseDate: CalendarDate, startOfWeek: WeekStart): WeekCalendarDays;
|
|
75
38
|
export declare function getOrderedDayNames(startOfWeek: WeekStart, dayNames?: readonly string[]): string[];
|
|
76
|
-
|
|
77
|
-
* Header title for a calendar view.
|
|
78
|
-
* - month: "January 2025"
|
|
79
|
-
* - week: "January 5 - 11, 2025" or "December 30 - January 5, 2025"
|
|
80
|
-
*/
|
|
81
|
-
export declare function formatCalendarTitle(viewDate: Date, view: 'month' | 'week', days: Date[], monthNames?: readonly string[]): string;
|
|
39
|
+
export declare function formatCalendarTitle(viewDate: CalendarDate, view: CalendarViewportKind, days: readonly CalendarDate[], monthNames?: readonly string[]): string;
|
|
82
40
|
export declare function buildCalendarViewport(input: Readonly<{
|
|
83
41
|
view: CalendarViewportKind;
|
|
84
|
-
anchorDate:
|
|
42
|
+
anchorDate: CalendarDate;
|
|
85
43
|
startOfWeek: WeekStart;
|
|
86
44
|
monthNames?: readonly string[];
|
|
87
45
|
}>): CalendarViewport;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type { CalendarViewport, CalendarViewportKind, MonthCalendarViewport, WeekCalendarDays, WeekCalendarViewport, WeekStart, } from './grid';
|
|
2
|
-
export { addDays, buildCalendarViewport, getMonthCalendarDays, getWeekCalendarDays, getWeekCalendarDayTuple, getOrderedDayNames, formatCalendarTitle, formatDateKey, isToday,
|
|
1
|
+
export type { CalendarViewport, CalendarViewportKind, CalendarDate, MonthCalendarViewport, WeekCalendarDays, WeekCalendarViewport, WeekStart, } from './grid';
|
|
2
|
+
export { addDays, buildCalendarViewport, getMonthCalendarDays, getWeekCalendarDays, getWeekCalendarDayTuple, getDayOfWeek, getOrderedDayNames, formatCalendarTitle, formatDateKey, isToday, isSameCalendarDay, addMonths, shiftCalendarAnchorDate, getStartOfMonth, getEndOfMonth, DAY_NAMES, MONTH_NAMES, MAX_EVENTS_PER_DAY, } from './grid';
|
|
3
3
|
export type { TimetableInput, TimetableModel, TimetableDay, TimetableCell, TimetableBounds, TimetableDiagnostic, InvalidItemReason, TimetableView, } from './timetable';
|
|
4
4
|
export { buildTimetableModel } from './timetable';
|
|
5
5
|
export type { GroupItemsByDateAccessors } from './group';
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* the same output. The model has no opinion on what an item is — pass
|
|
10
10
|
* accessors.
|
|
11
11
|
*/
|
|
12
|
-
import { type WeekStart } from './grid';
|
|
12
|
+
import { type CalendarDate, type WeekStart } from './grid';
|
|
13
13
|
export type TimetableBounds = Readonly<{
|
|
14
14
|
/** Hour ticks below this are clipped. Default 5. */
|
|
15
15
|
minStartHour?: number;
|
|
@@ -24,7 +24,7 @@ export type TimetableBounds = Readonly<{
|
|
|
24
24
|
}>;
|
|
25
25
|
export type TimetableInput<T> = Readonly<{
|
|
26
26
|
items: readonly T[];
|
|
27
|
-
viewDate:
|
|
27
|
+
viewDate: CalendarDate;
|
|
28
28
|
view?: TimetableView;
|
|
29
29
|
startOfWeek: WeekStart;
|
|
30
30
|
getId: (item: T) => string;
|
|
@@ -35,12 +35,8 @@ export type TimetableInput<T> = Readonly<{
|
|
|
35
35
|
/** Sort tiebreak when two items have identical start+end. Defaults to getId. */
|
|
36
36
|
getOrderKey?: (item: T) => string;
|
|
37
37
|
bounds?: TimetableBounds;
|
|
38
|
-
/**
|
|
39
|
-
|
|
40
|
-
* `new Date()`; pass an explicit value to keep the model fully deterministic
|
|
41
|
-
* for snapshot tests.
|
|
42
|
-
*/
|
|
43
|
-
now?: Date;
|
|
38
|
+
/** The calendar's explicit site-local current date. */
|
|
39
|
+
today: CalendarDate;
|
|
44
40
|
}>;
|
|
45
41
|
export type InvalidItemReason = 'invalid-start' | 'invalid-end' | 'invalid-timezone' | 'non-positive-duration' | 'out-of-visible-hours';
|
|
46
42
|
export type TimetableDiagnostic<T> = Readonly<{
|
|
@@ -68,7 +64,7 @@ export type TimetableCell<T> = Readonly<{
|
|
|
68
64
|
color: string | null;
|
|
69
65
|
}>;
|
|
70
66
|
export type TimetableDay<T> = Readonly<{
|
|
71
|
-
date:
|
|
67
|
+
date: CalendarDate;
|
|
72
68
|
dateKey: string;
|
|
73
69
|
isToday: boolean;
|
|
74
70
|
cells: readonly TimetableCell<T>[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type NonNegativeCents } from '../../../core/src/index';
|
|
2
|
+
/**
|
|
3
|
+
* Allocate an integer total proportionally using largest remainders.
|
|
4
|
+
*
|
|
5
|
+
* Negative weights are treated as zero. When every weight is zero, the total
|
|
6
|
+
* is spread evenly instead, with residual units assigned in input order.
|
|
7
|
+
*/
|
|
8
|
+
export declare function allocateTotalByWeight<TLineId extends string>(total: number, lines: readonly Readonly<{
|
|
9
|
+
id: TLineId;
|
|
10
|
+
weight: number;
|
|
11
|
+
}>[]): ReadonlyMap<TLineId, NonNegativeCents>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './types';
|
|
2
|
+
export * from './allocation';
|
|
2
3
|
export * from './orderTypes';
|
|
3
4
|
export * from './orderPlanningTypes';
|
|
4
5
|
export * from './bookingInstalmentSchedule';
|
|
@@ -52,4 +53,5 @@ export * from './refundPolicy';
|
|
|
52
53
|
export * from './settlement';
|
|
53
54
|
export * from './shopRefundPlanning';
|
|
54
55
|
export * from './stripeMinimumCharge';
|
|
56
|
+
export * from './stripeCheckoutReturnUrl';
|
|
55
57
|
export * from './stateTransitions';
|
|
@@ -89,6 +89,39 @@ export declare function buildRefundableLineSettlement<TLineId extends string>(op
|
|
|
89
89
|
stripeChargeCents: number;
|
|
90
90
|
alreadyRefundedCents: number;
|
|
91
91
|
}>): Result<RefundableLineSettlement, RefundableLineSettlementError<TLineId>>;
|
|
92
|
+
export type OrderItemCashAllocation = Readonly<{
|
|
93
|
+
orderItemId: string;
|
|
94
|
+
amountCents: number;
|
|
95
|
+
}>;
|
|
96
|
+
/**
|
|
97
|
+
* Cash actually collected against one order line, summed from its payment
|
|
98
|
+
* receipt allocations. Shared so every refundable-remainder caller measures
|
|
99
|
+
* funding the same way.
|
|
100
|
+
*/
|
|
101
|
+
export declare function orderItemCashFundedCents(allocations: ReadonlyArray<OrderItemCashAllocation>, orderItemId: string): number;
|
|
102
|
+
/**
|
|
103
|
+
* Funding facts for a single order line, expressed the way the refund runtime
|
|
104
|
+
* sees them: cash actually collected against the line (payment receipt
|
|
105
|
+
* allocations), plus any store credit applied to it, minus what has already
|
|
106
|
+
* been refunded.
|
|
107
|
+
*/
|
|
108
|
+
export type OrderItemRefundFunding = Readonly<{
|
|
109
|
+
/** Cash collected for this line so far (receipt allocation totals). */
|
|
110
|
+
cashFundedCents: number;
|
|
111
|
+
/** Store credit applied to this line. */
|
|
112
|
+
creditAppliedCents: number;
|
|
113
|
+
/** Refunds already applied to this line. */
|
|
114
|
+
refundedCents: number;
|
|
115
|
+
}>;
|
|
116
|
+
/**
|
|
117
|
+
* The single authority on how much of an order line is still refundable.
|
|
118
|
+
*
|
|
119
|
+
* Every surface that shows or enforces a refundable remainder MUST go through
|
|
120
|
+
* this function. Computing it from the line's net total instead of its actual
|
|
121
|
+
* funding overstates the remainder on partially collected orders, which used to
|
|
122
|
+
* let the dashboard offer a refund the runtime then refused.
|
|
123
|
+
*/
|
|
124
|
+
export declare function orderItemRefundableRemainingCents(funding: OrderItemRefundFunding): NonNegativeCents;
|
|
92
125
|
export declare function refundableRemainingCents(settlement: RefundableLineSettlement): NonNegativeCents;
|
|
93
126
|
export declare function ensureSingleCurrency(lines: ReadonlyArray<{
|
|
94
127
|
currency: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const STRIPE_CHECKOUT_SESSION_ID_PLACEHOLDER = "{CHECKOUT_SESSION_ID}";
|
|
2
|
+
/**
|
|
3
|
+
* Completes a Stripe success URL with the session correlation parameter.
|
|
4
|
+
*
|
|
5
|
+
* URL owns the query/fragment boundary so the parameter can never be appended
|
|
6
|
+
* inside a hash fragment. Stripe requires its placeholder to remain literal.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ensureStripeCheckoutSessionIdInSuccessUrl(successUrl: string): string;
|
|
@@ -124,6 +124,9 @@ export declare const DEFAULT_TEMPLATE_DEFINITIONS: {
|
|
|
124
124
|
}, {
|
|
125
125
|
readonly blockKind: "block.body-text";
|
|
126
126
|
readonly scope: "entry";
|
|
127
|
+
readonly content: {
|
|
128
|
+
readonly body: import("../../../core/src/index").RichTextDoc;
|
|
129
|
+
};
|
|
127
130
|
readonly bindings: import("./types").TemplateBindingRecord;
|
|
128
131
|
}, {
|
|
129
132
|
readonly blockKind: "system.entry-slot";
|
|
@@ -189,6 +192,9 @@ export declare const DEFAULT_TEMPLATE_DEFINITIONS: {
|
|
|
189
192
|
}, {
|
|
190
193
|
readonly blockKind: "block.body-text";
|
|
191
194
|
readonly scope: "entry";
|
|
195
|
+
readonly content: {
|
|
196
|
+
readonly body: import("../../../core/src/index").RichTextDoc;
|
|
197
|
+
};
|
|
192
198
|
readonly bindings: import("./types").TemplateBindingRecord;
|
|
193
199
|
}];
|
|
194
200
|
};
|
|
@@ -1,15 +1,30 @@
|
|
|
1
|
+
export type SlugifyOptions = Readonly<{
|
|
2
|
+
/**
|
|
3
|
+
* Treat `/` as a path separator: each segment is slugified independently and
|
|
4
|
+
* empty segments are dropped, so `Blog / My Post` becomes `blog/my-post`.
|
|
5
|
+
*/
|
|
6
|
+
preserveSegments?: boolean;
|
|
7
|
+
/** Truncate the finished slug to at most this many characters. */
|
|
8
|
+
maxLength?: number;
|
|
9
|
+
}>;
|
|
1
10
|
/**
|
|
2
|
-
* Convert a string to a URL-safe slug
|
|
11
|
+
* Convert a string to a URL-safe slug.
|
|
3
12
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
13
|
+
* Every non-alphanumeric character (underscores included) is a separator and
|
|
14
|
+
* collapses to a single hyphen, which keeps output inside the `site_routes`
|
|
15
|
+
* slug constraint `^[a-z0-9]+([a-z0-9\-/]*[a-z0-9])?$`.
|
|
16
|
+
*
|
|
17
|
+
* This is the single slug implementation for the monorepo: block-form and the
|
|
18
|
+
* shop admin catalog delegate here rather than keeping their own variants.
|
|
6
19
|
*
|
|
7
20
|
* @example
|
|
8
21
|
* slugify("Initial Consultation") // "initial-consultation"
|
|
9
|
-
* slugify("90-Minute Deep Tissue") // "90-minute-deep-tissue"
|
|
10
22
|
* slugify("Reiki & Energy Healing") // "reiki-energy-healing"
|
|
23
|
+
* slugify("Don't Stop") // "dont-stop"
|
|
24
|
+
* slugify("draft_post") // "draft-post"
|
|
25
|
+
* slugify("Blog / My Post", { preserveSegments: true }) // "blog/my-post"
|
|
11
26
|
*/
|
|
12
|
-
export declare function slugify(text: string): string;
|
|
27
|
+
export declare function slugify(text: string, options?: SlugifyOptions): string;
|
|
13
28
|
/**
|
|
14
29
|
* Generate a unique slug by appending a number if needed
|
|
15
30
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PageRenderer } from '../../../../blocks/src/index';
|
|
1
|
+
import { EditorPageRenderer as PageRenderer } from '../../../../blocks/src/index';
|
|
2
2
|
import type { ApiClient as DashboardApiClient } from '../../../../api/src/request';
|
|
3
3
|
import React, { type ComponentProps } from 'react';
|
|
4
4
|
type PageRendererProps = ComponentProps<typeof PageRenderer>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { Theme } from '../../../../theme-core/src/data';
|
|
1
2
|
import type { HeaderInteractionPalettePreference, HeaderStyleId } from '../../../../theme-core/src/site-styles/index';
|
|
2
3
|
import { resolveHeaderInteractionPaletteControl } from '../../../../theme-core/src/site-styles/index';
|
|
3
4
|
type HeaderInteractionPaletteSurfaceState = Readonly<{
|
|
4
5
|
interactionPalette: ReturnType<typeof resolveHeaderInteractionPaletteControl>;
|
|
5
6
|
diagnostics: readonly string[];
|
|
6
7
|
}>;
|
|
7
|
-
export declare function headerInteractionPaletteSurfaceState(styleId: HeaderStyleId, preference: HeaderInteractionPalettePreference): HeaderInteractionPaletteSurfaceState;
|
|
8
|
+
export declare function headerInteractionPaletteSurfaceState(styleId: HeaderStyleId, preference: HeaderInteractionPalettePreference, theme: Pick<Theme, 'siteStyleId'> | null): HeaderInteractionPaletteSurfaceState;
|
|
8
9
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type SupportedLoaderEndpoint } from '../../../blocks/src/system/data/index';
|
|
2
|
+
export declare function shouldWrite(cacheEnabled: boolean, force: boolean | undefined): boolean;
|
|
3
|
+
export declare function liveLoaderOptions(endpoint: SupportedLoaderEndpoint, signal: AbortSignal | undefined): Readonly<{
|
|
4
|
+
force: boolean;
|
|
5
|
+
signal: AbortSignal | undefined;
|
|
6
|
+
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AddressedLocationValue, BookingConsent, BusinessAddress } from '../../../core/src/index';
|
|
2
2
|
import type { ResolvedInternalLinkEntityType } from '../../../blocks/src/index';
|
|
3
|
-
import type { APIEndpoints, RoutableContentItem as ApiRoutableContentItem, SdkRuntimePageSurfaceSubject as ApiSdkRuntimePageSurfaceSubject, SiteBySlugResponse as ApiSiteBySlugResponse, SiteBookingOfferingPresetSummary as ApiSiteBookingOfferingPresetSummary } from '../../../api/src/index';
|
|
3
|
+
import type { APIEndpoints, RoutableContentItem as ApiRoutableContentItem, SdkRuntimePageSurfaceSubject as ApiSdkRuntimePageSurfaceSubject, SiteBySlugResponse as ApiSiteBySlugResponse, SiteBookingOfferingPresetSummary as ApiSiteBookingOfferingPresetSummary, SdkBlockContentAdmission } from '../../../api/src/index';
|
|
4
4
|
import type { MediaAssetIndexItem, SiteFooterContent, SiteHeaderContent } from '../contracts';
|
|
5
5
|
import type { CompiledBoundaryRuntime } from '../../../theme-core/src/site-styles/index';
|
|
6
6
|
import type { BlockFieldConfig as SdkBlockFieldConfig, BlockFieldOptionsMap as SdkBlockFieldOptionsMap, ContentConfig as SdkContentConfig, ContainerOptionsConfig as SdkContainerOptionsConfig, FieldSelectOption as SdkFieldSelectOption, SdkCustomBlock, SdkThemeConfig, SdkThemePalette, SectionBackground as SdkSectionBackground, SectionOptionsConfig as SdkSectionOptionsConfig, SiteStyleConfig as SdkSiteStyleConfig } from '../config/types';
|
|
@@ -295,6 +295,7 @@ export type SiteResponse = SiteSelectionResponse & {
|
|
|
295
295
|
portalEnabled?: boolean;
|
|
296
296
|
commerceEnabled?: boolean;
|
|
297
297
|
bookingOfferingPresets?: readonly SiteBookingOfferingPresetSummary[];
|
|
298
|
+
bookingTimeZone?: string;
|
|
298
299
|
analytics?: SiteAnalyticsSettingsPayload;
|
|
299
300
|
privacyPolicy?: SiteRuntimePrivacyPolicy;
|
|
300
301
|
routes: Record<string, SiteRouteRecord>;
|
|
@@ -337,6 +338,7 @@ export type SdkRuntimePage = {
|
|
|
337
338
|
kind: string;
|
|
338
339
|
purpose?: string;
|
|
339
340
|
content: Record<string, unknown>;
|
|
341
|
+
admission?: SdkBlockContentAdmission;
|
|
340
342
|
}>;
|
|
341
343
|
runtimeBoundaries?: readonly CompiledBoundaryRuntime<string>[];
|
|
342
344
|
};
|
|
@@ -361,6 +363,7 @@ export type SdkEntrySlotContent = {
|
|
|
361
363
|
purpose: string;
|
|
362
364
|
orderIndex?: number | null;
|
|
363
365
|
content: Record<string, unknown> | null;
|
|
366
|
+
admission?: SdkBlockContentAdmission;
|
|
364
367
|
}>;
|
|
365
368
|
};
|
|
366
369
|
export type SdkSurfaceSlotContent = {
|
|
@@ -380,6 +383,7 @@ export type SdkSurfaceSlotContent = {
|
|
|
380
383
|
publishedContent?: unknown;
|
|
381
384
|
draftContentId?: string | null;
|
|
382
385
|
publishedContentId?: string | null;
|
|
386
|
+
admission?: SdkBlockContentAdmission;
|
|
383
387
|
}>;
|
|
384
388
|
};
|
|
385
389
|
export type SdkRuntimePageSurfaceSubject = ApiSdkRuntimePageSurfaceSubject;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { RenderablePageOutline as BlocksRenderablePageOutline } from '../../../blocks/src/index';
|
|
2
3
|
import type { EntrySubrouteContextData, MediaAssetIndexItem, OccurrenceContextData, PageOutline, PageRuntimeBoundary, ResolveImageUrlContextInput, RouteMap, Theme, ThemeTokens } from '../contracts';
|
|
3
4
|
import type { SdkCustomBlock } from '../config/types';
|
|
4
5
|
import type { BlockOverrides } from './overrides';
|
|
@@ -6,6 +7,7 @@ import type { SiteBookingOfferingPresetSummary } from '../public-api/contracts';
|
|
|
6
7
|
import { type BlocksImageResolveContextInput, type BlocksMediaAssetIndexItem } from './mediaAssets';
|
|
7
8
|
import type { EventPageSurfaceSubjectWire } from '../../../core/src/index';
|
|
8
9
|
export type ComponentRegistry = Record<string, React.ElementType>;
|
|
10
|
+
export type RenderablePageOutline = BlocksRenderablePageOutline;
|
|
9
11
|
export type MissingBlockOverrideError = Error & Readonly<{
|
|
10
12
|
code: 'missing_block_override';
|
|
11
13
|
blockKind: string;
|
|
@@ -20,6 +22,7 @@ export type PageRendererDataContext = {
|
|
|
20
22
|
pageId?: string;
|
|
21
23
|
resolvedData?: Record<string, Record<string, unknown>>;
|
|
22
24
|
bookingOfferingPresets?: readonly SiteBookingOfferingPresetSummary[];
|
|
25
|
+
bookingTimeZone?: string;
|
|
23
26
|
previewStage?: 'published' | 'preview';
|
|
24
27
|
routes?: RouteMap;
|
|
25
28
|
pagesByIdentifier?: Record<string, string>;
|
|
@@ -45,10 +48,9 @@ export type BlocksPageRendererDataContext = Omit<PageRendererDataContext, 'media
|
|
|
45
48
|
export type SdkConfigForRenderer = {
|
|
46
49
|
customBlocks?: SdkCustomBlock[];
|
|
47
50
|
};
|
|
48
|
-
type PageRendererCommonProps = {
|
|
49
|
-
page:
|
|
51
|
+
type PageRendererCommonProps<TPage> = {
|
|
52
|
+
page: TPage | null;
|
|
50
53
|
runtimeBoundaries?: readonly PageRuntimeBoundary[];
|
|
51
|
-
usePlaceholders?: boolean;
|
|
52
54
|
dataContext?: PageRendererDataContext;
|
|
53
55
|
routeMap?: RouteMap;
|
|
54
56
|
wrapBlock?: (blockId: string, rendered: React.ReactNode) => React.ReactNode;
|
|
@@ -57,12 +59,12 @@ type PageRendererCommonProps = {
|
|
|
57
59
|
sdkConfig?: SdkConfigForRenderer | null;
|
|
58
60
|
customBlocks?: SdkCustomBlock[];
|
|
59
61
|
};
|
|
60
|
-
type ThemedPageRendererProps = PageRendererCommonProps & {
|
|
62
|
+
type ThemedPageRendererProps<TPage> = PageRendererCommonProps<TPage> & {
|
|
61
63
|
rendering?: never;
|
|
62
64
|
theme: Theme;
|
|
63
65
|
themeTokens?: ThemeTokens;
|
|
64
66
|
};
|
|
65
|
-
type OverrideOnlyPageRendererProps = PageRendererCommonProps & {
|
|
67
|
+
type OverrideOnlyPageRendererProps<TPage> = PageRendererCommonProps<TPage> & {
|
|
66
68
|
rendering: {
|
|
67
69
|
kind: 'overrides-only';
|
|
68
70
|
};
|
|
@@ -70,7 +72,9 @@ type OverrideOnlyPageRendererProps = PageRendererCommonProps & {
|
|
|
70
72
|
themeTokens?: never;
|
|
71
73
|
blockOverrides: BlockOverrides;
|
|
72
74
|
};
|
|
73
|
-
export type PageRendererProps = ThemedPageRendererProps | OverrideOnlyPageRendererProps
|
|
75
|
+
export type PageRendererProps = ThemedPageRendererProps<BlocksRenderablePageOutline> | OverrideOnlyPageRendererProps<BlocksRenderablePageOutline>;
|
|
76
|
+
export type EditorPageRendererProps = ThemedPageRendererProps<PageOutline> | OverrideOnlyPageRendererProps<PageOutline>;
|
|
74
77
|
export declare function toBlocksPageRendererDataContext(dataContext: PageRendererDataContext): BlocksPageRendererDataContext;
|
|
75
78
|
export declare function PageRenderer(props: PageRendererProps): React.ReactElement;
|
|
79
|
+
export declare function EditorPageRenderer(props: EditorPageRendererProps): React.ReactElement;
|
|
76
80
|
export {};
|
|
@@ -43,7 +43,6 @@ type BlockCommonProps = {
|
|
|
43
43
|
pageId?: string;
|
|
44
44
|
previewStage?: 'published' | 'preview';
|
|
45
45
|
client?: RiverbankClient;
|
|
46
|
-
usePlaceholders?: boolean;
|
|
47
46
|
/**
|
|
48
47
|
* Custom component to override default block rendering. When provided, renders
|
|
49
48
|
* this component instead of the manifest-based default. Override components
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import type { EntrySubrouteContextData, MediaAssetIndexItem, OccurrenceContextData,
|
|
2
|
+
import type { EntrySubrouteContextData, MediaAssetIndexItem, OccurrenceContextData, PageRuntimeBoundary, RouteMap, Theme, ThemeTokens } from '../../contracts';
|
|
3
3
|
import type { ResolvedBlockData } from '../../data';
|
|
4
4
|
import type { SiteBookingOfferingPresetSummary } from '../../public-api/contracts';
|
|
5
5
|
import type { RuntimeSdkConfig } from '../helpers/loadPage';
|
|
6
|
-
import { type ComponentRegistry } from '../blocks-page-renderer';
|
|
6
|
+
import { type ComponentRegistry, type RenderablePageOutline } from '../blocks-page-renderer';
|
|
7
7
|
import { type SdkThemeRuntime } from '../themeRuntime';
|
|
8
8
|
import type { BlockOverrides } from '../overrides';
|
|
9
9
|
import type { SdkCustomBlock } from '../../config/types';
|
|
10
10
|
import type { SdkRenderingMode } from '../renderingMode';
|
|
11
11
|
type PageCommonProps = {
|
|
12
|
-
page:
|
|
12
|
+
page: RenderablePageOutline;
|
|
13
13
|
runtimeBoundaries?: readonly PageRuntimeBoundary[];
|
|
14
14
|
siteId: string;
|
|
15
15
|
resolvedData?: ResolvedBlockData;
|
|
16
16
|
bookingOfferingPresets?: readonly SiteBookingOfferingPresetSummary[];
|
|
17
|
+
bookingTimeZone?: string;
|
|
17
18
|
routeMap?: RouteMap;
|
|
18
19
|
/** Page identifier to routeId lookup for { kind: 'page' } CTA links */
|
|
19
20
|
pagesByIdentifier?: Record<string, string>;
|
|
@@ -75,7 +76,6 @@ type PageCommonProps = {
|
|
|
75
76
|
};
|
|
76
77
|
wrapBlock?: (blockId: string, rendered: React.ReactNode) => React.ReactNode;
|
|
77
78
|
registry?: ComponentRegistry;
|
|
78
|
-
usePlaceholders?: boolean;
|
|
79
79
|
/**
|
|
80
80
|
* Custom components to override default block rendering.
|
|
81
81
|
* Keys can be full block kind ("block.hero") or short form ("hero").
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SiteResponse } from '../../client/types';
|
|
2
|
+
import type { SiteFooterBlock } from '../../public-api/contracts';
|
|
3
|
+
export declare function buildFooterRenderablePageOutline(siteData: SiteResponse, blocks: readonly SiteFooterBlock[]): import("../../../../blocks/src/index").RenderablePageOutline;
|
|
@@ -111,6 +111,7 @@ export type PageContentResult = {
|
|
|
111
111
|
resolvedData: ResolvedBlockData;
|
|
112
112
|
/** Selected booking offering presets exposed to SSR blocks. */
|
|
113
113
|
bookingOfferingPresets?: PageProps['bookingOfferingPresets'];
|
|
114
|
+
bookingTimeZone?: string;
|
|
114
115
|
/** Site data for metadata generation */
|
|
115
116
|
site: SiteData;
|
|
116
117
|
/**
|
|
@@ -146,6 +147,7 @@ export type EntryContentResult = {
|
|
|
146
147
|
resolvedData: ResolvedBlockData;
|
|
147
148
|
/** Selected booking offering presets exposed to SSR blocks. */
|
|
148
149
|
bookingOfferingPresets?: PageProps['bookingOfferingPresets'];
|
|
150
|
+
bookingTimeZone?: string;
|
|
149
151
|
/** Data context for template blocks (includes entry content for bindings) */
|
|
150
152
|
dataContext: {
|
|
151
153
|
contentEntry: Record<string, unknown>;
|
|
@@ -209,6 +211,7 @@ export type PageSurfaceContentResult = {
|
|
|
209
211
|
templatePage: PageProps['page'] | null;
|
|
210
212
|
resolvedData: ResolvedBlockData;
|
|
211
213
|
bookingOfferingPresets?: PageProps['bookingOfferingPresets'];
|
|
214
|
+
bookingTimeZone?: string;
|
|
212
215
|
dataContext: {
|
|
213
216
|
pageSurface: Record<string, unknown>;
|
|
214
217
|
subject: PageSurfaceContentData['subject'];
|
|
@@ -79,7 +79,7 @@ export type LoadPageParams = {
|
|
|
79
79
|
*/
|
|
80
80
|
searchParams?: DataLoaderSearchParams;
|
|
81
81
|
};
|
|
82
|
-
export type LoadPageResult = Omit<PageProps, 'registry' | 'wrapBlock' | '
|
|
82
|
+
export type LoadPageResult = Omit<PageProps, 'registry' | 'wrapBlock' | 'blockOverrides' | 'sdkConfig'> & {
|
|
83
83
|
/**
|
|
84
84
|
* SDK site configuration, if available.
|
|
85
85
|
* Contains SDK-defined theme palette, section backgrounds, and style options.
|