@riverbankcms/sdk 0.103.0 → 0.104.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-DkNpCPja.mjs → PreviewEditorSidebar-CmaPXdKu.mjs} +148 -128
- package/dist/{PreviewEditorUI-DeNKtqk3.mjs → PreviewEditorUI-C5xRTh2b.mjs} +3 -3
- package/dist/{PreviewQueryProvider-ZF6TXq5Q.mjs → PreviewQueryProvider-CStABBUh.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-5bCsXK2y.mjs → SdkPreviewModeRuntime-Eks51NcN.mjs} +1204 -566
- package/dist/{SiteChromeCustomizeContext-CO1sTK_W.mjs → SiteChromeCustomizeContext-Bt8zb3qu.mjs} +5330 -4533
- package/dist/_dts/api/src/bookingVerticals.d.ts +64 -1
- package/dist/_dts/api/src/contentRuntime.d.ts +6 -3
- package/dist/_dts/api/src/endpoints.d.ts +10 -3
- package/dist/_dts/api/src/index.d.ts +1 -1
- package/dist/_dts/api/src/siteIcons.d.ts +39 -43
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +3 -3
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +36 -7
- package/dist/_dts/block-form/src/widgets/SliderField/SliderField.d.ts +3 -3
- package/dist/_dts/block-form/src/widgets/SliderField/sliderValue.d.ts +36 -0
- package/dist/_dts/block-form/src/widgets/utils/readNumericUiConfig.d.ts +3 -0
- package/dist/_dts/blocks/src/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/feature-card-icons.d.ts +29 -29
- package/dist/_dts/blocks/src/system/blocks/feature-cards.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +135 -0
- package/dist/_dts/blocks/src/system/icons/generatedAssets.d.ts +28 -0
- package/dist/_dts/blocks/src/system/icons/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/icons/value.d.ts +3 -6
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +240 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/feature-card-icon.d.ts +1 -0
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +2 -0
- package/dist/_dts/content-editor/src/ui/stores/generatedIconAssetsStore.d.ts +9 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +208 -0
- package/dist/_dts/editor/src/index.d.ts +3 -1
- package/dist/_dts/editor/src/primitives/rich-text/RichTextEditorSurface.d.ts +14 -6
- package/dist/_dts/editor/src/primitives/rich-text/RichTextToolbar.d.ts +23 -4
- package/dist/_dts/editor/src/primitives/rich-text/config.d.ts +6 -0
- package/dist/_dts/editor/src/primitives/rich-text/extensions/RichTextLink.d.ts +1 -0
- package/dist/_dts/editor/src/primitives/rich-text/paste.d.ts +10 -0
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +7 -0
- package/dist/_dts/editor-blocks/src/BlockForm.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +4 -4
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardBody.d.ts +2 -3
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +4 -4
- package/dist/_dts/editor-blocks/src/block-editor/FeatureCardIconsPanel.d.ts +4 -4
- package/dist/_dts/editor-blocks/src/block-editor/GeneratedIconSetDialog.d.ts +3 -3
- package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +2 -3
- package/dist/_dts/editor-blocks/src/block-editor/blockHeaderActionPlan.d.ts +1 -5
- package/dist/_dts/editor-blocks/src/block-editor/featureCardIconActions.d.ts +25 -19
- package/dist/_dts/editor-blocks/src/block-editor/generatedIconApplyCoordination.d.ts +32 -0
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/GeneratedIconLibraryContext.d.ts +28 -0
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/index.d.ts +2 -0
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/loaders.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/preview/CustomizeBackgroundControlRows.d.ts +15 -0
- package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/EntrySlotBlockEditorPanel.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +4 -3
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +4 -3
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +4 -3
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +3 -4
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +5 -4
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +44 -18
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +4 -5
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +22 -1
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +12 -4
- package/dist/_dts/sdk/src/client/management/types.d.ts +3 -0
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +0 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -2
- package/dist/_dts/sdk/src/version.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 +9 -9
- package/dist/_dts/theme-core/src/navigation/types.d.ts +2 -0
- package/dist/_dts/theme-core/src/palette/colors.d.ts +84 -0
- package/dist/_dts/theme-core/src/palette/{variants → curated}/brand-led.d.ts +12 -24
- package/dist/_dts/theme-core/src/palette/{variants → curated}/high-contrast.d.ts +9 -18
- package/dist/_dts/theme-core/src/palette/{variants → curated}/index.d.ts +67 -119
- package/dist/_dts/theme-core/src/palette/{variants → curated}/soft-natural.d.ts +12 -24
- package/dist/_dts/theme-core/src/palette/{variants → curated}/types.d.ts +50 -60
- package/dist/_dts/theme-core/src/palette/{variants → curated}/warm-dark.d.ts +6 -12
- package/dist/_dts/theme-core/src/palette/{variants → curated}/warm-neutral.d.ts +12 -24
- package/dist/_dts/theme-core/src/palette/editorState.d.ts +45 -0
- package/dist/_dts/theme-core/src/palette/index.d.ts +25 -14
- package/dist/_dts/theme-core/src/palette/legacyRuntimeProjection.d.ts +55 -0
- package/dist/_dts/theme-core/src/palette/legacySelection.d.ts +34 -0
- package/dist/_dts/theme-core/src/palette/libraryModel.d.ts +58 -0
- package/dist/_dts/theme-core/src/palette/paletteCompatibilityTransition.d.ts +232 -0
- package/dist/_dts/theme-core/src/palette/persistenceReadSource.d.ts +118 -0
- package/dist/_dts/theme-core/src/palette/resolveSelection.d.ts +50 -0
- package/dist/_dts/theme-core/src/palette/selection.d.ts +72 -0
- package/dist/_dts/theme-core/src/palette/sitePalettePersistence.d.ts +34 -0
- package/dist/_dts/theme-core/src/palette/themePaletteCompatibility.d.ts +58 -0
- package/dist/_dts/theme-core/src/schema.d.ts +9 -0
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +22 -22
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +31 -9
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +22 -16
- package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +6 -5
- package/dist/_dts/theme-core/src/site-styles/themeParity.d.ts +21 -0
- package/dist/_dts/ui/src/palette/PaletteTokenEditor.d.ts +2 -1
- package/dist/cli/index.mjs +7805 -7449
- package/dist/client/{DiscountCodeDisclosure-ChVZwVtS.mjs → DiscountCodeDisclosure-Dit2aItR.mjs} +1 -1
- package/dist/client/{EventCombined.client-PZtXbH6R.mjs → EventCombined.client-BnREyCjf.mjs} +3 -3
- package/dist/client/{EventListing.client-C4AMTXec.mjs → EventListing.client-0uHld51x.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-B0w8_i0u.mjs → LeafletStaticMap-DJcvSfmj.mjs} +1 -1
- package/dist/client/{MagicLinkForm-DF0ZGhIu.mjs → MagicLinkForm-EAsIktfw.mjs} +2 -2
- package/dist/client/{StepIndicator-PccQ89Ct.mjs → StepIndicator-CRR17tYI.mjs} +2 -2
- package/dist/client/{accordion-CTNWT1lk.mjs → accordion-B47HIuuH.mjs} +1 -1
- package/dist/client/{bookingForm-DYixwPqP.mjs → bookingForm-I1E-8F9P.mjs} +6 -6
- package/dist/client/{buttons-CySQwlFs.mjs → buttons-BbPn8OKA.mjs} +1 -1
- package/dist/client/{carousel-W75iYR0M.mjs → carousel-OlM7SyBs.mjs} +1 -1
- package/dist/client/{cart-Ca_DGWQq.mjs → cart-BKpG5jz6.mjs} +3 -3
- package/dist/client/{checkout-STgKTsNh.mjs → checkout-Dmmr6qoU.mjs} +3 -3
- package/dist/client/client.mjs +8706 -8320
- package/dist/client/{courseRegistration-DQI1cu1u.mjs → courseRegistration-CflZiqGk.mjs} +7 -7
- package/dist/client/{eventCalendar-BJrHpofg.mjs → eventCalendar-BvoLWcp-.mjs} +5 -5
- package/dist/client/{eventCombined-DPtqBHaH.mjs → eventCombined-DsrO8t_t.mjs} +2 -2
- package/dist/client/{eventDetails-Brt31CDo.mjs → eventDetails-C3hxgcJm.mjs} +3 -3
- package/dist/client/{eventListing-BrClHJOq.mjs → eventListing-C-hb237X.mjs} +2 -2
- package/dist/client/{eventRegistration-DxlNlVUC.mjs → eventRegistration-B0gyzDGi.mjs} +7 -7
- package/dist/client/{form-Vp5cGzDF.mjs → form-C_RUi6oJ.mjs} +2 -2
- package/dist/client/{headerSection-DL2xjRgW.mjs → headerSection-IKQiD2U0.mjs} +3 -3
- package/dist/client/hooks.mjs +4845 -4663
- package/dist/client/{locationMap-B0EjoXQS.mjs → locationMap-8ZBrMzRJ.mjs} +2 -2
- package/dist/client/{newsletterForm-BlV9VRlq.mjs → newsletterForm-CYk3ucwj.mjs} +2 -2
- package/dist/client/{pricing-DmRD7Tjx.mjs → pricing-B5GmvfIH.mjs} +1 -1
- package/dist/client/{productDetail-BLTQsY2f.mjs → productDetail-BjS2Dqzo.mjs} +3 -3
- package/dist/client/{productList-R8lsMpRs.mjs → productList-BOHvC8My.mjs} +3 -3
- package/dist/client/{propsDecoder-DgAshF92.mjs → propsDecoder-WS6UEJwZ.mjs} +7 -0
- package/dist/client/rendering/client.mjs +3606 -3281
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +8569 -8190
- package/dist/client/{shop-DWjyje1s.mjs → shop-CON03-wN.mjs} +6 -6
- package/dist/client/{shop-commerce-CSKCR87d.mjs → shop-commerce-DlqrFgH8.mjs} +5 -5
- package/dist/client/{shop-commerce-store-DxPnE-iN.mjs → shop-commerce-store-l74-Kne6.mjs} +1 -1
- package/dist/client/{shopShared-OOeAkFq7.mjs → shopShared-CQheEXSg.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-Bp6X7XgG.mjs → useDiscountCodeUi-v6OluyWl.mjs} +1 -1
- package/dist/client/{useEventFilters-B489x9TO.mjs → useEventFilters-BqSTcNOf.mjs} +3 -3
- package/dist/client/{usePolling-BKP66stL.mjs → usePolling-DMfADjIF.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +10 -3
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +10 -3
- package/dist/{previewAuthStore-ByPPZqmp.mjs → previewAuthStore-CfquDtTh.mjs} +10 -3
- package/dist/{sdk-runtime-C8whifOy.mjs → sdk-runtime-BUmJ0DaT.mjs} +2 -2
- package/dist/{separator-CM2C5Axs.mjs → separator-Dd-JYok7.mjs} +1 -1
- package/dist/server/components.mjs +9871 -9557
- package/dist/server/config-validation.mjs +4869 -4687
- package/dist/server/config.mjs +4869 -4687
- package/dist/server/data.mjs +4846 -4664
- package/dist/server/index.mjs +11 -4
- package/dist/server/next.mjs +8665 -8344
- package/dist/server/page-converter.mjs +4749 -4575
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +9816 -9586
- package/dist/server/rendering.mjs +9880 -9566
- package/dist/server/routing.mjs +4975 -4704
- package/dist/server/server.mjs +4819 -4630
- package/dist/server/theme-bridge.mjs +207 -114
- package/dist/server/theme.mjs +92 -91
- package/dist/styles/index.css +20 -0
- package/package.json +1 -1
|
@@ -9,9 +9,6 @@ export type BlockHeaderCustomizeAction = Readonly<{
|
|
|
9
9
|
blockId: EditorBlockId;
|
|
10
10
|
}>;
|
|
11
11
|
export type BlockHeaderMenuAction = BlockHeaderCustomizeAction | Readonly<{
|
|
12
|
-
kind: 'suggest-icons';
|
|
13
|
-
disabled: boolean;
|
|
14
|
-
}> | Readonly<{
|
|
15
12
|
kind: 'generated-icon-set';
|
|
16
13
|
disabled: boolean;
|
|
17
14
|
stale: boolean;
|
|
@@ -37,7 +34,6 @@ export type DeriveBlockHeaderActionPlanInput = Readonly<{
|
|
|
37
34
|
blockId: EditorBlockId | null;
|
|
38
35
|
settingsAvailable: boolean;
|
|
39
36
|
featureCardIconActionsAvailable: boolean;
|
|
40
|
-
featureCardIconsComplete: boolean;
|
|
41
37
|
generatedIconSetActionsAvailable: boolean;
|
|
42
38
|
hasStaleGeneratedIcons: boolean;
|
|
43
39
|
featureCardIconDialogCardsCount: number;
|
|
@@ -46,4 +42,4 @@ export type DeriveBlockHeaderActionPlanInput = Readonly<{
|
|
|
46
42
|
deleteAvailable: boolean;
|
|
47
43
|
deleteDisabled: boolean;
|
|
48
44
|
}>;
|
|
49
|
-
export declare function deriveBlockHeaderActionPlan({ actionPresentation, blockId, settingsAvailable, featureCardIconActionsAvailable,
|
|
45
|
+
export declare function deriveBlockHeaderActionPlan({ actionPresentation, blockId, settingsAvailable, featureCardIconActionsAvailable, generatedIconSetActionsAvailable, hasStaleGeneratedIcons, featureCardIconDialogCardsCount, duplicateAvailable, duplicateDisabled, deleteAvailable, deleteDisabled, }: DeriveBlockHeaderActionPlanInput): BlockHeaderActionPlan;
|
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type GeneratedBlockIconValue, type GeneratedIconAssetId, type FeatureCardIconInputContent, type SemanticIconId, type SiteIconStyleGuideVersionId } from '../../../blocks/src/index';
|
|
2
2
|
import { type EditorBlockId } from '../../../core/src/index';
|
|
3
3
|
import type { DraftsSlice } from './types';
|
|
4
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
5
|
export type FeatureCardGeneratedIconSetAssetInput = Readonly<{
|
|
19
6
|
cardKey: string;
|
|
20
7
|
iconValue: unknown;
|
|
@@ -55,6 +42,30 @@ export type FeatureCardIconDialogCard = Readonly<{
|
|
|
55
42
|
bodyText: string;
|
|
56
43
|
semanticIconId: SemanticIconId;
|
|
57
44
|
}>;
|
|
45
|
+
export type GeneratedIconSetCompatibility = Readonly<{
|
|
46
|
+
kind: 'exact_match';
|
|
47
|
+
}> | Readonly<{
|
|
48
|
+
kind: 'key_match_content_changed';
|
|
49
|
+
}> | Readonly<{
|
|
50
|
+
kind: 'set_incomplete';
|
|
51
|
+
unavailableAssetIds: readonly GeneratedIconAssetId[];
|
|
52
|
+
}> | Readonly<{
|
|
53
|
+
kind: 'structural_mismatch';
|
|
54
|
+
}> | Readonly<{
|
|
55
|
+
kind: 'source_metadata_unavailable';
|
|
56
|
+
}>;
|
|
57
|
+
type GeneratedIconSetSourceCard = Readonly<{
|
|
58
|
+
cardKey: string;
|
|
59
|
+
title: string;
|
|
60
|
+
bodyText: string;
|
|
61
|
+
semanticIconId: string;
|
|
62
|
+
}>;
|
|
63
|
+
export declare function planGeneratedIconSetCompatibility(input: Readonly<{
|
|
64
|
+
sourceFingerprintVersion: number | null;
|
|
65
|
+
sourceCards: readonly GeneratedIconSetSourceCard[] | null;
|
|
66
|
+
currentCards: readonly FeatureCardIconDialogCard[];
|
|
67
|
+
unavailableAssetIds: readonly GeneratedIconAssetId[];
|
|
68
|
+
}>): GeneratedIconSetCompatibility;
|
|
58
69
|
export type FeatureCardGeneratedIconStyleSummary = Readonly<{
|
|
59
70
|
kind: 'unavailable';
|
|
60
71
|
}> | Readonly<{
|
|
@@ -67,11 +78,6 @@ export declare function getFeatureCards(content: Record<string, unknown> | null
|
|
|
67
78
|
export declare function getFeatureCardIconStatus(content: Record<string, unknown> | null | undefined): import("../../../blocks/src/index").FeatureCardIconCompletion;
|
|
68
79
|
export declare function getFeatureCardIconDialogCards(content: Record<string, unknown> | null | undefined): readonly FeatureCardIconDialogCard[];
|
|
69
80
|
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
81
|
export declare function planGeneratedFeatureCardIconSetApply(cards: readonly FeatureCardIconInputContent[], assets: readonly FeatureCardGeneratedIconSetAssetInput[]): FeatureCardGeneratedIconSetApplyPlan;
|
|
76
82
|
export declare function applyGeneratedFeatureCardIconSet({ blockId, content, drafts, assets, }: {
|
|
77
83
|
blockId: EditorBlockId;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type GeneratedBlockIconRenderAssetInput } from '../../../blocks/src/system/icons/index';
|
|
2
|
+
import type { EditorBlockId } from '../../../core/src/index';
|
|
3
|
+
import type { DraftsSlice, UiStore } from './types';
|
|
4
|
+
import { type FeatureCardGeneratedIconSetActionResult } from './featureCardIconActions';
|
|
5
|
+
import type { GeneratedIconSetPreview } from './GeneratedIconSetDialog';
|
|
6
|
+
export type GeneratedIconApplyState = {
|
|
7
|
+
drafts: Pick<DraftsSlice, 'setAtPath'>;
|
|
8
|
+
generatedIconAssets: {
|
|
9
|
+
setForBlock: (blockId: EditorBlockId, assets: readonly GeneratedBlockIconRenderAssetInput[]) => void;
|
|
10
|
+
};
|
|
11
|
+
autosave: {
|
|
12
|
+
saveNow: (types: 'blocks'[]) => void;
|
|
13
|
+
blocks?: Readonly<{
|
|
14
|
+
status: 'idle' | 'saving' | 'success' | 'error';
|
|
15
|
+
lastSavedAt: string | null;
|
|
16
|
+
hasFailedSaves: boolean;
|
|
17
|
+
}>;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export type GeneratedIconApplyStore = UiStore<GeneratedIconApplyState>;
|
|
21
|
+
export type CoordinatedGeneratedIconApplyResult = FeatureCardGeneratedIconSetActionResult | Readonly<{
|
|
22
|
+
kind: 'invalid_render_asset';
|
|
23
|
+
cardKey: string;
|
|
24
|
+
}> | Readonly<{
|
|
25
|
+
kind: 'autosave_failed';
|
|
26
|
+
}>;
|
|
27
|
+
export declare function applyGeneratedIconSetToEditor({ blockId, content, preview, uiStore, }: {
|
|
28
|
+
blockId: EditorBlockId;
|
|
29
|
+
content: Record<string, unknown> | null | undefined;
|
|
30
|
+
preview: GeneratedIconSetPreview;
|
|
31
|
+
uiStore: GeneratedIconApplyStore;
|
|
32
|
+
}): Promise<CoordinatedGeneratedIconApplyResult>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { GeneratedIconLibrarySet } from '../../../../api/src/index';
|
|
3
|
+
export type GeneratedIconLibraryLoadState = Readonly<{
|
|
4
|
+
kind: 'loading';
|
|
5
|
+
sets: readonly GeneratedIconLibrarySet[];
|
|
6
|
+
nextCursor: string | null;
|
|
7
|
+
}> | Readonly<{
|
|
8
|
+
kind: 'loading_more';
|
|
9
|
+
sets: readonly GeneratedIconLibrarySet[];
|
|
10
|
+
nextCursor: string;
|
|
11
|
+
}> | Readonly<{
|
|
12
|
+
kind: 'ready';
|
|
13
|
+
sets: readonly GeneratedIconLibrarySet[];
|
|
14
|
+
nextCursor: string | null;
|
|
15
|
+
}> | Readonly<{
|
|
16
|
+
kind: 'failed';
|
|
17
|
+
sets: readonly GeneratedIconLibrarySet[];
|
|
18
|
+
nextCursor: string | null;
|
|
19
|
+
message: string;
|
|
20
|
+
}>;
|
|
21
|
+
export type GeneratedIconLibraryState = GeneratedIconLibraryLoadState & Readonly<{
|
|
22
|
+
loadMore: (() => void) | null;
|
|
23
|
+
}>;
|
|
24
|
+
export declare function GeneratedIconLibraryProvider({ value, children, }: {
|
|
25
|
+
value: GeneratedIconLibraryState;
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
}): import("react").JSX.Element;
|
|
28
|
+
export declare function useGeneratedIconLibrary(): GeneratedIconLibraryState;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ApiClient } from '../../../../api/src/request';
|
|
2
|
+
import type { GeneratedIconSetListResponse } from '../../../../api/src/index';
|
|
3
|
+
export declare function loadGeneratedIconLibraryPage(apiClient: ApiClient, input: Readonly<{
|
|
4
|
+
siteId: string;
|
|
5
|
+
cursor?: string;
|
|
6
|
+
limit?: number;
|
|
7
|
+
}>): Promise<GeneratedIconSetListResponse>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type CustomizeBackgroundCycleDirection = 'prev' | 'next';
|
|
3
|
+
export declare function CustomizeBackgroundControlRows({ modeLabel, valueLabel, valueAriaLabel, swatch, chooserOpen, chooser, canCycleMode, canCycleValue, onCycleMode, onCycleValue, onToggleChooser, }: Readonly<{
|
|
4
|
+
modeLabel: string;
|
|
5
|
+
valueLabel: string;
|
|
6
|
+
valueAriaLabel: string;
|
|
7
|
+
swatch: React.ReactNode;
|
|
8
|
+
chooserOpen: boolean;
|
|
9
|
+
chooser?: React.ReactNode;
|
|
10
|
+
canCycleMode: boolean;
|
|
11
|
+
canCycleValue: boolean;
|
|
12
|
+
onCycleMode: (direction: CustomizeBackgroundCycleDirection, event: React.MouseEvent) => void;
|
|
13
|
+
onCycleValue: (direction: CustomizeBackgroundCycleDirection, event: React.MouseEvent) => void;
|
|
14
|
+
onToggleChooser: (event: React.MouseEvent) => void;
|
|
15
|
+
}>): React.JSX.Element;
|
|
@@ -10,6 +10,7 @@ import type { PreviewEditorSidebarProps, PreviewTemplateData } from './PreviewEd
|
|
|
10
10
|
import { type PreviewLinkedEntrySidebarSection } from './PreviewSidebarSection';
|
|
11
11
|
type EntryEditorPanelProps = {
|
|
12
12
|
siteId: string;
|
|
13
|
+
dashboardBaseUrl?: string | null;
|
|
13
14
|
entryData: NonNullable<PreviewEditorSidebarProps['entryData']>;
|
|
14
15
|
contentTypeSchema?: ContentTypeSchema | null;
|
|
15
16
|
referenceContentTypeKeys: readonly string[];
|
|
@@ -32,5 +33,5 @@ type EntryEditorPanelProps = {
|
|
|
32
33
|
onViewportWidthChange: (width: ViewportWidth) => void;
|
|
33
34
|
onZoomChange: (zoom: ZoomLevel) => void;
|
|
34
35
|
};
|
|
35
|
-
export declare function EntryEditorPanel({ siteId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, theme, apiClient, bearerToken, supabaseUrl, entrySubrouteContext, metadataPanel, linkedEntrySection, mediaAssets, widgets, sdkConfig, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange, }: EntryEditorPanelProps): React.JSX.Element;
|
|
36
|
+
export declare function EntryEditorPanel({ siteId, dashboardBaseUrl, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, theme, apiClient, bearerToken, supabaseUrl, entrySubrouteContext, metadataPanel, linkedEntrySection, mediaAssets, widgets, sdkConfig, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange, }: EntryEditorPanelProps): React.JSX.Element;
|
|
36
37
|
export {};
|
|
@@ -5,6 +5,7 @@ import type { FieldWidgetComponent } from "../../../../block-form/src/client/ind
|
|
|
5
5
|
import type { SdkConfigForBlockPicker } from "../../../../editor-blocks/src/index";
|
|
6
6
|
type EntrySlotBlockEditorPanelProps = {
|
|
7
7
|
siteId: string;
|
|
8
|
+
dashboardBaseUrl?: string | null;
|
|
8
9
|
typeKey: string;
|
|
9
10
|
entryId: string;
|
|
10
11
|
theme?: Theme | null;
|
|
@@ -15,5 +16,5 @@ type EntrySlotBlockEditorPanelProps = {
|
|
|
15
16
|
mediaAssets?: MediaAssetIndexItem[];
|
|
16
17
|
widgets: Record<string, FieldWidgetComponent>;
|
|
17
18
|
};
|
|
18
|
-
export declare function EntrySlotBlockEditorPanel({ siteId, typeKey, entryId, theme, apiClient, bearerToken, supabaseUrl, sdkConfig, mediaAssets, widgets, }: EntrySlotBlockEditorPanelProps): React.JSX.Element | null;
|
|
19
|
+
export declare function EntrySlotBlockEditorPanel({ siteId, dashboardBaseUrl, typeKey, entryId, theme, apiClient, bearerToken, supabaseUrl, sdkConfig, mediaAssets, widgets, }: EntrySlotBlockEditorPanelProps): React.JSX.Element | null;
|
|
19
20
|
export {};
|
|
@@ -10,6 +10,7 @@ import { type PreviewLinkedEntrySidebarSection } from './PreviewSidebarSection';
|
|
|
10
10
|
type PageBlockEditorPanelProps = {
|
|
11
11
|
siteId: string;
|
|
12
12
|
pageId: string;
|
|
13
|
+
dashboardBaseUrl?: string | null;
|
|
13
14
|
theme?: Theme | null;
|
|
14
15
|
apiClient: ApiClient;
|
|
15
16
|
bearerToken?: string | null;
|
|
@@ -32,5 +33,5 @@ type PageBlockEditorPanelProps = {
|
|
|
32
33
|
onViewportWidthChange: (width: ViewportWidth) => void;
|
|
33
34
|
onZoomChange: (zoom: ZoomLevel) => void;
|
|
34
35
|
};
|
|
35
|
-
export declare function PageBlockEditorPanel({ siteId, pageId, theme, apiClient, bearerToken, supabaseUrl, blockItems, uiStoreForBlockEditor, blockEditorRef, onBlocksChange, metadataPanel, linkedEntrySection, designPanel, designOpenRequestId, sdkConfig, mediaAssets, bookingOfferingPresets, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange, }: PageBlockEditorPanelProps): React.JSX.Element;
|
|
36
|
+
export declare function PageBlockEditorPanel({ siteId, pageId, dashboardBaseUrl, theme, apiClient, bearerToken, supabaseUrl, blockItems, uiStoreForBlockEditor, blockEditorRef, onBlocksChange, metadataPanel, linkedEntrySection, designPanel, designOpenRequestId, sdkConfig, mediaAssets, bookingOfferingPresets, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange, }: PageBlockEditorPanelProps): React.JSX.Element;
|
|
36
37
|
export {};
|
|
@@ -6,7 +6,7 @@ import type { EntrySubrouteContextData, BookingOfferingPresetSummary, MediaAsset
|
|
|
6
6
|
import { type ContentTypeSchema } from "../../../../content-model/src/index";
|
|
7
7
|
import { type ZoomLevel } from "../../../../content-editor/src/index";
|
|
8
8
|
import type { ButtonPersonalityId } from "../../../../theme-core/src/buttons/index";
|
|
9
|
-
import type { PaletteOverrides,
|
|
9
|
+
import type { CuratedPaletteId, PaletteOverrides, RuntimePaletteState } from "../../../../theme-core/src/palette/index";
|
|
10
10
|
import type { FooterSelectionContext, FooterLookId, HeaderLayoutId, HeaderSelectionContext, HeaderLookId, HeaderStyleId, TypographyPresetId } from "../../../../theme-core/src/site-styles/index";
|
|
11
11
|
import type { PreviewDesignRow } from "./sidebarTabPreference";
|
|
12
12
|
import type { ViewportMode, ViewportWidth } from "./PreviewViewportControls";
|
|
@@ -37,7 +37,8 @@ export type PreviewEditorSidebarProps = {
|
|
|
37
37
|
themeSelectionUpdatedAt?: string | null;
|
|
38
38
|
/** Persisted Style configurator selections (Phase C / E). */
|
|
39
39
|
themeSelectionButtonPersonalityId?: ButtonPersonalityId | null;
|
|
40
|
-
|
|
40
|
+
runtimePaletteState?: RuntimePaletteState | null;
|
|
41
|
+
themeSelectionPaletteVariantId?: CuratedPaletteId | null;
|
|
41
42
|
themeSelectionPaletteOverrides?: PaletteOverrides | null;
|
|
42
43
|
themeSelectionHeaderLayoutId?: HeaderLayoutId | null;
|
|
43
44
|
themeSelectionHeaderStyleId?: HeaderStyleId | null;
|
|
@@ -71,4 +72,4 @@ export type PreviewEditorSidebarProps = {
|
|
|
71
72
|
onViewportWidthChange: (width: ViewportWidth) => void;
|
|
72
73
|
onZoomChange: (zoom: ZoomLevel) => void;
|
|
73
74
|
};
|
|
74
|
-
export declare function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, theme, themeId, themeSelectionId, themeSelectionVersion, themeSelectionUpdatedAt, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, themeSelectionHeaderLayoutId, themeSelectionHeaderStyleId, themeSelectionTypographyPresetId, themeSelectionTypographyBodyFontOverride, themeSelectionTypographyHeadingFontOverride, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, themeSelectionFooterContext, designRowRequest, apiClient, bearerToken, supabaseUrl, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, bookingOfferingPresets, siteStyleAccess, activeTab, onTabChange, onClose, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange, }: PreviewEditorSidebarProps): React.JSX.Element;
|
|
75
|
+
export declare function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, theme, themeId, themeSelectionId, themeSelectionVersion, themeSelectionUpdatedAt, themeSelectionButtonPersonalityId, runtimePaletteState, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, themeSelectionHeaderLayoutId, themeSelectionHeaderStyleId, themeSelectionTypographyPresetId, themeSelectionTypographyBodyFontOverride, themeSelectionTypographyHeadingFontOverride, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, themeSelectionFooterContext, designRowRequest, apiClient, bearerToken, supabaseUrl, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, bookingOfferingPresets, siteStyleAccess, activeTab, onTabChange, onClose, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange, }: PreviewEditorSidebarProps): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { type ComponentProps, type ReactNode } from 'react';
|
|
2
2
|
import { BlockApiProvider } from '../../../../blocks/src/client';
|
|
3
3
|
import type { ButtonPersonalityId } from '../../../../theme-core/src/buttons/index';
|
|
4
|
-
import type {
|
|
4
|
+
import type { CuratedPaletteId, PaletteOverrides } from '../../../../theme-core/src/palette/index';
|
|
5
5
|
import type { FooterSelectionContext, FooterLookId, HeaderLayoutId, HeaderSelectionContext, HeaderLookId, HeaderStyleId, TypographyPresetId } from '../../../../theme-core/src/site-styles/index';
|
|
6
6
|
import type { EntrySubrouteContextData, BookingOfferingPresetSummary, MediaAssetIndexItem, Theme } from '../../../../blocks/src/index';
|
|
7
7
|
import type { ContentTypeSchema } from '../../../../content-model/src/index';
|
|
@@ -43,7 +43,8 @@ export type PreviewShellProps = {
|
|
|
43
43
|
* and sparse overrides instead of falling back to the site style defaults.
|
|
44
44
|
*/
|
|
45
45
|
themeSelectionButtonPersonalityId?: ButtonPersonalityId | null;
|
|
46
|
-
|
|
46
|
+
runtimePaletteState?: import('../../../../theme-core/src/palette/index').RuntimePaletteState | null;
|
|
47
|
+
themeSelectionPaletteVariantId?: CuratedPaletteId | null;
|
|
47
48
|
themeSelectionPaletteOverrides?: PaletteOverrides | null;
|
|
48
49
|
themeSelectionHeaderLayoutId?: HeaderLayoutId | null;
|
|
49
50
|
themeSelectionHeaderStyleId?: HeaderStyleId | null;
|
|
@@ -76,7 +77,7 @@ export type PreviewShellProps = {
|
|
|
76
77
|
designEditorEligibility?: PreviewDesignEditorEligibility;
|
|
77
78
|
baseFetch?: BaseFetch;
|
|
78
79
|
};
|
|
79
|
-
export declare function PreviewShell({ children, apiBaseUrl, blockApiConfig, siteId, siteSlug, editableId, previewSession, previewToken, dashboardBaseUrl, surfaceId, theme, themeId, themeSelectionId, themeSelectionVersion, themeSelectionUpdatedAt, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, themeSelectionHeaderLayoutId, themeSelectionHeaderStyleId, themeSelectionTypographyPresetId, themeSelectionTypographyBodyFontOverride, themeSelectionTypographyHeadingFontOverride, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, themeSelectionFooterContext, pageId, routeId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, initialStatus, initialBlocks, pageMetadata, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, bookingOfferingPresets, supabaseUrl, themeRuntime, designEditorEligibility, baseFetch, }: PreviewShellProps): React.JSX.Element;
|
|
80
|
+
export declare function PreviewShell({ children, apiBaseUrl, blockApiConfig, siteId, siteSlug, editableId, previewSession, previewToken, dashboardBaseUrl, surfaceId, theme, themeId, themeSelectionId, themeSelectionVersion, themeSelectionUpdatedAt, themeSelectionButtonPersonalityId, runtimePaletteState, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, themeSelectionHeaderLayoutId, themeSelectionHeaderStyleId, themeSelectionTypographyPresetId, themeSelectionTypographyBodyFontOverride, themeSelectionTypographyHeadingFontOverride, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, themeSelectionFooterContext, pageId, routeId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, initialStatus, initialBlocks, pageMetadata, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, bookingOfferingPresets, supabaseUrl, themeRuntime, designEditorEligibility, baseFetch, }: PreviewShellProps): React.JSX.Element;
|
|
80
81
|
export declare function defaultDesignEditorEligibility(input: Readonly<{
|
|
81
82
|
pageId: string | null;
|
|
82
83
|
entryData?: PreviewContentEntryData | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { type ReactNode } from "react";
|
|
2
2
|
import { type EntrySubrouteContextData, type BookingOfferingPresetSummary, type MediaAssetIndexItem, type Theme } from "../../../../blocks/src/index";
|
|
3
3
|
import type { ButtonPersonalityId } from "../../../../theme-core/src/buttons/index";
|
|
4
|
-
import type {
|
|
4
|
+
import type { CuratedPaletteId, PaletteOverrides } from "../../../../theme-core/src/palette/index";
|
|
5
5
|
import type { FooterSelectionContext, HeaderSelectionContext, FooterLookId, HeaderLayoutId, HeaderLookId, HeaderStyleId, TypographyPresetId } from "../../../../theme-core/src/site-styles/index";
|
|
6
6
|
import type { ContentTypeSchema } from "../../../../content-model/src/index";
|
|
7
7
|
import type { ApiClient } from "../../../../api/src/request";
|
|
@@ -29,7 +29,8 @@ export type PreviewShellLayoutProps = {
|
|
|
29
29
|
themeSelectionVersion?: number | null;
|
|
30
30
|
themeSelectionUpdatedAt?: string | null;
|
|
31
31
|
themeSelectionButtonPersonalityId?: ButtonPersonalityId | null;
|
|
32
|
-
|
|
32
|
+
runtimePaletteState?: import('../../../../theme-core/src/palette/index').RuntimePaletteState | null;
|
|
33
|
+
themeSelectionPaletteVariantId?: CuratedPaletteId | null;
|
|
33
34
|
themeSelectionPaletteOverrides?: PaletteOverrides | null;
|
|
34
35
|
themeSelectionHeaderLayoutId?: HeaderLayoutId | null;
|
|
35
36
|
themeSelectionHeaderStyleId?: HeaderStyleId | null;
|
|
@@ -51,4 +52,4 @@ export type PreviewShellLayoutProps = {
|
|
|
51
52
|
themeRuntime?: PreviewThemeRuntime;
|
|
52
53
|
siteStyleAccess?: SiteStyleAccess;
|
|
53
54
|
};
|
|
54
|
-
export declare function PreviewShellLayout({ children, theme, surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, apiClient, bearerToken, themeId, themeSelectionId, themeSelectionVersion, themeSelectionUpdatedAt, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, themeSelectionHeaderLayoutId, themeSelectionHeaderStyleId, themeSelectionTypographyPresetId, themeSelectionTypographyBodyFontOverride, themeSelectionTypographyHeadingFontOverride, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, themeSelectionFooterContext, supabaseUrl, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, bookingOfferingPresets, themeRuntime, siteStyleAccess, }: PreviewShellLayoutProps): React.JSX.Element;
|
|
55
|
+
export declare function PreviewShellLayout({ children, theme, surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, apiClient, bearerToken, themeId, themeSelectionId, themeSelectionVersion, themeSelectionUpdatedAt, themeSelectionButtonPersonalityId, runtimePaletteState, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, themeSelectionHeaderLayoutId, themeSelectionHeaderStyleId, themeSelectionTypographyPresetId, themeSelectionTypographyBodyFontOverride, themeSelectionTypographyHeadingFontOverride, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, themeSelectionFooterContext, supabaseUrl, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, bookingOfferingPresets, themeRuntime, siteStyleAccess, }: PreviewShellLayoutProps): React.JSX.Element;
|
|
@@ -2,7 +2,7 @@ import React, { type ReactNode } from 'react';
|
|
|
2
2
|
import { type ApiClient } from '../../../../api/src/request';
|
|
3
3
|
import type { Theme } from '../../../../blocks/src/index';
|
|
4
4
|
import type { ButtonPersonalityId } from '../../../../theme-core/src/buttons/index';
|
|
5
|
-
import type {
|
|
5
|
+
import type { RuntimePaletteState } from '../../../../theme-core/src/palette/index';
|
|
6
6
|
import type { BrandDisplayMode, FooterLayoutId, FooterLookId, HeaderNavFontSizePreference, HeaderNavTypographyPreference, FooterSelectionContext, HeaderLayoutId, HeaderLookId, HeaderSelectionContext, HeaderStyleId, LogoSizePolicy, SiteChromeBackgroundColorToken, SiteChromeBackgroundOverride, TypographyPresetId } from '../../../../theme-core/src/site-styles/index';
|
|
7
7
|
import { headerNavFontSizeOptions, headerNavTypographyOptions } from '../../../../theme-core/src/site-styles/index';
|
|
8
8
|
import { type StyleConfiguratorHistoryEntry } from './StyleConfigurator.state';
|
|
@@ -118,8 +118,7 @@ export type SiteChromeCustomizeProviderProps = Readonly<{
|
|
|
118
118
|
selectionVersion?: number | null;
|
|
119
119
|
selectionUpdatedAt?: string | null;
|
|
120
120
|
buttonPersonalityId: ButtonPersonalityId | null;
|
|
121
|
-
|
|
122
|
-
paletteOverrides: PaletteOverrides | null;
|
|
121
|
+
runtimePaletteState?: RuntimePaletteState | null;
|
|
123
122
|
headerLayoutId?: HeaderLayoutId | null;
|
|
124
123
|
headerStyleId?: HeaderStyleId | null;
|
|
125
124
|
typographyPresetId?: TypographyPresetId | null;
|
|
@@ -127,7 +126,7 @@ export type SiteChromeCustomizeProviderProps = Readonly<{
|
|
|
127
126
|
typographyHeadingFontOverride?: string | null;
|
|
128
127
|
headerLookId?: HeaderLookId | null;
|
|
129
128
|
footerLookId?: FooterLookId | null;
|
|
130
|
-
}
|
|
129
|
+
}> & Readonly<Record<string, unknown>>;
|
|
131
130
|
headerSelectionContext?: Partial<HeaderSelectionContext>;
|
|
132
131
|
footerSelectionContext?: Partial<FooterSelectionContext>;
|
|
133
132
|
siteStyleAccess?: SiteStyleAccess;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { ApiClient } from '../../../../api/src/request';
|
|
3
3
|
import type { Theme } from '../../../../blocks/src/index';
|
|
4
4
|
import { type ButtonPersonalityId } from '../../../../theme-core/src/buttons/index';
|
|
5
|
-
import { type
|
|
5
|
+
import { type CuratedPaletteId, type PaletteOverrides, type RuntimePaletteState } from '../../../../theme-core/src/palette/index';
|
|
6
6
|
import { type FooterSelectionContext, type FooterLookId, type HeaderLayoutId, type HeaderLookId, type HeaderSelectionContext, type HeaderStyleId, type TypographyPresetId } from '../../../../theme-core/src/site-styles/index';
|
|
7
7
|
import { type VisibleSiteStyleAccess } from './siteStyleAccess';
|
|
8
8
|
import type { PreviewDesignRow } from './sidebarTabPreference';
|
|
@@ -19,8 +19,9 @@ export type StyleConfiguratorProps = Readonly<{
|
|
|
19
19
|
selectionVersion?: number | null;
|
|
20
20
|
selectionUpdatedAt?: string | null;
|
|
21
21
|
buttonPersonalityId: ButtonPersonalityId | null;
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
runtimePaletteState?: RuntimePaletteState | null;
|
|
23
|
+
paletteVariantId?: CuratedPaletteId | null;
|
|
24
|
+
paletteOverrides?: PaletteOverrides | null;
|
|
24
25
|
headerLayoutId?: HeaderLayoutId | null;
|
|
25
26
|
headerStyleId?: HeaderStyleId | null;
|
|
26
27
|
typographyPresetId?: TypographyPresetId | null;
|
|
@@ -28,7 +29,7 @@ export type StyleConfiguratorProps = Readonly<{
|
|
|
28
29
|
typographyHeadingFontOverride?: string | null;
|
|
29
30
|
headerLookId?: HeaderLookId | null;
|
|
30
31
|
footerLookId?: FooterLookId | null;
|
|
31
|
-
}
|
|
32
|
+
}> & Readonly<Record<string, unknown>>;
|
|
32
33
|
headerSelectionContext?: Partial<HeaderSelectionContext>;
|
|
33
34
|
footerSelectionContext?: Partial<FooterSelectionContext>;
|
|
34
35
|
expandedRowRequest?: Readonly<{
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
* switch.
|
|
6
6
|
*
|
|
7
7
|
* The configurator surfaces three site-level decisions (site style, button
|
|
8
|
-
* personality, palette
|
|
8
|
+
* personality, palette state). The
|
|
9
9
|
* "base" snapshot is what the server has persisted; "previewed" is what the
|
|
10
10
|
* preview pane is currently rendering. They diverge while the user is
|
|
11
11
|
* picking and converge on apply-success.
|
|
12
12
|
*/
|
|
13
13
|
import type { ButtonPersonalityId } from '../../../../theme-core/src/buttons/index';
|
|
14
14
|
import type { Theme } from '../../../../blocks/src/index';
|
|
15
|
-
import type {
|
|
15
|
+
import type { CuratedPaletteId, PaletteColors, PaletteMode, RuntimePaletteState, SitePaletteId, SitePaletteVersion } from '../../../../theme-core/src/palette/index';
|
|
16
16
|
import { type FooterLookId, type HeaderLayoutId, type HeaderLookId, type HeaderStyleId, type TypographyPresetId } from '../../../../theme-core/src/site-styles/index';
|
|
17
17
|
import type { SelectionFallbackWarning, SiteStyleId } from '../../../../theme-core/src/site-styles/previewCompiler';
|
|
18
18
|
import { type EditorStagedSessionCapabilities, type EditorStagedSessionState } from '../../../../content-editor/src/editorTransactionState';
|
|
@@ -33,11 +33,7 @@ export type StyleConfiguratorExpandedRow = 'style' | 'header-layout' | 'header-s
|
|
|
33
33
|
* `compileSiteThemeFromSelections`) so the layers stay clean: warnings are
|
|
34
34
|
* compiler-emitted, notices are UI-level decisions the configurator makes.
|
|
35
35
|
*/
|
|
36
|
-
export type StyleConfiguratorNotice =
|
|
37
|
-
kind: 'palette-overrides-hidden';
|
|
38
|
-
}> | Readonly<{
|
|
39
|
-
kind: 'palette-overrides-restored';
|
|
40
|
-
}>;
|
|
36
|
+
export type StyleConfiguratorNotice = never;
|
|
41
37
|
type ThemeTypography = Theme['typography'];
|
|
42
38
|
type BodyTypography = ThemeTypography['body'];
|
|
43
39
|
type HeadingTypography = ThemeTypography['headings']['default'];
|
|
@@ -65,6 +61,25 @@ export type TypographyDraftPatch = Readonly<{
|
|
|
65
61
|
kind: 'scale';
|
|
66
62
|
scale: ThemeTypography['scale'];
|
|
67
63
|
}>;
|
|
64
|
+
export type PaletteSelectionSnapshot = Readonly<{
|
|
65
|
+
kind: 'migrated-curated';
|
|
66
|
+
paletteId: CuratedPaletteId;
|
|
67
|
+
colors: PaletteColors;
|
|
68
|
+
mode: PaletteMode;
|
|
69
|
+
}> | Readonly<{
|
|
70
|
+
kind: 'migrated-site';
|
|
71
|
+
paletteId: SitePaletteId;
|
|
72
|
+
colors: PaletteColors;
|
|
73
|
+
mode: PaletteMode;
|
|
74
|
+
version: SitePaletteVersion;
|
|
75
|
+
}> | Readonly<{
|
|
76
|
+
kind: 'legacy-unmigrated';
|
|
77
|
+
colors: PaletteColors;
|
|
78
|
+
mode: PaletteMode;
|
|
79
|
+
}> | Readonly<{
|
|
80
|
+
kind: 'invalid';
|
|
81
|
+
reason: string;
|
|
82
|
+
}>;
|
|
68
83
|
export type SelectionSnapshot = Readonly<{
|
|
69
84
|
siteStyleId: SiteStyleId;
|
|
70
85
|
selectionVersion: number;
|
|
@@ -74,11 +89,9 @@ export type SelectionSnapshot = Readonly<{
|
|
|
74
89
|
headerLookId: HeaderLookId | null;
|
|
75
90
|
footerLookId: FooterLookId | null;
|
|
76
91
|
buttonPersonalityId: ButtonPersonalityId;
|
|
77
|
-
|
|
78
|
-
paletteOverrides: PaletteOverrides | null;
|
|
92
|
+
palette: PaletteSelectionSnapshot;
|
|
79
93
|
typographySelection: TypographySelectionSnapshot;
|
|
80
94
|
}>;
|
|
81
|
-
type PaletteOverrideDrafts = Readonly<Partial<Record<PaletteVariantId, PaletteOverrides>>>;
|
|
82
95
|
type StyleConfiguratorTargetKey = 'design:site-style';
|
|
83
96
|
export type StyleConfiguratorHistoryEntry = Readonly<{
|
|
84
97
|
kind: 'site-style-design';
|
|
@@ -101,11 +114,22 @@ export type StyleConfiguratorState = Readonly<{
|
|
|
101
114
|
saveStatus: StyleConfiguratorSaveStatus;
|
|
102
115
|
warnings: ReadonlyArray<SelectionFallbackWarning>;
|
|
103
116
|
notices: ReadonlyArray<StyleConfiguratorNotice>;
|
|
104
|
-
|
|
117
|
+
paletteDrafts: Readonly<Partial<Record<CuratedPaletteId, Readonly<{
|
|
118
|
+
colors: PaletteColors;
|
|
119
|
+
mode: PaletteMode;
|
|
120
|
+
}>>>>;
|
|
105
121
|
expandedRow: StyleConfiguratorExpandedRow;
|
|
106
122
|
stagedSession: StyleConfiguratorStagedSession;
|
|
107
123
|
}>;
|
|
124
|
+
export type PaletteMutationCapability = Readonly<{
|
|
125
|
+
kind: 'editable';
|
|
126
|
+
}> | Readonly<{
|
|
127
|
+
kind: 'blocked';
|
|
128
|
+
reason: 'invalid-palette';
|
|
129
|
+
message: string;
|
|
130
|
+
}>;
|
|
108
131
|
export declare function createStyleConfiguratorState(base: SelectionSnapshot): StyleConfiguratorState;
|
|
132
|
+
export declare function paletteMutationCapability(state: StyleConfiguratorState): PaletteMutationCapability;
|
|
109
133
|
export declare function openRow(state: StyleConfiguratorState, row: Exclude<StyleConfiguratorExpandedRow, null>): StyleConfiguratorState;
|
|
110
134
|
/**
|
|
111
135
|
* True iff the user has previewed a change that hasn't been applied yet.
|
|
@@ -124,8 +148,12 @@ export declare function previewTypographyPreset(state: StyleConfiguratorState, t
|
|
|
124
148
|
export declare function setCustomTypography(state: StyleConfiguratorState, typography: ThemeTypography): StyleConfiguratorState;
|
|
125
149
|
export declare function applyTypographyDraftPatch(state: StyleConfiguratorState, currentTypography: ThemeTypography, patch: TypographyDraftPatch): StyleConfiguratorState;
|
|
126
150
|
export declare function resetTypographyToSaved(state: StyleConfiguratorState): StyleConfiguratorState;
|
|
127
|
-
export declare function
|
|
128
|
-
|
|
151
|
+
export declare function previewCuratedPalette(state: StyleConfiguratorState, palette: Readonly<{
|
|
152
|
+
paletteId: CuratedPaletteId;
|
|
153
|
+
colors: PaletteColors;
|
|
154
|
+
mode: PaletteMode;
|
|
155
|
+
}>): StyleConfiguratorState;
|
|
156
|
+
export declare function setPaletteColors(state: StyleConfiguratorState, colors: PaletteColors): StyleConfiguratorState;
|
|
129
157
|
/**
|
|
130
158
|
* Records the post-compile resolved selection + any fallback warnings.
|
|
131
159
|
* Used after `compileSiteThemeFromSelections` runs against a new site style:
|
|
@@ -133,12 +161,9 @@ export declare function setPaletteOverrides(state: StyleConfiguratorState, palet
|
|
|
133
161
|
* previous selection is not offered for the new style, or a different palette
|
|
134
162
|
* if the persisted palette ID is no longer known.
|
|
135
163
|
*
|
|
136
|
-
* Palette overrides are scoped by palette variant. If the resolver moves the
|
|
137
|
-
* preview to a different palette, the current sparse overrides are stashed
|
|
138
|
-
* under the previous palette ID and any draft for the new palette is restored.
|
|
139
164
|
*/
|
|
140
165
|
export declare function applyResolvedSelections(state: StyleConfiguratorState, input: Readonly<{
|
|
141
|
-
resolved: Pick<SelectionSnapshot, 'buttonPersonalityId' | '
|
|
166
|
+
resolved: Pick<SelectionSnapshot, 'buttonPersonalityId' | 'headerLayoutId' | 'headerStyleId' | 'headerLookId'> & TypographySelectionFlatFields;
|
|
142
167
|
typographySelection?: TypographySelectionSnapshot;
|
|
143
168
|
warnings: ReadonlyArray<SelectionFallbackWarning>;
|
|
144
169
|
}>): StyleConfiguratorState;
|
|
@@ -165,5 +190,6 @@ export declare function typographySelectionSnapshotFromFlat(input: Readonly<{
|
|
|
165
190
|
export declare function typographySelectionFlatFields(selection: TypographySelectionSnapshot): TypographySelectionFlatFields;
|
|
166
191
|
export declare function customTypographyForSelection(selection: TypographySelectionSnapshot): ThemeTypography | null;
|
|
167
192
|
export declare function typographySelectionsEqual(a: TypographySelectionSnapshot, b: TypographySelectionSnapshot): boolean;
|
|
168
|
-
export declare function
|
|
193
|
+
export declare function paletteSelectionSnapshotFromRuntime(runtime: RuntimePaletteState | null | undefined): PaletteSelectionSnapshot;
|
|
194
|
+
export declare function paletteSelectionSnapshotsEqual(left: PaletteSelectionSnapshot, right: PaletteSelectionSnapshot): boolean;
|
|
169
195
|
export {};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import type { Theme } from '../../../../blocks/src/index';
|
|
2
2
|
import type { ButtonPersonalityId } from '../../../../theme-core/src/buttons/index';
|
|
3
|
-
import
|
|
3
|
+
import { type CuratedPaletteId } from '../../../../theme-core/src/palette/index';
|
|
4
4
|
import type { FooterLookId, FooterSelectionContext, HeaderLayoutId, HeaderLookId, HeaderSelectionContext, HeaderStyleId, TypographyPresetId } from '../../../../theme-core/src/site-styles/index';
|
|
5
5
|
import { type CuratedSiteStyle, type CompiledTypographySelection, type SelectionFallbackWarning, type SiteStyleId } from '../../../../theme-core/src/site-styles/previewCompiler';
|
|
6
|
-
import type { TypographySelectionSnapshot } from './StyleConfigurator.state';
|
|
6
|
+
import type { PaletteSelectionSnapshot, TypographySelectionSnapshot } from './StyleConfigurator.state';
|
|
7
7
|
export type SiteStylePreviewSelection = Readonly<{
|
|
8
8
|
siteStyleId: SiteStyleId;
|
|
9
9
|
buttonPersonalityId: ButtonPersonalityId;
|
|
10
|
-
|
|
11
|
-
paletteOverrides: PaletteOverrides | null;
|
|
10
|
+
palette: PaletteSelectionSnapshot;
|
|
12
11
|
typographySelection?: TypographySelectionSnapshot;
|
|
13
12
|
headerLayoutId?: HeaderLayoutId | null;
|
|
14
13
|
headerStyleId?: HeaderStyleId | null;
|
|
@@ -23,7 +22,7 @@ export type SiteStylePreviewPlan = Readonly<{
|
|
|
23
22
|
themeOverlay: Theme;
|
|
24
23
|
resolvedSelections: Readonly<{
|
|
25
24
|
buttonPersonalityId: ButtonPersonalityId;
|
|
26
|
-
paletteVariantId:
|
|
25
|
+
paletteVariantId: CuratedPaletteId;
|
|
27
26
|
typographySelection: CompiledTypographySelection['resolvedSelection'];
|
|
28
27
|
typographyPresetId: TypographyPresetId | null;
|
|
29
28
|
typographyBodyFontOverride: string | null;
|
|
@@ -1,9 +1,30 @@
|
|
|
1
1
|
import type { APIEndpoints } from '../../../../api/src/index';
|
|
2
|
+
import { type PaletteCommand } from '../../../../theme-core/src/palette/index';
|
|
2
3
|
import { type SelectionSnapshot } from './StyleConfigurator.state';
|
|
3
4
|
export type ApplySiteStyleSelectionBody = NonNullable<APIEndpoints['applySiteStyleSelection']['body']>;
|
|
5
|
+
export type PaletteApplyCommandPlan = Readonly<{
|
|
6
|
+
ok: true;
|
|
7
|
+
command: PaletteCommand;
|
|
8
|
+
}> | Readonly<{
|
|
9
|
+
ok: false;
|
|
10
|
+
error: 'invalid-palette-state' | 'curated-palette-missing';
|
|
11
|
+
}>;
|
|
12
|
+
export declare function planPaletteApplyCommand(input: Readonly<{
|
|
13
|
+
base: SelectionSnapshot;
|
|
14
|
+
previewed: SelectionSnapshot;
|
|
15
|
+
}>): PaletteApplyCommandPlan;
|
|
16
|
+
export type ApplySiteStyleSelectionBodyBuildResult = Readonly<{
|
|
17
|
+
ok: true;
|
|
18
|
+
body: ApplySiteStyleSelectionBody;
|
|
19
|
+
}> | Readonly<{
|
|
20
|
+
ok: false;
|
|
21
|
+
error: Extract<PaletteApplyCommandPlan, {
|
|
22
|
+
ok: false;
|
|
23
|
+
}>['error'];
|
|
24
|
+
}>;
|
|
4
25
|
export declare function buildApplySiteStyleSelectionBody(input: Readonly<{
|
|
5
26
|
base: SelectionSnapshot;
|
|
6
27
|
previewed: SelectionSnapshot;
|
|
7
28
|
selectionId?: string | null;
|
|
8
|
-
}>):
|
|
29
|
+
}>): ApplySiteStyleSelectionBodyBuildResult;
|
|
9
30
|
export declare function selectionSnapshotFromApplySiteStyleSelectionResponse(saved: NonNullable<APIEndpoints['applySiteStyleSelection']['response']>, fallback: SelectionSnapshot): SelectionSnapshot;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import type { Theme } from '../../../../blocks/src/index';
|
|
2
2
|
import type { ButtonPersonalityId } from '../../../../theme-core/src/buttons/index';
|
|
3
|
-
import type
|
|
3
|
+
import { type CuratedPaletteId, type PaletteOverrides, type RuntimePaletteState } from '../../../../theme-core/src/palette/index';
|
|
4
4
|
import type { FooterLookId, FooterSelectionContext, HeaderLayoutId, HeaderLookId, HeaderSelectionContext, HeaderStyleId, TypographyPresetId } from '../../../../theme-core/src/site-styles/index';
|
|
5
5
|
import type { SelectionSnapshot } from './StyleConfigurator.state';
|
|
6
|
-
|
|
6
|
+
type StyleConfiguratorSnapshotInput = Readonly<{
|
|
7
7
|
theme?: Theme | null;
|
|
8
8
|
initialSelections: Readonly<{
|
|
9
9
|
selectionVersion?: number | null;
|
|
10
10
|
selectionUpdatedAt?: string | null;
|
|
11
11
|
buttonPersonalityId: ButtonPersonalityId | null;
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
runtimePaletteState?: RuntimePaletteState | null;
|
|
13
|
+
paletteVariantId?: CuratedPaletteId | null;
|
|
14
|
+
paletteOverrides?: PaletteOverrides | null;
|
|
14
15
|
headerLayoutId?: HeaderLayoutId | null;
|
|
15
16
|
headerStyleId?: HeaderStyleId | null;
|
|
16
17
|
typographyPresetId?: TypographyPresetId | null;
|
|
@@ -21,4 +22,11 @@ export declare function resolveStyleConfiguratorInitialSnapshot(input: Readonly<
|
|
|
21
22
|
}>;
|
|
22
23
|
headerSelectionContext?: Partial<HeaderSelectionContext>;
|
|
23
24
|
footerSelectionContext?: Partial<FooterSelectionContext>;
|
|
25
|
+
}>;
|
|
26
|
+
export declare function resolveStyleConfiguratorInitialSnapshot(input: Readonly<{
|
|
27
|
+
theme?: Theme | null;
|
|
28
|
+
initialSelections: StyleConfiguratorSnapshotInput['initialSelections'];
|
|
29
|
+
headerSelectionContext?: Partial<HeaderSelectionContext>;
|
|
30
|
+
footerSelectionContext?: Partial<FooterSelectionContext>;
|
|
24
31
|
}>): SelectionSnapshot | null;
|
|
32
|
+
export {};
|
|
@@ -9,6 +9,7 @@ import type { SdkEventPricing, SdkEventPricingInput, SdkEventTicketTypeInput } f
|
|
|
9
9
|
import type { SdkEventPaymentTerms, SdkEventPaymentTermsInput } from '../../../../api/src/sdk-event-payment-terms';
|
|
10
10
|
import type { SdkEventUpsertBody } from '../../../../api/src/sdk-event-upsert';
|
|
11
11
|
import type { SdkManagementEventSeries } from '../../../../api/src/sdkContracts';
|
|
12
|
+
import type { PaletteSelection } from '../../../../theme-core/src/palette/index';
|
|
12
13
|
import type { Theme } from '../../contracts';
|
|
13
14
|
export interface ManagementClientConfig {
|
|
14
15
|
/**
|
|
@@ -522,6 +523,8 @@ export interface ThemeStyleSelectionApplyResult {
|
|
|
522
523
|
buttonPersonalityId: string;
|
|
523
524
|
paletteVariantId: string;
|
|
524
525
|
paletteOverrides: Record<string, string> | null;
|
|
526
|
+
activePaletteSelection: PaletteSelection;
|
|
527
|
+
activeSitePaletteVersion: number | null;
|
|
525
528
|
headerLookId: string | null;
|
|
526
529
|
headerLayoutId: string;
|
|
527
530
|
headerStyleId: string;
|