@riverbankcms/sdk 0.76.0 → 0.77.1
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/{PreviewEditorSidebar-X2HWXFOL.mjs → PreviewEditorSidebar-DVUG7GK4.mjs} +1019 -442
- package/dist/{PreviewEditorUI-AQXIXPOH.mjs → PreviewEditorUI-P7RN4CDS.mjs} +2 -2
- package/dist/SdkPreviewModeRuntime-KLPX47SE.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +538 -20
- package/dist/_dts/api/src/contentRuntime.d.ts +5 -0
- package/dist/_dts/api/src/siteAssets.d.ts +1 -0
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +26 -2
- package/dist/_dts/block-form/src/blockDraftSaveability.d.ts +28 -0
- package/dist/_dts/block-form/src/client/index.d.ts +2 -2
- package/dist/_dts/block-form/src/index.d.ts +2 -1
- package/dist/_dts/block-form/src/widgets/DateField/dateFieldSchema.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/DateTimeField/dateTimeFieldSchema.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/TimeField/timeFieldSchema.d.ts +1 -1
- package/dist/_dts/blocks/src/PageRenderer.d.ts +10 -10
- package/dist/_dts/blocks/src/client/site-chrome.d.ts +22 -0
- package/dist/_dts/blocks/src/customBlockRegistry.d.ts +57 -0
- package/dist/_dts/blocks/src/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +20 -2
- package/dist/_dts/blocks/src/system/blocks/feature-cards.d.ts +25 -0
- package/dist/_dts/blocks/src/system/blocks/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/intro.d.ts +24 -0
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +3 -34
- package/dist/_dts/blocks/src/system/blocks/site-header.d.ts +2 -2
- package/dist/_dts/blocks/src/system/constants/blockKinds.d.ts +1 -1
- package/dist/_dts/blocks/src/system/fields/aspectRatio.d.ts +30 -0
- package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +4 -1
- package/dist/_dts/blocks/src/system/fields/ctas.d.ts +7 -0
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +16 -2
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/multi-step/runtimeFormValidation.d.ts +28 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/accordion.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/accordion.server.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/accordionIconTreatment.d.ts +5 -0
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +5 -4
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +2 -1
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +2 -0
- package/dist/_dts/content-editor/src/hooks/blockDraftLifecycle.d.ts +48 -0
- package/dist/_dts/content-editor/src/hooks/invalidBlockSelectors.d.ts +4 -0
- package/dist/_dts/content-editor/src/hooks/publishability.d.ts +47 -0
- package/dist/_dts/content-editor/src/index.d.ts +1 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +20 -0
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/block-editor/customBlockRegistry.d.ts +2 -0
- package/dist/_dts/editor-blocks/src/block-editor/sdkBlockMerger.d.ts +9 -37
- package/dist/_dts/editor-blocks/src/index.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/index.d.ts +3 -0
- package/dist/_dts/preview-next/src/client/layout/PreviewLayoutContext.d.ts +5 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewDesignCoordinatorContext.d.ts +20 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +7 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +7 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +7 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewThemedSiteDocument.d.ts +18 -0
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +20 -3
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +6 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +14 -4
- package/dist/_dts/preview-next/src/client/preview/previewDesignCoordinator.d.ts +73 -0
- package/dist/_dts/preview-next/src/client/preview/siteChromeLookRows.d.ts +12 -4
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +46 -0
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +6 -1
- package/dist/_dts/preview-next/src/client/preview/typographySelectionInput.d.ts +14 -0
- package/dist/_dts/preview-next/src/client/sdk/SdkPreviewModeRuntime.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/style.d.ts +8 -0
- package/dist/_dts/sdk/src/client/management/types.d.ts +6 -1
- package/dist/_dts/sdk/src/client/types.d.ts +9 -0
- package/dist/_dts/sdk/src/client.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +35 -0
- package/dist/_dts/sdk/src/contracts/theme.d.ts +1 -1
- package/dist/_dts/sdk/src/index.d.ts +2 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -0
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +2 -2
- package/dist/_dts/sdk/src/types/block-kinds.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +15 -0
- package/dist/_dts/theme-core/src/buttons/personalities/earth-pill.d.ts +16 -0
- package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +11 -0
- package/dist/_dts/theme-core/src/fonts/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +72 -27
- package/dist/_dts/theme-core/src/palette/variants/index.d.ts +15 -0
- package/dist/_dts/theme-core/src/palette/variants/warm-neutral.d.ts +16 -0
- package/dist/_dts/theme-core/src/schema.d.ts +306 -30
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +81 -0
- package/dist/_dts/theme-core/src/site-styles/appearancePresetTypes.d.ts +6 -4
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +81 -0
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +119 -3
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/footerLooks.d.ts +13 -0
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -2
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +402 -13
- package/dist/_dts/theme-core/src/site-styles/headerOpeningSection.d.ts +6 -0
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +2 -0
- package/dist/_dts/theme-core/src/site-styles/persistedIdParseResult.d.ts +9 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +20 -4
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +74 -2
- package/dist/_dts/theme-core/src/site-styles/typographyPresets.d.ts +189 -0
- package/dist/{chunk-Q4OLG66B.mjs → chunk-2SPENC5M.mjs} +476 -153
- package/dist/{chunk-Z7JLNTJR.mjs → chunk-6SMUFTXD.mjs} +2 -1
- package/dist/{chunk-TW2Y4RR5.mjs → chunk-IENWFSLO.mjs} +365 -52
- package/dist/{chunk-LYI7TEMH.mjs → chunk-KWJPDZH2.mjs} +4682 -1463
- package/dist/{chunk-V5VORNEJ.mjs → chunk-ZYEJLCTN.mjs} +1 -1
- package/dist/cli/index.mjs +2314 -267
- package/dist/client/{accordion-2YHIBOZH.mjs → accordion-RZMQSYLR.mjs} +1 -1
- package/dist/client/{bookingForm-35IBDWAS.mjs → bookingForm-NF4ASVNV.mjs} +2 -2
- package/dist/client/bookings.mjs +92 -0
- package/dist/client/{carousel-K6XG7NZQ.mjs → carousel-LDX47ZIK.mjs} +1 -1
- package/dist/client/{cart-HCFYUTTU.mjs → cart-RGXDS5F4.mjs} +3 -3
- package/dist/client/{checkout-J3U4XR7K.mjs → checkout-P7WWSNNY.mjs} +3 -3
- package/dist/client/{chunk-BOIHIU7E.mjs → chunk-E2TDNXCL.mjs} +1 -1
- package/dist/client/{chunk-PFBX3IQL.mjs → chunk-GMVTOKYG.mjs} +2 -2
- package/dist/client/{chunk-FGUIVT2B.mjs → chunk-JNC7CGHX.mjs} +1 -1
- package/dist/client/{chunk-SNSWVZEP.mjs → chunk-L3DNHIJX.mjs} +3 -3
- package/dist/client/{chunk-7UOSCYY4.mjs → chunk-R56FQ3RR.mjs} +92 -0
- package/dist/client/{chunk-J227A3CQ.mjs → chunk-UFSWADAO.mjs} +1 -1
- package/dist/client/client.mjs +3579 -1351
- package/dist/client/{courseRegistration-ZBXS7VGI.mjs → courseRegistration-7F65K5ZR.mjs} +2 -2
- package/dist/client/{eventCalendar-EQQZHJBA.mjs → eventCalendar-GLSC5KTL.mjs} +4 -4
- package/dist/client/{eventCombined-JCFTGBFQ.mjs → eventCombined-ZHK4WKUR.mjs} +4 -4
- package/dist/client/{eventDetails-HLUTQSYY.mjs → eventDetails-E3PJYBIN.mjs} +4 -4
- package/dist/client/{eventListing-FG4MICVB.mjs → eventListing-EMS3WC3E.mjs} +4 -4
- package/dist/client/{eventRegistration-GUEB7LBT.mjs → eventRegistration-NZOTVNPI.mjs} +4 -4
- package/dist/client/{form-YQEW4YIT.mjs → form-ETFZFATW.mjs} +1 -1
- package/dist/client/{headerSection-GTR3TTRM.mjs → headerSection-4LBP7ULT.mjs} +2 -2
- package/dist/client/hooks.mjs +2226 -402
- package/dist/client/{locationMap-SPC7VGUH.mjs → locationMap-5M655YSJ.mjs} +1 -1
- package/dist/client/{newsletterForm-4IW5BLID.mjs → newsletterForm-QOUYW44O.mjs} +1 -1
- package/dist/client/{productDetail-KP5H2WJO.mjs → productDetail-O4DOCWQG.mjs} +3 -3
- package/dist/client/{productList-3M3M72XZ.mjs → productList-A5RO5WIS.mjs} +3 -3
- package/dist/client/rendering/client.mjs +198 -32
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +3573 -1355
- package/dist/client/{shop-ACQKVGOM.mjs → shop-L4MZH4I2.mjs} +3 -3
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/{sdk-runtime-K7HNB4U2.mjs → sdk-runtime-6UT2S7KZ.mjs} +5 -5
- package/dist/server/components.mjs +3497 -1333
- package/dist/server/config-validation.mjs +2229 -402
- package/dist/server/config.mjs +2229 -402
- package/dist/server/data.mjs +2226 -402
- package/dist/server/index.mjs +31 -2
- package/dist/server/next.mjs +3503 -1329
- package/dist/server/page-converter.mjs +2213 -403
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3497 -1333
- package/dist/server/rendering.mjs +3497 -1333
- package/dist/server/routing.mjs +2250 -363
- package/dist/server/server.mjs +2243 -400
- package/dist/server/theme-bridge.mjs +1313 -1035
- package/dist/server/theme.mjs +237 -12
- package/dist/styles/index.css +1081 -1028
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-ZQNDCASH.mjs +0 -8
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type FieldValidationIssue } from '../../../manifest/fieldValidation';
|
|
2
|
+
import type { StepValidationResult } from './types';
|
|
3
|
+
import type { FormField } from './DynamicFormFields';
|
|
4
|
+
type RuntimeSpecificFormValidationIssue = Readonly<{
|
|
5
|
+
kind: 'tooShort';
|
|
6
|
+
fieldId: string;
|
|
7
|
+
label: string;
|
|
8
|
+
minimum: number;
|
|
9
|
+
}>;
|
|
10
|
+
export type RuntimeFormValidationIssue = Readonly<{
|
|
11
|
+
kind: 'canonical';
|
|
12
|
+
issue: FieldValidationIssue;
|
|
13
|
+
}> | RuntimeSpecificFormValidationIssue;
|
|
14
|
+
export type RuntimeFormValidationResult = Readonly<{
|
|
15
|
+
valid: true;
|
|
16
|
+
issues: readonly [];
|
|
17
|
+
}> | Readonly<{
|
|
18
|
+
valid: false;
|
|
19
|
+
issues: readonly RuntimeFormValidationIssue[];
|
|
20
|
+
}>;
|
|
21
|
+
export declare function validateRuntimeFormField(field: FormField, value: unknown): RuntimeFormValidationResult;
|
|
22
|
+
export declare function getRuntimeFormFieldError(field: FormField, value: unknown): string | null;
|
|
23
|
+
export declare function validateRuntimeFormFields(fields: readonly FormField[], data: Readonly<Record<string, unknown>>): StepValidationResult;
|
|
24
|
+
export declare function listRuntimeFormValidationIssues(field: FormField, value: unknown): readonly RuntimeFormValidationIssue[];
|
|
25
|
+
export declare function runtimeFormIssueToMessage(issue: RuntimeFormValidationIssue): string;
|
|
26
|
+
export declare function isRuntimeFormValueMissing(field: FormField, value: unknown): boolean;
|
|
27
|
+
export declare function coerceRuntimeNumberValue(value: unknown): number | null;
|
|
28
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type AccordionIcon } from '../../../../../theme-core/src/accordions/types';
|
|
3
|
+
import type { AccordionIconTreatment } from '../../../../../theme-core/src/site-styles/index';
|
|
3
4
|
type AccordionNodeBaseProps = {
|
|
4
5
|
children?: React.ReactNode;
|
|
5
6
|
className?: string;
|
|
@@ -31,6 +32,7 @@ export type AccordionItemNodeProps = {
|
|
|
31
32
|
question?: unknown;
|
|
32
33
|
answer?: unknown;
|
|
33
34
|
iconStyle?: AccordionIcon | null;
|
|
35
|
+
iconTreatment?: AccordionIconTreatment | null;
|
|
34
36
|
blockId?: string | null;
|
|
35
37
|
blockKind?: string | null;
|
|
36
38
|
blockContent?: unknown;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type AccordionIcon } from '../../../../../theme-core/src/accordions/types';
|
|
3
|
+
import type { AccordionIconTreatment } from '../../../../../theme-core/src/site-styles/index';
|
|
3
4
|
type AccordionNodeProps = {
|
|
4
5
|
blockId?: string | null;
|
|
5
6
|
children?: React.ReactNode;
|
|
@@ -17,6 +18,7 @@ type AccordionItemNodeProps = {
|
|
|
17
18
|
question?: unknown;
|
|
18
19
|
answer?: unknown;
|
|
19
20
|
iconStyle?: AccordionIcon | null;
|
|
21
|
+
iconTreatment?: AccordionIconTreatment | null;
|
|
20
22
|
};
|
|
21
23
|
export declare const AccordionItemNodeSSR: React.FC<AccordionItemNodeProps>;
|
|
22
24
|
export default AccordionNodeSSR;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type AccordionIcon } from '../../../../../theme-core/src/accordions/types';
|
|
2
|
+
import type { AccordionIconTreatment } from '../../../../../theme-core/src/site-styles/index';
|
|
3
|
+
import type { CSSProperties } from 'react';
|
|
4
|
+
export declare function resolveAccordionIconStyle(iconStyle: AccordionIcon | null | undefined, iconTreatment: AccordionIconTreatment | null | undefined): AccordionIcon;
|
|
5
|
+
export declare function accordionIconColorStyle(iconTreatment: AccordionIconTreatment | null | undefined): CSSProperties | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
import type { ThemeHeader } from
|
|
3
|
-
import type { ThemeTokens } from
|
|
4
|
-
import { type TransformDefinition } from
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { ThemeHeader } from '../../../../../theme-core/src/schema';
|
|
3
|
+
import type { ThemeTokens } from '../../theme';
|
|
4
|
+
import { type TransformDefinition } from './core';
|
|
5
5
|
declare const maxWidthClassSchema: z.ZodObject<{
|
|
6
6
|
base: z.ZodOptional<z.ZodString>;
|
|
7
7
|
container: z.ZodOptional<z.ZodString>;
|
|
@@ -67,6 +67,7 @@ declare const footerRootClassSchema: z.ZodObject<{
|
|
|
67
67
|
}, z.core.$strip>;
|
|
68
68
|
export declare const footerRootClassTransform: TransformDefinition<z.infer<typeof footerRootClassSchema>>;
|
|
69
69
|
export declare const headerRootStyleTransform: TransformDefinition;
|
|
70
|
+
export declare const headerSectionBackgroundTransform: TransformDefinition;
|
|
70
71
|
export declare const footerRootStyleTransform: TransformDefinition;
|
|
71
72
|
declare const footerBottomBarClassSchema: z.ZodObject<{
|
|
72
73
|
base: z.ZodOptional<z.ZodString>;
|
|
@@ -25,6 +25,7 @@ export declare const transformDefinitions: {
|
|
|
25
25
|
transparent?: string | undefined;
|
|
26
26
|
}>;
|
|
27
27
|
readonly "layout.headerRootStyle": TransformDefinition;
|
|
28
|
+
readonly "layout.headerSectionBackground": TransformDefinition;
|
|
28
29
|
readonly "layout.footerRootStyle": TransformDefinition;
|
|
29
30
|
readonly "layout.footerBottomBarClass": TransformDefinition<{
|
|
30
31
|
base?: string | undefined;
|
|
@@ -111,7 +112,7 @@ export declare function bindProp(from: string, opts?: {
|
|
|
111
112
|
readonly $bind: {
|
|
112
113
|
readonly pick?: "value" | "collection" | "context" | undefined;
|
|
113
114
|
readonly fallback?: {} | null | undefined;
|
|
114
|
-
readonly transforms?: TransformStep<"date.formatShort" | "boxStyles.semanticGap" | "boxStyles.semanticGapValue" | "ui.twoColumnContainerClass" | "ui.twoColumnFlexBasis" | "ui.sectionStateTone" | "string.uppercase" | "value.fallback" | "value.csv" | "layout.maxWidthClass" | "layout.headerRootClass" | "layout.footerRootClass" | "layout.headerRootStyle" | "layout.footerRootStyle" | "ui.headerNavLinkClass" | "ui.headingClassFromAlignment" | "ui.bodyClassFromAlignment" | "ui.stackAlignFromAlignment" | "ui.heroContentWrapperClass" | "ui.heroCtaJustify" | "ui.heroStackJustifyFromVerticalAlignment" | "ui.heroGridClassFromVerticalAlignment" | "ui.conditionalClass" | "media.fromUrl" | "content.interpolateRichTextTokens" | "layout.footerBottomBarClass" | "layout.footerBottomBarContainerClass" | "layout.footerBottomBarStyle" | "layout.footerSplitNavSingleClass" | "layout.footerSplitMainClass" | "layout.footerLogoClass" | "layout.footerLogoMediaClass" | "layout.footerLogoTextVisible">[] | undefined;
|
|
115
|
+
readonly transforms?: TransformStep<"date.formatShort" | "boxStyles.semanticGap" | "boxStyles.semanticGapValue" | "ui.twoColumnContainerClass" | "ui.twoColumnFlexBasis" | "ui.sectionStateTone" | "string.uppercase" | "value.fallback" | "value.csv" | "layout.maxWidthClass" | "layout.headerRootClass" | "layout.footerRootClass" | "layout.headerRootStyle" | "layout.headerSectionBackground" | "layout.footerRootStyle" | "ui.headerNavLinkClass" | "ui.headingClassFromAlignment" | "ui.bodyClassFromAlignment" | "ui.stackAlignFromAlignment" | "ui.heroContentWrapperClass" | "ui.heroCtaJustify" | "ui.heroStackJustifyFromVerticalAlignment" | "ui.heroGridClassFromVerticalAlignment" | "ui.conditionalClass" | "media.fromUrl" | "content.interpolateRichTextTokens" | "layout.footerBottomBarClass" | "layout.footerBottomBarContainerClass" | "layout.footerBottomBarStyle" | "layout.footerSplitNavSingleClass" | "layout.footerSplitMainClass" | "layout.footerLogoClass" | "layout.footerLogoMediaClass" | "layout.footerLogoTextVisible">[] | undefined;
|
|
115
116
|
readonly from: string;
|
|
116
117
|
};
|
|
117
118
|
};
|
|
@@ -6,6 +6,7 @@ import { type PublishOptions } from "../hooks/useEntryActions";
|
|
|
6
6
|
import { type ApiClient } from "../services";
|
|
7
7
|
import type { DraftWorkflowStatus } from "../types";
|
|
8
8
|
import { type EditorUiState } from "../ui/editorUiStore";
|
|
9
|
+
import type { ResolveBlockManifest } from "../ui/blockValidationView";
|
|
9
10
|
export type EntryControllerBlocksSlice = {
|
|
10
11
|
list: BlockItem[];
|
|
11
12
|
status: "idle" | "loading" | "error";
|
|
@@ -81,6 +82,7 @@ type BaseInternalProps = {
|
|
|
81
82
|
initialPublishedContent?: Record<string, unknown> | null;
|
|
82
83
|
onEntryUpdated?: (response: unknown) => void;
|
|
83
84
|
historyShortcutsEnabled?: boolean;
|
|
85
|
+
resolveBlockManifest?: ResolveBlockManifest;
|
|
84
86
|
};
|
|
85
87
|
type PageInternalProps = BaseInternalProps & {
|
|
86
88
|
kind: "page";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { BlockDraftSaveability } from "../../../block-form/src/blockDraftSaveability";
|
|
2
|
+
import type { EditorBlockId } from "../../../core/src/index";
|
|
3
|
+
import type { AutosaveStatusValue } from "../ui/stores/types";
|
|
4
|
+
import type { EditorDraftSnapshot } from "../ui/editorHistory";
|
|
5
|
+
type CurrentEditorDraftSnapshot = EditorDraftSnapshot & {
|
|
6
|
+
current: NonNullable<EditorDraftSnapshot["current"]>;
|
|
7
|
+
};
|
|
8
|
+
export type BlockDraftLifecycle = Readonly<{
|
|
9
|
+
kind: "baseline";
|
|
10
|
+
blockId: EditorBlockId;
|
|
11
|
+
}> | Readonly<{
|
|
12
|
+
kind: "validPending";
|
|
13
|
+
blockId: EditorBlockId;
|
|
14
|
+
version: number;
|
|
15
|
+
}> | Readonly<{
|
|
16
|
+
kind: "invalidPending";
|
|
17
|
+
blockId: EditorBlockId;
|
|
18
|
+
issues: BlockDraftSaveability["issues"];
|
|
19
|
+
}> | Readonly<{
|
|
20
|
+
kind: "saving";
|
|
21
|
+
blockId: EditorBlockId;
|
|
22
|
+
version: number;
|
|
23
|
+
}> | Readonly<{
|
|
24
|
+
kind: "saveFailed";
|
|
25
|
+
blockId: EditorBlockId;
|
|
26
|
+
error: string;
|
|
27
|
+
issues: BlockDraftSaveability["issues"];
|
|
28
|
+
}>;
|
|
29
|
+
export type BlockDraftAutosaveDecision = Readonly<{
|
|
30
|
+
type: "save";
|
|
31
|
+
blockId: EditorBlockId;
|
|
32
|
+
data: Record<string, unknown>;
|
|
33
|
+
acknowledgedVersion: number;
|
|
34
|
+
}> | Readonly<{
|
|
35
|
+
type: "skip";
|
|
36
|
+
blockId: EditorBlockId;
|
|
37
|
+
reason: "baseline" | "invalid" | "saving" | "saveFailed";
|
|
38
|
+
}>;
|
|
39
|
+
export declare function deriveBlockDraftLifecycle(input: Readonly<{
|
|
40
|
+
snapshot: EditorDraftSnapshot;
|
|
41
|
+
saveability: BlockDraftSaveability;
|
|
42
|
+
autosaveStatus?: AutosaveStatusValue;
|
|
43
|
+
}>): BlockDraftLifecycle;
|
|
44
|
+
export declare function deriveBlockDraftAutosaveDecision(input: Readonly<{
|
|
45
|
+
snapshot: CurrentEditorDraftSnapshot;
|
|
46
|
+
lifecycle: BlockDraftLifecycle;
|
|
47
|
+
}>): BlockDraftAutosaveDecision;
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BlockDraftSaveability } from "../../../block-form/src/blockDraftSaveability";
|
|
2
|
+
import type { EditorUiState } from "../ui/editorUiStore";
|
|
3
|
+
export declare function isInvalidSaveability(saveability: BlockDraftSaveability): boolean;
|
|
4
|
+
export declare function selectHasInvalidBlocks(state: Pick<EditorUiState, "blockValidation" | "drafts">): boolean;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { AutosaveStatus } from "../ui/stores/types";
|
|
2
|
+
import type { EditorUnpublishedState } from "../controller/deriveEditorUnpublishedState";
|
|
3
|
+
import { type BlockedPublishPlan } from "./blockedPublishPlan";
|
|
4
|
+
import type { BlockValidationError } from "./validateBlocksForPublish";
|
|
5
|
+
export type PublishDisabledReason = "noUnpublishedChanges" | "invalidBlocks" | "invalidBlockSummary" | "autosaveFailed";
|
|
6
|
+
export type PublishabilityPlan = Readonly<{
|
|
7
|
+
kind: "allowed";
|
|
8
|
+
canPublish: true;
|
|
9
|
+
disablePublish: false;
|
|
10
|
+
blockedPublishPlan: Extract<BlockedPublishPlan, {
|
|
11
|
+
type: "allowed";
|
|
12
|
+
}>;
|
|
13
|
+
}> | Readonly<{
|
|
14
|
+
kind: "blocked";
|
|
15
|
+
canPublish: false;
|
|
16
|
+
disablePublish: true;
|
|
17
|
+
reason: "invalidBlocks";
|
|
18
|
+
blockedPublishPlan: Extract<BlockedPublishPlan, {
|
|
19
|
+
type: "blocked";
|
|
20
|
+
}>;
|
|
21
|
+
}> | Readonly<{
|
|
22
|
+
kind: "blocked";
|
|
23
|
+
canPublish: false;
|
|
24
|
+
disablePublish: true;
|
|
25
|
+
reason: Exclude<PublishDisabledReason, "invalidBlocks">;
|
|
26
|
+
blockedPublishPlan: Extract<BlockedPublishPlan, {
|
|
27
|
+
type: "allowed";
|
|
28
|
+
}>;
|
|
29
|
+
}>;
|
|
30
|
+
export type PublishabilityAutosaveState = Readonly<{
|
|
31
|
+
metadata: AutosaveStatus;
|
|
32
|
+
content: AutosaveStatus;
|
|
33
|
+
blocks: AutosaveStatus;
|
|
34
|
+
}>;
|
|
35
|
+
export type DerivePublishabilityInput = Readonly<{
|
|
36
|
+
unpublishedState: EditorUnpublishedState;
|
|
37
|
+
validationErrors: readonly BlockValidationError[];
|
|
38
|
+
/**
|
|
39
|
+
* Toolbar/status-bar shortcut used when block validation has already derived
|
|
40
|
+
* invalid blocks but does not have field-level publish errors/focus commands.
|
|
41
|
+
*/
|
|
42
|
+
hasInvalidBlockSummary?: boolean;
|
|
43
|
+
drawerOpen: boolean;
|
|
44
|
+
autosave?: PublishabilityAutosaveState;
|
|
45
|
+
includeAutosaveFailures?: boolean;
|
|
46
|
+
}>;
|
|
47
|
+
export declare function derivePublishability(input: DerivePublishabilityInput): PublishabilityPlan;
|
|
@@ -6,6 +6,7 @@ export { useStoreAutosave, type StoreAutosaveConfig, type AutosaveScope } from '
|
|
|
6
6
|
export { useBlockAutosave, type BlockAutosaveOptions } from './hooks/useBlockAutosave';
|
|
7
7
|
export { useEntryActions, type EntryActionsOptions } from './hooks/useEntryActions';
|
|
8
8
|
export { useReactiveToolbar } from './hooks/useReactiveToolbar';
|
|
9
|
+
export { isInvalidSaveability, selectHasInvalidBlocks } from './hooks/invalidBlockSelectors';
|
|
9
10
|
export { useHistoryShortcuts } from './hooks/useHistoryShortcuts';
|
|
10
11
|
export { validateAllBlocks, type BlockValidationError } from './hooks/validateBlocksForPublish';
|
|
11
12
|
export { EntryControllerProvider, useEntryEditorController, useEntryController, useAutosave, useEntryUiStore, } from './controller/EntryControllerProvider';
|
|
@@ -13253,7 +13253,9 @@ export type Database = {
|
|
|
13253
13253
|
button_personality_id: string | null;
|
|
13254
13254
|
created_at: string;
|
|
13255
13255
|
footer_look_id: string | null;
|
|
13256
|
+
header_layout_id: string | null;
|
|
13256
13257
|
header_look_id: string | null;
|
|
13258
|
+
header_style_id: string | null;
|
|
13257
13259
|
id: string;
|
|
13258
13260
|
is_current: boolean;
|
|
13259
13261
|
overrides: Json;
|
|
@@ -13262,6 +13264,9 @@ export type Database = {
|
|
|
13262
13264
|
site_id: string;
|
|
13263
13265
|
style_selection_version: number;
|
|
13264
13266
|
theme_id: string;
|
|
13267
|
+
typography_body_font_override: string | null;
|
|
13268
|
+
typography_heading_font_override: string | null;
|
|
13269
|
+
typography_preset_id: string | null;
|
|
13265
13270
|
updated_at: string;
|
|
13266
13271
|
user_id: string;
|
|
13267
13272
|
};
|
|
@@ -13269,7 +13274,9 @@ export type Database = {
|
|
|
13269
13274
|
button_personality_id?: string | null;
|
|
13270
13275
|
created_at?: string;
|
|
13271
13276
|
footer_look_id?: string | null;
|
|
13277
|
+
header_layout_id?: string | null;
|
|
13272
13278
|
header_look_id?: string | null;
|
|
13279
|
+
header_style_id?: string | null;
|
|
13273
13280
|
id?: string;
|
|
13274
13281
|
is_current?: boolean;
|
|
13275
13282
|
overrides?: Json;
|
|
@@ -13278,6 +13285,9 @@ export type Database = {
|
|
|
13278
13285
|
site_id: string;
|
|
13279
13286
|
style_selection_version?: number;
|
|
13280
13287
|
theme_id: string;
|
|
13288
|
+
typography_body_font_override?: string | null;
|
|
13289
|
+
typography_heading_font_override?: string | null;
|
|
13290
|
+
typography_preset_id?: string | null;
|
|
13281
13291
|
updated_at?: string;
|
|
13282
13292
|
user_id: string;
|
|
13283
13293
|
};
|
|
@@ -13285,7 +13295,9 @@ export type Database = {
|
|
|
13285
13295
|
button_personality_id?: string | null;
|
|
13286
13296
|
created_at?: string;
|
|
13287
13297
|
footer_look_id?: string | null;
|
|
13298
|
+
header_layout_id?: string | null;
|
|
13288
13299
|
header_look_id?: string | null;
|
|
13300
|
+
header_style_id?: string | null;
|
|
13289
13301
|
id?: string;
|
|
13290
13302
|
is_current?: boolean;
|
|
13291
13303
|
overrides?: Json;
|
|
@@ -13294,6 +13306,9 @@ export type Database = {
|
|
|
13294
13306
|
site_id?: string;
|
|
13295
13307
|
style_selection_version?: number;
|
|
13296
13308
|
theme_id?: string;
|
|
13309
|
+
typography_body_font_override?: string | null;
|
|
13310
|
+
typography_heading_font_override?: string | null;
|
|
13311
|
+
typography_preset_id?: string | null;
|
|
13297
13312
|
updated_at?: string;
|
|
13298
13313
|
user_id?: string;
|
|
13299
13314
|
};
|
|
@@ -15069,12 +15084,17 @@ export type Database = {
|
|
|
15069
15084
|
p_base_selection_version: number;
|
|
15070
15085
|
p_button_personality_id: string;
|
|
15071
15086
|
p_footer_look_id: string;
|
|
15087
|
+
p_header_layout_id?: string;
|
|
15072
15088
|
p_header_look_id: string;
|
|
15089
|
+
p_header_style_id?: string;
|
|
15073
15090
|
p_palette_overrides: Json;
|
|
15074
15091
|
p_palette_variant_id: string;
|
|
15075
15092
|
p_selection_id?: string;
|
|
15076
15093
|
p_site_id: string;
|
|
15077
15094
|
p_theme: Json;
|
|
15095
|
+
p_typography_body_font_override?: string;
|
|
15096
|
+
p_typography_heading_font_override?: string;
|
|
15097
|
+
p_typography_preset_id?: string;
|
|
15078
15098
|
};
|
|
15079
15099
|
Returns: {
|
|
15080
15100
|
outcome: string;
|
|
@@ -4,7 +4,7 @@ import { type ApiClient } from '../../api/src/request';
|
|
|
4
4
|
import { type Theme } from '../../blocks/src/index';
|
|
5
5
|
import type { PageDesignEditorReadModel } from '../../theme-core/src/site-styles/index';
|
|
6
6
|
import { type EditorStructuralCommand } from '../../core/src/index';
|
|
7
|
-
import { type SdkConfigForBlockPicker } from './block-editor/sdkBlockMerger';
|
|
7
|
+
import { type CustomBlockRegistryEntry, type SdkConfigForBlockPicker } from './block-editor/sdkBlockMerger';
|
|
8
8
|
import { type BlockActionControlMode } from './block-editor/actionControlMode';
|
|
9
9
|
import { type ReorderControlMode } from './block-editor/reorderControlMode';
|
|
10
10
|
import type { ArrayKeysManager, BlockEditorHandle, BlockItem, BlockFocusRequest, UiSlice, DraftsSlice } from './block-editor/types';
|
|
@@ -52,6 +52,7 @@ export type BlockEditorProps = {
|
|
|
52
52
|
pageDesignEditorModel?: PageDesignEditorReadModel | null;
|
|
53
53
|
enabledContentTypes?: string[];
|
|
54
54
|
sdkConfig?: SdkConfigForBlockPicker | null;
|
|
55
|
+
customBlocks?: readonly CustomBlockRegistryEntry[];
|
|
55
56
|
reorderControlMode?: ReorderControlMode;
|
|
56
57
|
actionControlMode?: BlockActionControlMode;
|
|
57
58
|
};
|
|
@@ -2,7 +2,7 @@ import { type ComponentProps } from 'react';
|
|
|
2
2
|
import { type Theme } from '../../../blocks/src/index';
|
|
3
3
|
import type { PageDesignEditorBlock } from '../../../theme-core/src/site-styles/index';
|
|
4
4
|
import type { BlockFocusRequest, BlockItem } from './types';
|
|
5
|
-
import { type SdkConfigForBlockPicker } from './sdkBlockMerger';
|
|
5
|
+
import { type CustomBlockRegistryEntry, type SdkConfigForBlockPicker } from './sdkBlockMerger';
|
|
6
6
|
import { BlockCard } from './BlockCard';
|
|
7
7
|
import type { FieldWidgetComponent } from '../../../block-form/src/client/index';
|
|
8
8
|
import { type BlockActionControlMode } from './actionControlMode';
|
|
@@ -28,6 +28,7 @@ export declare const SortableBlockItem: import("react").NamedExoticComponent<{
|
|
|
28
28
|
widgetOverrides?: Record<string, FieldWidgetComponent>;
|
|
29
29
|
uiStore: ComponentProps<typeof BlockCard>["uiStore"];
|
|
30
30
|
sdkConfig?: SdkConfigForBlockPicker | null;
|
|
31
|
+
customBlocks?: readonly CustomBlockRegistryEntry[];
|
|
31
32
|
hideThemeV2RawStyleFields?: boolean;
|
|
32
33
|
pageDesignBlock?: PageDesignEditorBlock | null;
|
|
33
34
|
reorderControlMode?: ReorderControlMode;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { createCustomBlockRegistry, mergeBlockDescriptorsWithRegistry, transformSdkBlockToDefinition, transformSdkBlockToManifest, transformToBlockDescriptor, } from '../../../blocks/src/index';
|
|
2
|
+
export type { CustomBlockManifestSource, CustomBlockRegistry, CustomBlockRegistryEntry, ResolvedCustomBlockManifest, SdkConfigForBlockPicker, } from '../../../blocks/src/index';
|
|
@@ -1,42 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Custom block registry helpers for block picker/editor lookup.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* Uses centralized transform functions from @riverbankcms/blocks to avoid duplication.
|
|
4
|
+
* The historical public file name is kept for package compatibility, but the
|
|
5
|
+
* implementation now resolves SDK-config fallback blocks and DB-backed custom
|
|
6
|
+
* block records through one registry contract.
|
|
8
7
|
*/
|
|
9
8
|
import type { BlockDescriptor, BlockManifest, SdkCustomBlock } from '../../../blocks/src/index';
|
|
10
|
-
import {
|
|
9
|
+
import { createCustomBlockRegistry, mergeBlockDescriptorsWithRegistry, transformSdkBlockToDefinition, transformSdkBlockToManifest, transformToBlockDescriptor, type CustomBlockRegistryEntry, type SdkConfigForBlockPicker } from './customBlockRegistry';
|
|
10
|
+
export type { CustomBlockManifestSource, CustomBlockRegistry, CustomBlockRegistryEntry, ResolvedCustomBlockManifest, SdkConfigForBlockPicker, } from './customBlockRegistry';
|
|
11
11
|
export type { SdkCustomBlock } from '../../../blocks/src/index';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export type SdkConfigForBlockPicker = {
|
|
16
|
-
customBlocks?: SdkCustomBlock[];
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Transforms an SDK custom block into a BlockDescriptor for the block picker.
|
|
20
|
-
*/
|
|
21
|
-
declare function transformToBlockDescriptor(sdkBlock: SdkCustomBlock): BlockDescriptor;
|
|
22
|
-
/**
|
|
23
|
-
* Merges system block descriptors with SDK and DB custom blocks.
|
|
24
|
-
*
|
|
25
|
-
* Custom blocks are appended to the list. If there's a name conflict,
|
|
26
|
-
* earlier sources take precedence (system > SDK > DB).
|
|
27
|
-
*
|
|
28
|
-
* @param systemBlocks - Block descriptors from listBlockDescriptors()
|
|
29
|
-
* @param sdkConfig - SDK site configuration (may be null)
|
|
30
|
-
* @param dbCustomBlocks - DB-loaded custom blocks for frontend sites (optional)
|
|
31
|
-
* @returns Merged list of block descriptors
|
|
32
|
-
*/
|
|
33
|
-
export declare function mergeBlockDescriptors(systemBlocks: BlockDescriptor[], sdkConfig: SdkConfigForBlockPicker | null, dbCustomBlocks?: SdkCustomBlock[]): BlockDescriptor[];
|
|
34
|
-
/**
|
|
35
|
-
* Gets the BlockManifest for a given block kind.
|
|
36
|
-
*
|
|
37
|
-
* Checks SDK custom blocks first, then DB custom blocks if provided.
|
|
38
|
-
* Falls back to undefined (caller should use getBlockDefinition()).
|
|
39
|
-
*/
|
|
40
|
-
export declare function getBlockManifestFromSdkConfig(blockKind: string, sdkConfig: SdkConfigForBlockPicker | null, dbCustomBlocks?: SdkCustomBlock[]): BlockManifest | undefined;
|
|
41
|
-
export { transformSdkBlockToManifest, transformSdkBlockToDefinition };
|
|
42
|
-
export { transformToBlockDescriptor };
|
|
12
|
+
export declare function mergeBlockDescriptors(systemBlocks: BlockDescriptor[], sdkConfig: SdkConfigForBlockPicker | null, dbCustomBlocks?: SdkCustomBlock[] | readonly CustomBlockRegistryEntry[]): BlockDescriptor[];
|
|
13
|
+
export declare function getBlockManifestFromSdkConfig(blockKind: string, sdkConfig: SdkConfigForBlockPicker | null, dbCustomBlocks?: SdkCustomBlock[] | readonly CustomBlockRegistryEntry[]): BlockManifest | undefined;
|
|
14
|
+
export { createCustomBlockRegistry, mergeBlockDescriptorsWithRegistry, transformSdkBlockToManifest, transformSdkBlockToDefinition, transformToBlockDescriptor, };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { BlockEditor } from './BlockEditor';
|
|
2
2
|
export type { BlockEditorProps } from './BlockEditor';
|
|
3
|
-
export { mergeBlockDescriptors, getBlockManifestFromSdkConfig, transformSdkBlockToManifest, transformSdkBlockToDefinition, transformToBlockDescriptor, } from './block-editor/sdkBlockMerger';
|
|
4
|
-
export type { SdkCustomBlock, SdkConfigForBlockPicker } from './block-editor/sdkBlockMerger';
|
|
3
|
+
export { createCustomBlockRegistry, mergeBlockDescriptorsWithRegistry, mergeBlockDescriptors, getBlockManifestFromSdkConfig, transformSdkBlockToManifest, transformSdkBlockToDefinition, transformToBlockDescriptor, } from './block-editor/sdkBlockMerger';
|
|
4
|
+
export type { CustomBlockManifestSource, CustomBlockRegistry, CustomBlockRegistryEntry, ResolvedCustomBlockManifest, SdkCustomBlock, SdkConfigForBlockPicker, } from './block-editor/sdkBlockMerger';
|
|
5
5
|
export type { BlockEditorHandle, BlockFocusRequest, BlockFocusTarget, BlockItem, } from './block-editor/types';
|
|
6
6
|
export { useBlockListContext, useBlockListContextOptional, BlockListProvider } from './block-editor/BlockListContext';
|
|
7
7
|
export type { BlockListContextValue } from './block-editor/BlockListContext';
|
|
@@ -20,6 +20,9 @@ export type { PreviewBlock, PreviewContentEntryData, PreviewPageMetadata, } from
|
|
|
20
20
|
export { PreviewEntryControllerProvider } from "./preview/PreviewEntryControllerProvider";
|
|
21
21
|
export { PAGE_CONTENT_TYPE_SCHEMA } from "./preview/pageSchema";
|
|
22
22
|
export { PreviewThemeOverlayProvider, usePreviewThemeOverlay, } from "./preview/themeOverlay";
|
|
23
|
+
export type { PreviewDesignCommand, PreviewDesignIgnoredReason, PreviewDesignProducer, PreviewDesignState, PreviewDesignSurface, PreviewDesignTransition, PreviewThemeOverlayEffect, } from "./preview/previewDesignCoordinator";
|
|
24
|
+
export { NO_PREVIEW_DESIGN_STATE, transitionPreviewDesignState, } from "./preview/previewDesignCoordinator";
|
|
25
|
+
export { PreviewDesignCoordinatorProvider, usePreviewDesignCoordinator, } from "./preview/PreviewDesignCoordinatorContext";
|
|
23
26
|
export type { PreviewEditorSidebarProps, PreviewEditorSidebarTab, PreviewEntryData, PreviewTemplateData, } from "./preview/PreviewEditorSidebar";
|
|
24
27
|
export { PreviewEditorSidebar } from "./preview/PreviewEditorSidebar";
|
|
25
28
|
export { PreviewAuthInit } from "./preview/PreviewAuthInit";
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
+
import type { SiteChromeRenderModel } from '../../../../blocks/src/client/site-chrome';
|
|
2
3
|
type PreviewLayoutContextValue = Readonly<{
|
|
3
4
|
headerNode: ReactNode;
|
|
4
5
|
bannerNode?: ReactNode;
|
|
5
6
|
footerNode: ReactNode;
|
|
7
|
+
siteChromeRenderModel?: SiteChromeRenderModel | null;
|
|
6
8
|
}> | null;
|
|
7
|
-
export declare function PreviewLayoutProvider({ headerNode, bannerNode, footerNode, children, }: {
|
|
9
|
+
export declare function PreviewLayoutProvider({ headerNode, bannerNode, footerNode, siteChromeRenderModel, children, }: {
|
|
8
10
|
headerNode: ReactNode;
|
|
9
11
|
bannerNode?: ReactNode;
|
|
10
12
|
footerNode: ReactNode;
|
|
13
|
+
siteChromeRenderModel?: SiteChromeRenderModel | null;
|
|
11
14
|
children: ReactNode;
|
|
12
15
|
}): import("react/jsx-runtime").JSX.Element;
|
|
13
16
|
export declare function usePreviewLayout(): Readonly<{
|
|
14
17
|
headerNode: ReactNode;
|
|
15
18
|
bannerNode?: ReactNode;
|
|
16
19
|
footerNode: ReactNode;
|
|
20
|
+
siteChromeRenderModel?: SiteChromeRenderModel | null;
|
|
17
21
|
}>;
|
|
18
22
|
export declare function useOptionalPreviewLayout(): PreviewLayoutContextValue;
|
|
19
23
|
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { Theme } from '../../../../blocks/src/index';
|
|
3
|
+
import type { Rfc6902Op } from '../utils/rfc6902';
|
|
4
|
+
import { type PreviewDesignCommand, type PreviewDesignProducer, type PreviewDesignState, type PreviewDesignSurface, type PreviewDesignTransition } from './previewDesignCoordinator';
|
|
5
|
+
import { type PreviewThemeOverlay } from './themeOverlay';
|
|
6
|
+
export type PreviewDesignCoordinatorContextValue = Readonly<{
|
|
7
|
+
state: PreviewDesignState;
|
|
8
|
+
overlay: PreviewThemeOverlay;
|
|
9
|
+
dispatch: (command: PreviewDesignCommand) => PreviewDesignTransition;
|
|
10
|
+
previewTheme: (producer: PreviewDesignProducer, theme: Theme, sourcePlan: Exclude<PreviewDesignSurface, 'theme-json-patch'>) => PreviewDesignTransition;
|
|
11
|
+
previewThemePatch: (producer: PreviewDesignProducer, ops: readonly Rfc6902Op[]) => PreviewDesignTransition;
|
|
12
|
+
clearPreview: (producer: PreviewDesignProducer) => PreviewDesignTransition;
|
|
13
|
+
applyStarted: (producer: PreviewDesignProducer) => PreviewDesignTransition;
|
|
14
|
+
applySucceeded: (producer: PreviewDesignProducer) => PreviewDesignTransition;
|
|
15
|
+
applyFailed: (producer: PreviewDesignProducer) => PreviewDesignTransition;
|
|
16
|
+
}>;
|
|
17
|
+
export declare function PreviewDesignCoordinatorProvider({ children }: {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function usePreviewDesignCoordinator(): PreviewDesignCoordinatorContextValue;
|
|
@@ -7,7 +7,7 @@ import { type ContentTypeSchema } from "../../../../content-model/src/index";
|
|
|
7
7
|
import { type ZoomLevel } from "../../../../content-editor/src/index";
|
|
8
8
|
import type { ButtonPersonalityId } from "../../../../theme-core/src/buttons/index";
|
|
9
9
|
import type { PaletteOverrides, PaletteVariantId } from "../../../../theme-core/src/palette/index";
|
|
10
|
-
import type { FooterSelectionContext, FooterLookId, HeaderSelectionContext, HeaderLookId } from "../../../../theme-core/src/site-styles/index";
|
|
10
|
+
import type { FooterSelectionContext, FooterLookId, HeaderLayoutId, HeaderSelectionContext, HeaderLookId, HeaderStyleId, TypographyPresetId } from "../../../../theme-core/src/site-styles/index";
|
|
11
11
|
import type { PreviewDesignRow } from "./sidebarTabPreference";
|
|
12
12
|
import type { ViewportMode, ViewportWidth } from "./PreviewViewportControls";
|
|
13
13
|
import { type SiteStyleAccess } from "./siteStyleAccess";
|
|
@@ -39,6 +39,11 @@ export type PreviewEditorSidebarProps = {
|
|
|
39
39
|
themeSelectionButtonPersonalityId?: ButtonPersonalityId | null;
|
|
40
40
|
themeSelectionPaletteVariantId?: PaletteVariantId | null;
|
|
41
41
|
themeSelectionPaletteOverrides?: PaletteOverrides | null;
|
|
42
|
+
themeSelectionHeaderLayoutId?: HeaderLayoutId | null;
|
|
43
|
+
themeSelectionHeaderStyleId?: HeaderStyleId | null;
|
|
44
|
+
themeSelectionTypographyPresetId?: TypographyPresetId | null;
|
|
45
|
+
themeSelectionTypographyBodyFontOverride?: string | null;
|
|
46
|
+
themeSelectionTypographyHeadingFontOverride?: string | null;
|
|
42
47
|
themeSelectionHeaderLookId?: HeaderLookId | null;
|
|
43
48
|
themeSelectionFooterLookId?: FooterLookId | null;
|
|
44
49
|
themeSelectionHeaderContext?: Partial<HeaderSelectionContext>;
|
|
@@ -65,4 +70,4 @@ export type PreviewEditorSidebarProps = {
|
|
|
65
70
|
onViewportWidthChange: (width: ViewportWidth) => void;
|
|
66
71
|
onZoomChange: (zoom: ZoomLevel) => void;
|
|
67
72
|
};
|
|
68
|
-
export declare function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, theme, themeId, themeSelectionId, themeSelectionVersion, themeSelectionUpdatedAt, 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;
|
|
73
|
+
export declare function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, theme, themeId, themeSelectionId, themeSelectionVersion, themeSelectionUpdatedAt, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, themeSelectionHeaderLayoutId, themeSelectionHeaderStyleId, themeSelectionTypographyPresetId, themeSelectionTypographyBodyFontOverride, themeSelectionTypographyHeadingFontOverride, 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,7 +2,7 @@ import { type ComponentProps, type ReactNode } from "react";
|
|
|
2
2
|
import { BlockApiProvider } from "../../../../blocks/src/client";
|
|
3
3
|
import type { ButtonPersonalityId } from "../../../../theme-core/src/buttons/index";
|
|
4
4
|
import type { PaletteOverrides, PaletteVariantId } from "../../../../theme-core/src/palette/index";
|
|
5
|
-
import type { FooterSelectionContext, FooterLookId, HeaderSelectionContext, HeaderLookId } from "../../../../theme-core/src/site-styles/index";
|
|
5
|
+
import type { FooterSelectionContext, FooterLookId, HeaderLayoutId, HeaderSelectionContext, HeaderLookId, HeaderStyleId, TypographyPresetId } from "../../../../theme-core/src/site-styles/index";
|
|
6
6
|
import type { EntrySubrouteContextData, MediaAssetIndexItem, Theme } from "../../../../blocks/src/index";
|
|
7
7
|
import type { ContentTypeSchema } from "../../../../content-model/src/index";
|
|
8
8
|
import type { SdkConfigForBlockPicker } from "../../../../editor-blocks/src/index";
|
|
@@ -44,6 +44,11 @@ export type PreviewShellProps = {
|
|
|
44
44
|
themeSelectionButtonPersonalityId?: ButtonPersonalityId | null;
|
|
45
45
|
themeSelectionPaletteVariantId?: PaletteVariantId | null;
|
|
46
46
|
themeSelectionPaletteOverrides?: PaletteOverrides | null;
|
|
47
|
+
themeSelectionHeaderLayoutId?: HeaderLayoutId | null;
|
|
48
|
+
themeSelectionHeaderStyleId?: HeaderStyleId | null;
|
|
49
|
+
themeSelectionTypographyPresetId?: TypographyPresetId | null;
|
|
50
|
+
themeSelectionTypographyBodyFontOverride?: string | null;
|
|
51
|
+
themeSelectionTypographyHeadingFontOverride?: string | null;
|
|
47
52
|
themeSelectionHeaderLookId?: HeaderLookId | null;
|
|
48
53
|
themeSelectionFooterLookId?: FooterLookId | null;
|
|
49
54
|
themeSelectionHeaderContext?: Partial<HeaderSelectionContext>;
|
|
@@ -69,7 +74,7 @@ export type PreviewShellProps = {
|
|
|
69
74
|
designEditorEligibility?: PreviewDesignEditorEligibility;
|
|
70
75
|
baseFetch?: BaseFetch;
|
|
71
76
|
};
|
|
72
|
-
export declare function PreviewShell({ children, apiBaseUrl, blockApiConfig, siteId, siteSlug, editableId, previewSession, previewToken, dashboardBaseUrl, surfaceId, theme, themeId, themeSelectionId, themeSelectionVersion, themeSelectionUpdatedAt, 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;
|
|
77
|
+
export declare function PreviewShell({ children, apiBaseUrl, blockApiConfig, siteId, siteSlug, editableId, previewSession, previewToken, dashboardBaseUrl, surfaceId, theme, themeId, themeSelectionId, themeSelectionVersion, themeSelectionUpdatedAt, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, themeSelectionHeaderLayoutId, themeSelectionHeaderStyleId, themeSelectionTypographyPresetId, themeSelectionTypographyBodyFontOverride, themeSelectionTypographyHeadingFontOverride, 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;
|
|
73
78
|
export declare function defaultDesignEditorEligibility(input: Readonly<{
|
|
74
79
|
pageId: string | null;
|
|
75
80
|
entryData?: PreviewContentEntryData | null;
|
|
@@ -2,7 +2,7 @@ import { type ReactNode } from "react";
|
|
|
2
2
|
import { type EntrySubrouteContextData, type MediaAssetIndexItem, type Theme } from "../../../../blocks/src/index";
|
|
3
3
|
import type { ButtonPersonalityId } from "../../../../theme-core/src/buttons/index";
|
|
4
4
|
import type { PaletteOverrides, PaletteVariantId } from "../../../../theme-core/src/palette/index";
|
|
5
|
-
import type { FooterSelectionContext, HeaderSelectionContext, FooterLookId, HeaderLookId } from "../../../../theme-core/src/site-styles/index";
|
|
5
|
+
import type { FooterSelectionContext, HeaderSelectionContext, FooterLookId, HeaderLayoutId, HeaderLookId, HeaderStyleId, TypographyPresetId } from "../../../../theme-core/src/site-styles/index";
|
|
6
6
|
import type { ContentTypeSchema } from "../../../../content-model/src/index";
|
|
7
7
|
import type { ApiClient } from "../../../../api/src/request";
|
|
8
8
|
import type { SdkConfigForBlockPicker } from "../../../../editor-blocks/src/index";
|
|
@@ -30,6 +30,11 @@ export type PreviewShellLayoutProps = {
|
|
|
30
30
|
themeSelectionButtonPersonalityId?: ButtonPersonalityId | null;
|
|
31
31
|
themeSelectionPaletteVariantId?: PaletteVariantId | null;
|
|
32
32
|
themeSelectionPaletteOverrides?: PaletteOverrides | null;
|
|
33
|
+
themeSelectionHeaderLayoutId?: HeaderLayoutId | null;
|
|
34
|
+
themeSelectionHeaderStyleId?: HeaderStyleId | null;
|
|
35
|
+
themeSelectionTypographyPresetId?: TypographyPresetId | null;
|
|
36
|
+
themeSelectionTypographyBodyFontOverride?: string | null;
|
|
37
|
+
themeSelectionTypographyHeadingFontOverride?: string | null;
|
|
33
38
|
themeSelectionHeaderLookId?: HeaderLookId | null;
|
|
34
39
|
themeSelectionFooterLookId?: FooterLookId | null;
|
|
35
40
|
themeSelectionHeaderContext?: Partial<HeaderSelectionContext>;
|
|
@@ -44,4 +49,4 @@ export type PreviewShellLayoutProps = {
|
|
|
44
49
|
useThemeScope?: boolean;
|
|
45
50
|
siteStyleAccess?: SiteStyleAccess;
|
|
46
51
|
};
|
|
47
|
-
export declare function PreviewShellLayout({ children, theme, surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, apiClient, bearerToken, themeId, themeSelectionId, themeSelectionVersion, themeSelectionUpdatedAt, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, themeSelectionFooterContext, supabaseUrl, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, useThemeScope, siteStyleAccess, }: PreviewShellLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export declare function PreviewShellLayout({ children, theme, surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, apiClient, bearerToken, themeId, themeSelectionId, themeSelectionVersion, themeSelectionUpdatedAt, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, themeSelectionHeaderLayoutId, themeSelectionHeaderStyleId, themeSelectionTypographyPresetId, themeSelectionTypographyBodyFontOverride, themeSelectionTypographyHeadingFontOverride, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, themeSelectionFooterContext, supabaseUrl, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, useThemeScope, siteStyleAccess, }: PreviewShellLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { type ReactElement, type ReactNode } from "react";
|
|
2
|
+
import { type SiteChromeRenderModel } from "../../../../blocks/src/client/site-chrome";
|
|
3
|
+
import type { ViewportMode } from "./PreviewViewportControls";
|
|
4
|
+
export declare function PreviewThemedSiteDocument({ children, useThemeScope, useContainerResponsiveMode, viewportMode, viewportWidth, scale, contentHeight, scaleContainerRef, contentRef, staticHeaderNode, bannerNode, staticFooterNode, siteChromeRenderModel, }: {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
useThemeScope: boolean;
|
|
7
|
+
useContainerResponsiveMode: boolean;
|
|
8
|
+
viewportMode: ViewportMode;
|
|
9
|
+
viewportWidth: number | "full";
|
|
10
|
+
scale: number;
|
|
11
|
+
contentHeight: number;
|
|
12
|
+
scaleContainerRef: (node: HTMLDivElement | null) => void;
|
|
13
|
+
contentRef: React.RefObject<HTMLDivElement | null>;
|
|
14
|
+
staticHeaderNode: ReactNode;
|
|
15
|
+
bannerNode: ReactNode;
|
|
16
|
+
staticFooterNode: ReactNode;
|
|
17
|
+
siteChromeRenderModel: SiteChromeRenderModel | null;
|
|
18
|
+
}): ReactElement | null;
|