@riverbankcms/sdk 0.96.0 → 0.98.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/README.md +20 -1
- package/dist/{PreviewEditorSidebar-46VT4QVU.mjs → PreviewEditorSidebar-CG3SSJND.mjs} +3 -3
- package/dist/{PreviewEditorUI-JD75GE5F.mjs → PreviewEditorUI-RHNGKAAU.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-OV5PNJBB.mjs +8 -0
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +35 -1
- package/dist/_dts/api/src/bookingOperations.d.ts +246 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +109 -40
- package/dist/_dts/api/src/endpoints.d.ts +80 -0
- package/dist/_dts/api/src/index.d.ts +3 -2
- package/dist/_dts/api/src/public/endpoints.d.ts +1 -1
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +10 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +2 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +2 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +7 -1
- package/dist/_dts/blocks/src/PageRenderer.d.ts +2 -1
- package/dist/_dts/blocks/src/bindings/types.d.ts +0 -4
- package/dist/_dts/blocks/src/client/site-chrome.d.ts +7 -0
- package/dist/_dts/blocks/src/contracts/index.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +12 -12
- package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/layout.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/weekly-slot-availability.d.ts +34 -0
- package/dist/_dts/blocks/src/system/componentFactory.d.ts +1 -0
- package/dist/_dts/blocks/src/system/constants/blockKinds.d.ts +1 -1
- package/dist/_dts/blocks/src/system/customize/facets.d.ts +2 -2
- package/dist/_dts/blocks/src/system/data/loaderEndpoints.d.ts +1 -1
- package/dist/_dts/blocks/src/system/data/prefetchBlockData.d.ts +4 -1
- package/dist/_dts/blocks/src/system/node/builder.d.ts +2 -0
- package/dist/_dts/blocks/src/system/node/schema.d.ts +13 -0
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/registry.d.ts +1 -0
- 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/types.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAppointmentCheckoutVerification.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/usePaymentVerification.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +8 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +133 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.controller.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.state.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.server.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.view.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +31 -1
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +5 -0
- package/dist/_dts/blocks/src/utils/date-formatting.d.ts +1 -1
- package/dist/_dts/content-editor/src/primitives/PreviewInlineTextEditor.d.ts +1 -1
- package/dist/_dts/content-editor/src/primitives/PreviewRichTextEditor.d.ts +1 -1
- package/dist/_dts/content-model/src/templates/defaults.d.ts +5 -5
- package/dist/_dts/content-model/src/templates/types.d.ts +2 -6
- package/dist/_dts/core/src/branded.d.ts +8 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +505 -2
- package/dist/_dts/field-primitives/src/bindings/index.d.ts +8 -0
- package/dist/_dts/sdk/src/cli/commands/push/publishGuidance.d.ts +15 -0
- package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +3 -1
- package/dist/_dts/sdk/src/cli/commands/push/stale-resolution.d.ts +9 -3
- package/dist/_dts/sdk/src/cli/commands/push/workflowPlan.d.ts +34 -0
- package/dist/_dts/sdk/src/cli/commands/setup.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/config-loader.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/content/metadataStore.d.ts +29 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +16 -14
- package/dist/_dts/sdk/src/cli/content/writer.d.ts +6 -4
- package/dist/_dts/sdk/src/cli/env-scope.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/helpers.d.ts +6 -7
- package/dist/_dts/sdk/src/cli/merge-remote/entryMergePush.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergePush.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/push-config.d.ts +13 -2
- package/dist/_dts/sdk/src/cli/setup/setupPlan.d.ts +51 -0
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +21 -0
- package/dist/_dts/sdk/src/client/runtimeCachePolicy.d.ts +1 -1
- package/dist/_dts/sdk/src/client/types.d.ts +18 -2
- package/dist/_dts/sdk/src/config/types.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
- package/dist/_dts/sdk/src/contracts/bindings.d.ts +3 -7
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +13 -0
- package/dist/_dts/sdk/src/next/route-outcome-proxy.d.ts +3 -3
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +174 -78
- package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/bindings.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +52 -1
- package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +18 -66
- package/dist/_dts/sdk/src/types/block-kinds.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/{chunk-EL55VV6Q.mjs → chunk-6WDBXCPX.mjs} +31 -10
- package/dist/{chunk-XMATDBXO.mjs → chunk-DBRI3PQF.mjs} +731 -180
- package/dist/{chunk-VHIMXQ7Z.mjs → chunk-H24OU7WG.mjs} +2 -2
- package/dist/{chunk-4TLTV7OB.mjs → chunk-PKDPQHB5.mjs} +2 -2
- package/dist/{chunk-VTPPVAOL.mjs → chunk-QPXE2OUZ.mjs} +1 -1
- package/dist/{chunk-7ED5UNHL.mjs → chunk-V2BYFSPW.mjs} +109 -0
- package/dist/cli/index.mjs +2131 -1033
- package/dist/cli/init-docs/content/cli-reference.md +29 -1
- package/dist/cli/init-docs/content/getting-started.md +8 -0
- package/dist/cli/init-docs/content/workflow-agent-safe-sync.md +3 -1
- package/dist/cli/init-docs/content/workflow-preview-mode.md +6 -0
- package/dist/cli/init-docs/content/workflow-remote-setup.md +51 -0
- package/dist/client/{accordion-GUNXIIZR.mjs → accordion-Q2BDNL53.mjs} +1 -1
- package/dist/client/{bookingForm-AOU4VHP5.mjs → bookingForm-ZMP4P7EK.mjs} +16 -6
- package/dist/client/bookings.mjs +98 -18
- package/dist/client/{carousel-4QSX2JPC.mjs → carousel-LW3UXPWO.mjs} +1 -1
- package/dist/client/{cart-JKN6C4ZB.mjs → cart-Z6D3KS6K.mjs} +5 -5
- package/dist/client/{checkout-YY6YMITW.mjs → checkout-YMT2QJQM.mjs} +5 -5
- package/dist/client/{chunk-6H27K6AA.mjs → chunk-26ZBRXFR.mjs} +9 -3
- package/dist/client/{chunk-VJROUYOQ.mjs → chunk-DRRQ7QSL.mjs} +2 -2
- package/dist/client/{chunk-BFCJZODD.mjs → chunk-ET2MDQQT.mjs} +4 -4
- package/dist/client/{chunk-H7A6PUGM.mjs → chunk-HBQEAOG4.mjs} +1 -1
- package/dist/client/{chunk-CPKMJVBD.mjs → chunk-IEOECM7U.mjs} +62 -43
- package/dist/client/{chunk-TNGL2WJF.mjs → chunk-KDP7ZRZV.mjs} +16 -0
- package/dist/client/{chunk-GWCRCJLB.mjs → chunk-R4XK3CKR.mjs} +12 -1
- package/dist/client/{chunk-A3YN7M3G.mjs → chunk-SK2BMD22.mjs} +2 -2
- package/dist/client/{chunk-SY543WZ3.mjs → chunk-XNTHVZ25.mjs} +1 -1
- package/dist/client/client.mjs +3729 -3054
- package/dist/client/{courseRegistration-UU2KMPSQ.mjs → courseRegistration-DGKCMC77.mjs} +4 -4
- package/dist/client/{eventCalendar-WIVNS2TM.mjs → eventCalendar-74Z2NNFM.mjs} +7 -7
- package/dist/client/{eventCombined-P3G5MW4J.mjs → eventCombined-GK2ODOX2.mjs} +7 -7
- package/dist/client/{eventDetails-2VHJ2RDG.mjs → eventDetails-MONAGT3N.mjs} +7 -7
- package/dist/client/{eventListing-TGO6JI3R.mjs → eventListing-SKGAO6PS.mjs} +7 -7
- package/dist/client/{eventRegistration-B46HEJES.mjs → eventRegistration-6KISGXRD.mjs} +7 -7
- package/dist/client/{form-VKRTFUNQ.mjs → form-FXPRTXHI.mjs} +2 -2
- package/dist/client/{headerSection-XUX4ZJLO.mjs → headerSection-7NAN5WNB.mjs} +2 -2
- package/dist/client/hooks.mjs +1661 -1334
- package/dist/client/{locationMap-NQFI5MJO.mjs → locationMap-UERN74U4.mjs} +2 -2
- package/dist/client/{newsletterForm-P2GETCQK.mjs → newsletterForm-SGWXMJ7U.mjs} +2 -2
- package/dist/client/{productDetail-7NQ7O5IF.mjs → productDetail-HN3HWZQZ.mjs} +5 -5
- package/dist/client/{productList-RX6ZJ7BL.mjs → productList-YT22Z5UR.mjs} +5 -5
- package/dist/client/rendering/client.mjs +2208 -1922
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +1497 -811
- package/dist/client/{shop-BHN5AKY6.mjs → shop-TKEDNWUS.mjs} +5 -5
- package/dist/preview-next/before-render.mjs +109 -0
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/middleware.mjs +109 -0
- package/dist/{sdk-runtime-X2LXQ5IC.mjs → sdk-runtime-LWNYCQF2.mjs} +6 -6
- package/dist/server/components.mjs +2351 -1872
- package/dist/server/config-template-validation.mjs +6 -2
- package/dist/server/config-validation.mjs +1861 -1561
- package/dist/server/config.mjs +1861 -1561
- package/dist/server/data.mjs +1647 -1331
- package/dist/server/index.mjs +208 -9
- package/dist/server/next/middleware.mjs +2 -2
- package/dist/server/next.mjs +2572 -1878
- package/dist/server/page-converter.mjs +1461 -1276
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2372 -1875
- package/dist/server/rendering.mjs +2557 -1941
- package/dist/server/routing.mjs +1716 -1353
- package/dist/server/server.mjs +1911 -1380
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-MJUSYUFB.mjs +0 -8
|
@@ -18,6 +18,7 @@ export type LoadContentParams = {
|
|
|
18
18
|
client: RiverbankClient;
|
|
19
19
|
siteId: string;
|
|
20
20
|
path: string;
|
|
21
|
+
contentContract?: 'compat' | 'native';
|
|
21
22
|
/**
|
|
22
23
|
* When true, forces a fresh site config fetch (bypasses caches).
|
|
23
24
|
* Useful right after `riverbankcms push-config` in development.
|
|
@@ -168,10 +169,59 @@ export type EntryContentResult = {
|
|
|
168
169
|
/** Canonical media assets for resolving identifier-only media values in preview/edit UIs. */
|
|
169
170
|
mediaAssets?: readonly MediaAssetIndexItem[];
|
|
170
171
|
};
|
|
172
|
+
export type PageSurfaceContentData = {
|
|
173
|
+
id: string;
|
|
174
|
+
routeId: string;
|
|
175
|
+
readinessState: 'shippable';
|
|
176
|
+
subject: {
|
|
177
|
+
kind: 'eventSeries';
|
|
178
|
+
eventSeriesId: string;
|
|
179
|
+
};
|
|
180
|
+
title: string;
|
|
181
|
+
slug: string | null;
|
|
182
|
+
path: string | null;
|
|
183
|
+
status: string;
|
|
184
|
+
publishAt: string | null;
|
|
185
|
+
content: Record<string, unknown>;
|
|
186
|
+
metaTitle: string | null;
|
|
187
|
+
metaDescription: string | null;
|
|
188
|
+
createdAt: string;
|
|
189
|
+
updatedAt: string;
|
|
190
|
+
contentSource: {
|
|
191
|
+
kind: 'pageSurface';
|
|
192
|
+
contentTypeId: string;
|
|
193
|
+
contentTypeKey: string;
|
|
194
|
+
templateKey: string | null;
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* Result when path resolves to a native page surface.
|
|
199
|
+
*/
|
|
200
|
+
export type PageSurfaceContentResult = {
|
|
201
|
+
type: 'pageSurface';
|
|
202
|
+
pageSurface: PageSurfaceContentData;
|
|
203
|
+
templatePage: PageProps['page'] | null;
|
|
204
|
+
resolvedData: ResolvedBlockData;
|
|
205
|
+
bookingOfferingPresets?: PageProps['bookingOfferingPresets'];
|
|
206
|
+
dataContext: {
|
|
207
|
+
pageSurface: Record<string, unknown>;
|
|
208
|
+
subject: PageSurfaceContentData['subject'];
|
|
209
|
+
};
|
|
210
|
+
theme: Theme;
|
|
211
|
+
siteId: string;
|
|
212
|
+
customBlocks?: SdkCustomBlock[];
|
|
213
|
+
site: SiteData;
|
|
214
|
+
sdkConfig: RuntimeSdkConfig | null;
|
|
215
|
+
supabaseUrl?: string;
|
|
216
|
+
routeMap?: RouteMap;
|
|
217
|
+
pagesByIdentifier?: Record<string, string>;
|
|
218
|
+
entriesByIdentifier?: Record<string, Record<string, string>>;
|
|
219
|
+
mediaAssets?: readonly MediaAssetIndexItem[];
|
|
220
|
+
};
|
|
171
221
|
/**
|
|
172
222
|
* Discriminated union result from loadContent
|
|
173
223
|
*/
|
|
174
|
-
export type LoadContentResult = PageContentResult | EntryContentResult;
|
|
224
|
+
export type LoadContentResult = PageContentResult | EntryContentResult | PageSurfaceContentResult;
|
|
175
225
|
/**
|
|
176
226
|
* Type guard to check if result is a page
|
|
177
227
|
*/
|
|
@@ -180,6 +230,7 @@ export declare function isPageContent(result: LoadContentResult): result is Page
|
|
|
180
230
|
* Type guard to check if result is an entry
|
|
181
231
|
*/
|
|
182
232
|
export declare function isEntryContent(result: LoadContentResult): result is EntryContentResult;
|
|
233
|
+
export declare function isPageSurfaceContent(result: LoadContentResult): result is PageSurfaceContentResult;
|
|
183
234
|
/**
|
|
184
235
|
* Server-side helper to fetch content by path.
|
|
185
236
|
*
|
|
@@ -36,11 +36,11 @@ export type UsePageResult = {
|
|
|
36
36
|
siteId: string;
|
|
37
37
|
resolvedData: null;
|
|
38
38
|
sdkConfig: null;
|
|
39
|
-
} | {
|
|
39
|
+
} | ({
|
|
40
40
|
loading: false;
|
|
41
41
|
error: null;
|
|
42
42
|
sdkConfig: RuntimeSdkConfig | null;
|
|
43
|
-
} & Omit<PageProps, 'registry' | 'wrapBlock' | 'usePlaceholders' | 'sdkConfig'
|
|
43
|
+
} & Omit<PageProps, 'registry' | 'wrapBlock' | 'usePlaceholders' | 'sdkConfig'>);
|
|
44
44
|
/**
|
|
45
45
|
* Client-side React hook to fetch all data needed for <Page> component.
|
|
46
46
|
*
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { EventScheduleScope, EventSurfacePreset } from '../../contracts/system-block-content';
|
|
1
|
+
import type { EventScheduleScope as SystemEventScheduleScope, EventSurfacePreset as SystemEventSurfacePreset } from '../../contracts/system-block-content';
|
|
3
2
|
import type { PublicTeamMemberSummary } from '../../../../api/src/index';
|
|
4
3
|
import type { BookingFlexibleBalanceConfig, BookingInstalmentPlanConfig, LocationCoordinates, PublicCoursePriceDisplay, PublicEventPriceDisplay, PublicEventPricing, PublicEventPricingType } from '../../../../core/src/index';
|
|
5
|
-
import type { AccordionIslandProps as BlocksAccordionIslandProps, BookingFormConfig as BlocksBookingFormConfig, BookingFormInteractiveIslandProps as BlocksBookingFormIslandProps, BookingFormService as BlocksBookingFormService, CarouselIslandProps as BlocksCarouselIslandProps, CourseRegistrationInteractiveIslandProps as BlocksCourseRegistrationIslandProps, CartDisplay as BlocksCartDisplay, CartInteractiveIslandProps as BlocksCartIslandProps, CartLineDisplay as BlocksCartLineDisplay, CheckoutDisplay as BlocksCheckoutDisplay, CheckoutInteractiveIslandProps as BlocksCheckoutIslandProps, EventCalendarInteractiveIslandProps as BlocksEventCalendarIslandProps, EventCombinedInteractiveIslandProps as BlocksEventCombinedIslandProps, EventDetailsContentEntry as BlocksEventDetailsContentEntry, EventDetailsIslandProps as BlocksEventDetailsIslandProps, EventDetailsOccurrenceContext as BlocksEventDetailsOccurrenceContext, LocationMapIslandProps as BlocksLocationMapIslandProps, EventRegistrationInteractiveIslandProps as BlocksEventRegistrationIslandProps, EventListingDisplay as BlocksEventListingDisplay, EventListingHydration as BlocksEventListingHydration, EventListingInteractiveIslandProps as BlocksEventListingIslandProps, FormInteractiveIslandProps as BlocksFormIslandProps, HeaderSectionIslandProps as BlocksHeaderSectionIslandProps, MembershipCardDisplay as BlocksMembershipCardDisplay, NewsletterFormInteractiveIslandProps as BlocksNewsletterFormIslandProps, PassCardDisplay as BlocksPassCardDisplay, PassesMembershipsDisplay as BlocksPassesMembershipsDisplay, ProductCardDisplay as BlocksProductCardDisplay, ProductDetailDisplay as BlocksProductDetailDisplay, ProductDetailInteractiveIslandProps as BlocksProductDetailIslandProps, ProductListDisplay as BlocksProductListDisplay, ProductListInteractiveIslandProps as BlocksProductListIslandProps, ProductVariantOptionDisplay as BlocksProductVariantOptionDisplay, ShopInteractiveIslandProps as BlocksShopIslandProps } from '../../../../blocks/src/contracts/index';
|
|
4
|
+
import type { AccordionIslandProps as BlocksAccordionIslandProps, BookingFormConfig as BlocksBookingFormConfig, BookingFormInteractiveIslandProps as BlocksBookingFormIslandProps, BookingFormService as BlocksBookingFormService, CarouselIslandProps as BlocksCarouselIslandProps, CourseRegistrationInteractiveIslandProps as BlocksCourseRegistrationIslandProps, CartDisplay as BlocksCartDisplay, CartInteractiveIslandProps as BlocksCartIslandProps, CartLineDisplay as BlocksCartLineDisplay, CheckoutDisplay as BlocksCheckoutDisplay, CheckoutInteractiveIslandProps as BlocksCheckoutIslandProps, EventCalendarInteractiveIslandProps as BlocksEventCalendarIslandProps, EventCombinedInteractiveIslandProps as BlocksEventCombinedIslandProps, EventDetailsContentEntry as BlocksEventDetailsContentEntry, EventDetailsIslandProps as BlocksEventDetailsIslandProps, EventDetailsOccurrenceContext as BlocksEventDetailsOccurrenceContext, LocationMapIslandProps as BlocksLocationMapIslandProps, EventRegistrationInteractiveIslandProps as BlocksEventRegistrationIslandProps, EventListingDisplay as BlocksEventListingDisplay, EventListingHydration as BlocksEventListingHydration, EventListingInteractiveIslandProps as BlocksEventListingIslandProps, PublicEvent as BlocksPublicEvent, FormInteractiveIslandProps as BlocksFormIslandProps, HeaderSectionIslandProps as BlocksHeaderSectionIslandProps, MembershipCardDisplay as BlocksMembershipCardDisplay, NewsletterFormInteractiveIslandProps as BlocksNewsletterFormIslandProps, PassCardDisplay as BlocksPassCardDisplay, PassesMembershipsDisplay as BlocksPassesMembershipsDisplay, ProductCardDisplay as BlocksProductCardDisplay, ProductDetailDisplay as BlocksProductDetailDisplay, ProductDetailInteractiveIslandProps as BlocksProductDetailIslandProps, ProductListDisplay as BlocksProductListDisplay, ProductListInteractiveIslandProps as BlocksProductListIslandProps, ProductVariantOptionDisplay as BlocksProductVariantOptionDisplay, ShopInteractiveIslandProps as BlocksShopIslandProps } from '../../../../blocks/src/contracts/index';
|
|
6
5
|
export type ResponsiveSlidesToShow = {
|
|
7
6
|
mobile?: number | string;
|
|
8
7
|
tablet?: number | string;
|
|
@@ -50,6 +49,20 @@ export type EventCategory = {
|
|
|
50
49
|
};
|
|
51
50
|
export type PricingType = PublicEventPricingType;
|
|
52
51
|
export type { PublicCoursePriceDisplay, PublicEventPriceDisplay, PublicEventPricing, };
|
|
52
|
+
export type RichTextDoc = {
|
|
53
|
+
type: 'doc';
|
|
54
|
+
content?: Array<{
|
|
55
|
+
type: string;
|
|
56
|
+
content?: Array<{
|
|
57
|
+
type: string;
|
|
58
|
+
text?: string;
|
|
59
|
+
[key: string]: unknown;
|
|
60
|
+
}>;
|
|
61
|
+
[key: string]: unknown;
|
|
62
|
+
}>;
|
|
63
|
+
};
|
|
64
|
+
export type EventSurfacePreset = SystemEventSurfacePreset;
|
|
65
|
+
export type EventScheduleScope = Exclude<SystemEventScheduleScope, 'any'>;
|
|
53
66
|
export type AccessRestriction = 'none' | 'category';
|
|
54
67
|
export type PublicEventDestination = Readonly<{
|
|
55
68
|
kind: 'native';
|
|
@@ -79,7 +92,7 @@ export type PublicEventTicketType = {
|
|
|
79
92
|
sortOrder: number;
|
|
80
93
|
capacityMode: 'limited' | 'unlimited';
|
|
81
94
|
capacityLimit: number | null;
|
|
82
|
-
attendanceScope?: 'in_person' | 'online' | 'both';
|
|
95
|
+
attendanceScope?: 'in_person' | 'online' | 'both' | null;
|
|
83
96
|
saleStartsAt: string | null;
|
|
84
97
|
saleEndsAt: string | null;
|
|
85
98
|
availability: PublicEventTicketTypeAvailability;
|
|
@@ -132,68 +145,7 @@ export type BookingPricing = {
|
|
|
132
145
|
paymentTerms: BookingPaymentTerms;
|
|
133
146
|
options: readonly BookingPricingOption[];
|
|
134
147
|
};
|
|
135
|
-
type
|
|
136
|
-
type: 'doc';
|
|
137
|
-
content: Array<{
|
|
138
|
-
type: string;
|
|
139
|
-
content?: Array<{
|
|
140
|
-
type: string;
|
|
141
|
-
text?: string;
|
|
142
|
-
[key: string]: unknown;
|
|
143
|
-
}>;
|
|
144
|
-
[key: string]: unknown;
|
|
145
|
-
}>;
|
|
146
|
-
};
|
|
147
|
-
export type PublicEvent = {
|
|
148
|
-
kind?: 'event' | 'course_session';
|
|
149
|
-
eventPreset?: 'event' | EventSurfacePreset;
|
|
150
|
-
eventDestinationMode?: 'cms-managed' | 'system-managed';
|
|
151
|
-
destination: PublicEventDestination;
|
|
152
|
-
scheduleScope?: Exclude<EventScheduleScope, 'any'>;
|
|
153
|
-
id: string;
|
|
154
|
-
occurrenceId: string;
|
|
155
|
-
seriesId: string;
|
|
156
|
-
title: string;
|
|
157
|
-
description: string | null;
|
|
158
|
-
content?: {
|
|
159
|
-
body?: PublicEventRichTextDoc | null;
|
|
160
|
-
};
|
|
161
|
-
presentation?: {
|
|
162
|
-
cardTitleOverride?: string | null;
|
|
163
|
-
summary?: string | null;
|
|
164
|
-
image?: Media | null;
|
|
165
|
-
};
|
|
166
|
-
slug: string;
|
|
167
|
-
path: string | null;
|
|
168
|
-
requiresRegistration: boolean;
|
|
169
|
-
deliveryMode: 'in_person' | 'online' | 'hybrid';
|
|
170
|
-
attendanceModes: PublicEventAttendanceModeAvailability[];
|
|
171
|
-
startsAt: string;
|
|
172
|
-
endsAt: string;
|
|
173
|
-
capacity: number | null;
|
|
174
|
-
registeredCount: number;
|
|
175
|
-
availableSpots: number | null;
|
|
176
|
-
waitlistEnabled: boolean;
|
|
177
|
-
venue: EventVenue | null;
|
|
178
|
-
eventCategory: EventCategory | null;
|
|
179
|
-
teamMembers?: PublicTeamMemberSummary[];
|
|
180
|
-
status?: 'active' | 'draft' | 'archived';
|
|
181
|
-
timeZone: string;
|
|
182
|
-
pricing: PublicEventPricing<PublicEventTicketType>;
|
|
183
|
-
paymentTerms: BookingPaymentTerms;
|
|
184
|
-
accessRestriction: AccessRestriction;
|
|
185
|
-
allowedCategoryIds: string[];
|
|
186
|
-
requireGuestDetails?: boolean;
|
|
187
|
-
acceptsPasses?: boolean;
|
|
188
|
-
acceptsMemberships?: boolean;
|
|
189
|
-
course?: {
|
|
190
|
-
id: string;
|
|
191
|
-
pricing?: BookingPricing;
|
|
192
|
-
priceCents: number | null;
|
|
193
|
-
currency: string;
|
|
194
|
-
enrollmentOpen: boolean;
|
|
195
|
-
} | null;
|
|
196
|
-
};
|
|
148
|
+
export type PublicEvent = BlocksPublicEvent;
|
|
197
149
|
export type CourseStatus = 'active' | 'draft' | 'cancelled';
|
|
198
150
|
export type CourseVenue = {
|
|
199
151
|
id: string;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* `@riverbankcms/blocks` (which is not a public dependency). This list is a
|
|
8
8
|
* stable public contract; keep it in sync with the internal blocks runtime.
|
|
9
9
|
*/
|
|
10
|
-
export declare const SYSTEM_BLOCK_KINDS: readonly ["block.hero", "block.intro", "block.columns", "block.collection", "block.feature-cards", "block.media-text", "block.cta-full", "block.single-button", "block.body-text", "block.location-map", "block.faq", "block.testimonials", "block.team-members", "block.embed", "block.blog-post", "block.blog-listing", "block.site-header", "block.site-footer", "block.form", "block.contact-newsletter", "block.appointment-booking", "block.event-registration", "block.event-details", "block.course-registration", "block.course-details", "block.event-spotlight", "block.event-listing", "block.event-calendar", "block.offerings-preview", "block.shop", "block.product-list", "block.product-detail", "block.cart", "block.checkout", "block.gifting", "block.newsletter-signup", "block.image-gallery", "block.video-grid", "block.audio-player", "block.file-download"];
|
|
10
|
+
export declare const SYSTEM_BLOCK_KINDS: readonly ["block.hero", "block.intro", "block.columns", "block.collection", "block.feature-cards", "block.media-text", "block.cta-full", "block.single-button", "block.body-text", "block.location-map", "block.faq", "block.testimonials", "block.team-members", "block.embed", "block.blog-post", "block.blog-listing", "block.site-header", "block.site-footer", "block.form", "block.contact-newsletter", "block.appointment-booking", "block.weekly-slot-availability", "block.event-registration", "block.event-details", "block.course-registration", "block.course-details", "block.event-spotlight", "block.event-listing", "block.event-calendar", "block.offerings-preview", "block.shop", "block.product-list", "block.product-detail", "block.cart", "block.checkout", "block.gifting", "block.newsletter-signup", "block.image-gallery", "block.video-grid", "block.audio-player", "block.file-download"];
|
|
11
11
|
export type SystemBlockKind = (typeof SYSTEM_BLOCK_KINDS)[number];
|
|
12
12
|
export type CustomBlockKind = `custom.${string}`;
|
|
13
13
|
export type BlockKind = SystemBlockKind | CustomBlockKind;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useOptionalPreviewLayout, PreviewQueryProvider } from './chunk-
|
|
3
|
-
import { PreviewBlockCustomizeSelectionProvider, resolveSiteStyleAccess, resolvePreviewDashboardSetupHandoff, buildPreviewDashboardSetupUrl, resolvePreviewSetupBannerModel, usePreviewBlockCustomizeSelectionOptional, useBlockCustomizeControls, MAX_CUSTOMIZE_POPOVER_ROWS, MAX_QUICK_MANIFEST_FIELDS, OfferingsPreviewWidgetProvider, previewWidgetOverrides, sanitizeDashboardPath } from './chunk-
|
|
4
|
-
import { resolvePreviewChromeSurface, getPreviewSidebarTab, onPreviewSidebarOpenRequest, getPreviewChromeSurfaceDataProps, PREVIEW_CHROME_THEME_CLASS_NAME, setPreviewSidebarTab, PreviewPageDesignEditorStateProvider, usePreviewPageDesignEditorState } from './chunk-
|
|
5
|
-
import { clientComponentRegistry, deriveLaunchReadiness, DEFAULT_LAUNCH_READINESS_INPUT, useEditorUiStore, PreviewThemeOverlayProvider, PreviewDesignCoordinatorProvider, SiteChromeCustomizeProvider, ResizableSplitPane, BlockApiProvider, EditorProvider, PreviewDesignHistoryOrderProvider, MediaEditorProvider, useEditorUiStoreInstance, useEditor, createRoutingHelpers, createSnapshotFromPageRecord, EntryControllerProvider, useEntryEditorController, surfaceResolutionContextFromTheme, designRuntimeRulesForTheme, unsafeAsEditorBlockId, EditableBlockProvider, asDesignBlockId, PageRenderer, usePreviewThemeOverlay, planSiteDocument, assertNever, ResponsiveScope, ThemeScope, FixedBottomSurface, Button, unsafeAsLinkedContentEntryId, sectionTransitionVariantForBoundaryOptionId, sectionTransitionFamilyForBoundaryOptionId, sectionTransitionFamilies, X, defaultSectionTransitionVariantForFamily, RotateCcw, parseBackgroundOverrideFromContent, rankBackgroundImagePoolItems, imagePoolForOverride, resolveBackgroundCapability, enabledBackgroundModes, canCycleBackgroundOverrideValue, FormRenderer, stableSerialize, prefetchBlockData, isSupportedLoaderEndpoint, PreviewRichTextEditor, RichText, inlineTextToPlainText, siblingPath, PreviewInlineTextEditor, Text, renderInlineText, isInlineTextEmpty, PreviewTextEditor, buildThemeRuntime, renderBlock, siteHeaderManifest, siteFooterManifest, SiteDocumentLayout, SITE_CHROME_CLASS_NAMES, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, buildEditorModelRuntimeFieldsByBlockId, applyCompiledRuntimeFieldsToContent, assertNever2, getBlockDefinition, systemCustomizeFacetDefinitionsForBlock, systemCustomizeFacetAppliesToLayoutVariant, systemCustomizeFacetCurrentValue, systemCustomizeFacetLabelForValue, backgroundColorTokens, ChevronLeft, ChevronRight, createMicrobatcher, normalizePublicApiLoaderParams, getAtPath, coerceInlineTextWithFallback, visibleHeaderClearancePx, LINKED_CONTENT_ENTRY_META_KEY, useMediaEditorOptional, Image, defaultBackgroundOverrideForMode, decodePublicProductCategorySelectorQuery, EDITABLE_SURFACE_FORWARDING_PROP, useSiteChromeCustomizeOptional, SITE_CHROME_VISIBLE_HEADER_SELECTOR, getLinkedContentEntryMeta, GRADIENT_PRESETS, resolveImageUrlWithContext, gradientToCss, Upload, MediaEditor, SECTION_BACKGROUND_MIN_SOURCE_WIDTH, SECTION_BACKGROUND_MIN_SOURCE_HEIGHT, parseMediaAssetId, formatSiteChromeBackgroundTokenLabel, planBackgroundOverride, planBackgroundTransition, systemCustomizeFacetNextValue } from './chunk-
|
|
6
|
-
import { API_ENDPOINTS, createBearerAPIClient, isPreviewRuntimeSessionEditable, DEFAULT_SURFACE_ID, initPreviewAuth, usePreviewAuth, usePreviewAuthFetch, markPreviewAuthExpired, usePreviewToken, unwrapResponse } from './chunk-
|
|
2
|
+
import { useOptionalPreviewLayout, PreviewQueryProvider } from './chunk-QPXE2OUZ.mjs';
|
|
3
|
+
import { PreviewBlockCustomizeSelectionProvider, resolveSiteStyleAccess, resolvePreviewDashboardSetupHandoff, buildPreviewDashboardSetupUrl, resolvePreviewSetupBannerModel, usePreviewBlockCustomizeSelectionOptional, useBlockCustomizeControls, MAX_CUSTOMIZE_POPOVER_ROWS, MAX_QUICK_MANIFEST_FIELDS, OfferingsPreviewWidgetProvider, previewWidgetOverrides, sanitizeDashboardPath } from './chunk-H24OU7WG.mjs';
|
|
4
|
+
import { resolvePreviewChromeSurface, getPreviewSidebarTab, onPreviewSidebarOpenRequest, getPreviewChromeSurfaceDataProps, PREVIEW_CHROME_THEME_CLASS_NAME, setPreviewSidebarTab, PreviewPageDesignEditorStateProvider, usePreviewPageDesignEditorState } from './chunk-PKDPQHB5.mjs';
|
|
5
|
+
import { clientComponentRegistry, deriveLaunchReadiness, DEFAULT_LAUNCH_READINESS_INPUT, useEditorUiStore, PreviewThemeOverlayProvider, PreviewDesignCoordinatorProvider, SiteChromeCustomizeProvider, ResizableSplitPane, BlockApiProvider, EditorProvider, PreviewDesignHistoryOrderProvider, MediaEditorProvider, useEditorUiStoreInstance, useEditor, createRoutingHelpers, createSnapshotFromPageRecord, EntryControllerProvider, useEntryEditorController, surfaceResolutionContextFromTheme, designRuntimeRulesForTheme, unsafeAsEditorBlockId, EditableBlockProvider, asDesignBlockId, PageRenderer, usePreviewThemeOverlay, planSiteDocument, assertNever, ResponsiveScope, ThemeScope, FixedBottomSurface, Button, unsafeAsLinkedContentEntryId, sectionTransitionVariantForBoundaryOptionId, sectionTransitionFamilyForBoundaryOptionId, sectionTransitionFamilies, X, defaultSectionTransitionVariantForFamily, RotateCcw, parseBackgroundOverrideFromContent, rankBackgroundImagePoolItems, imagePoolForOverride, resolveBackgroundCapability, enabledBackgroundModes, canCycleBackgroundOverrideValue, FormRenderer, stableSerialize, prefetchBlockData, isSupportedLoaderEndpoint, PreviewRichTextEditor, RichText, inlineTextToPlainText, siblingPath, PreviewInlineTextEditor, Text, renderInlineText, isInlineTextEmpty, PreviewTextEditor, buildThemeRuntime, renderBlock, siteHeaderManifest, siteFooterManifest, SiteDocumentLayout, SITE_CHROME_CLASS_NAMES, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, buildEditorModelRuntimeFieldsByBlockId, applyCompiledRuntimeFieldsToContent, assertNever2, getBlockDefinition, systemCustomizeFacetDefinitionsForBlock, systemCustomizeFacetAppliesToLayoutVariant, systemCustomizeFacetCurrentValue, systemCustomizeFacetLabelForValue, backgroundColorTokens, ChevronLeft, ChevronRight, createMicrobatcher, normalizePublicApiLoaderParams, getAtPath, coerceInlineTextWithFallback, visibleHeaderClearancePx, LINKED_CONTENT_ENTRY_META_KEY, useMediaEditorOptional, Image, defaultBackgroundOverrideForMode, decodePublicProductCategorySelectorQuery, EDITABLE_SURFACE_FORWARDING_PROP, useSiteChromeCustomizeOptional, SITE_CHROME_VISIBLE_HEADER_SELECTOR, getLinkedContentEntryMeta, GRADIENT_PRESETS, resolveImageUrlWithContext, gradientToCss, Upload, MediaEditor, SECTION_BACKGROUND_MIN_SOURCE_WIDTH, SECTION_BACKGROUND_MIN_SOURCE_HEIGHT, parseMediaAssetId, formatSiteChromeBackgroundTokenLabel, planBackgroundOverride, planBackgroundTransition, systemCustomizeFacetNextValue } from './chunk-DBRI3PQF.mjs';
|
|
6
|
+
import { API_ENDPOINTS, createBearerAPIClient, isPreviewRuntimeSessionEditable, DEFAULT_SURFACE_ID, initPreviewAuth, usePreviewAuth, usePreviewAuthFetch, markPreviewAuthExpired, usePreviewToken, unwrapResponse } from './chunk-V2BYFSPW.mjs';
|
|
7
7
|
import React9, { createContext, useMemo, useState, useEffect, useRef, useCallback, useId, useReducer, Children, isValidElement, Fragment as Fragment$1, cloneElement, useContext } from 'react';
|
|
8
8
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
9
9
|
import { createPortal } from 'react-dom';
|
|
@@ -2677,6 +2677,17 @@ function EditablePageRenderer(props) {
|
|
|
2677
2677
|
(state) => state.aiOverlays.hasActiveProposals()
|
|
2678
2678
|
);
|
|
2679
2679
|
const allowInlineEditing = isEditingMode && !isStreaming && !hasProposals;
|
|
2680
|
+
const activePreviewField = useEditorUiStore((state) => state.activePreviewField ?? null);
|
|
2681
|
+
const previewAuthoring = useMemo(() => {
|
|
2682
|
+
if (!allowInlineEditing || activePreviewField?.kind !== "block") return void 0;
|
|
2683
|
+
return {
|
|
2684
|
+
activeField: {
|
|
2685
|
+
kind: "block-field",
|
|
2686
|
+
blockId: String(activePreviewField.blockId),
|
|
2687
|
+
fieldPath: activePreviewField.fieldPath
|
|
2688
|
+
}
|
|
2689
|
+
};
|
|
2690
|
+
}, [activePreviewField, allowInlineEditing]);
|
|
2680
2691
|
const isEntryTemplatePage = Boolean(pageRendererProps.dataContext?.contentEntry);
|
|
2681
2692
|
const headerClearance = usePreviewHeaderClearance();
|
|
2682
2693
|
const cacheRef = useRef(/* @__PURE__ */ new Map());
|
|
@@ -2850,6 +2861,7 @@ function EditablePageRenderer(props) {
|
|
|
2850
2861
|
registry: allowInlineEditing ? editorRegistry : pageRendererProps.registry ?? clientComponentRegistry,
|
|
2851
2862
|
wrapBlock: allowInlineEditing ? wrapBlockWithProvider : pageRendererProps.wrapBlock,
|
|
2852
2863
|
dataContext,
|
|
2864
|
+
previewAuthoring,
|
|
2853
2865
|
// Phase 10: the legacy `isEditingMode` flag forced the renderer into
|
|
2854
2866
|
// draft-mode validation; `usePlaceholders` consolidates that into a
|
|
2855
2867
|
// narrowly-scoped fallback. The editor's contract is unchanged: a user
|
|
@@ -2998,7 +3010,7 @@ async function callDirectLoaderApiEndpoint(dashboardApiClient, endpoint, params)
|
|
|
2998
3010
|
}
|
|
2999
3011
|
}
|
|
3000
3012
|
function isBatchableEndpoint(endpoint) {
|
|
3001
|
-
return endpoint === "listPublicEvents" || endpoint === "getPublicEventDetails" || endpoint === "listPublicCourses" || endpoint === "listPublicRouteCandidates" || endpoint === "listPublicTeamMembers" || endpoint === "listPublicProducts" || endpoint === "getPublicBookingServices" || endpoint === "getPublicFormById";
|
|
3013
|
+
return endpoint === "listPublicEvents" || endpoint === "getPublicEventDetails" || endpoint === "listPublicCourses" || endpoint === "listPublicRouteCandidates" || endpoint === "listPublicTeamMembers" || endpoint === "listPublicProducts" || endpoint === "getPublicBookingServices" || endpoint === "getPublicWeeklySlotAvailability" || endpoint === "getPublicFormById";
|
|
3002
3014
|
}
|
|
3003
3015
|
function buildBatchLoaderRequest(id, endpoint, params) {
|
|
3004
3016
|
switch (endpoint) {
|
|
@@ -3026,6 +3038,10 @@ function buildBatchLoaderRequest(id, endpoint, params) {
|
|
|
3026
3038
|
const typedParams = params;
|
|
3027
3039
|
return typedParams ? { id, endpoint, params: typedParams } : { id, endpoint };
|
|
3028
3040
|
}
|
|
3041
|
+
case "getPublicWeeklySlotAvailability": {
|
|
3042
|
+
const typedParams = params;
|
|
3043
|
+
return { id, endpoint, params: typedParams ?? { serviceId: "" } };
|
|
3044
|
+
}
|
|
3029
3045
|
case "getPublicFormById":
|
|
3030
3046
|
return {
|
|
3031
3047
|
id,
|
|
@@ -4118,13 +4134,18 @@ function PreviewAuthBanner({
|
|
|
4118
4134
|
}
|
|
4119
4135
|
|
|
4120
4136
|
// ../blocks/src/client/site-chrome.tsx
|
|
4137
|
+
var siteChromeBlockRenderDeps = {
|
|
4138
|
+
buildThemeRuntime,
|
|
4139
|
+
renderBlock
|
|
4140
|
+
};
|
|
4121
4141
|
function renderSiteChromeBlock(model, surface, theme, options = {}) {
|
|
4122
4142
|
const spec = model[surface];
|
|
4123
4143
|
if (!spec) return null;
|
|
4124
4144
|
const themeConfig = options.themeConfigOverrideMode === "ignore" ? theme : applyThemeConfigOverride(theme, spec.themeConfigOverride);
|
|
4125
|
-
const
|
|
4145
|
+
const deps = options.deps ?? siteChromeBlockRenderDeps;
|
|
4146
|
+
const themeRuntime = deps.buildThemeRuntime(themeConfig);
|
|
4126
4147
|
const manifest = surface === "header" ? siteHeaderManifest : siteFooterManifest;
|
|
4127
|
-
return renderBlock(manifest, spec.content, {
|
|
4148
|
+
return deps.renderBlock(manifest, spec.content, {
|
|
4128
4149
|
registry: clientComponentRegistry,
|
|
4129
4150
|
theme: themeRuntime.tokens,
|
|
4130
4151
|
themeConfig,
|
|
@@ -4798,11 +4819,11 @@ function LinkedEntryEditEventBridge() {
|
|
|
4798
4819
|
}
|
|
4799
4820
|
var previewContainerResponsiveEnabled = process.env.NEXT_PUBLIC_ENABLE_PREVIEW_CONTAINER_RESPONSIVE !== "false";
|
|
4800
4821
|
var PreviewEditorSidebar = React9.lazy(async () => {
|
|
4801
|
-
const mod = await import('./PreviewEditorSidebar-
|
|
4822
|
+
const mod = await import('./PreviewEditorSidebar-CG3SSJND.mjs');
|
|
4802
4823
|
return { default: mod.PreviewEditorSidebar };
|
|
4803
4824
|
});
|
|
4804
4825
|
var PreviewEditorUI = React9.lazy(async () => {
|
|
4805
|
-
const mod = await import('./PreviewEditorUI-
|
|
4826
|
+
const mod = await import('./PreviewEditorUI-RHNGKAAU.mjs');
|
|
4806
4827
|
return { default: mod.PreviewEditorUI };
|
|
4807
4828
|
});
|
|
4808
4829
|
var previewPaneContainmentStyle = {
|