@riverbankcms/sdk 0.60.1 → 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.
- package/dist/_dts/api/src/bookingRecords.d.ts +7 -0
- package/dist/_dts/api/src/bookingVerticals.d.ts +1 -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 +10 -2
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +26 -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/node/fragments/ctaButton.d.ts +2 -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/blocks/src/system/runtime/shared/themedButtonClass.d.ts +11 -0
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +10 -2
- package/dist/_dts/core/src/business-address.d.ts +38 -0
- package/dist/_dts/core/src/index.d.ts +1 -0
- package/dist/_dts/core/src/participants.d.ts +32 -1
- package/dist/_dts/core/src/rectification.d.ts +79 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +28 -6
- 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 +101 -0
- package/dist/_dts/sdk/src/client/types.d.ts +1 -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 +16 -0
- package/dist/_dts/theme-core/src/buttons/personalities/confident-chip.d.ts +16 -0
- package/dist/_dts/theme-core/src/buttons/personalities/editorial-link.d.ts +16 -0
- package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +95 -0
- package/dist/_dts/theme-core/src/buttons/personalities/ink-stamp.d.ts +16 -0
- package/dist/_dts/theme-core/src/buttons/personalities/pebble.d.ts +16 -0
- package/dist/_dts/theme-core/src/buttons/personalities/soft-pill.d.ts +16 -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 +52 -0
- package/dist/_dts/theme-core/src/palette/variants/high-contrast.d.ts +52 -0
- package/dist/_dts/theme-core/src/palette/variants/index.d.ts +213 -0
- package/dist/_dts/theme-core/src/palette/variants/soft-natural.d.ts +52 -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 +52 -0
- package/dist/_dts/theme-core/src/schema.d.ts +122 -10
- package/dist/_dts/theme-core/src/site-styles/curatedChoices.d.ts +27 -0
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +48 -1
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +2 -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 +42 -3
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +23 -1
- package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +46 -0
- package/dist/_dts/ui/src/badge.d.ts +1 -1
- package/dist/_dts/ui/src/callout.d.ts +1 -1
- package/dist/_dts/ui/src/palette/ColorChooserDialog.d.ts +47 -0
- package/dist/_dts/ui/src/palette/ColorSlotButton.d.ts +15 -0
- package/dist/_dts/ui/src/palette/ColorSwatchButton.d.ts +15 -0
- package/dist/_dts/ui/src/palette/PaletteTokenEditor.d.ts +50 -0
- package/dist/_dts/ui/src/palette/hex.d.ts +23 -0
- package/dist/_dts/ui/src/palette/index.d.ts +14 -0
- package/dist/cli/index.mjs +2255 -947
- package/dist/client/bookings.mjs +294 -144
- package/dist/client/client.mjs +4053 -2600
- package/dist/client/hooks.mjs +3248 -2076
- package/dist/client/rendering/client.mjs +3377 -2165
- package/dist/client/rendering/islands.mjs +1911 -736
- package/dist/client/rendering.mjs +41897 -40445
- package/dist/preview-next/before-render.mjs +17 -0
- package/dist/preview-next/client/runtime.mjs +13511 -11313
- package/dist/preview-next/middleware.mjs +17 -0
- package/dist/server/components.mjs +4434 -3172
- package/dist/server/config-validation.mjs +3479 -2307
- package/dist/server/config.mjs +3479 -2307
- package/dist/server/data.mjs +3248 -2076
- package/dist/server/index.mjs +21 -3
- package/dist/server/next.mjs +3989 -2726
- package/dist/server/page-converter.mjs +3393 -2238
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +4434 -3172
- package/dist/server/rendering.mjs +4434 -3172
- package/dist/server/routing.mjs +3582 -2274
- package/dist/server/server.mjs +3252 -2079
- package/dist/server/theme-bridge.mjs +1454 -496
- package/dist/server/theme.mjs +1102 -505
- 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
|
@@ -2,3 +2,82 @@ export declare const RECTIFICATION_SURFACES: readonly ["customer_profile", "book
|
|
|
2
2
|
export type RectificationSurface = (typeof RECTIFICATION_SURFACES)[number];
|
|
3
3
|
export declare const RECTIFICATION_ISSUE_URL_BASE: "https://github.com/wubss/builder/issues";
|
|
4
4
|
export type RectificationIssueUrl<TNumber extends number = number> = `${typeof RECTIFICATION_ISSUE_URL_BASE}/${TNumber}`;
|
|
5
|
+
/**
|
|
6
|
+
* Names which identity concept a rectification surface is allowed to mutate or
|
|
7
|
+
* explain, so customer, participant, snapshot, and ledger corrections cannot blur.
|
|
8
|
+
*/
|
|
9
|
+
export type RectificationIdentityBoundary = Readonly<{
|
|
10
|
+
kind: 'customer_commercial_current_identity';
|
|
11
|
+
}> | Readonly<{
|
|
12
|
+
kind: 'customer_backed_participant_current_identity';
|
|
13
|
+
}> | Readonly<{
|
|
14
|
+
kind: 'person_record_current_note';
|
|
15
|
+
}> | Readonly<{
|
|
16
|
+
kind: 'immutable_subject_snapshot';
|
|
17
|
+
}> | Readonly<{
|
|
18
|
+
kind: 'newsletter_current_subscription_identity';
|
|
19
|
+
}> | Readonly<{
|
|
20
|
+
kind: 'finance_integrity_record';
|
|
21
|
+
}> | Readonly<{
|
|
22
|
+
kind: 'immutable_audit_history';
|
|
23
|
+
}> | Readonly<{
|
|
24
|
+
kind: 'derived_history_projection_or_ledger';
|
|
25
|
+
}>;
|
|
26
|
+
export declare const RECTIFICATION_IDENTITY_BOUNDARIES: {
|
|
27
|
+
readonly customer_commercial_current_identity: {
|
|
28
|
+
readonly kind: "customer_commercial_current_identity";
|
|
29
|
+
};
|
|
30
|
+
readonly customer_backed_participant_current_identity: {
|
|
31
|
+
readonly kind: "customer_backed_participant_current_identity";
|
|
32
|
+
};
|
|
33
|
+
readonly person_record_current_note: {
|
|
34
|
+
readonly kind: "person_record_current_note";
|
|
35
|
+
};
|
|
36
|
+
readonly immutable_subject_snapshot: {
|
|
37
|
+
readonly kind: "immutable_subject_snapshot";
|
|
38
|
+
};
|
|
39
|
+
readonly newsletter_current_subscription_identity: {
|
|
40
|
+
readonly kind: "newsletter_current_subscription_identity";
|
|
41
|
+
};
|
|
42
|
+
readonly finance_integrity_record: {
|
|
43
|
+
readonly kind: "finance_integrity_record";
|
|
44
|
+
};
|
|
45
|
+
readonly immutable_audit_history: {
|
|
46
|
+
readonly kind: "immutable_audit_history";
|
|
47
|
+
};
|
|
48
|
+
readonly derived_history_projection_or_ledger: {
|
|
49
|
+
readonly kind: "derived_history_projection_or_ledger";
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Describes what happens to historical copies when the current identity source
|
|
54
|
+
* is corrected; immutable evidence is retained unless a plan says otherwise.
|
|
55
|
+
*/
|
|
56
|
+
export type RectificationHistoryPropagationPlan = Readonly<{
|
|
57
|
+
kind: 'update_current_identity_only';
|
|
58
|
+
}> | Readonly<{
|
|
59
|
+
kind: 'append_correction_note';
|
|
60
|
+
}> | Readonly<{
|
|
61
|
+
kind: 'annotate_immutable_snapshot';
|
|
62
|
+
}> | Readonly<{
|
|
63
|
+
kind: 'manual_review_required';
|
|
64
|
+
}> | Readonly<{
|
|
65
|
+
kind: 'blocked_immutable_history';
|
|
66
|
+
}>;
|
|
67
|
+
export declare const RECTIFICATION_HISTORY_PROPAGATION_PLANS: {
|
|
68
|
+
readonly update_current_identity_only: {
|
|
69
|
+
readonly kind: "update_current_identity_only";
|
|
70
|
+
};
|
|
71
|
+
readonly append_correction_note: {
|
|
72
|
+
readonly kind: "append_correction_note";
|
|
73
|
+
};
|
|
74
|
+
readonly annotate_immutable_snapshot: {
|
|
75
|
+
readonly kind: "annotate_immutable_snapshot";
|
|
76
|
+
};
|
|
77
|
+
readonly manual_review_required: {
|
|
78
|
+
readonly kind: "manual_review_required";
|
|
79
|
+
};
|
|
80
|
+
readonly blocked_immutable_history: {
|
|
81
|
+
readonly kind: "blocked_immutable_history";
|
|
82
|
+
};
|
|
83
|
+
};
|
|
@@ -2254,8 +2254,8 @@ export type Database = {
|
|
|
2254
2254
|
created_at: string;
|
|
2255
2255
|
customer_id: string | null;
|
|
2256
2256
|
display_name: string | null;
|
|
2257
|
-
email: string;
|
|
2258
|
-
email_normalized: string;
|
|
2257
|
+
email: string | null;
|
|
2258
|
+
email_normalized: string | null;
|
|
2259
2259
|
id: string;
|
|
2260
2260
|
identity_state: string;
|
|
2261
2261
|
metadata: Json;
|
|
@@ -2267,8 +2267,8 @@ export type Database = {
|
|
|
2267
2267
|
created_at?: string;
|
|
2268
2268
|
customer_id?: string | null;
|
|
2269
2269
|
display_name?: string | null;
|
|
2270
|
-
email
|
|
2271
|
-
email_normalized
|
|
2270
|
+
email?: string | null;
|
|
2271
|
+
email_normalized?: string | null;
|
|
2272
2272
|
id?: string;
|
|
2273
2273
|
identity_state?: string;
|
|
2274
2274
|
metadata?: Json;
|
|
@@ -2280,8 +2280,8 @@ export type Database = {
|
|
|
2280
2280
|
created_at?: string;
|
|
2281
2281
|
customer_id?: string | null;
|
|
2282
2282
|
display_name?: string | null;
|
|
2283
|
-
email?: string;
|
|
2284
|
-
email_normalized?: string;
|
|
2283
|
+
email?: string | null;
|
|
2284
|
+
email_normalized?: string | null;
|
|
2285
2285
|
id?: string;
|
|
2286
2286
|
identity_state?: string;
|
|
2287
2287
|
metadata?: Json;
|
|
@@ -8311,6 +8311,7 @@ export type Database = {
|
|
|
8311
8311
|
reply_to_email: string | null;
|
|
8312
8312
|
sender_address_line_1: string | null;
|
|
8313
8313
|
sender_address_line_2: string | null;
|
|
8314
|
+
sender_address_source: string;
|
|
8314
8315
|
sender_city: string | null;
|
|
8315
8316
|
sender_country: string | null;
|
|
8316
8317
|
sender_display_name: string | null;
|
|
@@ -8332,6 +8333,7 @@ export type Database = {
|
|
|
8332
8333
|
reply_to_email?: string | null;
|
|
8333
8334
|
sender_address_line_1?: string | null;
|
|
8334
8335
|
sender_address_line_2?: string | null;
|
|
8336
|
+
sender_address_source?: string;
|
|
8335
8337
|
sender_city?: string | null;
|
|
8336
8338
|
sender_country?: string | null;
|
|
8337
8339
|
sender_display_name?: string | null;
|
|
@@ -8353,6 +8355,7 @@ export type Database = {
|
|
|
8353
8355
|
reply_to_email?: string | null;
|
|
8354
8356
|
sender_address_line_1?: string | null;
|
|
8355
8357
|
sender_address_line_2?: string | null;
|
|
8358
|
+
sender_address_source?: string;
|
|
8356
8359
|
sender_city?: string | null;
|
|
8357
8360
|
sender_country?: string | null;
|
|
8358
8361
|
sender_display_name?: string | null;
|
|
@@ -11716,6 +11719,7 @@ export type Database = {
|
|
|
11716
11719
|
banner_settings: Json;
|
|
11717
11720
|
billing_settings: Json | null;
|
|
11718
11721
|
booking_settings: Json;
|
|
11722
|
+
business_address: Json | null;
|
|
11719
11723
|
created_at: string;
|
|
11720
11724
|
favicon_asset_id: string | null;
|
|
11721
11725
|
footer_content_json: Json;
|
|
@@ -11742,6 +11746,7 @@ export type Database = {
|
|
|
11742
11746
|
banner_settings?: Json;
|
|
11743
11747
|
billing_settings?: Json | null;
|
|
11744
11748
|
booking_settings?: Json;
|
|
11749
|
+
business_address?: Json | null;
|
|
11745
11750
|
created_at?: string;
|
|
11746
11751
|
favicon_asset_id?: string | null;
|
|
11747
11752
|
footer_content_json?: Json;
|
|
@@ -11768,6 +11773,7 @@ export type Database = {
|
|
|
11768
11773
|
banner_settings?: Json;
|
|
11769
11774
|
billing_settings?: Json | null;
|
|
11770
11775
|
booking_settings?: Json;
|
|
11776
|
+
business_address?: Json | null;
|
|
11771
11777
|
created_at?: string;
|
|
11772
11778
|
favicon_asset_id?: string | null;
|
|
11773
11779
|
footer_content_json?: Json;
|
|
@@ -12010,30 +12016,39 @@ export type Database = {
|
|
|
12010
12016
|
};
|
|
12011
12017
|
site_theme_selections: {
|
|
12012
12018
|
Row: {
|
|
12019
|
+
button_personality_id: string | null;
|
|
12013
12020
|
created_at: string;
|
|
12014
12021
|
id: string;
|
|
12015
12022
|
is_current: boolean;
|
|
12016
12023
|
overrides: Json;
|
|
12024
|
+
palette_overrides: Json | null;
|
|
12025
|
+
palette_variant_id: string | null;
|
|
12017
12026
|
site_id: string;
|
|
12018
12027
|
theme_id: string;
|
|
12019
12028
|
updated_at: string;
|
|
12020
12029
|
user_id: string;
|
|
12021
12030
|
};
|
|
12022
12031
|
Insert: {
|
|
12032
|
+
button_personality_id?: string | null;
|
|
12023
12033
|
created_at?: string;
|
|
12024
12034
|
id?: string;
|
|
12025
12035
|
is_current?: boolean;
|
|
12026
12036
|
overrides?: Json;
|
|
12037
|
+
palette_overrides?: Json | null;
|
|
12038
|
+
palette_variant_id?: string | null;
|
|
12027
12039
|
site_id: string;
|
|
12028
12040
|
theme_id: string;
|
|
12029
12041
|
updated_at?: string;
|
|
12030
12042
|
user_id: string;
|
|
12031
12043
|
};
|
|
12032
12044
|
Update: {
|
|
12045
|
+
button_personality_id?: string | null;
|
|
12033
12046
|
created_at?: string;
|
|
12034
12047
|
id?: string;
|
|
12035
12048
|
is_current?: boolean;
|
|
12036
12049
|
overrides?: Json;
|
|
12050
|
+
palette_overrides?: Json | null;
|
|
12051
|
+
palette_variant_id?: string | null;
|
|
12037
12052
|
site_id?: string;
|
|
12038
12053
|
theme_id?: string;
|
|
12039
12054
|
updated_at?: string;
|
|
@@ -13914,6 +13929,13 @@ export type Database = {
|
|
|
13914
13929
|
waitlist_position: number;
|
|
13915
13930
|
}[];
|
|
13916
13931
|
};
|
|
13932
|
+
create_media_asset_with_storage_quota: {
|
|
13933
|
+
Args: {
|
|
13934
|
+
p_asset: Json;
|
|
13935
|
+
p_max_bytes: number;
|
|
13936
|
+
};
|
|
13937
|
+
Returns: string;
|
|
13938
|
+
};
|
|
13917
13939
|
create_order_shipment_atomic: {
|
|
13918
13940
|
Args: {
|
|
13919
13941
|
p_carrier_name?: string;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sequence-numbered runner for optimistic save flows where the user can fire
|
|
3
|
+
* the next action before the previous save resolves. Each invocation gets a
|
|
4
|
+
* fresh sequence number from a shared `nextSequence` callback; the runner
|
|
5
|
+
* only commits success / failure when its sequence is still the latest.
|
|
6
|
+
*
|
|
7
|
+
* Used by the Style configurator: tapping personality A then quickly tapping
|
|
8
|
+
* personality B should land B's save even if A's network round-trip is
|
|
9
|
+
* slower, and A's late-arriving response must not clobber B's local state.
|
|
10
|
+
*/
|
|
11
|
+
export type OptimisticActionRun<TSuccess> = Readonly<{
|
|
12
|
+
/**
|
|
13
|
+
* Pure result computed locally before the network call fires (the
|
|
14
|
+
* optimistic "this is what the world will look like" snapshot). Skipped
|
|
15
|
+
* if the runner has already been superseded.
|
|
16
|
+
*/
|
|
17
|
+
optimistic?: () => void;
|
|
18
|
+
/** The network call. Resolves with the persisted payload. */
|
|
19
|
+
network: () => Promise<TSuccess>;
|
|
20
|
+
/**
|
|
21
|
+
* Invoked when `network` resolves AND this run is still the latest.
|
|
22
|
+
* Stale runs swallow the success silently — the next run will reconcile.
|
|
23
|
+
*/
|
|
24
|
+
onSuccess: (success: TSuccess) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Invoked when `network` rejects AND this run is still the latest. Stale
|
|
27
|
+
* failures are ignored on the same principle.
|
|
28
|
+
*/
|
|
29
|
+
onError: (error: unknown) => void;
|
|
30
|
+
}>;
|
|
31
|
+
export type OptimisticActionRunner = Readonly<{
|
|
32
|
+
/** Schedule a new run; returns its sequence number for debugging / tests. */
|
|
33
|
+
run: <TSuccess>(action: OptimisticActionRun<TSuccess>) => Promise<number>;
|
|
34
|
+
/** Force the runner into a known sequence — useful for unmount sentinels. */
|
|
35
|
+
invalidate: () => void;
|
|
36
|
+
/** Read the latest sequence. Test/debug only; UI should not branch on it. */
|
|
37
|
+
current: () => number;
|
|
38
|
+
}>;
|
|
39
|
+
/**
|
|
40
|
+
* Create a runner. The runner is stateful (holds the latest sequence)
|
|
41
|
+
* but the inputs to each `run` call are pure data — so individual actions
|
|
42
|
+
* remain easy to unit-test by stubbing `network`.
|
|
43
|
+
*/
|
|
44
|
+
export declare function createOptimisticActionRunner(): OptimisticActionRunner;
|
|
@@ -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,101 @@
|
|
|
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 { SelectionFallbackWarning, 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 selection fallback warnings.
|
|
29
|
+
* Kept separate from `SelectionFallbackWarning` (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: 'palette-overrides-hidden';
|
|
35
|
+
}> | Readonly<{
|
|
36
|
+
kind: 'palette-overrides-restored';
|
|
37
|
+
}>;
|
|
38
|
+
export type SelectionSnapshot = Readonly<{
|
|
39
|
+
siteStyleId: SiteStyleId;
|
|
40
|
+
buttonPersonalityId: ButtonPersonalityId;
|
|
41
|
+
paletteVariantId: PaletteVariantId;
|
|
42
|
+
paletteOverrides: PaletteOverrides | null;
|
|
43
|
+
}>;
|
|
44
|
+
type PaletteOverrideDrafts = Readonly<Partial<Record<PaletteVariantId, PaletteOverrides>>>;
|
|
45
|
+
export type StyleConfiguratorState = Readonly<{
|
|
46
|
+
/**
|
|
47
|
+
* Last persisted server snapshot. Updated on apply-success (and on
|
|
48
|
+
* external rebases via `syncStyleConfiguratorState`).
|
|
49
|
+
*/
|
|
50
|
+
base: SelectionSnapshot;
|
|
51
|
+
/**
|
|
52
|
+
* Currently rendered selection. Diverges from `base` while the user is
|
|
53
|
+
* previewing changes. Identical to `base` after apply-success.
|
|
54
|
+
*/
|
|
55
|
+
previewed: SelectionSnapshot;
|
|
56
|
+
saveStatus: StyleConfiguratorSaveStatus;
|
|
57
|
+
warnings: ReadonlyArray<SelectionFallbackWarning>;
|
|
58
|
+
notices: ReadonlyArray<StyleConfiguratorNotice>;
|
|
59
|
+
paletteOverrideDrafts: PaletteOverrideDrafts;
|
|
60
|
+
expandedRow: StyleConfiguratorExpandedRow;
|
|
61
|
+
}>;
|
|
62
|
+
export declare function createStyleConfiguratorState(base: SelectionSnapshot): StyleConfiguratorState;
|
|
63
|
+
/**
|
|
64
|
+
* True iff the user has previewed a change that hasn't been applied yet.
|
|
65
|
+
* Drives the "Apply" / "Cancel" footer visibility and the live-preview
|
|
66
|
+
* `setOverrideTheme` call.
|
|
67
|
+
*/
|
|
68
|
+
export declare function isPreviewingChange(state: StyleConfiguratorState): boolean;
|
|
69
|
+
export declare function previewSiteStyle(state: StyleConfiguratorState, siteStyleId: SiteStyleId): StyleConfiguratorState;
|
|
70
|
+
export declare function previewButtonPersonality(state: StyleConfiguratorState, buttonPersonalityId: ButtonPersonalityId): StyleConfiguratorState;
|
|
71
|
+
export declare function previewPaletteVariant(state: StyleConfiguratorState, paletteVariantId: PaletteVariantId): StyleConfiguratorState;
|
|
72
|
+
export declare function setPaletteOverrides(state: StyleConfiguratorState, paletteOverrides: PaletteOverrides | null): StyleConfiguratorState;
|
|
73
|
+
/**
|
|
74
|
+
* Records the post-compile resolved selection + any fallback warnings.
|
|
75
|
+
* Used after `compileSiteThemeFromSelections` runs against a new site style:
|
|
76
|
+
* the resolver may have auto-picked a different personality / palette if the
|
|
77
|
+
* user's previous selections are not offered for the new style.
|
|
78
|
+
*
|
|
79
|
+
* Palette overrides are scoped by palette variant. If the resolver moves the
|
|
80
|
+
* preview to a different palette, the current sparse overrides are stashed
|
|
81
|
+
* under the previous palette ID and any draft for the new palette is restored.
|
|
82
|
+
*/
|
|
83
|
+
export declare function applyResolvedSelections(state: StyleConfiguratorState, input: Readonly<{
|
|
84
|
+
resolved: Pick<SelectionSnapshot, 'buttonPersonalityId' | 'paletteVariantId'>;
|
|
85
|
+
warnings: ReadonlyArray<SelectionFallbackWarning>;
|
|
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;
|
|
100
|
+
export declare function paletteOverridesEqual(a: PaletteOverrides | null, b: PaletteOverrides | null): boolean;
|
|
101
|
+
export {};
|
|
@@ -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,16 @@
|
|
|
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<"brushed-wash">;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
tags: Readonly<Partial<Readonly<{
|
|
10
|
+
tone: import("../../site-styles").StyleTone;
|
|
11
|
+
energy: import("../../site-styles").StyleEnergy;
|
|
12
|
+
motion: import("../../site-styles").StyleMotion;
|
|
13
|
+
era: import("../../site-styles").StyleEra;
|
|
14
|
+
}>>>;
|
|
15
|
+
buttonSystem: import("@riverbankcms/blocks").ButtonSystem;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
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<"confident-chip">;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
tags: Readonly<Partial<Readonly<{
|
|
10
|
+
tone: import("../../site-styles").StyleTone;
|
|
11
|
+
energy: import("../../site-styles").StyleEnergy;
|
|
12
|
+
motion: import("../../site-styles").StyleMotion;
|
|
13
|
+
era: import("../../site-styles").StyleEra;
|
|
14
|
+
}>>>;
|
|
15
|
+
buttonSystem: import("@riverbankcms/blocks").ButtonSystem;
|
|
16
|
+
}>;
|