@riverbankcms/sdk 0.60.16 → 0.62.4
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/dist/_dts/api/src/accessAdmin.d.ts +7 -0
- package/dist/_dts/api/src/bookingClosures.d.ts +106 -0
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +59 -1
- package/dist/_dts/api/src/bookingRecords.d.ts +101 -4
- package/dist/_dts/api/src/bookings.d.ts +2 -1
- package/dist/_dts/api/src/calendar.d.ts +11 -1
- package/dist/_dts/api/src/contentRuntime.d.ts +2 -0
- package/dist/_dts/api/src/contentVersionHistory.d.ts +52 -0
- package/dist/_dts/api/src/contentVersionHistoryClient.d.ts +45 -0
- package/dist/_dts/api/src/endpoints.d.ts +206 -6
- package/dist/_dts/api/src/index.d.ts +9 -2
- package/dist/_dts/api/src/participantMessaging.d.ts +113 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +31 -7
- package/dist/_dts/api/src/siteMembers.d.ts +10 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +76 -51
- package/dist/_dts/api/src/types.d.ts +3 -1
- package/dist/_dts/api/src/url.d.ts +3 -3
- package/dist/_dts/blocks/src/bindings/index.d.ts +2 -2
- package/dist/_dts/blocks/src/index.d.ts +66 -62
- package/dist/_dts/blocks/src/lib/media.d.ts +60 -0
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/audio-player.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/blog-post.d.ts +0 -21
- package/dist/_dts/blocks/src/system/blocks/body-text.d.ts +2 -6
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +0 -10
- package/dist/_dts/blocks/src/system/blocks/columns.d.ts +0 -10
- package/dist/_dts/blocks/src/system/blocks/course-details.d.ts +0 -20
- package/dist/_dts/blocks/src/system/blocks/course-registration.d.ts +0 -20
- package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +15 -15
- package/dist/_dts/blocks/src/system/blocks/cta-full.d.ts +5 -10
- package/dist/_dts/blocks/src/system/blocks/embed.d.ts +0 -11
- package/dist/_dts/blocks/src/system/blocks/event-details.d.ts +0 -20
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +0 -20
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +43 -27
- package/dist/_dts/blocks/src/system/blocks/events/event-listing.d.ts +24 -15
- package/dist/_dts/blocks/src/system/blocks/events/event-spotlight.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +132 -12
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +3 -2
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +2 -10
- package/dist/_dts/blocks/src/system/blocks/file-download.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/form.d.ts +2 -24
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/hero.d.ts +2 -3
- package/dist/_dts/blocks/src/system/blocks/image-gallery.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +0 -13
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +17 -17
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +2 -10
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/shared/bookingPaymentTerms.d.ts +9 -9
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/single-button.d.ts +16 -15
- package/dist/_dts/blocks/src/system/blocks/site-footer.d.ts +2 -6
- package/dist/_dts/blocks/src/system/blocks/site-header.d.ts +0 -11
- package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/testimonials.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/video-grid.d.ts +2 -2
- package/dist/_dts/blocks/src/system/constants/events.d.ts +18 -0
- package/dist/_dts/blocks/src/system/customize/facets.d.ts +105 -0
- package/dist/_dts/blocks/src/system/defineBlock.d.ts +29 -5
- package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +2 -1
- package/dist/_dts/blocks/src/system/fragments/library/blogFeaturedPost.d.ts +0 -24
- package/dist/_dts/blocks/src/system/fragments/library/bodyCopy.d.ts +0 -4
- package/dist/_dts/blocks/src/system/fragments/library/bookingForm.d.ts +0 -4
- package/dist/_dts/blocks/src/system/fragments/library/card.d.ts +0 -6
- package/dist/_dts/blocks/src/system/fragments/library/columnContent.d.ts +0 -6
- package/dist/_dts/blocks/src/system/fragments/library/ctaCopy.d.ts +0 -4
- package/dist/_dts/blocks/src/system/fragments/library/ctaRow.d.ts +0 -4
- package/dist/_dts/blocks/src/system/fragments/library/faqAccordion.d.ts +0 -4
- package/dist/_dts/blocks/src/system/fragments/library/faqHeading.d.ts +0 -4
- package/dist/_dts/blocks/src/system/fragments/library/feedbackCallout.d.ts +0 -6
- package/dist/_dts/blocks/src/system/fragments/library/footerBottomText.d.ts +0 -4
- package/dist/_dts/blocks/src/system/fragments/library/formCopy.d.ts +0 -4
- package/dist/_dts/blocks/src/system/fragments/library/formEmbed.d.ts +0 -18
- package/dist/_dts/blocks/src/system/fragments/library/headerCta.d.ts +0 -4
- package/dist/_dts/blocks/src/system/fragments/library/heading.d.ts +0 -6
- package/dist/_dts/blocks/src/system/fragments/library/heroCopy.d.ts +0 -4
- package/dist/_dts/blocks/src/system/fragments/library/heroCtaRow.d.ts +0 -4
- package/dist/_dts/blocks/src/system/fragments/library/heroLayoutControls.d.ts +0 -4
- package/dist/_dts/blocks/src/system/fragments/library/image.d.ts +0 -6
- package/dist/_dts/blocks/src/system/fragments/library/newsletterCopy.d.ts +0 -4
- package/dist/_dts/blocks/src/system/fragments/library/newsletterForm.d.ts +0 -4
- package/dist/_dts/blocks/src/system/fragments/library/quote.d.ts +0 -6
- package/dist/_dts/blocks/src/system/fragments/library/richText.d.ts +0 -6
- package/dist/_dts/blocks/src/system/fragments/library/sectionState.d.ts +0 -6
- package/dist/_dts/blocks/src/system/fragments/library/singleButton.d.ts +0 -4
- package/dist/_dts/blocks/src/system/fragments/library/spinner.d.ts +0 -5
- package/dist/_dts/blocks/src/system/fragments/library/teamMember.d.ts +0 -6
- package/dist/_dts/blocks/src/system/fragments/library/testimonialsCarousel.d.ts +0 -31
- package/dist/_dts/blocks/src/system/fragments/library/testimonialsHeading.d.ts +0 -4
- package/dist/_dts/blocks/src/system/fragments/library/videoEmbed.d.ts +0 -6
- package/dist/_dts/blocks/src/system/fragments/types.d.ts +11 -3
- package/dist/_dts/blocks/src/system/helpers/resolveBackground.d.ts +4 -0
- package/dist/_dts/blocks/src/system/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/manifest/derivedContent.d.ts +3 -3
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +10 -10
- package/dist/_dts/blocks/src/system/media/constrainedVideoMedia.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/media.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.state.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/FieldValidationMessage.d.ts +19 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/TerminalPanel.d.ts +8 -2
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/themeColorResolution.d.ts +7 -0
- package/dist/_dts/content-editor/src/hooks/useDebouncedLatestSave.d.ts +24 -0
- package/dist/_dts/content-editor/src/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/ui/stores/autosaveStore.d.ts +1 -0
- package/dist/_dts/content-editor/src/ui/stores/types.d.ts +1 -0
- package/dist/_dts/content-model/src/contentManifest.d.ts +2 -2
- package/dist/_dts/content-model/src/referenceFields.d.ts +7 -1
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +242 -6
- package/dist/_dts/db/src/schemas/forms.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/media/MediaField.d.ts +2 -0
- package/dist/_dts/editor-blocks/src/widgets/entry-picker/EntryPickerWidgetProvider.d.ts +3 -2
- package/dist/_dts/editor-blocks/src/widgets/entry-picker/loaders.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/widgets/entry-picker/types.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/widgets/link/LinkPicker.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/widgets/link/LinkWidget.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/widgets/link/LinkWidgetContext.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/widgets/link/loaders.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/widgets/link/types.d.ts +3 -2
- package/dist/_dts/editor-blocks/src/widgets/reference/dynamicAdapters.d.ts +9 -0
- package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +5 -1
- package/dist/_dts/media-core/src/index.d.ts +1 -0
- package/dist/_dts/media-core/src/videoSlotPolicy.d.ts +38 -0
- package/dist/_dts/media-editor/src/MediaEditor.d.ts +3 -1
- package/dist/_dts/media-editor/src/MediaPickerDialog.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/blocks/BlockToolbar.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/composePageFromBlocks.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/index.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/blocks/composer/mergeDrafts.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +31 -8
- package/dist/_dts/preview-next/src/client/blocks/customizeFacetControls.d.ts +9 -0
- package/dist/_dts/preview-next/src/client/blocks/pageDesignRuntimePreview.d.ts +6 -5
- package/dist/_dts/preview-next/src/client/blocks/previewCustomizeActions.d.ts +14 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/aiProposalProjection.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/applyPreviewProjections.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/index.d.ts +4 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.d.ts +5 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +72 -0
- package/dist/_dts/preview-next/src/client/index.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/layout/PreviewLayoutContext.d.ts +8 -5
- package/dist/_dts/preview-next/src/client/preview/PageDesignEditorStateContext.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +11 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +9 -5
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +6 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +13 -2
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +7 -1
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeControlStyles.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeHistory.d.ts +7 -3
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeRuntimePatch.d.ts +9 -1
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeWorkflowState.d.ts +13 -0
- package/dist/_dts/preview-next/src/client/preview/sidebarTabPreference.d.ts +8 -2
- package/dist/_dts/preview-next/src/client/preview/siteChromeLookRows.d.ts +49 -0
- package/dist/_dts/preview-next/src/client/widgets/widgetAdapters.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/content.d.ts +10 -0
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +1 -1
- package/dist/_dts/sdk/src/manifest/prompt/examples/features-grid.d.ts +1 -1
- package/dist/_dts/sdk/src/manifest/prompt/examples/pricing.d.ts +5 -5
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +3 -1
- package/dist/_dts/sdk/src/rendering/helpers/bindings.d.ts +1 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/surfaces/src/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +3 -0
- package/dist/_dts/theme-core/src/palette/variants/types.d.ts +2 -21
- package/dist/_dts/theme-core/src/schema.d.ts +25 -0
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +451 -0
- package/dist/_dts/theme-core/src/site-styles/appearancePresetResolution.d.ts +12 -0
- package/dist/_dts/theme-core/src/site-styles/appearancePresetTypes.d.ts +61 -0
- package/dist/_dts/theme-core/src/site-styles/appearancePresets.d.ts +5 -563
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +448 -0
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +30 -0
- package/dist/_dts/theme-core/src/site-styles/customizableSurfaces.d.ts +94 -0
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +12 -0
- package/dist/_dts/theme-core/src/site-styles/footerLooks.d.ts +59 -0
- package/dist/_dts/theme-core/src/site-styles/generatedDesignPipeline.d.ts +4 -0
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +2 -0
- package/dist/_dts/theme-core/src/site-styles/headerCtaVariants.d.ts +3 -0
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +155 -0
- package/dist/_dts/theme-core/src/site-styles/headerOpeningSection.d.ts +15 -0
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +6 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignAuthority.d.ts +7 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +25 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +15 -1
- package/dist/_dts/theme-core/src/site-styles/records.d.ts +1 -0
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +8 -0
- package/dist/_dts/theme-core/src/site-styles/siteStyleBlockPolicies.d.ts +96 -0
- package/dist/_dts/theme-core/src/site-styles/sourceCatalogs.d.ts +6 -6
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +23 -5
- package/dist/_dts/theme-core/src/siteChrome.d.ts +53 -0
- package/dist/_dts/theme-core/src/tokens/colorTokenParts.d.ts +13 -0
- package/dist/_dts/theme-core/src/tokens/index.d.ts +2 -0
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +29 -0
- package/dist/_dts/theme-core/src/utils/tokenOrColor.d.ts +27 -1
- package/dist/cli/index.mjs +5149 -3635
- package/dist/client/bookings.mjs +711 -560
- package/dist/client/client.mjs +10110 -8168
- package/dist/client/hooks.mjs +3861 -2739
- package/dist/client/rendering/client.mjs +8606 -7009
- package/dist/client/rendering/islands.mjs +25202 -23768
- package/dist/client/rendering.mjs +10661 -8713
- package/dist/preview-next/before-render.mjs +256 -6
- package/dist/preview-next/client/runtime.mjs +7700 -4016
- package/dist/preview-next/editor-base.css +31 -0
- package/dist/preview-next/middleware.mjs +267 -6
- package/dist/server/components.mjs +4501 -3270
- package/dist/server/config-validation.mjs +4089 -2967
- package/dist/server/config.mjs +4089 -2967
- package/dist/server/data.mjs +3861 -2739
- package/dist/server/index.mjs +322 -24
- package/dist/server/next.mjs +4274 -3041
- package/dist/server/page-converter.mjs +3520 -2717
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +4500 -3270
- package/dist/server/rendering.mjs +4526 -3291
- package/dist/server/routing.mjs +4006 -2723
- package/dist/server/server.mjs +3897 -2772
- package/dist/server/theme-bridge.mjs +1435 -788
- package/dist/server/theme.mjs +628 -497
- package/dist/styles/index.css +61 -9
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/colorResolution.d.ts +0 -13
- package/dist/_dts/preview-next/src/client/blocks/overlay.d.ts +0 -30
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import type { PageOutline } from '@riverbankcms/blocks';
|
|
2
2
|
import type { EditorBlockId } from '@riverbankcms/core';
|
|
3
3
|
import type { BlockItem } from '@riverbankcms/editor-blocks';
|
|
4
|
+
import type { CanonicalBlockContent, PreviewProjection, PreviewRenderContent } from '../previewProjection';
|
|
4
5
|
export type BlockWithContent = {
|
|
5
6
|
[key: string]: unknown;
|
|
6
7
|
id: string | null;
|
|
7
8
|
kind: string;
|
|
8
9
|
purpose: string;
|
|
9
|
-
content?:
|
|
10
|
-
draftContent?:
|
|
11
|
-
publishedContent?:
|
|
10
|
+
content?: PreviewRenderContent;
|
|
11
|
+
draftContent?: PreviewRenderContent | null;
|
|
12
|
+
publishedContent?: PreviewRenderContent | null;
|
|
12
13
|
bindings?: Record<string, unknown>;
|
|
13
14
|
};
|
|
14
15
|
export type DraftSnapshot = {
|
|
15
16
|
id: EditorBlockId;
|
|
16
|
-
baseline:
|
|
17
|
-
current:
|
|
17
|
+
baseline: CanonicalBlockContent | null;
|
|
18
|
+
current: CanonicalBlockContent | null;
|
|
18
19
|
};
|
|
19
20
|
export type EnrichedBlock = {
|
|
20
21
|
id: string | null;
|
|
21
22
|
kind: string;
|
|
22
23
|
purpose: string;
|
|
23
24
|
orderIndex: number;
|
|
24
|
-
content:
|
|
25
|
-
draftContent:
|
|
26
|
-
publishedContent:
|
|
25
|
+
content: PreviewRenderContent | null;
|
|
26
|
+
draftContent: PreviewRenderContent | null;
|
|
27
|
+
publishedContent: PreviewRenderContent | null;
|
|
27
28
|
bindings: Record<string, unknown> | null;
|
|
28
29
|
};
|
|
29
30
|
export type CachedBlockTransform = {
|
|
@@ -42,6 +43,21 @@ export type EditorDraftInspectorStore = {
|
|
|
42
43
|
before: unknown;
|
|
43
44
|
after: unknown;
|
|
44
45
|
}>;
|
|
46
|
+
structure?: {
|
|
47
|
+
proposalId: string;
|
|
48
|
+
includeUnspecified?: boolean;
|
|
49
|
+
before: {
|
|
50
|
+
blockIds: string[];
|
|
51
|
+
};
|
|
52
|
+
after: {
|
|
53
|
+
blockIds: string[];
|
|
54
|
+
addedBlocks?: Array<{
|
|
55
|
+
id: string;
|
|
56
|
+
kind: string;
|
|
57
|
+
content?: Record<string, unknown> | null;
|
|
58
|
+
}>;
|
|
59
|
+
};
|
|
60
|
+
} | null;
|
|
45
61
|
};
|
|
46
62
|
};
|
|
47
63
|
};
|
|
@@ -49,4 +65,11 @@ export type ComposePageArgs = {
|
|
|
49
65
|
page: PageOutline | null;
|
|
50
66
|
blockItems: BlockItem[];
|
|
51
67
|
uiStore: EditorDraftInspectorStore;
|
|
68
|
+
projections?: readonly PreviewProjection[];
|
|
69
|
+
};
|
|
70
|
+
export type ComposePreviewRenderPageArgs = {
|
|
71
|
+
page: PageOutline | null;
|
|
72
|
+
blockItems: BlockItem[];
|
|
73
|
+
draftSnapshots: readonly DraftSnapshot[];
|
|
74
|
+
projections: readonly PreviewProjection[];
|
|
52
75
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type SystemCustomizeFacetId, type SystemCustomizeFacetValue } from '@riverbankcms/blocks/system/customize/facets';
|
|
2
|
+
import type { PageDesignEditorBlock } from '@riverbankcms/theme-core/site-styles/previewCompiler';
|
|
3
|
+
export type PreviewCustomizeFacetControl = Readonly<{
|
|
4
|
+
facetId: SystemCustomizeFacetId;
|
|
5
|
+
label: string;
|
|
6
|
+
value: SystemCustomizeFacetValue;
|
|
7
|
+
valueLabel: string;
|
|
8
|
+
}>;
|
|
9
|
+
export declare function previewCustomizeFacetControlsFor(blockKind: string, content: Record<string, unknown>, designBlock: PageDesignEditorBlock | null): readonly PreviewCustomizeFacetControl[];
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { BlockItem } from '@riverbankcms/editor-blocks';
|
|
2
|
-
import
|
|
2
|
+
import type { PageDesignEditorReadModel } from '@riverbankcms/theme-core/site-styles/previewCompiler';
|
|
3
3
|
import type { PreviewPageDesignEditorState } from '../preview/PageDesignEditorStateContext';
|
|
4
|
-
type
|
|
5
|
-
type RuntimePreviewSource = Readonly<{
|
|
4
|
+
import { type RuntimeContentDecorationProjection } from './previewProjection';
|
|
5
|
+
export type RuntimePreviewSource = Readonly<{
|
|
6
6
|
kind: 'preserve-server-runtime';
|
|
7
7
|
}> | Readonly<{
|
|
8
8
|
kind: 'apply-editor-model';
|
|
9
9
|
editorModel: PageDesignEditorReadModel;
|
|
10
10
|
}>;
|
|
11
11
|
export declare function applyPageDesignRuntimeFieldsToBlockItems(blockItems: readonly BlockItem[], source: RuntimePreviewSource): BlockItem[];
|
|
12
|
-
export declare function
|
|
12
|
+
export declare function applyPageDesignRuntimeFieldsToBlockContent(block: BlockItem, content: Record<string, unknown> | null, source: RuntimePreviewSource): Record<string, unknown> | null;
|
|
13
|
+
export declare function buildPageDesignRuntimeFieldsByBlockId(editorModel: PageDesignEditorReadModel): RuntimeContentDecorationProjection['fieldsByBlockId'];
|
|
14
|
+
export declare function pageDesignRuntimeProjectionFromSource(source: RuntimePreviewSource): RuntimeContentDecorationProjection | null;
|
|
13
15
|
export declare function resolveRuntimePreviewSource(pageDesignState: PreviewPageDesignEditorState): RuntimePreviewSource;
|
|
14
|
-
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AppearancePresetId, BoundaryOptionId, DesignBlockId, LayoutVariantKey, PageDesignEditorBlock, PageDesignEditorBoundary } from '@riverbankcms/theme-core/site-styles';
|
|
2
|
+
import { type SystemCustomizeFacetId, type SystemCustomizeFacetTransition, type SystemCustomizeFacetValue } from '@riverbankcms/blocks/system/customize/facets';
|
|
2
3
|
export type PreviewCustomizeCycleDirection = 'prev' | 'next';
|
|
3
4
|
export type PreviewCustomizeAction = Readonly<{
|
|
4
5
|
kind: 'set-layout';
|
|
@@ -10,6 +11,10 @@ export type PreviewCustomizeAction = Readonly<{
|
|
|
10
11
|
blockId: DesignBlockId;
|
|
11
12
|
appearancePresetId: AppearancePresetId | null;
|
|
12
13
|
}> | Readonly<{
|
|
14
|
+
kind: 'set-block-facet';
|
|
15
|
+
blockId: DesignBlockId;
|
|
16
|
+
baseContentId: string | null;
|
|
17
|
+
} & SystemCustomizeFacetTransition> | Readonly<{
|
|
13
18
|
kind: 'set-boundary';
|
|
14
19
|
previousBlockId: DesignBlockId;
|
|
15
20
|
nextBlockId: DesignBlockId;
|
|
@@ -25,6 +30,9 @@ type PreviewSetLayoutAction = Extract<PreviewCustomizeAction, {
|
|
|
25
30
|
type PreviewSetLookAction = Extract<PreviewCustomizeAction, {
|
|
26
31
|
kind: 'set-look';
|
|
27
32
|
}>;
|
|
33
|
+
type PreviewSetBlockFacetAction = Extract<PreviewCustomizeAction, {
|
|
34
|
+
kind: 'set-block-facet';
|
|
35
|
+
}>;
|
|
28
36
|
type PreviewSetBoundaryAction = Extract<PreviewCustomizeAction, {
|
|
29
37
|
kind: 'set-boundary';
|
|
30
38
|
}>;
|
|
@@ -33,5 +41,11 @@ type PreviewResetBoundaryAction = Extract<PreviewCustomizeAction, {
|
|
|
33
41
|
}>;
|
|
34
42
|
export declare function cyclePageDesignBlockLayout(block: PageDesignEditorBlock, direction: PreviewCustomizeCycleDirection): PreviewSetLayoutAction | null;
|
|
35
43
|
export declare function cyclePageDesignBlockLook(block: PageDesignEditorBlock, direction: PreviewCustomizeCycleDirection): PreviewSetLookAction | null;
|
|
44
|
+
export declare function cyclePageDesignBlockFacet(input: Readonly<{
|
|
45
|
+
block: PageDesignEditorBlock;
|
|
46
|
+
facetId: SystemCustomizeFacetId;
|
|
47
|
+
currentValue: SystemCustomizeFacetValue;
|
|
48
|
+
direction: PreviewCustomizeCycleDirection;
|
|
49
|
+
}>): PreviewSetBlockFacetAction | null;
|
|
36
50
|
export declare function cyclePageDesignBoundaryBreak(boundary: PageDesignEditorBoundary, direction: PreviewCustomizeCycleDirection): PreviewSetBoundaryAction | PreviewResetBoundaryAction | null;
|
|
37
51
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EditorBlockId } from '@riverbankcms/core';
|
|
2
|
+
import type { BlockItem } from '@riverbankcms/editor-blocks';
|
|
3
|
+
import type { AiProposalProjectionState, CanonicalBlockContent, ContentFieldOverrideProjection, PreviewProjection, PreviewRenderContent, StructureProjection } from './types';
|
|
4
|
+
export declare function previewProjectionsFromAiOverlays(overlays: AiProposalProjectionState | null | undefined): PreviewProjection[];
|
|
5
|
+
export declare function applyStructureProjection(blockItems: readonly BlockItem[], projection: StructureProjection): BlockItem[];
|
|
6
|
+
export declare function applyContentFieldOverrideProjection(blockId: EditorBlockId, content: CanonicalBlockContent | PreviewRenderContent | null, projection: ContentFieldOverrideProjection): PreviewRenderContent | CanonicalBlockContent | null;
|
|
7
|
+
export declare function blockHasContentFieldOverrideProjection(blockId: EditorBlockId, projection: ContentFieldOverrideProjection): boolean;
|
package/dist/_dts/preview-next/src/client/blocks/previewProjection/applyPreviewProjections.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EditorBlockId } from '@riverbankcms/core';
|
|
2
|
+
import type { BlockItem } from '@riverbankcms/editor-blocks';
|
|
3
|
+
import type { CanonicalBlockContent, PreviewProjection, PreviewRenderContent } from './types';
|
|
4
|
+
export declare function applyPreviewStructureProjections(blockItems: readonly BlockItem[], projections: readonly PreviewProjection[]): BlockItem[];
|
|
5
|
+
export declare function applyPreviewContentFieldProjections(blockId: EditorBlockId, content: CanonicalBlockContent | null, projections: readonly PreviewProjection[]): CanonicalBlockContent | PreviewRenderContent | null;
|
|
6
|
+
export declare function applyPreviewRuntimeContentProjections(block: BlockItem, content: CanonicalBlockContent | PreviewRenderContent | null, projections: readonly PreviewProjection[]): CanonicalBlockContent | PreviewRenderContent | null;
|
|
7
|
+
export declare function blockHasPreviewContentFieldProjection(blockId: EditorBlockId, projections: readonly PreviewProjection[]): boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { applyContentFieldOverrideProjection, applyStructureProjection, blockHasContentFieldOverrideProjection, previewProjectionsFromAiOverlays, } from './aiProposalProjection';
|
|
2
|
+
export { applyPreviewContentFieldProjections, applyPreviewRuntimeContentProjections, applyPreviewStructureProjections, blockHasPreviewContentFieldProjection, } from './applyPreviewProjections';
|
|
3
|
+
export { applyRuntimeContentDecorationProjection, runtimeContentDecorationProjectionFromEditorModel, } from './runtimeContentDecoration';
|
|
4
|
+
export type { AiProposalProjectionState, CanonicalBlockContent, ContentFieldOverrideProjection, PreviewFieldOverride, PreviewProjection, PreviewProjectionAddedBlock, PreviewRenderContent, RuntimeContentDecorationProjection, StructureProjection, } from './types';
|
package/dist/_dts/preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BlockItem } from '@riverbankcms/editor-blocks';
|
|
2
|
+
import { type PageDesignEditorReadModel } from '@riverbankcms/theme-core/site-styles/previewCompiler';
|
|
3
|
+
import type { CanonicalBlockContent, PreviewRenderContent, RuntimeContentDecorationProjection } from './types';
|
|
4
|
+
export declare function runtimeContentDecorationProjectionFromEditorModel(editorModel: PageDesignEditorReadModel): RuntimeContentDecorationProjection;
|
|
5
|
+
export declare function applyRuntimeContentDecorationProjection(block: BlockItem, content: CanonicalBlockContent | PreviewRenderContent | null, projection: RuntimeContentDecorationProjection): PreviewRenderContent;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { EditorBlockId } from '@riverbankcms/core';
|
|
2
|
+
import type { BlockItem } from '@riverbankcms/editor-blocks';
|
|
3
|
+
import type { CompiledBlockRuntimeFields, DesignBlockId } from '@riverbankcms/theme-core/site-styles/previewCompiler';
|
|
4
|
+
export type CanonicalBlockContent = Record<string, unknown> & {
|
|
5
|
+
readonly __contentAuthority?: 'canonical-block-content';
|
|
6
|
+
};
|
|
7
|
+
export type PreviewRenderContent = Record<string, unknown> & {
|
|
8
|
+
readonly __contentAuthority?: 'preview-render-content';
|
|
9
|
+
};
|
|
10
|
+
export type PreviewFieldOverride = Readonly<{
|
|
11
|
+
proposalId: string;
|
|
12
|
+
before: unknown;
|
|
13
|
+
after: unknown;
|
|
14
|
+
}>;
|
|
15
|
+
export type AiProposalProjectionState = Readonly<{
|
|
16
|
+
viewMode: 'before' | 'after';
|
|
17
|
+
overrides: ReadonlyMap<string, PreviewFieldOverride>;
|
|
18
|
+
structure?: AiStructureProjectionInput | null;
|
|
19
|
+
}>;
|
|
20
|
+
export type AiStructureProjectionInput = Readonly<{
|
|
21
|
+
proposalId: string;
|
|
22
|
+
includeUnspecified?: boolean;
|
|
23
|
+
before: Readonly<{
|
|
24
|
+
blockIds: readonly string[];
|
|
25
|
+
}>;
|
|
26
|
+
after: Readonly<{
|
|
27
|
+
blockIds: readonly string[];
|
|
28
|
+
addedBlocks?: readonly PreviewProjectionAddedBlock[];
|
|
29
|
+
}>;
|
|
30
|
+
}>;
|
|
31
|
+
export type PreviewProjectionAddedBlock = Readonly<{
|
|
32
|
+
id: string;
|
|
33
|
+
kind: string;
|
|
34
|
+
content?: CanonicalBlockContent | null;
|
|
35
|
+
}>;
|
|
36
|
+
export type PreviewProjection = Readonly<{
|
|
37
|
+
kind: 'structure-overlay';
|
|
38
|
+
source: 'ai-proposal';
|
|
39
|
+
viewMode: 'before' | 'after';
|
|
40
|
+
proposalId: string;
|
|
41
|
+
includeUnspecified?: boolean;
|
|
42
|
+
before: Readonly<{
|
|
43
|
+
blockIds: readonly string[];
|
|
44
|
+
}>;
|
|
45
|
+
after: Readonly<{
|
|
46
|
+
blockIds: readonly string[];
|
|
47
|
+
addedBlocks?: readonly PreviewProjectionAddedBlock[];
|
|
48
|
+
}>;
|
|
49
|
+
}> | Readonly<{
|
|
50
|
+
kind: 'content-field-overrides';
|
|
51
|
+
source: 'ai-proposal';
|
|
52
|
+
viewMode: 'before' | 'after';
|
|
53
|
+
overrides: ReadonlyMap<string, PreviewFieldOverride>;
|
|
54
|
+
}> | Readonly<{
|
|
55
|
+
kind: 'runtime-content-decoration';
|
|
56
|
+
source: 'page-design';
|
|
57
|
+
fieldsByBlockId: ReadonlyMap<DesignBlockId, CompiledBlockRuntimeFields>;
|
|
58
|
+
}>;
|
|
59
|
+
export type StructureProjection = Extract<PreviewProjection, {
|
|
60
|
+
kind: 'structure-overlay';
|
|
61
|
+
}>;
|
|
62
|
+
export type ContentFieldOverrideProjection = Extract<PreviewProjection, {
|
|
63
|
+
kind: 'content-field-overrides';
|
|
64
|
+
}>;
|
|
65
|
+
export type RuntimeContentDecorationProjection = Extract<PreviewProjection, {
|
|
66
|
+
kind: 'runtime-content-decoration';
|
|
67
|
+
}>;
|
|
68
|
+
export type ContentProjectionTarget = Readonly<{
|
|
69
|
+
block: BlockItem;
|
|
70
|
+
editorBlockId: EditorBlockId | null;
|
|
71
|
+
content: CanonicalBlockContent | null;
|
|
72
|
+
}>;
|
|
@@ -8,7 +8,7 @@ export { PreviewShellSmoke } from "./PreviewShellSmoke";
|
|
|
8
8
|
export { PreviewLayoutProvider, usePreviewLayout, } from "./layout/PreviewLayoutContext";
|
|
9
9
|
export { useOptionalPreviewLayout } from "./layout/PreviewLayoutContext";
|
|
10
10
|
export { previewAssistantEnabled, resolvePreviewSidebarTab, } from "./preview/assistantAvailability";
|
|
11
|
-
export type { PreviewSidebarTab } from "./preview/sidebarTabPreference";
|
|
11
|
+
export type { PreviewDesignRow, PreviewSidebarOpenRequest, PreviewSidebarTab, } from "./preview/sidebarTabPreference";
|
|
12
12
|
export { getPreviewSidebarTab, onPreviewSidebarOpenRequest, requestPreviewSidebarOpen, setPreviewSidebarTab, } from "./preview/sidebarTabPreference";
|
|
13
13
|
export type { PreviewViewportControlsProps, ViewportMode, ViewportWidth, } from "./preview/PreviewViewportControls";
|
|
14
14
|
export { PreviewViewportControls } from "./preview/PreviewViewportControls";
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
type PreviewLayoutContextValue = {
|
|
2
|
+
type PreviewLayoutContextValue = Readonly<{
|
|
3
3
|
headerNode: ReactNode;
|
|
4
|
+
bannerNode?: ReactNode;
|
|
4
5
|
footerNode: ReactNode;
|
|
5
|
-
} | null;
|
|
6
|
-
export declare function PreviewLayoutProvider({ headerNode, footerNode, children, }: {
|
|
6
|
+
}> | null;
|
|
7
|
+
export declare function PreviewLayoutProvider({ headerNode, bannerNode, footerNode, children, }: {
|
|
7
8
|
headerNode: ReactNode;
|
|
9
|
+
bannerNode?: ReactNode;
|
|
8
10
|
footerNode: ReactNode;
|
|
9
11
|
children: ReactNode;
|
|
10
12
|
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export declare function usePreviewLayout(): {
|
|
13
|
+
export declare function usePreviewLayout(): Readonly<{
|
|
12
14
|
headerNode: ReactNode;
|
|
15
|
+
bannerNode?: ReactNode;
|
|
13
16
|
footerNode: ReactNode;
|
|
14
|
-
}
|
|
17
|
+
}>;
|
|
15
18
|
export declare function useOptionalPreviewLayout(): PreviewLayoutContextValue;
|
|
16
19
|
export {};
|
|
@@ -17,11 +17,12 @@ type PageDesignEditorStateContextValue = Readonly<{
|
|
|
17
17
|
}>;
|
|
18
18
|
export declare const PREVIEW_CUSTOMIZE_STALE_MESSAGE = "This page changed since that design choice. Refresh the preview, then try again.";
|
|
19
19
|
export { applyPreviewCustomizeActionToState } from './previewCustomizeWorkflowState';
|
|
20
|
-
export declare function PreviewPageDesignEditorStateProvider({ apiClient, siteId, pageId, enabled, children, }: Readonly<{
|
|
20
|
+
export declare function PreviewPageDesignEditorStateProvider({ apiClient, siteId, pageId, enabled, autosaveDelayMs, children, }: Readonly<{
|
|
21
21
|
apiClient: ApiClient;
|
|
22
22
|
siteId: string;
|
|
23
23
|
pageId: string | null;
|
|
24
24
|
enabled: boolean;
|
|
25
|
+
autosaveDelayMs?: number;
|
|
25
26
|
children: ReactNode;
|
|
26
27
|
}>): import("react/jsx-runtime").JSX.Element;
|
|
27
28
|
export declare function usePreviewPageDesignEditorState(): PageDesignEditorStateContextValue;
|
|
@@ -7,6 +7,8 @@ import { type ContentTypeSchema } from "@riverbankcms/content-model";
|
|
|
7
7
|
import { type ZoomLevel } from "@riverbankcms/content-editor";
|
|
8
8
|
import type { ButtonPersonalityId } from "@riverbankcms/theme-core/buttons";
|
|
9
9
|
import type { PaletteOverrides, PaletteVariantId } from "@riverbankcms/theme-core/palette";
|
|
10
|
+
import type { FooterSelectionContext, FooterLookId, HeaderSelectionContext, HeaderLookId } from "@riverbankcms/theme-core/site-styles";
|
|
11
|
+
import type { PreviewDesignRow } from "./sidebarTabPreference";
|
|
10
12
|
import type { ViewportMode, ViewportWidth } from "./PreviewViewportControls";
|
|
11
13
|
import { type SiteStyleAccess } from "./siteStyleAccess";
|
|
12
14
|
export type PreviewEditorSidebarTab = "editor" | "assistant";
|
|
@@ -35,6 +37,14 @@ export type PreviewEditorSidebarProps = {
|
|
|
35
37
|
themeSelectionButtonPersonalityId?: ButtonPersonalityId | null;
|
|
36
38
|
themeSelectionPaletteVariantId?: PaletteVariantId | null;
|
|
37
39
|
themeSelectionPaletteOverrides?: PaletteOverrides | null;
|
|
40
|
+
themeSelectionHeaderLookId?: HeaderLookId | null;
|
|
41
|
+
themeSelectionFooterLookId?: FooterLookId | null;
|
|
42
|
+
themeSelectionHeaderContext?: Partial<HeaderSelectionContext>;
|
|
43
|
+
themeSelectionFooterContext?: Partial<FooterSelectionContext>;
|
|
44
|
+
designRowRequest?: Readonly<{
|
|
45
|
+
id: number;
|
|
46
|
+
row: PreviewDesignRow;
|
|
47
|
+
}> | null;
|
|
38
48
|
apiClient: ApiClient;
|
|
39
49
|
bearerToken?: string | null;
|
|
40
50
|
supabaseUrl?: string;
|
|
@@ -53,4 +63,4 @@ export type PreviewEditorSidebarProps = {
|
|
|
53
63
|
onViewportWidthChange: (width: ViewportWidth) => void;
|
|
54
64
|
onZoomChange: (zoom: ZoomLevel) => void;
|
|
55
65
|
};
|
|
56
|
-
export declare function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, theme, themeId, themeSelectionId, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, apiClient, bearerToken, supabaseUrl, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, siteStyleAccess, activeTab, onTabChange, onClose, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange, }: PreviewEditorSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
export declare function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, theme, themeId, themeSelectionId, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, themeSelectionFooterContext, designRowRequest, apiClient, bearerToken, supabaseUrl, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, siteStyleAccess, activeTab, onTabChange, onClose, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange, }: PreviewEditorSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,6 +2,7 @@ import { type ComponentProps, type ReactNode } from "react";
|
|
|
2
2
|
import { BlockApiProvider } from "@riverbankcms/blocks/client";
|
|
3
3
|
import type { ButtonPersonalityId } from "@riverbankcms/theme-core/buttons";
|
|
4
4
|
import type { PaletteOverrides, PaletteVariantId } from "@riverbankcms/theme-core/palette";
|
|
5
|
+
import type { FooterSelectionContext, FooterLookId, HeaderSelectionContext, HeaderLookId } from "@riverbankcms/theme-core/site-styles";
|
|
5
6
|
import type { EntrySubrouteContextData, MediaAssetIndexItem, Theme } from "@riverbankcms/blocks";
|
|
6
7
|
import type { ContentTypeSchema } from "@riverbankcms/content-model";
|
|
7
8
|
import type { SdkConfigForBlockPicker } from "@riverbankcms/editor-blocks";
|
|
@@ -34,14 +35,17 @@ export type PreviewShellProps = {
|
|
|
34
35
|
themeId?: string | null;
|
|
35
36
|
themeSelectionId?: string | null;
|
|
36
37
|
/**
|
|
37
|
-
* Persisted Style configurator selections
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* site style defaults.
|
|
38
|
+
* Persisted Style configurator selections. Forwarded into StyleConfigurator
|
|
39
|
+
* so reload renders the user's saved button personality, palette variant,
|
|
40
|
+
* and sparse overrides instead of falling back to the site style defaults.
|
|
41
41
|
*/
|
|
42
42
|
themeSelectionButtonPersonalityId?: ButtonPersonalityId | null;
|
|
43
43
|
themeSelectionPaletteVariantId?: PaletteVariantId | null;
|
|
44
44
|
themeSelectionPaletteOverrides?: PaletteOverrides | null;
|
|
45
|
+
themeSelectionHeaderLookId?: HeaderLookId | null;
|
|
46
|
+
themeSelectionFooterLookId?: FooterLookId | null;
|
|
47
|
+
themeSelectionHeaderContext?: Partial<HeaderSelectionContext>;
|
|
48
|
+
themeSelectionFooterContext?: Partial<FooterSelectionContext>;
|
|
45
49
|
pageId: string | null;
|
|
46
50
|
routeId: string | null;
|
|
47
51
|
entryData?: PreviewContentEntryData | null;
|
|
@@ -63,7 +67,7 @@ export type PreviewShellProps = {
|
|
|
63
67
|
designEditorEligibility?: PreviewDesignEditorEligibility;
|
|
64
68
|
baseFetch?: BaseFetch;
|
|
65
69
|
};
|
|
66
|
-
export declare function PreviewShell({ children, apiBaseUrl, blockApiConfig, siteId, siteSlug, editableId, previewSession, previewToken, dashboardBaseUrl, surfaceId, theme, themeId, themeSelectionId, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, pageId, routeId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, initialStatus, initialBlocks, pageMetadata, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, supabaseUrl, useThemeScope, designEditorEligibility, baseFetch, }: PreviewShellProps): import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
export declare function PreviewShell({ children, apiBaseUrl, blockApiConfig, siteId, siteSlug, editableId, previewSession, previewToken, dashboardBaseUrl, surfaceId, theme, themeId, themeSelectionId, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, themeSelectionFooterContext, pageId, routeId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, initialStatus, initialBlocks, pageMetadata, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, supabaseUrl, useThemeScope, designEditorEligibility, baseFetch, }: PreviewShellProps): import("react/jsx-runtime").JSX.Element;
|
|
67
71
|
export declare function defaultDesignEditorEligibility(input: Readonly<{
|
|
68
72
|
pageId: string | null;
|
|
69
73
|
entryData?: PreviewContentEntryData | null;
|
|
@@ -2,6 +2,7 @@ import { type ReactNode } from "react";
|
|
|
2
2
|
import { type EntrySubrouteContextData, type MediaAssetIndexItem, type Theme } from "@riverbankcms/blocks";
|
|
3
3
|
import type { ButtonPersonalityId } from "@riverbankcms/theme-core/buttons";
|
|
4
4
|
import type { PaletteOverrides, PaletteVariantId } from "@riverbankcms/theme-core/palette";
|
|
5
|
+
import type { FooterSelectionContext, HeaderSelectionContext, FooterLookId, HeaderLookId } from "@riverbankcms/theme-core/site-styles";
|
|
5
6
|
import type { ContentTypeSchema } from "@riverbankcms/content-model";
|
|
6
7
|
import type { ApiClient } from "@riverbankcms/api/request";
|
|
7
8
|
import type { SdkConfigForBlockPicker } from "@riverbankcms/editor-blocks";
|
|
@@ -27,6 +28,10 @@ export type PreviewShellLayoutProps = {
|
|
|
27
28
|
themeSelectionButtonPersonalityId?: ButtonPersonalityId | null;
|
|
28
29
|
themeSelectionPaletteVariantId?: PaletteVariantId | null;
|
|
29
30
|
themeSelectionPaletteOverrides?: PaletteOverrides | null;
|
|
31
|
+
themeSelectionHeaderLookId?: HeaderLookId | null;
|
|
32
|
+
themeSelectionFooterLookId?: FooterLookId | null;
|
|
33
|
+
themeSelectionHeaderContext?: Partial<HeaderSelectionContext>;
|
|
34
|
+
themeSelectionFooterContext?: Partial<FooterSelectionContext>;
|
|
30
35
|
supabaseUrl?: string;
|
|
31
36
|
isSiteLaunched: boolean;
|
|
32
37
|
maintenanceModeEnabled: boolean;
|
|
@@ -37,4 +42,4 @@ export type PreviewShellLayoutProps = {
|
|
|
37
42
|
useThemeScope?: boolean;
|
|
38
43
|
siteStyleAccess?: SiteStyleAccess;
|
|
39
44
|
};
|
|
40
|
-
export declare function PreviewShellLayout({ children, theme, surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, apiClient, bearerToken, themeId, themeSelectionId, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, supabaseUrl, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, useThemeScope, siteStyleAccess, }: PreviewShellLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare function PreviewShellLayout({ children, theme, surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, apiClient, bearerToken, themeId, themeSelectionId, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, themeSelectionFooterContext, supabaseUrl, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, useThemeScope, siteStyleAccess, }: PreviewShellLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,19 +2,30 @@ import type { ApiClient } from '@riverbankcms/api/request';
|
|
|
2
2
|
import type { Theme } from '@riverbankcms/blocks';
|
|
3
3
|
import { type ButtonPersonalityId } from '@riverbankcms/theme-core/buttons';
|
|
4
4
|
import { type PaletteVariantId, type PaletteOverrides } from '@riverbankcms/theme-core/palette';
|
|
5
|
+
import { type FooterSelectionContext, type FooterLookId, type HeaderSelectionContext, type HeaderLookId } from '@riverbankcms/theme-core/site-styles';
|
|
5
6
|
import { type VisibleSiteStyleAccess } from './siteStyleAccess';
|
|
7
|
+
import type { PreviewDesignRow } from './sidebarTabPreference';
|
|
6
8
|
export type StyleConfiguratorProps = Readonly<{
|
|
7
9
|
siteId: string;
|
|
8
10
|
apiClient: ApiClient;
|
|
9
11
|
theme?: Theme | null;
|
|
10
12
|
themeId?: string | null;
|
|
11
13
|
selectionId?: string | null;
|
|
12
|
-
/** Server-persisted
|
|
14
|
+
/** Server-persisted design selections. */
|
|
13
15
|
initialSelections: Readonly<{
|
|
14
16
|
buttonPersonalityId: ButtonPersonalityId | null;
|
|
15
17
|
paletteVariantId: PaletteVariantId | null;
|
|
16
18
|
paletteOverrides: PaletteOverrides | null;
|
|
19
|
+
headerLookId?: HeaderLookId | null;
|
|
20
|
+
footerLookId?: FooterLookId | null;
|
|
17
21
|
}>;
|
|
22
|
+
headerSelectionContext?: Partial<HeaderSelectionContext>;
|
|
23
|
+
footerSelectionContext?: Partial<FooterSelectionContext>;
|
|
24
|
+
expandedRowRequest?: Readonly<{
|
|
25
|
+
/** Monotonic request id so repeated clicks on the same chrome surface retrigger the effect. */
|
|
26
|
+
id: number;
|
|
27
|
+
row: PreviewDesignRow;
|
|
28
|
+
}> | null;
|
|
18
29
|
siteStyleAccess: VisibleSiteStyleAccess;
|
|
19
30
|
}>;
|
|
20
|
-
export declare function StyleConfigurator({ siteId, apiClient, theme, themeId, selectionId, initialSelections, siteStyleAccess, }: StyleConfiguratorProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare function StyleConfigurator({ siteId, apiClient, theme, themeId, selectionId, initialSelections, headerSelectionContext, footerSelectionContext, expandedRowRequest, siteStyleAccess, }: StyleConfiguratorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import type { ButtonPersonalityId } from '@riverbankcms/theme-core/buttons';
|
|
14
14
|
import type { PaletteOverrides, PaletteVariantId } from '@riverbankcms/theme-core/palette';
|
|
15
|
+
import type { FooterLookId, HeaderLookId } from '@riverbankcms/theme-core/site-styles';
|
|
15
16
|
import type { SelectionFallbackWarning, SiteStyleId } from '@riverbankcms/theme-core/site-styles/previewCompiler';
|
|
16
17
|
export type StyleConfiguratorSaveStatus = Readonly<{
|
|
17
18
|
kind: 'idle';
|
|
@@ -23,7 +24,7 @@ export type StyleConfiguratorSaveStatus = Readonly<{
|
|
|
23
24
|
kind: 'failed';
|
|
24
25
|
message: string;
|
|
25
26
|
}>;
|
|
26
|
-
export type StyleConfiguratorExpandedRow = 'style' | 'buttons' | 'palette' | 'colours' | null;
|
|
27
|
+
export type StyleConfiguratorExpandedRow = 'style' | 'header' | 'footer' | 'buttons' | 'palette' | 'colours' | null;
|
|
27
28
|
/**
|
|
28
29
|
* Configurator-level notices that aren't compiler selection fallback warnings.
|
|
29
30
|
* Kept separate from `SelectionFallbackWarning` (which comes from
|
|
@@ -37,6 +38,8 @@ export type StyleConfiguratorNotice = Readonly<{
|
|
|
37
38
|
}>;
|
|
38
39
|
export type SelectionSnapshot = Readonly<{
|
|
39
40
|
siteStyleId: SiteStyleId;
|
|
41
|
+
headerLookId: HeaderLookId | null;
|
|
42
|
+
footerLookId: FooterLookId | null;
|
|
40
43
|
buttonPersonalityId: ButtonPersonalityId;
|
|
41
44
|
paletteVariantId: PaletteVariantId;
|
|
42
45
|
paletteOverrides: PaletteOverrides | null;
|
|
@@ -60,6 +63,7 @@ export type StyleConfiguratorState = Readonly<{
|
|
|
60
63
|
expandedRow: StyleConfiguratorExpandedRow;
|
|
61
64
|
}>;
|
|
62
65
|
export declare function createStyleConfiguratorState(base: SelectionSnapshot): StyleConfiguratorState;
|
|
66
|
+
export declare function openRow(state: StyleConfiguratorState, row: Exclude<StyleConfiguratorExpandedRow, null>): StyleConfiguratorState;
|
|
63
67
|
/**
|
|
64
68
|
* True iff the user has previewed a change that hasn't been applied yet.
|
|
65
69
|
* Drives the "Apply" / "Cancel" footer visibility and the live-preview
|
|
@@ -68,6 +72,8 @@ export declare function createStyleConfiguratorState(base: SelectionSnapshot): S
|
|
|
68
72
|
export declare function isPreviewingChange(state: StyleConfiguratorState): boolean;
|
|
69
73
|
export declare function previewSiteStyle(state: StyleConfiguratorState, siteStyleId: SiteStyleId): StyleConfiguratorState;
|
|
70
74
|
export declare function previewButtonPersonality(state: StyleConfiguratorState, buttonPersonalityId: ButtonPersonalityId): StyleConfiguratorState;
|
|
75
|
+
export declare function previewHeaderLook(state: StyleConfiguratorState, headerLookId: HeaderLookId | null): StyleConfiguratorState;
|
|
76
|
+
export declare function previewFooterLook(state: StyleConfiguratorState, footerLookId: FooterLookId | null): StyleConfiguratorState;
|
|
71
77
|
export declare function previewPaletteVariant(state: StyleConfiguratorState, paletteVariantId: PaletteVariantId): StyleConfiguratorState;
|
|
72
78
|
export declare function setPaletteOverrides(state: StyleConfiguratorState, paletteOverrides: PaletteOverrides | null): StyleConfiguratorState;
|
|
73
79
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const previewCustomizePillButtonClassName = "rounded-full bg-black/80 px-2.5 py-1 text-xs text-white shadow hover:bg-black";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type AppearancePresetId, type BoundaryOptionId, type DesignBlockId, type DesignBoundaryId, type LayoutVariantKey, type PageDesignEditorReadModel } from '@riverbankcms/theme-core/site-styles';
|
|
2
2
|
import { type HistoryState } from '@riverbankcms/content-editor';
|
|
3
3
|
import type { PreviewCustomizeAction } from '../blocks/previewCustomizeActions';
|
|
4
|
+
import type { SystemCustomizeFacetHistorySelection } from '@riverbankcms/blocks/system/customize/facets';
|
|
4
5
|
type PreviewLoadedEditorModel = PageDesignEditorReadModel;
|
|
5
6
|
export type PreviewCustomizeHistoryEntry = Readonly<{
|
|
6
7
|
kind: 'layout';
|
|
7
8
|
blockId: PreviewCustomizeActionBlockId;
|
|
8
|
-
baseContentId: string | null;
|
|
9
9
|
fromLayoutVariantKey: LayoutVariantKey;
|
|
10
10
|
toLayoutVariantKey: LayoutVariantKey;
|
|
11
11
|
}> | Readonly<{
|
|
@@ -14,6 +14,9 @@ export type PreviewCustomizeHistoryEntry = Readonly<{
|
|
|
14
14
|
fromAppearancePresetId: AppearancePresetId | null;
|
|
15
15
|
toAppearancePresetId: AppearancePresetId | null;
|
|
16
16
|
}> | Readonly<{
|
|
17
|
+
kind: 'block-facet';
|
|
18
|
+
blockId: PreviewCustomizeActionBlockId;
|
|
19
|
+
} & SystemCustomizeFacetHistorySelection> | Readonly<{
|
|
17
20
|
kind: 'boundary';
|
|
18
21
|
boundaryId: DesignBoundaryId;
|
|
19
22
|
previousBlockId: PreviewCustomizeActionBlockId;
|
|
@@ -35,7 +38,8 @@ export declare function replacePreviewCustomizeHistoryModel(state: PreviewCustom
|
|
|
35
38
|
export declare function undoPreviewCustomizeHistory(state: PreviewCustomizeHistoryState): PreviewCustomizeHistoryState;
|
|
36
39
|
export declare function redoPreviewCustomizeHistory(state: PreviewCustomizeHistoryState): PreviewCustomizeHistoryState;
|
|
37
40
|
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;
|
|
41
|
+
export declare function previewCustomizeUndoActionForEntry(entry: PreviewCustomizeHistoryEntry, editorModel: PreviewLoadedEditorModel): PreviewCustomizeAction;
|
|
42
|
+
export declare function previewCustomizeRedoActionForEntry(entry: PreviewCustomizeHistoryEntry, editorModel: PreviewLoadedEditorModel): PreviewCustomizeAction;
|
|
40
43
|
export declare function previewCustomizeHistoryPresentEquals(left: PreviewCustomizeHistoryPresent, right: PreviewCustomizeHistoryPresent): boolean;
|
|
44
|
+
export declare function contentRevisionIdForBlock(editorModel: PreviewLoadedEditorModel, blockId: PreviewCustomizeActionBlockId): string | null;
|
|
41
45
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { PageDesignEditorReadModel } from '@riverbankcms/theme-core/site-styles/previewCompiler';
|
|
2
2
|
import type { DesignBlockId } from '@riverbankcms/theme-core/site-styles';
|
|
3
3
|
import type { PreviewCustomizeAction } from '../blocks/previewCustomizeActions';
|
|
4
4
|
export type PreviewEditorRuntimeContent = Record<string, unknown>;
|
|
@@ -8,6 +8,14 @@ export type PreviewCustomizeRuntimePatch = Readonly<{
|
|
|
8
8
|
nextContent: PreviewEditorRuntimeContent;
|
|
9
9
|
rollback: (currentContent: PreviewEditorRuntimeContent) => PreviewEditorRuntimeContent;
|
|
10
10
|
}>;
|
|
11
|
+
export type PreviewCustomizeActionDomain = Readonly<{
|
|
12
|
+
kind: 'block-content-write';
|
|
13
|
+
}> | Readonly<{
|
|
14
|
+
kind: 'page-design-write';
|
|
15
|
+
}> | Readonly<{
|
|
16
|
+
kind: 'render-only-preview';
|
|
17
|
+
}>;
|
|
18
|
+
export declare function classifyPreviewCustomizeActionDomain(action: PreviewCustomizeAction): PreviewCustomizeActionDomain;
|
|
11
19
|
export declare function derivePreviewCustomizeRuntimePatch(input: Readonly<{
|
|
12
20
|
action: PreviewCustomizeAction;
|
|
13
21
|
editorModel: PageDesignEditorReadModel;
|
|
@@ -20,6 +20,9 @@ export type PreviewPageDesignEditorState = Readonly<{
|
|
|
20
20
|
export type PreviewPageDesignEditorApplyOutcome = Readonly<{
|
|
21
21
|
kind: 'saved';
|
|
22
22
|
response: ApplyPageDesignEditorActionResponse;
|
|
23
|
+
}> | Readonly<{
|
|
24
|
+
kind: 'queued';
|
|
25
|
+
message: string;
|
|
23
26
|
}> | Readonly<{
|
|
24
27
|
kind: 'skipped';
|
|
25
28
|
reason: PreviewCustomizeSkipReason;
|
|
@@ -37,10 +40,14 @@ export type PreviewPageDesignEditorApplyOutcome = Readonly<{
|
|
|
37
40
|
export type PreviewCustomizeSkipReason = 'disabled' | 'missing-page' | 'not-loaded' | 'mutation-pending' | 'stale' | 'no-history-entry' | 'cannot-undo' | 'cannot-redo';
|
|
38
41
|
export type PreviewCustomizeMutationState = Readonly<{
|
|
39
42
|
kind: 'idle';
|
|
43
|
+
}> | Readonly<{
|
|
44
|
+
kind: 'dirty';
|
|
45
|
+
actions: readonly PreviewCustomizePendingAction[];
|
|
40
46
|
}> | Readonly<{
|
|
41
47
|
kind: 'applying';
|
|
42
48
|
action: PreviewCustomizeAction;
|
|
43
49
|
historyEntry: PreviewCustomizeHistoryEntry | null;
|
|
50
|
+
queuedActions: readonly PreviewCustomizePendingAction[];
|
|
44
51
|
}> | Readonly<{
|
|
45
52
|
kind: 'undoing';
|
|
46
53
|
action: PreviewCustomizeAction;
|
|
@@ -72,6 +79,10 @@ export type PreviewCustomizeWorkflowState = Readonly<{
|
|
|
72
79
|
history: PreviewCustomizeHistoryState;
|
|
73
80
|
mutation: PreviewCustomizeMutationState;
|
|
74
81
|
}>;
|
|
82
|
+
type PreviewCustomizePendingAction = Readonly<{
|
|
83
|
+
action: PreviewCustomizeAction;
|
|
84
|
+
historyEntry: PreviewCustomizeHistoryEntry | null;
|
|
85
|
+
}>;
|
|
75
86
|
export type PreviewCustomizeBeginResult = Readonly<{
|
|
76
87
|
kind: 'started';
|
|
77
88
|
state: PreviewCustomizeWorkflowState;
|
|
@@ -87,6 +98,7 @@ export declare function failedPreviewCustomizeWorkflowState(message: string): Pr
|
|
|
87
98
|
export declare function previewCustomizeLoadSucceeded(pageState: ApiPageDesignEditorStateResponse): PreviewCustomizeWorkflowState;
|
|
88
99
|
export declare function previewCustomizeWorkflowPageState(workflow: PreviewCustomizeWorkflowState): PreviewPageDesignEditorState;
|
|
89
100
|
export declare function beginPreviewCustomizeApply(workflow: PreviewCustomizeWorkflowState, action: PreviewCustomizeAction): PreviewCustomizeBeginResult;
|
|
101
|
+
export declare function beginPreviewCustomizeAutosave(workflow: PreviewCustomizeWorkflowState): PreviewCustomizeBeginResult;
|
|
90
102
|
export declare function beginPreviewCustomizeUndo(workflow: PreviewCustomizeWorkflowState): PreviewCustomizeBeginResult;
|
|
91
103
|
export declare function beginPreviewCustomizeRedo(workflow: PreviewCustomizeWorkflowState): PreviewCustomizeBeginResult;
|
|
92
104
|
export declare function confirmPreviewCustomizeMutation(workflow: PreviewCustomizeWorkflowState, response: ApplyPageDesignEditorActionResponse): PreviewCustomizeWorkflowState;
|
|
@@ -103,4 +115,5 @@ export declare function applyPreviewCustomizeActionToState(state: PreviewPageDes
|
|
|
103
115
|
export declare function skippedPreviewCustomizeOutcome(reason: PreviewCustomizeSkipReason): Extract<PreviewPageDesignEditorApplyOutcome, {
|
|
104
116
|
kind: 'skipped';
|
|
105
117
|
}>;
|
|
118
|
+
export declare function previewCustomizePendingActions(workflow: PreviewCustomizeWorkflowState): readonly PreviewCustomizeAction[];
|
|
106
119
|
export {};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { PreviewSidebarTab } from '@riverbankcms/content-editor';
|
|
2
2
|
export type { PreviewSidebarTab };
|
|
3
|
+
export type PreviewDesignRow = 'header' | 'footer';
|
|
4
|
+
export type PreviewSidebarOpenRequest = Readonly<{
|
|
5
|
+
tab: PreviewSidebarTab;
|
|
6
|
+
designRow?: PreviewDesignRow;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function parsePreviewSidebarOpenRequestDetail(detail: unknown): PreviewSidebarOpenRequest;
|
|
3
9
|
export declare function getPreviewSidebarTab(): PreviewSidebarTab;
|
|
4
10
|
export declare function setPreviewSidebarTab(tab: PreviewSidebarTab): void;
|
|
5
|
-
export declare function requestPreviewSidebarOpen(
|
|
6
|
-
export declare function onPreviewSidebarOpenRequest(handler: (
|
|
11
|
+
export declare function requestPreviewSidebarOpen(input: PreviewSidebarTab | PreviewSidebarOpenRequest): void;
|
|
12
|
+
export declare function onPreviewSidebarOpenRequest(handler: (request: PreviewSidebarOpenRequest) => void): () => void;
|