@riverbankcms/sdk 0.60.0 → 0.60.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -3
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +1 -3
- package/dist/_dts/api/src/bookingRecords.d.ts +8 -0
- package/dist/_dts/api/src/communications.d.ts +1 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +8 -0
- package/dist/_dts/api/src/endpoints.d.ts +18 -1
- package/dist/_dts/api/src/index.d.ts +1 -1
- package/dist/_dts/api/src/media.d.ts +1 -1
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +45 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +24 -1
- package/dist/_dts/api/src/siteSettings.d.ts +7 -0
- package/dist/_dts/api/src/types.d.ts +1 -1
- package/dist/_dts/billing/src/plans/types.d.ts +27 -0
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/site-footer.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +173 -2
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -2
- package/dist/_dts/blocks/src/system/runtime/header/shared.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.client.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/AgendaEventCard.d.ts +2 -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/EventDetailModal.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModals.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekTimetableView.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCapacity.d.ts +16 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/timetableModel.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/location-map.server.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/location-map.shared.d.ts +38 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/location-map.view.d.ts +2 -1
- package/dist/_dts/content-editor/src/index.d.ts +2 -2
- package/dist/_dts/content-editor/src/primitives/shared/activePreviewField.d.ts +9 -0
- package/dist/_dts/content-editor/src/primitives/shared/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +10 -0
- package/dist/_dts/core/src/business-address.d.ts +38 -0
- package/dist/_dts/core/src/index.d.ts +1 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +22 -0
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/BlockForm.d.ts +4 -0
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +8 -5
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +7 -5
- package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +2 -0
- package/dist/_dts/editor-blocks/src/block-editor/reorderControlMode.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +4 -0
- package/dist/_dts/media-react/src/hooks/useApiMediaUploader.d.ts +14 -0
- package/dist/_dts/media-react/src/index.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/blocks/runOptimisticCustomizeAction.d.ts +43 -20
- package/dist/_dts/preview-next/src/client/index.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/PageDesignEditorStateContext.d.ts +11 -28
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +7 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorUI.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +12 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +6 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +20 -0
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +99 -0
- package/dist/_dts/preview-next/src/client/preview/previewChromeSurface.d.ts +12 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeHistory.d.ts +41 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeRuntimePatch.d.ts +15 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeWorkflowState.d.ts +106 -0
- package/dist/_dts/preview-next/src/client/preview/previewUndoDomains.d.ts +34 -0
- package/dist/_dts/preview-next/src/client/preview/sidebarTabPreference.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/useOnboardingConfirmationCheck.d.ts +4 -9
- package/dist/_dts/preview-next/src/constants.d.ts +0 -1
- package/dist/_dts/preview-next/src/index.d.ts +1 -0
- package/dist/_dts/preview-next/src/onboarding-preview-planner.d.ts +89 -0
- package/dist/_dts/preview-next/src/route-contract.d.ts +37 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +11 -1
- package/dist/_dts/sdk/src/rendering/components/Block.d.ts +7 -76
- package/dist/_dts/sdk/src/rendering/components/Block.server.d.ts +9 -0
- package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +78 -0
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +5 -5
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/constants.d.ts +9 -1
- package/dist/_dts/theme-core/src/buttons/generateButtonCss.d.ts +16 -11
- package/dist/_dts/theme-core/src/buttons/generateDefaultButtonSystem.d.ts +9 -16
- package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/buttons/personalities/brushed-wash.d.ts +11 -0
- package/dist/_dts/theme-core/src/buttons/personalities/confident-chip.d.ts +11 -0
- package/dist/_dts/theme-core/src/buttons/personalities/editorial-link.d.ts +11 -0
- package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +14 -0
- package/dist/_dts/theme-core/src/buttons/personalities/ink-stamp.d.ts +11 -0
- package/dist/_dts/theme-core/src/buttons/personalities/pebble.d.ts +11 -0
- package/dist/_dts/theme-core/src/buttons/personalities/soft-pill.d.ts +11 -0
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +268 -0
- package/dist/_dts/theme-core/src/buttons/types.d.ts +253 -72
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/index.d.ts +17 -16
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +69 -15
- package/dist/_dts/theme-core/src/palette/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/palette/variants/brand-led.d.ts +28 -0
- package/dist/_dts/theme-core/src/palette/variants/high-contrast.d.ts +28 -0
- package/dist/_dts/theme-core/src/palette/variants/index.d.ts +17 -0
- package/dist/_dts/theme-core/src/palette/variants/soft-natural.d.ts +28 -0
- package/dist/_dts/theme-core/src/palette/variants/types.d.ts +154 -0
- package/dist/_dts/theme-core/src/palette/variants/warm-neutral.d.ts +28 -0
- package/dist/_dts/theme-core/src/responsiveDisplay.d.ts +23 -0
- package/dist/_dts/theme-core/src/responsiveMode.d.ts +21 -0
- package/dist/_dts/theme-core/src/schema.d.ts +122 -10
- package/dist/_dts/theme-core/src/site-styles/compatibility.d.ts +109 -0
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +193 -0
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +2 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorErrors.d.ts +1 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +4 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +43 -2
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +23 -1
- package/dist/_dts/ui/src/badge.d.ts +1 -1
- package/dist/_dts/ui/src/callout.d.ts +1 -1
- package/dist/_dts/ui/src/command-multi-select.d.ts +2 -2
- package/dist/cli/index.mjs +1590 -302
- package/dist/client/bookings.mjs +321 -144
- package/dist/client/client.mjs +4371 -2715
- package/dist/client/hooks.mjs +2826 -1675
- package/dist/client/rendering/client.mjs +3570 -2262
- package/dist/client/rendering/islands.mjs +1948 -756
- package/dist/client/rendering.mjs +42015 -40278
- package/dist/preview-next/before-render.mjs +5542 -0
- package/dist/preview-next/client/runtime.mjs +103364 -99924
- package/dist/preview-next/constants.mjs +0 -2
- package/dist/preview-next/index.mjs +0 -2
- package/dist/preview-next/middleware.mjs +5552 -1
- package/dist/server/components.mjs +11234 -9740
- package/dist/server/config-validation.mjs +3057 -1906
- package/dist/server/config.mjs +3057 -1906
- package/dist/server/data.mjs +2826 -1675
- package/dist/server/index.mjs +19 -2
- package/dist/server/next.mjs +3997 -2507
- package/dist/server/page-converter.mjs +2970 -1836
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +5960 -3200
- package/dist/server/rendering.mjs +12734 -11162
- package/dist/server/routing.mjs +3045 -1743
- package/dist/server/server.mjs +2827 -1676
- package/dist/server/theme-bridge.mjs +2074 -839
- package/dist/server/theme.mjs +1087 -492
- package/dist/styles/index.css +343 -299
- package/package.json +1 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewSiteStyleSwitcher.d.ts +0 -11
- package/dist/_dts/preview-next/src/client/preview/PreviewSiteStyleSwitcher.state.d.ts +0 -43
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type AppearancePresetId, type BoundaryOptionId, type DesignBlockId, type DesignBoundaryId, type LayoutVariantKey, type PageDesignEditorReadModel } from '@riverbankcms/theme-core/site-styles';
|
|
2
|
+
import { type HistoryState } from '@riverbankcms/content-editor';
|
|
3
|
+
import type { PreviewCustomizeAction } from '../blocks/previewCustomizeActions';
|
|
4
|
+
type PreviewLoadedEditorModel = PageDesignEditorReadModel;
|
|
5
|
+
export type PreviewCustomizeHistoryEntry = Readonly<{
|
|
6
|
+
kind: 'layout';
|
|
7
|
+
blockId: PreviewCustomizeActionBlockId;
|
|
8
|
+
baseContentId: string | null;
|
|
9
|
+
fromLayoutVariantKey: LayoutVariantKey;
|
|
10
|
+
toLayoutVariantKey: LayoutVariantKey;
|
|
11
|
+
}> | Readonly<{
|
|
12
|
+
kind: 'look';
|
|
13
|
+
blockId: PreviewCustomizeActionBlockId;
|
|
14
|
+
fromAppearancePresetId: AppearancePresetId | null;
|
|
15
|
+
toAppearancePresetId: AppearancePresetId | null;
|
|
16
|
+
}> | Readonly<{
|
|
17
|
+
kind: 'boundary';
|
|
18
|
+
boundaryId: DesignBoundaryId;
|
|
19
|
+
previousBlockId: PreviewCustomizeActionBlockId;
|
|
20
|
+
nextBlockId: PreviewCustomizeActionBlockId;
|
|
21
|
+
fromBoundaryOptionId: BoundaryOptionId | null;
|
|
22
|
+
toBoundaryOptionId: BoundaryOptionId | null;
|
|
23
|
+
}>;
|
|
24
|
+
type PreviewCustomizeActionBlockId = DesignBlockId;
|
|
25
|
+
export type PreviewCustomizeHistoryPresent = Readonly<{
|
|
26
|
+
editorModel: PreviewLoadedEditorModel;
|
|
27
|
+
entry: PreviewCustomizeHistoryEntry | null;
|
|
28
|
+
}>;
|
|
29
|
+
export type PreviewCustomizeHistoryState = HistoryState<PreviewCustomizeHistoryPresent>;
|
|
30
|
+
export declare function createPreviewCustomizeHistoryState(editorModel: PreviewLoadedEditorModel): PreviewCustomizeHistoryState;
|
|
31
|
+
export declare function canUndoPreviewCustomizeHistory(state: PreviewCustomizeHistoryState): boolean;
|
|
32
|
+
export declare function canRedoPreviewCustomizeHistory(state: PreviewCustomizeHistoryState): boolean;
|
|
33
|
+
export declare function pushPreviewCustomizeHistoryEntry(state: PreviewCustomizeHistoryState, entry: PreviewCustomizeHistoryEntry, editorModel: PreviewLoadedEditorModel): PreviewCustomizeHistoryState;
|
|
34
|
+
export declare function replacePreviewCustomizeHistoryModel(state: PreviewCustomizeHistoryState, editorModel: PreviewLoadedEditorModel): PreviewCustomizeHistoryState;
|
|
35
|
+
export declare function undoPreviewCustomizeHistory(state: PreviewCustomizeHistoryState): PreviewCustomizeHistoryState;
|
|
36
|
+
export declare function redoPreviewCustomizeHistory(state: PreviewCustomizeHistoryState): PreviewCustomizeHistoryState;
|
|
37
|
+
export declare function previewCustomizeHistoryEntryFromAction(editorModel: PreviewLoadedEditorModel, action: PreviewCustomizeAction): PreviewCustomizeHistoryEntry | null;
|
|
38
|
+
export declare function previewCustomizeUndoActionForEntry(entry: PreviewCustomizeHistoryEntry): PreviewCustomizeAction;
|
|
39
|
+
export declare function previewCustomizeRedoActionForEntry(entry: PreviewCustomizeHistoryEntry): PreviewCustomizeAction;
|
|
40
|
+
export declare function previewCustomizeHistoryPresentEquals(left: PreviewCustomizeHistoryPresent, right: PreviewCustomizeHistoryPresent): boolean;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type PageDesignEditorReadModel } from '@riverbankcms/theme-core/site-styles/previewCompiler';
|
|
2
|
+
import type { DesignBlockId } from '@riverbankcms/theme-core/site-styles';
|
|
3
|
+
import type { PreviewCustomizeAction } from '../blocks/previewCustomizeActions';
|
|
4
|
+
export type PreviewEditorRuntimeContent = Record<string, unknown>;
|
|
5
|
+
export type PreviewCustomizeRuntimePatch = Readonly<{
|
|
6
|
+
blockId: DesignBlockId;
|
|
7
|
+
previousContent: PreviewEditorRuntimeContent;
|
|
8
|
+
nextContent: PreviewEditorRuntimeContent;
|
|
9
|
+
rollback: (currentContent: PreviewEditorRuntimeContent) => PreviewEditorRuntimeContent;
|
|
10
|
+
}>;
|
|
11
|
+
export declare function derivePreviewCustomizeRuntimePatch(input: Readonly<{
|
|
12
|
+
action: PreviewCustomizeAction;
|
|
13
|
+
editorModel: PageDesignEditorReadModel;
|
|
14
|
+
currentContent: PreviewEditorRuntimeContent | null;
|
|
15
|
+
}>): PreviewCustomizeRuntimePatch | null;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { APIEndpoints } from '@riverbankcms/api';
|
|
2
|
+
import type { PreviewCustomizeAction } from '../blocks/previewCustomizeActions';
|
|
3
|
+
import { type PreviewCustomizeHistoryEntry, type PreviewCustomizeHistoryState } from './previewCustomizeHistory';
|
|
4
|
+
type ApiPageDesignEditorStateResponse = NonNullable<APIEndpoints['getPageDesignEditorState']['response']>;
|
|
5
|
+
type LoadedPageDesignEditorState = Extract<ApiPageDesignEditorStateResponse, Readonly<{
|
|
6
|
+
kind: 'loaded';
|
|
7
|
+
}>>;
|
|
8
|
+
type NonLoadedPageDesignEditorState = Exclude<ApiPageDesignEditorStateResponse, Readonly<{
|
|
9
|
+
kind: 'loaded';
|
|
10
|
+
}>>;
|
|
11
|
+
type ApplyPageDesignEditorActionResponse = NonNullable<APIEndpoints['applyPageDesignEditorAction']['response']>;
|
|
12
|
+
export type PreviewPageDesignEditorState = Readonly<{
|
|
13
|
+
kind: 'unsupported';
|
|
14
|
+
}> | Readonly<{
|
|
15
|
+
kind: 'loading';
|
|
16
|
+
}> | Readonly<{
|
|
17
|
+
kind: 'failed';
|
|
18
|
+
message: string;
|
|
19
|
+
}> | ApiPageDesignEditorStateResponse;
|
|
20
|
+
export type PreviewPageDesignEditorApplyOutcome = Readonly<{
|
|
21
|
+
kind: 'saved';
|
|
22
|
+
response: ApplyPageDesignEditorActionResponse;
|
|
23
|
+
}> | Readonly<{
|
|
24
|
+
kind: 'skipped';
|
|
25
|
+
reason: PreviewCustomizeSkipReason;
|
|
26
|
+
message: string;
|
|
27
|
+
}> | Readonly<{
|
|
28
|
+
kind: 'stale';
|
|
29
|
+
message: string;
|
|
30
|
+
}> | Readonly<{
|
|
31
|
+
kind: 'invalid';
|
|
32
|
+
message: string;
|
|
33
|
+
}> | Readonly<{
|
|
34
|
+
kind: 'failed';
|
|
35
|
+
message: string;
|
|
36
|
+
}>;
|
|
37
|
+
export type PreviewCustomizeSkipReason = 'disabled' | 'missing-page' | 'not-loaded' | 'mutation-pending' | 'stale' | 'no-history-entry' | 'cannot-undo' | 'cannot-redo';
|
|
38
|
+
export type PreviewCustomizeMutationState = Readonly<{
|
|
39
|
+
kind: 'idle';
|
|
40
|
+
}> | Readonly<{
|
|
41
|
+
kind: 'applying';
|
|
42
|
+
action: PreviewCustomizeAction;
|
|
43
|
+
historyEntry: PreviewCustomizeHistoryEntry | null;
|
|
44
|
+
}> | Readonly<{
|
|
45
|
+
kind: 'undoing';
|
|
46
|
+
action: PreviewCustomizeAction;
|
|
47
|
+
entry: PreviewCustomizeHistoryEntry;
|
|
48
|
+
}> | Readonly<{
|
|
49
|
+
kind: 'redoing';
|
|
50
|
+
action: PreviewCustomizeAction;
|
|
51
|
+
entry: PreviewCustomizeHistoryEntry;
|
|
52
|
+
}> | Readonly<{
|
|
53
|
+
kind: 'stale';
|
|
54
|
+
message: string;
|
|
55
|
+
}> | Readonly<{
|
|
56
|
+
kind: 'failed';
|
|
57
|
+
message: string;
|
|
58
|
+
}>;
|
|
59
|
+
export type PreviewCustomizeWorkflowState = Readonly<{
|
|
60
|
+
kind: 'unsupported';
|
|
61
|
+
}> | Readonly<{
|
|
62
|
+
kind: 'loading';
|
|
63
|
+
}> | Readonly<{
|
|
64
|
+
kind: 'failed';
|
|
65
|
+
message: string;
|
|
66
|
+
}> | Readonly<{
|
|
67
|
+
kind: 'ready';
|
|
68
|
+
pageState: NonLoadedPageDesignEditorState;
|
|
69
|
+
}> | Readonly<{
|
|
70
|
+
kind: 'loaded';
|
|
71
|
+
pageState: LoadedPageDesignEditorState;
|
|
72
|
+
history: PreviewCustomizeHistoryState;
|
|
73
|
+
mutation: PreviewCustomizeMutationState;
|
|
74
|
+
}>;
|
|
75
|
+
export type PreviewCustomizeBeginResult = Readonly<{
|
|
76
|
+
kind: 'started';
|
|
77
|
+
state: PreviewCustomizeWorkflowState;
|
|
78
|
+
action: PreviewCustomizeAction;
|
|
79
|
+
}> | Readonly<{
|
|
80
|
+
kind: 'skipped';
|
|
81
|
+
reason: PreviewCustomizeSkipReason;
|
|
82
|
+
message: string;
|
|
83
|
+
}>;
|
|
84
|
+
export declare function unsupportedPreviewCustomizeWorkflowState(): PreviewCustomizeWorkflowState;
|
|
85
|
+
export declare function loadingPreviewCustomizeWorkflowState(): PreviewCustomizeWorkflowState;
|
|
86
|
+
export declare function failedPreviewCustomizeWorkflowState(message: string): PreviewCustomizeWorkflowState;
|
|
87
|
+
export declare function previewCustomizeLoadSucceeded(pageState: ApiPageDesignEditorStateResponse): PreviewCustomizeWorkflowState;
|
|
88
|
+
export declare function previewCustomizeWorkflowPageState(workflow: PreviewCustomizeWorkflowState): PreviewPageDesignEditorState;
|
|
89
|
+
export declare function beginPreviewCustomizeApply(workflow: PreviewCustomizeWorkflowState, action: PreviewCustomizeAction): PreviewCustomizeBeginResult;
|
|
90
|
+
export declare function beginPreviewCustomizeUndo(workflow: PreviewCustomizeWorkflowState): PreviewCustomizeBeginResult;
|
|
91
|
+
export declare function beginPreviewCustomizeRedo(workflow: PreviewCustomizeWorkflowState): PreviewCustomizeBeginResult;
|
|
92
|
+
export declare function confirmPreviewCustomizeMutation(workflow: PreviewCustomizeWorkflowState, response: ApplyPageDesignEditorActionResponse): PreviewCustomizeWorkflowState;
|
|
93
|
+
export declare function rejectPreviewCustomizeMutation(previousWorkflow: PreviewCustomizeWorkflowState, outcome: Exclude<PreviewPageDesignEditorApplyOutcome, {
|
|
94
|
+
kind: 'saved' | 'skipped';
|
|
95
|
+
}>): PreviewCustomizeWorkflowState;
|
|
96
|
+
export declare function previewCustomizeCanUndo(workflow: PreviewCustomizeWorkflowState): boolean;
|
|
97
|
+
export declare function previewCustomizeCanRedo(workflow: PreviewCustomizeWorkflowState): boolean;
|
|
98
|
+
export declare function previewCustomizeCanApply(workflow: PreviewCustomizeWorkflowState): boolean;
|
|
99
|
+
export declare function previewCustomizeIsMutationPending(workflow: PreviewCustomizeWorkflowState): boolean;
|
|
100
|
+
export declare function previewCustomizeIsStale(workflow: PreviewCustomizeWorkflowState): boolean;
|
|
101
|
+
export declare function previewCustomizeFailureMessage(workflow: PreviewCustomizeWorkflowState): string | null;
|
|
102
|
+
export declare function applyPreviewCustomizeActionToState(state: PreviewPageDesignEditorState, action: PreviewCustomizeAction): PreviewPageDesignEditorState;
|
|
103
|
+
export declare function skippedPreviewCustomizeOutcome(reason: PreviewCustomizeSkipReason): Extract<PreviewPageDesignEditorApplyOutcome, {
|
|
104
|
+
kind: 'skipped';
|
|
105
|
+
}>;
|
|
106
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type PreviewUndoDomainId = 'content' | 'theme-customize';
|
|
2
|
+
export type PreviewUndoDomainStatus = 'idle' | 'pending' | 'stale' | 'failed';
|
|
3
|
+
export type PreviewUndoFocusOwner = 'preview-customize' | 'content' | 'native';
|
|
4
|
+
export type PreviewUndoDomainOwnership = Readonly<{
|
|
5
|
+
kind: 'focused';
|
|
6
|
+
owner: PreviewUndoFocusOwner;
|
|
7
|
+
}> | Readonly<{
|
|
8
|
+
kind: 'available';
|
|
9
|
+
}> | Readonly<{
|
|
10
|
+
kind: 'fallback';
|
|
11
|
+
}>;
|
|
12
|
+
export type PreviewUndoSelectionContext = Readonly<{
|
|
13
|
+
kind: 'chrome';
|
|
14
|
+
}> | Readonly<{
|
|
15
|
+
kind: 'shortcut';
|
|
16
|
+
owner: PreviewUndoFocusOwner;
|
|
17
|
+
}>;
|
|
18
|
+
export type PreviewUndoDomainHandle = Readonly<{
|
|
19
|
+
id: PreviewUndoDomainId;
|
|
20
|
+
ownership: PreviewUndoDomainOwnership;
|
|
21
|
+
canUndo: boolean;
|
|
22
|
+
canRedo: boolean;
|
|
23
|
+
status?: PreviewUndoDomainStatus;
|
|
24
|
+
undo: () => void;
|
|
25
|
+
redo: () => void;
|
|
26
|
+
}>;
|
|
27
|
+
export type PreviewUndoCommand = 'undo' | 'redo';
|
|
28
|
+
export declare function selectPreviewUndoDomain(domains: readonly PreviewUndoDomainHandle[], command: PreviewUndoCommand, context: PreviewUndoSelectionContext): PreviewUndoDomainHandle | null;
|
|
29
|
+
export declare function previewUndoControlsForDomains(domains: readonly PreviewUndoDomainHandle[], context: PreviewUndoSelectionContext): Readonly<{
|
|
30
|
+
canUndo: boolean;
|
|
31
|
+
canRedo: boolean;
|
|
32
|
+
onUndo: () => void;
|
|
33
|
+
onRedo: () => void;
|
|
34
|
+
}>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import type { PreviewSidebarTab } from '@riverbankcms/content-editor';
|
|
2
|
+
export type { PreviewSidebarTab };
|
|
2
3
|
export declare function getPreviewSidebarTab(): PreviewSidebarTab;
|
|
3
4
|
export declare function setPreviewSidebarTab(tab: PreviewSidebarTab): void;
|
|
4
5
|
export declare function requestPreviewSidebarOpen(tab: PreviewSidebarTab): void;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import type { LaunchReadiness } from "@riverbankcms/api/launch-readiness";
|
|
2
|
-
import type {
|
|
3
|
-
type ResendFeedback = Readonly<{
|
|
4
|
-
kind: "success" | "error";
|
|
5
|
-
message: string;
|
|
6
|
-
}> | null;
|
|
2
|
+
import type { PreviewSessionAuthMode } from "../../auth-contract";
|
|
7
3
|
export declare function useOnboardingConfirmationCheck(input: Readonly<{
|
|
8
|
-
authMode:
|
|
4
|
+
authMode: PreviewSessionAuthMode;
|
|
9
5
|
dashboardBaseUrl: string | null;
|
|
10
6
|
previewToken: string | null;
|
|
11
7
|
siteId: string | null;
|
|
@@ -16,13 +12,12 @@ export declare function useOnboardingConfirmationCheck(input: Readonly<{
|
|
|
16
12
|
readonly closeDialog: () => void;
|
|
17
13
|
readonly dashboardContinueUrl: string | null;
|
|
18
14
|
readonly dashboardUnlocked: boolean;
|
|
19
|
-
readonly dialogState:
|
|
15
|
+
readonly dialogState: import("../../onboarding-preview-planner").OnboardingConfirmationDialogState;
|
|
20
16
|
readonly hasLoadedStatus: boolean;
|
|
21
17
|
readonly isCheckingConfirmation: boolean;
|
|
22
18
|
readonly isResendingConfirmation: boolean;
|
|
23
19
|
readonly launchReadiness: LaunchReadiness;
|
|
24
20
|
readonly resendConfirmation: () => Promise<void>;
|
|
25
|
-
readonly resendFeedback:
|
|
21
|
+
readonly resendFeedback: import("../../onboarding-preview-planner").OnboardingResendFeedback;
|
|
26
22
|
readonly statusLoadFailed: boolean;
|
|
27
23
|
};
|
|
28
|
-
export {};
|
|
@@ -2,6 +2,5 @@ export declare const PREVIEW_COOKIE_NAME = "preview_token";
|
|
|
2
2
|
export declare const PREVIEW_REFRESH_COOKIE_NAME = "preview_refresh_token";
|
|
3
3
|
export declare const PREVIEW_COOKIE_MAX_AGE: number;
|
|
4
4
|
export declare const PREVIEW_CODE_PARAM = "preview_code";
|
|
5
|
-
export declare const PREVIEW_AUTH_ENTRY_PATH = "/preview/auth";
|
|
6
5
|
export declare const PREVIEW_SURFACE_PARAM = "preview_surface";
|
|
7
6
|
export declare const PREVIEW_THEME_COOKIE_NAME = "preview_theme_id";
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { LaunchReadiness, OnboardingPreviewStatusResponse, ResendOnboardingPreviewConfirmationResponse } from '@riverbankcms/api/launch-readiness';
|
|
2
|
+
import type { PreviewAuthEntryUrlInput } from './route-contract';
|
|
3
|
+
export declare const DEFAULT_CHECK_ERROR_MESSAGE = "Unable to check your confirmation status right now.";
|
|
4
|
+
export declare const DEFAULT_RESEND_ERROR_MESSAGE = "Unable to resend your confirmation email right now.";
|
|
5
|
+
export declare const RESEND_SUCCESS_MESSAGE = "We sent a fresh confirmation email. Check your inbox and spam folder.";
|
|
6
|
+
export declare const ALREADY_CONFIRMED_MESSAGE = "Your email is already confirmed. You can complete setup in the dashboard.";
|
|
7
|
+
export type OnboardingPreviewPlannerAuthMode = 'onboardingGrant' | 'userSession' | null;
|
|
8
|
+
export type OnboardingConfirmationDialogState = Readonly<{
|
|
9
|
+
kind: 'ready';
|
|
10
|
+
}> | Readonly<{
|
|
11
|
+
kind: 'pending';
|
|
12
|
+
}> | Readonly<{
|
|
13
|
+
kind: 'error';
|
|
14
|
+
message: string;
|
|
15
|
+
}> | null;
|
|
16
|
+
export type OnboardingResendFeedback = Readonly<{
|
|
17
|
+
kind: 'success' | 'error';
|
|
18
|
+
message: string;
|
|
19
|
+
}> | null;
|
|
20
|
+
export type OnboardingConfirmationState = Readonly<{
|
|
21
|
+
dashboardUnlocked: boolean;
|
|
22
|
+
dialogState: OnboardingConfirmationDialogState;
|
|
23
|
+
hasLoadedStatus: boolean;
|
|
24
|
+
launchReadiness: LaunchReadiness;
|
|
25
|
+
resendFeedback: OnboardingResendFeedback;
|
|
26
|
+
statusLoadFailed: boolean;
|
|
27
|
+
}>;
|
|
28
|
+
export type OnboardingConfirmationStateUpdate = Readonly<{
|
|
29
|
+
kind: 'setDashboardUnlocked';
|
|
30
|
+
dashboardUnlocked: boolean;
|
|
31
|
+
}> | Readonly<{
|
|
32
|
+
kind: 'setDialogState';
|
|
33
|
+
dialogState: OnboardingConfirmationDialogState;
|
|
34
|
+
}> | Readonly<{
|
|
35
|
+
kind: 'setHasLoadedStatus';
|
|
36
|
+
hasLoadedStatus: boolean;
|
|
37
|
+
}> | Readonly<{
|
|
38
|
+
kind: 'setLaunchReadiness';
|
|
39
|
+
launchReadiness: LaunchReadiness;
|
|
40
|
+
}> | Readonly<{
|
|
41
|
+
kind: 'setResendFeedback';
|
|
42
|
+
resendFeedback: OnboardingResendFeedback;
|
|
43
|
+
}> | Readonly<{
|
|
44
|
+
kind: 'setStatusLoadFailed';
|
|
45
|
+
statusLoadFailed: boolean;
|
|
46
|
+
}>;
|
|
47
|
+
export type OnboardingConfirmationEffect = Readonly<{
|
|
48
|
+
kind: 'none';
|
|
49
|
+
}> | Readonly<{
|
|
50
|
+
kind: 'startPreviewUpgrade';
|
|
51
|
+
input: PreviewAuthEntryUrlInput;
|
|
52
|
+
}>;
|
|
53
|
+
export type OnboardingConfirmationPlan = Readonly<{
|
|
54
|
+
updates: readonly OnboardingConfirmationStateUpdate[];
|
|
55
|
+
effect: OnboardingConfirmationEffect;
|
|
56
|
+
}>;
|
|
57
|
+
export declare function applyOnboardingConfirmationUpdate(state: OnboardingConfirmationState, update: OnboardingConfirmationStateUpdate): OnboardingConfirmationState;
|
|
58
|
+
export declare function applyOnboardingConfirmationUpdates(state: OnboardingConfirmationState, updates: readonly OnboardingConfirmationStateUpdate[]): OnboardingConfirmationState;
|
|
59
|
+
export declare function planStatusApplied(input: Readonly<{
|
|
60
|
+
allowUserSessionUnlock: boolean;
|
|
61
|
+
authMode: OnboardingPreviewPlannerAuthMode;
|
|
62
|
+
currentUrl: string | null;
|
|
63
|
+
dashboardBaseUrl: string | null;
|
|
64
|
+
siteSlug: string | null;
|
|
65
|
+
status: OnboardingPreviewStatusResponse;
|
|
66
|
+
upgradeAlreadyStarted: boolean;
|
|
67
|
+
}>): OnboardingConfirmationPlan;
|
|
68
|
+
export declare function planAlreadyUnlockedManualCheck(): OnboardingConfirmationPlan;
|
|
69
|
+
export declare function planMissingConfirmationStatusConfig(message?: string): OnboardingConfirmationPlan;
|
|
70
|
+
export declare function planConfirmationStatusFailure(message?: string): OnboardingConfirmationPlan;
|
|
71
|
+
export declare function planManualConfirmationStatusSuccess(input: Readonly<{
|
|
72
|
+
authMode: OnboardingPreviewPlannerAuthMode;
|
|
73
|
+
currentUrl: string | null;
|
|
74
|
+
dashboardBaseUrl: string | null;
|
|
75
|
+
siteSlug: string | null;
|
|
76
|
+
status: OnboardingPreviewStatusResponse;
|
|
77
|
+
upgradeAlreadyStarted: boolean;
|
|
78
|
+
}>): OnboardingConfirmationPlan;
|
|
79
|
+
export declare function planInitialStatusLoadFailure(): OnboardingConfirmationPlan;
|
|
80
|
+
export declare function planMissingResendConfirmationConfig(message?: string): OnboardingConfirmationPlan;
|
|
81
|
+
export declare function planResendConfirmationFailure(message?: string): OnboardingConfirmationPlan;
|
|
82
|
+
export declare function planResendConfirmationSuccess(input: Readonly<{
|
|
83
|
+
authMode: OnboardingPreviewPlannerAuthMode;
|
|
84
|
+
currentUrl: string | null;
|
|
85
|
+
dashboardBaseUrl: string | null;
|
|
86
|
+
response: ResendOnboardingPreviewConfirmationResponse;
|
|
87
|
+
siteSlug: string | null;
|
|
88
|
+
upgradeAlreadyStarted: boolean;
|
|
89
|
+
}>): OnboardingConfirmationPlan;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const previewBrowserEntries: {
|
|
2
|
+
readonly previewAuthEntry: {
|
|
3
|
+
readonly pathname: "/preview/auth";
|
|
4
|
+
};
|
|
5
|
+
};
|
|
6
|
+
export declare const previewDashboardApiEndpoints: {
|
|
7
|
+
readonly previewAuthExchange: {
|
|
8
|
+
readonly path: "/api/preview/auth/exchange";
|
|
9
|
+
};
|
|
10
|
+
readonly onboardingPreviewStatus: {
|
|
11
|
+
readonly path: "/api/public/sites/{siteId}/onboarding/preview-status";
|
|
12
|
+
};
|
|
13
|
+
readonly onboardingResendConfirmation: {
|
|
14
|
+
readonly path: "/api/public/sites/{siteId}/onboarding/resend-confirmation";
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export type PreviewBrowserEntryRouteKey = keyof typeof previewBrowserEntries;
|
|
18
|
+
export type PreviewDashboardApiEndpointKey = keyof typeof previewDashboardApiEndpoints;
|
|
19
|
+
export type OnboardingPreviewStage = 'preview';
|
|
20
|
+
export type PreviewAuthEntryUrlInput = Readonly<{
|
|
21
|
+
dashboardBaseUrl: string;
|
|
22
|
+
returnUrl: string;
|
|
23
|
+
fallbackUrl: string;
|
|
24
|
+
siteSlug?: string | null;
|
|
25
|
+
}>;
|
|
26
|
+
export type PreviewAuthExchangeUrlInput = Readonly<{
|
|
27
|
+
dashboardBaseUrl: string;
|
|
28
|
+
}>;
|
|
29
|
+
export type OnboardingPreviewEndpointUrlInput = Readonly<{
|
|
30
|
+
dashboardBaseUrl: string;
|
|
31
|
+
siteId: string;
|
|
32
|
+
}>;
|
|
33
|
+
export declare const previewAuthEntryPathname: "/preview/auth";
|
|
34
|
+
export declare function buildPreviewAuthEntryUrl(input: PreviewAuthEntryUrlInput): string;
|
|
35
|
+
export declare function buildPreviewAuthExchangeUrl(input: PreviewAuthExchangeUrlInput): string;
|
|
36
|
+
export declare function buildOnboardingPreviewStatusUrl(input: OnboardingPreviewEndpointUrlInput): string;
|
|
37
|
+
export declare function buildOnboardingResendConfirmationUrl(input: OnboardingPreviewEndpointUrlInput): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BookingFlexibleBalanceConfig, BookingInstalmentPlanConfig } from '@riverbankcms/core';
|
|
1
|
+
import type { AddressedLocationValue, BusinessAddress, BookingFlexibleBalanceConfig, BookingInstalmentPlanConfig } from '@riverbankcms/core';
|
|
2
2
|
import type { MediaAssetIndexItem, SiteFooterContent, SiteHeaderContent, Theme } from '../contracts';
|
|
3
3
|
import type { BlockFieldConfig as SdkBlockFieldConfig, BlockFieldOptionsMap as SdkBlockFieldOptionsMap, ContentConfig as SdkContentConfig, ContainerOptionsConfig as SdkContainerOptionsConfig, FieldSelectOption as SdkFieldSelectOption, SdkCustomBlock, SdkThemeConfig, SdkThemePalette, SectionBackground as SdkSectionBackground, SectionOptionsConfig as SdkSectionOptionsConfig, SiteStyleConfig as SdkSiteStyleConfig } from '../config/types';
|
|
4
4
|
export type RuntimeSiteSdkConfig = {
|
|
@@ -270,6 +270,8 @@ export type SiteResponse = {
|
|
|
270
270
|
maintenance_mode_message?: unknown | null;
|
|
271
271
|
deployment_mode?: 'managed' | 'headless_cms' | 'headless_full' | null;
|
|
272
272
|
is_sdk_site?: boolean | null;
|
|
273
|
+
businessAddress?: BusinessAddress | null;
|
|
274
|
+
venuesById?: Record<string, AddressedLocationValue>;
|
|
273
275
|
};
|
|
274
276
|
favicon?: {
|
|
275
277
|
assetId: string;
|
|
@@ -279,6 +281,14 @@ export type SiteResponse = {
|
|
|
279
281
|
theme: Theme;
|
|
280
282
|
themeId?: string | null;
|
|
281
283
|
selectionId?: string | null;
|
|
284
|
+
/**
|
|
285
|
+
* Persisted Style configurator selections (Phase C). Optional so legacy
|
|
286
|
+
* payloads without these columns still satisfy the type — consumers fall
|
|
287
|
+
* back to the site style's defaults when null.
|
|
288
|
+
*/
|
|
289
|
+
selectionButtonPersonalityId?: string | null;
|
|
290
|
+
selectionPaletteVariantId?: string | null;
|
|
291
|
+
selectionPaletteOverrides?: Record<string, string> | null;
|
|
282
292
|
navigation: NavigationMenuWithItems[];
|
|
283
293
|
appointmentsEnabled?: boolean;
|
|
284
294
|
portalEnabled?: boolean;
|
|
@@ -1,79 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Block component for
|
|
2
|
+
* Default Block renderer component for Riverbank CMS.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* This surface restores the common SDK behavior where rendering a block also
|
|
5
|
+
* boots interactive CMS islands automatically. For a bootstrap-free surface,
|
|
6
|
+
* use `@riverbankcms/sdk/rendering/server`.
|
|
5
7
|
*/
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import type { BlockKind } from '../../types';
|
|
10
|
-
/**
|
|
11
|
-
* Override component for custom block rendering.
|
|
12
|
-
* Receives the same props as default block components.
|
|
13
|
-
*/
|
|
14
|
-
export type BlockOverrideComponent = React.ComponentType<{
|
|
15
|
-
content: Record<string, unknown>;
|
|
16
|
-
theme?: ThemeTokens;
|
|
17
|
-
themeConfig?: Theme;
|
|
18
|
-
data?: Record<string, unknown>;
|
|
19
|
-
blockId?: string | null;
|
|
20
|
-
blockKind?: BlockKind;
|
|
21
|
-
}>;
|
|
22
|
-
export type BlockProps = {
|
|
23
|
-
blockKind: BlockKind;
|
|
24
|
-
blockId?: string | null;
|
|
25
|
-
content: Record<string, unknown>;
|
|
26
|
-
theme: Theme;
|
|
27
|
-
siteId: string;
|
|
28
|
-
pageId?: string;
|
|
29
|
-
previewStage?: 'published' | 'preview';
|
|
30
|
-
client?: RiverbankClient;
|
|
31
|
-
usePlaceholders?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Custom component to override default block rendering.
|
|
34
|
-
* When provided, renders this component instead of the manifest-based default.
|
|
35
|
-
* This is SSR-safe - no context or hooks required.
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```tsx
|
|
39
|
-
* <Block
|
|
40
|
-
* blockKind="block.hero"
|
|
41
|
-
* content={heroContent}
|
|
42
|
-
* theme={theme}
|
|
43
|
-
* siteId={siteId}
|
|
44
|
-
* override={MyCustomHero}
|
|
45
|
-
* />
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
override?: BlockOverrideComponent;
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* Renders a single CMS block with optional data loading.
|
|
52
|
-
*
|
|
53
|
-
* Use this component when you want to render individual blocks outside of a full page context,
|
|
54
|
-
* or when mixing CMS blocks with custom JSX.
|
|
55
|
-
*
|
|
56
|
-
* @example Basic usage
|
|
57
|
-
* ```tsx
|
|
58
|
-
* <Block
|
|
59
|
-
* blockKind="block.hero"
|
|
60
|
-
* content={{ headline: 'Welcome', subheadline: 'To our site' }}
|
|
61
|
-
* theme={theme}
|
|
62
|
-
* siteId="site-123"
|
|
63
|
-
* />
|
|
64
|
-
* ```
|
|
65
|
-
*
|
|
66
|
-
* @example With data loading
|
|
67
|
-
* ```tsx
|
|
68
|
-
* <Block
|
|
69
|
-
* blockKind="block.blog-listing"
|
|
70
|
-
* blockId="block-456"
|
|
71
|
-
* content={blockContent}
|
|
72
|
-
* theme={theme}
|
|
73
|
-
* siteId="site-123"
|
|
74
|
-
* pageId="page-789"
|
|
75
|
-
* client={client}
|
|
76
|
-
* />
|
|
77
|
-
* ```
|
|
78
|
-
*/
|
|
79
|
-
export declare function Block({ blockKind, blockId, content, theme, siteId, pageId, previewStage, client, usePlaceholders: _usePlaceholders, override: OverrideComponent, }: BlockProps): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
8
|
+
import { type BlockProps } from './Block.shared';
|
|
9
|
+
export type { BlockOverrideComponent, BlockProps } from './Block.shared';
|
|
10
|
+
export declare function Block(props: BlockProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-only Block renderer for Riverbank CMS.
|
|
3
|
+
*
|
|
4
|
+
* This stays server-safe by delegating to the shared `BlockContent` renderer
|
|
5
|
+
* without pulling the client hydration bootstrap into the server entrypoint.
|
|
6
|
+
*/
|
|
7
|
+
import { type BlockProps } from './Block.shared';
|
|
8
|
+
export type { BlockOverrideComponent, BlockProps } from './Block.shared';
|
|
9
|
+
export declare function Block(props: BlockProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Block rendering implementation.
|
|
3
|
+
*
|
|
4
|
+
* The default `@riverbankcms/sdk/rendering` surface wraps this with island
|
|
5
|
+
* hydration; the strict `@riverbankcms/sdk/rendering/server` surface exports it
|
|
6
|
+
* directly.
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import type { MediaAssetIndexItem, RouteMap, Theme } from '../../contracts';
|
|
10
|
+
import type { RiverbankClient } from '../../client/types';
|
|
11
|
+
import type { BlockKind } from '../../types';
|
|
12
|
+
import type { BlockOverrideComponent } from '../overrides';
|
|
13
|
+
export type { BlockOverrideComponent } from '../overrides';
|
|
14
|
+
export type BlockProps = {
|
|
15
|
+
blockKind: BlockKind;
|
|
16
|
+
blockId?: string | null;
|
|
17
|
+
content: Record<string, unknown>;
|
|
18
|
+
theme: Theme;
|
|
19
|
+
siteId?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Supabase storage URL for direct image access in SSR output and client
|
|
22
|
+
* islands.
|
|
23
|
+
*/
|
|
24
|
+
supabaseUrl?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Canonical media sidecar for resolving identifier-only media values.
|
|
27
|
+
*/
|
|
28
|
+
mediaAssets?: readonly MediaAssetIndexItem[];
|
|
29
|
+
/**
|
|
30
|
+
* Base URL for the CMS API. Interactive blocks need this for client-side
|
|
31
|
+
* form, booking, event, and commerce calls.
|
|
32
|
+
*/
|
|
33
|
+
apiBaseUrl?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Portal token for customer portal Bearer auth.
|
|
36
|
+
*/
|
|
37
|
+
portalToken?: string | null;
|
|
38
|
+
/** Route lookup for CMS links inside block content. */
|
|
39
|
+
routeMap?: RouteMap;
|
|
40
|
+
/** Page identifier to routeId lookup for { kind: 'page' } links. */
|
|
41
|
+
pagesByIdentifier?: Record<string, string>;
|
|
42
|
+
/** ContentType -> identifier -> routeId lookup for { kind: 'entry' } links. */
|
|
43
|
+
entriesByIdentifier?: Record<string, Record<string, string>>;
|
|
44
|
+
pageId?: string;
|
|
45
|
+
previewStage?: 'published' | 'preview';
|
|
46
|
+
client?: RiverbankClient;
|
|
47
|
+
usePlaceholders?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Custom component to override default block rendering. When provided, renders
|
|
50
|
+
* this component instead of the manifest-based default. Override components
|
|
51
|
+
* receive the same serializable runtime context as page-level block overrides.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```tsx
|
|
55
|
+
* <Block
|
|
56
|
+
* blockKind="block.hero"
|
|
57
|
+
* content={heroContent}
|
|
58
|
+
* theme={theme}
|
|
59
|
+
* siteId={siteId}
|
|
60
|
+
* override={MyCustomHero}
|
|
61
|
+
* />
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
override?: BlockOverrideComponent;
|
|
65
|
+
};
|
|
66
|
+
export type BlockHydrationBootstrapConfig = {
|
|
67
|
+
siteId?: string;
|
|
68
|
+
supabaseUrl?: string;
|
|
69
|
+
mediaAssets?: readonly MediaAssetIndexItem[];
|
|
70
|
+
};
|
|
71
|
+
export declare function toBlockHydrationBootstrapConfig(props: Pick<BlockProps, 'siteId' | 'supabaseUrl' | 'mediaAssets'>): BlockHydrationBootstrapConfig;
|
|
72
|
+
/**
|
|
73
|
+
* Renders a single CMS block with optional data loading.
|
|
74
|
+
*
|
|
75
|
+
* Use this component when you want to render individual blocks outside of a full page context,
|
|
76
|
+
* or when mixing CMS blocks with custom JSX.
|
|
77
|
+
*/
|
|
78
|
+
export declare function BlockContent(props: BlockProps): Promise<React.ReactElement<unknown, string | React.JSXElementConstructor<any>>>;
|
|
@@ -54,11 +54,11 @@ export type LayoutProps = {
|
|
|
54
54
|
* Layout component that wraps content with site header and footer.
|
|
55
55
|
*
|
|
56
56
|
* This is a server/RSC-safe component. The default `@riverbankcms/sdk/rendering`
|
|
57
|
-
* `Page`
|
|
58
|
-
* `@riverbankcms/sdk/rendering/server` surface stays bootstrap-free.
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* explicitly.
|
|
57
|
+
* `Page` and `Block` surfaces mount CMS island hydration automatically, while
|
|
58
|
+
* the strict `@riverbankcms/sdk/rendering/server` surface stays bootstrap-free.
|
|
59
|
+
* If a custom host renders hydratable CMS islands through the strict server
|
|
60
|
+
* surface, mount `BlocksIslandsHydrator` from
|
|
61
|
+
* `@riverbankcms/sdk/rendering/client` explicitly.
|
|
62
62
|
*
|
|
63
63
|
* @example With pre-fetched site data (recommended)
|
|
64
64
|
* ```tsx
|
|
@@ -6,5 +6,5 @@ export { Page } from './components/Page.server';
|
|
|
6
6
|
export type { PageProps } from './components/Page.server';
|
|
7
7
|
export { Layout } from './components/Layout';
|
|
8
8
|
export type { LayoutProps, HeaderData, FooterData } from './components/Layout';
|
|
9
|
-
export { Block } from './components/Block';
|
|
10
|
-
export type { BlockProps } from './components/Block';
|
|
9
|
+
export { Block } from './components/Block.server';
|
|
10
|
+
export type { BlockProps } from './components/Block.server';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GradientDirection, ButtonPaddingPreset } from './types';
|
|
1
|
+
import type { ButtonSizes, GradientDirection, ButtonPaddingPreset } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Shared constants for button CSS generation
|
|
4
4
|
*
|
|
@@ -38,3 +38,11 @@ export declare const FONT_SIZE_MAP: Record<string, string>;
|
|
|
38
38
|
* These are global defaults that apply to all button variants unless overridden
|
|
39
39
|
*/
|
|
40
40
|
export declare const BUTTON_PADDING_PRESETS: Record<ButtonPaddingPreset, string>;
|
|
41
|
+
/**
|
|
42
|
+
* System defaults used when a theme doesn't supply its own `theme.buttons.sizes`.
|
|
43
|
+
*
|
|
44
|
+
* Every size is defined so the size class CSS always emits a complete rule and
|
|
45
|
+
* variants are never naked. Referenced by `generateButtonCss` and surfaceable
|
|
46
|
+
* from UI ("Showing default size ramp") without duplicating the values.
|
|
47
|
+
*/
|
|
48
|
+
export declare const DEFAULT_BUTTON_SIZES: ButtonSizes;
|