@riverbankcms/sdk 0.135.0 → 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-roNY0GVy.mjs → PreviewEditorSidebar-BU5ZlhQR.mjs} +4 -4
- package/dist/{PreviewEditorUI-KboDbEh_.mjs → PreviewEditorUI-9XkHL-bC.mjs} +3 -3
- package/dist/{PreviewQueryProvider-DcgaESkm.mjs → PreviewQueryProvider-wbEpXryy.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-DBrF7Caa.mjs → SdkPreviewModeRuntime-CnWmj-2B.mjs} +50 -99
- package/dist/{SiteChromeCustomizeContext-DrIEpJKn.mjs → SiteChromeCustomizeContext-B6d5zkog.mjs} +2334 -1173
- 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/blocks/events/shared/schemas.d.ts +25 -0
- 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 +19 -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-BQqwi8Oa.mjs → BookingConsentAgreement-DCch21a6.mjs} +2 -2
- package/dist/client/{DiscountCodeDisclosure-B97aMo0V.mjs → DiscountCodeDisclosure-DIj1T59K.mjs} +1 -1
- package/dist/client/{EventCombined.client-Bs2Iw9Q6.mjs → EventCombined.client-BWVNlXTx.mjs} +226 -206
- package/dist/client/{EventListing.client-C4QUQdmg.mjs → EventListing.client-DVFCDe3i.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-CwWRk69M.mjs → LeafletStaticMap-BY5mIHw9.mjs} +1 -1
- package/dist/client/{accordion-BA0j8Mpw.mjs → accordion-CK29E8rG.mjs} +1 -1
- package/dist/client/{bookingForm-Br2e41H0.mjs → bookingForm-DFvnet-N.mjs} +5 -5
- package/dist/client/bookings.mjs +87 -47
- package/dist/client/{carousel-B4dmwnpD.mjs → carousel-BVU5NQlb.mjs} +1 -1
- package/dist/client/{cart-B_ckGW4b.mjs → cart-BNItcZVa.mjs} +3 -3
- package/dist/client/{checkout-DAyspHdf.mjs → checkout-Bu6iCdkP.mjs} +3 -3
- package/dist/client/client.mjs +1985 -1055
- package/dist/client/{context-DljQn8L5.mjs → context-BImarOAq.mjs} +12 -0
- package/dist/client/{eventCalendar-pJu3FUod.mjs → eventCalendar-DS2h-UXD.mjs} +256 -114
- package/dist/client/{eventCombined-B6Kacm9F.mjs → eventCombined-Drt4Oq9p.mjs} +3 -3
- package/dist/client/{eventDetails-CaX9z1pv.mjs → eventDetails-Bl2vWgTX.mjs} +4 -3
- package/dist/client/{eventListing-B9aXPO-I.mjs → eventListing-CS7PHY7v.mjs} +3 -3
- package/dist/client/{eventRegistration-CBSovBkg.mjs → eventRegistration-D-j8eNy2.mjs} +85 -41
- package/dist/client/{form-Cm0tu_7o.mjs → form-RMpoLTyr.mjs} +2 -2
- package/dist/client/{headerSection-OgRtHeKS.mjs → headerSection-BYE3Lb3k.mjs} +2 -2
- package/dist/client/hooks.mjs +2254 -298
- package/dist/client/{locationMap-DmjcYqNM.mjs → locationMap-BxSr7Kkh.mjs} +2 -2
- package/dist/client/{newsletterForm-D08OZQAC.mjs → newsletterForm-DerbXwFC.mjs} +2 -2
- package/dist/client/{productDetail-BqZeu2P4.mjs → productDetail-4SZCLhAf.mjs} +3 -3
- package/dist/client/{productList-mNyIF9FG.mjs → productList-D7AP4GNq.mjs} +3 -3
- package/dist/client/{propsDecoder-DwHXRm9X.mjs → propsDecoder-pzBeCh14.mjs} +123 -46
- package/dist/client/rendering/client.mjs +793 -488
- package/dist/client/rendering/islands.mjs +17 -17
- package/dist/client/rendering.mjs +2161 -1268
- package/dist/client/{scrollToBlock-DtmdM3v-.mjs → scrollToBlock-CduAKf8T.mjs} +1 -1
- package/dist/client/{shop-CNjZK16F.mjs → shop-Cp5p_kGe.mjs} +6 -6
- package/dist/client/{shop-commerce-DkNNao1J.mjs → shop-commerce-DicXYaYX.mjs} +5 -5
- package/dist/client/{shop-commerce-store-9WA--zuW.mjs → shop-commerce-store-CGWnpY4K.mjs} +1 -1
- package/dist/client/{shopShared-CHCVfccY.mjs → shopShared-BDf9ljkm.mjs} +3 -3
- package/dist/client/{useEventFilters-DvuaB4ZN.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-3GhW4knb.mjs → sdk-runtime-19MO27F0.mjs} +2 -2
- package/dist/{separator-D3bCWYYb.mjs → separator-DaPLtJ1f.mjs} +1 -1
- package/dist/server/components.mjs +1562 -917
- package/dist/server/config-validation.mjs +94 -135
- package/dist/server/config.mjs +94 -135
- package/dist/server/data.mjs +94 -134
- package/dist/server/index.mjs +122 -4
- package/dist/server/manifest.mjs +0 -1
- package/dist/server/next.mjs +1467 -732
- package/dist/server/page-converter.mjs +87 -113
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1717 -939
- package/dist/server/rendering.mjs +1729 -1044
- package/dist/server/routing.mjs +3229 -1835
- package/dist/server/server.mjs +21739 -19801
- 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
|
@@ -8,6 +8,8 @@ import type { RouteMap } from './system/transforms';
|
|
|
8
8
|
import { type MediaAssetIndexItem, type ResolveImageUrlContext, type ResolveImageUrlContextInput } from './system/runtime/nodes/media';
|
|
9
9
|
import type { BookingOfferingPresetSummary } from './system/blocks/offerings-preview/model';
|
|
10
10
|
import { type PageBoundaryWrapper, type PageRuntimeBoundary } from './pageRendererBoundaries';
|
|
11
|
+
import { type RenderablePageOutline } from './pageRenderAdmission';
|
|
12
|
+
export type { PageBlockRenderAdmissionError, RenderablePageBlock, RenderablePageOutline, } from './pageRenderAdmission';
|
|
11
13
|
export { MissingBlockOverrideError } from './pageRenderingMode';
|
|
12
14
|
export type { PageBlockPosition, PageRuntimeBoundary, } from './pageRendererBoundaries';
|
|
13
15
|
/**
|
|
@@ -40,6 +42,7 @@ type PageRendererDataContext = {
|
|
|
40
42
|
apiBaseUrl?: string;
|
|
41
43
|
portalToken?: string | null;
|
|
42
44
|
bookingOfferingPresets?: readonly BookingOfferingPresetSummary[];
|
|
45
|
+
bookingTimeZone?: string;
|
|
43
46
|
eventRegistrationOverlayEnabled?: boolean;
|
|
44
47
|
};
|
|
45
48
|
/**
|
|
@@ -75,6 +78,8 @@ export type BlockOverrideProps<TContent = Record<string, unknown>> = {
|
|
|
75
78
|
siteId?: string;
|
|
76
79
|
/** Dashboard API URL for client-side block runtime calls. */
|
|
77
80
|
apiBaseUrl?: string;
|
|
81
|
+
/** Canonical site timezone for calendar/date behavior. */
|
|
82
|
+
bookingTimeZone?: string;
|
|
78
83
|
/** Customer portal token for Bearer-authenticated block runtime calls. */
|
|
79
84
|
portalToken?: string | null;
|
|
80
85
|
/** Preview bearer token for preview-aware block runtime calls. */
|
|
@@ -146,10 +151,9 @@ export type BlockOverrides = Record<string, BlockOverrideComponent>;
|
|
|
146
151
|
export type SdkConfigForRenderer = {
|
|
147
152
|
customBlocks?: SdkCustomBlock[];
|
|
148
153
|
};
|
|
149
|
-
type PageRendererCommonProps = {
|
|
150
|
-
page:
|
|
154
|
+
type PageRendererCommonProps<TPage> = {
|
|
155
|
+
page: TPage | null;
|
|
151
156
|
runtimeBoundaries?: readonly PageRuntimeBoundary[];
|
|
152
|
-
usePlaceholders?: boolean;
|
|
153
157
|
dataContext?: PageRendererDataContext;
|
|
154
158
|
routeMap?: RouteMap;
|
|
155
159
|
wrapBlock?: (blockId: string, rendered: React.ReactNode) => React.ReactNode;
|
|
@@ -160,12 +164,12 @@ type PageRendererCommonProps = {
|
|
|
160
164
|
customBlocks?: SdkCustomBlock[];
|
|
161
165
|
previewAuthoring?: ResolverContext['previewAuthoring'];
|
|
162
166
|
};
|
|
163
|
-
type ThemedPageRendererProps = PageRendererCommonProps & {
|
|
167
|
+
type ThemedPageRendererProps<TPage> = PageRendererCommonProps<TPage> & {
|
|
164
168
|
rendering?: never;
|
|
165
169
|
theme: Theme;
|
|
166
170
|
themeTokens?: ThemeTokens;
|
|
167
171
|
};
|
|
168
|
-
type OverrideOnlyPageRendererProps = PageRendererCommonProps & {
|
|
172
|
+
type OverrideOnlyPageRendererProps<TPage> = PageRendererCommonProps<TPage> & {
|
|
169
173
|
rendering: {
|
|
170
174
|
kind: 'overrides-only';
|
|
171
175
|
};
|
|
@@ -173,5 +177,7 @@ type OverrideOnlyPageRendererProps = PageRendererCommonProps & {
|
|
|
173
177
|
themeTokens?: never;
|
|
174
178
|
blockOverrides: BlockOverrides;
|
|
175
179
|
};
|
|
176
|
-
export type PageRendererProps = ThemedPageRendererProps | OverrideOnlyPageRendererProps
|
|
180
|
+
export type PageRendererProps = ThemedPageRendererProps<RenderablePageOutline> | OverrideOnlyPageRendererProps<RenderablePageOutline>;
|
|
181
|
+
export type EditorPageRendererProps = ThemedPageRendererProps<PageOutline> | OverrideOnlyPageRendererProps<PageOutline>;
|
|
177
182
|
export default function PageRenderer(props: PageRendererProps): React.JSX.Element;
|
|
183
|
+
export declare function EditorPageRenderer(props: EditorPageRendererProps): React.JSX.Element;
|
|
@@ -365,6 +365,14 @@ export declare const proofBlockIslandCodecs: {
|
|
|
365
365
|
eventSurface: import("..").EventSurfaceScope;
|
|
366
366
|
filterEventPresets: string | null;
|
|
367
367
|
scheduleScope: import("..").EventScheduleScope;
|
|
368
|
+
calendarContext: Readonly<{
|
|
369
|
+
timeZone: import("../../../core/src/index").BookingTimeZone;
|
|
370
|
+
initialToday: Readonly<{
|
|
371
|
+
year: number;
|
|
372
|
+
month: number;
|
|
373
|
+
day: number;
|
|
374
|
+
}>;
|
|
375
|
+
}>;
|
|
368
376
|
}>;
|
|
369
377
|
}>>;
|
|
370
378
|
}>) => unknown;
|
|
@@ -385,6 +393,14 @@ export declare const proofBlockIslandCodecs: {
|
|
|
385
393
|
eventSurface: import("..").EventSurfaceScope;
|
|
386
394
|
filterEventPresets: string | null;
|
|
387
395
|
scheduleScope: import("..").EventScheduleScope;
|
|
396
|
+
calendarContext: Readonly<{
|
|
397
|
+
timeZone: import("../../../core/src/index").BookingTimeZone;
|
|
398
|
+
initialToday: Readonly<{
|
|
399
|
+
year: number;
|
|
400
|
+
month: number;
|
|
401
|
+
day: number;
|
|
402
|
+
}>;
|
|
403
|
+
}>;
|
|
388
404
|
}>;
|
|
389
405
|
}>>;
|
|
390
406
|
}>>;
|
|
@@ -871,6 +887,14 @@ export declare const runtimeIslandCodecs: {
|
|
|
871
887
|
eventSurface: import("..").EventSurfaceScope;
|
|
872
888
|
filterEventPresets: string | null;
|
|
873
889
|
scheduleScope: import("..").EventScheduleScope;
|
|
890
|
+
calendarContext: Readonly<{
|
|
891
|
+
timeZone: import("../../../core/src/index").BookingTimeZone;
|
|
892
|
+
initialToday: Readonly<{
|
|
893
|
+
year: number;
|
|
894
|
+
month: number;
|
|
895
|
+
day: number;
|
|
896
|
+
}>;
|
|
897
|
+
}>;
|
|
874
898
|
}>;
|
|
875
899
|
}>>;
|
|
876
900
|
}>) => unknown;
|
|
@@ -891,6 +915,14 @@ export declare const runtimeIslandCodecs: {
|
|
|
891
915
|
eventSurface: import("..").EventSurfaceScope;
|
|
892
916
|
filterEventPresets: string | null;
|
|
893
917
|
scheduleScope: import("..").EventScheduleScope;
|
|
918
|
+
calendarContext: Readonly<{
|
|
919
|
+
timeZone: import("../../../core/src/index").BookingTimeZone;
|
|
920
|
+
initialToday: Readonly<{
|
|
921
|
+
year: number;
|
|
922
|
+
month: number;
|
|
923
|
+
day: number;
|
|
924
|
+
}>;
|
|
925
|
+
}>;
|
|
894
926
|
}>;
|
|
895
927
|
}>>;
|
|
896
928
|
}>>;
|
|
@@ -1251,6 +1283,14 @@ export declare const runtimeIslandCodecs: {
|
|
|
1251
1283
|
eventSurface: import("..").EventSurfaceScope;
|
|
1252
1284
|
filterEventPresets: string | null;
|
|
1253
1285
|
scheduleScope: import("..").EventScheduleScope;
|
|
1286
|
+
calendarContext: Readonly<{
|
|
1287
|
+
timeZone: import("../../../core/src/index").BookingTimeZone;
|
|
1288
|
+
initialToday: Readonly<{
|
|
1289
|
+
year: number;
|
|
1290
|
+
month: number;
|
|
1291
|
+
day: number;
|
|
1292
|
+
}>;
|
|
1293
|
+
}>;
|
|
1254
1294
|
}>;
|
|
1255
1295
|
}>>;
|
|
1256
1296
|
}>) => unknown;
|
|
@@ -1271,6 +1311,14 @@ export declare const runtimeIslandCodecs: {
|
|
|
1271
1311
|
eventSurface: import("..").EventSurfaceScope;
|
|
1272
1312
|
filterEventPresets: string | null;
|
|
1273
1313
|
scheduleScope: import("..").EventScheduleScope;
|
|
1314
|
+
calendarContext: Readonly<{
|
|
1315
|
+
timeZone: import("../../../core/src/index").BookingTimeZone;
|
|
1316
|
+
initialToday: Readonly<{
|
|
1317
|
+
year: number;
|
|
1318
|
+
month: number;
|
|
1319
|
+
day: number;
|
|
1320
|
+
}>;
|
|
1321
|
+
}>;
|
|
1274
1322
|
}>;
|
|
1275
1323
|
}>>;
|
|
1276
1324
|
}>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure server-safe definitions for Builder blocks.
|
|
3
|
+
* This entry point MUST NOT import any React components or client-side code.
|
|
4
|
+
* It is safe to use in Server Components and data fetching utilities.
|
|
5
|
+
*/
|
|
6
|
+
export { getBlockDefinition, getBlockRenderKind, listBlockDefinitions, hasBlockDefinition, registerBlockDefinition, type SystemBlockDefinition, type BlockDataLoader, type BlockDescriptor, } from './system/registry';
|
|
7
|
+
export { blockDesignCapabilityMapFromDefinitions, blockDesignMetadataMapFromDefinitions, declareBlockDesignCapability, declareNoBlockDesignCapability, resolveDeclaredBlockDesignCapability, } from './system/designCapabilities';
|
|
8
|
+
export type { BlockDesignCapabilityDeclaration, NoBlockDesignCapabilityReason, } from './system/designCapabilities';
|
|
9
|
+
export type { AnyBlockRuntimeDefinition, BlockRenderKind, BlockRuntimeDefinition, RuntimeContractsFor, RuntimeDisplay, RuntimeHydration, RuntimeKind, RuntimeRender, RuntimeSource, } from './contracts';
|
|
10
|
+
export { ensureSystemBlockDefinitionsRegistered, systemBlockDefinitions, } from './system/blocks';
|
|
11
|
+
export { resolveVariantKey as resolveBlockVariantKey } from './system/manifest/variantKey';
|
|
12
|
+
export type { SystemBlockKind, } from './system/blocks';
|
|
13
|
+
export * from './system/data';
|
|
14
|
+
export type { PageOutline, Block } from './structure/schema';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { default as PageRenderer } from './PageRenderer';
|
|
1
|
+
export { default as PageRenderer, EditorPageRenderer } from './PageRenderer';
|
|
2
2
|
export { createCustomBlockRegistry, mergeBlockDescriptorsWithRegistry, planCustomBlockRegistryResolution, transformToBlockDescriptor, } from './customBlockRegistry';
|
|
3
3
|
export type { CustomBlockConflictReason, CustomBlockManifestSource, CustomBlockRegistry, CustomBlockRegistryConflict, CustomBlockRegistryEntry, CustomBlockRegistryResolutionPlan, CustomBlockSourcePolicy, ResolvedCustomBlockManifest, SdkConfigForBlockPicker, } from './customBlockRegistry';
|
|
4
|
-
export type { BlockOverrideComponent, BlockOverrideProps, BlockOverrides, EntrySubrouteContextData, PageRendererProps, OccurrenceContextData, PageBlockPosition, PageRuntimeBoundary, SdkConfigForRenderer, } from './PageRenderer';
|
|
4
|
+
export type { BlockOverrideComponent, BlockOverrideProps, BlockOverrides, EntrySubrouteContextData, EditorPageRendererProps, PageBlockRenderAdmissionError, PageRendererProps, RenderablePageBlock, RenderablePageOutline, OccurrenceContextData, PageBlockPosition, PageRuntimeBoundary, SdkConfigForRenderer, } from './PageRenderer';
|
|
5
5
|
export { MissingBlockOverrideError } from './pageRenderingMode';
|
|
6
6
|
export * from './subroutes';
|
|
7
7
|
export * from './structure/schema';
|
|
@@ -47,7 +47,8 @@ export { createRichTextDocFromMarkdown, parseRichTextInlineMarkdown, parseRichTe
|
|
|
47
47
|
export { applyInlineTextMarkToRange, coerceInlineTextWithFallback, inlineTextEqual, inlineTextAccentTones, inlineTextHighlightTones, inlineTextMarksEqual, inlineTextSchema, inlineTextToPlainText, isInlineTextEmpty, normalizeInlineText, normalizeInlineTextMarks, parseInlineTextFromUnknown, plainTextToInlineText, removeInlineTextMarkFromRange, replaceInlineTextRange, truncateInlineText, type InlineText, type InlineTextAccentTone, type InlineTextHighlightTone, type InlineTextMark, type InlineTextParseError, type InlineTextParseResult, type InlineTextRun, } from './system/inlineText';
|
|
48
48
|
export { renderInlineText } from './system/runtime/nodes/renderInlineText';
|
|
49
49
|
export type { RichTextDoc, RichTextHardBreakNode, RichTextInlineNode, RichTextTextNode, TipTapNode, } from './system/manifest/richTextSchema';
|
|
50
|
-
export {
|
|
50
|
+
export { admitManifestContentForWrite, admitStoredManifestContent, admitTransportedRenderableManifestContent, compileManifestContentContract, deriveContentZodFromManifest, deriveRenderableManifestContent, findNonPortableManifestMediaPaths, resolveManifestContentFieldDescriptor, validateManifestDraft, validateManifestWriteCandidate, } from './system/manifest/validation';
|
|
51
|
+
export type { CompiledManifestContentContract, ManifestContentAdmissionError, ManifestContentAdmissionIssue, ManifestContentAdmissionResult, ManifestDraftValidationResult, ManifestWriteCandidateValidationResult, RenderableManifestContent, StoredManifestContent, } from './system/manifest/validation';
|
|
51
52
|
export { singleButtonManifest } from './system/blocks/single-button';
|
|
52
53
|
export { Text, RichText } from './primitives/content/primitives';
|
|
53
54
|
export type { PrimitiveAPI, RichTextPrimitiveProps, RichTextVariant, TextProps, } from './primitives/content/primitives';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Block, PageOutline } from './structure/schema';
|
|
2
|
+
import type { ManifestContentAdmissionError, RenderableManifestContent } from './system/manifest/validation';
|
|
3
|
+
export type PageBlockRenderAdmissionError = Readonly<{
|
|
4
|
+
kind: 'invalid_manifest_content';
|
|
5
|
+
error: ManifestContentAdmissionError;
|
|
6
|
+
}> | Readonly<{
|
|
7
|
+
kind: 'manifest_unavailable';
|
|
8
|
+
}>;
|
|
9
|
+
export type RenderablePageBlock = Readonly<{
|
|
10
|
+
id: Block['id'];
|
|
11
|
+
kind: Block['kind'];
|
|
12
|
+
purpose: Block['purpose'];
|
|
13
|
+
bindings?: Block['bindings'];
|
|
14
|
+
admission: Readonly<{
|
|
15
|
+
kind: 'renderable';
|
|
16
|
+
content: RenderableManifestContent;
|
|
17
|
+
}> | Readonly<{
|
|
18
|
+
kind: 'invalid';
|
|
19
|
+
error: PageBlockRenderAdmissionError;
|
|
20
|
+
}>;
|
|
21
|
+
}>;
|
|
22
|
+
export type RenderablePageOutline = Omit<PageOutline, 'blocks'> & Readonly<{
|
|
23
|
+
blocks: readonly RenderablePageBlock[];
|
|
24
|
+
}>;
|
|
25
|
+
export type PresentationAdmission = Readonly<{
|
|
26
|
+
kind: 'renderable';
|
|
27
|
+
}> | Readonly<{
|
|
28
|
+
kind: 'editor';
|
|
29
|
+
}> | Readonly<{
|
|
30
|
+
kind: 'invalid';
|
|
31
|
+
error: PageBlockRenderAdmissionError;
|
|
32
|
+
}>;
|
|
33
|
+
export type PresentationBlock = Block & Readonly<{
|
|
34
|
+
presentationAdmission: PresentationAdmission;
|
|
35
|
+
}>;
|
|
36
|
+
export type PresentationPageOutline = Omit<PageOutline, 'blocks'> & Readonly<{
|
|
37
|
+
blocks: readonly PresentationBlock[];
|
|
38
|
+
}>;
|
|
39
|
+
export declare function toPresentationPage(page: RenderablePageOutline | null): PresentationPageOutline | null;
|
|
40
|
+
export declare function toEditorPresentationPage(page: PageOutline | null): PresentationPageOutline | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as PageRenderer, MissingBlockOverrideError, } from './PageRenderer';
|
|
2
|
-
export type { BlockOverrideComponent, BlockOverrideProps, BlockOverrides, EntrySubrouteContextData, OccurrenceContextData, PageBlockPosition, PageRuntimeBoundary, SdkConfigForRenderer, } from './PageRenderer';
|
|
1
|
+
export { default as PageRenderer, EditorPageRenderer, MissingBlockOverrideError, } from './PageRenderer';
|
|
2
|
+
export type { BlockOverrideComponent, BlockOverrideProps, BlockOverrides, EntrySubrouteContextData, EditorPageRendererProps, OccurrenceContextData, PageBlockRenderAdmissionError, PageBlockPosition, PageRuntimeBoundary, RenderablePageBlock, RenderablePageOutline, SdkConfigForRenderer, } from './PageRenderer';
|
|
3
3
|
export * from './subroutes';
|
|
4
4
|
export { ThemeScope } from '../../theme-core/src/ThemeScope';
|
|
@@ -93,6 +93,11 @@ export declare const publicWholeSeriesPriceDisplaySchema: z.ZodDiscriminatedUnio
|
|
|
93
93
|
kind: z.ZodLiteral<"from">;
|
|
94
94
|
amount: z.ZodNumber;
|
|
95
95
|
currency: z.ZodString;
|
|
96
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
97
|
+
kind: z.ZodLiteral<"range">;
|
|
98
|
+
minAmount: z.ZodNumber;
|
|
99
|
+
maxAmount: z.ZodNumber;
|
|
100
|
+
currency: z.ZodString;
|
|
96
101
|
}, z.core.$strip>, z.ZodObject<{
|
|
97
102
|
kind: z.ZodLiteral<"unavailable">;
|
|
98
103
|
currency: z.ZodString;
|
|
@@ -137,6 +142,11 @@ export declare const publicEventPriceDisplaySchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
137
142
|
kind: z.ZodLiteral<"from">;
|
|
138
143
|
amount: z.ZodNumber;
|
|
139
144
|
currency: z.ZodString;
|
|
145
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
146
|
+
kind: z.ZodLiteral<"range">;
|
|
147
|
+
minAmount: z.ZodNumber;
|
|
148
|
+
maxAmount: z.ZodNumber;
|
|
149
|
+
currency: z.ZodString;
|
|
140
150
|
}, z.core.$strip>, z.ZodObject<{
|
|
141
151
|
kind: z.ZodLiteral<"unavailable">;
|
|
142
152
|
currency: z.ZodString;
|
|
@@ -349,6 +359,11 @@ export declare const publicEventPricingSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
349
359
|
kind: z.ZodLiteral<"from">;
|
|
350
360
|
amount: z.ZodNumber;
|
|
351
361
|
currency: z.ZodString;
|
|
362
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
363
|
+
kind: z.ZodLiteral<"range">;
|
|
364
|
+
minAmount: z.ZodNumber;
|
|
365
|
+
maxAmount: z.ZodNumber;
|
|
366
|
+
currency: z.ZodString;
|
|
352
367
|
}, z.core.$strip>, z.ZodObject<{
|
|
353
368
|
kind: z.ZodLiteral<"unavailable">;
|
|
354
369
|
currency: z.ZodString;
|
|
@@ -896,6 +911,11 @@ export declare const publicEventSchema: z.ZodObject<{
|
|
|
896
911
|
kind: z.ZodLiteral<"from">;
|
|
897
912
|
amount: z.ZodNumber;
|
|
898
913
|
currency: z.ZodString;
|
|
914
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
915
|
+
kind: z.ZodLiteral<"range">;
|
|
916
|
+
minAmount: z.ZodNumber;
|
|
917
|
+
maxAmount: z.ZodNumber;
|
|
918
|
+
currency: z.ZodString;
|
|
899
919
|
}, z.core.$strip>, z.ZodObject<{
|
|
900
920
|
kind: z.ZodLiteral<"unavailable">;
|
|
901
921
|
currency: z.ZodString;
|
|
@@ -1600,6 +1620,11 @@ export declare const publicEventsArraySchema: z.ZodArray<z.ZodObject<{
|
|
|
1600
1620
|
kind: z.ZodLiteral<"from">;
|
|
1601
1621
|
amount: z.ZodNumber;
|
|
1602
1622
|
currency: z.ZodString;
|
|
1623
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1624
|
+
kind: z.ZodLiteral<"range">;
|
|
1625
|
+
minAmount: z.ZodNumber;
|
|
1626
|
+
maxAmount: z.ZodNumber;
|
|
1627
|
+
currency: z.ZodString;
|
|
1603
1628
|
}, z.core.$strip>, z.ZodObject<{
|
|
1604
1629
|
kind: z.ZodLiteral<"unavailable">;
|
|
1605
1630
|
currency: z.ZodString;
|
|
@@ -10,6 +10,8 @@ export { initialPreviewResolvedDataState, previewResolvedDataReducer, selectPrev
|
|
|
10
10
|
export type { PreviewLoaderError, PreviewResolvedDataAction, PreviewResolvedDataState, } from './previewResolvedDataState';
|
|
11
11
|
export { SUPPORTED_LOADER_ENDPOINTS, isSupportedLoaderEndpoint, } from './loaderEndpoints';
|
|
12
12
|
export type { SupportedLoaderEndpoint } from './loaderEndpoints';
|
|
13
|
+
export { PUBLIC_LOADER_CACHE_POLICIES, getPublicLoaderCachePolicy, } from './publicLoaderCachePolicy';
|
|
14
|
+
export type { PublicLoaderCachePolicy, PublicLoaderCacheTagKind, } from './publicLoaderCachePolicy';
|
|
13
15
|
export { createMicrobatcher, stableSerialize, type BatchItemResult, type Microbatcher, } from './batching';
|
|
14
16
|
export { normalizeLoaderParams, normalizePublicApiLoaderParams, } from './normalizeLoaderParams';
|
|
15
17
|
export { normalizeDataLoaders, normalizeContent, normalizeParams, coerceToString, coercePayload, } from './utils';
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { SupportedLoaderEndpoint } from './loaderEndpoints';
|
|
2
|
+
export type PublicLoaderCacheTagKind = 'published_content' | 'public_whole_series_offerings' | 'public_team_members' | 'public_products' | 'site_forms';
|
|
3
|
+
export type PublicLoaderCachePolicy = Readonly<{
|
|
4
|
+
kind: 'live';
|
|
5
|
+
reason: 'booking_correctness';
|
|
6
|
+
}> | Readonly<{
|
|
7
|
+
kind: 'tagged';
|
|
8
|
+
tags: readonly PublicLoaderCacheTagKind[];
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* Canonical freshness policy for public block-loader data.
|
|
12
|
+
*
|
|
13
|
+
* Consumers may implement tagged caching differently, but a loader marked
|
|
14
|
+
* live here must not be placed in a process-local or durable stale cache.
|
|
15
|
+
*/
|
|
16
|
+
export declare const PUBLIC_LOADER_CACHE_POLICIES: {
|
|
17
|
+
readonly listPublishedEntries: {
|
|
18
|
+
readonly kind: "tagged";
|
|
19
|
+
readonly tags: readonly ["published_content"];
|
|
20
|
+
};
|
|
21
|
+
readonly getPublishedEntryPreview: {
|
|
22
|
+
readonly kind: "tagged";
|
|
23
|
+
readonly tags: readonly ["published_content"];
|
|
24
|
+
};
|
|
25
|
+
readonly listPublicEvents: {
|
|
26
|
+
readonly kind: "live";
|
|
27
|
+
readonly reason: "booking_correctness";
|
|
28
|
+
};
|
|
29
|
+
readonly listPublicRecurringSchedule: {
|
|
30
|
+
readonly kind: "live";
|
|
31
|
+
readonly reason: "booking_correctness";
|
|
32
|
+
};
|
|
33
|
+
readonly getPublicEventDetails: {
|
|
34
|
+
readonly kind: "live";
|
|
35
|
+
readonly reason: "booking_correctness";
|
|
36
|
+
};
|
|
37
|
+
readonly listPublicWholeSeriesOfferings: {
|
|
38
|
+
readonly kind: "tagged";
|
|
39
|
+
readonly tags: readonly ["public_whole_series_offerings"];
|
|
40
|
+
};
|
|
41
|
+
readonly getPublicWholeSeriesOffering: {
|
|
42
|
+
readonly kind: "tagged";
|
|
43
|
+
readonly tags: readonly ["public_whole_series_offerings"];
|
|
44
|
+
};
|
|
45
|
+
readonly listPublicRouteCandidates: {
|
|
46
|
+
readonly kind: "tagged";
|
|
47
|
+
readonly tags: readonly ["published_content"];
|
|
48
|
+
};
|
|
49
|
+
readonly listPublicTeamMembers: {
|
|
50
|
+
readonly kind: "tagged";
|
|
51
|
+
readonly tags: readonly ["public_team_members"];
|
|
52
|
+
};
|
|
53
|
+
readonly listPublicProducts: {
|
|
54
|
+
readonly kind: "tagged";
|
|
55
|
+
readonly tags: readonly ["public_products"];
|
|
56
|
+
};
|
|
57
|
+
readonly listPublicPasses: {
|
|
58
|
+
readonly kind: "live";
|
|
59
|
+
readonly reason: "booking_correctness";
|
|
60
|
+
};
|
|
61
|
+
readonly listPublicMemberships: {
|
|
62
|
+
readonly kind: "live";
|
|
63
|
+
readonly reason: "booking_correctness";
|
|
64
|
+
};
|
|
65
|
+
readonly getPublicFormById: {
|
|
66
|
+
readonly kind: "tagged";
|
|
67
|
+
readonly tags: readonly ["site_forms"];
|
|
68
|
+
};
|
|
69
|
+
readonly getPublicBookingServices: {
|
|
70
|
+
readonly kind: "live";
|
|
71
|
+
readonly reason: "booking_correctness";
|
|
72
|
+
};
|
|
73
|
+
readonly getPublicWeeklySlotAvailability: {
|
|
74
|
+
readonly kind: "live";
|
|
75
|
+
readonly reason: "booking_correctness";
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
export declare function getPublicLoaderCachePolicy(endpoint: SupportedLoaderEndpoint): PublicLoaderCachePolicy;
|
|
@@ -143,21 +143,6 @@ type BaseIssue<K extends string, Extra extends object = Record<never, never>> =
|
|
|
143
143
|
fieldId: string;
|
|
144
144
|
label: string;
|
|
145
145
|
}> & Readonly<Extra>;
|
|
146
|
-
export type ManifestContentRequiredScope = "topLevel" | "nested";
|
|
147
|
-
export type ManifestContentValidationIssue = Readonly<{
|
|
148
|
-
kind: FieldValidationIssue["kind"];
|
|
149
|
-
field: string;
|
|
150
|
-
message: string;
|
|
151
|
-
requiredScope: ManifestContentRequiredScope | null;
|
|
152
|
-
}>;
|
|
153
|
-
export type ManifestContentValidationResult = Readonly<{
|
|
154
|
-
kind: 'valid';
|
|
155
|
-
issues: readonly [];
|
|
156
|
-
data: Readonly<Record<string, unknown>>;
|
|
157
|
-
}> | Readonly<{
|
|
158
|
-
kind: "invalid";
|
|
159
|
-
issues: readonly ManifestContentValidationIssue[];
|
|
160
|
-
}>;
|
|
161
146
|
type PlanBase<K extends string, ValueKind extends string, Constraints extends FieldConstraint> = Readonly<{
|
|
162
147
|
kind: K;
|
|
163
148
|
valueKind: ValueKind;
|
|
@@ -265,11 +250,10 @@ export declare function validateFieldValue(plan: FieldValidationPlan, value: unk
|
|
|
265
250
|
export declare function fieldPlanToZod(plan: FieldValidationPlan, options?: FieldValidationOptions): z.ZodTypeAny;
|
|
266
251
|
export declare function fieldPresenceForPlan(plan: Pick<FieldValidationPlan, "required">): FieldPresence;
|
|
267
252
|
export declare function fieldPlanToObjectPropertyZod(plan: FieldValidationPlan, options?: FieldValidationOptions): z.ZodTypeAny;
|
|
253
|
+
/** Validate stored field values without applying editor/write normalization. */
|
|
254
|
+
export declare function fieldPlanToStoredObjectPropertyZod(plan: FieldValidationPlan): z.ZodTypeAny;
|
|
268
255
|
export declare function resolveFieldValidationDescriptor(plans: readonly FieldValidationPlan[], path: FieldPath): FieldValidationDescriptor | null;
|
|
269
256
|
export declare function validateManifestValues(fields: readonly FieldDefinition[], values: Record<string, unknown>, options?: FieldValidationOptions): FieldValidationIssue[];
|
|
270
|
-
export declare function validateManifestContentForPush(fields: readonly FieldDefinition[], values: Record<string, unknown>, options?: FieldValidationOptions): ManifestContentValidationResult;
|
|
271
|
-
export declare function isTopLevelRequiredManifestContentIssue(issue: ManifestContentValidationIssue): boolean;
|
|
272
|
-
export declare function formatManifestContentValidationIssue(issue: ManifestContentValidationIssue): string;
|
|
273
257
|
export declare function isCanonicalEmailValue(value: string): boolean;
|
|
274
258
|
export declare function isCanonicalPhoneValue(value: string): boolean;
|
|
275
259
|
export declare function isCanonicalUrlValue(value: string, options?: Readonly<{
|
|
@@ -1,6 +1,69 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
import type { BlockManifest, FieldDefinition } from
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { BlockManifest, FieldDefinition } from './schema';
|
|
3
|
+
import { type FieldValidationDescriptor, type FieldValidationPlan } from './fieldValidation';
|
|
3
4
|
type FieldShape = Record<string, z.ZodTypeAny>;
|
|
5
|
+
declare const manifestContentStage: unique symbol;
|
|
6
|
+
declare const compiledManifestContentContract: unique symbol;
|
|
7
|
+
type CompiledManifestContentContractState = Readonly<{
|
|
8
|
+
plans: readonly FieldValidationPlan[];
|
|
9
|
+
strictStoredSchema: z.ZodType<Record<string, unknown>>;
|
|
10
|
+
writeSchema: z.ZodType<Record<string, unknown>>;
|
|
11
|
+
draftSchema: z.ZodType<Record<string, unknown>>;
|
|
12
|
+
renderSchema: z.ZodType<Record<string, unknown>>;
|
|
13
|
+
findNonPortableMediaPaths: (content: unknown) => readonly string[];
|
|
14
|
+
}>;
|
|
15
|
+
export type CompiledManifestContentContract = Readonly<{
|
|
16
|
+
[compiledManifestContentContract]: CompiledManifestContentContractState;
|
|
17
|
+
}>;
|
|
18
|
+
export type StoredManifestContent = Readonly<Record<string, unknown>> & Readonly<{
|
|
19
|
+
[manifestContentStage]: 'stored';
|
|
20
|
+
}>;
|
|
21
|
+
export type RenderableManifestContent = Readonly<Record<string, unknown>> & Readonly<{
|
|
22
|
+
[manifestContentStage]: 'renderable';
|
|
23
|
+
}>;
|
|
24
|
+
export type ManifestContentAdmissionIssue = Readonly<{
|
|
25
|
+
code: z.core.$ZodIssue['code'];
|
|
26
|
+
path: readonly (string | number)[];
|
|
27
|
+
message: string;
|
|
28
|
+
}>;
|
|
29
|
+
export type ManifestContentAdmissionError = Readonly<{
|
|
30
|
+
kind: 'invalid_shape';
|
|
31
|
+
issues: readonly ManifestContentAdmissionIssue[];
|
|
32
|
+
}> | Readonly<{
|
|
33
|
+
kind: 'non_portable_media';
|
|
34
|
+
paths: readonly string[];
|
|
35
|
+
}>;
|
|
36
|
+
export type ManifestContentAdmissionResult<T> = Readonly<{
|
|
37
|
+
ok: true;
|
|
38
|
+
value: T;
|
|
39
|
+
}> | Readonly<{
|
|
40
|
+
ok: false;
|
|
41
|
+
error: ManifestContentAdmissionError;
|
|
42
|
+
}>;
|
|
43
|
+
export type ManifestDraftValidationResult = Readonly<{
|
|
44
|
+
kind: 'previewable';
|
|
45
|
+
data: Readonly<Record<string, unknown>>;
|
|
46
|
+
issues: readonly [];
|
|
47
|
+
}> | Readonly<{
|
|
48
|
+
kind: 'invalid';
|
|
49
|
+
data: Readonly<Record<string, unknown>>;
|
|
50
|
+
issues: readonly [
|
|
51
|
+
ManifestContentAdmissionIssue,
|
|
52
|
+
...ManifestContentAdmissionIssue[]
|
|
53
|
+
];
|
|
54
|
+
}>;
|
|
55
|
+
export type ManifestWriteCandidateValidationResult = Readonly<{
|
|
56
|
+
kind: 'valid';
|
|
57
|
+
data: Readonly<Record<string, unknown>>;
|
|
58
|
+
issues: readonly [];
|
|
59
|
+
}> | Readonly<{
|
|
60
|
+
kind: 'invalid';
|
|
61
|
+
data: Readonly<Record<string, unknown>>;
|
|
62
|
+
issues: readonly [
|
|
63
|
+
ManifestContentAdmissionIssue,
|
|
64
|
+
...ManifestContentAdmissionIssue[]
|
|
65
|
+
];
|
|
66
|
+
}>;
|
|
4
67
|
type ValidatorOptions = {
|
|
5
68
|
allowNull?: boolean;
|
|
6
69
|
/**
|
|
@@ -8,22 +71,46 @@ type ValidatorOptions = {
|
|
|
8
71
|
* Use for autosave scenarios where content may be incomplete.
|
|
9
72
|
*/
|
|
10
73
|
allowIncomplete?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Validation mode:
|
|
13
|
-
* - 'strict' (default): Enforce all required field constraints
|
|
14
|
-
* - 'draft': Preprocess empty values to undefined, use allowIncomplete for lenient validation
|
|
15
|
-
*
|
|
16
|
-
* Use 'draft' mode in preview/editing contexts where users need to temporarily
|
|
17
|
-
* have empty fields without validation errors causing blocks to disappear.
|
|
18
|
-
*/
|
|
19
|
-
mode?: "strict" | "draft";
|
|
20
74
|
};
|
|
21
75
|
export declare function deriveContentZodFromManifest(manifestOrFields: BlockManifest | FieldDefinition[], options?: ValidatorOptions): z.ZodObject<FieldShape>;
|
|
22
|
-
export declare function createManifestValidator(manifestOrFields: BlockManifest | FieldDefinition[], options?: ValidatorOptions): z.ZodType<Record<string, unknown>>;
|
|
23
76
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
|
|
77
|
+
* Compiles editor-facing manifest structure into the presentation-independent
|
|
78
|
+
* validation contract used by every manifest-content trust transition.
|
|
79
|
+
*/
|
|
80
|
+
export declare function compileManifestContentContract(manifestOrFields: BlockManifest | FieldDefinition[]): CompiledManifestContentContract;
|
|
81
|
+
export declare function resolveManifestContentFieldDescriptor(contract: CompiledManifestContentContract, path: readonly (string | number)[]): FieldValidationDescriptor | null;
|
|
82
|
+
/**
|
|
83
|
+
* Reports declared media fields carrying environment-specific keys.
|
|
84
|
+
*
|
|
85
|
+
* Split out of stored admission for callers that must prove portability of
|
|
86
|
+
* content whose *shape* is legitimately incomplete — a template block's stored
|
|
87
|
+
* defaults, for instance, where required values only arrive through entry
|
|
88
|
+
* bindings. Returns the offending paths, empty when the content is portable.
|
|
89
|
+
*/
|
|
90
|
+
export declare function findNonPortableManifestMediaPaths(contract: CompiledManifestContentContract, content: unknown): readonly string[];
|
|
91
|
+
/** Strictly admits already-persisted content without repairing it. */
|
|
92
|
+
export declare function admitStoredManifestContent(contract: CompiledManifestContentContract, content: unknown): ManifestContentAdmissionResult<StoredManifestContent>;
|
|
93
|
+
/**
|
|
94
|
+
* Admits an effectfully resolved write candidate and canonicalizes declared
|
|
95
|
+
* media to its portable identifier-only representation.
|
|
96
|
+
*/
|
|
97
|
+
export declare function admitManifestContentForWrite(contract: CompiledManifestContentContract, content: unknown): ManifestContentAdmissionResult<StoredManifestContent>;
|
|
98
|
+
/** Validates raw editor state without granting a stored-content proof. */
|
|
99
|
+
export declare function validateManifestDraft(contract: CompiledManifestContentContract, data: Readonly<Record<string, unknown>>): ManifestDraftValidationResult;
|
|
100
|
+
/**
|
|
101
|
+
* Checks whether a raw editor candidate is schema-ready for the effectful
|
|
102
|
+
* media-resolution/write boundary without granting a stored proof.
|
|
103
|
+
*/
|
|
104
|
+
export declare function validateManifestWriteCandidate(contract: CompiledManifestContentContract, data: Readonly<Record<string, unknown>>): ManifestWriteCandidateValidationResult;
|
|
105
|
+
/**
|
|
106
|
+
* Applies a pure runtime projection to admitted stored content and validates
|
|
107
|
+
* the resulting render shape before granting the renderable proof.
|
|
108
|
+
*/
|
|
109
|
+
export declare function deriveRenderableManifestContent(contract: CompiledManifestContentContract, stored: StoredManifestContent, project: (content: StoredManifestContent) => Readonly<Record<string, unknown>>): ManifestContentAdmissionResult<RenderableManifestContent>;
|
|
110
|
+
/**
|
|
111
|
+
* Re-admits renderable content after a transport boundary has erased its
|
|
112
|
+
* compile-time proof. Unlike write admission, this never canonicalizes or
|
|
113
|
+
* grants a stored proof, so hydrated media cannot flow back to persistence.
|
|
27
114
|
*/
|
|
28
|
-
export declare function
|
|
115
|
+
export declare function admitTransportedRenderableManifestContent(contract: CompiledManifestContentContract, content: unknown): ManifestContentAdmissionResult<RenderableManifestContent>;
|
|
29
116
|
export {};
|
|
@@ -20,7 +20,7 @@ export type AllowedNodeType = (typeof ALLOWED_NODE_TYPES)[number];
|
|
|
20
20
|
* $bind.transforms within custom block layouts. Transform IDs
|
|
21
21
|
* not in this list will be rejected during validation.
|
|
22
22
|
*/
|
|
23
|
-
export declare const ALLOWED_TRANSFORM_IDS: readonly ["string.uppercase", "value.fallback", "date.formatShort", "array.length", "value.jsonArray", "value.csv", "array.marqueeLoop", "value.mapToken", "layout.maxWidthClass", "layout.headerRootClass", "layout.footerRootClass", "layout.headerRootStyle", "layout.headerSectionBackground", "layout.
|
|
23
|
+
export declare const ALLOWED_TRANSFORM_IDS: readonly ["string.uppercase", "value.fallback", "date.formatShort", "array.length", "value.jsonArray", "value.csv", "array.marqueeLoop", "value.mapToken", "layout.maxWidthClass", "layout.headerRootClass", "layout.footerRootClass", "layout.headerRootStyle", "layout.headerSectionBackground", "layout.footerRootStyle", "ui.headerNavLinkClass", "ui.headingClassFromAlignment", "ui.bodyClassFromAlignment", "ui.stackAlignFromAlignment", "ui.sectionStateTone", "ui.heroContentWrapperClass", "ui.heroCtaJustify", "ui.heroStackJustifyFromVerticalAlignment", "ui.heroGridClassFromVerticalAlignment", "ui.conditionalClass", "ui.twoColumnContainerClass", "ui.twoColumnFlexBasis", "ui.imageGalleryFilterClass", "ui.imageGalleryTileClass", "ui.imageGalleryTileStyle", "ui.imageGalleryMarqueeTileStyle", "ui.imageGalleryMarqueeDuration", "ui.imageGalleryMarqueeDirection", "ui.imageFragmentClass", "ui.imageFragmentSize", "media.fromUrl", "background.resolveStyle", "background.resolveColorsStyle", "background.resolveFrameClassName", "background.resolveImageStyle", "background.resolveImageClassName", "background.resolveOverlayStyle", "links.resolve", "links.label", "content.interpolateRichTextTokens", "boxStyles.spacing", "boxStyles.resolveRootClass", "boxStyles.resolveRootStyle", "boxStyles.semanticGap", "boxStyles.semanticGapValue", "containerStyles.resolveBoxClassName"];
|
|
24
24
|
export type AllowedTransformId = (typeof ALLOWED_TRANSFORM_IDS)[number];
|
|
25
25
|
/**
|
|
26
26
|
* Set for O(1) lookup of allowed node types.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Factory function for creating a typed API client for block client-side API calls.
|
|
5
5
|
*/
|
|
6
|
-
import type { BlockApiConfig, FormSubmitRequest, FormSubmitResponse, FormConfigResponse, BookingSubmitRequest, BookingPackageSubmitRequest, BookingSubmitResponse, EligibleAppointmentPackagesResponse, AppointmentBookingStatusRequest, AppointmentBookingStatusResponse, AvailableSlotsRequest, AvailableSlotsResponse, WeeklySlotAvailabilityRequest, WeeklySlotAvailabilityResponse, AvailableDatesRequest, AvailableDatesResponse, BookingServicesResponse, BookingServiceResponse, BookingResourcesResponse, PublicEventsRequest, PublicEvent, EventFiltersResponse, EventRegisterRequest, EventRegisterResponse, EventCheckoutRequest, EventCheckoutResponse, RegistrationOptionsRequest, RegistrationOptionsResponse, EventRegistrationStatusRequest, EventRegistrationStatusResponse, ResolveWaitlistClaimRequest, ResolveWaitlistClaimResponse, DiscountsAvailableRequest, DiscountsAvailableResponse, DiscountApplyRequest, DiscountApplyResponse, PublicProductsResponse, ShopCheckoutRequest, ShopCheckoutResponse, UnifiedCheckoutRequest, UnifiedCheckoutResponse, PublicGiftingOffersResponse, CreateGiftingCheckoutRequest, CreateGiftingCheckoutResponse, ClaimGiftCardRequest, ClaimGiftCardResponse, PortalMeResponse, CustomerProfile, CustomerOrder, PortalMeUpdateRequest, CustomerPass, CustomerMembership, CustomerEventRegistration, PortalEventTicket, CustomerAppointment, BookingQuestionsTaskDetail, CustomerEventSeriesRegistration, PortalCredit, PortalOrderCheckoutRequest, PortalOrderCheckoutResponse, PortalDigitalProductAccessResponse, PortalDigitalProductDownloadUrlResponse, PortalDigitalProductsResponse, PortalCancelWholeSeriesRegistrationRequest, PortalCancelWholeSeriesRegistrationResult, PortalCancelAppointmentRequest, PortalCancelAppointmentResult, PortalUpdateAppointmentBookingQuestionsRequest, PortalUpdateWholeSeriesBookingQuestionsRequest, PortalUpdateEventBookingQuestionsRequest, PortalCancelEventRegistrationRequest, PortalCancelEventRegistrationResult, PortalTransferEventRegistrationRequest, PortalTransferEventRegistrationResult, PortalRescheduleAppointmentRequest, PortalRescheduleAppointmentResponse, PortalCancelMembershipAtPeriodEndResult, MagicLinkRequest, EventGuest, UpdateEventGuestsRequest, NewsletterSubscribeRequest, NewsletterSubscribeResponse } from './types';
|
|
6
|
+
import type { BlockApiConfig, FormSubmitRequest, FormSubmitResponse, FormConfigResponse, BookingSubmitRequest, BookingPackageSubmitRequest, BookingSubmitResponse, EligibleAppointmentPackagesResponse, AppointmentBookingStatusRequest, AppointmentBookingStatusResponse, AvailableSlotsRequest, AvailableSlotsResponse, WeeklySlotAvailabilityRequest, WeeklySlotAvailabilityResponse, AvailableDatesRequest, AvailableDatesResponse, BookingServicesResponse, BookingServiceResponse, BookingResourcesResponse, PublicEventsRequest, PublicEvent, EventFiltersResponse, EventRegisterRequest, EventRegisterResponse, EventCheckoutRequest, EventCheckoutResponse, RegistrationOptionsRequest, RegistrationOptionsResponse, EventRegistrationStatusRequest, EventRegistrationStatusResponse, EventCheckoutReturnRequest, EventCheckoutReturnResponse, ResolveWaitlistClaimRequest, ResolveWaitlistClaimResponse, DiscountsAvailableRequest, DiscountsAvailableResponse, DiscountApplyRequest, DiscountApplyResponse, PublicProductsResponse, ShopCheckoutRequest, ShopCheckoutResponse, UnifiedCheckoutRequest, UnifiedCheckoutResponse, PublicGiftingOffersResponse, CreateGiftingCheckoutRequest, CreateGiftingCheckoutResponse, ClaimGiftCardRequest, ClaimGiftCardResponse, PortalMeResponse, CustomerProfile, CustomerOrder, PortalMeUpdateRequest, CustomerPass, CustomerMembership, CustomerEventRegistration, PortalEventTicket, CustomerAppointment, BookingQuestionsTaskDetail, CustomerEventSeriesRegistration, PortalCredit, PortalOrderCheckoutRequest, PortalOrderCheckoutResponse, PortalDigitalProductAccessResponse, PortalDigitalProductDownloadUrlResponse, PortalDigitalProductsResponse, PortalCancelWholeSeriesRegistrationRequest, PortalCancelWholeSeriesRegistrationResult, PortalCancelAppointmentRequest, PortalCancelAppointmentResult, PortalUpdateAppointmentBookingQuestionsRequest, PortalUpdateWholeSeriesBookingQuestionsRequest, PortalUpdateEventBookingQuestionsRequest, PortalCancelEventRegistrationRequest, PortalCancelEventRegistrationResult, PortalTransferEventRegistrationRequest, PortalTransferEventRegistrationResult, PortalRescheduleAppointmentRequest, PortalRescheduleAppointmentResponse, PortalCancelMembershipAtPeriodEndResult, MagicLinkRequest, EventGuest, UpdateEventGuestsRequest, NewsletterSubscribeRequest, NewsletterSubscribeResponse } from './types';
|
|
7
7
|
type WithoutSiteId<T> = T extends unknown ? Omit<T, 'siteId'> : never;
|
|
8
8
|
type PublicProductCategorySelector = Readonly<{
|
|
9
9
|
kind: 'category';
|
|
@@ -49,6 +49,7 @@ export interface BlockApiClient {
|
|
|
49
49
|
createEventCheckout(data: WithoutSiteId<EventCheckoutRequest>): Promise<EventCheckoutResponse>;
|
|
50
50
|
getRegistrationOptions(data: Omit<RegistrationOptionsRequest, 'siteId'>): Promise<RegistrationOptionsResponse>;
|
|
51
51
|
getEventRegistrationStatus(params: WithoutSiteId<EventRegistrationStatusRequest>): Promise<EventRegistrationStatusResponse>;
|
|
52
|
+
resolveEventCheckoutReturn(data: EventCheckoutReturnRequest): Promise<EventCheckoutReturnResponse>;
|
|
52
53
|
resolveWaitlistClaim(data: Omit<ResolveWaitlistClaimRequest, 'siteId'>): Promise<ResolveWaitlistClaimResponse>;
|
|
53
54
|
getDiscountsAvailable(data: Omit<DiscountsAvailableRequest, 'siteId'>): Promise<DiscountsAvailableResponse>;
|
|
54
55
|
applyDiscountCode(data: Omit<DiscountApplyRequest, 'siteId'>): Promise<DiscountApplyResponse>;
|
|
@@ -101,6 +101,10 @@ export declare const EVENTS: {
|
|
|
101
101
|
path: string;
|
|
102
102
|
method: "GET";
|
|
103
103
|
};
|
|
104
|
+
checkoutReturn: {
|
|
105
|
+
path: string;
|
|
106
|
+
method: "POST";
|
|
107
|
+
};
|
|
104
108
|
};
|
|
105
109
|
export declare const WHOLE_SERIES: {
|
|
106
110
|
list: {
|
|
@@ -428,6 +432,10 @@ export declare const ENDPOINTS: {
|
|
|
428
432
|
path: string;
|
|
429
433
|
method: "GET";
|
|
430
434
|
};
|
|
435
|
+
checkoutReturn: {
|
|
436
|
+
path: string;
|
|
437
|
+
method: "POST";
|
|
438
|
+
};
|
|
431
439
|
};
|
|
432
440
|
readonly wholeSeries: {
|
|
433
441
|
list: {
|