@riverbankcms/sdk 0.60.0 → 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/README.md +20 -3
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +1 -3
- package/dist/_dts/api/src/bookingRecords.d.ts +8 -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 +18 -1
- 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/billing/src/plans/types.d.ts +27 -0
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +1 -0
- 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/components/registry.client.d.ts +173 -2
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -2
- package/dist/_dts/blocks/src/system/runtime/header/shared.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.client.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/AgendaEventCard.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/DayEventsModal.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventDetailModal.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModals.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekTimetableView.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCapacity.d.ts +16 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/timetableModel.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/content-editor/src/index.d.ts +2 -2
- package/dist/_dts/content-editor/src/primitives/shared/activePreviewField.d.ts +9 -0
- package/dist/_dts/content-editor/src/primitives/shared/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +10 -0
- 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/editor-blocks/src/BlockEditor.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/BlockForm.d.ts +4 -0
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +8 -5
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +7 -5
- package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +2 -0
- package/dist/_dts/editor-blocks/src/block-editor/reorderControlMode.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +4 -0
- package/dist/_dts/media-react/src/hooks/useApiMediaUploader.d.ts +14 -0
- package/dist/_dts/media-react/src/index.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/blocks/runOptimisticCustomizeAction.d.ts +43 -20
- package/dist/_dts/preview-next/src/client/index.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/PageDesignEditorStateContext.d.ts +11 -28
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +7 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorUI.d.ts +1 -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/preview-next/src/client/preview/previewChromeSurface.d.ts +12 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeHistory.d.ts +41 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeRuntimePatch.d.ts +15 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeWorkflowState.d.ts +106 -0
- package/dist/_dts/preview-next/src/client/preview/previewUndoDomains.d.ts +34 -0
- package/dist/_dts/preview-next/src/client/preview/sidebarTabPreference.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/useOnboardingConfirmationCheck.d.ts +4 -9
- package/dist/_dts/preview-next/src/constants.d.ts +0 -1
- package/dist/_dts/preview-next/src/index.d.ts +1 -0
- package/dist/_dts/preview-next/src/onboarding-preview-planner.d.ts +89 -0
- package/dist/_dts/preview-next/src/route-contract.d.ts +37 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +11 -1
- package/dist/_dts/sdk/src/rendering/components/Block.d.ts +7 -76
- package/dist/_dts/sdk/src/rendering/components/Block.server.d.ts +9 -0
- package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +78 -0
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +5 -5
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- 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/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/index.d.ts +17 -16
- 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/responsiveDisplay.d.ts +23 -0
- package/dist/_dts/theme-core/src/responsiveMode.d.ts +21 -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 +2 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorErrors.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/_dts/ui/src/command-multi-select.d.ts +2 -2
- package/dist/cli/index.mjs +1590 -302
- package/dist/client/bookings.mjs +321 -144
- package/dist/client/client.mjs +4371 -2715
- package/dist/client/hooks.mjs +2826 -1675
- package/dist/client/rendering/client.mjs +3570 -2262
- package/dist/client/rendering/islands.mjs +1948 -756
- package/dist/client/rendering.mjs +42015 -40278
- package/dist/preview-next/before-render.mjs +5542 -0
- package/dist/preview-next/client/runtime.mjs +103364 -99924
- package/dist/preview-next/constants.mjs +0 -2
- package/dist/preview-next/index.mjs +0 -2
- package/dist/preview-next/middleware.mjs +5552 -1
- package/dist/server/components.mjs +11234 -9740
- package/dist/server/config-validation.mjs +3057 -1906
- package/dist/server/config.mjs +3057 -1906
- package/dist/server/data.mjs +2826 -1675
- package/dist/server/index.mjs +19 -2
- package/dist/server/next.mjs +3997 -2507
- package/dist/server/page-converter.mjs +2970 -1836
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +5960 -3200
- package/dist/server/rendering.mjs +12734 -11162
- package/dist/server/routing.mjs +3045 -1743
- package/dist/server/server.mjs +2827 -1676
- package/dist/server/theme-bridge.mjs +2074 -839
- package/dist/server/theme.mjs +1087 -492
- package/dist/styles/index.css +343 -299
- 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 {};
|