@riverbankcms/sdk 0.145.0 → 0.146.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 +17 -0
- package/dist/{PreviewEditorSidebar-O-V6Pl5a.mjs → PreviewEditorSidebar-kg2r2Fyi.mjs} +4 -4
- package/dist/{PreviewEditorUI-1UlX_9cw.mjs → PreviewEditorUI-sWMLp5dT.mjs} +3 -3
- package/dist/{PreviewQueryProvider-BxGwdOCV.mjs → PreviewQueryProvider-Cg51xq1w.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-DYbA_4iv.mjs → SdkPreviewModeRuntime-h2ti3Hch.mjs} +280 -182
- package/dist/{SiteChromeCustomizeContext-CNTKQ9nx.mjs → SiteChromeCustomizeContext-DEACFH9m.mjs} +1330 -734
- package/dist/_dts/ai/src/contracts/proposals.d.ts +924 -0
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +84 -0
- package/dist/_dts/api/src/bookingConfig.d.ts +8 -1
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +8 -14
- package/dist/_dts/api/src/bookingManagementEventEndpointTypes.d.ts +45 -1
- package/dist/_dts/api/src/clientErrorReporting.d.ts +50 -0
- package/dist/_dts/api/src/communications.d.ts +20 -4
- package/dist/_dts/api/src/contentRuntime.d.ts +3 -7
- package/dist/_dts/api/src/endpoints.d.ts +223 -88
- package/dist/_dts/api/src/event-visibility.d.ts +20 -0
- package/dist/_dts/api/src/eventManagementContracts.d.ts +56 -3
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +24 -0
- package/dist/_dts/api/src/eventPageWords.d.ts +19 -0
- package/dist/_dts/api/src/eventSeriesRegistrationEndpointDefinitions.d.ts +14 -0
- package/dist/_dts/api/src/index.d.ts +7 -1
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
- package/dist/_dts/api/src/launchReadiness.d.ts +20 -2
- package/dist/_dts/api/src/launchRequirementPriority.d.ts +3 -0
- package/dist/_dts/api/src/newsletterCampaignCommandEndpoints.d.ts +13 -0
- package/dist/_dts/api/src/newsletterEndpointDefinitions.d.ts +42 -0
- package/dist/_dts/api/src/occurrenceScheduling.d.ts +10 -0
- package/dist/_dts/api/src/pageSurfaceEndpoints.d.ts +44 -0
- package/dist/_dts/api/src/participantMessaging.d.ts +11 -1
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +40 -1
- package/dist/_dts/api/src/sdkContracts.d.ts +3 -42
- package/dist/_dts/api/src/sdkCourseBooking.d.ts +30 -0
- package/dist/_dts/api/src/sdkEventEndpointDefinitions.d.ts +76 -0
- package/dist/_dts/api/src/sdkEventLifecycle.d.ts +37 -0
- package/dist/_dts/api/src/sdkManagedEventContracts.d.ts +18 -0
- package/dist/_dts/api/src/sdkPageDesign.d.ts +388 -0
- package/dist/_dts/api/src/sdkPageDesignEndpointDefinitions.d.ts +22 -0
- package/dist/_dts/api/src/sdkPullEventContracts.d.ts +46 -0
- package/dist/_dts/api/src/siteAddressEndpoints.d.ts +29 -0
- package/dist/_dts/api/src/siteManagementEndpointDefinitions.d.ts +49 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +2 -32
- package/dist/_dts/api/src/siteOnboarding.d.ts +75 -9
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -1
- package/dist/_dts/api/src/types.d.ts +7 -1
- package/dist/_dts/api/src/wholeSeriesRuns.d.ts +14 -0
- package/dist/_dts/blocks/src/index.d.ts +2 -0
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +10 -0
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +3 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +27 -5
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +14 -1
- package/dist/_dts/blocks/src/system/icons/social.d.ts +1 -1
- package/dist/_dts/blocks/src/system/registry.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventSourceRecovery.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +20 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/form.fields.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.block-submission.d.ts +36 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +6 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.parts.d.ts +46 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/CheckboxChoice.d.ts +18 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/primitives/previewEditableOutline.d.ts +2 -0
- package/dist/_dts/content-editor/src/ui/editorBlockEquality.d.ts +3 -0
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +3 -5
- package/dist/_dts/core/src/block-content-identity.d.ts +5 -0
- package/dist/_dts/core/src/editor-state.d.ts +2 -7
- package/dist/_dts/core/src/index.d.ts +1 -0
- package/dist/_dts/core/src/mailing-list-submission.d.ts +3 -1
- package/dist/_dts/core/src/public-event-booking-availability.d.ts +20 -1
- package/dist/_dts/core/src/public-profile.d.ts +3 -1
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +49 -2
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/block-editor/EmptyState.d.ts +13 -1
- package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +2 -8
- package/dist/_dts/editor-blocks/src/index.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +3 -4
- package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +1 -2
- package/dist/_dts/sdk/src/next/renderSdkContent.d.ts +0 -1
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +6 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +5 -2
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +6 -1
- package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/hooks/useContent.d.ts +5 -1
- package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +5 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/surfaces/src/index.d.ts +9 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/inputs/checkable.d.ts +42 -0
- package/dist/_dts/theme-core/src/inputs/inputGroup.d.ts +19 -0
- package/dist/_dts/ui/src/navigation-tabs.d.ts +2 -1
- package/dist/client/{BookingConsentAgreement-DlVOmpW4.mjs → BookingConsentAgreement-BQKL045f.mjs} +2 -2
- package/dist/client/CheckboxChoice--W2n6yKs.mjs +24 -0
- package/dist/client/{DiscountCodeDisclosure-T9q623PQ.mjs → DiscountCodeDisclosure-CsOtjFY7.mjs} +1 -1
- package/dist/client/{EventCombined.client-DnsUeONl.mjs → EventCombined.client-BdRjVbhH.mjs} +6 -6
- package/dist/client/{EventListing.client-CNBFqJS4.mjs → EventListing.client-DBxC6xOU.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-C7higg52.mjs → LeafletStaticMap-mHEJKrTs.mjs} +1 -1
- package/dist/client/{ThemedButton-LAJTNrS8.mjs → ThemedButton-CE5KYT6z.mjs} +1 -1
- package/dist/client/{accordion-BcNF9TjX.mjs → accordion-BEQNSptH.mjs} +1 -1
- package/dist/client/{bookingForm-BUaQ3S03.mjs → bookingForm-AMr-s5vw.mjs} +33 -52
- package/dist/client/bookings.mjs +48 -46
- package/dist/client/{carousel-CTdF6e0V.mjs → carousel-Bbt_QgJy.mjs} +1 -1
- package/dist/client/{cart-pGtyf_XU.mjs → cart-CnWi30zJ.mjs} +3 -3
- package/dist/client/{checkout-Da9WSn7Y.mjs → checkout-f3nkWgd4.mjs} +3 -3
- package/dist/client/client.mjs +1611 -815
- package/dist/client/{context-BFeY_Wbm.mjs → context-Bc8T6pCe.mjs} +1 -1
- package/dist/client/{dates-BhwVSxDg.mjs → dates-DUsCEzLb.mjs} +2 -3
- package/dist/client/{eventCalendar-BAtdnR4s.mjs → eventCalendar-CKwgXui5.mjs} +9 -9
- package/dist/client/{eventCombined-RksA3tRC.mjs → eventCombined-CBAOSTGR.mjs} +4 -4
- package/dist/client/{eventDetails-BB9hB4wR.mjs → eventDetails-Dh-_WiBD.mjs} +4 -4
- package/dist/client/{eventListing-BpJBkviM.mjs → eventListing-CA3frIH5.mjs} +4 -4
- package/dist/client/{eventRegistration-B18jFq_o.mjs → eventRegistration-BHtsgdcg.mjs} +21 -22
- package/dist/client/{form-Dodt8Y8t.mjs → form-C2h3YAcg.mjs} +135 -104
- package/dist/client/{headerSection-B0qj9ttg.mjs → headerSection-lwMuMTH9.mjs} +3 -3
- package/dist/client/hooks.mjs +489 -65
- package/dist/client/{locationMap-gn-iMk7a.mjs → locationMap-DJ2bLODV.mjs} +3 -3
- package/dist/client/{newsletterForm-oByLdFkr.mjs → newsletterForm-8Pu5K32g.mjs} +203 -101
- package/dist/client/{pricing-BOU0_Hai.mjs → pricing-HHx3IgBz.mjs} +1 -1
- package/dist/client/{productDetail-D9v1zH2j.mjs → productDetail-C_1odnAf.mjs} +3 -3
- package/dist/client/{productList-D-mItx1n.mjs → productList-CtCv-Nmx.mjs} +3 -3
- package/dist/client/{propsDecoder-C3TP_z4x.mjs → propsDecoder-Dcgsncxb.mjs} +40 -23
- package/dist/client/rendering/client.mjs +490 -457
- package/dist/client/rendering/islands.mjs +17 -17
- package/dist/client/rendering.mjs +1515 -628
- package/dist/client/{routeIslandApiConfig-DzN1W0sq.mjs → routeIslandApiConfig-CWLP7wu3.mjs} +1 -1
- package/dist/client/{scrollToBlock-CWs8EIdo.mjs → scrollToBlock-BNgaEUpo.mjs} +1 -1
- package/dist/client/{shop-Dufw7N7o.mjs → shop-DQXrQ8kJ.mjs} +7 -7
- package/dist/client/{shop-commerce-gklw_hLF.mjs → shop-commerce-B88zmWWo.mjs} +6 -6
- package/dist/client/{shop-commerce-store-Sf1eyTaZ.mjs → shop-commerce-store-DtSfkKuX.mjs} +1 -1
- package/dist/client/{shopShared-B5nyA41S.mjs → shopShared-cuaONpkJ.mjs} +4 -4
- package/dist/client/{useEventFilters-CLL829vy.mjs → useEventFilters-Bukew6Gb.mjs} +6 -6
- package/dist/preview-next/before-render.mjs +368 -103
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/editor-base.css +11 -0
- package/dist/preview-next/keepAlive.mjs +328 -103
- package/dist/preview-next/middleware.mjs +329 -103
- package/dist/{previewAuthStore-BxAFlu-j.mjs → previewAuthStore-h5IgbSp4.mjs} +353 -103
- package/dist/{sdk-runtime-D0uZFev7.mjs → sdk-runtime-DTc1uIXn.mjs} +2 -2
- package/dist/{separator-EvdCAn4V.mjs → separator-BpHS1KZK.mjs} +1 -1
- package/dist/server/components.mjs +1376 -331
- package/dist/server/config-validation.mjs +405 -27
- package/dist/server/config.mjs +405 -27
- package/dist/server/data.mjs +405 -27
- package/dist/server/index.mjs +370 -104
- package/dist/server/next.mjs +1430 -463
- package/dist/server/page-converter.mjs +36 -25
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1374 -331
- package/dist/server/rendering.mjs +1436 -364
- package/dist/server/routing.mjs +476 -43
- package/dist/server/server.mjs +504 -169
- package/dist/server/theme-bridge.mjs +467 -111
- package/dist/styles/index.css +186 -65
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ import { bindingSchema } from "../node";
|
|
|
4
4
|
import { type ThemeTokens } from "../theme";
|
|
5
5
|
import type { TransformRegistry, RouteMap, PageIdentifierMap, EntryIdentifierMap } from "../transforms";
|
|
6
6
|
import type { ResolveImageUrlContext } from "./nodes/media";
|
|
7
|
+
import type { NewsletterBlockSubmission } from './nodes/newsletter-form.block-submission';
|
|
7
8
|
export type ViewModel = Record<string, unknown>;
|
|
8
9
|
export type ComponentRegistry = Record<string, React.ElementType>;
|
|
9
10
|
export type PreviewTextFieldConstraints = Readonly<{
|
|
@@ -30,7 +31,7 @@ export type ResolverContext = {
|
|
|
30
31
|
entriesByIdentifier?: EntryIdentifierMap;
|
|
31
32
|
pathBase?: string;
|
|
32
33
|
blockId?: string | null;
|
|
33
|
-
|
|
34
|
+
newsletterBlockSubmission?: NewsletterBlockSubmission;
|
|
34
35
|
blockKind?: string;
|
|
35
36
|
blockContent?: unknown;
|
|
36
37
|
blockBindings?: Record<string, unknown>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type CheckboxChoiceProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'className'> & Readonly<{
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* `row` for options and plain checkbox fields. `tile` for agreements the
|
|
6
|
+
* customer must accept (booking consent, consent fields): a bordered,
|
|
7
|
+
* fully clickable panel that tints when ticked.
|
|
8
|
+
*/
|
|
9
|
+
presentation?: 'row' | 'tile';
|
|
10
|
+
className?: string;
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* The customer-facing checkbox every block renders. Styling comes from the
|
|
14
|
+
* theme's input CSS (`.form-check`, `.form-checkbox`), so it follows each
|
|
15
|
+
* site's input colours, borders and corners.
|
|
16
|
+
*/
|
|
17
|
+
export declare function CheckboxChoice({ label, presentation, className, ...inputProps }: CheckboxChoiceProps): React.ReactElement;
|
|
18
|
+
export {};
|
|
@@ -21,6 +21,7 @@ export { useUISelector } from './ui/useUISelector';
|
|
|
21
21
|
export { EditorUiStoreProvider, useEditorUiStore, useEditorUiStoreInstance, useOptionalEditorUiStoreInstance, createEditorUiStore, } from './ui/editorUiStore';
|
|
22
22
|
export type { ActivePreviewField, EditorUiStoreInstance, EditorUiState, EditorPreviewInspectorStore, EditorLinkedEntrySnapshot, PreviewDesignRow, PreviewDesignOpenRequest, PreviewEditorOpenIntent, PreviewInspection, PreviewSidebarTab, ViewportMode, ViewportWidth, ViewportState, ZoomLevel, } from './ui/editorUiStore';
|
|
23
23
|
export { PreviewTextEditor } from './primitives/PreviewTextEditor';
|
|
24
|
+
export { PREVIEW_EDITABLE_OUTLINE, PREVIEW_EDITABLE_OUTLINE_OFFSET, } from './primitives/previewEditableOutline';
|
|
24
25
|
export { PreviewInlineTextEditor } from './primitives/PreviewInlineTextEditor';
|
|
25
26
|
export { PreviewRichTextEditor } from './primitives/PreviewRichTextEditor';
|
|
26
27
|
export { recordsEqual as editorValuesEqual } from './ui/stores/utils';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { NormalizedEditorBlockItem } from './editorSnapshot';
|
|
2
|
+
export declare function normalizedBlockEqual(left: NormalizedEditorBlockItem, right: NormalizedEditorBlockItem): boolean;
|
|
3
|
+
export declare function normalizedBlocksEqual(left: readonly NormalizedEditorBlockItem[], right: readonly NormalizedEditorBlockItem[]): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { unsafeAsEditorBlockId, unsafeAsEditorBlockValues, unsafeAsEditorContentValues, unsafeAsEditorEntryId, unsafeAsEditorMetadataValues, unsafeAsEditorPageId, unsafeAsEditorSiteId, type EditorBlockBaselineInput, type EditorBlockId, type EditorBlockPublishedBaselineInput, type EditorDraftBlockBaselineUpdateMetaInput, type EditorDraftBlockInitMetaInput, type EditorBlockValues, type EditorContentValues, type EditorEntryId, type EditorMetadataValues, type EditorPageId, type EditorPersistedBlock, type EditorSiteId, type EditorStructuralCommand, type EditorStructuralDraftSnapshot, type EditorSyncState, type EditorValueRecord } from '../../../core/src/index';
|
|
1
|
+
import { unsafeAsEditorBlockId, unsafeAsEditorBlockValues, unsafeAsEditorContentValues, unsafeAsEditorEntryId, unsafeAsEditorMetadataValues, unsafeAsEditorPageId, unsafeAsEditorSiteId, type EditorBlockBaselineInput, type EditorBlockId, type EditorBlockPublishedBaselineInput, type EditorDraftBlockBaselineUpdateMetaInput, type EditorDraftBlockInitMetaInput, type EditorBlockValues, type EditorContentValues, type EditorEntryId, type EditorMetadataValues, type EditorPageId, type EditorPersistedBlock, type BlockContentIdentity, type EditorSiteId, type EditorStructuralCommand, type EditorStructuralDraftSnapshot, type EditorSyncState, type EditorValueRecord } from '../../../core/src/index';
|
|
2
2
|
import { type LinkedContentEntryId, type LinkedContentTypeKey } from '../linkedEntries/domain';
|
|
3
3
|
export { unsafeAsEditorBlockId, unsafeAsEditorBlockValues, unsafeAsEditorContentValues, unsafeAsEditorEntryId, unsafeAsEditorMetadataValues, unsafeAsEditorPageId, unsafeAsEditorSiteId, type EditorBlockId, type EditorBlockValues, type EditorContentValues, type EditorEntryId, type EditorMetadataValues, type EditorPageId, type EditorSiteId, };
|
|
4
4
|
export type EditorCommand = {
|
|
@@ -119,9 +119,8 @@ export type DraftBlockInitMetaInput = EditorDraftBlockInitMetaInput;
|
|
|
119
119
|
export type DraftBlockBaselineUpdateMetaInput = EditorDraftBlockBaselineUpdateMetaInput;
|
|
120
120
|
export type DraftBlockBaselineInput = EditorBlockBaselineInput;
|
|
121
121
|
export type BlockPublishedBaselineInput = EditorBlockPublishedBaselineInput;
|
|
122
|
-
export type EditorBlockItem = Readonly<{
|
|
122
|
+
export type EditorBlockItem = Partial<BlockContentIdentity> & Readonly<{
|
|
123
123
|
id?: string | null;
|
|
124
|
-
contentVersionId?: string | null;
|
|
125
124
|
kind: string;
|
|
126
125
|
content?: EditorValueRecord | null;
|
|
127
126
|
orderIndex?: number | null;
|
|
@@ -131,8 +130,7 @@ export type EditorBlockItem = Readonly<{
|
|
|
131
130
|
purpose?: string | null;
|
|
132
131
|
optimisticHash?: string | null;
|
|
133
132
|
}>;
|
|
134
|
-
type NormalizedEditorBlockBase = Readonly<{
|
|
135
|
-
contentVersionId: string | null;
|
|
133
|
+
type NormalizedEditorBlockBase = BlockContentIdentity & Readonly<{
|
|
136
134
|
kind: string;
|
|
137
135
|
content: EditorBlockValues | null;
|
|
138
136
|
orderIndex: number | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Brand } from './branded';
|
|
2
|
+
import type { BlockContentIdentity } from './block-content-identity';
|
|
2
3
|
export type EditorSiteId = Brand<string, 'EditorSiteId'>;
|
|
3
4
|
export type EditorPageId = Brand<string, 'EditorPageId'>;
|
|
4
5
|
export type EditorEntryId = Brand<string, 'EditorEntryId'>;
|
|
@@ -61,14 +62,8 @@ export type EditorBlockPublishedBaselineInput = Readonly<{
|
|
|
61
62
|
kind?: string;
|
|
62
63
|
publishedContent?: EditorBlockBaselineInput;
|
|
63
64
|
}>;
|
|
64
|
-
export type EditorPersistedBlock = Readonly<{
|
|
65
|
+
export type EditorPersistedBlock = BlockContentIdentity & Readonly<{
|
|
65
66
|
id: EditorBlockId;
|
|
66
|
-
/**
|
|
67
|
-
* The content version the block was loaded with. Runtime blocks that
|
|
68
|
-
* submit to the API (newsletter signup) cite it so the server can verify
|
|
69
|
-
* the placement, so the editor must carry it rather than strip it.
|
|
70
|
-
*/
|
|
71
|
-
contentVersionId?: string | null;
|
|
72
67
|
kind: string;
|
|
73
68
|
content: EditorBlockValues | null;
|
|
74
69
|
orderIndex: number | null;
|
|
@@ -30,6 +30,7 @@ export { tryAsync } from './try-async';
|
|
|
30
30
|
export * from './narrow-result';
|
|
31
31
|
export * from './non-empty-array';
|
|
32
32
|
export * from './editor-state';
|
|
33
|
+
export * from './block-content-identity';
|
|
33
34
|
export * from './sensitive-collection';
|
|
34
35
|
export * from './assertNever';
|
|
35
36
|
export * from './participants';
|
|
@@ -49,7 +49,9 @@ export type MailingListSignupTokenSource = Readonly<{
|
|
|
49
49
|
blockId: MailingListSdkFooterBlockId;
|
|
50
50
|
contentHash: MailingListSdkContentHash;
|
|
51
51
|
}>;
|
|
52
|
-
export declare function buildMailingListSignupBlockSourceRef(blockId: unknown, contentVersionId: unknown): MailingListSignupSourceRef
|
|
52
|
+
export declare function buildMailingListSignupBlockSourceRef(blockId: unknown, contentVersionId: unknown): Extract<MailingListSignupSourceRef, {
|
|
53
|
+
tag: 'block_ref';
|
|
54
|
+
}> | null;
|
|
53
55
|
type MailingListSignupProfileBase = Readonly<{
|
|
54
56
|
email: NormalizedSubscriberEmail;
|
|
55
57
|
phone: Readonly<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type PublicEventBookingClosedReason = 'occurrence_cancelled' | 'occurrence_completed' | 'series_draft' | 'series_cancelled' | 'series_completed' | 'series_archived' | 'parent_archived' | 'parent_inconsistent' | '
|
|
1
|
+
export type PublicEventBookingClosedReason = 'occurrence_cancelled' | 'occurrence_completed' | 'series_draft' | 'series_cancelled' | 'series_completed' | 'series_archived' | 'parent_archived' | 'parent_inconsistent' | 'already_started' | 'enrollment_closed';
|
|
2
2
|
/** Public wire projection; persisted facts remain authoritative. */
|
|
3
3
|
export type PublicEventBookingAvailability = Readonly<{
|
|
4
4
|
kind: 'open';
|
|
@@ -6,3 +6,22 @@ export type PublicEventBookingAvailability = Readonly<{
|
|
|
6
6
|
kind: 'closed';
|
|
7
7
|
reason: PublicEventBookingClosedReason;
|
|
8
8
|
}>;
|
|
9
|
+
/**
|
|
10
|
+
* Why an event's own page is up while bookings are shut.
|
|
11
|
+
*
|
|
12
|
+
* `series_draft` is one reason from the booking decision's point of view, but a
|
|
13
|
+
* visitor standing on the page is owed two different sentences: an event that
|
|
14
|
+
* has never opened will open, and one that was open and was taken offline has
|
|
15
|
+
* closed. The difference is whether the unit has ever been live, which is a
|
|
16
|
+
* persisted fact the public wire deliberately does not carry as a timestamp.
|
|
17
|
+
*
|
|
18
|
+
* This refines `bookingAvailability` rather than replacing it. It is only ever
|
|
19
|
+
* present alongside a closed `series_draft`, so nothing that already reads the
|
|
20
|
+
* availability changes its mind because of it, and booking stays refused
|
|
21
|
+
* wherever it is refused today.
|
|
22
|
+
*/
|
|
23
|
+
export type PublicEventBookingClosedDetail = Readonly<{
|
|
24
|
+
kind: 'opensSoon';
|
|
25
|
+
}> | Readonly<{
|
|
26
|
+
kind: 'paused';
|
|
27
|
+
}>;
|
|
@@ -5,8 +5,10 @@ export type OpeningHoursTime = Brand<string, 'OpeningHoursTime'>;
|
|
|
5
5
|
export type PublicSocialLinkId = Brand<string, 'PublicSocialLinkId'>;
|
|
6
6
|
export declare const publicProfileWeekdays: readonly ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"];
|
|
7
7
|
export type PublicProfileWeekday = (typeof publicProfileWeekdays)[number];
|
|
8
|
-
export declare const knownSocialPlatforms: readonly ["facebook", "instagram", "linkedin", "tiktok", "x", "youtube"];
|
|
8
|
+
export declare const knownSocialPlatforms: readonly ["facebook", "instagram", "linkedin", "tiktok", "whatsapp", "x", "youtube"];
|
|
9
9
|
export type KnownSocialPlatform = (typeof knownSocialPlatforms)[number];
|
|
10
|
+
/** How each platform is named wherever people see it (settings, composer, footer link labels). */
|
|
11
|
+
export declare const knownSocialPlatformLabels: Readonly<Record<KnownSocialPlatform, string>>;
|
|
10
12
|
export type PublicContactDetails = Readonly<{
|
|
11
13
|
kind: 'phone';
|
|
12
14
|
phone: string;
|
|
@@ -18188,6 +18188,15 @@ export type Database = {
|
|
|
18188
18188
|
};
|
|
18189
18189
|
Returns: string;
|
|
18190
18190
|
};
|
|
18191
|
+
apply_course_booking_settings_v1_atomic: {
|
|
18192
|
+
Args: {
|
|
18193
|
+
p_event_offering_id: string;
|
|
18194
|
+
p_settings: Json;
|
|
18195
|
+
p_site_id: string;
|
|
18196
|
+
p_user_id: string;
|
|
18197
|
+
};
|
|
18198
|
+
Returns: Json;
|
|
18199
|
+
};
|
|
18191
18200
|
apply_customer_profile_rectification: {
|
|
18192
18201
|
Args: {
|
|
18193
18202
|
audit_actor_user_id: string;
|
|
@@ -19697,6 +19706,17 @@ export type Database = {
|
|
|
19697
19706
|
};
|
|
19698
19707
|
Returns: Json;
|
|
19699
19708
|
};
|
|
19709
|
+
email_issue_group_evidence: {
|
|
19710
|
+
Args: {
|
|
19711
|
+
p_group_id: string;
|
|
19712
|
+
p_limit?: number;
|
|
19713
|
+
};
|
|
19714
|
+
Returns: Json;
|
|
19715
|
+
};
|
|
19716
|
+
email_issue_rows: {
|
|
19717
|
+
Args: never;
|
|
19718
|
+
Returns: Json[];
|
|
19719
|
+
};
|
|
19700
19720
|
email_reconcile_receipt_audits: {
|
|
19701
19721
|
Args: {
|
|
19702
19722
|
p_limit?: number;
|
|
@@ -20290,7 +20310,9 @@ export type Database = {
|
|
|
20290
20310
|
Returns: boolean;
|
|
20291
20311
|
};
|
|
20292
20312
|
newsletter_complete_idle_campaigns: {
|
|
20293
|
-
Args:
|
|
20313
|
+
Args: {
|
|
20314
|
+
p_limit?: number;
|
|
20315
|
+
};
|
|
20294
20316
|
Returns: string[];
|
|
20295
20317
|
};
|
|
20296
20318
|
newsletter_confirm_atomic: {
|
|
@@ -20353,6 +20375,19 @@ export type Database = {
|
|
|
20353
20375
|
};
|
|
20354
20376
|
Returns: string;
|
|
20355
20377
|
};
|
|
20378
|
+
newsletter_schedule_campaign_atomic: {
|
|
20379
|
+
Args: {
|
|
20380
|
+
p_actor_user_id: string;
|
|
20381
|
+
p_campaign_id: string;
|
|
20382
|
+
p_expected_updated_at: string;
|
|
20383
|
+
p_intended_start_at: string;
|
|
20384
|
+
p_scheduled_at: string;
|
|
20385
|
+
p_site_id: string;
|
|
20386
|
+
p_snapshot: Json;
|
|
20387
|
+
p_timezone: string;
|
|
20388
|
+
};
|
|
20389
|
+
Returns: boolean;
|
|
20390
|
+
};
|
|
20356
20391
|
newsletter_signup_atomic: {
|
|
20357
20392
|
Args: {
|
|
20358
20393
|
p_confirmation_expires_at: string;
|
|
@@ -20802,7 +20837,7 @@ export type Database = {
|
|
|
20802
20837
|
rename_event_slug_atomic_guarded: {
|
|
20803
20838
|
Args: {
|
|
20804
20839
|
p_event_offering_id?: string;
|
|
20805
|
-
p_event_series_id
|
|
20840
|
+
p_event_series_id?: string;
|
|
20806
20841
|
p_expected_old_path: string;
|
|
20807
20842
|
p_expected_series_ids: string[];
|
|
20808
20843
|
p_page_surface_id?: string;
|
|
@@ -21108,6 +21143,18 @@ export type Database = {
|
|
|
21108
21143
|
theme_id: string;
|
|
21109
21144
|
}[];
|
|
21110
21145
|
};
|
|
21146
|
+
save_event_page_words_v1: {
|
|
21147
|
+
Args: {
|
|
21148
|
+
p_data: Json;
|
|
21149
|
+
p_expected_draft_updated_at: string;
|
|
21150
|
+
p_expected_draft_version_id: string;
|
|
21151
|
+
p_expected_published_version_id: string;
|
|
21152
|
+
p_page_surface_id: string;
|
|
21153
|
+
p_site_id: string;
|
|
21154
|
+
p_user_id: string;
|
|
21155
|
+
};
|
|
21156
|
+
Returns: Json;
|
|
21157
|
+
};
|
|
21111
21158
|
select_dated_offering_run_cancellation_settlement_v1_atomic: {
|
|
21112
21159
|
Args: {
|
|
21113
21160
|
p_enrollment_id: string;
|
|
@@ -5,6 +5,7 @@ import { type Theme } from '../../blocks/src/index';
|
|
|
5
5
|
import type { PageDesignEditorReadModel } from '../../theme-core/src/site-styles/index';
|
|
6
6
|
import { type EditorStructuralCommand } from '../../core/src/index';
|
|
7
7
|
import { type CustomBlockRegistryEntry, type SdkConfigForBlockPicker } from './block-editor/sdkBlockMerger';
|
|
8
|
+
import { type BlockCreationCopy } from './block-editor/EmptyState';
|
|
8
9
|
import { type BlockActionPresentation } from './block-editor/actionPresentation';
|
|
9
10
|
import { type ReorderControlMode } from './block-editor/reorderControlMode';
|
|
10
11
|
import { type BlockEditorOwner } from './block-editor/owner';
|
|
@@ -70,6 +71,8 @@ export type BlockEditorProps = {
|
|
|
70
71
|
customBlocks?: readonly CustomBlockRegistryEntry[];
|
|
71
72
|
allowedBlockKinds?: readonly string[] | null;
|
|
72
73
|
emptyUnavailableMessage?: string;
|
|
74
|
+
/** The empty state's words and the add button's label. */
|
|
75
|
+
creationCopy?: BlockCreationCopy;
|
|
73
76
|
initialCollapsed?: boolean;
|
|
74
77
|
reorderControlMode?: ReorderControlMode;
|
|
75
78
|
actionPresentation?: BlockActionPresentation;
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* The words the editor uses for adding. A host that calls blocks something
|
|
3
|
+
* else, such as an event page's extra sections, passes its own.
|
|
4
|
+
*/
|
|
5
|
+
export type BlockCreationCopy = Readonly<{
|
|
6
|
+
emptyTitle: string;
|
|
7
|
+
emptyDescription: string;
|
|
8
|
+
addLabel: string;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const DEFAULT_BLOCK_CREATION_COPY: BlockCreationCopy;
|
|
11
|
+
export declare function addBlockLabel(copy?: BlockCreationCopy): string;
|
|
12
|
+
export declare const EmptyState: ({ onAdd, copy, }: {
|
|
2
13
|
onAdd: () => void;
|
|
14
|
+
copy?: BlockCreationCopy;
|
|
3
15
|
}) => import("react").JSX.Element;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import type { EditorBlockId, EditorBlockBaselineInput, EditorDraftBlockBaselineUpdateMetaInput, EditorDraftBlockInitMetaInput, EditorStructuralDraftSnapshot } from '../../../core/src/index';
|
|
2
|
-
export type BlockItem = {
|
|
1
|
+
import type { EditorBlockId, EditorBlockBaselineInput, EditorDraftBlockBaselineUpdateMetaInput, EditorDraftBlockInitMetaInput, EditorStructuralDraftSnapshot, BlockContentIdentity } from '../../../core/src/index';
|
|
2
|
+
export type BlockItem = Partial<BlockContentIdentity> & {
|
|
3
3
|
id?: string | null;
|
|
4
|
-
/**
|
|
5
|
-
* The content version the block was loaded with. Runtime blocks that
|
|
6
|
-
* submit to the API (newsletter signup) cite it so the server can verify
|
|
7
|
-
* the placement; dropping it turns the form off in preview.
|
|
8
|
-
*/
|
|
9
|
-
contentVersionId?: string | null;
|
|
10
4
|
kind: string;
|
|
11
5
|
content?: Record<string, unknown> | null;
|
|
12
6
|
orderIndex?: number | null;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { BlockEditor } from './BlockEditor';
|
|
2
2
|
export type { BlockEditorProps } from './BlockEditor';
|
|
3
3
|
export type { BlockEditorOwner } from './block-editor/owner';
|
|
4
|
+
export type { BlockCreationCopy } from './block-editor/EmptyState';
|
|
4
5
|
export { createCustomBlockRegistry, mergeBlockDescriptorsWithRegistry, mergeBlockDescriptors, getBlockManifestFromSdkConfig, transformSdkBlockToManifest, transformSdkBlockToDefinition, transformToBlockDescriptor, } from './block-editor/sdkBlockMerger';
|
|
5
6
|
export type { CustomBlockManifestSource, CustomBlockRegistry, CustomBlockRegistryEntry, ResolvedCustomBlockManifest, SdkCustomBlock, SdkConfigForBlockPicker, } from './block-editor/sdkBlockMerger';
|
|
6
7
|
export type { BlockEditorHandle, BlockFocusRequest, BlockFocusTarget, BlockItem, } from './block-editor/types';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { PageOutline } from '../../../../../blocks/src/index';
|
|
2
2
|
import type { EditorPreviewInspectorStore } from '../../../../../content-editor/src/index';
|
|
3
|
-
import type { EditorBlockId } from '../../../../../core/src/index';
|
|
3
|
+
import type { BlockContentIdentity, EditorBlockId } from '../../../../../core/src/index';
|
|
4
4
|
import type { BlockItem } from '../../../../../editor-blocks/src/index';
|
|
5
5
|
import type { CanonicalBlockContent, PreviewProjection, PreviewRenderContent } from '../previewProjection';
|
|
6
6
|
import type { LinkedEntryRenderOverlay } from '../linkedEntryRenderOverlay';
|
|
7
|
-
export type BlockWithContent = {
|
|
7
|
+
export type BlockWithContent = Partial<BlockContentIdentity> & {
|
|
8
8
|
[key: string]: unknown;
|
|
9
9
|
id: string | null;
|
|
10
10
|
kind: string;
|
|
@@ -19,9 +19,8 @@ export type DraftSnapshot = {
|
|
|
19
19
|
baseline: CanonicalBlockContent | null;
|
|
20
20
|
current: CanonicalBlockContent | null;
|
|
21
21
|
};
|
|
22
|
-
export type EnrichedBlock = {
|
|
22
|
+
export type EnrichedBlock = BlockContentIdentity & {
|
|
23
23
|
id: string | null;
|
|
24
|
-
contentVersionId: string | null;
|
|
25
24
|
kind: string;
|
|
26
25
|
purpose: string;
|
|
27
26
|
orderIndex: number;
|
|
@@ -3,7 +3,6 @@ import type { ApiClient } from '../../../../api/src/request';
|
|
|
3
3
|
import { type ContentTypeSchema } from '../../../../content-model/src/index';
|
|
4
4
|
export type PreviewBlock = {
|
|
5
5
|
id: string | null;
|
|
6
|
-
contentVersionId?: string | null;
|
|
7
6
|
kind: string;
|
|
8
7
|
purpose?: string | null;
|
|
9
8
|
orderIndex?: number | null;
|
|
@@ -12,7 +11,7 @@ export type PreviewBlock = {
|
|
|
12
11
|
publishedContent?: Record<string, unknown> | null;
|
|
13
12
|
bindings?: Record<string, unknown> | null;
|
|
14
13
|
optimisticHash?: string | null;
|
|
15
|
-
}
|
|
14
|
+
} & Partial<import('../../../../core/src/index').BlockContentIdentity>;
|
|
16
15
|
export type PreviewPageMetadata = {
|
|
17
16
|
draftTitle: string;
|
|
18
17
|
draftPath: string;
|
|
@@ -11,7 +11,6 @@ type CommonRenderInput = Readonly<{
|
|
|
11
11
|
content: LoadContentResult;
|
|
12
12
|
entrySubrouteContext: ReturnType<typeof toEntrySubrouteContext>;
|
|
13
13
|
portalToken: string | null;
|
|
14
|
-
preview: boolean;
|
|
15
14
|
}>;
|
|
16
15
|
export type SdkContentRenderInput = CommonRenderInput & (Readonly<{
|
|
17
16
|
kind: 'themed';
|
|
@@ -28,7 +28,7 @@ export type PageRendererDataContext = {
|
|
|
28
28
|
bookingOfferingPresets?: readonly SiteBookingOfferingPresetSummary[];
|
|
29
29
|
mailingList?: import('../../../core/src/index').MailingListRuntimeContext;
|
|
30
30
|
bookingTimeZone?: string;
|
|
31
|
-
previewStage
|
|
31
|
+
previewStage: 'published' | 'preview';
|
|
32
32
|
routes?: RouteMap;
|
|
33
33
|
pagesByIdentifier?: Record<string, string>;
|
|
34
34
|
entriesByIdentifier?: Record<string, Record<string, string>>;
|
|
@@ -57,7 +57,7 @@ export type SdkConfigForRenderer = {
|
|
|
57
57
|
type PageRendererCommonProps<TPage> = {
|
|
58
58
|
page: TPage | null;
|
|
59
59
|
runtimeJoins?: readonly PageRuntimeJoin[];
|
|
60
|
-
dataContext
|
|
60
|
+
dataContext: PageRendererDataContext;
|
|
61
61
|
routeMap?: RouteMap;
|
|
62
62
|
wrapBlock?: (blockId: string, rendered: React.ReactNode) => React.ReactNode;
|
|
63
63
|
registry?: ComponentRegistry;
|
|
@@ -60,7 +60,7 @@ type PageCommonProps = {
|
|
|
60
60
|
* Additional context data for content entry pages.
|
|
61
61
|
* Used to pass occurrence context and content entry data to blocks.
|
|
62
62
|
*/
|
|
63
|
-
dataContext
|
|
63
|
+
dataContext: {
|
|
64
64
|
readAuthority?: import('../../../../blocks/src/api').BrowserReadAuthority;
|
|
65
65
|
/** Mailing-list runtime projected for the placements on this page. */
|
|
66
66
|
mailingList?: import('../../../../core/src/index').MailingListRuntimeContext;
|
|
@@ -77,7 +77,7 @@ type PageCommonProps = {
|
|
|
77
77
|
/** Editable route metadata keys for template-page inline editing */
|
|
78
78
|
editableRouteMetadataFieldIds?: ReadonlyArray<string> | null;
|
|
79
79
|
/** Preview stage: 'preview' for draft content, 'published' for live content */
|
|
80
|
-
previewStage
|
|
80
|
+
previewStage: 'preview' | 'published';
|
|
81
81
|
/** Canonical request pathname used by blocks when resolving same-site destinations. */
|
|
82
82
|
pathname?: string;
|
|
83
83
|
};
|
|
@@ -11,7 +11,7 @@ import type { MailingListRuntimeContext } from '../../../../core/src/index';
|
|
|
11
11
|
import type { PageProps } from '../components/Page';
|
|
12
12
|
import type { ResolvedBlockData } from '../../data/prefetchBlockData';
|
|
13
13
|
import { type ResolveBlockDataDeps } from '../../data/resolveBlockData';
|
|
14
|
-
import type { DataLoaderOverrides, DataLoaderSearchParams } from '../../data/types';
|
|
14
|
+
import type { DataLoaderOverrides, DataLoaderPreviewStage, DataLoaderSearchParams } from '../../data/types';
|
|
15
15
|
import type { SdkCustomBlock } from '../../config/types';
|
|
16
16
|
import { type RuntimeSdkConfig } from './pageRuntimeSupport';
|
|
17
17
|
/**
|
|
@@ -93,6 +93,9 @@ export type PagePreviewMetadata = {
|
|
|
93
93
|
*/
|
|
94
94
|
export type PageContentResult = {
|
|
95
95
|
type: 'page';
|
|
96
|
+
dataContext: {
|
|
97
|
+
previewStage: DataLoaderPreviewStage;
|
|
98
|
+
};
|
|
96
99
|
/** Page UUID (required for preview editing / block mutations) */
|
|
97
100
|
pageId: string;
|
|
98
101
|
/** Route UUID for this page (used by preview mode metadata editing) */
|
|
@@ -153,6 +156,7 @@ export type EntryContentResult = {
|
|
|
153
156
|
bookingTimeZone?: string;
|
|
154
157
|
/** Data context for template blocks (includes entry content for bindings) */
|
|
155
158
|
dataContext: {
|
|
159
|
+
previewStage: DataLoaderPreviewStage;
|
|
156
160
|
contentEntry: Record<string, unknown>;
|
|
157
161
|
};
|
|
158
162
|
/** Site theme for styling (useful if rendering with SDK components) */
|
|
@@ -217,6 +221,7 @@ export type PageSurfaceContentResult = {
|
|
|
217
221
|
mailingList?: MailingListRuntimeContext;
|
|
218
222
|
bookingTimeZone?: string;
|
|
219
223
|
dataContext: {
|
|
224
|
+
previewStage: DataLoaderPreviewStage;
|
|
220
225
|
pageSurface: Record<string, unknown>;
|
|
221
226
|
subject: PageSurfaceContentData['subject'];
|
|
222
227
|
};
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import type { RiverbankClient } from '../../client/types';
|
|
7
7
|
import type { PageProps } from '../components/Page';
|
|
8
8
|
import { type ResolveBlockDataDeps } from '../../data/resolveBlockData';
|
|
9
|
-
import type { DataLoaderOverrides, DataLoaderSearchParams } from '../../data/types';
|
|
9
|
+
import type { DataLoaderOverrides, DataLoaderPreviewStage, DataLoaderSearchParams } from '../../data/types';
|
|
10
10
|
import { type RuntimeSdkConfig } from './pageRuntimeSupport';
|
|
11
11
|
/**
|
|
12
12
|
* SDK config from API response (without siteId which is stripped at storage).
|
|
@@ -79,7 +79,10 @@ export type LoadPageParams = {
|
|
|
79
79
|
*/
|
|
80
80
|
searchParams?: DataLoaderSearchParams;
|
|
81
81
|
};
|
|
82
|
-
export type LoadPageResult = Omit<PageProps, 'registry' | 'wrapBlock' | 'blockOverrides' | 'sdkConfig'> & {
|
|
82
|
+
export type LoadPageResult = Omit<PageProps, 'registry' | 'wrapBlock' | 'blockOverrides' | 'sdkConfig' | 'dataContext'> & {
|
|
83
|
+
dataContext: {
|
|
84
|
+
previewStage: DataLoaderPreviewStage;
|
|
85
|
+
};
|
|
83
86
|
/**
|
|
84
87
|
* SDK site configuration, if available.
|
|
85
88
|
* Contains SDK-defined theme palette, section backgrounds, and style options.
|
|
@@ -2,7 +2,8 @@ import type { MediaAssetIndexItem, PageOutline, RouteMap, Theme } from '../../co
|
|
|
2
2
|
import type { SiteBookingOfferingPresetSummary } from '../../public-api/contracts';
|
|
3
3
|
import type { SiteResponse } from '../../client/types';
|
|
4
4
|
import type { SdkCustomBlock } from '../../config/types';
|
|
5
|
-
import { type BlockManifest, type FieldDefinition, type PageBlockRenderAdmissionError, type RenderablePageBlock, type RenderablePageOutline } from '../../../../blocks/src/index';
|
|
5
|
+
import { type BlockManifest, type FieldDefinition, type PageBlockRenderAdmissionError, type PublishedBlockPlacement, type RenderablePageBlock, type RenderablePageOutline } from '../../../../blocks/src/index';
|
|
6
|
+
import type { DataLoaderPreviewStage } from '../../data/types';
|
|
6
7
|
export type RuntimeSdkConfig = NonNullable<SiteResponse['sdkConfig']>;
|
|
7
8
|
export type SiteData = SiteResponse['site'];
|
|
8
9
|
export type SiteRenderSupport = Readonly<{
|
|
@@ -40,6 +41,8 @@ export declare function buildSiteRenderSupport(site: SiteResponse, mediaAssets:
|
|
|
40
41
|
export declare function collectMediaAssetSidecar(mediaAssets: readonly MediaAssetIndexItem[] | null | undefined): readonly MediaAssetIndexItem[] | undefined;
|
|
41
42
|
type TransportedPageBlock = PageOutline['blocks'][number] & Readonly<{
|
|
42
43
|
contentVersionId?: string | null;
|
|
44
|
+
draftContentId: string | null;
|
|
45
|
+
publishedPlacement: PublishedBlockPlacement | null;
|
|
43
46
|
}>;
|
|
44
47
|
export declare function readInvalidBlockAdmission(value: unknown): Readonly<{
|
|
45
48
|
kind: 'invalid';
|
|
@@ -51,6 +54,7 @@ export declare function buildPageOutline(input: Readonly<{
|
|
|
51
54
|
fallbackPath: string;
|
|
52
55
|
purpose: string;
|
|
53
56
|
blocks: readonly unknown[];
|
|
57
|
+
previewStage: DataLoaderPreviewStage;
|
|
54
58
|
}>): Omit<PageOutline, 'blocks'> & Readonly<{
|
|
55
59
|
blocks: TransportedPageBlock[];
|
|
56
60
|
}>;
|
|
@@ -60,6 +64,7 @@ export declare function buildRenderablePageOutline(input: Readonly<{
|
|
|
60
64
|
fallbackPath: string;
|
|
61
65
|
purpose: string;
|
|
62
66
|
blocks: readonly unknown[];
|
|
67
|
+
previewStage: DataLoaderPreviewStage;
|
|
63
68
|
customBlocks?: readonly SdkCustomBlock[];
|
|
64
69
|
}>): RenderablePageOutline;
|
|
65
70
|
export declare function projectRenderablePageOutline(page: RenderablePageOutline): PageOutline;
|
|
@@ -8,6 +8,7 @@ import type { MediaAssetIndexItem, Theme } from '../../contracts';
|
|
|
8
8
|
import type { RiverbankClient } from '../../client/types';
|
|
9
9
|
import type { PageProps } from '../components/Page';
|
|
10
10
|
import type { ResolvedBlockData } from '../../data/prefetchBlockData';
|
|
11
|
+
import type { DataLoaderPreviewStage } from '../../data/types';
|
|
11
12
|
import type { ContentEntryData } from '../helpers/loadContent';
|
|
12
13
|
export type UseContentParams = {
|
|
13
14
|
client: RiverbankClient;
|
|
@@ -61,6 +62,9 @@ type PageSuccessState = {
|
|
|
61
62
|
theme: Theme | null;
|
|
62
63
|
siteId: string;
|
|
63
64
|
resolvedData: ResolvedBlockData;
|
|
65
|
+
dataContext: {
|
|
66
|
+
previewStage: DataLoaderPreviewStage;
|
|
67
|
+
};
|
|
64
68
|
supabaseUrl?: string;
|
|
65
69
|
mediaAssets?: readonly MediaAssetIndexItem[];
|
|
66
70
|
};
|
|
@@ -117,7 +121,7 @@ export declare function isEntryContentResult(result: UseContentResult): result i
|
|
|
117
121
|
*
|
|
118
122
|
* if (isPageContentResult(content)) {
|
|
119
123
|
* if (!content.theme) return <div>This site needs a theme before it can be displayed.</div>;
|
|
120
|
-
* return <Page page={content.page} theme={content.theme} siteId={content.siteId} resolvedData={content.resolvedData} />;
|
|
124
|
+
* return <Page page={content.page} theme={content.theme} siteId={content.siteId} resolvedData={content.resolvedData} dataContext={content.dataContext} />;
|
|
121
125
|
* }
|
|
122
126
|
*
|
|
123
127
|
* // Render entry with custom UI
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { RiverbankClient } from '../../client/types';
|
|
7
7
|
import type { PageProps } from '../components/Page';
|
|
8
|
+
import type { DataLoaderPreviewStage } from '../../data/types';
|
|
8
9
|
import type { RuntimeSdkConfig } from '../helpers/loadPage';
|
|
9
10
|
export type UsePageParams = {
|
|
10
11
|
client: RiverbankClient;
|
|
@@ -40,7 +41,10 @@ export type UsePageResult = {
|
|
|
40
41
|
loading: false;
|
|
41
42
|
error: null;
|
|
42
43
|
sdkConfig: RuntimeSdkConfig | null;
|
|
43
|
-
|
|
44
|
+
dataContext: {
|
|
45
|
+
previewStage: DataLoaderPreviewStage;
|
|
46
|
+
};
|
|
47
|
+
} & Omit<PageProps, 'registry' | 'wrapBlock' | 'sdkConfig' | 'dataContext'>);
|
|
44
48
|
/**
|
|
45
49
|
* Client-side React hook to fetch all data needed for <Page> component.
|
|
46
50
|
*
|
|
@@ -35,6 +35,15 @@ export type SurfaceHostContext = Readonly<{
|
|
|
35
35
|
*/
|
|
36
36
|
export declare const SURFACE_ROOT_HOSTS: Readonly<Record<SurfaceId, Readonly<Record<SurfaceTier, string>>>>;
|
|
37
37
|
export declare const SURFACE_SITE_ROOT_HOSTS: Readonly<Record<SurfaceId, Readonly<Record<SurfaceTier, string>>>>;
|
|
38
|
+
/**
|
|
39
|
+
* Site slugs a surface host already occupies. A site's managed address is
|
|
40
|
+
* `{slug}.{site root host}`, so any surface host (dashboard root, site root or
|
|
41
|
+
* site-root alias) that sits beneath a site root host claims the label in the
|
|
42
|
+
* slug position: `preview.riverbanksites.com` claims `preview`, and
|
|
43
|
+
* `macadamia.localhost` claims `macadamia`. A site given one of these slugs
|
|
44
|
+
* would be unreachable at its managed address.
|
|
45
|
+
*/
|
|
46
|
+
export declare const SURFACE_OWNED_SITE_SLUGS: readonly string[];
|
|
38
47
|
export declare function resolveSurfaceFontHref(surfaceId: SurfaceId): string | null;
|
|
39
48
|
export declare function resolveSurfaceSiteHostContext(value: string | URL | null | undefined): SurfaceHostContext | null;
|
|
40
49
|
export declare function resolveSurfaceHostContext(value: string | URL | null | undefined): SurfaceHostContext | null;
|