@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
|
@@ -351,6 +351,11 @@ export type SiteBySlugResponse = {
|
|
|
351
351
|
selectionButtonPersonalityId?: string | null;
|
|
352
352
|
selectionPaletteVariantId?: string | null;
|
|
353
353
|
selectionPaletteOverrides?: Record<string, string> | null;
|
|
354
|
+
selectionHeaderLayoutId?: string | null;
|
|
355
|
+
selectionHeaderStyleId?: string | null;
|
|
356
|
+
selectionTypographyPresetId?: string | null;
|
|
357
|
+
selectionTypographyBodyFontOverride?: string | null;
|
|
358
|
+
selectionTypographyHeadingFontOverride?: string | null;
|
|
354
359
|
selectionHeaderLookId?: string | null;
|
|
355
360
|
selectionFooterLookId?: string | null;
|
|
356
361
|
navigation: NavigationMenuWithItems[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SystemCustomizeFacetSelection, Theme } from '../../blocks/src/index';
|
|
2
2
|
import type { ListMediaAssetsResult, MediaAssetWithLabels } from '@riverbankcms/media-storage-supabase';
|
|
3
3
|
import type { DbJson } from '../../db/src/index';
|
|
4
|
-
import type { PageDesignEditorReadModel, PageDesignIntent, AppearancePresetId, BoundaryOptionId, DesignBlockId, FooterLookId, HeaderLookId, LayoutVariantKey, SiteStyleId } from '../../theme-core/src/site-styles/index';
|
|
4
|
+
import type { PageDesignEditorReadModel, PageDesignIntent, AppearancePresetId, BoundaryOptionId, DesignBlockId, FooterLookId, HeaderLayoutId, HeaderLookId, HeaderStyleId, LayoutVariantKey, SiteStyleId, TypographyPresetId } from '../../theme-core/src/site-styles/index';
|
|
5
5
|
import type { ButtonPersonalityId } from '../../theme-core/src/buttons/index';
|
|
6
6
|
import type { PaletteOverrides, PaletteVariantId } from '../../theme-core/src/palette/index';
|
|
7
7
|
import type { APIEndpoint } from './apiEndpointTypes';
|
|
@@ -23,6 +23,11 @@ export type SiteThemeSelectionsPayload = {
|
|
|
23
23
|
buttonPersonalityId?: ButtonPersonalityId | null;
|
|
24
24
|
paletteVariantId?: PaletteVariantId | null;
|
|
25
25
|
paletteOverrides?: PaletteOverrides | null;
|
|
26
|
+
headerLayoutId?: HeaderLayoutId | null;
|
|
27
|
+
headerStyleId?: HeaderStyleId | null;
|
|
28
|
+
typographyPresetId?: TypographyPresetId | null;
|
|
29
|
+
typographyBodyFontOverride?: string | null;
|
|
30
|
+
typographyHeadingFontOverride?: string | null;
|
|
26
31
|
headerLookId?: HeaderLookId | null;
|
|
27
32
|
footerLookId?: FooterLookId | null;
|
|
28
33
|
};
|
|
@@ -31,7 +36,12 @@ export type ApplySiteStyleSelectionBody = Readonly<{
|
|
|
31
36
|
buttonPersonalityId: ButtonPersonalityId | null;
|
|
32
37
|
paletteVariantId: PaletteVariantId | null;
|
|
33
38
|
paletteOverrides: PaletteOverrides | null;
|
|
39
|
+
typographyPresetId?: TypographyPresetId | null;
|
|
40
|
+
typographyBodyFontOverride?: string | null;
|
|
41
|
+
typographyHeadingFontOverride?: string | null;
|
|
34
42
|
headerLookId: HeaderLookId | null;
|
|
43
|
+
headerLayoutId?: HeaderLayoutId | null;
|
|
44
|
+
headerStyleId?: HeaderStyleId | null;
|
|
35
45
|
footerLookId: FooterLookId | null;
|
|
36
46
|
baseSelectionVersion: number;
|
|
37
47
|
selectionId?: string | null;
|
|
@@ -48,12 +58,19 @@ export type ApplySiteStyleSelectionResponse = Readonly<{
|
|
|
48
58
|
buttonPersonalityId: ButtonPersonalityId;
|
|
49
59
|
paletteVariantId: PaletteVariantId;
|
|
50
60
|
paletteOverrides: PaletteOverrides | null;
|
|
51
|
-
|
|
61
|
+
headerLayoutId: HeaderLayoutId;
|
|
62
|
+
headerStyleId: HeaderStyleId;
|
|
63
|
+
typographyPresetId: TypographyPresetId | null;
|
|
64
|
+
typographyBodyFontOverride: string | null;
|
|
65
|
+
typographyHeadingFontOverride: string | null;
|
|
66
|
+
headerLookId: HeaderLookId | null;
|
|
52
67
|
footerLookId: FooterLookId;
|
|
53
68
|
}>;
|
|
54
69
|
export type SaveSiteChromeLookSelectionBody = Readonly<{
|
|
55
70
|
surface: 'header';
|
|
56
71
|
lookId: HeaderLookId | null;
|
|
72
|
+
layoutId?: HeaderLayoutId | null;
|
|
73
|
+
styleId?: HeaderStyleId | null;
|
|
57
74
|
theme: Theme;
|
|
58
75
|
themeId?: string | null;
|
|
59
76
|
selectionId?: string | null;
|
|
@@ -74,6 +91,8 @@ export type SaveSiteChromeLookSelectionResponse = Readonly<{
|
|
|
74
91
|
savedAt: string;
|
|
75
92
|
theme: Theme;
|
|
76
93
|
headerLookId: HeaderLookId | null;
|
|
94
|
+
headerLayoutId: HeaderLayoutId | null;
|
|
95
|
+
headerStyleId: HeaderStyleId | null;
|
|
77
96
|
footerLookId: FooterLookId | null;
|
|
78
97
|
}>;
|
|
79
98
|
export type PageDesignRevisionToken = {
|
|
@@ -219,6 +238,11 @@ export type SiteRuntimeAPIEndpoints = {
|
|
|
219
238
|
buttonPersonalityId: ButtonPersonalityId | null;
|
|
220
239
|
paletteVariantId: PaletteVariantId | null;
|
|
221
240
|
paletteOverrides: PaletteOverrides | null;
|
|
241
|
+
headerLayoutId: HeaderLayoutId | null;
|
|
242
|
+
headerStyleId: HeaderStyleId | null;
|
|
243
|
+
typographyPresetId: TypographyPresetId | null;
|
|
244
|
+
typographyBodyFontOverride: string | null;
|
|
245
|
+
typographyHeadingFontOverride: string | null;
|
|
222
246
|
headerLookId: HeaderLookId | null;
|
|
223
247
|
footerLookId: FooterLookId | null;
|
|
224
248
|
}>;
|
|
@@ -25,6 +25,34 @@ export type BlockDraftSaveability = Readonly<{
|
|
|
25
25
|
issues: readonly BlockDraftValidationIssue[];
|
|
26
26
|
error: string;
|
|
27
27
|
}>;
|
|
28
|
+
export type BlockManifestResolution = Readonly<{
|
|
29
|
+
kind: 'builtinManifest';
|
|
30
|
+
blockKind: string;
|
|
31
|
+
manifest: BlockManifest;
|
|
32
|
+
}> | Readonly<{
|
|
33
|
+
kind: 'sdkCustomManifest';
|
|
34
|
+
blockKind: string;
|
|
35
|
+
manifest: BlockManifest;
|
|
36
|
+
}> | Readonly<{
|
|
37
|
+
kind: 'managedCustomManifest';
|
|
38
|
+
blockKind: string;
|
|
39
|
+
manifest: BlockManifest;
|
|
40
|
+
}> | Readonly<{
|
|
41
|
+
kind: 'unknownCustomBlock';
|
|
42
|
+
blockKind: string;
|
|
43
|
+
}> | Readonly<{
|
|
44
|
+
kind: 'unknownBuiltinBlock';
|
|
45
|
+
blockKind: string;
|
|
46
|
+
}> | Readonly<{
|
|
47
|
+
kind: 'invalidManifest';
|
|
48
|
+
blockKind: string;
|
|
49
|
+
source: 'sdkCustom' | 'managedCustom';
|
|
50
|
+
reason: string;
|
|
51
|
+
}>;
|
|
52
|
+
export declare function getResolvedBlockManifest(resolution: BlockManifestResolution): BlockManifest | null;
|
|
53
|
+
export declare function isResolvedBlockManifest(resolution: BlockManifestResolution): resolution is Extract<BlockManifestResolution, {
|
|
54
|
+
kind: 'builtinManifest' | 'sdkCustomManifest' | 'managedCustomManifest';
|
|
55
|
+
}>;
|
|
28
56
|
export declare const unfinishedBlockCopy: {
|
|
29
57
|
readonly title: "Fix this block to save it";
|
|
30
58
|
readonly description: "Some fields need a quick check. Your changes are safe here for now.";
|
|
@@ -8,8 +8,8 @@ export { createRHFBackend, createStoreBackend, useBackendWatch } from '../backen
|
|
|
8
8
|
export type { FormBackend, FieldError, FieldState, SetValueOptions } from '../backend/types';
|
|
9
9
|
export type { ManifestAdapterOptions, ManifestAdapterResult, ManifestFormSource, ManifestSchemaOptions, ManifestValidationResult, } from '../manifest/manifestFormAdapter';
|
|
10
10
|
export { createManifestValidation } from '../manifest/manifestFormAdapter';
|
|
11
|
-
export { formatPublishBlockedMessage, formatRecoveryConflictSummary, formatRecoveryConflictTitle, deriveBlockDraftSaveability, formatUnfinishedBlocksSummary, recoveryConflictCopy, shouldShowBlockFieldValidation, unfinishedBlockCopy, validateBlockManifest, validateBlockManifestIssues, validateBlockManifestValues, } from './blockDraftSaveability';
|
|
12
|
-
export type { BlockDraftSaveability, BlockDraftValidationIssue, BlockManifestValidationMode, } from './blockDraftSaveability';
|
|
11
|
+
export { formatPublishBlockedMessage, formatRecoveryConflictSummary, formatRecoveryConflictTitle, deriveBlockDraftSaveability, formatUnfinishedBlocksSummary, getResolvedBlockManifest, isResolvedBlockManifest, recoveryConflictCopy, shouldShowBlockFieldValidation, unfinishedBlockCopy, validateBlockManifest, validateBlockManifestIssues, validateBlockManifestValues, } from './blockDraftSaveability';
|
|
12
|
+
export type { BlockDraftSaveability, BlockDraftValidationIssue, BlockManifestResolution, BlockManifestValidationMode, } from './blockDraftSaveability';
|
|
13
13
|
export type { BaseFieldConfig, FieldConfig, TextFieldConfig, NumberFieldConfig, RichTextFieldConfig, MediaFieldConfig, FileFieldConfig, BooleanFieldConfig, DateFieldConfig, TimeFieldConfig, DateTimeFieldConfig, SlugFieldConfig, UrlFieldConfig, LinkFieldConfig, SelectFieldConfig, ReferenceFieldConfig, GroupFieldConfig, RepeaterFieldConfig, ButtonFieldConfig, ContentTypeSelectFieldConfig, EntryPickerFieldConfig, } from '../fields/types';
|
|
14
14
|
export { createManifestFormAdapter } from '../manifest/manifestFormAdapter';
|
|
15
15
|
export { PaletteProvider, usePalette } from '../palette/PaletteContext';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './client/index';
|
|
2
|
-
export { formatPublishBlockedMessage, formatRecoveryConflictSummary, formatRecoveryConflictTitle, formatUnfinishedBlocksSummary, recoveryConflictCopy, unfinishedBlockCopy, } from './blockDraftSaveability';
|
|
2
|
+
export { formatPublishBlockedMessage, formatRecoveryConflictSummary, formatRecoveryConflictTitle, formatUnfinishedBlocksSummary, getResolvedBlockManifest, isResolvedBlockManifest, recoveryConflictCopy, unfinishedBlockCopy, } from './blockDraftSaveability';
|
|
3
|
+
export type { BlockManifestResolution } from './blockDraftSaveability';
|
|
3
4
|
export { WIDGET_NAMES, type WidgetName } from './widgets';
|
|
4
5
|
export { WidgetField, WidgetFieldMessage } from './widgets';
|
|
5
6
|
export type { WidgetFieldProps, WidgetFieldMessageProps } from './widgets';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import type { ResolverContext } from
|
|
3
|
-
import type { PageOutline } from
|
|
4
|
-
import type { Theme } from
|
|
5
|
-
import type { SdkCustomBlock } from
|
|
6
|
-
import type { ThemeTokens } from
|
|
7
|
-
import type { RouteMap } from
|
|
8
|
-
import { type MediaAssetIndexItem, type ResolveImageUrlContext, type ResolveImageUrlContextInput } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ResolverContext } from './system';
|
|
3
|
+
import type { PageOutline } from './structure/schema';
|
|
4
|
+
import type { Theme } from '../../theme-core/src/schema';
|
|
5
|
+
import type { SdkCustomBlock } from './system/manifest/schema';
|
|
6
|
+
import type { ThemeTokens } from './system/theme';
|
|
7
|
+
import type { RouteMap } from './system/transforms';
|
|
8
|
+
import { type MediaAssetIndexItem, type ResolveImageUrlContext, type ResolveImageUrlContextInput } from './system/runtime/nodes/media';
|
|
9
9
|
/**
|
|
10
10
|
* Occurrence context for event pages.
|
|
11
11
|
* Passed through to blocks that need occurrence information (e.g., event-registration).
|
|
@@ -41,7 +41,7 @@ type PageRendererDataContext = {
|
|
|
41
41
|
siteId?: string;
|
|
42
42
|
pageId?: string;
|
|
43
43
|
resolvedData?: Record<string, Record<string, unknown>>;
|
|
44
|
-
previewStage?:
|
|
44
|
+
previewStage?: 'published' | 'preview';
|
|
45
45
|
routes?: RouteMap;
|
|
46
46
|
pagesByIdentifier?: Record<string, string>;
|
|
47
47
|
entriesByIdentifier?: Record<string, Record<string, string>>;
|
|
@@ -152,7 +152,7 @@ interface PageRendererProps {
|
|
|
152
152
|
dataContext?: PageRendererDataContext;
|
|
153
153
|
routeMap?: RouteMap;
|
|
154
154
|
wrapBlock?: (blockId: string, rendered: React.ReactNode) => React.ReactNode;
|
|
155
|
-
registry?: ResolverContext[
|
|
155
|
+
registry?: ResolverContext['registry'];
|
|
156
156
|
themeTokens?: ThemeTokens;
|
|
157
157
|
blockOverrides?: BlockOverrides;
|
|
158
158
|
sdkConfig?: SdkConfigForRenderer | null;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Theme } from '../../../theme-core/src/schema';
|
|
3
|
+
export type SiteChromeThemeConfigOverride = Readonly<{
|
|
4
|
+
header?: Partial<NonNullable<Theme['header']>>;
|
|
5
|
+
footer?: Partial<NonNullable<Theme['footer']>>;
|
|
6
|
+
}>;
|
|
7
|
+
export type SiteChromeBlockRenderSpec = Readonly<{
|
|
8
|
+
content: Record<string, unknown>;
|
|
9
|
+
viewModelOverrides: Record<string, unknown>;
|
|
10
|
+
themeConfigOverride?: SiteChromeThemeConfigOverride;
|
|
11
|
+
canRenderReactively?: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
export type SiteChromeRenderModel = Readonly<{
|
|
14
|
+
header: SiteChromeBlockRenderSpec;
|
|
15
|
+
footer: SiteChromeBlockRenderSpec;
|
|
16
|
+
}>;
|
|
17
|
+
export declare function renderSiteChromeBlock(model: SiteChromeRenderModel, surface: 'header' | 'footer', theme: Theme): ReactNode;
|
|
18
|
+
export declare function SiteChromeBlockRenderer({ model, surface, theme, }: {
|
|
19
|
+
model: SiteChromeRenderModel;
|
|
20
|
+
surface: 'header' | 'footer';
|
|
21
|
+
theme: Theme;
|
|
22
|
+
}): ReactNode;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { BlockDescriptor } from './system/registry';
|
|
2
|
+
import type { BlockManifest, SdkCustomBlock } from './system/manifest/schema';
|
|
3
|
+
import { transformSdkBlockToDefinition, transformSdkBlockToManifest } from './sdkBlockTransform';
|
|
4
|
+
export type SdkConfigForBlockPicker = {
|
|
5
|
+
customBlocks?: SdkCustomBlock[];
|
|
6
|
+
};
|
|
7
|
+
export type CustomBlockManifestSource = {
|
|
8
|
+
kind: 'sdk-config';
|
|
9
|
+
} | {
|
|
10
|
+
kind: 'sdk-synced';
|
|
11
|
+
syncedAt: string | null;
|
|
12
|
+
contentHash: string | null;
|
|
13
|
+
} | {
|
|
14
|
+
kind: 'managed-database';
|
|
15
|
+
};
|
|
16
|
+
export type CustomBlockSourcePolicy = {
|
|
17
|
+
kind: 'canonical-db-fallback-sdk';
|
|
18
|
+
};
|
|
19
|
+
export type CustomBlockConflictReason = 'db-canonical-sdk-fallback';
|
|
20
|
+
export type CustomBlockRegistryConflict = {
|
|
21
|
+
kind: 'conflict';
|
|
22
|
+
blockKind: `custom.${string}`;
|
|
23
|
+
winner: CustomBlockManifestSource;
|
|
24
|
+
loser: CustomBlockManifestSource;
|
|
25
|
+
reason: CustomBlockConflictReason;
|
|
26
|
+
};
|
|
27
|
+
export type CustomBlockRegistryEntry = {
|
|
28
|
+
manifest: SdkCustomBlock;
|
|
29
|
+
source: CustomBlockManifestSource;
|
|
30
|
+
};
|
|
31
|
+
export type ResolvedCustomBlockManifest = {
|
|
32
|
+
blockKind: `custom.${string}`;
|
|
33
|
+
manifest: BlockManifest;
|
|
34
|
+
source: CustomBlockManifestSource;
|
|
35
|
+
descriptor: BlockDescriptor;
|
|
36
|
+
};
|
|
37
|
+
export type CustomBlockRegistry = {
|
|
38
|
+
entries: readonly ResolvedCustomBlockManifest[];
|
|
39
|
+
conflicts: readonly CustomBlockRegistryConflict[];
|
|
40
|
+
findManifest: (blockKind: string) => ResolvedCustomBlockManifest | undefined;
|
|
41
|
+
};
|
|
42
|
+
export type CustomBlockRegistryInput = {
|
|
43
|
+
sdkConfig?: SdkConfigForBlockPicker | null;
|
|
44
|
+
customBlocks?: readonly CustomBlockRegistryEntry[];
|
|
45
|
+
policy?: CustomBlockSourcePolicy;
|
|
46
|
+
onConflict?: (message: string) => void;
|
|
47
|
+
};
|
|
48
|
+
export type CustomBlockRegistryResolutionPlan = {
|
|
49
|
+
policy: CustomBlockSourcePolicy;
|
|
50
|
+
entries: readonly ResolvedCustomBlockManifest[];
|
|
51
|
+
conflicts: readonly CustomBlockRegistryConflict[];
|
|
52
|
+
};
|
|
53
|
+
declare function transformToBlockDescriptor(sdkBlock: SdkCustomBlock, source?: BlockDescriptor['source']): BlockDescriptor;
|
|
54
|
+
export declare function planCustomBlockRegistryResolution({ sdkConfig, customBlocks, policy, }: Omit<CustomBlockRegistryInput, 'onConflict'>): CustomBlockRegistryResolutionPlan;
|
|
55
|
+
export declare function createCustomBlockRegistry({ sdkConfig, customBlocks, policy, onConflict, }: CustomBlockRegistryInput): CustomBlockRegistry;
|
|
56
|
+
export declare function mergeBlockDescriptorsWithRegistry(systemBlocks: readonly BlockDescriptor[], registry: CustomBlockRegistry, onConflict?: (message: string) => void): BlockDescriptor[];
|
|
57
|
+
export { transformSdkBlockToManifest, transformSdkBlockToDefinition, transformToBlockDescriptor, };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { default as PageRenderer } from './PageRenderer';
|
|
2
|
+
export { createCustomBlockRegistry, mergeBlockDescriptorsWithRegistry, planCustomBlockRegistryResolution, transformToBlockDescriptor, } from './customBlockRegistry';
|
|
3
|
+
export type { CustomBlockConflictReason, CustomBlockManifestSource, CustomBlockRegistry, CustomBlockRegistryConflict, CustomBlockRegistryEntry, CustomBlockRegistryResolutionPlan, CustomBlockSourcePolicy, ResolvedCustomBlockManifest, SdkConfigForBlockPicker, } from './customBlockRegistry';
|
|
2
4
|
export type { BlockOverrideComponent, BlockOverrideProps, BlockOverrides, EntrySubrouteContextData, OccurrenceContextData, SdkConfigForRenderer, } from './PageRenderer';
|
|
3
5
|
export * from './subroutes';
|
|
4
6
|
export * from './primitives/content/components/Button';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { SystemBlockDefinition } from "../registry";
|
|
2
|
-
import
|
|
2
|
+
import type { NodeDefinition } from "../node";
|
|
3
|
+
import { type CardStylesContent, type ContainerStylesContent, type SectionStylesContent } from "../fields/boxStyles";
|
|
3
4
|
export declare const faqManifest: import("..").DefinedBlockManifest<import("..").BlockContentShapeInput<{
|
|
4
5
|
readonly id: "block.faq";
|
|
5
6
|
readonly title: "FAQ";
|
|
@@ -30783,7 +30784,22 @@ export declare const faqManifest: import("..").DefinedBlockManifest<import("..")
|
|
|
30783
30784
|
id: "_cardStyles";
|
|
30784
30785
|
readonly __boxStyleType?: "card" | undefined;
|
|
30785
30786
|
}];
|
|
30786
|
-
readonly layout:
|
|
30787
|
+
readonly layout: NodeDefinition;
|
|
30788
|
+
readonly variants: {
|
|
30789
|
+
readonly default: NodeDefinition;
|
|
30790
|
+
readonly "two-column": NodeDefinition;
|
|
30791
|
+
};
|
|
30792
|
+
readonly defaultVariant: "default";
|
|
30793
|
+
readonly variantOptions: {
|
|
30794
|
+
readonly default: {
|
|
30795
|
+
readonly label: "Default";
|
|
30796
|
+
readonly description: "A centered heading above one FAQ accordion.";
|
|
30797
|
+
};
|
|
30798
|
+
readonly "two-column": {
|
|
30799
|
+
readonly label: "Two column";
|
|
30800
|
+
readonly description: "A left heading column with FAQ items on the right.";
|
|
30801
|
+
};
|
|
30802
|
+
};
|
|
30787
30803
|
readonly description: "Accordion of frequently asked questions and answers.";
|
|
30788
30804
|
readonly tags: readonly ["faq", "questions", "answers", "help", "support", "accordion", "q&a"];
|
|
30789
30805
|
readonly icon: "HelpCircle";
|
|
@@ -30793,10 +30809,12 @@ export type FaqItem = {
|
|
|
30793
30809
|
answer: unknown;
|
|
30794
30810
|
};
|
|
30795
30811
|
export type FaqContent = {
|
|
30812
|
+
variant?: "default" | "two-column" | null;
|
|
30796
30813
|
eyebrow?: string | null;
|
|
30797
30814
|
title?: string | null;
|
|
30798
30815
|
description?: unknown;
|
|
30799
30816
|
items?: FaqItem[] | null;
|
|
30817
|
+
_sectionStyles?: SectionStylesContent;
|
|
30800
30818
|
_containerStyles?: ContainerStylesContent;
|
|
30801
30819
|
_cardStyles?: CardStylesContent;
|
|
30802
30820
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Media } from "../../lib/media";
|
|
2
|
+
import type { TipTapNode } from "../manifest/richTextSchema";
|
|
3
|
+
import type { SystemBlockDefinition } from "../registry";
|
|
4
|
+
import { type BlockConfig, type BlockContentShapeInput, type DefinedBlockManifest } from "../defineBlock";
|
|
5
|
+
import { type StandardAspectRatio } from "../fields/aspectRatio";
|
|
6
|
+
import { type BlockCtaContent } from "../fields/ctas";
|
|
7
|
+
type FeatureCardsVariant = "cards";
|
|
8
|
+
type FeatureCardsColumns = "2" | "3" | "4";
|
|
9
|
+
export declare const featureCardsManifest: DefinedBlockManifest<BlockContentShapeInput<BlockConfig>>;
|
|
10
|
+
export type FeatureCard = {
|
|
11
|
+
media?: Media | null;
|
|
12
|
+
aspectRatio?: StandardAspectRatio | null;
|
|
13
|
+
title: string;
|
|
14
|
+
body?: TipTapNode | null;
|
|
15
|
+
ctas?: BlockCtaContent[] | null;
|
|
16
|
+
};
|
|
17
|
+
export type FeatureCardsContent = {
|
|
18
|
+
variant?: FeatureCardsVariant | null;
|
|
19
|
+
title?: string | null;
|
|
20
|
+
description?: TipTapNode | null;
|
|
21
|
+
columns?: FeatureCardsColumns | null;
|
|
22
|
+
cards?: FeatureCard[] | null;
|
|
23
|
+
};
|
|
24
|
+
export declare const featureCardsBlockDefinition: SystemBlockDefinition<FeatureCardsContent>;
|
|
25
|
+
export {};
|
|
@@ -17,6 +17,7 @@ export type { SystemBlockKind } from "../constants/blockKinds";
|
|
|
17
17
|
export declare function ensureSystemBlockDefinitionsRegistered(): void;
|
|
18
18
|
export declare function resetSystemBlockDefinitionRegistration(): void;
|
|
19
19
|
export * from "./hero";
|
|
20
|
+
export * from "./intro";
|
|
20
21
|
export * from "./body-text";
|
|
21
22
|
export * from "./location-map";
|
|
22
23
|
export * from "./blog-post";
|
|
@@ -30,6 +31,7 @@ export * from "./site-footer";
|
|
|
30
31
|
export * from "./testimonials";
|
|
31
32
|
export * from "./columns";
|
|
32
33
|
export * from "./collection";
|
|
34
|
+
export * from "./feature-cards";
|
|
33
35
|
export * from "./media-text";
|
|
34
36
|
export * from "./appointment-booking";
|
|
35
37
|
export * from "./event-registration";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Media } from "../../lib/media";
|
|
2
|
+
import type { TipTapNode } from "../manifest/richTextSchema";
|
|
3
|
+
import type { SystemBlockDefinition } from "../registry";
|
|
4
|
+
import type { SemanticSpacing } from "../spacing";
|
|
5
|
+
import { type BlockConfig, type BlockContentShapeInput, type DefinedBlockManifest } from "../defineBlock";
|
|
6
|
+
import { type StandardAspectRatio } from "../fields/aspectRatio";
|
|
7
|
+
import { type BlockCtaContent } from "../fields/ctas";
|
|
8
|
+
import { type ImageColSize } from "../fields/imageLayout";
|
|
9
|
+
export type IntroVariant = "centered-copy" | "statement-copy" | "statement-media" | "media-copy";
|
|
10
|
+
type IntroImagePosition = "left" | "right";
|
|
11
|
+
export declare const introManifest: DefinedBlockManifest<BlockContentShapeInput<BlockConfig>>;
|
|
12
|
+
export type IntroContent = {
|
|
13
|
+
variant?: IntroVariant | null;
|
|
14
|
+
title?: string | null;
|
|
15
|
+
body: TipTapNode;
|
|
16
|
+
media?: Media | null;
|
|
17
|
+
imagePosition?: IntroImagePosition | null;
|
|
18
|
+
gap?: SemanticSpacing | null;
|
|
19
|
+
ratio?: ImageColSize | null;
|
|
20
|
+
aspectRatio?: StandardAspectRatio | null;
|
|
21
|
+
ctas?: BlockCtaContent[] | null;
|
|
22
|
+
};
|
|
23
|
+
export declare const introBlockDefinition: SystemBlockDefinition<IntroContent>;
|
|
24
|
+
export {};
|
|
@@ -3,10 +3,10 @@ import type { TipTapNode } from "../manifest/richTextSchema";
|
|
|
3
3
|
import type { SystemBlockDefinition } from "../registry";
|
|
4
4
|
import type { SemanticSpacing } from "../spacing";
|
|
5
5
|
import { type ContentFrameIntent } from "../frame/frameStyles";
|
|
6
|
+
import { type StandardAspectRatio } from "../fields/aspectRatio";
|
|
6
7
|
import { type ImageColSize } from "../fields/imageLayout";
|
|
7
8
|
type MediaTextAlignment = "left" | "center";
|
|
8
9
|
type MediaTextImagePosition = "left" | "right";
|
|
9
|
-
type MediaTextAspectRatio = "auto" | "16/9" | "4/3" | "1/1" | "3/4";
|
|
10
10
|
export declare const mediaTextFrameCapability: readonly ["plain", "panel", "flush-panel"];
|
|
11
11
|
export declare const mediaTextManifest: import("..").DefinedBlockManifest<import("..").BlockContentShapeInput<{
|
|
12
12
|
readonly description: "Two columns: media/carousel + rich text (with optional section title).";
|
|
@@ -2347,38 +2347,7 @@ export declare const mediaTextManifest: import("..").DefinedBlockManifest<import
|
|
|
2347
2347
|
} | undefined;
|
|
2348
2348
|
readonly activeTabField?: string | undefined;
|
|
2349
2349
|
readonly tabs: import("..").TabDefinition[];
|
|
2350
|
-
}, ...import("../../../../block-form/src/backend/index").FieldDefinition[], {
|
|
2351
|
-
readonly id: "aspectRatio";
|
|
2352
|
-
readonly type: "select";
|
|
2353
|
-
readonly label: "Media aspect ratio";
|
|
2354
|
-
readonly description: "Crop media to a consistent aspect ratio.";
|
|
2355
|
-
readonly required: false;
|
|
2356
|
-
readonly defaultValue: "auto";
|
|
2357
|
-
readonly multiple: false;
|
|
2358
|
-
readonly options: [{
|
|
2359
|
-
readonly value: "auto";
|
|
2360
|
-
readonly label: "Auto (original)";
|
|
2361
|
-
}, {
|
|
2362
|
-
readonly value: "16/9";
|
|
2363
|
-
readonly label: "16:9 (Landscape)";
|
|
2364
|
-
}, {
|
|
2365
|
-
readonly value: "4/3";
|
|
2366
|
-
readonly label: "4:3 (Standard)";
|
|
2367
|
-
}, {
|
|
2368
|
-
readonly value: "1/1";
|
|
2369
|
-
readonly label: "1:1 (Square)";
|
|
2370
|
-
}, {
|
|
2371
|
-
readonly value: "3/4";
|
|
2372
|
-
readonly label: "3:4 (Portrait)";
|
|
2373
|
-
}];
|
|
2374
|
-
readonly ui: {
|
|
2375
|
-
readonly intent: "display";
|
|
2376
|
-
readonly visibleWhen: {
|
|
2377
|
-
readonly field: "images";
|
|
2378
|
-
readonly notEquals: null;
|
|
2379
|
-
};
|
|
2380
|
-
};
|
|
2381
|
-
}, {
|
|
2350
|
+
}, ...import("../../../../block-form/src/backend/index").FieldDefinition[], import("../../../../block-form/src/backend/index").FieldDefinition, {
|
|
2382
2351
|
readonly id: "text";
|
|
2383
2352
|
readonly type: "richText";
|
|
2384
2353
|
readonly label: "Text";
|
|
@@ -2508,7 +2477,7 @@ export type MediaTextContent = {
|
|
|
2508
2477
|
imagePosition?: MediaTextImagePosition | null;
|
|
2509
2478
|
gap?: SemanticSpacing | null;
|
|
2510
2479
|
ratio?: ImageColSize | null;
|
|
2511
|
-
aspectRatio?:
|
|
2480
|
+
aspectRatio?: StandardAspectRatio | null;
|
|
2512
2481
|
images?: Array<{
|
|
2513
2482
|
image: Media | null;
|
|
2514
2483
|
}> | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { SystemBlockDefinition } from
|
|
1
|
+
import type { SystemBlockDefinition } from '../registry';
|
|
2
2
|
export declare const siteHeaderManifest: import("..").DefinedBlockManifest<{
|
|
3
3
|
readonly skipSectionStyles: true;
|
|
4
4
|
}>;
|
|
5
5
|
export type SiteHeaderManifest = typeof siteHeaderManifest;
|
|
6
|
-
export type SiteHeaderVariant =
|
|
6
|
+
export type SiteHeaderVariant = 'classic' | 'centered' | 'transparent' | 'floating';
|
|
7
7
|
export type SiteHeaderContent = Record<string, never>;
|
|
8
8
|
export declare const siteHeaderBlockDefinition: SystemBlockDefinition<SiteHeaderContent>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const SYSTEM_BLOCK_KINDS: readonly ["block.hero", "block.columns", "block.collection", "block.media-text", "block.cta-full", "block.single-button", "block.body-text", "block.location-map", "block.faq", "block.testimonials", "block.team-members", "block.embed", "block.blog-post", "block.blog-listing", "block.site-header", "block.site-footer", "block.form", "block.appointment-booking", "block.event-registration", "block.event-details", "block.course-registration", "block.course-details", "block.event-spotlight", "block.event-listing", "block.event-calendar", "block.shop", "block.product-list", "block.product-detail", "block.cart", "block.checkout", "block.gifting", "block.newsletter-signup", "block.image-gallery", "block.video-grid", "block.audio-player", "block.file-download"];
|
|
1
|
+
export declare const SYSTEM_BLOCK_KINDS: readonly ["block.hero", "block.intro", "block.columns", "block.collection", "block.feature-cards", "block.media-text", "block.cta-full", "block.single-button", "block.body-text", "block.location-map", "block.faq", "block.testimonials", "block.team-members", "block.embed", "block.blog-post", "block.blog-listing", "block.site-header", "block.site-footer", "block.form", "block.appointment-booking", "block.event-registration", "block.event-details", "block.course-registration", "block.course-details", "block.event-spotlight", "block.event-listing", "block.event-calendar", "block.shop", "block.product-list", "block.product-detail", "block.cart", "block.checkout", "block.gifting", "block.newsletter-signup", "block.image-gallery", "block.video-grid", "block.audio-player", "block.file-download"];
|
|
2
2
|
export type SystemBlockKind = (typeof SYSTEM_BLOCK_KINDS)[number];
|
|
3
3
|
export type CustomBlockKind = `custom.${string}`;
|
|
4
4
|
export type BlockKind = SystemBlockKind | CustomBlockKind;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { FieldDefinition } from '../manifest/schema';
|
|
2
|
+
export type StandardAspectRatio = 'auto' | '16/9' | '4/3' | '1/1' | '3/4';
|
|
3
|
+
type FieldUi = NonNullable<FieldDefinition['ui']>;
|
|
4
|
+
type FieldVisibleWhen = FieldUi['visibleWhen'];
|
|
5
|
+
export declare const standardAspectRatioOptions: readonly [{
|
|
6
|
+
readonly value: "auto";
|
|
7
|
+
readonly label: "Auto (original)";
|
|
8
|
+
}, {
|
|
9
|
+
readonly value: "16/9";
|
|
10
|
+
readonly label: "16:9 (Landscape)";
|
|
11
|
+
}, {
|
|
12
|
+
readonly value: "4/3";
|
|
13
|
+
readonly label: "4:3 (Standard)";
|
|
14
|
+
}, {
|
|
15
|
+
readonly value: "1/1";
|
|
16
|
+
readonly label: "1:1 (Square)";
|
|
17
|
+
}, {
|
|
18
|
+
readonly value: "3/4";
|
|
19
|
+
readonly label: "3:4 (Portrait)";
|
|
20
|
+
}];
|
|
21
|
+
type AspectRatioFieldOptions = Readonly<{
|
|
22
|
+
id?: string;
|
|
23
|
+
label?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
defaultValue?: StandardAspectRatio;
|
|
26
|
+
uiIntent?: 'display' | 'style';
|
|
27
|
+
visibleWhen?: FieldVisibleWhen;
|
|
28
|
+
}>;
|
|
29
|
+
export declare function createAspectRatioField(options?: AspectRatioFieldOptions): FieldDefinition;
|
|
30
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ModalFieldDefinition } from '../manifest/schema';
|
|
2
|
-
import type { EyebrowTreatment, TileTreatment } from '../../../../theme-core/src/site-styles/index';
|
|
2
|
+
import type { AccordionIconTreatment, EyebrowTreatment, HeadingDecoration, HeadingDecorationOverride, TileTreatment } from '../../../../theme-core/src/site-styles/index';
|
|
3
3
|
import type { Media } from '../../lib/media';
|
|
4
4
|
/**
|
|
5
5
|
* Options for customizing a section styles field.
|
|
@@ -83,6 +83,9 @@ export type SectionStylesContent = {
|
|
|
83
83
|
minHeight?: 'none' | 'banner' | 'hero' | 'immersive' | null;
|
|
84
84
|
tileTreatment?: TileTreatment | null;
|
|
85
85
|
eyebrowTreatment?: EyebrowTreatment | null;
|
|
86
|
+
headingDecoration?: HeadingDecoration | null;
|
|
87
|
+
headingDecorationOverride?: HeadingDecorationOverride | null;
|
|
88
|
+
accordionIconTreatment?: AccordionIconTreatment | null;
|
|
86
89
|
} | null;
|
|
87
90
|
export type CardStylesContent = {
|
|
88
91
|
background?: Record<string, unknown> | null;
|
|
@@ -25,5 +25,12 @@ export type CtasRepeaterField<O extends CtasOptions = {}> = FieldDefinition & {
|
|
|
25
25
|
];
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
+
export type BlockCtaContent = {
|
|
29
|
+
label?: string | null;
|
|
30
|
+
href?: string | null;
|
|
31
|
+
link?: unknown;
|
|
32
|
+
variant?: string | null;
|
|
33
|
+
size?: string | null;
|
|
34
|
+
};
|
|
28
35
|
export declare function createCtasRepeater<const O extends CtasOptions = {}>(options?: O): CtasRepeaterField<O>;
|
|
29
36
|
export {};
|
|
@@ -43,6 +43,15 @@ type UrlFormatConstraint = Readonly<{
|
|
|
43
43
|
kind: "urlFormat";
|
|
44
44
|
allowRelative: boolean;
|
|
45
45
|
}>;
|
|
46
|
+
type DateFormatConstraint = Readonly<{
|
|
47
|
+
kind: "dateFormat";
|
|
48
|
+
}>;
|
|
49
|
+
type TimeFormatConstraint = Readonly<{
|
|
50
|
+
kind: "timeFormat";
|
|
51
|
+
}>;
|
|
52
|
+
type DateTimeFormatConstraint = Readonly<{
|
|
53
|
+
kind: "datetimeFormat";
|
|
54
|
+
}>;
|
|
46
55
|
type NumberTypeConstraint = Readonly<{
|
|
47
56
|
kind: "numberType";
|
|
48
57
|
}>;
|
|
@@ -85,7 +94,7 @@ type LinkObjectConstraint = Readonly<{
|
|
|
85
94
|
type ReferenceTextConstraint = Readonly<{
|
|
86
95
|
kind: "referenceText";
|
|
87
96
|
}>;
|
|
88
|
-
type StringConstraint = RequiredConstraint | TextTypeConstraint | MaxLengthConstraint | EmailFormatConstraint | PhoneFormatConstraint | PatternFormatConstraint | UrlFormatConstraint | SlugFormatConstraint | ReferenceTextConstraint;
|
|
97
|
+
type StringConstraint = RequiredConstraint | TextTypeConstraint | MaxLengthConstraint | EmailFormatConstraint | PhoneFormatConstraint | PatternFormatConstraint | UrlFormatConstraint | DateFormatConstraint | TimeFormatConstraint | DateTimeFormatConstraint | SlugFormatConstraint | ReferenceTextConstraint;
|
|
89
98
|
type NumberConstraint = RequiredConstraint | NumberTypeConstraint | NumberMinConstraint | NumberMaxConstraint;
|
|
90
99
|
type SelectConstraint = RequiredConstraint | SelectOptionConstraint;
|
|
91
100
|
type ArrayConstraint = RequiredConstraint | ArrayTypeConstraint | MinItemsConstraint | MaxItemsConstraint;
|
|
@@ -105,7 +114,7 @@ export type FieldValidationIssue = BaseIssue<"required", {
|
|
|
105
114
|
expected: string;
|
|
106
115
|
}> | BaseIssue<"tooLong", {
|
|
107
116
|
maximum: number;
|
|
108
|
-
}> | BaseIssue<"invalidEmail"> | BaseIssue<"invalidPhone"> | BaseIssue<"invalidPattern"> | BaseIssue<"invalidUrl"> | BaseIssue<"invalidNumber"> | BaseIssue<"tooSmall", {
|
|
117
|
+
}> | BaseIssue<"invalidEmail"> | BaseIssue<"invalidPhone"> | BaseIssue<"invalidPattern"> | BaseIssue<"invalidUrl"> | BaseIssue<"invalidDate"> | BaseIssue<"invalidTime"> | BaseIssue<"invalidDateTime"> | BaseIssue<"invalidNumber"> | BaseIssue<"tooSmall", {
|
|
109
118
|
minimum: number;
|
|
110
119
|
}> | BaseIssue<"tooLarge", {
|
|
111
120
|
maximum: number;
|
|
@@ -201,5 +210,10 @@ export declare function validateFieldValue(plan: FieldValidationPlan, value: unk
|
|
|
201
210
|
export declare function fieldPlanToZod(plan: FieldValidationPlan, options?: FieldValidationOptions): z.ZodTypeAny;
|
|
202
211
|
export declare function resolveFieldValidationDescriptor(plans: readonly FieldValidationPlan[], path: FieldPath): FieldValidationDescriptor | null;
|
|
203
212
|
export declare function validateManifestValues(fields: readonly FieldDefinition[], values: Record<string, unknown>, options?: FieldValidationOptions): FieldValidationIssue[];
|
|
213
|
+
export declare function isCanonicalEmailValue(value: string): boolean;
|
|
214
|
+
export declare function isCanonicalPhoneValue(value: string): boolean;
|
|
215
|
+
export declare function isCanonicalUrlValue(value: string, options?: Readonly<{
|
|
216
|
+
allowRelative?: boolean;
|
|
217
|
+
}>): boolean;
|
|
204
218
|
export declare function isEmptyValue(value: unknown): boolean;
|
|
205
219
|
export declare function isEmptyRichTextDoc(value: unknown): boolean;
|
|
@@ -20,7 +20,7 @@ export type AllowedNodeType = (typeof ALLOWED_NODE_TYPES)[number];
|
|
|
20
20
|
* $bind.transforms within custom block layouts. Transform IDs
|
|
21
21
|
* not in this list will be rejected during validation.
|
|
22
22
|
*/
|
|
23
|
-
export declare const ALLOWED_TRANSFORM_IDS: readonly ["string.uppercase", "value.fallback", "date.formatShort", "array.length", "value.jsonArray", "value.csv", "array.marqueeLoop", "layout.maxWidthClass", "layout.headerRootClass", "layout.footerRootClass", "layout.headerRootStyle", "layout.footerRootStyle", "ui.headerNavLinkClass", "ui.headingClassFromAlignment", "ui.bodyClassFromAlignment", "ui.stackAlignFromAlignment", "ui.sectionStateTone", "ui.heroContentWrapperClass", "ui.heroCtaJustify", "ui.heroStackJustifyFromVerticalAlignment", "ui.heroGridClassFromVerticalAlignment", "ui.conditionalClass", "ui.twoColumnContainerClass", "ui.twoColumnFlexBasis", "ui.imageGalleryFilterClass", "ui.imageGalleryTileClass", "ui.imageGalleryTileStyle", "ui.imageGalleryMarqueeTileStyle", "ui.imageGalleryMarqueeDuration", "ui.imageGalleryMarqueeDirection", "ui.imageFragmentClass", "ui.imageFragmentSize", "media.fromUrl", "background.resolveStyle", "background.resolveColorsStyle", "background.resolveAllowOverflow", "background.resolveImageStyle", "background.resolveImageClassName", "background.resolveOverlayStyle", "links.resolve", "links.label", "content.interpolateRichTextTokens", "boxStyles.spacing", "boxStyles.resolveRootClass", "boxStyles.resolveRootStyle", "boxStyles.semanticGap", "boxStyles.semanticGapValue", "containerStyles.resolveBoxClassName"];
|
|
23
|
+
export declare const ALLOWED_TRANSFORM_IDS: readonly ["string.uppercase", "value.fallback", "date.formatShort", "array.length", "value.jsonArray", "value.csv", "array.marqueeLoop", "layout.maxWidthClass", "layout.headerRootClass", "layout.footerRootClass", "layout.headerRootStyle", "layout.headerSectionBackground", "layout.footerRootStyle", "ui.headerNavLinkClass", "ui.headingClassFromAlignment", "ui.bodyClassFromAlignment", "ui.stackAlignFromAlignment", "ui.sectionStateTone", "ui.heroContentWrapperClass", "ui.heroCtaJustify", "ui.heroStackJustifyFromVerticalAlignment", "ui.heroGridClassFromVerticalAlignment", "ui.conditionalClass", "ui.twoColumnContainerClass", "ui.twoColumnFlexBasis", "ui.imageGalleryFilterClass", "ui.imageGalleryTileClass", "ui.imageGalleryTileStyle", "ui.imageGalleryMarqueeTileStyle", "ui.imageGalleryMarqueeDuration", "ui.imageGalleryMarqueeDirection", "ui.imageFragmentClass", "ui.imageFragmentSize", "media.fromUrl", "background.resolveStyle", "background.resolveColorsStyle", "background.resolveAllowOverflow", "background.resolveImageStyle", "background.resolveImageClassName", "background.resolveOverlayStyle", "links.resolve", "links.label", "content.interpolateRichTextTokens", "boxStyles.spacing", "boxStyles.resolveRootClass", "boxStyles.resolveRootStyle", "boxStyles.semanticGap", "boxStyles.semanticGapValue", "containerStyles.resolveBoxClassName"];
|
|
24
24
|
export type AllowedTransformId = (typeof ALLOWED_TRANSFORM_IDS)[number];
|
|
25
25
|
/**
|
|
26
26
|
* Set for O(1) lookup of allowed node types.
|