@riverbankcms/sdk 0.60.3 → 0.60.6

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.
Files changed (60) hide show
  1. package/dist/_dts/api/src/bookingVerticals.d.ts +1 -0
  2. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +3 -39
  3. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +2 -0
  4. package/dist/_dts/blocks/src/system/node/fragments/ctaButton.d.ts +2 -0
  5. package/dist/_dts/blocks/src/system/runtime/shared/themedButtonClass.d.ts +11 -0
  6. package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +10 -2
  7. package/dist/_dts/core/src/participants.d.ts +32 -1
  8. package/dist/_dts/core/src/rectification.d.ts +79 -0
  9. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +6 -6
  10. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +17 -15
  11. package/dist/_dts/sdk/src/client/types.d.ts +1 -0
  12. package/dist/_dts/sdk/src/version.d.ts +1 -1
  13. package/dist/_dts/theme-core/src/buttons/personalities/brushed-wash.d.ts +7 -2
  14. package/dist/_dts/theme-core/src/buttons/personalities/confident-chip.d.ts +7 -2
  15. package/dist/_dts/theme-core/src/buttons/personalities/editorial-link.d.ts +7 -2
  16. package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +86 -5
  17. package/dist/_dts/theme-core/src/buttons/personalities/ink-stamp.d.ts +7 -2
  18. package/dist/_dts/theme-core/src/buttons/personalities/pebble.d.ts +7 -2
  19. package/dist/_dts/theme-core/src/buttons/personalities/soft-pill.d.ts +7 -2
  20. package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +10 -10
  21. package/dist/_dts/theme-core/src/palette/variants/brand-led.d.ts +33 -9
  22. package/dist/_dts/theme-core/src/palette/variants/high-contrast.d.ts +33 -9
  23. package/dist/_dts/theme-core/src/palette/variants/index.d.ts +200 -4
  24. package/dist/_dts/theme-core/src/palette/variants/soft-natural.d.ts +33 -9
  25. package/dist/_dts/theme-core/src/palette/variants/types.d.ts +10 -10
  26. package/dist/_dts/theme-core/src/palette/variants/warm-neutral.d.ts +33 -9
  27. package/dist/_dts/theme-core/src/site-styles/curatedChoices.d.ts +27 -0
  28. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +48 -194
  29. package/dist/_dts/theme-core/src/site-styles/index.d.ts +2 -1
  30. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +12 -14
  31. package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +46 -0
  32. package/dist/_dts/ui/src/palette/ColorChooserDialog.d.ts +47 -0
  33. package/dist/_dts/ui/src/palette/ColorSlotButton.d.ts +15 -0
  34. package/dist/_dts/ui/src/palette/ColorSwatchButton.d.ts +15 -0
  35. package/dist/_dts/ui/src/palette/PaletteTokenEditor.d.ts +50 -0
  36. package/dist/_dts/ui/src/palette/hex.d.ts +23 -0
  37. package/dist/_dts/ui/src/palette/index.d.ts +14 -0
  38. package/dist/cli/index.mjs +1023 -923
  39. package/dist/client/client.mjs +3410 -3221
  40. package/dist/client/hooks.mjs +1625 -1564
  41. package/dist/client/rendering/client.mjs +132 -37
  42. package/dist/client/rendering/islands.mjs +91 -30
  43. package/dist/client/rendering.mjs +1237 -1049
  44. package/dist/preview-next/client/runtime.mjs +3095 -2736
  45. package/dist/server/components.mjs +2381 -2255
  46. package/dist/server/config-validation.mjs +1625 -1564
  47. package/dist/server/config.mjs +1625 -1564
  48. package/dist/server/data.mjs +1625 -1564
  49. package/dist/server/index.mjs +4 -3
  50. package/dist/server/next.mjs +3233 -3106
  51. package/dist/server/page-converter.mjs +1625 -1564
  52. package/dist/server/prebuild.mjs +1 -1
  53. package/dist/server/rendering/server.mjs +2381 -2255
  54. package/dist/server/rendering.mjs +2381 -2255
  55. package/dist/server/routing.mjs +2340 -2271
  56. package/dist/server/server.mjs +1629 -1567
  57. package/dist/server/theme-bridge.mjs +130 -126
  58. package/dist/server/theme.mjs +131 -129
  59. package/package.json +1 -1
  60. package/dist/_dts/theme-core/src/site-styles/compatibility.d.ts +0 -109
@@ -1,9 +1,11 @@
1
- import type { ButtonPersonalityId } from '../buttons/personalities';
2
- import type { PaletteVariantId } from '../palette/variants';
3
- import type { AcceptanceRegion } from './compatibility';
4
- import { type DesignSystemTemplate, type SiteStyleId } from './types';
1
+ import { type ButtonPersonalityId, type KnownButtonPersonalityId } from '../buttons/personalities';
2
+ import { type KnownPaletteVariantId, type PaletteVariantId } from '../palette/variants';
3
+ import { type CuratedChoice } from './curatedChoices';
4
+ import { type DesignSystemTemplate, type NonEmptyReadonlyArray, type SiteStyleId } from './types';
5
5
  export declare const curatedSiteStyleIdValues: readonly ["site-style:calm-studio", "site-style:clear-professional", "site-style:warm-editorial", "site-style:bright-community", "site-style:quiet-luxury", "site-style:practical-services", "site-style:modern-wellness", "site-style:bold-launch"];
6
6
  export type CuratedSiteStyleIdValue = typeof curatedSiteStyleIdValues[number];
7
+ export type ButtonPersonalityChoice = CuratedChoice<KnownButtonPersonalityId>;
8
+ export type PaletteVariantChoice = CuratedChoice<KnownPaletteVariantId>;
7
9
  export type CuratedSiteStyle = Readonly<{
8
10
  id: SiteStyleId;
9
11
  name: string;
@@ -11,26 +13,13 @@ export type CuratedSiteStyle = Readonly<{
11
13
  generationBrief: string;
12
14
  selectionKeywords: readonly string[];
13
15
  template: DesignSystemTemplate;
14
- /**
15
- * Default button personality applied when the site is generated and no
16
- * explicit user selection exists. Must be compatible with `acceptedButtons`.
17
- */
18
- defaultButtonPersonalityId: ButtonPersonalityId;
19
- /**
20
- * Acceptance region for button personalities. The Style configurator UI
21
- * filters the personality picker against this region; if a persisted
22
- * personality stops being compatible (e.g. after a site-style switch) the
23
- * compiler auto-picks `defaultButtonPersonalityId` and emits a warning.
24
- */
25
- acceptedButtons: AcceptanceRegion;
26
- /**
27
- * Default palette variant when generated with no explicit user selection.
28
- * Must be compatible with `acceptedPalettes`.
29
- */
30
- defaultPaletteVariantId: PaletteVariantId;
31
- /** Acceptance region for palette variants — mirrors `acceptedButtons`. */
32
- acceptedPalettes: AcceptanceRegion;
16
+ /** Authored picker choices. First item is the default/fallback. */
17
+ buttonPersonalityChoices: NonEmptyReadonlyArray<ButtonPersonalityChoice>;
18
+ /** Authored picker choices. First item is the default/fallback. */
19
+ paletteVariantChoices: NonEmptyReadonlyArray<PaletteVariantChoice>;
33
20
  }>;
21
+ export declare function defaultButtonPersonalityForSiteStyle(siteStyle: CuratedSiteStyle): ButtonPersonalityId;
22
+ export declare function defaultPaletteVariantForSiteStyle(siteStyle: CuratedSiteStyle): PaletteVariantId;
34
23
  /**
35
24
  * V1 generated site styles are curated product presets, not AI-authored design
36
25
  * systems. Generators choose one of these bounded entries, then downstream
@@ -43,25 +32,10 @@ export declare const curatedSiteStyles: readonly [Readonly<{
43
32
  generationBrief: string;
44
33
  selectionKeywords: readonly string[];
45
34
  template: DesignSystemTemplate;
46
- /**
47
- * Default button personality applied when the site is generated and no
48
- * explicit user selection exists. Must be compatible with `acceptedButtons`.
49
- */
50
- defaultButtonPersonalityId: ButtonPersonalityId;
51
- /**
52
- * Acceptance region for button personalities. The Style configurator UI
53
- * filters the personality picker against this region; if a persisted
54
- * personality stops being compatible (e.g. after a site-style switch) the
55
- * compiler auto-picks `defaultButtonPersonalityId` and emits a warning.
56
- */
57
- acceptedButtons: AcceptanceRegion;
58
- /**
59
- * Default palette variant when generated with no explicit user selection.
60
- * Must be compatible with `acceptedPalettes`.
61
- */
62
- defaultPaletteVariantId: PaletteVariantId;
63
- /** Acceptance region for palette variants — mirrors `acceptedButtons`. */
64
- acceptedPalettes: AcceptanceRegion;
35
+ /** Authored picker choices. First item is the default/fallback. */
36
+ buttonPersonalityChoices: NonEmptyReadonlyArray<ButtonPersonalityChoice>;
37
+ /** Authored picker choices. First item is the default/fallback. */
38
+ paletteVariantChoices: NonEmptyReadonlyArray<PaletteVariantChoice>;
65
39
  }>, Readonly<{
66
40
  id: SiteStyleId;
67
41
  name: string;
@@ -69,25 +43,10 @@ export declare const curatedSiteStyles: readonly [Readonly<{
69
43
  generationBrief: string;
70
44
  selectionKeywords: readonly string[];
71
45
  template: DesignSystemTemplate;
72
- /**
73
- * Default button personality applied when the site is generated and no
74
- * explicit user selection exists. Must be compatible with `acceptedButtons`.
75
- */
76
- defaultButtonPersonalityId: ButtonPersonalityId;
77
- /**
78
- * Acceptance region for button personalities. The Style configurator UI
79
- * filters the personality picker against this region; if a persisted
80
- * personality stops being compatible (e.g. after a site-style switch) the
81
- * compiler auto-picks `defaultButtonPersonalityId` and emits a warning.
82
- */
83
- acceptedButtons: AcceptanceRegion;
84
- /**
85
- * Default palette variant when generated with no explicit user selection.
86
- * Must be compatible with `acceptedPalettes`.
87
- */
88
- defaultPaletteVariantId: PaletteVariantId;
89
- /** Acceptance region for palette variants — mirrors `acceptedButtons`. */
90
- acceptedPalettes: AcceptanceRegion;
46
+ /** Authored picker choices. First item is the default/fallback. */
47
+ buttonPersonalityChoices: NonEmptyReadonlyArray<ButtonPersonalityChoice>;
48
+ /** Authored picker choices. First item is the default/fallback. */
49
+ paletteVariantChoices: NonEmptyReadonlyArray<PaletteVariantChoice>;
91
50
  }>, Readonly<{
92
51
  id: SiteStyleId;
93
52
  name: string;
@@ -95,25 +54,10 @@ export declare const curatedSiteStyles: readonly [Readonly<{
95
54
  generationBrief: string;
96
55
  selectionKeywords: readonly string[];
97
56
  template: DesignSystemTemplate;
98
- /**
99
- * Default button personality applied when the site is generated and no
100
- * explicit user selection exists. Must be compatible with `acceptedButtons`.
101
- */
102
- defaultButtonPersonalityId: ButtonPersonalityId;
103
- /**
104
- * Acceptance region for button personalities. The Style configurator UI
105
- * filters the personality picker against this region; if a persisted
106
- * personality stops being compatible (e.g. after a site-style switch) the
107
- * compiler auto-picks `defaultButtonPersonalityId` and emits a warning.
108
- */
109
- acceptedButtons: AcceptanceRegion;
110
- /**
111
- * Default palette variant when generated with no explicit user selection.
112
- * Must be compatible with `acceptedPalettes`.
113
- */
114
- defaultPaletteVariantId: PaletteVariantId;
115
- /** Acceptance region for palette variants — mirrors `acceptedButtons`. */
116
- acceptedPalettes: AcceptanceRegion;
57
+ /** Authored picker choices. First item is the default/fallback. */
58
+ buttonPersonalityChoices: NonEmptyReadonlyArray<ButtonPersonalityChoice>;
59
+ /** Authored picker choices. First item is the default/fallback. */
60
+ paletteVariantChoices: NonEmptyReadonlyArray<PaletteVariantChoice>;
117
61
  }>, Readonly<{
118
62
  id: SiteStyleId;
119
63
  name: string;
@@ -121,25 +65,10 @@ export declare const curatedSiteStyles: readonly [Readonly<{
121
65
  generationBrief: string;
122
66
  selectionKeywords: readonly string[];
123
67
  template: DesignSystemTemplate;
124
- /**
125
- * Default button personality applied when the site is generated and no
126
- * explicit user selection exists. Must be compatible with `acceptedButtons`.
127
- */
128
- defaultButtonPersonalityId: ButtonPersonalityId;
129
- /**
130
- * Acceptance region for button personalities. The Style configurator UI
131
- * filters the personality picker against this region; if a persisted
132
- * personality stops being compatible (e.g. after a site-style switch) the
133
- * compiler auto-picks `defaultButtonPersonalityId` and emits a warning.
134
- */
135
- acceptedButtons: AcceptanceRegion;
136
- /**
137
- * Default palette variant when generated with no explicit user selection.
138
- * Must be compatible with `acceptedPalettes`.
139
- */
140
- defaultPaletteVariantId: PaletteVariantId;
141
- /** Acceptance region for palette variants — mirrors `acceptedButtons`. */
142
- acceptedPalettes: AcceptanceRegion;
68
+ /** Authored picker choices. First item is the default/fallback. */
69
+ buttonPersonalityChoices: NonEmptyReadonlyArray<ButtonPersonalityChoice>;
70
+ /** Authored picker choices. First item is the default/fallback. */
71
+ paletteVariantChoices: NonEmptyReadonlyArray<PaletteVariantChoice>;
143
72
  }>, Readonly<{
144
73
  id: SiteStyleId;
145
74
  name: string;
@@ -147,25 +76,10 @@ export declare const curatedSiteStyles: readonly [Readonly<{
147
76
  generationBrief: string;
148
77
  selectionKeywords: readonly string[];
149
78
  template: DesignSystemTemplate;
150
- /**
151
- * Default button personality applied when the site is generated and no
152
- * explicit user selection exists. Must be compatible with `acceptedButtons`.
153
- */
154
- defaultButtonPersonalityId: ButtonPersonalityId;
155
- /**
156
- * Acceptance region for button personalities. The Style configurator UI
157
- * filters the personality picker against this region; if a persisted
158
- * personality stops being compatible (e.g. after a site-style switch) the
159
- * compiler auto-picks `defaultButtonPersonalityId` and emits a warning.
160
- */
161
- acceptedButtons: AcceptanceRegion;
162
- /**
163
- * Default palette variant when generated with no explicit user selection.
164
- * Must be compatible with `acceptedPalettes`.
165
- */
166
- defaultPaletteVariantId: PaletteVariantId;
167
- /** Acceptance region for palette variants — mirrors `acceptedButtons`. */
168
- acceptedPalettes: AcceptanceRegion;
79
+ /** Authored picker choices. First item is the default/fallback. */
80
+ buttonPersonalityChoices: NonEmptyReadonlyArray<ButtonPersonalityChoice>;
81
+ /** Authored picker choices. First item is the default/fallback. */
82
+ paletteVariantChoices: NonEmptyReadonlyArray<PaletteVariantChoice>;
169
83
  }>, Readonly<{
170
84
  id: SiteStyleId;
171
85
  name: string;
@@ -173,25 +87,10 @@ export declare const curatedSiteStyles: readonly [Readonly<{
173
87
  generationBrief: string;
174
88
  selectionKeywords: readonly string[];
175
89
  template: DesignSystemTemplate;
176
- /**
177
- * Default button personality applied when the site is generated and no
178
- * explicit user selection exists. Must be compatible with `acceptedButtons`.
179
- */
180
- defaultButtonPersonalityId: ButtonPersonalityId;
181
- /**
182
- * Acceptance region for button personalities. The Style configurator UI
183
- * filters the personality picker against this region; if a persisted
184
- * personality stops being compatible (e.g. after a site-style switch) the
185
- * compiler auto-picks `defaultButtonPersonalityId` and emits a warning.
186
- */
187
- acceptedButtons: AcceptanceRegion;
188
- /**
189
- * Default palette variant when generated with no explicit user selection.
190
- * Must be compatible with `acceptedPalettes`.
191
- */
192
- defaultPaletteVariantId: PaletteVariantId;
193
- /** Acceptance region for palette variants — mirrors `acceptedButtons`. */
194
- acceptedPalettes: AcceptanceRegion;
90
+ /** Authored picker choices. First item is the default/fallback. */
91
+ buttonPersonalityChoices: NonEmptyReadonlyArray<ButtonPersonalityChoice>;
92
+ /** Authored picker choices. First item is the default/fallback. */
93
+ paletteVariantChoices: NonEmptyReadonlyArray<PaletteVariantChoice>;
195
94
  }>, Readonly<{
196
95
  id: SiteStyleId;
197
96
  name: string;
@@ -199,25 +98,10 @@ export declare const curatedSiteStyles: readonly [Readonly<{
199
98
  generationBrief: string;
200
99
  selectionKeywords: readonly string[];
201
100
  template: DesignSystemTemplate;
202
- /**
203
- * Default button personality applied when the site is generated and no
204
- * explicit user selection exists. Must be compatible with `acceptedButtons`.
205
- */
206
- defaultButtonPersonalityId: ButtonPersonalityId;
207
- /**
208
- * Acceptance region for button personalities. The Style configurator UI
209
- * filters the personality picker against this region; if a persisted
210
- * personality stops being compatible (e.g. after a site-style switch) the
211
- * compiler auto-picks `defaultButtonPersonalityId` and emits a warning.
212
- */
213
- acceptedButtons: AcceptanceRegion;
214
- /**
215
- * Default palette variant when generated with no explicit user selection.
216
- * Must be compatible with `acceptedPalettes`.
217
- */
218
- defaultPaletteVariantId: PaletteVariantId;
219
- /** Acceptance region for palette variants — mirrors `acceptedButtons`. */
220
- acceptedPalettes: AcceptanceRegion;
101
+ /** Authored picker choices. First item is the default/fallback. */
102
+ buttonPersonalityChoices: NonEmptyReadonlyArray<ButtonPersonalityChoice>;
103
+ /** Authored picker choices. First item is the default/fallback. */
104
+ paletteVariantChoices: NonEmptyReadonlyArray<PaletteVariantChoice>;
221
105
  }>, Readonly<{
222
106
  id: SiteStyleId;
223
107
  name: string;
@@ -225,25 +109,10 @@ export declare const curatedSiteStyles: readonly [Readonly<{
225
109
  generationBrief: string;
226
110
  selectionKeywords: readonly string[];
227
111
  template: DesignSystemTemplate;
228
- /**
229
- * Default button personality applied when the site is generated and no
230
- * explicit user selection exists. Must be compatible with `acceptedButtons`.
231
- */
232
- defaultButtonPersonalityId: ButtonPersonalityId;
233
- /**
234
- * Acceptance region for button personalities. The Style configurator UI
235
- * filters the personality picker against this region; if a persisted
236
- * personality stops being compatible (e.g. after a site-style switch) the
237
- * compiler auto-picks `defaultButtonPersonalityId` and emits a warning.
238
- */
239
- acceptedButtons: AcceptanceRegion;
240
- /**
241
- * Default palette variant when generated with no explicit user selection.
242
- * Must be compatible with `acceptedPalettes`.
243
- */
244
- defaultPaletteVariantId: PaletteVariantId;
245
- /** Acceptance region for palette variants — mirrors `acceptedButtons`. */
246
- acceptedPalettes: AcceptanceRegion;
112
+ /** Authored picker choices. First item is the default/fallback. */
113
+ buttonPersonalityChoices: NonEmptyReadonlyArray<ButtonPersonalityChoice>;
114
+ /** Authored picker choices. First item is the default/fallback. */
115
+ paletteVariantChoices: NonEmptyReadonlyArray<PaletteVariantChoice>;
247
116
  }>];
248
117
  export declare const curatedSiteStylesById: Map<SiteStyleId, Readonly<{
249
118
  id: SiteStyleId;
@@ -252,24 +121,9 @@ export declare const curatedSiteStylesById: Map<SiteStyleId, Readonly<{
252
121
  generationBrief: string;
253
122
  selectionKeywords: readonly string[];
254
123
  template: DesignSystemTemplate;
255
- /**
256
- * Default button personality applied when the site is generated and no
257
- * explicit user selection exists. Must be compatible with `acceptedButtons`.
258
- */
259
- defaultButtonPersonalityId: ButtonPersonalityId;
260
- /**
261
- * Acceptance region for button personalities. The Style configurator UI
262
- * filters the personality picker against this region; if a persisted
263
- * personality stops being compatible (e.g. after a site-style switch) the
264
- * compiler auto-picks `defaultButtonPersonalityId` and emits a warning.
265
- */
266
- acceptedButtons: AcceptanceRegion;
267
- /**
268
- * Default palette variant when generated with no explicit user selection.
269
- * Must be compatible with `acceptedPalettes`.
270
- */
271
- defaultPaletteVariantId: PaletteVariantId;
272
- /** Acceptance region for palette variants — mirrors `acceptedButtons`. */
273
- acceptedPalettes: AcceptanceRegion;
124
+ /** Authored picker choices. First item is the default/fallback. */
125
+ buttonPersonalityChoices: NonEmptyReadonlyArray<ButtonPersonalityChoice>;
126
+ /** Authored picker choices. First item is the default/fallback. */
127
+ paletteVariantChoices: NonEmptyReadonlyArray<PaletteVariantChoice>;
274
128
  }>>;
275
129
  export declare function getCuratedSiteStyle(id: SiteStyleId): CuratedSiteStyle | null;
@@ -1,7 +1,7 @@
1
1
  export * from './appearancePresets';
2
2
  export * from './blockFlow';
3
- export * from './compatibility';
4
3
  export * from './compositionBudget';
4
+ export * from './curatedChoices';
5
5
  export * from './curatedSiteStyles';
6
6
  export * from './designState';
7
7
  export * from './generatedSchemas';
@@ -15,5 +15,6 @@ export * from './rawStyleFields';
15
15
  export * from './resolver';
16
16
  export * from './runtimeCompiler';
17
17
  export * from './sourceCatalogs';
18
+ export * from './styleTags';
18
19
  export * from './tokenRecipes';
19
20
  export * from './types';
@@ -19,7 +19,8 @@ export { autoDesignChoice, reducePageDesignIntentForUserAction, resolvePageDesig
19
19
  export { repairDesignIssue, resolveBlockDesignPlan, } from './resolver';
20
20
  export { cycleableOptionsFromResolved, deriveDesignCustomizationScope, recommendedDesignOption, type CycleableDesignOption, type CycleableOptions, type DesignCustomizationAuthority, type DesignCustomizationScope, type DesignCustomizationSurface, type DesignCustomizationUnsupportedReason, type DesignOptionIssue, type ResolvedDesignOption, } from './previewCustomization';
21
21
  export { compileBlockRuntimeFields, compilePageRuntimeFields, compileTokenRecipes, compiledRuntimeStyleFieldNames, defaultComponentRuntimeRules, defaultDesignRuntimeRules, stripCompiledRuntimeStyleFields, type CompiledBlockRuntime, type CompiledBlockRuntimeFields, type CompiledPageRuntime, type CompileBlockRuntimeInput, type ComponentRuntimeRules, type DesignRuntimeRules, type SemanticSpacing, } from './runtimeCompiler';
22
- export { curatedSiteStyles, getCuratedSiteStyle, type CuratedSiteStyle, } from './curatedSiteStyles';
22
+ export { defaultCuratedChoice, requireEntriesForCuratedChoices, resolveCuratedChoice, type CuratedChoice, type CuratedChoiceResolution, } from './curatedChoices';
23
+ export { curatedSiteStyles, defaultButtonPersonalityForSiteStyle, defaultPaletteVariantForSiteStyle, getCuratedSiteStyle, type CuratedSiteStyle, } from './curatedSiteStyles';
23
24
  export { asDesignBlockId, asSiteStyleId, makeBoundaryId, type AppearancePresetId, type BoundaryOptionId, type DesignBlockId, type DesignBoundaryId, type LayoutVariantKey, type NonEmptyReadonlyArray, type PageFlowPresetId, type ResolvedPageDesignPlan, type SiteStyleId, } from './types';
24
25
  export declare const previewCustomizePurpose: "preview-customize";
25
26
  /**
@@ -33,21 +34,17 @@ export type CuratedSiteStyleTheme = Theme & Readonly<{
33
34
  /**
34
35
  * Compiles a curated Site Style into a persisted Theme payload using the site
35
36
  * style's defaults for the Style configurator selections. Thin wrapper around
36
- * `compileSiteThemeFromSelections({…, null, null, null})` — kept for back-compat
37
- * with callers that don't yet plumb user selections through.
38
- *
39
- * @deprecated Prefer `compileSiteThemeFromSelections` directly so resolved
40
- * selection IDs and compatibility warnings are visible at the call site.
37
+ * `compileSiteThemeFromSelections({…, null, null, null})`.
41
38
  */
42
39
  export declare function compileCuratedSiteStyleTheme(siteStyle: CuratedSiteStyle): CuratedSiteStyleTheme;
43
40
  export declare function compileCuratedSiteStyleThemeById(siteStyleId: SiteStyleId): CuratedSiteStyleTheme | null;
44
- export type CompatibilityWarning = Readonly<{
41
+ export type SelectionFallbackWarning = Readonly<{
45
42
  kind: 'rejected-personality';
46
- requested: ButtonPersonalityId;
43
+ requested: string;
47
44
  fellBackTo: ButtonPersonalityId;
48
45
  }> | Readonly<{
49
46
  kind: 'rejected-palette';
50
- requested: PaletteVariantId;
47
+ requested: string;
51
48
  fellBackTo: PaletteVariantId;
52
49
  }>;
53
50
  export type SiteThemeSelectionsInput = Readonly<{
@@ -62,16 +59,17 @@ export type SiteThemeSelectionsResult = Readonly<{
62
59
  buttonPersonalityId: ButtonPersonalityId;
63
60
  paletteVariantId: PaletteVariantId;
64
61
  }>;
65
- warnings: ReadonlyArray<CompatibilityWarning>;
62
+ warnings: ReadonlyArray<SelectionFallbackWarning>;
66
63
  }>;
67
64
  /**
68
65
  * High-level, site-style-aware compiler. Resolves the user's personality and
69
- * palette selections against the site style's acceptance regions (auto-picking
70
- * the site style's defaults when the request is incompatible or unknown),
71
- * then delegates to `compileTokenRecipes` with the resolved IDs.
66
+ * palette selections against the site style's authored choice lists
67
+ * (auto-picking the first/default choice when the request is absent, unknown,
68
+ * or not curated for this style), then delegates to `compileTokenRecipes` with
69
+ * the resolved IDs.
72
70
  *
73
71
  * Returns the resolved IDs so the caller can persist auto-pick decisions, plus
74
- * any compatibility warnings the UI can surface as "we changed your selection"
72
+ * any fallback warnings the UI can surface as "we changed your selection"
75
73
  * notices.
76
74
  */
77
75
  export declare function compileSiteThemeFromSelections(input: SiteThemeSelectionsInput): SiteThemeSelectionsResult;
@@ -0,0 +1,46 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Descriptive style-axis metadata for button personalities and palette
4
+ * variants. Site Style picker shape is curated explicitly; these tags remain
5
+ * for catalog audit, docs, and future discovery tooling.
6
+ */
7
+ export declare const STYLE_AXIS_VALUES: {
8
+ readonly tone: readonly ["minimal", "classic", "bold"];
9
+ readonly energy: readonly ["calm", "vibrant"];
10
+ readonly motion: readonly ["subtle", "standard", "expressive"];
11
+ readonly era: readonly ["editorial", "modern", "organic", "technical", "retro"];
12
+ };
13
+ export declare const styleTagsSchema: z.ZodObject<{
14
+ tone: z.ZodOptional<z.ZodEnum<{
15
+ classic: "classic";
16
+ bold: "bold";
17
+ minimal: "minimal";
18
+ }>>;
19
+ energy: z.ZodOptional<z.ZodEnum<{
20
+ calm: "calm";
21
+ vibrant: "vibrant";
22
+ }>>;
23
+ motion: z.ZodOptional<z.ZodEnum<{
24
+ standard: "standard";
25
+ subtle: "subtle";
26
+ expressive: "expressive";
27
+ }>>;
28
+ era: z.ZodOptional<z.ZodEnum<{
29
+ editorial: "editorial";
30
+ modern: "modern";
31
+ retro: "retro";
32
+ technical: "technical";
33
+ organic: "organic";
34
+ }>>;
35
+ }, z.core.$strip>;
36
+ export type StyleTone = (typeof STYLE_AXIS_VALUES.tone)[number];
37
+ export type StyleEnergy = (typeof STYLE_AXIS_VALUES.energy)[number];
38
+ export type StyleMotion = (typeof STYLE_AXIS_VALUES.motion)[number];
39
+ export type StyleEra = (typeof STYLE_AXIS_VALUES.era)[number];
40
+ export type StyleAxis = Readonly<{
41
+ tone: StyleTone;
42
+ energy: StyleEnergy;
43
+ motion: StyleMotion;
44
+ era: StyleEra;
45
+ }>;
46
+ export type StyleTags = Readonly<Partial<StyleAxis>>;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Optional pre-set swatch passed to the chooser. Macadamia onboarding feeds
3
+ * logo-extracted colours here; the LiveThemeEditor and Style configurator
4
+ * pass an empty array (or omit the prop) so the dialog just exposes the
5
+ * freeform colour picker.
6
+ */
7
+ export type ColorChooserSwatch = Readonly<{
8
+ hex: string;
9
+ label: string;
10
+ }>;
11
+ export type ColorChooserDialogProps = Readonly<{
12
+ open: boolean;
13
+ onOpenChange: (open: boolean) => void;
14
+ /** Current persisted value for the slot being edited. */
15
+ currentValue: string | null;
16
+ /** Suggested-swatch grid. Empty/omitted => freeform picker only. */
17
+ swatches?: ReadonlyArray<ColorChooserSwatch>;
18
+ /**
19
+ * Swatches in `swatches` that should render as visibly disabled
20
+ * (typically: already used elsewhere in the palette). Selecting one of
21
+ * these is still possible if it matches `currentValue`.
22
+ */
23
+ disabledHexes?: ReadonlyArray<string>;
24
+ /**
25
+ * Fallback hex used when neither `currentValue` nor `swatches[0]` resolve
26
+ * to a usable colour. Defaults to `#000000`; pass the brand colour if you
27
+ * want the dialog to open on it.
28
+ */
29
+ defaultValue?: string;
30
+ /** Localised dialog title. */
31
+ title?: string;
32
+ /** Localised body description. Falls back to a swatches-aware default. */
33
+ description?: string;
34
+ /** Confirm button label. Defaults to "Use this colour". */
35
+ confirmLabel?: string;
36
+ /** Optional remove handler. When provided, a "Remove colour" button appears. */
37
+ onRemove?: () => void;
38
+ /** Remove button label. Defaults to "Remove colour". */
39
+ removeLabel?: string;
40
+ onChoose: (value: string) => void;
41
+ }>;
42
+ /**
43
+ * Shared colour-chooser dialog. Combines an optional logo-derived swatch
44
+ * grid with a freeform `ColorPicker` + hex display. Consolidates the
45
+ * implementations that previously lived inline in Macadamia onboarding.
46
+ */
47
+ export declare function ColorChooserDialog({ open, onOpenChange, currentValue, swatches, disabledHexes, defaultValue, title, description, confirmLabel, onRemove, removeLabel, onChoose, }: ColorChooserDialogProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Slot affordance for "this row holds a colour, click to choose". Renders as
3
+ * an empty dashed-border tile when `value` is null, or as a filled swatch
4
+ * with the hex displayed when a value is set. Used in the Macadamia
5
+ * onboarding's primary/secondary colour rows and the Style configurator's
6
+ * advanced palette panel.
7
+ */
8
+ export type ColorSlotButtonProps = Readonly<{
9
+ value: string | null;
10
+ emptyLabel: string;
11
+ ariaLabel: string;
12
+ onClick: () => void;
13
+ className?: string;
14
+ }>;
15
+ export declare function ColorSlotButton({ value, emptyLabel, ariaLabel, onClick, className }: ColorSlotButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Compact swatch + label tile. Used in the colour-chooser dialog's
3
+ * "from your logo" grid and anywhere a palette-aware single-colour row is
4
+ * needed (Macadamia onboarding's brand colour rows, the Style configurator
5
+ * advanced palette panel).
6
+ */
7
+ export type ColorSwatchButtonProps = Readonly<{
8
+ hex: string;
9
+ label: string;
10
+ selected: boolean;
11
+ onClick: () => void;
12
+ disabled?: boolean;
13
+ className?: string;
14
+ }>;
15
+ export declare function ColorSwatchButton({ hex, label, selected, onClick, disabled, className }: ColorSwatchButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,50 @@
1
+ /**
2
+ * One palette role slot. `name` is intentionally a free string here so the
3
+ * component can be reused for theme palettes that predate the closed
4
+ * `PaletteTokenName` union; callers pass the role-label mapping via `roles`.
5
+ */
6
+ export type PaletteToken = Readonly<{
7
+ name: string;
8
+ hex: string;
9
+ }>;
10
+ export type PaletteRole = Readonly<{
11
+ key: string;
12
+ label: string;
13
+ }>;
14
+ export declare const DEFAULT_BRAND_ROLES: ReadonlyArray<PaletteRole>;
15
+ export declare const DEFAULT_FEEDBACK_ROLES: ReadonlyArray<PaletteRole>;
16
+ export declare const DEFAULT_SURFACE_ROLES: ReadonlyArray<PaletteRole>;
17
+ export type PaletteTokenEditorProps = Readonly<{
18
+ /**
19
+ * Current palette colours. Only entries whose `name` matches one of the
20
+ * configured role keys are surfaced; extra entries pass through untouched.
21
+ */
22
+ palette: ReadonlyArray<PaletteToken>;
23
+ /**
24
+ * Called when the user edits a role's hex via the picker or the input
25
+ * field. The editor filters implausible strings and forwards a canonical
26
+ * lowercase `#RRGGBB` value via `normalizeHex`; the handler can merge
27
+ * the value into its store without further normalisation.
28
+ */
29
+ onChange: (role: string, hex: string) => void;
30
+ /**
31
+ * Optional invalid-palette banner — shown when the consumer wants to
32
+ * surface schema errors (e.g. from a Zod parse failure) without coupling
33
+ * the editor to a validation context.
34
+ */
35
+ hasInvalidValues?: boolean;
36
+ /** Override the default role groupings (e.g. to add `primaryForeground`). */
37
+ brandRoles?: ReadonlyArray<PaletteRole>;
38
+ feedbackRoles?: ReadonlyArray<PaletteRole>;
39
+ surfaceRoles?: ReadonlyArray<PaletteRole>;
40
+ showContrastChecks?: boolean;
41
+ className?: string;
42
+ }>;
43
+ /**
44
+ * Shared palette role grid + contrast checker. Self-contained: no theme-
45
+ * editor / validation context dependencies. Used by:
46
+ * - Macadamia onboarding (advanced colour panel, planned)
47
+ * - LiveThemeEditor's palette tab (via a thin context wrapper)
48
+ * - Style configurator's brand-colours row
49
+ */
50
+ export declare function PaletteTokenEditor({ palette, onChange, hasInvalidValues, brandRoles, feedbackRoles, surfaceRoles, showContrastChecks, className, }: PaletteTokenEditorProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Hex colour helpers shared by every palette-editing surface (Macadamia
3
+ * onboarding swatches, the LiveThemeEditor, the Style configurator advanced
4
+ * row). Consolidates three prior duplicates: `normalizeColorPickerValue` in
5
+ * Macadamia, `normalizeHex` + `contrastRatio` in `theme-editor/utils.ts`, and
6
+ * the inline regex in `updateColorRole`.
7
+ *
8
+ * Pure functions; no DOM, no React.
9
+ */
10
+ /**
11
+ * Coerces user input into a canonical lowercase `#RRGGBB` form. Accepts
12
+ * 3-digit shorthand, case-insensitive 6-digit hex, and the same forms with or
13
+ * without a leading `#`; returns `fallback` for any other shape (empty
14
+ * string, garbage, characters outside `[0-9a-f]`, wrong length, etc.). Pass
15
+ * a `fallback` to make the fallback explicit at the call site — defaulting
16
+ * to `'#000000'` keeps the legacy `theme-editor/utils.ts` semantics.
17
+ */
18
+ export declare function normalizeHex(input: string | null | undefined, fallback?: string): string;
19
+ /**
20
+ * WCAG relative luminance + contrast ratio. Rounded to 2 decimal places so
21
+ * the result is stable for UI display.
22
+ */
23
+ export declare function contrastRatio(hexA: string, hexB: string): number;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @riverbankcms/ui/palette — shared palette-editing primitives.
3
+ *
4
+ * Consolidates three palette-editing surfaces that had drifted in the
5
+ * dashboard: Macadamia onboarding's colour chooser, the LiveThemeEditor's
6
+ * palette tab, and the Style configurator's brand-colours panel. Each
7
+ * component is self-contained (no context coupling) and built on
8
+ * Riverbank UI primitives so it works in any client tree.
9
+ */
10
+ export { ColorSwatchButton, type ColorSwatchButtonProps } from './ColorSwatchButton';
11
+ export { ColorSlotButton, type ColorSlotButtonProps } from './ColorSlotButton';
12
+ export { ColorChooserDialog, type ColorChooserDialogProps, type ColorChooserSwatch, } from './ColorChooserDialog';
13
+ export { PaletteTokenEditor, type PaletteTokenEditorProps, type PaletteToken, type PaletteRole, DEFAULT_BRAND_ROLES, DEFAULT_FEEDBACK_ROLES, DEFAULT_SURFACE_ROLES, } from './PaletteTokenEditor';
14
+ export { contrastRatio, normalizeHex } from './hex';