@riverbankcms/sdk 0.78.2 → 0.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -0
- package/dist/{PreviewEditorSidebar-4DXLYX2V.mjs → PreviewEditorSidebar-56NMJMIK.mjs} +724 -47
- package/dist/{PreviewEditorUI-CS5P4N3P.mjs → PreviewEditorUI-27KJVEET.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-H4BSP6E7.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +36 -0
- package/dist/_dts/api/src/endpoints.d.ts +55 -0
- package/dist/_dts/api/src/index.d.ts +5 -3
- package/dist/_dts/api/src/media.d.ts +8 -1
- package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +1 -1
- package/dist/_dts/api/src/navigation/dashboardSiteNav.d.ts +8 -8
- package/dist/_dts/api/src/navigation/identity.d.ts +59 -0
- package/dist/_dts/api/src/navigation.d.ts +2 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +4 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +1 -0
- package/dist/_dts/api/src/siteIcons.d.ts +128 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +16 -0
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +7 -0
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +6 -1
- package/dist/_dts/api/src/types.d.ts +1 -1
- package/dist/_dts/api/src/webhooks.d.ts +239 -0
- package/dist/_dts/blocks/src/index.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +294 -289
- package/dist/_dts/blocks/src/system/blocks/feature-card-icons.d.ts +57 -0
- package/dist/_dts/blocks/src/system/blocks/feature-cards.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +22 -22
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/testimonials.d.ts +7 -1
- package/dist/_dts/blocks/src/system/customize/backgrounds.d.ts +170 -0
- package/dist/_dts/blocks/src/system/fragments/library/testimonialsCarousel.d.ts +5 -0
- package/dist/_dts/blocks/src/system/helpers/resolveBackground.d.ts +3 -1
- package/dist/_dts/blocks/src/system/icons/ids.d.ts +13 -0
- package/dist/_dts/blocks/src/system/icons/index.d.ts +6 -0
- package/dist/_dts/blocks/src/system/icons/presets.d.ts +4 -0
- package/dist/_dts/blocks/src/system/icons/registry.d.ts +18 -0
- package/dist/_dts/blocks/src/system/icons/semantic.d.ts +239 -0
- package/dist/_dts/blocks/src/system/icons/value.d.ts +94 -0
- package/dist/_dts/blocks/src/system/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +4 -1
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +23 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/feature-card-icon.d.ts +13 -0
- package/dist/_dts/content-model/src/contentManifest.d.ts +3 -1
- package/dist/_dts/core/src/branded.d.ts +6 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +191 -0
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +12 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardBody.d.ts +12 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +12 -2
- package/dist/_dts/editor-blocks/src/block-editor/FeatureCardIconsPanel.d.ts +21 -0
- package/dist/_dts/editor-blocks/src/block-editor/GeneratedIconSetDialog.d.ts +40 -0
- package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +11 -1
- package/dist/_dts/editor-blocks/src/block-editor/featureCardIconActions.d.ts +82 -0
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/IconPickerField.d.ts +1 -1
- package/dist/_dts/media-core/src/fileDomain.d.ts +8 -1
- package/dist/_dts/media-editor/src/MediaEditor.d.ts +3 -2
- package/dist/_dts/media-react/src/components/MediaLibrary.d.ts +2 -1
- package/dist/_dts/media-react/src/components/MediaPickerMini.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/previewCustomizeActions.d.ts +17 -0
- package/dist/_dts/preview-next/src/client/preview/PageDesignEditorStateContext.d.ts +4 -0
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeHistory.d.ts +6 -0
- package/dist/_dts/sdk/src/cli/navigationIdentity.d.ts +11 -0
- package/dist/_dts/sdk/src/cli/site-commands/navigationCommands.d.ts +4 -0
- package/dist/_dts/sdk/src/cli/site-commands/oneOffCommands.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/sync/diff.d.ts +9 -0
- package/dist/_dts/sdk/src/client/management/types.d.ts +2 -0
- package/dist/_dts/sdk/src/config/field-definitions.d.ts +3 -1
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +19 -2
- package/dist/_dts/sdk/src/next/index.d.ts +1 -1
- package/dist/_dts/sdk/src/next/revalidate.d.ts +26 -5
- package/dist/_dts/sdk/src/next/static-params.d.ts +28 -3
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -1
- package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/sdk/src/webhooks/index.d.ts +1 -1
- package/dist/_dts/sdk/src/webhooks/verify.d.ts +6 -102
- package/dist/_dts/site-commands/src/commands.d.ts +3 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +3 -3
- package/dist/_dts/theme-core/src/schema.d.ts +5 -5
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +25 -2
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +5 -5
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -2
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +4 -4
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +2 -0
- package/dist/_dts/ui/src/combobox.d.ts +1 -0
- package/dist/{chunk-RGTOD4AJ.mjs → chunk-4HCW7FHJ.mjs} +491 -56
- package/dist/{chunk-OKMBEAXY.mjs → chunk-A3HHFKVT.mjs} +1 -1
- package/dist/{chunk-6HYXHRAI.mjs → chunk-GP555I66.mjs} +177 -7
- package/dist/{chunk-CR5HKAGU.mjs → chunk-K2IIF34C.mjs} +55 -0
- package/dist/{chunk-4QEGTLK6.mjs → chunk-LCY32PXF.mjs} +1 -1
- package/dist/{chunk-MCRQMPET.mjs → chunk-V47ZU33I.mjs} +1745 -157
- package/dist/cli/index.mjs +1169 -171
- package/dist/cli/init-docs/content/workflow-editor-workflows.md +2 -0
- package/dist/cli/init-docs/content/workflow-isr-revalidation.md +138 -0
- package/dist/client/{accordion-PLYNJIIM.mjs → accordion-QLA7KBYO.mjs} +1 -1
- package/dist/client/{bookingForm-BXAP6AO7.mjs → bookingForm-PYZIPA5G.mjs} +3 -3
- package/dist/client/bookings.mjs +110 -2
- package/dist/client/{carousel-TRBXDHGF.mjs → carousel-5EIULWBI.mjs} +2 -2
- package/dist/client/{cart-Z7H3HJRS.mjs → cart-DOP3FNI4.mjs} +5 -5
- package/dist/client/{checkout-WAFCUBIX.mjs → checkout-BVMF6FBV.mjs} +5 -5
- package/dist/client/{chunk-JRDUHZCT.mjs → chunk-44K2U3QI.mjs} +4 -4
- package/dist/client/{chunk-UVQEJJTN.mjs → chunk-CCNTDRCF.mjs} +1 -1
- package/dist/client/{chunk-ZI3LLBPZ.mjs → chunk-GG4M2NP6.mjs} +1 -1
- package/dist/client/{chunk-JGXPTEI2.mjs → chunk-R5ESWNKX.mjs} +6 -3
- package/dist/client/{chunk-CWGTG37I.mjs → chunk-TYONZMST.mjs} +1 -1
- package/dist/client/{chunk-75OUS5MT.mjs → chunk-UDS3NTWA.mjs} +1 -1
- package/dist/client/{chunk-DNRGY432.mjs → chunk-V6M5FCR5.mjs} +1 -1
- package/dist/client/{chunk-FUXW6VW2.mjs → chunk-YLDYVRZL.mjs} +4 -4
- package/dist/client/client.mjs +21329 -19729
- package/dist/client/{courseRegistration-AHFQHWIJ.mjs → courseRegistration-E6EAA6NL.mjs} +3 -3
- package/dist/client/{eventCalendar-LDXTV5R7.mjs → eventCalendar-HBG3HAK6.mjs} +5 -5
- package/dist/client/{eventCombined-A4JGTNJO.mjs → eventCombined-6K5ZZWAK.mjs} +5 -5
- package/dist/client/{eventDetails-4YXTZ7EG.mjs → eventDetails-Q75ICXLT.mjs} +5 -5
- package/dist/client/{eventListing-P72TPFFM.mjs → eventListing-27P5F7DZ.mjs} +5 -5
- package/dist/client/{eventRegistration-LSYJHGMT.mjs → eventRegistration-IQ7AMASR.mjs} +5 -5
- package/dist/client/{form-AOPYOKOW.mjs → form-JRTD65FN.mjs} +1 -1
- package/dist/client/{headerSection-5TFYDFVQ.mjs → headerSection-7FPSSZHS.mjs} +2 -2
- package/dist/client/hooks.mjs +350 -35
- package/dist/client/{locationMap-QSZ3ZVAZ.mjs → locationMap-7NGFNYBH.mjs} +1 -1
- package/dist/client/{newsletterForm-KTRHZY52.mjs → newsletterForm-F3BADCI2.mjs} +1 -1
- package/dist/client/{productDetail-N4E775RG.mjs → productDetail-V3HP7ITJ.mjs} +5 -5
- package/dist/client/{productList-UGUQ2S45.mjs → productList-L3EGJUF2.mjs} +5 -5
- package/dist/client/rendering/client.mjs +2713 -1382
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +2014 -414
- package/dist/client/{shop-VHSZEEQ2.mjs → shop-DQUB5E2C.mjs} +5 -5
- package/dist/preview-next/before-render.mjs +55 -0
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/middleware.mjs +55 -0
- package/dist/{sdk-runtime-WHPJEF5G.mjs → sdk-runtime-AF6KXJU4.mjs} +6 -6
- package/dist/server/components.mjs +2169 -781
- package/dist/server/config-validation.mjs +350 -35
- package/dist/server/config.mjs +350 -35
- package/dist/server/data.mjs +350 -35
- package/dist/server/index.mjs +64 -1
- package/dist/server/next/revalidate.mjs +229 -34
- package/dist/server/next.mjs +2307 -818
- package/dist/server/page-converter.mjs +275 -34
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2174 -786
- package/dist/server/rendering.mjs +2187 -799
- package/dist/server/routing.mjs +767 -50
- package/dist/server/server.mjs +351 -36
- package/dist/server/theme-bridge.mjs +164 -2
- package/dist/server/theme.mjs +2 -2
- package/dist/server/webhooks.mjs +129 -25
- package/dist/styles/index.css +55 -0
- package/package.json +2 -1
- package/dist/SdkPreviewModeRuntime-IJDHTW4W.mjs +0 -8
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { applyFeatureCardIconSuggestions, type GeneratedBlockIconValue, type FeatureCardIconInputContent, type SemanticIconId, type SiteIconStyleGuideVersionId } from '../../../blocks/src/index';
|
|
2
|
+
import { type EditorBlockId } from '../../../core/src/index';
|
|
3
|
+
import type { DraftsSlice } from './types';
|
|
4
|
+
type FeatureCardIconActionDrafts = Pick<DraftsSlice, 'setAtPath'>;
|
|
5
|
+
export type FeatureCardIconActionResult = {
|
|
6
|
+
kind: 'applied';
|
|
7
|
+
appliedCount: number;
|
|
8
|
+
} | {
|
|
9
|
+
kind: 'no_cards';
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'complete';
|
|
12
|
+
} | {
|
|
13
|
+
kind: 'plan_failed';
|
|
14
|
+
reason: Exclude<ReturnType<typeof applyFeatureCardIconSuggestions>['kind'], 'applied'>;
|
|
15
|
+
cardKey?: string;
|
|
16
|
+
iconId?: string;
|
|
17
|
+
};
|
|
18
|
+
export type FeatureCardGeneratedIconSetAssetInput = Readonly<{
|
|
19
|
+
cardKey: string;
|
|
20
|
+
iconValue: unknown;
|
|
21
|
+
}>;
|
|
22
|
+
export type FeatureCardGeneratedIconSetApplyPlan = Readonly<{
|
|
23
|
+
kind: 'applied';
|
|
24
|
+
appliedIcons: readonly Readonly<{
|
|
25
|
+
cardIndex: number;
|
|
26
|
+
cardKey: string;
|
|
27
|
+
iconValue: GeneratedBlockIconValue;
|
|
28
|
+
}>[];
|
|
29
|
+
}> | Readonly<{
|
|
30
|
+
kind: 'duplicate_asset_card_key';
|
|
31
|
+
cardKey: string;
|
|
32
|
+
}> | Readonly<{
|
|
33
|
+
kind: 'missing_asset_card_key';
|
|
34
|
+
cardKey: string;
|
|
35
|
+
}> | Readonly<{
|
|
36
|
+
kind: 'unknown_card_key';
|
|
37
|
+
cardKey: string;
|
|
38
|
+
}> | Readonly<{
|
|
39
|
+
kind: 'invalid_generated_icon';
|
|
40
|
+
cardKey: string;
|
|
41
|
+
}>;
|
|
42
|
+
export type FeatureCardGeneratedIconSetActionResult = Readonly<{
|
|
43
|
+
kind: 'applied';
|
|
44
|
+
appliedCount: number;
|
|
45
|
+
}> | Readonly<{
|
|
46
|
+
kind: 'no_cards';
|
|
47
|
+
}> | Readonly<{
|
|
48
|
+
kind: 'plan_failed';
|
|
49
|
+
reason: Exclude<FeatureCardGeneratedIconSetApplyPlan['kind'], 'applied'>;
|
|
50
|
+
cardKey?: string;
|
|
51
|
+
}>;
|
|
52
|
+
export type FeatureCardIconDialogCard = Readonly<{
|
|
53
|
+
cardKey: string;
|
|
54
|
+
title: string;
|
|
55
|
+
bodyText: string;
|
|
56
|
+
semanticIconId: SemanticIconId;
|
|
57
|
+
}>;
|
|
58
|
+
export type FeatureCardGeneratedIconStyleSummary = Readonly<{
|
|
59
|
+
kind: 'unavailable';
|
|
60
|
+
}> | Readonly<{
|
|
61
|
+
kind: 'available';
|
|
62
|
+
generatedCount: number;
|
|
63
|
+
staleCount: number;
|
|
64
|
+
invalidGeneratedCount: number;
|
|
65
|
+
}>;
|
|
66
|
+
export declare function getFeatureCards(content: Record<string, unknown> | null | undefined): FeatureCardIconInputContent[];
|
|
67
|
+
export declare function getFeatureCardIconStatus(content: Record<string, unknown> | null | undefined): import("../../../blocks/src/index").FeatureCardIconCompletion;
|
|
68
|
+
export declare function getFeatureCardIconDialogCards(content: Record<string, unknown> | null | undefined): readonly FeatureCardIconDialogCard[];
|
|
69
|
+
export declare function getFeatureCardGeneratedIconStyleSummary(content: Record<string, unknown> | null | undefined, currentStyleGuideVersionId: SiteIconStyleGuideVersionId | null | undefined): FeatureCardGeneratedIconStyleSummary;
|
|
70
|
+
export declare function applyCuratedFeatureCardIconSuggestions({ blockId, content, drafts, }: {
|
|
71
|
+
blockId: EditorBlockId;
|
|
72
|
+
content: Record<string, unknown> | null | undefined;
|
|
73
|
+
drafts: FeatureCardIconActionDrafts;
|
|
74
|
+
}): FeatureCardIconActionResult;
|
|
75
|
+
export declare function planGeneratedFeatureCardIconSetApply(cards: readonly FeatureCardIconInputContent[], assets: readonly FeatureCardGeneratedIconSetAssetInput[]): FeatureCardGeneratedIconSetApplyPlan;
|
|
76
|
+
export declare function applyGeneratedFeatureCardIconSet({ blockId, content, drafts, assets, }: {
|
|
77
|
+
blockId: EditorBlockId;
|
|
78
|
+
content: Record<string, unknown> | null | undefined;
|
|
79
|
+
drafts: FeatureCardIconActionDrafts;
|
|
80
|
+
assets: readonly FeatureCardGeneratedIconSetAssetInput[];
|
|
81
|
+
}): FeatureCardGeneratedIconSetActionResult;
|
|
82
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type FieldWidgetProps, type TextFieldConfig } from '../../../../block-form/src/client/index';
|
|
2
|
-
type IconPickerValue =
|
|
2
|
+
type IconPickerValue = unknown;
|
|
3
3
|
export declare function IconPickerField({ path, backend, config }: FieldWidgetProps<IconPickerValue, TextFieldConfig>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export {};
|
|
@@ -61,6 +61,9 @@ export type FileUse = {
|
|
|
61
61
|
} | {
|
|
62
62
|
readonly tag: 'site-brand-asset';
|
|
63
63
|
readonly brandUse: SiteBrandAssetUse;
|
|
64
|
+
} | {
|
|
65
|
+
readonly tag: 'site-background-asset';
|
|
66
|
+
readonly backgroundUse: SiteBackgroundAssetUse;
|
|
64
67
|
} | {
|
|
65
68
|
readonly tag: 'site-font-file';
|
|
66
69
|
readonly fontId: SiteFontId;
|
|
@@ -71,10 +74,14 @@ export type FileUse = {
|
|
|
71
74
|
export type FileUseTag = FileUse['tag'];
|
|
72
75
|
export type WorkflowInputKind = 'audio-enrichment' | 'generic-file-processing';
|
|
73
76
|
export type SiteBrandAssetUse = 'logo' | 'social-image';
|
|
77
|
+
export type AmbientBackgroundRole = 'light-texture' | 'proof-band-dark' | 'cta-wash' | 'footer-detail' | 'style-atmosphere-1' | 'style-atmosphere-2';
|
|
78
|
+
export type SiteBackgroundAssetUse = 'selected-background' | AmbientBackgroundRole;
|
|
74
79
|
export type TemporaryIngestionKind = 'backup-zip' | 'newsletter-csv' | 'instagram-zip';
|
|
75
|
-
export declare const FILE_USE_TAGS: readonly ["media-library", "content-download", "digital-product-file", "workflow-input", "booking-evidence", "site-brand-asset", "site-font-file", "temporary-ingestion"];
|
|
80
|
+
export declare const FILE_USE_TAGS: readonly ["media-library", "content-download", "digital-product-file", "workflow-input", "booking-evidence", "site-brand-asset", "site-background-asset", "site-font-file", "temporary-ingestion"];
|
|
76
81
|
export declare const WORKFLOW_INPUT_KINDS: readonly ["audio-enrichment", "generic-file-processing"];
|
|
77
82
|
export declare const SITE_BRAND_ASSET_USES: readonly ["logo", "social-image"];
|
|
83
|
+
export declare const AMBIENT_BACKGROUND_ROLES: readonly ["light-texture", "proof-band-dark", "cta-wash", "footer-detail", "style-atmosphere-1", "style-atmosphere-2"];
|
|
84
|
+
export declare const SITE_BACKGROUND_ASSET_USES: readonly ["selected-background", "light-texture", "proof-band-dark", "cta-wash", "footer-detail", "style-atmosphere-1", "style-atmosphere-2"];
|
|
78
85
|
export declare const TEMPORARY_INGESTION_KINDS: readonly ["backup-zip", "newsletter-csv", "instagram-zip"];
|
|
79
86
|
export type UploadIntent = {
|
|
80
87
|
readonly tag: 'media-library';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MediaKind } from '@riverbankcms/media-storage-supabase';
|
|
1
|
+
import type { MediaAssetWithLabels, MediaKind } from '@riverbankcms/media-storage-supabase';
|
|
2
2
|
import { type UploadIntentResolver, type VideoPrepIntentResolver } from '../../media-react/src/index';
|
|
3
3
|
import type { VideoPrepIntent } from '../../media-core/src/index';
|
|
4
4
|
import type { MediaValue } from './types';
|
|
@@ -21,8 +21,9 @@ export type MediaEditorProps = {
|
|
|
21
21
|
showRemoveAction?: boolean;
|
|
22
22
|
previewMaxWidth?: 'xs' | 'sm' | 'md' | 'none';
|
|
23
23
|
preventPreviewUpscale?: boolean;
|
|
24
|
+
onUploadComplete?: (asset: MediaAssetWithLabels) => void;
|
|
24
25
|
uploadIntent?: UploadIntentResolver;
|
|
25
26
|
videoPrepIntent?: VideoPrepIntentResolver;
|
|
26
27
|
videoSelectionIntent?: VideoPrepIntent;
|
|
27
28
|
};
|
|
28
|
-
export declare const MediaEditor: ({ value, onChange, allowedKinds, previewAspectRatio, minSourceWidth, minSourceHeight, showAltInput, cropEditorMode, cropEditorAutoOpen, mediaPickerAutoOpen, showPreview, showActionOverlay, onEditDetails, fullWidth, previewVariant, showRemoveAction, previewMaxWidth, preventPreviewUpscale, uploadIntent, videoPrepIntent, videoSelectionIntent, }: MediaEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare const MediaEditor: ({ value, onChange, allowedKinds, previewAspectRatio, minSourceWidth, minSourceHeight, showAltInput, cropEditorMode, cropEditorAutoOpen, mediaPickerAutoOpen, showPreview, showActionOverlay, onEditDetails, fullWidth, previewVariant, showRemoveAction, previewMaxWidth, preventPreviewUpscale, onUploadComplete, uploadIntent, videoPrepIntent, videoSelectionIntent, }: MediaEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -28,6 +28,7 @@ export type MediaLibraryProps = {
|
|
|
28
28
|
uploader?: UseUploadsOptions['uploader'];
|
|
29
29
|
maxParallelUploads?: number;
|
|
30
30
|
getListOptions?: () => Partial<ListMediaAssetsOptions>;
|
|
31
|
+
onUploadComplete?: (asset: MediaAssetWithLabels) => void;
|
|
31
32
|
children: (props: MediaLibraryRenderProps) => ReactNode;
|
|
32
33
|
};
|
|
33
|
-
export declare const MediaLibrary: ({ siteId, repo, pageSize, allowMultiSelect, uploader, maxParallelUploads, children, getListOptions, }: MediaLibraryProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare const MediaLibrary: ({ siteId, repo, pageSize, allowMultiSelect, uploader, maxParallelUploads, children, getListOptions, onUploadComplete, }: MediaLibraryProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -17,5 +17,6 @@ export type MediaPickerMiniProps = {
|
|
|
17
17
|
open?: boolean;
|
|
18
18
|
onOpenChange?: (value: boolean) => void;
|
|
19
19
|
getListOptions?: MediaLibraryProps['getListOptions'];
|
|
20
|
+
onUploadComplete?: MediaLibraryProps['onUploadComplete'];
|
|
20
21
|
};
|
|
21
|
-
export declare const MediaPickerMini: ({ siteId, repo, onPick, children, pageSize, uploader, autoCloseOnPick, open, onOpenChange, getListOptions, }: MediaPickerMiniProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const MediaPickerMini: ({ siteId, repo, onPick, children, pageSize, uploader, autoCloseOnPick, open, onOpenChange, getListOptions, onUploadComplete, }: MediaPickerMiniProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AppearancePresetId, BoundaryOptionId, DesignBlockId, LayoutVariantKey, PageDesignEditorBlock, PageDesignEditorBoundary } from '../../../../theme-core/src/site-styles/index';
|
|
2
2
|
import { type SystemCustomizeFacetId, type SystemCustomizeFacetTransition, type SystemCustomizeFacetValue } from '../../../../blocks/src/system/customize/facets';
|
|
3
|
+
import { type BackgroundImagePoolItem, type BackgroundOverride } from '../../../../blocks/src/system/customize/backgrounds';
|
|
3
4
|
export type PreviewCustomizeCycleDirection = 'prev' | 'next';
|
|
4
5
|
export type PreviewCustomizeAction = Readonly<{
|
|
5
6
|
kind: 'set-layout';
|
|
@@ -15,6 +16,12 @@ export type PreviewCustomizeAction = Readonly<{
|
|
|
15
16
|
blockId: DesignBlockId;
|
|
16
17
|
baseContentId: string | null;
|
|
17
18
|
} & SystemCustomizeFacetTransition> | Readonly<{
|
|
19
|
+
kind: 'set-background';
|
|
20
|
+
blockId: DesignBlockId;
|
|
21
|
+
override: BackgroundOverride;
|
|
22
|
+
fromOverride: BackgroundOverride;
|
|
23
|
+
baseContentId: string | null;
|
|
24
|
+
}> | Readonly<{
|
|
18
25
|
kind: 'set-boundary';
|
|
19
26
|
previousBlockId: DesignBlockId;
|
|
20
27
|
nextBlockId: DesignBlockId;
|
|
@@ -33,6 +40,9 @@ type PreviewSetLookAction = Extract<PreviewCustomizeAction, {
|
|
|
33
40
|
type PreviewSetBlockFacetAction = Extract<PreviewCustomizeAction, {
|
|
34
41
|
kind: 'set-block-facet';
|
|
35
42
|
}>;
|
|
43
|
+
type PreviewSetBackgroundAction = Extract<PreviewCustomizeAction, {
|
|
44
|
+
kind: 'set-background';
|
|
45
|
+
}>;
|
|
36
46
|
type PreviewSetBoundaryAction = Extract<PreviewCustomizeAction, {
|
|
37
47
|
kind: 'set-boundary';
|
|
38
48
|
}>;
|
|
@@ -47,5 +57,12 @@ export declare function cyclePageDesignBlockFacet(input: Readonly<{
|
|
|
47
57
|
currentValue: SystemCustomizeFacetValue;
|
|
48
58
|
direction: PreviewCustomizeCycleDirection;
|
|
49
59
|
}>): PreviewSetBlockFacetAction | null;
|
|
60
|
+
export declare function setPageDesignBlockBackground(input: Readonly<{
|
|
61
|
+
block: PageDesignEditorBlock;
|
|
62
|
+
override: BackgroundOverride;
|
|
63
|
+
currentContent?: Record<string, unknown> | null;
|
|
64
|
+
fromOverride?: BackgroundOverride;
|
|
65
|
+
imagePool?: readonly BackgroundImagePoolItem[];
|
|
66
|
+
}>): PreviewSetBackgroundAction | null;
|
|
50
67
|
export declare function cyclePageDesignBoundaryBreak(boundary: PageDesignEditorBoundary, direction: PreviewCustomizeCycleDirection): PreviewSetBoundaryAction | PreviewResetBoundaryAction | null;
|
|
51
68
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
+
import type { BackgroundImagePoolItem } from '../../../../blocks/src/system/customize/backgrounds';
|
|
2
3
|
import { type ApiClient } from '../../../../api/src/request';
|
|
3
4
|
import type { PreviewCustomizeAction } from '../blocks/previewCustomizeActions';
|
|
4
5
|
import { type PreviewPageDesignEditorApplyOutcome, type PreviewPageDesignEditorState } from './previewCustomizeWorkflowState';
|
|
@@ -6,6 +7,9 @@ export type { PreviewPageDesignEditorApplyOutcome, PreviewPageDesignEditorState,
|
|
|
6
7
|
type PageDesignEditorStateContextValue = Readonly<{
|
|
7
8
|
state: PreviewPageDesignEditorState;
|
|
8
9
|
reload: () => void;
|
|
10
|
+
backgroundImagePool: readonly BackgroundImagePoolItem[];
|
|
11
|
+
backgroundImagePoolStatus: 'idle' | 'loading' | 'loaded' | 'failed';
|
|
12
|
+
loadBackgroundImagePool: () => Promise<readonly BackgroundImagePoolItem[]>;
|
|
9
13
|
applyAction: (action: PreviewCustomizeAction) => Promise<PreviewPageDesignEditorApplyOutcome>;
|
|
10
14
|
undo: () => Promise<PreviewPageDesignEditorApplyOutcome>;
|
|
11
15
|
redo: () => Promise<PreviewPageDesignEditorApplyOutcome>;
|
|
@@ -91,8 +91,9 @@ export declare function setPaletteOverrides(state: StyleConfiguratorState, palet
|
|
|
91
91
|
/**
|
|
92
92
|
* Records the post-compile resolved selection + any fallback warnings.
|
|
93
93
|
* Used after `compileSiteThemeFromSelections` runs against a new site style:
|
|
94
|
-
* the resolver may have auto-picked a different personality
|
|
95
|
-
*
|
|
94
|
+
* the resolver may have auto-picked a different personality if the user's
|
|
95
|
+
* previous selection is not offered for the new style, or a different palette
|
|
96
|
+
* if the persisted palette ID is no longer known.
|
|
96
97
|
*
|
|
97
98
|
* Palette overrides are scoped by palette variant. If the resolver moves the
|
|
98
99
|
* preview to a different palette, the current sparse overrides are stashed
|
|
@@ -2,6 +2,7 @@ import { type AppearancePresetId, type BoundaryOptionId, type DesignBlockId, typ
|
|
|
2
2
|
import { type HistoryState } from '../../../../content-editor/src/index';
|
|
3
3
|
import type { PreviewCustomizeAction } from '../blocks/previewCustomizeActions';
|
|
4
4
|
import type { SystemCustomizeFacetHistorySelection } from '../../../../blocks/src/system/customize/facets';
|
|
5
|
+
import { type BackgroundOverride } from '../../../../blocks/src/system/customize/backgrounds';
|
|
5
6
|
type PreviewLoadedEditorModel = PageDesignEditorReadModel;
|
|
6
7
|
export type PreviewCustomizeHistoryEntry = Readonly<{
|
|
7
8
|
kind: 'layout';
|
|
@@ -17,6 +18,11 @@ export type PreviewCustomizeHistoryEntry = Readonly<{
|
|
|
17
18
|
kind: 'block-facet';
|
|
18
19
|
blockId: PreviewCustomizeActionBlockId;
|
|
19
20
|
} & SystemCustomizeFacetHistorySelection> | Readonly<{
|
|
21
|
+
kind: 'background';
|
|
22
|
+
blockId: PreviewCustomizeActionBlockId;
|
|
23
|
+
fromOverride: BackgroundOverride;
|
|
24
|
+
toOverride: BackgroundOverride;
|
|
25
|
+
}> | Readonly<{
|
|
20
26
|
kind: 'boundary';
|
|
21
27
|
boundaryId: DesignBoundaryId;
|
|
22
28
|
previousBlockId: PreviewCustomizeActionBlockId;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { navigationMenuIdentity, type NavigationMenuIdentity, type NavigationMenuIdentityInput } from '../../../api/src/navigation';
|
|
2
|
+
import { type Result } from '../../../core/src/index';
|
|
3
|
+
export type NavigationIdentityInput = NavigationMenuIdentityInput;
|
|
4
|
+
export type DuplicateNavigationIdentityError = Readonly<{
|
|
5
|
+
code: 'duplicate_navigation_identity';
|
|
6
|
+
identity: NavigationMenuIdentity;
|
|
7
|
+
menuNames: readonly string[];
|
|
8
|
+
}>;
|
|
9
|
+
export declare const navigationIdentity: typeof navigationMenuIdentity;
|
|
10
|
+
export declare function navigationIdentityMap<T extends NavigationIdentityInput>(menus: readonly T[]): Result<ReadonlyMap<NavigationMenuIdentity, T>, DuplicateNavigationIdentityError>;
|
|
11
|
+
export declare function duplicateNavigationIdentityMessage(error: DuplicateNavigationIdentityError): string;
|
|
@@ -12,6 +12,10 @@ export type CliNavigationCommandCompileError = Readonly<{
|
|
|
12
12
|
code: 'missing_local_navigation_menu';
|
|
13
13
|
name: CliNavigationMenuName;
|
|
14
14
|
message: string;
|
|
15
|
+
}> | Readonly<{
|
|
16
|
+
code: 'duplicate_navigation_identity';
|
|
17
|
+
identity: string;
|
|
18
|
+
message: string;
|
|
15
19
|
}> | CliCommandValidationCompileError;
|
|
16
20
|
export type CliNavigationCommandCompileInput = Readonly<{
|
|
17
21
|
source: CliNavigationCommandBatchSource;
|
|
@@ -35,6 +35,7 @@ export interface BlockDiff {
|
|
|
35
35
|
}
|
|
36
36
|
export interface NavigationDiff {
|
|
37
37
|
type: DiffType;
|
|
38
|
+
identifier?: string | null;
|
|
38
39
|
name: string;
|
|
39
40
|
/** List of changed field paths (for updates) */
|
|
40
41
|
changes?: string[];
|
|
@@ -135,6 +136,13 @@ export interface JsonDiffChange {
|
|
|
135
136
|
/** Status change: publish or unpublish */
|
|
136
137
|
statusChange?: 'publish' | 'unpublish';
|
|
137
138
|
}
|
|
139
|
+
export interface JsonDiffWarning {
|
|
140
|
+
type: 'duplicate_navigation_identity';
|
|
141
|
+
source: 'local' | 'remote';
|
|
142
|
+
identity: string;
|
|
143
|
+
menuNames: readonly string[];
|
|
144
|
+
message: string;
|
|
145
|
+
}
|
|
138
146
|
export interface JsonDiff {
|
|
139
147
|
summary: {
|
|
140
148
|
creates: number;
|
|
@@ -144,6 +152,7 @@ export interface JsonDiff {
|
|
|
144
152
|
unpublishes: number;
|
|
145
153
|
};
|
|
146
154
|
changes: JsonDiffChange[];
|
|
155
|
+
warnings?: readonly JsonDiffWarning[];
|
|
147
156
|
}
|
|
148
157
|
/** JSON diff output for pull --dry-run --json-diff */
|
|
149
158
|
export interface PullJsonDiff {
|
|
@@ -131,6 +131,7 @@ export interface PulledNavigationMenu {
|
|
|
131
131
|
updatedAt: string;
|
|
132
132
|
}
|
|
133
133
|
export interface NavigationMenuUpsertInput {
|
|
134
|
+
identifier?: string;
|
|
134
135
|
name: string;
|
|
135
136
|
isPrimary?: boolean;
|
|
136
137
|
isFooter?: boolean;
|
|
@@ -808,6 +809,7 @@ export interface NavigationOperations {
|
|
|
808
809
|
list(): Promise<ManagementNavigationMenu[]>;
|
|
809
810
|
get(name: string): Promise<ManagementNavigationMenu | null>;
|
|
810
811
|
upsert(input: NavigationMenuUpsertInput): Promise<ManagementNavigationMenu>;
|
|
812
|
+
delete(menuId: string): Promise<void>;
|
|
811
813
|
}
|
|
812
814
|
export interface SettingsOperations {
|
|
813
815
|
get(): Promise<ManagementSettings>;
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
import type { LinkValue, Media, TipTapNode } from '../contracts';
|
|
10
10
|
export type VisibilityLevel = 'admin' | 'designer' | 'author';
|
|
11
11
|
export type ReferenceValueFrom = 'id' | 'identifier' | 'slug';
|
|
12
|
+
export declare const SDK_ICON_PICKER_PRESETS: readonly ["cta", "feature"];
|
|
13
|
+
export type SdkIconPickerPreset = (typeof SDK_ICON_PICKER_PRESETS)[number];
|
|
12
14
|
export type MediaDeliveryOptions = {
|
|
13
15
|
sizes?: string;
|
|
14
16
|
widthCandidates?: number[];
|
|
@@ -80,7 +82,7 @@ export type FieldUi = Partial<{
|
|
|
80
82
|
thumbnailAltField: string;
|
|
81
83
|
thumbnailLabelField: string;
|
|
82
84
|
thumbnailCardDensity: 'compact' | 'comfortable';
|
|
83
|
-
iconPickerPreset:
|
|
85
|
+
iconPickerPreset: SdkIconPickerPreset;
|
|
84
86
|
contentTypeField: string;
|
|
85
87
|
fixedContentType: string;
|
|
86
88
|
valueFrom: 'id' | 'identifier' | 'slug';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { TipTapNode, TipTapMark, Media, LinkValue, InternalRouteOnlyLinkValue, InternalResolvedLinkValue, InternalLinkValue, ExternalLinkValue, CustomLinkValue, PageLinkValue, EntryLinkValue, RichTextPrimitiveProps, RichTextVariant, } from './content';
|
|
2
|
-
export type { AppointmentBookingContent, BlogListingContent, BlogPostContent, BodyTextAlignment, BodyTextContent, ButtonVariant, CalendarTabViews, CartContent, CardStylesContent, CheckoutContent, CollectionContent, ColumnsContent, ColumnOption, ContainerStylesContent, CourseDetailsContent, CourseRegistrationContent, CtaFullContent, DisplayMode, EmbedContent, EventCalendarContent, EventDetailsContent, EventLayout, EventListingContent, EventRegistrationContent, EventSpotlightContent, FaqContent, FaqItem, FilterAutoShow, FormBlockContent, GiftingContent, HeroContent, HeroCta, HeroCtaInput, HeroMedia, ImageColSize, ImageGalleryContent, LocationMapContent, LayoutAlign, LayoutWidth, MediaTextAlignment, MediaTextAspectRatio, MediaTextContent, MediaTextImagePosition, NewsletterSignupContent, NewsletterSignupPreset, ProductDetailContent, ProductListContent, SectionStylesContent, SemanticSpacing, ShopContent, SingleButtonContent, SiteFooterContent, SiteHeaderContent, StackContentAlignment, StackImagePosition, SystemBlockContentByFullKind, SystemBlockContentByKind, SystemBlockContentFor, SystemBlockShortKind, TeamMembersContent, TestimonialEntryContent, TestimonialsBlockContent, ThumbnailPadding, ThumbnailShape, VideoGridContent, WeekStart, } from './system-block-content';
|
|
2
|
+
export type { AppointmentBookingContent, BlogListingContent, BlogPostContent, BodyTextAlignment, BodyTextContent, ButtonVariant, CalendarTabViews, CartContent, CardStylesContent, CheckoutContent, CollectionContent, ColumnsContent, ColumnOption, ContainerStylesContent, CourseDetailsContent, CourseRegistrationContent, CtaFullContent, DisplayMode, EmbedContent, EventCalendarContent, EventDetailsContent, EventLayout, EventListingContent, EventRegistrationContent, EventSpotlightContent, FaqContent, FaqItem, FilterAutoShow, FormBlockContent, GiftingContent, HeroContent, HeroCta, HeroCtaInput, HeroMedia, ImageColSize, ImageGalleryContent, LocationMapContent, LayoutAlign, LayoutWidth, MediaTextAlignment, MediaTextAspectRatio, MediaTextContent, MediaTextImagePosition, NewsletterSignupContent, NewsletterSignupPreset, ProductDetailContent, ProductListContent, SectionStylesContent, SemanticIconId, SemanticSpacing, ShopContent, SingleButtonContent, SiteFooterContent, SiteHeaderContent, StackContentAlignment, StackImagePosition, SystemBlockContentByFullKind, SystemBlockContentByKind, SystemBlockContentFor, SystemBlockShortKind, TeamMembersContent, TestimonialEntryContent, TestimonialsBlockContent, ThumbnailPadding, ThumbnailShape, VideoGridContent, WeekStart, BlockIconValue, FeatureCardIconTreatment, } from './system-block-content';
|
|
3
3
|
export type { PageOutline, BlockOutline, RouteMap, RouteMapEntry, OccurrenceContextData, EntrySubrouteContextData, } from './page';
|
|
4
4
|
export type { Theme, ThemeTokens } from './theme';
|
|
5
5
|
export type { CustomCssDeclarationsInput, CustomCssRuleInput, CustomCssNestedRuleInput, CustomCssAtRuleInput, KeyframesAtRuleInput, FontFaceAtRuleInput, MediaAtRuleInput, SupportsAtRuleInput, RawAtRuleInput, } from './custom-css';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* require importing internal blocks package types.
|
|
6
6
|
*/
|
|
7
7
|
import type { LinkValue, Media, TipTapNode } from './content';
|
|
8
|
-
import type { EventCategoryId, VenueId } from '../../../core/src/index';
|
|
8
|
+
import type { Brand, EventCategoryId, VenueId } from '../../../core/src/index';
|
|
9
9
|
type UnknownRecord = Record<string, unknown>;
|
|
10
10
|
type ImageMedia = Omit<Media, 'type'> & {
|
|
11
11
|
type: 'image';
|
|
@@ -53,6 +53,20 @@ export type ContainerStylesContent = {
|
|
|
53
53
|
fullWidth?: boolean | null;
|
|
54
54
|
} | null;
|
|
55
55
|
export type CtaIconName = 'ArrowRight' | 'ArrowLeft' | 'ChevronRight' | 'ChevronLeft' | 'ChevronUp' | 'ChevronDown' | 'ExternalLink' | 'Download' | 'Upload' | 'Mail' | 'Phone' | 'Play' | 'ShoppingCart' | 'Calendar' | 'MapPin' | 'Info' | 'Plus' | 'Minus' | 'Check' | 'X';
|
|
56
|
+
export type SemanticIconId = 'protection-trust' | 'confidentiality' | 'care-support' | 'partnership' | 'warmth' | 'community' | 'personal-guidance' | 'conversation' | 'friendly-welcome' | 'insight-learning' | 'natural-wellbeing' | 'growth' | 'gentle-care' | 'special-touch' | 'ideas' | 'direction' | 'focus' | 'quality' | 'highlight' | 'verified-quality' | 'learning' | 'training' | 'programmes-dates' | 'place' | 'products' | 'packages' | 'time' | 'practical-service' | 'at-home' | 'worldwide' | 'professional-service';
|
|
57
|
+
export type BlockIconValue = {
|
|
58
|
+
kind: 'none';
|
|
59
|
+
} | {
|
|
60
|
+
kind: 'semantic';
|
|
61
|
+
iconId: SemanticIconId;
|
|
62
|
+
} | {
|
|
63
|
+
kind: 'generated';
|
|
64
|
+
setId: Brand<string, 'GeneratedIconSetId'>;
|
|
65
|
+
assetId: Brand<string, 'GeneratedIconAssetId'>;
|
|
66
|
+
semanticFallbackIconId: SemanticIconId;
|
|
67
|
+
styleGuideVersionId: Brand<string, 'SiteIconStyleGuideVersionId'>;
|
|
68
|
+
};
|
|
69
|
+
export type FeatureCardIconTreatment = 'plain' | 'soft-badge' | 'utility-badge';
|
|
56
70
|
export type RichTextDoc = {
|
|
57
71
|
type: 'doc';
|
|
58
72
|
content?: Array<{
|
|
@@ -306,6 +320,7 @@ export type FaqItem = {
|
|
|
306
320
|
answer: unknown;
|
|
307
321
|
};
|
|
308
322
|
export type FaqContent = {
|
|
323
|
+
variant?: 'default' | 'two-column' | 'question-columns' | 'split-heading-columns' | null;
|
|
309
324
|
eyebrow?: string | null;
|
|
310
325
|
title?: string | null;
|
|
311
326
|
description?: unknown;
|
|
@@ -315,6 +330,7 @@ export type FaqContent = {
|
|
|
315
330
|
export type FeatureCard = {
|
|
316
331
|
media?: Media | null;
|
|
317
332
|
aspectRatio?: StandardAspectRatio | null;
|
|
333
|
+
icon?: BlockIconValue | SemanticIconId | null;
|
|
318
334
|
title: string;
|
|
319
335
|
body?: TipTapNode | null;
|
|
320
336
|
ctas?: BlockCtaContent[] | null;
|
|
@@ -324,6 +340,7 @@ export type FeatureCardsContent = {
|
|
|
324
340
|
title?: string | null;
|
|
325
341
|
description?: TipTapNode | null;
|
|
326
342
|
columns?: '2' | '3' | '4' | null;
|
|
343
|
+
_iconTreatment?: FeatureCardIconTreatment | null;
|
|
327
344
|
cards?: FeatureCard[] | null;
|
|
328
345
|
};
|
|
329
346
|
export type HeroCta = {
|
|
@@ -502,7 +519,7 @@ export type TeamMembersContent = (TeamMembersCommonContent & {
|
|
|
502
519
|
members?: ManualTeamMemberItem[];
|
|
503
520
|
});
|
|
504
521
|
export type TestimonialsBlockContent = {
|
|
505
|
-
variant?: 'carousel' | 'grid' | null;
|
|
522
|
+
variant?: 'carousel' | 'grid' | 'split-grid' | null;
|
|
506
523
|
heading?: string | null;
|
|
507
524
|
subheading?: string | null;
|
|
508
525
|
avatarLayout?: 'above-centered' | 'inline-left' | 'hidden' | null;
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
export { createCatchAllPage } from './catch-all';
|
|
41
41
|
export { RiverbankContentLoadError, SdkContentLoadError, classifyContentLoadError, isSdkContentLoadError, toContentLoadFailureLogFields, type CatchAllContentLoadFailureContext, type CatchAllRequestContext, type ClassifiedContentLoadError, type SdkContentLoadFailure, type SdkContentLoadFailureKind, type SdkContentLoadNotFound, } from './content-load-failure';
|
|
42
42
|
export type { CreateCatchAllPageOptions, CreateCatchAllPageResult, CatchAllPageProps, CatchAllContext, ThemeSwitchConfigV1, ThemeResolverContext, } from './types';
|
|
43
|
-
export { generateAllStaticParams, validateStaticParamsEnv, pathToSlugArray, type StaticParamsEnvResult, } from './static-params';
|
|
43
|
+
export { createGenerateStaticParams, generateAllStaticParams, normalizeStaticRoutePath, validateStaticParamsEnv, pathToSlugArray, routesToStaticParams, type CreateGenerateStaticParamsOptions, type GenerateAllStaticParamsOptions, type StaticParam, type StaticParamsClient, type StaticParamsEnvResult, type StaticParamsFailureContext, type StaticParamsFailureMode, type StaticParamsRoute, } from './static-params';
|
|
44
44
|
export { createSitemap, type CreateSitemapOptions, type SitemapGenerator, } from './sitemap';
|
|
45
45
|
export { createRobots, type CreateRobotsOptions } from './robots';
|
|
46
46
|
/**
|
|
@@ -17,13 +17,34 @@
|
|
|
17
17
|
* import { createRevalidateHandler } from '@riverbankcms/sdk/next/revalidate';
|
|
18
18
|
*
|
|
19
19
|
* export const POST = createRevalidateHandler({
|
|
20
|
-
* onRevalidate: (payload, items) => {
|
|
21
|
-
* console.log(`Revalidated ${items.length} items for ${payload.event}
|
|
20
|
+
* onRevalidate: (payload, items, metadata) => {
|
|
21
|
+
* console.log(`Revalidated ${items.length} items for ${payload.event}`, metadata);
|
|
22
22
|
* },
|
|
23
23
|
* });
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
26
|
import { type WebhookPayload } from '../webhooks/verify';
|
|
27
|
+
export type NormalizedRevalidationPaths = Readonly<{
|
|
28
|
+
paths: string[];
|
|
29
|
+
invalidPaths: string[];
|
|
30
|
+
}>;
|
|
31
|
+
export type RevalidationRequestMetadata = Readonly<{
|
|
32
|
+
event: WebhookPayload['event'];
|
|
33
|
+
siteId: string;
|
|
34
|
+
dispatchId?: string;
|
|
35
|
+
pathCount: number;
|
|
36
|
+
tagCount: number;
|
|
37
|
+
itemCount: number;
|
|
38
|
+
requestId?: string;
|
|
39
|
+
correlationId?: string;
|
|
40
|
+
monitorRunId?: string;
|
|
41
|
+
}>;
|
|
42
|
+
/**
|
|
43
|
+
* Normalize a public URL path for Next revalidation.
|
|
44
|
+
*/
|
|
45
|
+
export declare function normalizeRevalidationPath(path: string): string | null;
|
|
46
|
+
export declare function normalizeRevalidationPaths(paths?: readonly string[]): NormalizedRevalidationPaths;
|
|
47
|
+
export declare function normalizeRevalidationTags(tags?: readonly string[]): string[];
|
|
27
48
|
/**
|
|
28
49
|
* Options for the revalidation handler.
|
|
29
50
|
*/
|
|
@@ -36,15 +57,15 @@ export interface RevalidateHandlerOptions {
|
|
|
36
57
|
* Callback called after successful revalidation.
|
|
37
58
|
* Useful for logging or analytics.
|
|
38
59
|
*/
|
|
39
|
-
onRevalidate?: (payload: WebhookPayload, revalidatedItems: string[]) => void;
|
|
60
|
+
onRevalidate?: (payload: WebhookPayload, revalidatedItems: string[], metadata: RevalidationRequestMetadata) => void;
|
|
40
61
|
}
|
|
41
62
|
/**
|
|
42
63
|
* Create a Next.js API route handler for webhook revalidation.
|
|
43
64
|
*
|
|
44
65
|
* The handler:
|
|
45
66
|
* 1. Verifies the webhook signature using HMAC-SHA256
|
|
46
|
-
* 2. Calls `revalidateTag()` for each tag in the payload
|
|
47
|
-
* 3. Calls `revalidatePath()`
|
|
67
|
+
* 2. Calls `revalidateTag()` for each normalized tag in the payload
|
|
68
|
+
* 3. Calls `revalidatePath()` for each normalized path in the payload
|
|
48
69
|
* 4. Returns a JSON response with the revalidation results
|
|
49
70
|
*
|
|
50
71
|
* @param options - Configuration options
|
|
@@ -11,6 +11,29 @@
|
|
|
11
11
|
* export { generateAllStaticParams as generateStaticParams };
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
|
+
import type { RiverbankClient } from '../client/types';
|
|
15
|
+
import type { RoutableContentResponse } from '../public-api/contracts';
|
|
16
|
+
export type StaticParam = Readonly<{
|
|
17
|
+
slug: string[];
|
|
18
|
+
}>;
|
|
19
|
+
export type StaticParamsRoute = Pick<RoutableContentResponse['items'][number], 'path'>;
|
|
20
|
+
export type StaticParamsClient = Pick<RiverbankClient, 'getAllPublishedRoutes'>;
|
|
21
|
+
export type StaticParamsFailureMode = 'throw' | 'fallback';
|
|
22
|
+
export type StaticParamsFailureContext = Readonly<{
|
|
23
|
+
siteId: string;
|
|
24
|
+
error: unknown;
|
|
25
|
+
reason: 'route_discovery_failed' | 'invalid_route_path';
|
|
26
|
+
path?: string;
|
|
27
|
+
}>;
|
|
28
|
+
export type CreateGenerateStaticParamsOptions = Readonly<{
|
|
29
|
+
getClient: () => StaticParamsClient | Promise<StaticParamsClient>;
|
|
30
|
+
siteId: string;
|
|
31
|
+
failureMode?: StaticParamsFailureMode;
|
|
32
|
+
fallbackPaths?: readonly string[];
|
|
33
|
+
onFailure?: (context: StaticParamsFailureContext) => void;
|
|
34
|
+
signal?: AbortSignal;
|
|
35
|
+
}>;
|
|
36
|
+
export type GenerateAllStaticParamsOptions = Pick<CreateGenerateStaticParamsOptions, 'failureMode' | 'fallbackPaths' | 'onFailure' | 'signal'>;
|
|
14
37
|
/**
|
|
15
38
|
* Environment variable validation result
|
|
16
39
|
*/
|
|
@@ -25,6 +48,7 @@ export type StaticParamsEnvResult = {
|
|
|
25
48
|
valid: false;
|
|
26
49
|
missingVars: string[];
|
|
27
50
|
};
|
|
51
|
+
export declare function dashboardUrlToApiBaseUrl(input: string): string;
|
|
28
52
|
/**
|
|
29
53
|
* Validate that all required environment variables are set.
|
|
30
54
|
*
|
|
@@ -36,6 +60,7 @@ export type StaticParamsEnvResult = {
|
|
|
36
60
|
* @returns Validation result with config or missing vars
|
|
37
61
|
*/
|
|
38
62
|
export declare function validateStaticParamsEnv(): StaticParamsEnvResult;
|
|
63
|
+
export declare function normalizeStaticRoutePath(path: string): string;
|
|
39
64
|
/**
|
|
40
65
|
* Convert a route path to a Next.js slug array.
|
|
41
66
|
*
|
|
@@ -50,6 +75,8 @@ export declare function validateStaticParamsEnv(): StaticParamsEnvResult;
|
|
|
50
75
|
* ```
|
|
51
76
|
*/
|
|
52
77
|
export declare function pathToSlugArray(path: string): string[];
|
|
78
|
+
export declare function routesToStaticParams(routes: readonly StaticParamsRoute[]): StaticParam[];
|
|
79
|
+
export declare function createGenerateStaticParams(options: CreateGenerateStaticParamsOptions): () => Promise<StaticParam[]>;
|
|
53
80
|
/**
|
|
54
81
|
* Generate static params for all published routes.
|
|
55
82
|
*
|
|
@@ -79,6 +106,4 @@ export declare function pathToSlugArray(path: string): string[];
|
|
|
79
106
|
* }
|
|
80
107
|
* ```
|
|
81
108
|
*/
|
|
82
|
-
export declare function generateAllStaticParams(): Promise<
|
|
83
|
-
slug: string[];
|
|
84
|
-
}[]>;
|
|
109
|
+
export declare function generateAllStaticParams(options?: GenerateAllStaticParamsOptions): Promise<StaticParam[]>;
|
|
@@ -810,7 +810,7 @@ export type SitemapRoutesResponse = {
|
|
|
810
810
|
pageSize: number;
|
|
811
811
|
allowIndexingInProduction: boolean;
|
|
812
812
|
};
|
|
813
|
-
export type PublicEndpointName = "getSite" | "getContentByPath" | "listPublishedEntries" | "getPublishedEntryPreview" | "getPublicFormById" | "listPublicForms" | "getPublicBookingServices" | "getPublicChallenge" | "listPublicEvents" | "batchBlockLoaders" | "listPublicCourses" | "listPublicTeamMembers" | "listPublicProducts" | "listPublicPasses" | "listPublicMemberships" | "resolveEntrySubroute" | "resolveEventOccurrence" | "checkRedirect" | "getRoutableContent" | "getPublicSitemapRoutes";
|
|
813
|
+
export type PublicEndpointName = "getSite" | "getContentByPath" | "listPublishedEntries" | "getPublishedEntryPreview" | "getPublicFormById" | "listPublicForms" | "getPublicBookingServices" | "getPublicChallenge" | "listPublicEvents" | "batchBlockLoaders" | "listPublicCourses" | "listPublicTeamMembers" | "listPublicProducts" | "listPublicPasses" | "listPublicMemberships" | "resolveEntrySubroute" | "resolveEventOccurrence" | "checkRedirect" | "getRoutableContent" | "getPublicRoutableContent" | "getPublicSitemapRoutes";
|
|
814
814
|
export type PublicAPIEndpoints = {
|
|
815
815
|
getSite: APIEndpointBase<never, {
|
|
816
816
|
id?: string;
|
|
@@ -949,6 +949,10 @@ export type PublicAPIEndpoints = {
|
|
|
949
949
|
siteId: string;
|
|
950
950
|
publishedOnly?: string;
|
|
951
951
|
}, RoutableContentResponse>;
|
|
952
|
+
getPublicRoutableContent: APIEndpointBase<never, {
|
|
953
|
+
siteId: string;
|
|
954
|
+
publishedOnly?: string;
|
|
955
|
+
}, RoutableContentResponse>;
|
|
952
956
|
getPublicSitemapRoutes: APIEndpointBase<never, {
|
|
953
957
|
siteId: string;
|
|
954
958
|
page?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ApiResult, HTTPMethod, PublicAPIEndpoints, PublicEndpointName } from './contracts';
|
|
2
|
-
export declare const PUBLIC_ENDPOINT_NAMES: readonly ["getSite", "getContentByPath", "listPublishedEntries", "getPublishedEntryPreview", "getPublicFormById", "listPublicForms", "getPublicBookingServices", "getPublicChallenge", "listPublicEvents", "batchBlockLoaders", "listPublicCourses", "listPublicTeamMembers", "listPublicProducts", "listPublicPasses", "listPublicMemberships", "resolveEntrySubroute", "resolveEventOccurrence", "checkRedirect", "getRoutableContent", "getPublicSitemapRoutes"];
|
|
2
|
+
export declare const PUBLIC_ENDPOINT_NAMES: readonly ["getSite", "getContentByPath", "listPublishedEntries", "getPublishedEntryPreview", "getPublicFormById", "listPublicForms", "getPublicBookingServices", "getPublicChallenge", "listPublicEvents", "batchBlockLoaders", "listPublicCourses", "listPublicTeamMembers", "listPublicProducts", "listPublicPasses", "listPublicMemberships", "resolveEntrySubroute", "resolveEventOccurrence", "checkRedirect", "getRoutableContent", "getPublicRoutableContent", "getPublicSitemapRoutes"];
|
|
3
3
|
export type ApiClient = <E extends PublicEndpointName>(params: {
|
|
4
4
|
endpoint: E;
|
|
5
5
|
params?: PublicAPIEndpoints[E]['query'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Webhook utilities for Riverbank SDK
|
|
3
3
|
*/
|
|
4
|
-
export { verifyWebhookSignature, parseWebhookPayload, WebhookPayloadSchema, type WebhookPayload, type ParseWebhookResult, } from './verify';
|
|
4
|
+
export { SUPPORTED_WEBHOOK_EVENTS, verifyWebhookSignature, parseWebhookPayload, RIVERBANK_SIGNATURE_PREFIX, WebhookPayloadSchema, WebhookEventSchema, normalizeRevalidationPath, parseRevalidationPath, unwrapRevalidationPath, type RevalidationPath, type RevalidationPathParseError, type RevalidationPathParseResult, type WebhookEvent, type WebhookPayload, type ParseWebhookResult, } from './verify';
|