@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
|
@@ -19,19 +19,56 @@ export type HoverColor = 'none' | 'brighten' | 'darken' | 'saturate' | 'token';
|
|
|
19
19
|
export type ButtonPaddingPreset = 'compact' | 'default' | 'spacious';
|
|
20
20
|
export type GradientStyle = 'linear' | 'radial' | 'conic';
|
|
21
21
|
export type GradientSharpness = 'smooth' | 'medium' | 'hard';
|
|
22
|
-
export type BackgroundTreatment = 'solid' | 'gradient' | 'outline' | 'ghost';
|
|
23
|
-
export type OutlineHoverEffect = 'border-glow' | 'border-shift' | 'border-grow' | 'fill-transition' | 'border-trace';
|
|
24
22
|
export type GradientDirection = 'to-r' | 'to-l' | 'to-t' | 'to-b' | 'to-tr' | 'to-tl' | 'to-br' | 'to-bl';
|
|
23
|
+
export type LetterSpacing = 'tight' | 'normal' | 'loose';
|
|
25
24
|
export type ButtonSizeName = 'sm' | 'md' | 'lg' | 'xl';
|
|
26
25
|
export interface ButtonSizeConfig {
|
|
27
26
|
padding: string;
|
|
28
27
|
fontSize?: string;
|
|
29
28
|
}
|
|
30
|
-
export type ButtonSizes =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
export type ButtonSizes = Record<ButtonSizeName, ButtonSizeConfig>;
|
|
30
|
+
/**
|
|
31
|
+
* Standard semantic variant roles a theme exposes.
|
|
32
|
+
*
|
|
33
|
+
* Block content references variants by role; the active theme determines
|
|
34
|
+
* what each role looks like.
|
|
35
|
+
*/
|
|
36
|
+
export declare const VARIANT_ROLES: readonly ["primary", "secondary", "outline", "ghost", "link", "tertiary", "accent"];
|
|
37
|
+
export type VariantRole = (typeof VARIANT_ROLES)[number];
|
|
38
|
+
declare const SpecialVariantIdBrand: unique symbol;
|
|
39
|
+
/**
|
|
40
|
+
* Branded ID for theme-specific special variants that don't map to a standard role
|
|
41
|
+
* (e.g. `banner`, `generous`, `pulse`, `danger`).
|
|
42
|
+
*
|
|
43
|
+
* Use `asSpecialVariantId` to construct.
|
|
44
|
+
*/
|
|
45
|
+
export type SpecialVariantId = string & {
|
|
46
|
+
readonly [SpecialVariantIdBrand]: 'SpecialVariantId';
|
|
34
47
|
};
|
|
48
|
+
export declare function asSpecialVariantId(value: string): SpecialVariantId;
|
|
49
|
+
/**
|
|
50
|
+
* A variant ID is either a standard role or a branded special ID.
|
|
51
|
+
*
|
|
52
|
+
* The zod schema validates at the runtime boundary; types flow through the
|
|
53
|
+
* codebase without forcing every consumer to brand.
|
|
54
|
+
*/
|
|
55
|
+
export type VariantId = VariantRole | SpecialVariantId;
|
|
56
|
+
/**
|
|
57
|
+
* Magic alias the CSS generator emits for the highest-priority variant.
|
|
58
|
+
*
|
|
59
|
+
* Shared between generator and renderer so neither side hard-codes the string.
|
|
60
|
+
*/
|
|
61
|
+
export declare const DEFAULT_VARIANT_ALIAS_ID: "default";
|
|
62
|
+
export type DefaultVariantAliasId = typeof DEFAULT_VARIANT_ALIAS_ID;
|
|
63
|
+
/**
|
|
64
|
+
* Per-variant size overrides.
|
|
65
|
+
*
|
|
66
|
+
* Every variant participates in the size system. Optional `sizes` on a variant
|
|
67
|
+
* lets it override individual sizes (e.g. a `link` variant declaring zero
|
|
68
|
+
* horizontal padding at every size). Sizes not listed fall back to the theme's
|
|
69
|
+
* `theme.buttons.sizes`, then to the system defaults.
|
|
70
|
+
*/
|
|
71
|
+
export type VariantSizeOverrides = Partial<ButtonSizes>;
|
|
35
72
|
export type ButtonBackground = {
|
|
36
73
|
type: 'solid';
|
|
37
74
|
colorToken: string;
|
|
@@ -72,6 +109,11 @@ export declare const buttonTypographySchema: z.ZodEnum<{
|
|
|
72
109
|
body: "body";
|
|
73
110
|
heading: "heading";
|
|
74
111
|
}>;
|
|
112
|
+
export declare const letterSpacingSchema: z.ZodEnum<{
|
|
113
|
+
normal: "normal";
|
|
114
|
+
loose: "loose";
|
|
115
|
+
tight: "tight";
|
|
116
|
+
}>;
|
|
75
117
|
export declare const hoverTransformSchema: z.ZodEnum<{
|
|
76
118
|
none: "none";
|
|
77
119
|
scale: "scale";
|
|
@@ -100,17 +142,34 @@ export declare const gradientSharpnessSchema: z.ZodEnum<{
|
|
|
100
142
|
smooth: "smooth";
|
|
101
143
|
hard: "hard";
|
|
102
144
|
}>;
|
|
145
|
+
export declare const prioritySchema: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
146
|
+
export declare const variantRoleSchema: z.ZodEnum<{
|
|
147
|
+
link: "link";
|
|
148
|
+
primary: "primary";
|
|
149
|
+
secondary: "secondary";
|
|
150
|
+
outline: "outline";
|
|
151
|
+
accent: "accent";
|
|
152
|
+
ghost: "ghost";
|
|
153
|
+
tertiary: "tertiary";
|
|
154
|
+
}>;
|
|
103
155
|
export declare const buttonSizeNameSchema: z.ZodEnum<{
|
|
104
156
|
sm: "sm";
|
|
105
157
|
md: "md";
|
|
106
158
|
lg: "lg";
|
|
107
159
|
xl: "xl";
|
|
108
160
|
}>;
|
|
161
|
+
export declare const paddingShorthandSchema: z.ZodString;
|
|
109
162
|
export declare const buttonSizeConfigSchema: z.ZodObject<{
|
|
110
163
|
padding: z.ZodString;
|
|
111
164
|
fontSize: z.ZodOptional<z.ZodString>;
|
|
112
165
|
}, z.core.$strip>;
|
|
113
|
-
|
|
166
|
+
/**
|
|
167
|
+
* `xl` is optional on the wire so themes persisted before the `xl` size was
|
|
168
|
+
* added (e.g. SWTS) continue to parse. When `xl` is missing the schema
|
|
169
|
+
* backfills it from `lg`, keeping `ButtonSizes` a complete `sm/md/lg/xl` map
|
|
170
|
+
* downstream — generators never need to deal with an undefined `xl`.
|
|
171
|
+
*/
|
|
172
|
+
export declare const buttonSizesSchema: z.ZodPipe<z.ZodObject<{
|
|
114
173
|
sm: z.ZodObject<{
|
|
115
174
|
padding: z.ZodString;
|
|
116
175
|
fontSize: z.ZodOptional<z.ZodString>;
|
|
@@ -127,20 +186,41 @@ export declare const buttonSizesSchema: z.ZodObject<{
|
|
|
127
186
|
padding: z.ZodString;
|
|
128
187
|
fontSize: z.ZodOptional<z.ZodString>;
|
|
129
188
|
}, z.core.$strip>>;
|
|
130
|
-
}, z.core.$strip
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
189
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
190
|
+
sm: {
|
|
191
|
+
padding: string;
|
|
192
|
+
fontSize?: string | undefined;
|
|
193
|
+
};
|
|
194
|
+
md: {
|
|
195
|
+
padding: string;
|
|
196
|
+
fontSize?: string | undefined;
|
|
197
|
+
};
|
|
198
|
+
lg: {
|
|
199
|
+
padding: string;
|
|
200
|
+
fontSize?: string | undefined;
|
|
201
|
+
};
|
|
202
|
+
xl: {
|
|
203
|
+
padding: string;
|
|
204
|
+
fontSize?: string | undefined;
|
|
205
|
+
};
|
|
206
|
+
}, {
|
|
207
|
+
sm: {
|
|
208
|
+
padding: string;
|
|
209
|
+
fontSize?: string | undefined;
|
|
210
|
+
};
|
|
211
|
+
md: {
|
|
212
|
+
padding: string;
|
|
213
|
+
fontSize?: string | undefined;
|
|
214
|
+
};
|
|
215
|
+
lg: {
|
|
216
|
+
padding: string;
|
|
217
|
+
fontSize?: string | undefined;
|
|
218
|
+
};
|
|
219
|
+
xl?: {
|
|
220
|
+
padding: string;
|
|
221
|
+
fontSize?: string | undefined;
|
|
222
|
+
} | undefined;
|
|
223
|
+
}>>;
|
|
144
224
|
export declare const buttonGlobalSettingsSchema: z.ZodObject<{
|
|
145
225
|
cornerStyle: z.ZodEnum<{
|
|
146
226
|
rounded: "rounded";
|
|
@@ -166,6 +246,12 @@ export declare const buttonGlobalSettingsSchema: z.ZodObject<{
|
|
|
166
246
|
body: "body";
|
|
167
247
|
heading: "heading";
|
|
168
248
|
}>>;
|
|
249
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
250
|
+
letterSpacing: z.ZodOptional<z.ZodEnum<{
|
|
251
|
+
normal: "normal";
|
|
252
|
+
loose: "loose";
|
|
253
|
+
tight: "tight";
|
|
254
|
+
}>>;
|
|
169
255
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
170
256
|
paddingPreset: z.ZodOptional<z.ZodEnum<{
|
|
171
257
|
compact: "compact";
|
|
@@ -235,29 +321,37 @@ export declare const buttonBorderSchema: z.ZodObject<{
|
|
|
235
321
|
widthClass: z.ZodString;
|
|
236
322
|
colorToken: z.ZodString;
|
|
237
323
|
}, z.core.$strip>;
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
324
|
+
/**
|
|
325
|
+
* Per-variant size overrides schema — every entry is optional.
|
|
326
|
+
*
|
|
327
|
+
* For each size key present, the values override the theme's `sizes` config
|
|
328
|
+
* for that size on this variant. Missing sizes fall through to theme.sizes,
|
|
329
|
+
* then system defaults.
|
|
330
|
+
*/
|
|
331
|
+
export declare const variantSizeOverridesSchema: z.ZodObject<{
|
|
332
|
+
sm: z.ZodOptional<z.ZodObject<{
|
|
333
|
+
padding: z.ZodString;
|
|
334
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
335
|
+
}, z.core.$strip>>;
|
|
336
|
+
md: z.ZodOptional<z.ZodObject<{
|
|
337
|
+
padding: z.ZodString;
|
|
338
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
339
|
+
}, z.core.$strip>>;
|
|
340
|
+
lg: z.ZodOptional<z.ZodObject<{
|
|
341
|
+
padding: z.ZodString;
|
|
342
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
343
|
+
}, z.core.$strip>>;
|
|
344
|
+
xl: z.ZodOptional<z.ZodObject<{
|
|
345
|
+
padding: z.ZodString;
|
|
346
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
347
|
+
}, z.core.$strip>>;
|
|
260
348
|
}, z.core.$strip>;
|
|
349
|
+
/**
|
|
350
|
+
* Unified variant schema. Every variant participates in the size system; the
|
|
351
|
+
* optional `sizes` field lets a variant scale differently than the theme
|
|
352
|
+
* default (e.g. link-style variants declaring zero horizontal padding at
|
|
353
|
+
* every size).
|
|
354
|
+
*/
|
|
261
355
|
export declare const buttonVariantSchema: z.ZodObject<{
|
|
262
356
|
id: z.ZodString;
|
|
263
357
|
name: z.ZodString;
|
|
@@ -283,7 +377,7 @@ export declare const buttonVariantSchema: z.ZodObject<{
|
|
|
283
377
|
type: z.ZodLiteral<"transparent">;
|
|
284
378
|
}, z.core.$strip>], "type">;
|
|
285
379
|
textColorToken: z.ZodString;
|
|
286
|
-
borderRadius: z.ZodString
|
|
380
|
+
borderRadius: z.ZodOptional<z.ZodString>;
|
|
287
381
|
shadow: z.ZodOptional<z.ZodObject<{
|
|
288
382
|
elevation: z.ZodEnum<{
|
|
289
383
|
medium: "medium";
|
|
@@ -305,8 +399,6 @@ export declare const buttonVariantSchema: z.ZodObject<{
|
|
|
305
399
|
widthClass: z.ZodString;
|
|
306
400
|
colorToken: z.ZodString;
|
|
307
401
|
}, z.core.$strip>>;
|
|
308
|
-
padding: z.ZodOptional<z.ZodString>;
|
|
309
|
-
fontSize: z.ZodOptional<z.ZodString>;
|
|
310
402
|
hoverBackgroundToken: z.ZodOptional<z.ZodString>;
|
|
311
403
|
effects: z.ZodOptional<z.ZodObject<{
|
|
312
404
|
base: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -326,6 +418,24 @@ export declare const buttonVariantSchema: z.ZodObject<{
|
|
|
326
418
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
327
419
|
}, z.core.$strip>>>;
|
|
328
420
|
}, z.core.$strip>>;
|
|
421
|
+
sizes: z.ZodOptional<z.ZodObject<{
|
|
422
|
+
sm: z.ZodOptional<z.ZodObject<{
|
|
423
|
+
padding: z.ZodString;
|
|
424
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
425
|
+
}, z.core.$strip>>;
|
|
426
|
+
md: z.ZodOptional<z.ZodObject<{
|
|
427
|
+
padding: z.ZodString;
|
|
428
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
429
|
+
}, z.core.$strip>>;
|
|
430
|
+
lg: z.ZodOptional<z.ZodObject<{
|
|
431
|
+
padding: z.ZodString;
|
|
432
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
433
|
+
}, z.core.$strip>>;
|
|
434
|
+
xl: z.ZodOptional<z.ZodObject<{
|
|
435
|
+
padding: z.ZodString;
|
|
436
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
437
|
+
}, z.core.$strip>>;
|
|
438
|
+
}, z.core.$strip>>;
|
|
329
439
|
}, z.core.$strip>;
|
|
330
440
|
export declare const buttonSystemSchema: z.ZodObject<{
|
|
331
441
|
global: z.ZodObject<{
|
|
@@ -353,6 +463,12 @@ export declare const buttonSystemSchema: z.ZodObject<{
|
|
|
353
463
|
body: "body";
|
|
354
464
|
heading: "heading";
|
|
355
465
|
}>>;
|
|
466
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
467
|
+
letterSpacing: z.ZodOptional<z.ZodEnum<{
|
|
468
|
+
normal: "normal";
|
|
469
|
+
loose: "loose";
|
|
470
|
+
tight: "tight";
|
|
471
|
+
}>>;
|
|
356
472
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
357
473
|
paddingPreset: z.ZodOptional<z.ZodEnum<{
|
|
358
474
|
compact: "compact";
|
|
@@ -410,7 +526,7 @@ export declare const buttonSystemSchema: z.ZodObject<{
|
|
|
410
526
|
type: z.ZodLiteral<"transparent">;
|
|
411
527
|
}, z.core.$strip>], "type">;
|
|
412
528
|
textColorToken: z.ZodString;
|
|
413
|
-
borderRadius: z.ZodString
|
|
529
|
+
borderRadius: z.ZodOptional<z.ZodString>;
|
|
414
530
|
shadow: z.ZodOptional<z.ZodObject<{
|
|
415
531
|
elevation: z.ZodEnum<{
|
|
416
532
|
medium: "medium";
|
|
@@ -432,8 +548,6 @@ export declare const buttonSystemSchema: z.ZodObject<{
|
|
|
432
548
|
widthClass: z.ZodString;
|
|
433
549
|
colorToken: z.ZodString;
|
|
434
550
|
}, z.core.$strip>>;
|
|
435
|
-
padding: z.ZodOptional<z.ZodString>;
|
|
436
|
-
fontSize: z.ZodOptional<z.ZodString>;
|
|
437
551
|
hoverBackgroundToken: z.ZodOptional<z.ZodString>;
|
|
438
552
|
effects: z.ZodOptional<z.ZodObject<{
|
|
439
553
|
base: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -453,8 +567,26 @@ export declare const buttonSystemSchema: z.ZodObject<{
|
|
|
453
567
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
454
568
|
}, z.core.$strip>>>;
|
|
455
569
|
}, z.core.$strip>>;
|
|
570
|
+
sizes: z.ZodOptional<z.ZodObject<{
|
|
571
|
+
sm: z.ZodOptional<z.ZodObject<{
|
|
572
|
+
padding: z.ZodString;
|
|
573
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
574
|
+
}, z.core.$strip>>;
|
|
575
|
+
md: z.ZodOptional<z.ZodObject<{
|
|
576
|
+
padding: z.ZodString;
|
|
577
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
578
|
+
}, z.core.$strip>>;
|
|
579
|
+
lg: z.ZodOptional<z.ZodObject<{
|
|
580
|
+
padding: z.ZodString;
|
|
581
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
582
|
+
}, z.core.$strip>>;
|
|
583
|
+
xl: z.ZodOptional<z.ZodObject<{
|
|
584
|
+
padding: z.ZodString;
|
|
585
|
+
fontSize: z.ZodOptional<z.ZodString>;
|
|
586
|
+
}, z.core.$strip>>;
|
|
587
|
+
}, z.core.$strip>>;
|
|
456
588
|
}, z.core.$strip>>;
|
|
457
|
-
sizes: z.ZodOptional<z.ZodObject<{
|
|
589
|
+
sizes: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
458
590
|
sm: z.ZodObject<{
|
|
459
591
|
padding: z.ZodString;
|
|
460
592
|
fontSize: z.ZodOptional<z.ZodString>;
|
|
@@ -471,59 +603,108 @@ export declare const buttonSystemSchema: z.ZodObject<{
|
|
|
471
603
|
padding: z.ZodString;
|
|
472
604
|
fontSize: z.ZodOptional<z.ZodString>;
|
|
473
605
|
}, z.core.$strip>>;
|
|
474
|
-
}, z.core.$strip
|
|
606
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
607
|
+
sm: {
|
|
608
|
+
padding: string;
|
|
609
|
+
fontSize?: string | undefined;
|
|
610
|
+
};
|
|
611
|
+
md: {
|
|
612
|
+
padding: string;
|
|
613
|
+
fontSize?: string | undefined;
|
|
614
|
+
};
|
|
615
|
+
lg: {
|
|
616
|
+
padding: string;
|
|
617
|
+
fontSize?: string | undefined;
|
|
618
|
+
};
|
|
619
|
+
xl: {
|
|
620
|
+
padding: string;
|
|
621
|
+
fontSize?: string | undefined;
|
|
622
|
+
};
|
|
623
|
+
}, {
|
|
624
|
+
sm: {
|
|
625
|
+
padding: string;
|
|
626
|
+
fontSize?: string | undefined;
|
|
627
|
+
};
|
|
628
|
+
md: {
|
|
629
|
+
padding: string;
|
|
630
|
+
fontSize?: string | undefined;
|
|
631
|
+
};
|
|
632
|
+
lg: {
|
|
633
|
+
padding: string;
|
|
634
|
+
fontSize?: string | undefined;
|
|
635
|
+
};
|
|
636
|
+
xl?: {
|
|
637
|
+
padding: string;
|
|
638
|
+
fontSize?: string | undefined;
|
|
639
|
+
} | undefined;
|
|
640
|
+
}>>>;
|
|
475
641
|
}, z.core.$strip>;
|
|
642
|
+
export type Priority = 1 | 2 | 3;
|
|
476
643
|
export interface ButtonGlobalSettings {
|
|
477
644
|
cornerStyle: CornerStyle;
|
|
478
645
|
cornerRadius?: number;
|
|
479
646
|
shadow: ShadowSize;
|
|
480
647
|
textTransform: TextTransform;
|
|
481
648
|
fontWeight: FontWeight;
|
|
649
|
+
/** @deprecated See JSDoc on `buttonGlobalSettingsSchema.borderWidth`. */
|
|
482
650
|
borderWidth: 1 | 2 | 3;
|
|
651
|
+
/** Typography source (body or heading) — picks which theme typography pool to use */
|
|
483
652
|
typography?: ButtonTypography;
|
|
653
|
+
/** Font size token for all variants in the family (e.g. "text-xs", "text-sm") */
|
|
654
|
+
fontSize?: string;
|
|
655
|
+
/** Letter spacing for all variants */
|
|
656
|
+
letterSpacing?: LetterSpacing;
|
|
657
|
+
/** Italic style */
|
|
484
658
|
italic?: boolean;
|
|
659
|
+
/** Padding preset (used as sized-variant default when no sizes config) */
|
|
485
660
|
paddingPreset?: ButtonPaddingPreset;
|
|
486
661
|
hoverTransform: HoverTransform;
|
|
487
662
|
hoverColor: HoverColor;
|
|
663
|
+
/** When hoverColor is 'token', this specifies which token to use */
|
|
488
664
|
hoverColorToken?: string;
|
|
489
665
|
gradientStyle?: GradientStyle;
|
|
490
666
|
gradientAngle?: number;
|
|
491
667
|
gradientSharpness?: GradientSharpness;
|
|
492
668
|
}
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
color?: string;
|
|
500
|
-
gradientColors?: [string, string];
|
|
501
|
-
borderColor?: string;
|
|
502
|
-
outlineHoverEffect?: OutlineHoverEffect;
|
|
503
|
-
effectPreset?: string;
|
|
669
|
+
/** Effects per state group */
|
|
670
|
+
export interface VariantEffects {
|
|
671
|
+
base?: EffectApplication[];
|
|
672
|
+
hover?: EffectApplication[];
|
|
673
|
+
active?: EffectApplication[];
|
|
674
|
+
focus?: EffectApplication[];
|
|
504
675
|
}
|
|
676
|
+
/**
|
|
677
|
+
* A button variant.
|
|
678
|
+
*
|
|
679
|
+
* Every variant participates in the size system (`sm | md | lg | xl`). Padding
|
|
680
|
+
* and fontSize at each size are resolved by:
|
|
681
|
+
* 1. `variant.sizes?.[S]` if present
|
|
682
|
+
* 2. else `theme.buttons.sizes?.[S]`
|
|
683
|
+
* 3. else the system defaults in `DEFAULT_BUTTON_SIZES`
|
|
684
|
+
*
|
|
685
|
+
* Special variants like banner, link, or tag declare per-variant `sizes`
|
|
686
|
+
* overrides to carry their distinct dimensions through every size. There is
|
|
687
|
+
* no "fixed kind" — size is universal.
|
|
688
|
+
*/
|
|
505
689
|
export interface ButtonVariant {
|
|
506
690
|
id: string;
|
|
507
691
|
name: string;
|
|
508
692
|
enabled: boolean;
|
|
509
|
-
priority:
|
|
693
|
+
priority: Priority;
|
|
510
694
|
background: ButtonBackground;
|
|
511
695
|
textColorToken: string;
|
|
512
|
-
|
|
696
|
+
/** Tailwind radius token (e.g. `'rounded-md'`). Omit to inherit from `global.cornerStyle`. */
|
|
697
|
+
borderRadius?: string;
|
|
513
698
|
shadow?: Shadow;
|
|
514
699
|
border?: ButtonBorder;
|
|
515
|
-
padding?: string;
|
|
516
|
-
fontSize?: string;
|
|
517
700
|
hoverBackgroundToken?: string;
|
|
518
|
-
effects?:
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
active?: EffectApplication[];
|
|
522
|
-
focus?: EffectApplication[];
|
|
523
|
-
};
|
|
701
|
+
effects?: VariantEffects;
|
|
702
|
+
/** Per-variant size overrides. See VariantSizeOverrides. */
|
|
703
|
+
sizes?: VariantSizeOverrides;
|
|
524
704
|
}
|
|
525
705
|
export interface ButtonSystem {
|
|
526
706
|
global: ButtonGlobalSettings;
|
|
527
707
|
variants: ButtonVariant[];
|
|
528
708
|
sizes?: ButtonSizes;
|
|
529
709
|
}
|
|
710
|
+
export {};
|
|
@@ -512,6 +512,8 @@ export declare const mockThemes: {
|
|
|
512
512
|
hoverColor: "none" | "token" | "darken" | "brighten" | "saturate";
|
|
513
513
|
cornerRadius?: number | undefined;
|
|
514
514
|
typography?: "body" | "heading" | undefined;
|
|
515
|
+
fontSize?: string | undefined;
|
|
516
|
+
letterSpacing?: "normal" | "loose" | "tight" | undefined;
|
|
515
517
|
italic?: boolean | undefined;
|
|
516
518
|
paddingPreset?: "compact" | "spacious" | "default" | undefined;
|
|
517
519
|
hoverColorToken?: string | undefined;
|
|
@@ -535,7 +537,7 @@ export declare const mockThemes: {
|
|
|
535
537
|
type: "transparent";
|
|
536
538
|
};
|
|
537
539
|
textColorToken: string;
|
|
538
|
-
borderRadius
|
|
540
|
+
borderRadius?: string | undefined;
|
|
539
541
|
shadow?: {
|
|
540
542
|
elevation: "medium" | "none" | "low" | "high";
|
|
541
543
|
softness: "soft" | "crisp" | "hard" | null;
|
|
@@ -545,8 +547,6 @@ export declare const mockThemes: {
|
|
|
545
547
|
widthClass: string;
|
|
546
548
|
colorToken: string;
|
|
547
549
|
} | undefined;
|
|
548
|
-
padding?: string | undefined;
|
|
549
|
-
fontSize?: string | undefined;
|
|
550
550
|
hoverBackgroundToken?: string | undefined;
|
|
551
551
|
effects?: {
|
|
552
552
|
base?: {
|
|
@@ -566,6 +566,24 @@ export declare const mockThemes: {
|
|
|
566
566
|
options?: Record<string, any> | undefined;
|
|
567
567
|
}[] | undefined;
|
|
568
568
|
} | undefined;
|
|
569
|
+
sizes?: {
|
|
570
|
+
sm?: {
|
|
571
|
+
padding: string;
|
|
572
|
+
fontSize?: string | undefined;
|
|
573
|
+
} | undefined;
|
|
574
|
+
md?: {
|
|
575
|
+
padding: string;
|
|
576
|
+
fontSize?: string | undefined;
|
|
577
|
+
} | undefined;
|
|
578
|
+
lg?: {
|
|
579
|
+
padding: string;
|
|
580
|
+
fontSize?: string | undefined;
|
|
581
|
+
} | undefined;
|
|
582
|
+
xl?: {
|
|
583
|
+
padding: string;
|
|
584
|
+
fontSize?: string | undefined;
|
|
585
|
+
} | undefined;
|
|
586
|
+
} | undefined;
|
|
569
587
|
}[];
|
|
570
588
|
sizes?: {
|
|
571
589
|
sm: {
|
|
@@ -580,10 +598,10 @@ export declare const mockThemes: {
|
|
|
580
598
|
padding: string;
|
|
581
599
|
fontSize?: string | undefined;
|
|
582
600
|
};
|
|
583
|
-
xl
|
|
601
|
+
xl: {
|
|
584
602
|
padding: string;
|
|
585
603
|
fontSize?: string | undefined;
|
|
586
|
-
}
|
|
604
|
+
};
|
|
587
605
|
} | undefined;
|
|
588
606
|
} | undefined;
|
|
589
607
|
cards?: {
|
|
@@ -1451,6 +1469,8 @@ export declare const mockThemes: {
|
|
|
1451
1469
|
hoverColor: "none" | "token" | "darken" | "brighten" | "saturate";
|
|
1452
1470
|
cornerRadius?: number | undefined;
|
|
1453
1471
|
typography?: "body" | "heading" | undefined;
|
|
1472
|
+
fontSize?: string | undefined;
|
|
1473
|
+
letterSpacing?: "normal" | "loose" | "tight" | undefined;
|
|
1454
1474
|
italic?: boolean | undefined;
|
|
1455
1475
|
paddingPreset?: "compact" | "spacious" | "default" | undefined;
|
|
1456
1476
|
hoverColorToken?: string | undefined;
|
|
@@ -1474,7 +1494,7 @@ export declare const mockThemes: {
|
|
|
1474
1494
|
type: "transparent";
|
|
1475
1495
|
};
|
|
1476
1496
|
textColorToken: string;
|
|
1477
|
-
borderRadius
|
|
1497
|
+
borderRadius?: string | undefined;
|
|
1478
1498
|
shadow?: {
|
|
1479
1499
|
elevation: "medium" | "none" | "low" | "high";
|
|
1480
1500
|
softness: "soft" | "crisp" | "hard" | null;
|
|
@@ -1484,8 +1504,6 @@ export declare const mockThemes: {
|
|
|
1484
1504
|
widthClass: string;
|
|
1485
1505
|
colorToken: string;
|
|
1486
1506
|
} | undefined;
|
|
1487
|
-
padding?: string | undefined;
|
|
1488
|
-
fontSize?: string | undefined;
|
|
1489
1507
|
hoverBackgroundToken?: string | undefined;
|
|
1490
1508
|
effects?: {
|
|
1491
1509
|
base?: {
|
|
@@ -1505,6 +1523,24 @@ export declare const mockThemes: {
|
|
|
1505
1523
|
options?: Record<string, any> | undefined;
|
|
1506
1524
|
}[] | undefined;
|
|
1507
1525
|
} | undefined;
|
|
1526
|
+
sizes?: {
|
|
1527
|
+
sm?: {
|
|
1528
|
+
padding: string;
|
|
1529
|
+
fontSize?: string | undefined;
|
|
1530
|
+
} | undefined;
|
|
1531
|
+
md?: {
|
|
1532
|
+
padding: string;
|
|
1533
|
+
fontSize?: string | undefined;
|
|
1534
|
+
} | undefined;
|
|
1535
|
+
lg?: {
|
|
1536
|
+
padding: string;
|
|
1537
|
+
fontSize?: string | undefined;
|
|
1538
|
+
} | undefined;
|
|
1539
|
+
xl?: {
|
|
1540
|
+
padding: string;
|
|
1541
|
+
fontSize?: string | undefined;
|
|
1542
|
+
} | undefined;
|
|
1543
|
+
} | undefined;
|
|
1508
1544
|
}[];
|
|
1509
1545
|
sizes?: {
|
|
1510
1546
|
sm: {
|
|
@@ -1519,10 +1555,10 @@ export declare const mockThemes: {
|
|
|
1519
1555
|
padding: string;
|
|
1520
1556
|
fontSize?: string | undefined;
|
|
1521
1557
|
};
|
|
1522
|
-
xl
|
|
1558
|
+
xl: {
|
|
1523
1559
|
padding: string;
|
|
1524
1560
|
fontSize?: string | undefined;
|
|
1525
|
-
}
|
|
1561
|
+
};
|
|
1526
1562
|
} | undefined;
|
|
1527
1563
|
} | undefined;
|
|
1528
1564
|
cards?: {
|
|
@@ -2390,6 +2426,8 @@ export declare const mockThemes: {
|
|
|
2390
2426
|
hoverColor: "none" | "token" | "darken" | "brighten" | "saturate";
|
|
2391
2427
|
cornerRadius?: number | undefined;
|
|
2392
2428
|
typography?: "body" | "heading" | undefined;
|
|
2429
|
+
fontSize?: string | undefined;
|
|
2430
|
+
letterSpacing?: "normal" | "loose" | "tight" | undefined;
|
|
2393
2431
|
italic?: boolean | undefined;
|
|
2394
2432
|
paddingPreset?: "compact" | "spacious" | "default" | undefined;
|
|
2395
2433
|
hoverColorToken?: string | undefined;
|
|
@@ -2413,7 +2451,7 @@ export declare const mockThemes: {
|
|
|
2413
2451
|
type: "transparent";
|
|
2414
2452
|
};
|
|
2415
2453
|
textColorToken: string;
|
|
2416
|
-
borderRadius
|
|
2454
|
+
borderRadius?: string | undefined;
|
|
2417
2455
|
shadow?: {
|
|
2418
2456
|
elevation: "medium" | "none" | "low" | "high";
|
|
2419
2457
|
softness: "soft" | "crisp" | "hard" | null;
|
|
@@ -2423,8 +2461,6 @@ export declare const mockThemes: {
|
|
|
2423
2461
|
widthClass: string;
|
|
2424
2462
|
colorToken: string;
|
|
2425
2463
|
} | undefined;
|
|
2426
|
-
padding?: string | undefined;
|
|
2427
|
-
fontSize?: string | undefined;
|
|
2428
2464
|
hoverBackgroundToken?: string | undefined;
|
|
2429
2465
|
effects?: {
|
|
2430
2466
|
base?: {
|
|
@@ -2444,6 +2480,24 @@ export declare const mockThemes: {
|
|
|
2444
2480
|
options?: Record<string, any> | undefined;
|
|
2445
2481
|
}[] | undefined;
|
|
2446
2482
|
} | undefined;
|
|
2483
|
+
sizes?: {
|
|
2484
|
+
sm?: {
|
|
2485
|
+
padding: string;
|
|
2486
|
+
fontSize?: string | undefined;
|
|
2487
|
+
} | undefined;
|
|
2488
|
+
md?: {
|
|
2489
|
+
padding: string;
|
|
2490
|
+
fontSize?: string | undefined;
|
|
2491
|
+
} | undefined;
|
|
2492
|
+
lg?: {
|
|
2493
|
+
padding: string;
|
|
2494
|
+
fontSize?: string | undefined;
|
|
2495
|
+
} | undefined;
|
|
2496
|
+
xl?: {
|
|
2497
|
+
padding: string;
|
|
2498
|
+
fontSize?: string | undefined;
|
|
2499
|
+
} | undefined;
|
|
2500
|
+
} | undefined;
|
|
2447
2501
|
}[];
|
|
2448
2502
|
sizes?: {
|
|
2449
2503
|
sm: {
|
|
@@ -2458,10 +2512,10 @@ export declare const mockThemes: {
|
|
|
2458
2512
|
padding: string;
|
|
2459
2513
|
fontSize?: string | undefined;
|
|
2460
2514
|
};
|
|
2461
|
-
xl
|
|
2515
|
+
xl: {
|
|
2462
2516
|
padding: string;
|
|
2463
2517
|
fontSize?: string | undefined;
|
|
2464
|
-
}
|
|
2518
|
+
};
|
|
2465
2519
|
} | undefined;
|
|
2466
2520
|
} | undefined;
|
|
2467
2521
|
cards?: {
|