@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
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brand-led family — confident, modern, contemporary brand voices. Pairs
|
|
3
|
+
* with Clear Professional, Bright Community, Practical Services site styles.
|
|
4
|
+
*/
|
|
5
|
+
export declare const brandLedCool: Readonly<{
|
|
6
|
+
id: import("@riverbankcms/blocks").PaletteVariantId;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
tags: import("../../site-styles").StyleTags;
|
|
10
|
+
mode: "light" | "dark";
|
|
11
|
+
colors: ReadonlyArray<import("@riverbankcms/blocks").PaletteColor>;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const brandLedWarm: Readonly<{
|
|
14
|
+
id: import("@riverbankcms/blocks").PaletteVariantId;
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
tags: import("../../site-styles").StyleTags;
|
|
18
|
+
mode: "light" | "dark";
|
|
19
|
+
colors: ReadonlyArray<import("@riverbankcms/blocks").PaletteColor>;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const brandLedJewel: Readonly<{
|
|
22
|
+
id: import("@riverbankcms/blocks").PaletteVariantId;
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
tags: import("../../site-styles").StyleTags;
|
|
26
|
+
mode: "light" | "dark";
|
|
27
|
+
colors: ReadonlyArray<import("@riverbankcms/blocks").PaletteColor>;
|
|
28
|
+
}>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* High-contrast family — editorial and minimal voices with high legibility.
|
|
3
|
+
* Pairs with Quiet Luxury, Bold Launch, Practical Services site styles.
|
|
4
|
+
*/
|
|
5
|
+
export declare const highContrastInk: Readonly<{
|
|
6
|
+
id: import("@riverbankcms/blocks").PaletteVariantId;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
tags: import("../../site-styles").StyleTags;
|
|
10
|
+
mode: "light" | "dark";
|
|
11
|
+
colors: ReadonlyArray<import("@riverbankcms/blocks").PaletteColor>;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const highContrastCharcoal: Readonly<{
|
|
14
|
+
id: import("@riverbankcms/blocks").PaletteVariantId;
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
tags: import("../../site-styles").StyleTags;
|
|
18
|
+
mode: "light" | "dark";
|
|
19
|
+
colors: ReadonlyArray<import("@riverbankcms/blocks").PaletteColor>;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const highContrastMonochrome: Readonly<{
|
|
22
|
+
id: import("@riverbankcms/blocks").PaletteVariantId;
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
tags: import("../../site-styles").StyleTags;
|
|
26
|
+
mode: "light" | "dark";
|
|
27
|
+
colors: ReadonlyArray<import("@riverbankcms/blocks").PaletteColor>;
|
|
28
|
+
}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Palette variant library.
|
|
3
|
+
*
|
|
4
|
+
* Each variant is a complete colour palette tagged on the four style axes
|
|
5
|
+
* (tone / energy / motion / era — motion is rarely used for palettes).
|
|
6
|
+
* Curated site styles declare a default palette + an acceptance region that
|
|
7
|
+
* filters the picker; the Style configurator UI uses `compatibleEntries`
|
|
8
|
+
* from `site-styles/compatibility.ts` to surface valid options.
|
|
9
|
+
*
|
|
10
|
+
* `paletteOverrides` carries per-token hex edits applied on top of the
|
|
11
|
+
* chosen variant; see the merge semantics in `compileSiteThemeFromSelections`.
|
|
12
|
+
*/
|
|
13
|
+
import type { PaletteVariant, PaletteVariantId } from './types';
|
|
14
|
+
export type { HexColor, PaletteColor, PaletteOverrides, PaletteTokenName, PaletteVariant, PaletteVariantId } from './types';
|
|
15
|
+
export { PALETTE_TOKEN_NAMES, asPaletteVariantId, definePaletteVariant, hexColorSchema, paletteOverridesSchema, paletteTokenNameSchema, paletteVariantIdSchema, paletteVariantSchema, } from './types';
|
|
16
|
+
export declare const paletteVariants: readonly PaletteVariant[];
|
|
17
|
+
export declare function findPaletteVariant(id: PaletteVariantId): PaletteVariant | undefined;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Soft-natural family — calm, organic, plant-led voices. Pairs with Calm
|
|
3
|
+
* Studio, Modern Wellness, Warm Editorial site styles.
|
|
4
|
+
*/
|
|
5
|
+
export declare const softNaturalSage: Readonly<{
|
|
6
|
+
id: import("@riverbankcms/blocks").PaletteVariantId;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
tags: import("../../site-styles").StyleTags;
|
|
10
|
+
mode: "light" | "dark";
|
|
11
|
+
colors: ReadonlyArray<import("@riverbankcms/blocks").PaletteColor>;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const softNaturalStone: Readonly<{
|
|
14
|
+
id: import("@riverbankcms/blocks").PaletteVariantId;
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
tags: import("../../site-styles").StyleTags;
|
|
18
|
+
mode: "light" | "dark";
|
|
19
|
+
colors: ReadonlyArray<import("@riverbankcms/blocks").PaletteColor>;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const softNaturalWatercolor: Readonly<{
|
|
22
|
+
id: import("@riverbankcms/blocks").PaletteVariantId;
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
tags: import("../../site-styles").StyleTags;
|
|
26
|
+
mode: "light" | "dark";
|
|
27
|
+
colors: ReadonlyArray<import("@riverbankcms/blocks").PaletteColor>;
|
|
28
|
+
}>;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type StyleTags } from '../../site-styles/compatibility';
|
|
3
|
+
/**
|
|
4
|
+
* Branded ID for a palette variant in the curated library. Shape matches the
|
|
5
|
+
* `Brand<T, TBrand>` convention in `site-styles/types.ts`. Use the helper at
|
|
6
|
+
* the parse/construction boundary.
|
|
7
|
+
*/
|
|
8
|
+
export type PaletteVariantId = string & {
|
|
9
|
+
readonly __brand: 'PaletteVariantId';
|
|
10
|
+
};
|
|
11
|
+
export declare function asPaletteVariantId(value: string): PaletteVariantId;
|
|
12
|
+
export declare const paletteVariantIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<PaletteVariantId, string>>;
|
|
13
|
+
/**
|
|
14
|
+
* Known palette role token names. Closed union so unknown tokens can't be
|
|
15
|
+
* persisted via `paletteOverrides`. Add a new role here intentionally.
|
|
16
|
+
*/
|
|
17
|
+
export declare const PALETTE_TOKEN_NAMES: readonly ["primary", "primaryForeground", "secondary", "accent", "success", "warning", "destructive", "background", "surface", "surfaceAlt", "muted", "text", "border"];
|
|
18
|
+
export type PaletteTokenName = (typeof PALETTE_TOKEN_NAMES)[number];
|
|
19
|
+
export declare const paletteTokenNameSchema: z.ZodEnum<{
|
|
20
|
+
success: "success";
|
|
21
|
+
text: "text";
|
|
22
|
+
primary: "primary";
|
|
23
|
+
secondary: "secondary";
|
|
24
|
+
background: "background";
|
|
25
|
+
surface: "surface";
|
|
26
|
+
accent: "accent";
|
|
27
|
+
muted: "muted";
|
|
28
|
+
border: "border";
|
|
29
|
+
warning: "warning";
|
|
30
|
+
destructive: "destructive";
|
|
31
|
+
primaryForeground: "primaryForeground";
|
|
32
|
+
surfaceAlt: "surfaceAlt";
|
|
33
|
+
}>;
|
|
34
|
+
export type HexColor = string & {
|
|
35
|
+
readonly __brand: 'HexColor';
|
|
36
|
+
};
|
|
37
|
+
export declare const hexColorSchema: z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>;
|
|
38
|
+
/**
|
|
39
|
+
* One slot in a palette variant. `name` is restricted to the closed
|
|
40
|
+
* `PaletteTokenName` union so authoring typos (`'priamry'`) are caught at
|
|
41
|
+
* compile time; the value side stays as raw `string` (validated by
|
|
42
|
+
* `paletteColorSchema`'s less-strict regex for back-compat with existing data).
|
|
43
|
+
*/
|
|
44
|
+
export type PaletteColor = Readonly<{
|
|
45
|
+
name: PaletteTokenName;
|
|
46
|
+
hex: string;
|
|
47
|
+
}>;
|
|
48
|
+
export type PaletteVariant = Readonly<{
|
|
49
|
+
id: PaletteVariantId;
|
|
50
|
+
name: string;
|
|
51
|
+
description: string;
|
|
52
|
+
tags: StyleTags;
|
|
53
|
+
mode: 'light' | 'dark';
|
|
54
|
+
colors: ReadonlyArray<PaletteColor>;
|
|
55
|
+
}>;
|
|
56
|
+
export declare const paletteVariantSchema: z.ZodObject<{
|
|
57
|
+
id: z.ZodPipe<z.ZodString, z.ZodTransform<PaletteVariantId, string>>;
|
|
58
|
+
name: z.ZodString;
|
|
59
|
+
description: z.ZodString;
|
|
60
|
+
tags: z.ZodObject<{
|
|
61
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
62
|
+
classic: "classic";
|
|
63
|
+
bold: "bold";
|
|
64
|
+
minimal: "minimal";
|
|
65
|
+
}>>;
|
|
66
|
+
energy: z.ZodOptional<z.ZodEnum<{
|
|
67
|
+
calm: "calm";
|
|
68
|
+
vibrant: "vibrant";
|
|
69
|
+
}>>;
|
|
70
|
+
motion: z.ZodOptional<z.ZodEnum<{
|
|
71
|
+
standard: "standard";
|
|
72
|
+
subtle: "subtle";
|
|
73
|
+
expressive: "expressive";
|
|
74
|
+
}>>;
|
|
75
|
+
era: z.ZodOptional<z.ZodEnum<{
|
|
76
|
+
editorial: "editorial";
|
|
77
|
+
modern: "modern";
|
|
78
|
+
retro: "retro";
|
|
79
|
+
technical: "technical";
|
|
80
|
+
organic: "organic";
|
|
81
|
+
}>>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
mode: z.ZodEnum<{
|
|
84
|
+
dark: "dark";
|
|
85
|
+
light: "light";
|
|
86
|
+
}>;
|
|
87
|
+
colors: z.ZodArray<z.ZodObject<{
|
|
88
|
+
hex: z.ZodString;
|
|
89
|
+
name: z.ZodEnum<{
|
|
90
|
+
success: "success";
|
|
91
|
+
text: "text";
|
|
92
|
+
primary: "primary";
|
|
93
|
+
secondary: "secondary";
|
|
94
|
+
background: "background";
|
|
95
|
+
surface: "surface";
|
|
96
|
+
accent: "accent";
|
|
97
|
+
muted: "muted";
|
|
98
|
+
border: "border";
|
|
99
|
+
warning: "warning";
|
|
100
|
+
destructive: "destructive";
|
|
101
|
+
primaryForeground: "primaryForeground";
|
|
102
|
+
surfaceAlt: "surfaceAlt";
|
|
103
|
+
}>;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
export declare function definePaletteVariant(input: {
|
|
107
|
+
id: string;
|
|
108
|
+
name: string;
|
|
109
|
+
description: string;
|
|
110
|
+
tags: StyleTags;
|
|
111
|
+
mode: 'light' | 'dark';
|
|
112
|
+
colors: ReadonlyArray<PaletteColor>;
|
|
113
|
+
}): PaletteVariant;
|
|
114
|
+
/**
|
|
115
|
+
* Sparse per-token override map. Loaded from / persisted to
|
|
116
|
+
* `site_theme_selections.palette_overrides`. Empty / null means "no overrides
|
|
117
|
+
* applied; the palette variant's own colours render unchanged."
|
|
118
|
+
*/
|
|
119
|
+
export type PaletteOverrides = Readonly<Partial<Record<PaletteTokenName, HexColor>>>;
|
|
120
|
+
/**
|
|
121
|
+
* Sparse object of known token names → hex colours. Unknown keys are
|
|
122
|
+
* rejected at parse time; missing keys mean "no override for that token".
|
|
123
|
+
* Built as an explicit partial-object schema (rather than `z.record(enum, …)`)
|
|
124
|
+
* for unambiguous closure under Zod 4.
|
|
125
|
+
*/
|
|
126
|
+
export declare const paletteOverridesSchema: z.ZodPipe<z.ZodObject<{
|
|
127
|
+
primary: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
|
|
128
|
+
primaryForeground: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
|
|
129
|
+
secondary: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
|
|
130
|
+
accent: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
|
|
131
|
+
success: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
|
|
132
|
+
warning: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
|
|
133
|
+
destructive: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
|
|
134
|
+
background: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
|
|
135
|
+
surface: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
|
|
136
|
+
surfaceAlt: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
|
|
137
|
+
muted: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
|
|
138
|
+
text: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
|
|
139
|
+
border: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
|
|
140
|
+
}, z.core.$strict>, z.ZodTransform<Readonly<Partial<Record<"success" | "text" | "primary" | "secondary" | "background" | "surface" | "accent" | "muted" | "border" | "warning" | "destructive" | "primaryForeground" | "surfaceAlt", HexColor>>>, {
|
|
141
|
+
primary?: HexColor | undefined;
|
|
142
|
+
primaryForeground?: HexColor | undefined;
|
|
143
|
+
secondary?: HexColor | undefined;
|
|
144
|
+
accent?: HexColor | undefined;
|
|
145
|
+
success?: HexColor | undefined;
|
|
146
|
+
warning?: HexColor | undefined;
|
|
147
|
+
destructive?: HexColor | undefined;
|
|
148
|
+
background?: HexColor | undefined;
|
|
149
|
+
surface?: HexColor | undefined;
|
|
150
|
+
surfaceAlt?: HexColor | undefined;
|
|
151
|
+
muted?: HexColor | undefined;
|
|
152
|
+
text?: HexColor | undefined;
|
|
153
|
+
border?: HexColor | undefined;
|
|
154
|
+
}>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Warm-neutral family — earthy, organic, hand-made brand voices. Pairs with
|
|
3
|
+
* Warm Editorial, Modern Wellness, Calm Studio site styles.
|
|
4
|
+
*/
|
|
5
|
+
export declare const warmNeutralClay: Readonly<{
|
|
6
|
+
id: import("@riverbankcms/blocks").PaletteVariantId;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
tags: import("../../site-styles").StyleTags;
|
|
10
|
+
mode: "light" | "dark";
|
|
11
|
+
colors: ReadonlyArray<import("@riverbankcms/blocks").PaletteColor>;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const warmNeutralCream: Readonly<{
|
|
14
|
+
id: import("@riverbankcms/blocks").PaletteVariantId;
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
tags: import("../../site-styles").StyleTags;
|
|
18
|
+
mode: "light" | "dark";
|
|
19
|
+
colors: ReadonlyArray<import("@riverbankcms/blocks").PaletteColor>;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const warmNeutralForest: Readonly<{
|
|
22
|
+
id: import("@riverbankcms/blocks").PaletteVariantId;
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
tags: import("../../site-styles").StyleTags;
|
|
26
|
+
mode: "light" | "dark";
|
|
27
|
+
colors: ReadonlyArray<import("@riverbankcms/blocks").PaletteColor>;
|
|
28
|
+
}>;
|
|
@@ -3643,6 +3643,12 @@ export declare const themeSchema: z.ZodObject<{
|
|
|
3643
3643
|
body: "body";
|
|
3644
3644
|
heading: "heading";
|
|
3645
3645
|
}>>;
|
|
3646
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
3647
|
+
letterSpacing: z.ZodOptional<z.ZodEnum<{
|
|
3648
|
+
normal: "normal";
|
|
3649
|
+
loose: "loose";
|
|
3650
|
+
tight: "tight";
|
|
3651
|
+
}>>;
|
|
3646
3652
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
3647
3653
|
paddingPreset: z.ZodOptional<z.ZodEnum<{
|
|
3648
3654
|
compact: "compact";
|
|
@@ -3700,7 +3706,7 @@ export declare const themeSchema: z.ZodObject<{
|
|
|
3700
3706
|
type: z.ZodLiteral<"transparent">;
|
|
3701
3707
|
}, z.core.$strip>], "type">;
|
|
3702
3708
|
textColorToken: z.ZodString;
|
|
3703
|
-
borderRadius: z.ZodString
|
|
3709
|
+
borderRadius: z.ZodOptional<z.ZodString>;
|
|
3704
3710
|
shadow: z.ZodOptional<z.ZodObject<{
|
|
3705
3711
|
elevation: z.ZodEnum<{
|
|
3706
3712
|
medium: "medium";
|
|
@@ -3722,8 +3728,6 @@ export declare const themeSchema: z.ZodObject<{
|
|
|
3722
3728
|
widthClass: z.ZodString;
|
|
3723
3729
|
colorToken: z.ZodString;
|
|
3724
3730
|
}, z.core.$strip>>;
|
|
3725
|
-
padding: z.ZodOptional<z.ZodString>;
|
|
3726
|
-
fontSize: z.ZodOptional<z.ZodString>;
|
|
3727
3731
|
hoverBackgroundToken: z.ZodOptional<z.ZodString>;
|
|
3728
3732
|
effects: z.ZodOptional<z.ZodObject<{
|
|
3729
3733
|
base: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -3743,8 +3747,26 @@ export declare const themeSchema: z.ZodObject<{
|
|
|
3743
3747
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
3744
3748
|
}, z.core.$strip>>>;
|
|
3745
3749
|
}, z.core.$strip>>;
|
|
3750
|
+
sizes: z.ZodOptional<z.ZodObject<{
|
|
3751
|
+
sm: z.ZodOptional<z.ZodObject<{
|
|
3752
|
+
padding: z.ZodString;
|
|
3753
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
3754
|
+
}, z.core.$strip>>;
|
|
3755
|
+
md: z.ZodOptional<z.ZodObject<{
|
|
3756
|
+
padding: z.ZodString;
|
|
3757
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
3758
|
+
}, z.core.$strip>>;
|
|
3759
|
+
lg: z.ZodOptional<z.ZodObject<{
|
|
3760
|
+
padding: z.ZodString;
|
|
3761
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
3762
|
+
}, z.core.$strip>>;
|
|
3763
|
+
xl: z.ZodOptional<z.ZodObject<{
|
|
3764
|
+
padding: z.ZodString;
|
|
3765
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
3766
|
+
}, z.core.$strip>>;
|
|
3767
|
+
}, z.core.$strip>>;
|
|
3746
3768
|
}, z.core.$strip>>;
|
|
3747
|
-
sizes: z.ZodOptional<z.ZodObject<{
|
|
3769
|
+
sizes: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
3748
3770
|
sm: z.ZodObject<{
|
|
3749
3771
|
padding: z.ZodString;
|
|
3750
3772
|
fontSize: z.ZodOptional<z.ZodString>;
|
|
@@ -3761,7 +3783,41 @@ export declare const themeSchema: z.ZodObject<{
|
|
|
3761
3783
|
padding: z.ZodString;
|
|
3762
3784
|
fontSize: z.ZodOptional<z.ZodString>;
|
|
3763
3785
|
}, z.core.$strip>>;
|
|
3764
|
-
}, z.core.$strip
|
|
3786
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
3787
|
+
sm: {
|
|
3788
|
+
padding: string;
|
|
3789
|
+
fontSize?: string | undefined;
|
|
3790
|
+
};
|
|
3791
|
+
md: {
|
|
3792
|
+
padding: string;
|
|
3793
|
+
fontSize?: string | undefined;
|
|
3794
|
+
};
|
|
3795
|
+
lg: {
|
|
3796
|
+
padding: string;
|
|
3797
|
+
fontSize?: string | undefined;
|
|
3798
|
+
};
|
|
3799
|
+
xl: {
|
|
3800
|
+
padding: string;
|
|
3801
|
+
fontSize?: string | undefined;
|
|
3802
|
+
};
|
|
3803
|
+
}, {
|
|
3804
|
+
sm: {
|
|
3805
|
+
padding: string;
|
|
3806
|
+
fontSize?: string | undefined;
|
|
3807
|
+
};
|
|
3808
|
+
md: {
|
|
3809
|
+
padding: string;
|
|
3810
|
+
fontSize?: string | undefined;
|
|
3811
|
+
};
|
|
3812
|
+
lg: {
|
|
3813
|
+
padding: string;
|
|
3814
|
+
fontSize?: string | undefined;
|
|
3815
|
+
};
|
|
3816
|
+
xl?: {
|
|
3817
|
+
padding: string;
|
|
3818
|
+
fontSize?: string | undefined;
|
|
3819
|
+
} | undefined;
|
|
3820
|
+
}>>>;
|
|
3765
3821
|
}, z.core.$strip>>;
|
|
3766
3822
|
cards: z.ZodOptional<z.ZodObject<{
|
|
3767
3823
|
variants: z.ZodArray<z.ZodObject<{
|
|
@@ -5612,6 +5668,12 @@ export declare const themesTurnSchema: z.ZodObject<{
|
|
|
5612
5668
|
body: "body";
|
|
5613
5669
|
heading: "heading";
|
|
5614
5670
|
}>>;
|
|
5671
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
5672
|
+
letterSpacing: z.ZodOptional<z.ZodEnum<{
|
|
5673
|
+
normal: "normal";
|
|
5674
|
+
loose: "loose";
|
|
5675
|
+
tight: "tight";
|
|
5676
|
+
}>>;
|
|
5615
5677
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
5616
5678
|
paddingPreset: z.ZodOptional<z.ZodEnum<{
|
|
5617
5679
|
compact: "compact";
|
|
@@ -5669,7 +5731,7 @@ export declare const themesTurnSchema: z.ZodObject<{
|
|
|
5669
5731
|
type: z.ZodLiteral<"transparent">;
|
|
5670
5732
|
}, z.core.$strip>], "type">;
|
|
5671
5733
|
textColorToken: z.ZodString;
|
|
5672
|
-
borderRadius: z.ZodString
|
|
5734
|
+
borderRadius: z.ZodOptional<z.ZodString>;
|
|
5673
5735
|
shadow: z.ZodOptional<z.ZodObject<{
|
|
5674
5736
|
elevation: z.ZodEnum<{
|
|
5675
5737
|
medium: "medium";
|
|
@@ -5691,8 +5753,6 @@ export declare const themesTurnSchema: z.ZodObject<{
|
|
|
5691
5753
|
widthClass: z.ZodString;
|
|
5692
5754
|
colorToken: z.ZodString;
|
|
5693
5755
|
}, z.core.$strip>>;
|
|
5694
|
-
padding: z.ZodOptional<z.ZodString>;
|
|
5695
|
-
fontSize: z.ZodOptional<z.ZodString>;
|
|
5696
5756
|
hoverBackgroundToken: z.ZodOptional<z.ZodString>;
|
|
5697
5757
|
effects: z.ZodOptional<z.ZodObject<{
|
|
5698
5758
|
base: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -5712,8 +5772,26 @@ export declare const themesTurnSchema: z.ZodObject<{
|
|
|
5712
5772
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
5713
5773
|
}, z.core.$strip>>>;
|
|
5714
5774
|
}, z.core.$strip>>;
|
|
5775
|
+
sizes: z.ZodOptional<z.ZodObject<{
|
|
5776
|
+
sm: z.ZodOptional<z.ZodObject<{
|
|
5777
|
+
padding: z.ZodString;
|
|
5778
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
5779
|
+
}, z.core.$strip>>;
|
|
5780
|
+
md: z.ZodOptional<z.ZodObject<{
|
|
5781
|
+
padding: z.ZodString;
|
|
5782
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
5783
|
+
}, z.core.$strip>>;
|
|
5784
|
+
lg: z.ZodOptional<z.ZodObject<{
|
|
5785
|
+
padding: z.ZodString;
|
|
5786
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
5787
|
+
}, z.core.$strip>>;
|
|
5788
|
+
xl: z.ZodOptional<z.ZodObject<{
|
|
5789
|
+
padding: z.ZodString;
|
|
5790
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
5791
|
+
}, z.core.$strip>>;
|
|
5792
|
+
}, z.core.$strip>>;
|
|
5715
5793
|
}, z.core.$strip>>;
|
|
5716
|
-
sizes: z.ZodOptional<z.ZodObject<{
|
|
5794
|
+
sizes: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
5717
5795
|
sm: z.ZodObject<{
|
|
5718
5796
|
padding: z.ZodString;
|
|
5719
5797
|
fontSize: z.ZodOptional<z.ZodString>;
|
|
@@ -5730,7 +5808,41 @@ export declare const themesTurnSchema: z.ZodObject<{
|
|
|
5730
5808
|
padding: z.ZodString;
|
|
5731
5809
|
fontSize: z.ZodOptional<z.ZodString>;
|
|
5732
5810
|
}, z.core.$strip>>;
|
|
5733
|
-
}, z.core.$strip
|
|
5811
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
5812
|
+
sm: {
|
|
5813
|
+
padding: string;
|
|
5814
|
+
fontSize?: string | undefined;
|
|
5815
|
+
};
|
|
5816
|
+
md: {
|
|
5817
|
+
padding: string;
|
|
5818
|
+
fontSize?: string | undefined;
|
|
5819
|
+
};
|
|
5820
|
+
lg: {
|
|
5821
|
+
padding: string;
|
|
5822
|
+
fontSize?: string | undefined;
|
|
5823
|
+
};
|
|
5824
|
+
xl: {
|
|
5825
|
+
padding: string;
|
|
5826
|
+
fontSize?: string | undefined;
|
|
5827
|
+
};
|
|
5828
|
+
}, {
|
|
5829
|
+
sm: {
|
|
5830
|
+
padding: string;
|
|
5831
|
+
fontSize?: string | undefined;
|
|
5832
|
+
};
|
|
5833
|
+
md: {
|
|
5834
|
+
padding: string;
|
|
5835
|
+
fontSize?: string | undefined;
|
|
5836
|
+
};
|
|
5837
|
+
lg: {
|
|
5838
|
+
padding: string;
|
|
5839
|
+
fontSize?: string | undefined;
|
|
5840
|
+
};
|
|
5841
|
+
xl?: {
|
|
5842
|
+
padding: string;
|
|
5843
|
+
fontSize?: string | undefined;
|
|
5844
|
+
} | undefined;
|
|
5845
|
+
}>>>;
|
|
5734
5846
|
}, z.core.$strip>>;
|
|
5735
5847
|
cards: z.ZodOptional<z.ZodObject<{
|
|
5736
5848
|
variants: z.ZodArray<z.ZodObject<{
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Compatibility primitives for filtering button personalities and palette
|
|
4
|
+
* variants against a curated site style's acceptance region.
|
|
5
|
+
*
|
|
6
|
+
* Three axes (`tone`, `energy`, `motion`) reuse the values already declared on
|
|
7
|
+
* `theme.axes` so personality/palette tags can't drift from the rest of the
|
|
8
|
+
* design system. `era` is a fourth axis added here because the theme schema
|
|
9
|
+
* doesn't carry a "style language" / cultural-reference dimension.
|
|
10
|
+
*
|
|
11
|
+
* Pure functions; no ambient state. Used by:
|
|
12
|
+
* - `compileSiteThemeFromSelections` to filter / resolve incompatible IDs
|
|
13
|
+
* - The Style configurator UI to filter pickable options
|
|
14
|
+
*/
|
|
15
|
+
export declare const STYLE_AXIS_VALUES: {
|
|
16
|
+
readonly tone: readonly ["minimal", "classic", "bold"];
|
|
17
|
+
readonly energy: readonly ["calm", "vibrant"];
|
|
18
|
+
readonly motion: readonly ["subtle", "standard", "expressive"];
|
|
19
|
+
readonly era: readonly ["editorial", "modern", "organic", "technical", "retro"];
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Zod schema for `StyleTags`. Derived from `STYLE_AXIS_VALUES` so a single
|
|
23
|
+
* source of truth governs both the type-level vocabulary and the runtime
|
|
24
|
+
* validator used by `buttonPersonalitySchema` and `paletteVariantSchema`.
|
|
25
|
+
*/
|
|
26
|
+
export declare const styleTagsSchema: z.ZodObject<{
|
|
27
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
28
|
+
classic: "classic";
|
|
29
|
+
bold: "bold";
|
|
30
|
+
minimal: "minimal";
|
|
31
|
+
}>>;
|
|
32
|
+
energy: z.ZodOptional<z.ZodEnum<{
|
|
33
|
+
calm: "calm";
|
|
34
|
+
vibrant: "vibrant";
|
|
35
|
+
}>>;
|
|
36
|
+
motion: z.ZodOptional<z.ZodEnum<{
|
|
37
|
+
standard: "standard";
|
|
38
|
+
subtle: "subtle";
|
|
39
|
+
expressive: "expressive";
|
|
40
|
+
}>>;
|
|
41
|
+
era: z.ZodOptional<z.ZodEnum<{
|
|
42
|
+
editorial: "editorial";
|
|
43
|
+
modern: "modern";
|
|
44
|
+
retro: "retro";
|
|
45
|
+
technical: "technical";
|
|
46
|
+
organic: "organic";
|
|
47
|
+
}>>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export type StyleTone = (typeof STYLE_AXIS_VALUES.tone)[number];
|
|
50
|
+
export type StyleEnergy = (typeof STYLE_AXIS_VALUES.energy)[number];
|
|
51
|
+
export type StyleMotion = (typeof STYLE_AXIS_VALUES.motion)[number];
|
|
52
|
+
export type StyleEra = (typeof STYLE_AXIS_VALUES.era)[number];
|
|
53
|
+
export type StyleAxis = Readonly<{
|
|
54
|
+
tone: StyleTone;
|
|
55
|
+
energy: StyleEnergy;
|
|
56
|
+
motion: StyleMotion;
|
|
57
|
+
era: StyleEra;
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* A personality or palette's self-declared tags. All four axes are optional;
|
|
61
|
+
* an unset axis matches every region (no constraint).
|
|
62
|
+
*/
|
|
63
|
+
export type StyleTags = Readonly<Partial<StyleAxis>>;
|
|
64
|
+
/**
|
|
65
|
+
* A site style's acceptance region. Each axis declares the set of values that
|
|
66
|
+
* pair well with the site style. An unset axis accepts everything.
|
|
67
|
+
*/
|
|
68
|
+
export type AcceptanceRegion = Readonly<{
|
|
69
|
+
[K in keyof StyleAxis]?: ReadonlyArray<StyleAxis[K]>;
|
|
70
|
+
}>;
|
|
71
|
+
/**
|
|
72
|
+
* True if every tag the entry declares falls inside the corresponding
|
|
73
|
+
* axis-acceptance set in the region. Unset axes (on either side) are skipped.
|
|
74
|
+
*
|
|
75
|
+
* Example: an entry with `{ tone: 'bold', era: 'retro' }` is compatible with
|
|
76
|
+
* a region of `{ tone: ['bold'], energy: ['vibrant'] }` because the entry
|
|
77
|
+
* doesn't declare `energy`, and `tone: 'bold'` is in the region's set.
|
|
78
|
+
*/
|
|
79
|
+
export declare function isCompatible(tags: StyleTags, region: AcceptanceRegion): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Filter a library of tagged entries to those compatible with the region,
|
|
82
|
+
* preserving original order. Pure.
|
|
83
|
+
*/
|
|
84
|
+
export declare function compatibleEntries<T extends {
|
|
85
|
+
readonly tags: StyleTags;
|
|
86
|
+
}>(entries: readonly T[], region: AcceptanceRegion): readonly T[];
|
|
87
|
+
/**
|
|
88
|
+
* Deterministic auto-pick for the "user switched site style; their current
|
|
89
|
+
* personality/palette may be incompatible" flow.
|
|
90
|
+
*
|
|
91
|
+
* Algorithm:
|
|
92
|
+
* 1. Requested is null → fallback. No rejection.
|
|
93
|
+
* 2. Requested is compatible → keep. No rejection.
|
|
94
|
+
* 3. Requested is incompatible → fallback (which is the site style's default
|
|
95
|
+
* and is required to be compatible). Record rejection.
|
|
96
|
+
* 4. Requested ID not found in library → fallback. Record rejection.
|
|
97
|
+
*
|
|
98
|
+
* The site-style invariant "every site style has at least one compatible
|
|
99
|
+
* entry per library" is what makes the fallback always valid. Enforced by a
|
|
100
|
+
* lint-style test, not at runtime.
|
|
101
|
+
*/
|
|
102
|
+
export type ResolveCompatibleResult<TId extends string> = Readonly<{
|
|
103
|
+
resolved: TId;
|
|
104
|
+
rejected: TId | null;
|
|
105
|
+
}>;
|
|
106
|
+
export declare function resolveCompatible<TId extends string, T extends {
|
|
107
|
+
readonly id: TId;
|
|
108
|
+
readonly tags: StyleTags;
|
|
109
|
+
}>(requested: TId | null, region: AcceptanceRegion, library: readonly T[], fallback: TId): ResolveCompatibleResult<TId>;
|