@riverbankcms/sdk 0.60.1 → 0.60.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_dts/api/src/bookingRecords.d.ts +7 -0
- package/dist/_dts/api/src/communications.d.ts +1 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +8 -0
- package/dist/_dts/api/src/endpoints.d.ts +17 -0
- package/dist/_dts/api/src/index.d.ts +1 -1
- package/dist/_dts/api/src/media.d.ts +1 -1
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +45 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +24 -1
- package/dist/_dts/api/src/siteSettings.d.ts +7 -0
- package/dist/_dts/api/src/types.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/site-footer.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/location-map.server.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/location-map.shared.d.ts +38 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/location-map.view.d.ts +2 -1
- package/dist/_dts/core/src/business-address.d.ts +38 -0
- package/dist/_dts/core/src/index.d.ts +1 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +22 -0
- package/dist/_dts/preview-next/src/client/blocks/runOptimisticCustomizeAction.d.ts +44 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +7 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +12 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +6 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +20 -0
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +99 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +11 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/constants.d.ts +9 -1
- package/dist/_dts/theme-core/src/buttons/generateButtonCss.d.ts +16 -11
- package/dist/_dts/theme-core/src/buttons/generateDefaultButtonSystem.d.ts +9 -16
- package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/buttons/personalities/brushed-wash.d.ts +11 -0
- package/dist/_dts/theme-core/src/buttons/personalities/confident-chip.d.ts +11 -0
- package/dist/_dts/theme-core/src/buttons/personalities/editorial-link.d.ts +11 -0
- package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +14 -0
- package/dist/_dts/theme-core/src/buttons/personalities/ink-stamp.d.ts +11 -0
- package/dist/_dts/theme-core/src/buttons/personalities/pebble.d.ts +11 -0
- package/dist/_dts/theme-core/src/buttons/personalities/soft-pill.d.ts +11 -0
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +268 -0
- package/dist/_dts/theme-core/src/buttons/types.d.ts +253 -72
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +69 -15
- package/dist/_dts/theme-core/src/palette/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/palette/variants/brand-led.d.ts +28 -0
- package/dist/_dts/theme-core/src/palette/variants/high-contrast.d.ts +28 -0
- package/dist/_dts/theme-core/src/palette/variants/index.d.ts +17 -0
- package/dist/_dts/theme-core/src/palette/variants/soft-natural.d.ts +28 -0
- package/dist/_dts/theme-core/src/palette/variants/types.d.ts +154 -0
- package/dist/_dts/theme-core/src/palette/variants/warm-neutral.d.ts +28 -0
- package/dist/_dts/theme-core/src/schema.d.ts +122 -10
- package/dist/_dts/theme-core/src/site-styles/compatibility.d.ts +109 -0
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +193 -0
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +4 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +43 -2
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +23 -1
- package/dist/_dts/ui/src/badge.d.ts +1 -1
- package/dist/_dts/ui/src/callout.d.ts +1 -1
- package/dist/cli/index.mjs +1471 -263
- package/dist/client/bookings.mjs +294 -144
- package/dist/client/client.mjs +3483 -2219
- package/dist/client/hooks.mjs +2765 -1654
- package/dist/client/rendering/client.mjs +3251 -2134
- package/dist/client/rendering/islands.mjs +1842 -728
- package/dist/client/rendering.mjs +41242 -39978
- package/dist/preview-next/before-render.mjs +17 -0
- package/dist/preview-next/client/runtime.mjs +10110 -8271
- package/dist/preview-next/middleware.mjs +17 -0
- package/dist/server/components.mjs +3500 -2364
- package/dist/server/config-validation.mjs +2996 -1885
- package/dist/server/config.mjs +2996 -1885
- package/dist/server/data.mjs +2765 -1654
- package/dist/server/index.mjs +18 -1
- package/dist/server/next.mjs +3215 -2079
- package/dist/server/page-converter.mjs +2910 -1816
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3500 -2364
- package/dist/server/rendering.mjs +3500 -2364
- package/dist/server/routing.mjs +2943 -1704
- package/dist/server/server.mjs +2766 -1655
- package/dist/server/theme-bridge.mjs +1435 -481
- package/dist/server/theme.mjs +1087 -492
- package/package.json +1 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewSiteStyleSwitcher.d.ts +0 -11
- package/dist/_dts/preview-next/src/client/preview/PreviewSiteStyleSwitcher.state.d.ts +0 -43
|
@@ -5,6 +5,8 @@ import type { SurfaceId } from "@riverbankcms/surfaces";
|
|
|
5
5
|
import type { MediaAssetIndexItem, OccurrenceContextData, Theme } from "@riverbankcms/blocks";
|
|
6
6
|
import { type ContentTypeSchema } from "@riverbankcms/content-model";
|
|
7
7
|
import { type ZoomLevel } from "@riverbankcms/content-editor";
|
|
8
|
+
import type { ButtonPersonalityId } from "@riverbankcms/theme-core/buttons";
|
|
9
|
+
import type { PaletteOverrides, PaletteVariantId } from "@riverbankcms/theme-core/palette";
|
|
8
10
|
import type { ViewportMode, ViewportWidth } from "./PreviewViewportControls";
|
|
9
11
|
import { type SiteStyleAccess } from "./siteStyleAccess";
|
|
10
12
|
export type PreviewEditorSidebarTab = "editor" | "assistant";
|
|
@@ -29,6 +31,10 @@ export type PreviewEditorSidebarProps = {
|
|
|
29
31
|
theme?: Theme | null;
|
|
30
32
|
themeId?: string | null;
|
|
31
33
|
themeSelectionId?: string | null;
|
|
34
|
+
/** Persisted Style configurator selections (Phase C / E). */
|
|
35
|
+
themeSelectionButtonPersonalityId?: ButtonPersonalityId | null;
|
|
36
|
+
themeSelectionPaletteVariantId?: PaletteVariantId | null;
|
|
37
|
+
themeSelectionPaletteOverrides?: PaletteOverrides | null;
|
|
32
38
|
apiClient: ApiClient;
|
|
33
39
|
bearerToken?: string | null;
|
|
34
40
|
supabaseUrl?: string;
|
|
@@ -47,4 +53,4 @@ export type PreviewEditorSidebarProps = {
|
|
|
47
53
|
onViewportWidthChange: (width: ViewportWidth) => void;
|
|
48
54
|
onZoomChange: (zoom: ZoomLevel) => void;
|
|
49
55
|
};
|
|
50
|
-
export declare function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, theme, themeId, themeSelectionId, apiClient, bearerToken, supabaseUrl, occurrenceContext, assistantPanel, sdkConfig, mediaAssets, siteStyleAccess, activeTab, onTabChange, onClose, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange, }: PreviewEditorSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
export declare function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, theme, themeId, themeSelectionId, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, apiClient, bearerToken, supabaseUrl, occurrenceContext, assistantPanel, sdkConfig, mediaAssets, siteStyleAccess, activeTab, onTabChange, onClose, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange, }: PreviewEditorSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type ComponentProps, type ReactNode } from "react";
|
|
2
2
|
import { BlockApiProvider } from "@riverbankcms/blocks/client";
|
|
3
|
+
import type { ButtonPersonalityId } from "@riverbankcms/theme-core/buttons";
|
|
4
|
+
import type { PaletteOverrides, PaletteVariantId } from "@riverbankcms/theme-core/palette";
|
|
3
5
|
import type { MediaAssetIndexItem, OccurrenceContextData, Theme } from "@riverbankcms/blocks";
|
|
4
6
|
import type { ContentTypeSchema } from "@riverbankcms/content-model";
|
|
5
7
|
import type { SdkConfigForBlockPicker } from "@riverbankcms/editor-blocks";
|
|
@@ -31,6 +33,15 @@ export type PreviewShellProps = {
|
|
|
31
33
|
theme: Theme;
|
|
32
34
|
themeId?: string | null;
|
|
33
35
|
themeSelectionId?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* Persisted Style configurator selections (Phase C). Forwarded into the
|
|
38
|
+
* StyleConfigurator so reload renders the user's saved button personality
|
|
39
|
+
* + palette variant + sparse overrides instead of falling back to the
|
|
40
|
+
* site style defaults.
|
|
41
|
+
*/
|
|
42
|
+
themeSelectionButtonPersonalityId?: ButtonPersonalityId | null;
|
|
43
|
+
themeSelectionPaletteVariantId?: PaletteVariantId | null;
|
|
44
|
+
themeSelectionPaletteOverrides?: PaletteOverrides | null;
|
|
34
45
|
pageId: string | null;
|
|
35
46
|
routeId: string | null;
|
|
36
47
|
entryData?: PreviewContentEntryData | null;
|
|
@@ -52,7 +63,7 @@ export type PreviewShellProps = {
|
|
|
52
63
|
designEditorEligibility?: PreviewDesignEditorEligibility;
|
|
53
64
|
baseFetch?: BaseFetch;
|
|
54
65
|
};
|
|
55
|
-
export declare function PreviewShell({ children, apiBaseUrl, blockApiConfig, siteId, siteSlug, editableId, previewSession, previewToken, dashboardBaseUrl, surfaceId, theme, themeId, themeSelectionId, pageId, routeId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, initialStatus, initialBlocks, pageMetadata, isSiteLaunched, maintenanceModeEnabled, occurrenceContext, assistantPanel, sdkConfig, mediaAssets, supabaseUrl, useThemeScope, designEditorEligibility, baseFetch, }: PreviewShellProps): import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
export declare function PreviewShell({ children, apiBaseUrl, blockApiConfig, siteId, siteSlug, editableId, previewSession, previewToken, dashboardBaseUrl, surfaceId, theme, themeId, themeSelectionId, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, pageId, routeId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, initialStatus, initialBlocks, pageMetadata, isSiteLaunched, maintenanceModeEnabled, occurrenceContext, assistantPanel, sdkConfig, mediaAssets, supabaseUrl, useThemeScope, designEditorEligibility, baseFetch, }: PreviewShellProps): import("react/jsx-runtime").JSX.Element;
|
|
56
67
|
export declare function defaultDesignEditorEligibility(input: Readonly<{
|
|
57
68
|
pageId: string | null;
|
|
58
69
|
entryData?: PreviewContentEntryData | null;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type MediaAssetIndexItem, type OccurrenceContextData, type Theme } from "@riverbankcms/blocks";
|
|
3
|
+
import type { ButtonPersonalityId } from "@riverbankcms/theme-core/buttons";
|
|
4
|
+
import type { PaletteOverrides, PaletteVariantId } from "@riverbankcms/theme-core/palette";
|
|
3
5
|
import type { ContentTypeSchema } from "@riverbankcms/content-model";
|
|
4
6
|
import type { ApiClient } from "@riverbankcms/api/request";
|
|
5
7
|
import type { SdkConfigForBlockPicker } from "@riverbankcms/editor-blocks";
|
|
@@ -22,6 +24,9 @@ export type PreviewShellLayoutProps = {
|
|
|
22
24
|
bearerToken?: string | null;
|
|
23
25
|
themeId?: string | null;
|
|
24
26
|
themeSelectionId?: string | null;
|
|
27
|
+
themeSelectionButtonPersonalityId?: ButtonPersonalityId | null;
|
|
28
|
+
themeSelectionPaletteVariantId?: PaletteVariantId | null;
|
|
29
|
+
themeSelectionPaletteOverrides?: PaletteOverrides | null;
|
|
25
30
|
supabaseUrl?: string;
|
|
26
31
|
isSiteLaunched: boolean;
|
|
27
32
|
maintenanceModeEnabled: boolean;
|
|
@@ -32,4 +37,4 @@ export type PreviewShellLayoutProps = {
|
|
|
32
37
|
useThemeScope?: boolean;
|
|
33
38
|
siteStyleAccess?: SiteStyleAccess;
|
|
34
39
|
};
|
|
35
|
-
export declare function PreviewShellLayout({ children, theme, surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, apiClient, bearerToken, themeId, themeSelectionId, supabaseUrl, isSiteLaunched, maintenanceModeEnabled, occurrenceContext, assistantPanel, sdkConfig, mediaAssets, useThemeScope, siteStyleAccess, }: PreviewShellLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export declare function PreviewShellLayout({ children, theme, surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, apiClient, bearerToken, themeId, themeSelectionId, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, supabaseUrl, isSiteLaunched, maintenanceModeEnabled, occurrenceContext, assistantPanel, sdkConfig, mediaAssets, useThemeScope, siteStyleAccess, }: PreviewShellLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ApiClient } from '@riverbankcms/api/request';
|
|
2
|
+
import type { Theme } from '@riverbankcms/blocks';
|
|
3
|
+
import { type ButtonPersonalityId } from '@riverbankcms/theme-core/buttons';
|
|
4
|
+
import { type PaletteVariantId, type PaletteOverrides } from '@riverbankcms/theme-core/palette';
|
|
5
|
+
import { type VisibleSiteStyleAccess } from './siteStyleAccess';
|
|
6
|
+
export type StyleConfiguratorProps = Readonly<{
|
|
7
|
+
siteId: string;
|
|
8
|
+
apiClient: ApiClient;
|
|
9
|
+
theme?: Theme | null;
|
|
10
|
+
themeId?: string | null;
|
|
11
|
+
selectionId?: string | null;
|
|
12
|
+
/** Server-persisted Style configurator selections (Phase C). */
|
|
13
|
+
initialSelections: Readonly<{
|
|
14
|
+
buttonPersonalityId: ButtonPersonalityId | null;
|
|
15
|
+
paletteVariantId: PaletteVariantId | null;
|
|
16
|
+
paletteOverrides: PaletteOverrides | null;
|
|
17
|
+
}>;
|
|
18
|
+
siteStyleAccess: VisibleSiteStyleAccess;
|
|
19
|
+
}>;
|
|
20
|
+
export declare function StyleConfigurator({ siteId, apiClient, theme, themeId, selectionId, initialSelections, siteStyleAccess, }: StyleConfiguratorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure state module for the Style configurator. Per-action function style so
|
|
3
|
+
* the picker rows, apply flow, and concurrency layer can call into a small,
|
|
4
|
+
* exhaustive set of named transitions instead of a centralised reducer
|
|
5
|
+
* switch.
|
|
6
|
+
*
|
|
7
|
+
* The configurator surfaces three site-level decisions (site style, button
|
|
8
|
+
* personality, palette variant) plus optional sparse palette overrides. The
|
|
9
|
+
* "base" snapshot is what the server has persisted; "previewed" is what the
|
|
10
|
+
* preview pane is currently rendering. They diverge while the user is
|
|
11
|
+
* picking and converge on apply-success.
|
|
12
|
+
*/
|
|
13
|
+
import type { ButtonPersonalityId } from '@riverbankcms/theme-core/buttons';
|
|
14
|
+
import type { PaletteOverrides, PaletteVariantId } from '@riverbankcms/theme-core/palette';
|
|
15
|
+
import type { CompatibilityWarning, SiteStyleId } from '@riverbankcms/theme-core/site-styles/previewCompiler';
|
|
16
|
+
export type StyleConfiguratorSaveStatus = Readonly<{
|
|
17
|
+
kind: 'idle';
|
|
18
|
+
}> | Readonly<{
|
|
19
|
+
kind: 'saving';
|
|
20
|
+
}> | Readonly<{
|
|
21
|
+
kind: 'saved';
|
|
22
|
+
}> | Readonly<{
|
|
23
|
+
kind: 'failed';
|
|
24
|
+
message: string;
|
|
25
|
+
}>;
|
|
26
|
+
export type StyleConfiguratorExpandedRow = 'style' | 'buttons' | 'palette' | 'colours' | null;
|
|
27
|
+
/**
|
|
28
|
+
* Configurator-level notices that aren't compiler compatibility warnings.
|
|
29
|
+
* Kept separate from `CompatibilityWarning` (which comes from
|
|
30
|
+
* `compileSiteThemeFromSelections`) so the layers stay clean: warnings are
|
|
31
|
+
* compiler-emitted, notices are UI-level decisions the configurator makes.
|
|
32
|
+
*/
|
|
33
|
+
export type StyleConfiguratorNotice = Readonly<{
|
|
34
|
+
kind: 'overrides-cleared-by-site-style-switch';
|
|
35
|
+
}>;
|
|
36
|
+
export type SelectionSnapshot = Readonly<{
|
|
37
|
+
siteStyleId: SiteStyleId;
|
|
38
|
+
buttonPersonalityId: ButtonPersonalityId;
|
|
39
|
+
paletteVariantId: PaletteVariantId;
|
|
40
|
+
paletteOverrides: PaletteOverrides | null;
|
|
41
|
+
}>;
|
|
42
|
+
export type StyleConfiguratorState = Readonly<{
|
|
43
|
+
/**
|
|
44
|
+
* Last persisted server snapshot. Updated on apply-success (and on
|
|
45
|
+
* external rebases via `syncStyleConfiguratorState`).
|
|
46
|
+
*/
|
|
47
|
+
base: SelectionSnapshot;
|
|
48
|
+
/**
|
|
49
|
+
* Currently rendered selection. Diverges from `base` while the user is
|
|
50
|
+
* previewing changes. Identical to `base` after apply-success.
|
|
51
|
+
*/
|
|
52
|
+
previewed: SelectionSnapshot;
|
|
53
|
+
saveStatus: StyleConfiguratorSaveStatus;
|
|
54
|
+
warnings: ReadonlyArray<CompatibilityWarning>;
|
|
55
|
+
notices: ReadonlyArray<StyleConfiguratorNotice>;
|
|
56
|
+
expandedRow: StyleConfiguratorExpandedRow;
|
|
57
|
+
}>;
|
|
58
|
+
export declare function createStyleConfiguratorState(base: SelectionSnapshot): StyleConfiguratorState;
|
|
59
|
+
/**
|
|
60
|
+
* True iff the user has previewed a change that hasn't been applied yet.
|
|
61
|
+
* Drives the "Apply" / "Cancel" footer visibility and the live-preview
|
|
62
|
+
* `setOverrideTheme` call.
|
|
63
|
+
*/
|
|
64
|
+
export declare function isPreviewingChange(state: StyleConfiguratorState): boolean;
|
|
65
|
+
export declare function previewSiteStyle(state: StyleConfiguratorState, siteStyleId: SiteStyleId): StyleConfiguratorState;
|
|
66
|
+
export declare function previewButtonPersonality(state: StyleConfiguratorState, buttonPersonalityId: ButtonPersonalityId): StyleConfiguratorState;
|
|
67
|
+
export declare function previewPaletteVariant(state: StyleConfiguratorState, paletteVariantId: PaletteVariantId): StyleConfiguratorState;
|
|
68
|
+
export declare function setPaletteOverrides(state: StyleConfiguratorState, paletteOverrides: PaletteOverrides | null): StyleConfiguratorState;
|
|
69
|
+
/**
|
|
70
|
+
* Records the post-compile resolved selection + any compatibility warnings.
|
|
71
|
+
* Used after `compileSiteThemeFromSelections` runs against a new site style:
|
|
72
|
+
* the resolver may have auto-picked a different personality / palette if the
|
|
73
|
+
* user's previous selections weren't compatible with the new style.
|
|
74
|
+
*
|
|
75
|
+
* When `clearOverrides` is true, sparse `paletteOverrides` from the previous
|
|
76
|
+
* site style are dropped — the new variant has different colour-role meanings
|
|
77
|
+
* (e.g. the previous `primary` override doesn't apply to the new variant's
|
|
78
|
+
* `primary` if the new style has a fundamentally different palette voice).
|
|
79
|
+
* A `'overrides-cleared-by-site-style-switch'` notice is appended so the UI
|
|
80
|
+
* can surface a "we cleared your colour overrides" line.
|
|
81
|
+
*/
|
|
82
|
+
export declare function applyResolvedSelections(state: StyleConfiguratorState, input: Readonly<{
|
|
83
|
+
resolved: Pick<SelectionSnapshot, 'buttonPersonalityId' | 'paletteVariantId'>;
|
|
84
|
+
warnings: ReadonlyArray<CompatibilityWarning>;
|
|
85
|
+
clearOverrides?: boolean;
|
|
86
|
+
}>): StyleConfiguratorState;
|
|
87
|
+
export declare function cancelPreview(state: StyleConfiguratorState): StyleConfiguratorState;
|
|
88
|
+
export declare function markApplySaving(state: StyleConfiguratorState): StyleConfiguratorState;
|
|
89
|
+
export declare function markApplySaved(state: StyleConfiguratorState, persisted: SelectionSnapshot): StyleConfiguratorState;
|
|
90
|
+
export declare function markApplyFailed(state: StyleConfiguratorState, message: string): StyleConfiguratorState;
|
|
91
|
+
export declare function toggleRow(state: StyleConfiguratorState, row: StyleConfiguratorExpandedRow): StyleConfiguratorState;
|
|
92
|
+
export declare function dismissWarnings(state: StyleConfiguratorState): StyleConfiguratorState;
|
|
93
|
+
export declare function dismissNotices(state: StyleConfiguratorState): StyleConfiguratorState;
|
|
94
|
+
/**
|
|
95
|
+
* Reconciles local state with a fresh server snapshot — used after
|
|
96
|
+
* `router.refresh()` lands new theme data, or when an external write
|
|
97
|
+
* changes the persisted selection out-of-band.
|
|
98
|
+
*/
|
|
99
|
+
export declare function syncStyleConfiguratorState(state: StyleConfiguratorState, base: SelectionSnapshot): StyleConfiguratorState;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BookingFlexibleBalanceConfig, BookingInstalmentPlanConfig } from '@riverbankcms/core';
|
|
1
|
+
import type { AddressedLocationValue, BusinessAddress, BookingFlexibleBalanceConfig, BookingInstalmentPlanConfig } from '@riverbankcms/core';
|
|
2
2
|
import type { MediaAssetIndexItem, SiteFooterContent, SiteHeaderContent, Theme } from '../contracts';
|
|
3
3
|
import type { BlockFieldConfig as SdkBlockFieldConfig, BlockFieldOptionsMap as SdkBlockFieldOptionsMap, ContentConfig as SdkContentConfig, ContainerOptionsConfig as SdkContainerOptionsConfig, FieldSelectOption as SdkFieldSelectOption, SdkCustomBlock, SdkThemeConfig, SdkThemePalette, SectionBackground as SdkSectionBackground, SectionOptionsConfig as SdkSectionOptionsConfig, SiteStyleConfig as SdkSiteStyleConfig } from '../config/types';
|
|
4
4
|
export type RuntimeSiteSdkConfig = {
|
|
@@ -270,6 +270,8 @@ export type SiteResponse = {
|
|
|
270
270
|
maintenance_mode_message?: unknown | null;
|
|
271
271
|
deployment_mode?: 'managed' | 'headless_cms' | 'headless_full' | null;
|
|
272
272
|
is_sdk_site?: boolean | null;
|
|
273
|
+
businessAddress?: BusinessAddress | null;
|
|
274
|
+
venuesById?: Record<string, AddressedLocationValue>;
|
|
273
275
|
};
|
|
274
276
|
favicon?: {
|
|
275
277
|
assetId: string;
|
|
@@ -279,6 +281,14 @@ export type SiteResponse = {
|
|
|
279
281
|
theme: Theme;
|
|
280
282
|
themeId?: string | null;
|
|
281
283
|
selectionId?: string | null;
|
|
284
|
+
/**
|
|
285
|
+
* Persisted Style configurator selections (Phase C). Optional so legacy
|
|
286
|
+
* payloads without these columns still satisfy the type — consumers fall
|
|
287
|
+
* back to the site style's defaults when null.
|
|
288
|
+
*/
|
|
289
|
+
selectionButtonPersonalityId?: string | null;
|
|
290
|
+
selectionPaletteVariantId?: string | null;
|
|
291
|
+
selectionPaletteOverrides?: Record<string, string> | null;
|
|
282
292
|
navigation: NavigationMenuWithItems[];
|
|
283
293
|
appointmentsEnabled?: boolean;
|
|
284
294
|
portalEnabled?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GradientDirection, ButtonPaddingPreset } from './types';
|
|
1
|
+
import type { ButtonSizes, GradientDirection, ButtonPaddingPreset } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Shared constants for button CSS generation
|
|
4
4
|
*
|
|
@@ -38,3 +38,11 @@ export declare const FONT_SIZE_MAP: Record<string, string>;
|
|
|
38
38
|
* These are global defaults that apply to all button variants unless overridden
|
|
39
39
|
*/
|
|
40
40
|
export declare const BUTTON_PADDING_PRESETS: Record<ButtonPaddingPreset, string>;
|
|
41
|
+
/**
|
|
42
|
+
* System defaults used when a theme doesn't supply its own `theme.buttons.sizes`.
|
|
43
|
+
*
|
|
44
|
+
* Every size is defined so the size class CSS always emits a complete rule and
|
|
45
|
+
* variants are never naked. Referenced by `generateButtonCss` and surfaceable
|
|
46
|
+
* from UI ("Showing default size ramp") without duplicating the values.
|
|
47
|
+
*/
|
|
48
|
+
export declare const DEFAULT_BUTTON_SIZES: ButtonSizes;
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import type { Theme } from '../schema';
|
|
2
2
|
import type { ButtonSystem } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Generate complete CSS for button system from theme config
|
|
5
|
-
*
|
|
6
|
-
* This function:
|
|
7
|
-
* 1. Reads button variants from theme.buttons
|
|
8
|
-
* 2. Generates CSS for each variant
|
|
9
|
-
* 3. Returns scoped CSS string
|
|
10
|
-
*
|
|
11
|
-
* Runs SERVER-SIDE during theme loading.
|
|
12
|
-
* NOTE: Renderer only knows about theme config, NOT presets.
|
|
13
|
-
*/
|
|
14
3
|
export interface GenerateButtonCssOptions {
|
|
15
4
|
themeId: string;
|
|
16
5
|
theme: Theme;
|
|
17
6
|
buttonSystem?: ButtonSystem;
|
|
18
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Generate complete CSS for a button system.
|
|
10
|
+
*
|
|
11
|
+
* Pipeline:
|
|
12
|
+
* 1. Resolve effective sizes (theme.sizes ∪ defaults)
|
|
13
|
+
* 2. For each enabled variant, produce a list of `CssChunk`s (typed rules
|
|
14
|
+
* + opaque effect CSS)
|
|
15
|
+
* 3. Emit a `.default` alias from the highest-priority variant
|
|
16
|
+
* 4. Serialise the whole list to a CSS string
|
|
17
|
+
*
|
|
18
|
+
* Padding/fontSize at size S resolve in order:
|
|
19
|
+
* variant.sizes?.[S] → theme.buttons.sizes?.[S] → DEFAULT_BUTTON_SIZES[S]
|
|
20
|
+
*
|
|
21
|
+
* 2-class selector specificity (`.{id}.btn-{S}`) carries the size override;
|
|
22
|
+
* no `!important` required.
|
|
23
|
+
*/
|
|
19
24
|
export declare function generateButtonCss(options: GenerateButtonCssOptions): string;
|
|
@@ -1,30 +1,23 @@
|
|
|
1
1
|
import type { Theme } from '../schema';
|
|
2
2
|
import type { ButtonSystem } from './types';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* Used in effect generation
|
|
6
|
-
*/
|
|
7
|
-
export declare const MOTION_TO_DURATION_MAP: Record<string, string>;
|
|
8
|
-
/**
|
|
9
|
-
* Map motion easing to CSS easing function
|
|
10
|
-
*/
|
|
11
|
-
export declare const MOTION_TO_EASING_MAP: Record<string, string>;
|
|
12
|
-
/**
|
|
13
|
-
* Generate default button system from theme settings
|
|
4
|
+
* Generate default button system from theme settings.
|
|
14
5
|
*
|
|
15
|
-
* Creates 4
|
|
6
|
+
* Creates 4 sized variants when theme.buttons is not defined:
|
|
16
7
|
* 1. Primary - primary color background with opacity-reduce hover effect
|
|
17
8
|
* 2. Secondary - neutral-700 background with opacity-reduce hover effect
|
|
18
9
|
* 3. Outline - transparent background with primary border and opacity-reduce hover effect
|
|
19
10
|
* 4. Ghost - transparent background, no border, with opacity-reduce hover effect
|
|
20
11
|
*
|
|
21
|
-
* All variants
|
|
22
|
-
*
|
|
23
|
-
*
|
|
12
|
+
* All four are sized variants — they inherit padding/fontSize from the theme's
|
|
13
|
+
* `sizes` config (or the system defaults) so they're consistent at any size.
|
|
14
|
+
*
|
|
15
|
+
* Variants use theme settings for:
|
|
16
|
+
* - Border radius (via global.cornerStyle / theme.corners)
|
|
17
|
+
* - Shadow (via global.shadow / theme.shadow.elevation)
|
|
24
18
|
* - Border width for outline (from theme.border.width)
|
|
25
|
-
* - Transitions (from theme.motion)
|
|
26
19
|
*
|
|
27
20
|
* @param theme - Theme configuration
|
|
28
|
-
* @returns ButtonSystem with 4 default variants
|
|
21
|
+
* @returns ButtonSystem with 4 default sized variants
|
|
29
22
|
*/
|
|
30
23
|
export declare function generateDefaultButtonSystem(theme: Theme): ButtonSystem;
|
|
@@ -8,6 +8,7 @@ export * from './generateButtonCss';
|
|
|
8
8
|
export * from './generateDefaultButtonSystem';
|
|
9
9
|
export * from './constants';
|
|
10
10
|
export * from './presets';
|
|
11
|
+
export * from './personalities';
|
|
11
12
|
export * from './effects/types';
|
|
12
13
|
export * from './effects/registry';
|
|
13
14
|
export * from './effects/presets/transform';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brushed Wash — gradient backgrounds that read as watercolour washes.
|
|
3
|
+
* Generous padding, soft shadows; pairs with vibrant organic brands.
|
|
4
|
+
*/
|
|
5
|
+
export declare const brushedWash: Readonly<{
|
|
6
|
+
id: import("./types").ButtonPersonalityId;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
tags: import("../../site-styles").StyleTags;
|
|
10
|
+
buttonSystem: import("@riverbankcms/blocks").ButtonSystem;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Confident Chip — moderate-radius solid buttons that read as competent and
|
|
3
|
+
* direct. Default for Clear Professional; works for any modern brand voice.
|
|
4
|
+
*/
|
|
5
|
+
export declare const confidentChip: Readonly<{
|
|
6
|
+
id: import("./types").ButtonPersonalityId;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
tags: import("../../site-styles").StyleTags;
|
|
10
|
+
buttonSystem: import("@riverbankcms/blocks").ButtonSystem;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Editorial Link — all variants are link-style with a growing underline.
|
|
3
|
+
* Default for Warm Editorial and Quiet Luxury; reads as refined and quiet.
|
|
4
|
+
*/
|
|
5
|
+
export declare const editorialLink: Readonly<{
|
|
6
|
+
id: import("./types").ButtonPersonalityId;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
tags: import("../../site-styles").StyleTags;
|
|
10
|
+
buttonSystem: import("@riverbankcms/blocks").ButtonSystem;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Button personality library.
|
|
3
|
+
*
|
|
4
|
+
* Each personality is a complete `ButtonSystem` tagged on the four style axes
|
|
5
|
+
* (tone / energy / motion / era). Curated site styles declare a default
|
|
6
|
+
* personality + an acceptance region that filters the picker; the Style
|
|
7
|
+
* configurator UI uses `compatibleEntries` from `site-styles/compatibility.ts`
|
|
8
|
+
* to surface valid options.
|
|
9
|
+
*/
|
|
10
|
+
import type { ButtonPersonality, ButtonPersonalityId } from './types';
|
|
11
|
+
export type { ButtonPersonality, ButtonPersonalityId } from './types';
|
|
12
|
+
export { asButtonPersonalityId, buttonPersonalityIdSchema, buttonPersonalitySchema, defineButtonPersonality, } from './types';
|
|
13
|
+
export declare const buttonPersonalities: readonly ButtonPersonality[];
|
|
14
|
+
export declare function findButtonPersonality(id: ButtonPersonalityId): ButtonPersonality | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ink Stamp — solid earthy fills with a bordered, hand-stamped block-print
|
|
3
|
+
* feel. Reads as bold and handmade; suits expressive craft brands.
|
|
4
|
+
*/
|
|
5
|
+
export declare const inkStamp: Readonly<{
|
|
6
|
+
id: import("./types").ButtonPersonalityId;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
tags: import("../../site-styles").StyleTags;
|
|
10
|
+
buttonSystem: import("@riverbankcms/blocks").ButtonSystem;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pebble — large pill primaries with generous padding. Reads as spa-luxurious
|
|
3
|
+
* and natural; pairs well with wellness/yoga/dance brands.
|
|
4
|
+
*/
|
|
5
|
+
export declare const pebble: Readonly<{
|
|
6
|
+
id: import("./types").ButtonPersonalityId;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
tags: import("../../site-styles").StyleTags;
|
|
10
|
+
buttonSystem: import("@riverbankcms/blocks").ButtonSystem;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Soft Pill — rounded-full pill buttons with a hover lift. The default for
|
|
3
|
+
* Calm Studio and Modern Wellness; reads as quietly modern and welcoming.
|
|
4
|
+
*/
|
|
5
|
+
export declare const softPill: Readonly<{
|
|
6
|
+
id: import("./types").ButtonPersonalityId;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
tags: import("../../site-styles").StyleTags;
|
|
10
|
+
buttonSystem: import("@riverbankcms/blocks").ButtonSystem;
|
|
11
|
+
}>;
|