@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
package/dist/server/theme.mjs
CHANGED
|
@@ -15,215 +15,810 @@ function brandNonEmptyString(value, label) {
|
|
|
15
15
|
return value;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
// ../theme-core/src/site-styles/compatibility.ts
|
|
19
|
+
import { z } from "zod";
|
|
20
|
+
var STYLE_AXIS_VALUES = {
|
|
21
|
+
tone: ["minimal", "classic", "bold"],
|
|
22
|
+
energy: ["calm", "vibrant"],
|
|
23
|
+
motion: ["subtle", "standard", "expressive"],
|
|
24
|
+
era: ["editorial", "modern", "organic", "technical", "retro"]
|
|
25
|
+
};
|
|
26
|
+
var styleTagsSchema = z.object({
|
|
27
|
+
tone: z.enum(STYLE_AXIS_VALUES.tone).optional(),
|
|
28
|
+
energy: z.enum(STYLE_AXIS_VALUES.energy).optional(),
|
|
29
|
+
motion: z.enum(STYLE_AXIS_VALUES.motion).optional(),
|
|
30
|
+
era: z.enum(STYLE_AXIS_VALUES.era).optional()
|
|
31
|
+
});
|
|
32
|
+
|
|
18
33
|
// ../theme-core/src/schema.ts
|
|
19
|
-
import { z as
|
|
34
|
+
import { z as z14 } from "zod";
|
|
20
35
|
|
|
21
36
|
// ../theme-core/src/lib/media.ts
|
|
22
|
-
import
|
|
23
|
-
var hotspotSchema =
|
|
24
|
-
x:
|
|
25
|
-
y:
|
|
26
|
-
radius:
|
|
27
|
-
});
|
|
28
|
-
var rotationSchema =
|
|
29
|
-
var rectSchema =
|
|
30
|
-
var aspectCropSchema =
|
|
31
|
-
aspect:
|
|
32
|
-
rect:
|
|
33
|
-
hotspot:
|
|
34
|
-
rotation:
|
|
35
|
-
});
|
|
36
|
-
var transformSchema =
|
|
37
|
-
aspectCrops:
|
|
37
|
+
import z2 from "zod";
|
|
38
|
+
var hotspotSchema = z2.object({
|
|
39
|
+
x: z2.number().min(0).max(1),
|
|
40
|
+
y: z2.number().min(0).max(1),
|
|
41
|
+
radius: z2.number().optional()
|
|
42
|
+
});
|
|
43
|
+
var rotationSchema = z2.union([z2.literal(0), z2.literal(90), z2.literal(180), z2.literal(270)]);
|
|
44
|
+
var rectSchema = z2.tuple([z2.number(), z2.number(), z2.number(), z2.number()]);
|
|
45
|
+
var aspectCropSchema = z2.object({
|
|
46
|
+
aspect: z2.preprocess((value) => value == null ? void 0 : value, z2.string().optional()),
|
|
47
|
+
rect: z2.preprocess((value) => value == null ? void 0 : value, rectSchema.optional()),
|
|
48
|
+
hotspot: z2.preprocess((value) => value == null ? void 0 : value, hotspotSchema.optional()),
|
|
49
|
+
rotation: z2.preprocess((value) => value == null ? void 0 : value, rotationSchema.optional())
|
|
50
|
+
});
|
|
51
|
+
var transformSchema = z2.object({
|
|
52
|
+
aspectCrops: z2.preprocess((value) => {
|
|
38
53
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
39
54
|
return void 0;
|
|
40
55
|
}
|
|
41
56
|
return value;
|
|
42
|
-
},
|
|
57
|
+
}, z2.record(z2.string(), aspectCropSchema.catch({}))).optional(),
|
|
43
58
|
rect: rectSchema.optional(),
|
|
44
59
|
hotspot: hotspotSchema.optional(),
|
|
45
60
|
rotation: rotationSchema.optional()
|
|
46
61
|
});
|
|
47
|
-
var mediaSchema =
|
|
48
|
-
type:
|
|
49
|
-
purpose:
|
|
50
|
-
placeholder:
|
|
51
|
-
assetId:
|
|
52
|
-
identifier:
|
|
53
|
-
src:
|
|
54
|
-
alt:
|
|
55
|
-
filename:
|
|
56
|
-
mimeType:
|
|
57
|
-
width:
|
|
58
|
-
height:
|
|
59
|
-
storageBucket:
|
|
60
|
-
storagePath:
|
|
62
|
+
var mediaSchema = z2.object({
|
|
63
|
+
type: z2.enum(["image", "video", "audio", "document", "spreadsheet", "archive"]),
|
|
64
|
+
purpose: z2.string().optional(),
|
|
65
|
+
placeholder: z2.boolean().default(true).optional(),
|
|
66
|
+
assetId: z2.string().optional(),
|
|
67
|
+
identifier: z2.string().optional(),
|
|
68
|
+
src: z2.string().optional(),
|
|
69
|
+
alt: z2.string().optional(),
|
|
70
|
+
filename: z2.string().optional(),
|
|
71
|
+
mimeType: z2.string().optional(),
|
|
72
|
+
width: z2.number().optional(),
|
|
73
|
+
height: z2.number().optional(),
|
|
74
|
+
storageBucket: z2.string().optional(),
|
|
75
|
+
storagePath: z2.string().optional(),
|
|
61
76
|
transform: transformSchema.optional()
|
|
62
77
|
});
|
|
63
78
|
|
|
64
79
|
// ../theme-core/src/buttons/types.ts
|
|
65
|
-
import { z as
|
|
66
|
-
var
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
var
|
|
76
|
-
var
|
|
77
|
-
var
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
var
|
|
80
|
+
import { z as z3 } from "zod";
|
|
81
|
+
var VARIANT_ROLES = [
|
|
82
|
+
"primary",
|
|
83
|
+
"secondary",
|
|
84
|
+
"outline",
|
|
85
|
+
"ghost",
|
|
86
|
+
"link",
|
|
87
|
+
"tertiary",
|
|
88
|
+
"accent"
|
|
89
|
+
];
|
|
90
|
+
var cornerStyleSchema = z3.enum(["square", "rounded", "pill"]);
|
|
91
|
+
var shadowSizeSchema = z3.enum(["none", "low", "medium", "high"]);
|
|
92
|
+
var textTransformSchema = z3.enum(["none", "uppercase", "lowercase", "capitalize"]);
|
|
93
|
+
var fontWeightSchema = z3.union([z3.literal(500), z3.literal(600), z3.literal(700)]);
|
|
94
|
+
var buttonTypographySchema = z3.enum(["body", "heading"]);
|
|
95
|
+
var letterSpacingSchema = z3.enum(["tight", "normal", "loose"]);
|
|
96
|
+
var hoverTransformSchema = z3.enum(["none", "lift", "scale", "press"]);
|
|
97
|
+
var hoverColorSchema = z3.enum(["none", "brighten", "darken", "saturate", "token"]);
|
|
98
|
+
var buttonPaddingPresetSchema = z3.enum(["compact", "default", "spacious"]);
|
|
99
|
+
var gradientStyleSchema = z3.enum(["linear", "radial", "conic"]);
|
|
100
|
+
var gradientSharpnessSchema = z3.enum(["smooth", "medium", "hard"]);
|
|
101
|
+
var prioritySchema = z3.union([z3.literal(1), z3.literal(2), z3.literal(3)]);
|
|
102
|
+
var variantRoleSchema = z3.enum(VARIANT_ROLES);
|
|
103
|
+
var buttonSizeNameSchema = z3.enum(["sm", "md", "lg", "xl"]);
|
|
104
|
+
var PADDING_TOKEN_PATTERN = /^(?:0|\d+(?:\.\d+)?(?:rem|em|px|%))$/;
|
|
105
|
+
var paddingShorthandSchema = z3.string().refine(
|
|
106
|
+
(value) => {
|
|
107
|
+
const parts = value.split(/\s+/).filter(Boolean);
|
|
108
|
+
return parts.length === 2 && parts.every((token) => PADDING_TOKEN_PATTERN.test(token));
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
message: 'Padding must be two space-separated CSS length tokens (e.g. "0.5rem 1rem"). Use `0` for zero.'
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
var buttonSizeConfigSchema = z3.object({
|
|
115
|
+
padding: paddingShorthandSchema,
|
|
116
|
+
fontSize: z3.string().optional()
|
|
117
|
+
});
|
|
118
|
+
var buttonSizesSchema = z3.object({
|
|
82
119
|
sm: buttonSizeConfigSchema,
|
|
83
120
|
md: buttonSizeConfigSchema,
|
|
84
121
|
lg: buttonSizeConfigSchema,
|
|
85
122
|
xl: buttonSizeConfigSchema.optional()
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"border-trace"
|
|
94
|
-
]);
|
|
95
|
-
var buttonGlobalSettingsSchema = z2.object({
|
|
123
|
+
}).transform(({ sm, md, lg, xl }) => ({
|
|
124
|
+
sm,
|
|
125
|
+
md,
|
|
126
|
+
lg,
|
|
127
|
+
xl: xl ?? lg
|
|
128
|
+
}));
|
|
129
|
+
var buttonGlobalSettingsSchema = z3.object({
|
|
96
130
|
cornerStyle: cornerStyleSchema,
|
|
97
|
-
cornerRadius:
|
|
131
|
+
cornerRadius: z3.number().min(0).max(24).optional(),
|
|
98
132
|
shadow: shadowSizeSchema,
|
|
99
133
|
textTransform: textTransformSchema,
|
|
100
134
|
fontWeight: fontWeightSchema,
|
|
101
|
-
|
|
102
|
-
|
|
135
|
+
/**
|
|
136
|
+
* @deprecated Set per-variant via `variant.border.widthClass` instead.
|
|
137
|
+
* Schema field is preserved so existing presets parse; the value is unread
|
|
138
|
+
* by the current generator and will be removed once the legacy
|
|
139
|
+
* `primitives/content/components/Button.tsx` slot exports are deleted.
|
|
140
|
+
*/
|
|
141
|
+
borderWidth: z3.union([z3.literal(1), z3.literal(2), z3.literal(3)]),
|
|
142
|
+
// === Family-level typography ===
|
|
143
|
+
// Typography source (body or heading) — selects which theme typography pool to inherit
|
|
103
144
|
typography: buttonTypographySchema.optional(),
|
|
145
|
+
// Font size for all variants in the family (Tailwind token, e.g. "text-xs", "text-sm")
|
|
146
|
+
// Sized variants get this as default; fixed variants inherit unless they override.
|
|
147
|
+
// Size class CSS may still override at run time for sized variants.
|
|
148
|
+
fontSize: z3.string().optional(),
|
|
149
|
+
// Letter spacing applied to all variants
|
|
150
|
+
letterSpacing: letterSpacingSchema.optional(),
|
|
104
151
|
// Italic style
|
|
105
|
-
italic:
|
|
106
|
-
// Padding preset (applies to
|
|
152
|
+
italic: z3.boolean().optional(),
|
|
153
|
+
// Padding preset (applies to sized variants without a sizes config)
|
|
107
154
|
paddingPreset: buttonPaddingPresetSchema.optional(),
|
|
108
155
|
hoverTransform: hoverTransformSchema,
|
|
109
156
|
hoverColor: hoverColorSchema,
|
|
110
157
|
// When hoverColor is 'token', this specifies which token to use
|
|
111
|
-
hoverColorToken:
|
|
158
|
+
hoverColorToken: z3.string().optional(),
|
|
112
159
|
// Gradient settings (if any variant uses gradients)
|
|
113
160
|
gradientStyle: gradientStyleSchema.optional(),
|
|
114
|
-
gradientAngle:
|
|
161
|
+
gradientAngle: z3.number().min(0).max(360).optional(),
|
|
115
162
|
gradientSharpness: gradientSharpnessSchema.optional()
|
|
116
163
|
});
|
|
117
|
-
var gradientDirectionSchema =
|
|
118
|
-
var buttonBackgroundSchema =
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
type:
|
|
122
|
-
stops:
|
|
164
|
+
var gradientDirectionSchema = z3.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
|
|
165
|
+
var buttonBackgroundSchema = z3.discriminatedUnion("type", [
|
|
166
|
+
z3.object({ type: z3.literal("solid"), colorToken: z3.string() }),
|
|
167
|
+
z3.object({
|
|
168
|
+
type: z3.literal("gradient"),
|
|
169
|
+
stops: z3.array(z3.string()).min(2),
|
|
123
170
|
direction: gradientDirectionSchema
|
|
124
171
|
}),
|
|
125
|
-
|
|
172
|
+
z3.object({ type: z3.literal("transparent") })
|
|
126
173
|
]);
|
|
127
|
-
var effectApplicationSchema =
|
|
128
|
-
effectId:
|
|
129
|
-
options:
|
|
130
|
-
});
|
|
131
|
-
var buttonBorderSchema =
|
|
132
|
-
widthClass:
|
|
133
|
-
colorToken:
|
|
134
|
-
});
|
|
135
|
-
var
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
174
|
+
var effectApplicationSchema = z3.object({
|
|
175
|
+
effectId: z3.string(),
|
|
176
|
+
options: z3.record(z3.string(), z3.any()).optional()
|
|
177
|
+
});
|
|
178
|
+
var buttonBorderSchema = z3.object({
|
|
179
|
+
widthClass: z3.string(),
|
|
180
|
+
colorToken: z3.string()
|
|
181
|
+
});
|
|
182
|
+
var variantShadowSchema = z3.object({
|
|
183
|
+
elevation: z3.enum(["none", "low", "medium", "high"]),
|
|
184
|
+
softness: z3.enum(["crisp", "soft", "hard"]).nullable(),
|
|
185
|
+
position: z3.enum(["bottom", "bottom-right"]).default("bottom")
|
|
186
|
+
});
|
|
187
|
+
var variantEffectsSchema = z3.object({
|
|
188
|
+
base: z3.array(effectApplicationSchema).optional(),
|
|
189
|
+
hover: z3.array(effectApplicationSchema).optional(),
|
|
190
|
+
active: z3.array(effectApplicationSchema).optional(),
|
|
191
|
+
focus: z3.array(effectApplicationSchema).optional()
|
|
192
|
+
});
|
|
193
|
+
var variantSizeOverridesSchema = z3.object({
|
|
194
|
+
sm: buttonSizeConfigSchema.optional(),
|
|
195
|
+
md: buttonSizeConfigSchema.optional(),
|
|
196
|
+
lg: buttonSizeConfigSchema.optional(),
|
|
197
|
+
xl: buttonSizeConfigSchema.optional()
|
|
198
|
+
});
|
|
199
|
+
var buttonVariantSchema = z3.object({
|
|
200
|
+
id: z3.string(),
|
|
201
|
+
name: z3.string().min(1).max(20),
|
|
202
|
+
enabled: z3.boolean(),
|
|
203
|
+
priority: prioritySchema,
|
|
152
204
|
// Base appearance (token-based)
|
|
153
205
|
background: buttonBackgroundSchema,
|
|
154
|
-
textColorToken:
|
|
155
|
-
|
|
206
|
+
textColorToken: z3.string(),
|
|
207
|
+
/** Tailwind radius token (e.g. `'rounded-md'`). Omit to inherit from `global.cornerStyle`. */
|
|
208
|
+
borderRadius: z3.string().optional(),
|
|
156
209
|
// Optional shadow override (uses theme.shadow if not specified)
|
|
157
|
-
shadow:
|
|
158
|
-
elevation: z2.enum(["none", "low", "medium", "high"]),
|
|
159
|
-
softness: z2.enum(["crisp", "soft", "hard"]).nullable(),
|
|
160
|
-
position: z2.enum(["bottom", "bottom-right"]).default("bottom")
|
|
161
|
-
}).optional(),
|
|
210
|
+
shadow: variantShadowSchema.optional(),
|
|
162
211
|
// Border (optional)
|
|
163
212
|
border: buttonBorderSchema.optional(),
|
|
164
|
-
// Padding (optional, defaults to "0.5rem 1rem")
|
|
165
|
-
padding: z2.string().optional(),
|
|
166
|
-
// Font size (optional, Tailwind text size class)
|
|
167
|
-
fontSize: z2.string().optional(),
|
|
168
213
|
// Hover background token (per-variant override, takes precedence over global hoverColorToken)
|
|
169
|
-
hoverBackgroundToken:
|
|
214
|
+
hoverBackgroundToken: z3.string().optional(),
|
|
170
215
|
// Effect composition
|
|
171
|
-
effects:
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
active: z2.array(effectApplicationSchema).optional(),
|
|
175
|
-
focus: z2.array(effectApplicationSchema).optional()
|
|
176
|
-
}).optional()
|
|
216
|
+
effects: variantEffectsSchema.optional(),
|
|
217
|
+
// Per-variant size overrides — see VariantSizeOverrides
|
|
218
|
+
sizes: variantSizeOverridesSchema.optional()
|
|
177
219
|
});
|
|
178
|
-
var buttonSystemSchema =
|
|
220
|
+
var buttonSystemSchema = z3.object({
|
|
179
221
|
global: buttonGlobalSettingsSchema,
|
|
180
|
-
variants:
|
|
222
|
+
variants: z3.array(buttonVariantSchema).min(1).max(6),
|
|
181
223
|
sizes: buttonSizesSchema.optional()
|
|
182
224
|
});
|
|
183
225
|
|
|
226
|
+
// ../theme-core/src/buttons/generateButtonCss.ts
|
|
227
|
+
var BUTTON_SIZE_NAMES = buttonSizeNameSchema.options;
|
|
228
|
+
|
|
229
|
+
// ../theme-core/src/buttons/personalities/types.ts
|
|
230
|
+
import { z as z4 } from "zod";
|
|
231
|
+
function asButtonPersonalityId(value) {
|
|
232
|
+
if (value.length === 0) {
|
|
233
|
+
throw new Error("ButtonPersonalityId must be a non-empty string");
|
|
234
|
+
}
|
|
235
|
+
return value;
|
|
236
|
+
}
|
|
237
|
+
var buttonPersonalityIdSchema = z4.string().min(1).transform((value) => asButtonPersonalityId(value));
|
|
238
|
+
var buttonPersonalitySchema = z4.object({
|
|
239
|
+
id: buttonPersonalityIdSchema,
|
|
240
|
+
name: z4.string().min(1),
|
|
241
|
+
description: z4.string().min(1),
|
|
242
|
+
tags: styleTagsSchema,
|
|
243
|
+
buttonSystem: buttonSystemSchema
|
|
244
|
+
});
|
|
245
|
+
function defineButtonPersonality(input) {
|
|
246
|
+
return {
|
|
247
|
+
id: asButtonPersonalityId(input.id),
|
|
248
|
+
name: input.name,
|
|
249
|
+
description: input.description,
|
|
250
|
+
tags: input.tags,
|
|
251
|
+
buttonSystem: input.buttonSystem
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// ../theme-core/src/buttons/personalities/brushed-wash.ts
|
|
256
|
+
var brushedWash = defineButtonPersonality({
|
|
257
|
+
id: "brushed-wash",
|
|
258
|
+
name: "Brushed Wash",
|
|
259
|
+
description: "Watercolour-gradient buttons with soft shadows and generous padding.",
|
|
260
|
+
tags: { tone: "classic", energy: "vibrant", motion: "standard", era: "organic" },
|
|
261
|
+
buttonSystem: {
|
|
262
|
+
global: {
|
|
263
|
+
cornerStyle: "rounded",
|
|
264
|
+
shadow: "low",
|
|
265
|
+
textTransform: "none",
|
|
266
|
+
fontWeight: 500,
|
|
267
|
+
borderWidth: 1,
|
|
268
|
+
hoverTransform: "none",
|
|
269
|
+
hoverColor: "none"
|
|
270
|
+
},
|
|
271
|
+
sizes: {
|
|
272
|
+
sm: { padding: "0.75rem 2rem", fontSize: "text-sm" },
|
|
273
|
+
md: { padding: "1rem 2.5rem" },
|
|
274
|
+
lg: { padding: "1.25rem 3rem", fontSize: "text-lg" },
|
|
275
|
+
xl: { padding: "1.625rem 3.75rem", fontSize: "text-xl" }
|
|
276
|
+
},
|
|
277
|
+
variants: [
|
|
278
|
+
{
|
|
279
|
+
id: "primary",
|
|
280
|
+
name: "Primary",
|
|
281
|
+
enabled: true,
|
|
282
|
+
priority: 1,
|
|
283
|
+
background: {
|
|
284
|
+
type: "gradient",
|
|
285
|
+
stops: ["primary", "accent"],
|
|
286
|
+
direction: "to-r"
|
|
287
|
+
},
|
|
288
|
+
textColorToken: "primaryForeground",
|
|
289
|
+
borderRadius: "rounded-lg",
|
|
290
|
+
shadow: { elevation: "low", softness: "soft", position: "bottom" },
|
|
291
|
+
effects: {
|
|
292
|
+
hover: [{ effectId: "opacity-reduce", options: { reduction: -15 } }]
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
id: "secondary",
|
|
297
|
+
name: "Secondary",
|
|
298
|
+
enabled: true,
|
|
299
|
+
priority: 2,
|
|
300
|
+
background: {
|
|
301
|
+
type: "gradient",
|
|
302
|
+
stops: ["secondary", "accent"],
|
|
303
|
+
direction: "to-br"
|
|
304
|
+
},
|
|
305
|
+
textColorToken: "primaryForeground",
|
|
306
|
+
borderRadius: "rounded-lg",
|
|
307
|
+
shadow: { elevation: "low", softness: "soft", position: "bottom" },
|
|
308
|
+
effects: {
|
|
309
|
+
hover: [{ effectId: "opacity-reduce", options: { reduction: -15 } }]
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
id: "outline",
|
|
314
|
+
name: "Outline",
|
|
315
|
+
enabled: true,
|
|
316
|
+
priority: 3,
|
|
317
|
+
background: { type: "transparent" },
|
|
318
|
+
textColorToken: "primary",
|
|
319
|
+
borderRadius: "rounded-lg",
|
|
320
|
+
border: { widthClass: "border", colorToken: "primary" },
|
|
321
|
+
effects: {
|
|
322
|
+
hover: [{ effectId: "background-on-hover", options: { colorToken: "surface" } }]
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
id: "ghost",
|
|
327
|
+
name: "Ghost",
|
|
328
|
+
enabled: true,
|
|
329
|
+
priority: 3,
|
|
330
|
+
background: { type: "transparent" },
|
|
331
|
+
textColorToken: "text",
|
|
332
|
+
borderRadius: "rounded-lg",
|
|
333
|
+
effects: {
|
|
334
|
+
hover: [
|
|
335
|
+
{ effectId: "background-on-hover", options: { colorToken: "surface" } }
|
|
336
|
+
]
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
]
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
// ../theme-core/src/buttons/personalities/confident-chip.ts
|
|
344
|
+
var confidentChip = defineButtonPersonality({
|
|
345
|
+
id: "confident-chip",
|
|
346
|
+
name: "Confident Chip",
|
|
347
|
+
description: "Mid-radius solid buttons with a crisp hover.",
|
|
348
|
+
tags: { tone: "classic", energy: "calm", motion: "standard", era: "modern" },
|
|
349
|
+
buttonSystem: {
|
|
350
|
+
global: {
|
|
351
|
+
cornerStyle: "rounded",
|
|
352
|
+
shadow: "medium",
|
|
353
|
+
textTransform: "none",
|
|
354
|
+
fontWeight: 600,
|
|
355
|
+
borderWidth: 1,
|
|
356
|
+
hoverTransform: "none",
|
|
357
|
+
hoverColor: "none"
|
|
358
|
+
},
|
|
359
|
+
variants: [
|
|
360
|
+
{
|
|
361
|
+
id: "primary",
|
|
362
|
+
name: "Primary",
|
|
363
|
+
enabled: true,
|
|
364
|
+
priority: 1,
|
|
365
|
+
background: { type: "solid", colorToken: "primary" },
|
|
366
|
+
textColorToken: "primaryForeground",
|
|
367
|
+
borderRadius: "rounded-md",
|
|
368
|
+
shadow: { elevation: "medium", softness: "soft", position: "bottom" },
|
|
369
|
+
effects: {
|
|
370
|
+
hover: [{ effectId: "darken-background", options: { amount: 60 } }],
|
|
371
|
+
active: [{ effectId: "scale-down", options: { scale: "0.97" } }]
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
id: "secondary",
|
|
376
|
+
name: "Secondary",
|
|
377
|
+
enabled: true,
|
|
378
|
+
priority: 2,
|
|
379
|
+
background: { type: "solid", colorToken: "surface" },
|
|
380
|
+
textColorToken: "text",
|
|
381
|
+
borderRadius: "rounded-md",
|
|
382
|
+
border: { widthClass: "border", colorToken: "border" },
|
|
383
|
+
effects: {
|
|
384
|
+
hover: [{ effectId: "background-on-hover", options: { colorToken: "background" } }]
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
id: "outline",
|
|
389
|
+
name: "Outline",
|
|
390
|
+
enabled: true,
|
|
391
|
+
priority: 3,
|
|
392
|
+
background: { type: "transparent" },
|
|
393
|
+
textColorToken: "primary",
|
|
394
|
+
borderRadius: "rounded-md",
|
|
395
|
+
border: { widthClass: "border", colorToken: "primary" },
|
|
396
|
+
effects: {
|
|
397
|
+
hover: [{ effectId: "background-on-hover", options: { colorToken: "surface" } }]
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
id: "ghost",
|
|
402
|
+
name: "Ghost",
|
|
403
|
+
enabled: true,
|
|
404
|
+
priority: 3,
|
|
405
|
+
background: { type: "transparent" },
|
|
406
|
+
textColorToken: "primary",
|
|
407
|
+
borderRadius: "rounded-md",
|
|
408
|
+
effects: {
|
|
409
|
+
hover: [{ effectId: "background-on-hover", options: { colorToken: "surface" } }]
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
]
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
// ../theme-core/src/buttons/personalities/editorial-link.ts
|
|
417
|
+
var editorialLink = defineButtonPersonality({
|
|
418
|
+
id: "editorial-link",
|
|
419
|
+
name: "Editorial Link",
|
|
420
|
+
description: "Link-style with a growing underline. Refined, typographic.",
|
|
421
|
+
tags: { tone: "minimal", energy: "calm", motion: "subtle", era: "editorial" },
|
|
422
|
+
buttonSystem: {
|
|
423
|
+
global: {
|
|
424
|
+
cornerStyle: "square",
|
|
425
|
+
shadow: "none",
|
|
426
|
+
textTransform: "none",
|
|
427
|
+
fontWeight: 500,
|
|
428
|
+
borderWidth: 1,
|
|
429
|
+
hoverTransform: "none",
|
|
430
|
+
hoverColor: "none"
|
|
431
|
+
},
|
|
432
|
+
variants: [
|
|
433
|
+
{
|
|
434
|
+
id: "primary",
|
|
435
|
+
name: "Primary",
|
|
436
|
+
enabled: true,
|
|
437
|
+
priority: 1,
|
|
438
|
+
background: { type: "transparent" },
|
|
439
|
+
textColorToken: "text",
|
|
440
|
+
borderRadius: "rounded-none",
|
|
441
|
+
shadow: { elevation: "none", softness: null, position: "bottom" },
|
|
442
|
+
sizes: {
|
|
443
|
+
sm: { padding: "0.25rem 0" },
|
|
444
|
+
md: { padding: "0.5rem 0" },
|
|
445
|
+
lg: { padding: "0.625rem 0" },
|
|
446
|
+
xl: { padding: "0.75rem 0" }
|
|
447
|
+
},
|
|
448
|
+
effects: {
|
|
449
|
+
base: [
|
|
450
|
+
{ effectId: "border-bottom-grow", options: { height: 2, colorToken: "text", origin: "left" } }
|
|
451
|
+
]
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
id: "secondary",
|
|
456
|
+
name: "Secondary",
|
|
457
|
+
enabled: true,
|
|
458
|
+
priority: 2,
|
|
459
|
+
background: { type: "transparent" },
|
|
460
|
+
textColorToken: "mutedText",
|
|
461
|
+
borderRadius: "rounded-none",
|
|
462
|
+
shadow: { elevation: "none", softness: null, position: "bottom" },
|
|
463
|
+
sizes: {
|
|
464
|
+
sm: { padding: "0.25rem 0" },
|
|
465
|
+
md: { padding: "0.5rem 0" },
|
|
466
|
+
lg: { padding: "0.625rem 0" },
|
|
467
|
+
xl: { padding: "0.75rem 0" }
|
|
468
|
+
},
|
|
469
|
+
effects: {
|
|
470
|
+
base: [
|
|
471
|
+
{ effectId: "border-bottom-grow", options: { height: 1, colorToken: "mutedText", origin: "left" } }
|
|
472
|
+
]
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
id: "outline",
|
|
477
|
+
name: "Outline",
|
|
478
|
+
enabled: true,
|
|
479
|
+
priority: 3,
|
|
480
|
+
background: { type: "transparent" },
|
|
481
|
+
textColorToken: "accent",
|
|
482
|
+
borderRadius: "rounded-none",
|
|
483
|
+
shadow: { elevation: "none", softness: null, position: "bottom" },
|
|
484
|
+
sizes: {
|
|
485
|
+
sm: { padding: "0.25rem 0" },
|
|
486
|
+
md: { padding: "0.5rem 0" },
|
|
487
|
+
lg: { padding: "0.625rem 0" },
|
|
488
|
+
xl: { padding: "0.75rem 0" }
|
|
489
|
+
},
|
|
490
|
+
effects: {
|
|
491
|
+
base: [
|
|
492
|
+
{ effectId: "border-bottom-grow", options: { height: 1, colorToken: "accent", origin: "left" } }
|
|
493
|
+
]
|
|
494
|
+
}
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
id: "ghost",
|
|
498
|
+
name: "Ghost",
|
|
499
|
+
enabled: true,
|
|
500
|
+
priority: 3,
|
|
501
|
+
background: { type: "transparent" },
|
|
502
|
+
textColorToken: "mutedText",
|
|
503
|
+
borderRadius: "rounded-none",
|
|
504
|
+
shadow: { elevation: "none", softness: null, position: "bottom" },
|
|
505
|
+
sizes: {
|
|
506
|
+
sm: { padding: "0.25rem 0" },
|
|
507
|
+
md: { padding: "0.5rem 0" },
|
|
508
|
+
lg: { padding: "0.625rem 0" },
|
|
509
|
+
xl: { padding: "0.75rem 0" }
|
|
510
|
+
},
|
|
511
|
+
effects: {
|
|
512
|
+
hover: [{ effectId: "opacity-reduce", options: { reduction: -20 } }]
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
]
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
|
|
519
|
+
// ../theme-core/src/buttons/personalities/ink-stamp.ts
|
|
520
|
+
var inkStamp = defineButtonPersonality({
|
|
521
|
+
id: "ink-stamp",
|
|
522
|
+
name: "Ink Stamp",
|
|
523
|
+
description: "Hand-stamped block-print buttons with a slight lift on hover.",
|
|
524
|
+
tags: { tone: "bold", energy: "vibrant", motion: "standard", era: "organic" },
|
|
525
|
+
buttonSystem: {
|
|
526
|
+
global: {
|
|
527
|
+
cornerStyle: "rounded",
|
|
528
|
+
shadow: "none",
|
|
529
|
+
textTransform: "uppercase",
|
|
530
|
+
fontWeight: 600,
|
|
531
|
+
borderWidth: 1,
|
|
532
|
+
hoverTransform: "none",
|
|
533
|
+
hoverColor: "none",
|
|
534
|
+
letterSpacing: "loose"
|
|
535
|
+
},
|
|
536
|
+
sizes: {
|
|
537
|
+
sm: { padding: "0.5rem 1.25rem", fontSize: "text-xs" },
|
|
538
|
+
md: { padding: "0.75rem 1.75rem", fontSize: "text-sm" },
|
|
539
|
+
lg: { padding: "0.875rem 2.25rem", fontSize: "text-base" },
|
|
540
|
+
xl: { padding: "1.125rem 2.75rem", fontSize: "text-lg" }
|
|
541
|
+
},
|
|
542
|
+
variants: [
|
|
543
|
+
{
|
|
544
|
+
id: "primary",
|
|
545
|
+
name: "Primary",
|
|
546
|
+
enabled: true,
|
|
547
|
+
priority: 1,
|
|
548
|
+
background: { type: "solid", colorToken: "primary" },
|
|
549
|
+
textColorToken: "primaryForeground",
|
|
550
|
+
borderRadius: "rounded-md",
|
|
551
|
+
effects: {
|
|
552
|
+
hover: [
|
|
553
|
+
{ effectId: "drop-shadow", options: { intensity: "medium" } },
|
|
554
|
+
{ effectId: "scale-up", options: { scale: "1.02" } }
|
|
555
|
+
],
|
|
556
|
+
active: [{ effectId: "scale-down", options: { scale: "0.98" } }]
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
id: "secondary",
|
|
561
|
+
name: "Secondary",
|
|
562
|
+
enabled: true,
|
|
563
|
+
priority: 2,
|
|
564
|
+
background: { type: "transparent" },
|
|
565
|
+
textColorToken: "primary",
|
|
566
|
+
borderRadius: "rounded-md",
|
|
567
|
+
border: { widthClass: "border-2", colorToken: "primary" },
|
|
568
|
+
effects: {
|
|
569
|
+
hover: [{ effectId: "background-on-hover", options: { colorToken: "surface" } }]
|
|
570
|
+
}
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
id: "outline",
|
|
574
|
+
name: "Outline",
|
|
575
|
+
enabled: true,
|
|
576
|
+
priority: 3,
|
|
577
|
+
background: { type: "transparent" },
|
|
578
|
+
textColorToken: "text",
|
|
579
|
+
borderRadius: "rounded-md",
|
|
580
|
+
border: { widthClass: "border-2", colorToken: "border" },
|
|
581
|
+
effects: {
|
|
582
|
+
hover: [{ effectId: "background-on-hover", options: { colorToken: "surface" } }]
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
id: "ghost",
|
|
587
|
+
name: "Ghost",
|
|
588
|
+
enabled: true,
|
|
589
|
+
priority: 3,
|
|
590
|
+
background: { type: "transparent" },
|
|
591
|
+
textColorToken: "accent",
|
|
592
|
+
borderRadius: "rounded-none",
|
|
593
|
+
sizes: {
|
|
594
|
+
sm: { padding: "0.375rem 0", fontSize: "text-xs" },
|
|
595
|
+
md: { padding: "0.5rem 0", fontSize: "text-sm" },
|
|
596
|
+
lg: { padding: "0.625rem 0", fontSize: "text-base" },
|
|
597
|
+
xl: { padding: "0.75rem 0", fontSize: "text-lg" }
|
|
598
|
+
},
|
|
599
|
+
effects: {
|
|
600
|
+
base: [{ effectId: "border-bottom-grow", options: { height: 1, colorToken: "accent", origin: "left" } }]
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
]
|
|
604
|
+
}
|
|
605
|
+
});
|
|
606
|
+
|
|
607
|
+
// ../theme-core/src/buttons/personalities/pebble.ts
|
|
608
|
+
var pebble = defineButtonPersonality({
|
|
609
|
+
id: "pebble",
|
|
610
|
+
name: "Pebble",
|
|
611
|
+
description: "Generous pill buttons with a soft hover lift.",
|
|
612
|
+
tags: { tone: "classic", energy: "calm", motion: "standard", era: "organic" },
|
|
613
|
+
buttonSystem: {
|
|
614
|
+
global: {
|
|
615
|
+
cornerStyle: "pill",
|
|
616
|
+
shadow: "none",
|
|
617
|
+
textTransform: "none",
|
|
618
|
+
fontWeight: 500,
|
|
619
|
+
borderWidth: 2,
|
|
620
|
+
hoverTransform: "none",
|
|
621
|
+
hoverColor: "none"
|
|
622
|
+
},
|
|
623
|
+
sizes: {
|
|
624
|
+
sm: { padding: "0.625rem 1.75rem", fontSize: "text-sm" },
|
|
625
|
+
md: { padding: "0.875rem 2.25rem" },
|
|
626
|
+
lg: { padding: "1.125rem 2.75rem", fontSize: "text-lg" },
|
|
627
|
+
xl: { padding: "1.5rem 3.5rem", fontSize: "text-xl" }
|
|
628
|
+
},
|
|
629
|
+
variants: [
|
|
630
|
+
{
|
|
631
|
+
id: "primary",
|
|
632
|
+
name: "Primary",
|
|
633
|
+
enabled: true,
|
|
634
|
+
priority: 1,
|
|
635
|
+
background: { type: "solid", colorToken: "primary" },
|
|
636
|
+
textColorToken: "primaryForeground",
|
|
637
|
+
borderRadius: "rounded-full",
|
|
638
|
+
effects: {
|
|
639
|
+
hover: [
|
|
640
|
+
{ effectId: "scale-up", options: { scale: "1.03" } },
|
|
641
|
+
{ effectId: "drop-shadow", options: { intensity: "medium" } }
|
|
642
|
+
]
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
id: "secondary",
|
|
647
|
+
name: "Secondary",
|
|
648
|
+
enabled: true,
|
|
649
|
+
priority: 2,
|
|
650
|
+
background: { type: "transparent" },
|
|
651
|
+
textColorToken: "primary",
|
|
652
|
+
borderRadius: "rounded-full",
|
|
653
|
+
border: { widthClass: "border-2", colorToken: "accent" },
|
|
654
|
+
effects: {
|
|
655
|
+
hover: [{ effectId: "background-on-hover", options: { colorToken: "accent" } }]
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
id: "outline",
|
|
660
|
+
name: "Outline",
|
|
661
|
+
enabled: true,
|
|
662
|
+
priority: 3,
|
|
663
|
+
background: { type: "transparent" },
|
|
664
|
+
textColorToken: "text",
|
|
665
|
+
borderRadius: "rounded-full",
|
|
666
|
+
border: { widthClass: "border", colorToken: "border" },
|
|
667
|
+
effects: {
|
|
668
|
+
hover: [{ effectId: "background-on-hover", options: { colorToken: "surface" } }]
|
|
669
|
+
}
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
id: "ghost",
|
|
673
|
+
name: "Ghost",
|
|
674
|
+
enabled: true,
|
|
675
|
+
priority: 3,
|
|
676
|
+
background: { type: "transparent" },
|
|
677
|
+
textColorToken: "primary",
|
|
678
|
+
borderRadius: "rounded-full",
|
|
679
|
+
sizes: {
|
|
680
|
+
sm: { padding: "0.375rem 0.875rem", fontSize: "text-sm" },
|
|
681
|
+
md: { padding: "0.5rem 1rem" },
|
|
682
|
+
lg: { padding: "0.625rem 1.25rem", fontSize: "text-lg" },
|
|
683
|
+
xl: { padding: "0.75rem 1.5rem", fontSize: "text-xl" }
|
|
684
|
+
},
|
|
685
|
+
effects: {
|
|
686
|
+
hover: [{ effectId: "opacity-reduce", options: { reduction: 30 } }]
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
]
|
|
690
|
+
}
|
|
691
|
+
});
|
|
692
|
+
|
|
693
|
+
// ../theme-core/src/buttons/personalities/soft-pill.ts
|
|
694
|
+
var softPill = defineButtonPersonality({
|
|
695
|
+
id: "soft-pill",
|
|
696
|
+
name: "Soft Pill",
|
|
697
|
+
description: "Rounded pills with a gentle lift on hover. Quietly modern.",
|
|
698
|
+
tags: { tone: "classic", energy: "calm", motion: "subtle", era: "organic" },
|
|
699
|
+
buttonSystem: {
|
|
700
|
+
global: {
|
|
701
|
+
cornerStyle: "pill",
|
|
702
|
+
shadow: "low",
|
|
703
|
+
textTransform: "none",
|
|
704
|
+
fontWeight: 500,
|
|
705
|
+
borderWidth: 2,
|
|
706
|
+
hoverTransform: "lift",
|
|
707
|
+
hoverColor: "none"
|
|
708
|
+
},
|
|
709
|
+
variants: [
|
|
710
|
+
{
|
|
711
|
+
id: "primary",
|
|
712
|
+
name: "Primary",
|
|
713
|
+
enabled: true,
|
|
714
|
+
priority: 1,
|
|
715
|
+
background: { type: "solid", colorToken: "primary" },
|
|
716
|
+
textColorToken: "primaryForeground",
|
|
717
|
+
borderRadius: "rounded-full",
|
|
718
|
+
shadow: { elevation: "low", softness: "soft", position: "bottom" },
|
|
719
|
+
effects: {
|
|
720
|
+
hover: [{ effectId: "lift", options: { translateY: "-1px" } }],
|
|
721
|
+
active: [{ effectId: "scale-down", options: { scale: "0.98" } }]
|
|
722
|
+
}
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
id: "secondary",
|
|
726
|
+
name: "Secondary",
|
|
727
|
+
enabled: true,
|
|
728
|
+
priority: 2,
|
|
729
|
+
background: { type: "transparent" },
|
|
730
|
+
textColorToken: "primary",
|
|
731
|
+
borderRadius: "rounded-full",
|
|
732
|
+
border: { widthClass: "border-2", colorToken: "primary" },
|
|
733
|
+
effects: {
|
|
734
|
+
hover: [{ effectId: "background-on-hover", options: { colorToken: "surface" } }]
|
|
735
|
+
}
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
id: "outline",
|
|
739
|
+
name: "Outline",
|
|
740
|
+
enabled: true,
|
|
741
|
+
priority: 3,
|
|
742
|
+
background: { type: "transparent" },
|
|
743
|
+
textColorToken: "text",
|
|
744
|
+
borderRadius: "rounded-full",
|
|
745
|
+
border: { widthClass: "border", colorToken: "border" },
|
|
746
|
+
effects: {
|
|
747
|
+
hover: [{ effectId: "background-on-hover", options: { colorToken: "surface" } }]
|
|
748
|
+
}
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
id: "ghost",
|
|
752
|
+
name: "Ghost",
|
|
753
|
+
enabled: true,
|
|
754
|
+
priority: 3,
|
|
755
|
+
background: { type: "transparent" },
|
|
756
|
+
textColorToken: "text",
|
|
757
|
+
borderRadius: "rounded-full",
|
|
758
|
+
effects: {
|
|
759
|
+
hover: [{ effectId: "background-on-hover", options: { colorToken: "surface" } }]
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
]
|
|
763
|
+
}
|
|
764
|
+
});
|
|
765
|
+
|
|
766
|
+
// ../theme-core/src/buttons/personalities/index.ts
|
|
767
|
+
var buttonPersonalities = [
|
|
768
|
+
softPill,
|
|
769
|
+
confidentChip,
|
|
770
|
+
editorialLink,
|
|
771
|
+
pebble,
|
|
772
|
+
inkStamp,
|
|
773
|
+
brushedWash
|
|
774
|
+
];
|
|
775
|
+
var personalitiesById = new Map(
|
|
776
|
+
buttonPersonalities.map((p) => [p.id, p])
|
|
777
|
+
);
|
|
778
|
+
|
|
184
779
|
// ../theme-core/src/cards/types.ts
|
|
185
|
-
import { z as
|
|
186
|
-
var cardSpacingSchema =
|
|
187
|
-
var gradientDirectionSchema2 =
|
|
188
|
-
var cardBackgroundSchema =
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
type:
|
|
192
|
-
fromToken:
|
|
193
|
-
toToken:
|
|
780
|
+
import { z as z5 } from "zod";
|
|
781
|
+
var cardSpacingSchema = z5.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]);
|
|
782
|
+
var gradientDirectionSchema2 = z5.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
|
|
783
|
+
var cardBackgroundSchema = z5.discriminatedUnion("type", [
|
|
784
|
+
z5.object({ type: z5.literal("solid"), colorToken: z5.string() }),
|
|
785
|
+
z5.object({
|
|
786
|
+
type: z5.literal("gradient"),
|
|
787
|
+
fromToken: z5.string(),
|
|
788
|
+
toToken: z5.string(),
|
|
194
789
|
direction: gradientDirectionSchema2
|
|
195
790
|
}),
|
|
196
|
-
|
|
791
|
+
z5.object({ type: z5.literal("transparent") })
|
|
197
792
|
]);
|
|
198
|
-
var cardBorderSchema =
|
|
199
|
-
widthClass:
|
|
200
|
-
colorToken:
|
|
201
|
-
});
|
|
202
|
-
var cardVariantSchema =
|
|
203
|
-
id:
|
|
204
|
-
name:
|
|
205
|
-
enabled:
|
|
206
|
-
priority:
|
|
793
|
+
var cardBorderSchema = z5.object({
|
|
794
|
+
widthClass: z5.string(),
|
|
795
|
+
colorToken: z5.string()
|
|
796
|
+
});
|
|
797
|
+
var cardVariantSchema = z5.object({
|
|
798
|
+
id: z5.string(),
|
|
799
|
+
name: z5.string().min(1).max(20),
|
|
800
|
+
enabled: z5.boolean(),
|
|
801
|
+
priority: z5.union([z5.literal(1), z5.literal(2), z5.literal(3)]),
|
|
207
802
|
// Appearance (token-based)
|
|
208
803
|
background: cardBackgroundSchema,
|
|
209
804
|
spacing: cardSpacingSchema,
|
|
210
805
|
// Optional overrides (uses theme defaults if not specified)
|
|
211
|
-
shadow:
|
|
212
|
-
elevation:
|
|
213
|
-
softness:
|
|
214
|
-
position:
|
|
806
|
+
shadow: z5.object({
|
|
807
|
+
elevation: z5.enum(["none", "low", "medium", "high"]),
|
|
808
|
+
softness: z5.enum(["crisp", "soft", "hard"]).nullable(),
|
|
809
|
+
position: z5.enum(["bottom", "bottom-right"]).default("bottom")
|
|
215
810
|
}).optional(),
|
|
216
|
-
corners:
|
|
811
|
+
corners: z5.enum(["square", "soft", "rounded", "pill"]).optional(),
|
|
217
812
|
// Border (optional)
|
|
218
813
|
border: cardBorderSchema.optional()
|
|
219
814
|
});
|
|
220
|
-
var cardSystemSchema =
|
|
221
|
-
variants:
|
|
815
|
+
var cardSystemSchema = z5.object({
|
|
816
|
+
variants: z5.array(cardVariantSchema).min(1).max(3)
|
|
222
817
|
});
|
|
223
818
|
|
|
224
819
|
// ../theme-core/src/accordions/types.ts
|
|
225
|
-
import { z as
|
|
226
|
-
var accordionIconSchema =
|
|
820
|
+
import { z as z6 } from "zod";
|
|
821
|
+
var accordionIconSchema = z6.enum([
|
|
227
822
|
"plus-minus",
|
|
228
823
|
// + becomes - (swap or rotate 90°)
|
|
229
824
|
"chevron",
|
|
@@ -235,180 +830,180 @@ var accordionIconSchema = z4.enum([
|
|
|
235
830
|
"circle-plus-minus"
|
|
236
831
|
// ⊕ becomes ⊖ (swap with fade)
|
|
237
832
|
]);
|
|
238
|
-
var accordionSystemSchema =
|
|
833
|
+
var accordionSystemSchema = z6.object({
|
|
239
834
|
// Visual styling (solid color only - gradients can be added later if needed)
|
|
240
|
-
background:
|
|
241
|
-
type:
|
|
242
|
-
colorToken:
|
|
835
|
+
background: z6.object({
|
|
836
|
+
type: z6.literal("solid"),
|
|
837
|
+
colorToken: z6.string()
|
|
243
838
|
}),
|
|
244
839
|
// Spacing (padding inside items)
|
|
245
|
-
spacing:
|
|
840
|
+
spacing: z6.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]),
|
|
246
841
|
// Border radius (null = inherit from theme.corners)
|
|
247
|
-
corners:
|
|
842
|
+
corners: z6.enum(["square", "soft", "rounded", "pill"]).nullable(),
|
|
248
843
|
// Border styling (null = inherit from theme.border)
|
|
249
|
-
border:
|
|
250
|
-
widthClass:
|
|
844
|
+
border: z6.object({
|
|
845
|
+
widthClass: z6.string(),
|
|
251
846
|
// e.g., 'border', 'border-2', 'border-0'
|
|
252
|
-
colorToken:
|
|
847
|
+
colorToken: z6.string()
|
|
253
848
|
}).nullable(),
|
|
254
849
|
// Shadow (null = inherit from theme.shadow)
|
|
255
|
-
shadow:
|
|
256
|
-
elevation:
|
|
257
|
-
softness:
|
|
258
|
-
position:
|
|
850
|
+
shadow: z6.object({
|
|
851
|
+
elevation: z6.enum(["none", "low", "medium", "high"]),
|
|
852
|
+
softness: z6.enum(["soft", "crisp", "hard"]).nullable(),
|
|
853
|
+
position: z6.enum(["bottom", "bottom-right"])
|
|
259
854
|
}).nullable(),
|
|
260
855
|
// Icon style and animation
|
|
261
|
-
icon:
|
|
856
|
+
icon: z6.object({
|
|
262
857
|
style: accordionIconSchema,
|
|
263
|
-
position:
|
|
264
|
-
size:
|
|
858
|
+
position: z6.enum(["left", "right"]),
|
|
859
|
+
size: z6.enum(["sm", "md", "lg"])
|
|
265
860
|
}),
|
|
266
861
|
// Trigger (question) styling
|
|
267
|
-
trigger:
|
|
268
|
-
textColorToken:
|
|
269
|
-
fontWeight:
|
|
862
|
+
trigger: z6.object({
|
|
863
|
+
textColorToken: z6.string(),
|
|
864
|
+
fontWeight: z6.enum(["regular", "medium", "semibold", "bold"]).nullable()
|
|
270
865
|
// null = inherit from theme
|
|
271
866
|
}),
|
|
272
867
|
// Hover state styling
|
|
273
|
-
hover:
|
|
274
|
-
backgroundColorToken:
|
|
275
|
-
textColorToken:
|
|
276
|
-
borderColorToken:
|
|
868
|
+
hover: z6.object({
|
|
869
|
+
backgroundColorToken: z6.string().optional(),
|
|
870
|
+
textColorToken: z6.string().optional(),
|
|
871
|
+
borderColorToken: z6.string().optional()
|
|
277
872
|
}),
|
|
278
873
|
// Content (answer) styling
|
|
279
|
-
content:
|
|
280
|
-
textColorToken:
|
|
874
|
+
content: z6.object({
|
|
875
|
+
textColorToken: z6.string()
|
|
281
876
|
})
|
|
282
877
|
});
|
|
283
878
|
|
|
284
879
|
// ../theme-core/src/inputs/types.ts
|
|
285
|
-
import { z as
|
|
286
|
-
var inputSystemSchema =
|
|
880
|
+
import { z as z7 } from "zod";
|
|
881
|
+
var inputSystemSchema = z7.object({
|
|
287
882
|
// Base styling (applied to all inputs)
|
|
288
|
-
base:
|
|
289
|
-
background:
|
|
290
|
-
|
|
291
|
-
type:
|
|
292
|
-
colorToken:
|
|
883
|
+
base: z7.object({
|
|
884
|
+
background: z7.union([
|
|
885
|
+
z7.object({
|
|
886
|
+
type: z7.literal("solid"),
|
|
887
|
+
colorToken: z7.string()
|
|
293
888
|
}),
|
|
294
|
-
|
|
295
|
-
type:
|
|
889
|
+
z7.object({
|
|
890
|
+
type: z7.literal("transparent")
|
|
296
891
|
})
|
|
297
892
|
]),
|
|
298
|
-
textColorToken:
|
|
299
|
-
border:
|
|
300
|
-
widthClass:
|
|
893
|
+
textColorToken: z7.string(),
|
|
894
|
+
border: z7.object({
|
|
895
|
+
widthClass: z7.string(),
|
|
301
896
|
// e.g., 'border', 'border-2'
|
|
302
|
-
colorToken:
|
|
303
|
-
style:
|
|
897
|
+
colorToken: z7.string(),
|
|
898
|
+
style: z7.enum(["all", "underline"]).optional()
|
|
304
899
|
}),
|
|
305
|
-
corners:
|
|
900
|
+
corners: z7.enum(["square", "soft", "rounded", "pill"]).nullable(),
|
|
306
901
|
// null = inherit from theme.corners
|
|
307
|
-
shadow:
|
|
308
|
-
elevation:
|
|
309
|
-
softness:
|
|
902
|
+
shadow: z7.object({
|
|
903
|
+
elevation: z7.enum(["none", "low", "medium"]),
|
|
904
|
+
softness: z7.enum(["soft", "crisp", "hard"]).nullable()
|
|
310
905
|
}).nullable(),
|
|
311
|
-
spacing:
|
|
906
|
+
spacing: z7.enum(["compact", "cozy", "medium", "comfortable"]),
|
|
312
907
|
// padding inside inputs
|
|
313
|
-
fontSize:
|
|
908
|
+
fontSize: z7.enum(["sm", "base", "lg"])
|
|
314
909
|
}),
|
|
315
910
|
// Label styling
|
|
316
|
-
label:
|
|
317
|
-
textColorToken:
|
|
318
|
-
fontWeight:
|
|
319
|
-
fontSize:
|
|
320
|
-
textTransform:
|
|
321
|
-
letterSpacing:
|
|
322
|
-
opacity:
|
|
911
|
+
label: z7.object({
|
|
912
|
+
textColorToken: z7.string(),
|
|
913
|
+
fontWeight: z7.enum(["regular", "medium", "semibold", "bold", "black"]),
|
|
914
|
+
fontSize: z7.enum(["2xs", "xs", "sm", "base"]),
|
|
915
|
+
textTransform: z7.enum(["none", "uppercase", "lowercase", "capitalize"]).optional(),
|
|
916
|
+
letterSpacing: z7.enum(["normal", "wide", "wider", "widest"]).optional(),
|
|
917
|
+
opacity: z7.number().min(0.2).max(1).optional()
|
|
323
918
|
}),
|
|
324
919
|
// Focus state
|
|
325
|
-
focus:
|
|
326
|
-
ringColorToken:
|
|
327
|
-
ringWidth:
|
|
328
|
-
borderColorToken:
|
|
920
|
+
focus: z7.object({
|
|
921
|
+
ringColorToken: z7.string(),
|
|
922
|
+
ringWidth: z7.enum(["0", "1", "2", "3"]),
|
|
923
|
+
borderColorToken: z7.string().optional()
|
|
329
924
|
// Change border color on focus
|
|
330
925
|
}),
|
|
331
926
|
// Error state (for validation feedback)
|
|
332
|
-
error:
|
|
333
|
-
borderColorToken:
|
|
334
|
-
textColorToken:
|
|
927
|
+
error: z7.object({
|
|
928
|
+
borderColorToken: z7.string(),
|
|
929
|
+
textColorToken: z7.string()
|
|
335
930
|
}),
|
|
336
931
|
// Disabled state
|
|
337
|
-
disabled:
|
|
338
|
-
backgroundColorToken:
|
|
339
|
-
textColorToken:
|
|
340
|
-
opacity:
|
|
932
|
+
disabled: z7.object({
|
|
933
|
+
backgroundColorToken: z7.string(),
|
|
934
|
+
textColorToken: z7.string(),
|
|
935
|
+
opacity: z7.number().min(0.3).max(0.7)
|
|
341
936
|
})
|
|
342
937
|
});
|
|
343
938
|
|
|
344
939
|
// ../theme-core/src/gradients/types.ts
|
|
345
|
-
import { z as
|
|
346
|
-
var gradientStopSchema =
|
|
347
|
-
color:
|
|
940
|
+
import { z as z8 } from "zod";
|
|
941
|
+
var gradientStopSchema = z8.object({
|
|
942
|
+
color: z8.string(),
|
|
348
943
|
// Theme color token name (e.g., 'primary-500')
|
|
349
|
-
position:
|
|
944
|
+
position: z8.number().min(0).max(100)
|
|
350
945
|
// Percentage 0-100
|
|
351
946
|
});
|
|
352
|
-
var gradientConfigSchema =
|
|
353
|
-
type:
|
|
354
|
-
angle:
|
|
947
|
+
var gradientConfigSchema = z8.object({
|
|
948
|
+
type: z8.enum(["linear", "radial"]),
|
|
949
|
+
angle: z8.number().min(0).max(360).optional(),
|
|
355
950
|
// For linear gradients (degrees)
|
|
356
|
-
position:
|
|
951
|
+
position: z8.string().optional(),
|
|
357
952
|
// For radial gradients ('center', 'top left', etc.)
|
|
358
|
-
stops:
|
|
953
|
+
stops: z8.array(gradientStopSchema).min(2)
|
|
359
954
|
});
|
|
360
955
|
|
|
361
956
|
// ../theme-core/src/navigation/types.ts
|
|
362
|
-
import { z as
|
|
957
|
+
import { z as z10 } from "zod";
|
|
363
958
|
|
|
364
959
|
// ../theme-core/src/interactive/baseSchema.ts
|
|
365
|
-
import { z as
|
|
366
|
-
var interactiveTypographySchema =
|
|
960
|
+
import { z as z9 } from "zod";
|
|
961
|
+
var interactiveTypographySchema = z9.object({
|
|
367
962
|
/** Font family source */
|
|
368
|
-
typography:
|
|
963
|
+
typography: z9.enum(["body", "heading"]).default("body"),
|
|
369
964
|
/** Font weight */
|
|
370
|
-
fontWeight:
|
|
965
|
+
fontWeight: z9.enum(["regular", "medium", "semibold", "bold"]).default("medium"),
|
|
371
966
|
/** Text transform */
|
|
372
|
-
textTransform:
|
|
967
|
+
textTransform: z9.enum(["none", "uppercase", "capitalize"]).default("none"),
|
|
373
968
|
/** Italic style */
|
|
374
|
-
italic:
|
|
969
|
+
italic: z9.boolean().default(false)
|
|
375
970
|
});
|
|
376
|
-
var effectApplicationSchema2 =
|
|
971
|
+
var effectApplicationSchema2 = z9.object({
|
|
377
972
|
/** Effect preset ID */
|
|
378
|
-
effectId:
|
|
973
|
+
effectId: z9.string(),
|
|
379
974
|
/** User-provided customization options */
|
|
380
|
-
options:
|
|
975
|
+
options: z9.record(z9.string(), z9.any()).optional()
|
|
381
976
|
});
|
|
382
|
-
var effectCompositionSchema =
|
|
977
|
+
var effectCompositionSchema = z9.object({
|
|
383
978
|
/** Effects always applied */
|
|
384
|
-
base:
|
|
979
|
+
base: z9.array(effectApplicationSchema2).optional(),
|
|
385
980
|
/** Effects applied on hover */
|
|
386
|
-
hover:
|
|
981
|
+
hover: z9.array(effectApplicationSchema2).optional(),
|
|
387
982
|
/** Effects applied on active/pressed */
|
|
388
|
-
active:
|
|
983
|
+
active: z9.array(effectApplicationSchema2).optional(),
|
|
389
984
|
/** Effects applied on focus */
|
|
390
|
-
focus:
|
|
985
|
+
focus: z9.array(effectApplicationSchema2).optional()
|
|
391
986
|
});
|
|
392
987
|
|
|
393
988
|
// ../theme-core/src/navigation/types.ts
|
|
394
|
-
var navLinkPaddingSchema =
|
|
395
|
-
var navLinkPaddingXSchema =
|
|
396
|
-
var navLinkBorderRadiusSchema =
|
|
397
|
-
var navLinkTextSizeSchema =
|
|
398
|
-
var navLinkLetterSpacingSchema =
|
|
399
|
-
var navLinkStyleSchema =
|
|
989
|
+
var navLinkPaddingSchema = z10.enum(["none", "compact", "default"]);
|
|
990
|
+
var navLinkPaddingXSchema = z10.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
|
|
991
|
+
var navLinkBorderRadiusSchema = z10.enum(["none", "sm", "md", "full"]);
|
|
992
|
+
var navLinkTextSizeSchema = z10.enum(["xs", "sm", "base", "lg"]);
|
|
993
|
+
var navLinkLetterSpacingSchema = z10.enum(["normal", "wide", "wider", "widest"]);
|
|
994
|
+
var navLinkStyleSchema = z10.object({
|
|
400
995
|
/** Display name for the style */
|
|
401
|
-
name:
|
|
996
|
+
name: z10.string().min(1).max(30).optional(),
|
|
402
997
|
/** Typography settings (inherited from interactive base) */
|
|
403
998
|
...interactiveTypographySchema.shape,
|
|
404
999
|
/** Text color token */
|
|
405
|
-
colorToken:
|
|
1000
|
+
colorToken: z10.string().default("text"),
|
|
406
1001
|
/** Optional text size override */
|
|
407
1002
|
textSize: navLinkTextSizeSchema.optional(),
|
|
408
1003
|
/** Optional letter spacing override */
|
|
409
1004
|
letterSpacing: navLinkLetterSpacingSchema.optional(),
|
|
410
1005
|
/** Hover/active color token (for color-change effects) */
|
|
411
|
-
hoverColorToken:
|
|
1006
|
+
hoverColorToken: z10.string().nullable().optional(),
|
|
412
1007
|
/** Padding preset */
|
|
413
1008
|
padding: navLinkPaddingSchema.default("compact"),
|
|
414
1009
|
/** Horizontal padding override (overrides horizontal component of padding preset) */
|
|
@@ -420,7 +1015,7 @@ var navLinkStyleSchema = z8.object({
|
|
|
420
1015
|
});
|
|
421
1016
|
|
|
422
1017
|
// ../theme-core/src/customCss/validation.ts
|
|
423
|
-
import { z as
|
|
1018
|
+
import { z as z11 } from "zod";
|
|
424
1019
|
var FORBIDDEN_SELECTORS = [":root", "html", "body"];
|
|
425
1020
|
var UNIVERSAL_SELECTOR = "*";
|
|
426
1021
|
var REMOTE_URL_PATTERN = /url\s*\(\s*['"]?(https?:|\/\/)/i;
|
|
@@ -462,7 +1057,7 @@ function containsForbiddenSelector(selector) {
|
|
|
462
1057
|
}
|
|
463
1058
|
return false;
|
|
464
1059
|
}
|
|
465
|
-
var selectorSchema =
|
|
1060
|
+
var selectorSchema = z11.string().min(1, "Selector cannot be empty").max(200, "Selector too long (max 200 characters)").refine(
|
|
466
1061
|
(s) => !containsForbiddenSelector(s),
|
|
467
1062
|
{ message: "Global selectors (:root, html, body, *) are not allowed" }
|
|
468
1063
|
);
|
|
@@ -472,38 +1067,38 @@ function containsRemoteUrl(value) {
|
|
|
472
1067
|
function containsJavascriptUrl(value) {
|
|
473
1068
|
return JAVASCRIPT_URL_PATTERN.test(value);
|
|
474
1069
|
}
|
|
475
|
-
var declarationValueSchema =
|
|
1070
|
+
var declarationValueSchema = z11.string().max(500, "Declaration value too long (max 500 characters)").refine(
|
|
476
1071
|
(v) => !containsRemoteUrl(v),
|
|
477
1072
|
{ message: "Remote url() references are not allowed. Use local paths, data URIs, or fragment IDs." }
|
|
478
1073
|
).refine(
|
|
479
1074
|
(v) => !containsJavascriptUrl(v),
|
|
480
1075
|
{ message: "javascript: URLs are not allowed" }
|
|
481
1076
|
);
|
|
482
|
-
var declarationsSchema =
|
|
483
|
-
|
|
1077
|
+
var declarationsSchema = z11.record(
|
|
1078
|
+
z11.string().min(1).max(100),
|
|
484
1079
|
// property name
|
|
485
1080
|
declarationValueSchema
|
|
486
1081
|
// property value
|
|
487
1082
|
);
|
|
488
|
-
var customCssRuleSchema =
|
|
489
|
-
id:
|
|
1083
|
+
var customCssRuleSchema = z11.object({
|
|
1084
|
+
id: z11.string().min(1, "Rule ID is required").max(50, "Rule ID too long"),
|
|
490
1085
|
selector: selectorSchema,
|
|
491
1086
|
declarations: declarationsSchema
|
|
492
1087
|
});
|
|
493
1088
|
var blockCustomCssRuleSchema = customCssRuleSchema.extend({
|
|
494
|
-
blockKind:
|
|
1089
|
+
blockKind: z11.string().min(1, "Block kind is required").max(50, "Block kind too long")
|
|
495
1090
|
});
|
|
496
|
-
var customCssRulesSchema =
|
|
497
|
-
var blockCustomCssRulesSchema =
|
|
1091
|
+
var customCssRulesSchema = z11.array(customCssRuleSchema).optional();
|
|
1092
|
+
var blockCustomCssRulesSchema = z11.array(blockCustomCssRuleSchema).optional();
|
|
498
1093
|
|
|
499
1094
|
// ../theme-core/src/customCss/atRuleValidation.ts
|
|
500
|
-
import { z as
|
|
1095
|
+
import { z as z12 } from "zod";
|
|
501
1096
|
var KEYFRAME_OFFSET_PATTERN = /^(from|to|\d{1,3}%)$/i;
|
|
502
1097
|
var ANIMATION_NAME_PATTERN = /^[a-zA-Z_-][a-zA-Z0-9_-]*$/;
|
|
503
1098
|
var BLOCKED_AT_RULES = ["@import", "@charset"];
|
|
504
1099
|
var BLOCKED_AT_RULE_PATTERN = /@(?:import|charset)\b/i;
|
|
505
|
-
var ruleIdSchema =
|
|
506
|
-
var nestedRuleSchema =
|
|
1100
|
+
var ruleIdSchema = z12.string().min(1, "Rule ID is required").max(50, "Rule ID too long");
|
|
1101
|
+
var nestedRuleSchema = z12.object({
|
|
507
1102
|
selector: selectorSchema,
|
|
508
1103
|
declarations: declarationsSchema
|
|
509
1104
|
});
|
|
@@ -515,146 +1110,146 @@ function isValidKeyframeOffset(offset) {
|
|
|
515
1110
|
const value = parseInt(match[1], 10);
|
|
516
1111
|
return value >= 0 && value <= 100;
|
|
517
1112
|
}
|
|
518
|
-
var keyframeOffsetSchema =
|
|
1113
|
+
var keyframeOffsetSchema = z12.string().transform((offset) => offset.trim()).refine(
|
|
519
1114
|
(offset) => KEYFRAME_OFFSET_PATTERN.test(offset),
|
|
520
1115
|
{ message: 'Invalid keyframe offset. Use percentages (0%, 50%, 100%) or "from"/"to"' }
|
|
521
1116
|
).refine(
|
|
522
1117
|
isValidKeyframeOffset,
|
|
523
1118
|
{ message: "Keyframe offset must be between 0% and 100%" }
|
|
524
1119
|
);
|
|
525
|
-
var animationNameSchema =
|
|
1120
|
+
var animationNameSchema = z12.string().min(1, "Animation name is required").max(50, "Animation name too long").refine(
|
|
526
1121
|
(name) => ANIMATION_NAME_PATTERN.test(name),
|
|
527
1122
|
{ message: "Invalid animation name. Use letters, numbers, dashes, underscores (start with letter, dash, or underscore)" }
|
|
528
1123
|
);
|
|
529
|
-
var keyframeSchema =
|
|
1124
|
+
var keyframeSchema = z12.object({
|
|
530
1125
|
offset: keyframeOffsetSchema,
|
|
531
1126
|
declarations: declarationsSchema
|
|
532
1127
|
});
|
|
533
|
-
var keyframesAtRuleSchema =
|
|
1128
|
+
var keyframesAtRuleSchema = z12.object({
|
|
534
1129
|
id: ruleIdSchema,
|
|
535
|
-
type:
|
|
1130
|
+
type: z12.literal("keyframes"),
|
|
536
1131
|
name: animationNameSchema,
|
|
537
|
-
frames:
|
|
1132
|
+
frames: z12.array(keyframeSchema).min(1, "At least one keyframe is required")
|
|
538
1133
|
});
|
|
539
|
-
var fontFaceDeclarationsSchema =
|
|
1134
|
+
var fontFaceDeclarationsSchema = z12.record(z12.string().min(1).max(100), declarationValueSchema).refine(
|
|
540
1135
|
(decls) => "fontFamily" in decls || "font-family" in decls,
|
|
541
1136
|
{ message: "font-family is required in @font-face" }
|
|
542
1137
|
);
|
|
543
|
-
var fontFaceAtRuleSchema =
|
|
1138
|
+
var fontFaceAtRuleSchema = z12.object({
|
|
544
1139
|
id: ruleIdSchema,
|
|
545
|
-
type:
|
|
1140
|
+
type: z12.literal("font-face"),
|
|
546
1141
|
declarations: fontFaceDeclarationsSchema
|
|
547
1142
|
});
|
|
548
|
-
var mediaQuerySchema =
|
|
549
|
-
var mediaAtRuleSchema =
|
|
1143
|
+
var mediaQuerySchema = z12.string().min(1, "Media query is required").max(200, "Media query too long");
|
|
1144
|
+
var mediaAtRuleSchema = z12.object({
|
|
550
1145
|
id: ruleIdSchema,
|
|
551
|
-
type:
|
|
1146
|
+
type: z12.literal("media"),
|
|
552
1147
|
query: mediaQuerySchema,
|
|
553
|
-
rules:
|
|
1148
|
+
rules: z12.array(nestedRuleSchema).min(1, "At least one rule is required")
|
|
554
1149
|
});
|
|
555
|
-
var supportsConditionSchema =
|
|
556
|
-
var supportsAtRuleSchema =
|
|
1150
|
+
var supportsConditionSchema = z12.string().min(1, "Supports condition is required").max(200, "Supports condition too long");
|
|
1151
|
+
var supportsAtRuleSchema = z12.object({
|
|
557
1152
|
id: ruleIdSchema,
|
|
558
|
-
type:
|
|
1153
|
+
type: z12.literal("supports"),
|
|
559
1154
|
condition: supportsConditionSchema,
|
|
560
|
-
rules:
|
|
1155
|
+
rules: z12.array(nestedRuleSchema).min(1, "At least one rule is required")
|
|
561
1156
|
});
|
|
562
1157
|
function containsBlockedAtRule(css) {
|
|
563
1158
|
return BLOCKED_AT_RULE_PATTERN.test(css);
|
|
564
1159
|
}
|
|
565
|
-
var rawCssSchema =
|
|
1160
|
+
var rawCssSchema = z12.string().min(1, "CSS is required").max(5e3, "Raw CSS too long (max 5000 characters)").refine(
|
|
566
1161
|
(css) => css.trim().startsWith("@"),
|
|
567
1162
|
{ message: "Raw at-rule must start with @" }
|
|
568
1163
|
).refine(
|
|
569
1164
|
(css) => !containsBlockedAtRule(css),
|
|
570
1165
|
{ message: `Blocked at-rules: ${BLOCKED_AT_RULES.join(", ")}. Use typed at-rules or local assets instead.` }
|
|
571
1166
|
);
|
|
572
|
-
var rawAtRuleSchema =
|
|
1167
|
+
var rawAtRuleSchema = z12.object({
|
|
573
1168
|
id: ruleIdSchema,
|
|
574
|
-
type:
|
|
1169
|
+
type: z12.literal("raw"),
|
|
575
1170
|
css: rawCssSchema
|
|
576
1171
|
});
|
|
577
|
-
var customCssAtRuleSchema =
|
|
1172
|
+
var customCssAtRuleSchema = z12.discriminatedUnion("type", [
|
|
578
1173
|
keyframesAtRuleSchema,
|
|
579
1174
|
fontFaceAtRuleSchema,
|
|
580
1175
|
mediaAtRuleSchema,
|
|
581
1176
|
supportsAtRuleSchema,
|
|
582
1177
|
rawAtRuleSchema
|
|
583
1178
|
]);
|
|
584
|
-
var customCssAtRulesSchema =
|
|
1179
|
+
var customCssAtRulesSchema = z12.array(customCssAtRuleSchema).optional();
|
|
585
1180
|
|
|
586
1181
|
// ../theme-core/src/shared/componentStyles.ts
|
|
587
|
-
import { z as
|
|
588
|
-
var componentBorderSchema =
|
|
589
|
-
width:
|
|
590
|
-
style:
|
|
591
|
-
colorToken:
|
|
1182
|
+
import { z as z13 } from "zod";
|
|
1183
|
+
var componentBorderSchema = z13.object({
|
|
1184
|
+
width: z13.enum(["none", "hairline", "thin", "medium", "thick"]).default("none"),
|
|
1185
|
+
style: z13.enum(["solid", "dashed"]).default("solid"),
|
|
1186
|
+
colorToken: z13.string().optional()
|
|
592
1187
|
// defaults to "border" if not set
|
|
593
1188
|
});
|
|
594
|
-
var componentShadowSchema =
|
|
595
|
-
elevation:
|
|
1189
|
+
var componentShadowSchema = z13.object({
|
|
1190
|
+
elevation: z13.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("sm")
|
|
596
1191
|
});
|
|
597
1192
|
|
|
598
1193
|
// ../theme-core/src/schema.ts
|
|
599
|
-
var axesSchema =
|
|
600
|
-
tone:
|
|
601
|
-
energy:
|
|
602
|
-
density:
|
|
603
|
-
mediaBias:
|
|
604
|
-
conversionBias:
|
|
605
|
-
motion:
|
|
606
|
-
});
|
|
607
|
-
var colourHexString =
|
|
608
|
-
var paletteColorSchema =
|
|
609
|
-
name:
|
|
1194
|
+
var axesSchema = z14.object({
|
|
1195
|
+
tone: z14.enum(["minimal", "classic", "bold"]),
|
|
1196
|
+
energy: z14.enum(["calm", "vibrant"]),
|
|
1197
|
+
density: z14.enum(["airy", "regular", "compact"]),
|
|
1198
|
+
mediaBias: z14.enum(["text", "media", "mixed"]),
|
|
1199
|
+
conversionBias: z14.enum(["low", "med", "high"]),
|
|
1200
|
+
motion: z14.enum(["subtle", "standard", "expressive"])
|
|
1201
|
+
});
|
|
1202
|
+
var colourHexString = z14.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
|
|
1203
|
+
var paletteColorSchema = z14.object({
|
|
1204
|
+
name: z14.string().min(1),
|
|
610
1205
|
hex: colourHexString
|
|
611
1206
|
});
|
|
612
|
-
var paletteMetaSchema =
|
|
613
|
-
mode:
|
|
1207
|
+
var paletteMetaSchema = z14.object({
|
|
1208
|
+
mode: z14.enum(["light", "dark"])
|
|
614
1209
|
});
|
|
615
|
-
var paletteSchema =
|
|
616
|
-
colors:
|
|
1210
|
+
var paletteSchema = z14.object({
|
|
1211
|
+
colors: z14.array(paletteColorSchema),
|
|
617
1212
|
meta: paletteMetaSchema
|
|
618
1213
|
});
|
|
619
|
-
var typographyStyleSchema =
|
|
620
|
-
family:
|
|
621
|
-
weight:
|
|
622
|
-
letterSpacing:
|
|
623
|
-
lineHeight:
|
|
1214
|
+
var typographyStyleSchema = z14.object({
|
|
1215
|
+
family: z14.string().min(1),
|
|
1216
|
+
weight: z14.enum(["light", "regular", "medium", "semibold", "bold"]),
|
|
1217
|
+
letterSpacing: z14.enum(["tight", "normal", "loose"]),
|
|
1218
|
+
lineHeight: z14.enum(["normal", "relaxed", "loose"])
|
|
624
1219
|
});
|
|
625
1220
|
var bodyTypographyStyleSchema = typographyStyleSchema.extend({
|
|
626
|
-
size:
|
|
1221
|
+
size: z14.enum(["md", "lg", "xl"])
|
|
627
1222
|
});
|
|
628
|
-
var headingSizeSchema =
|
|
629
|
-
var headingTypographyOverridesSchema =
|
|
630
|
-
weight:
|
|
631
|
-
letterSpacing:
|
|
1223
|
+
var headingSizeSchema = z14.enum(["xs", "sm", "md", "lg", "xl", "2xl"]);
|
|
1224
|
+
var headingTypographyOverridesSchema = z14.object({
|
|
1225
|
+
weight: z14.enum(["light", "regular", "medium", "semibold", "bold"]).nullable().optional(),
|
|
1226
|
+
letterSpacing: z14.enum(["tight", "normal", "loose"]).nullable().optional(),
|
|
632
1227
|
size: headingSizeSchema.nullable().optional(),
|
|
633
|
-
lineHeight:
|
|
634
|
-
italic:
|
|
635
|
-
colorToken:
|
|
1228
|
+
lineHeight: z14.enum(["normal", "relaxed", "loose"]).nullable().optional(),
|
|
1229
|
+
italic: z14.boolean().nullable().optional(),
|
|
1230
|
+
colorToken: z14.string().min(1).nullable().optional()
|
|
636
1231
|
// Palette token name for heading color
|
|
637
1232
|
});
|
|
638
1233
|
var headingTypographyStyleSchema = typographyStyleSchema.extend({
|
|
639
|
-
case:
|
|
640
|
-
italic:
|
|
641
|
-
colorToken:
|
|
1234
|
+
case: z14.enum(["uppercase", "normal", "smallCaps"]).nullable(),
|
|
1235
|
+
italic: z14.boolean().nullable(),
|
|
1236
|
+
colorToken: z14.string().min(1).nullable().optional()
|
|
642
1237
|
// Palette token name for heading color
|
|
643
1238
|
});
|
|
644
|
-
var proseLinkUnderlineStyleSchema =
|
|
645
|
-
var proseLinkUnderlineThicknessSchema =
|
|
646
|
-
var proseLinkUnderlineOffsetSchema =
|
|
647
|
-
var proseLinkStyleSchema =
|
|
648
|
-
colorToken:
|
|
649
|
-
hoverColorToken:
|
|
650
|
-
underline:
|
|
651
|
-
decorationColorToken:
|
|
652
|
-
hoverDecorationColorToken:
|
|
1239
|
+
var proseLinkUnderlineStyleSchema = z14.enum(["solid", "dotted", "dashed"]);
|
|
1240
|
+
var proseLinkUnderlineThicknessSchema = z14.enum(["auto", "fromFont", "thin", "medium", "thick"]);
|
|
1241
|
+
var proseLinkUnderlineOffsetSchema = z14.enum(["auto", "tight", "normal", "loose"]);
|
|
1242
|
+
var proseLinkStyleSchema = z14.object({
|
|
1243
|
+
colorToken: z14.string().min(1).optional(),
|
|
1244
|
+
hoverColorToken: z14.string().min(1).optional(),
|
|
1245
|
+
underline: z14.boolean().optional(),
|
|
1246
|
+
decorationColorToken: z14.string().min(1).optional(),
|
|
1247
|
+
hoverDecorationColorToken: z14.string().min(1).optional(),
|
|
653
1248
|
underlineStyle: proseLinkUnderlineStyleSchema.optional(),
|
|
654
1249
|
underlineThickness: proseLinkUnderlineThicknessSchema.optional(),
|
|
655
1250
|
underlineOffset: proseLinkUnderlineOffsetSchema.optional()
|
|
656
1251
|
});
|
|
657
|
-
var semanticSpacingSchema =
|
|
1252
|
+
var semanticSpacingSchema = z14.enum([
|
|
658
1253
|
"none",
|
|
659
1254
|
"compact",
|
|
660
1255
|
"cozy",
|
|
@@ -662,62 +1257,62 @@ var semanticSpacingSchema = z12.enum([
|
|
|
662
1257
|
"comfortable",
|
|
663
1258
|
"spacious"
|
|
664
1259
|
]);
|
|
665
|
-
var boxRoundedSchema =
|
|
666
|
-
var boxBackgroundOverlaySchema =
|
|
667
|
-
type:
|
|
668
|
-
color:
|
|
669
|
-
gradient:
|
|
670
|
-
opacity:
|
|
671
|
-
});
|
|
672
|
-
var boxBackgroundSchema =
|
|
673
|
-
type:
|
|
674
|
-
color:
|
|
675
|
-
gradient:
|
|
1260
|
+
var boxRoundedSchema = z14.enum(["none", "sm", "md", "lg", "xl", "2xl", "full"]);
|
|
1261
|
+
var boxBackgroundOverlaySchema = z14.object({
|
|
1262
|
+
type: z14.enum(["none", "color", "gradient"]).nullable().optional(),
|
|
1263
|
+
color: z14.string().nullable().optional(),
|
|
1264
|
+
gradient: z14.string().nullable().optional(),
|
|
1265
|
+
opacity: z14.number().min(0).max(1).nullable().optional()
|
|
1266
|
+
});
|
|
1267
|
+
var boxBackgroundSchema = z14.object({
|
|
1268
|
+
type: z14.enum(["color", "gradient", "image"]).optional(),
|
|
1269
|
+
color: z14.string().nullable().optional(),
|
|
1270
|
+
gradient: z14.string().nullable().optional(),
|
|
676
1271
|
image: mediaSchema.nullable().optional(),
|
|
677
|
-
objectFit:
|
|
678
|
-
scale:
|
|
679
|
-
position:
|
|
680
|
-
opacity:
|
|
1272
|
+
objectFit: z14.enum(["fill", "fit", "original", "custom"]).nullable().optional(),
|
|
1273
|
+
scale: z14.string().nullable().optional(),
|
|
1274
|
+
position: z14.string().nullable().optional(),
|
|
1275
|
+
opacity: z14.number().min(0).max(1).nullable().optional(),
|
|
681
1276
|
overlay: boxBackgroundOverlaySchema.nullable().optional(),
|
|
682
|
-
textColor:
|
|
683
|
-
headingColor:
|
|
1277
|
+
textColor: z14.string().nullable().optional(),
|
|
1278
|
+
headingColor: z14.string().nullable().optional()
|
|
684
1279
|
});
|
|
685
|
-
var sectionStylesOverrideSchema =
|
|
1280
|
+
var sectionStylesOverrideSchema = z14.object({
|
|
686
1281
|
background: boxBackgroundSchema.nullable().optional(),
|
|
687
1282
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
688
|
-
minHeight:
|
|
1283
|
+
minHeight: z14.enum(["none", "hero", "immersive"]).nullable().optional()
|
|
689
1284
|
});
|
|
690
|
-
var containerStylesOverrideSchema =
|
|
1285
|
+
var containerStylesOverrideSchema = z14.object({
|
|
691
1286
|
background: boxBackgroundSchema.nullable().optional(),
|
|
692
1287
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
693
|
-
raised:
|
|
1288
|
+
raised: z14.boolean().nullable().optional(),
|
|
694
1289
|
rounded: boxRoundedSchema.nullable().optional(),
|
|
695
|
-
fullWidth:
|
|
1290
|
+
fullWidth: z14.boolean().nullable().optional()
|
|
696
1291
|
});
|
|
697
|
-
var cardBorderOverrideSchema =
|
|
698
|
-
enabled:
|
|
699
|
-
width:
|
|
700
|
-
colorToken:
|
|
1292
|
+
var cardBorderOverrideSchema = z14.object({
|
|
1293
|
+
enabled: z14.boolean().nullable().optional(),
|
|
1294
|
+
width: z14.enum(["none", "1", "2", "3"]).nullable().optional(),
|
|
1295
|
+
colorToken: z14.string().nullable().optional()
|
|
701
1296
|
});
|
|
702
|
-
var cardStylesOverrideSchema =
|
|
1297
|
+
var cardStylesOverrideSchema = z14.object({
|
|
703
1298
|
background: boxBackgroundSchema.nullable().optional(),
|
|
704
1299
|
border: cardBorderOverrideSchema.nullable().optional(),
|
|
705
1300
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
706
|
-
raised:
|
|
1301
|
+
raised: z14.boolean().nullable().optional(),
|
|
707
1302
|
rounded: boxRoundedSchema.nullable().optional()
|
|
708
1303
|
});
|
|
709
|
-
var blockStyleOverridesSchema =
|
|
1304
|
+
var blockStyleOverridesSchema = z14.object({
|
|
710
1305
|
sectionStyles: sectionStylesOverrideSchema.nullable().optional(),
|
|
711
1306
|
containerStyles: containerStylesOverrideSchema.nullable().optional(),
|
|
712
1307
|
cardStyles: cardStylesOverrideSchema.nullable().optional()
|
|
713
1308
|
});
|
|
714
|
-
var blockThemeOverrideSchema =
|
|
715
|
-
typography:
|
|
1309
|
+
var blockThemeOverrideSchema = z14.object({
|
|
1310
|
+
typography: z14.object({
|
|
716
1311
|
proseLinkStyle: proseLinkStyleSchema.optional()
|
|
717
1312
|
}).optional(),
|
|
718
1313
|
styles: blockStyleOverridesSchema.optional()
|
|
719
1314
|
});
|
|
720
|
-
var typographyScaleSchema =
|
|
1315
|
+
var typographyScaleSchema = z14.enum([
|
|
721
1316
|
// New intuitive names
|
|
722
1317
|
"compact",
|
|
723
1318
|
// ratio 1.2 (was minorThird)
|
|
@@ -730,9 +1325,9 @@ var typographyScaleSchema = z12.enum([
|
|
|
730
1325
|
"majorThird",
|
|
731
1326
|
"perfectFourth"
|
|
732
1327
|
]);
|
|
733
|
-
var typographySchema =
|
|
1328
|
+
var typographySchema = z14.object({
|
|
734
1329
|
body: bodyTypographyStyleSchema,
|
|
735
|
-
headings:
|
|
1330
|
+
headings: z14.object({
|
|
736
1331
|
default: headingTypographyStyleSchema,
|
|
737
1332
|
h1: headingTypographyOverridesSchema,
|
|
738
1333
|
h2: headingTypographyOverridesSchema,
|
|
@@ -745,41 +1340,41 @@ var typographySchema = z12.object({
|
|
|
745
1340
|
scale: typographyScaleSchema,
|
|
746
1341
|
proseLinkStyle: proseLinkStyleSchema.optional()
|
|
747
1342
|
});
|
|
748
|
-
var spaceSchema =
|
|
749
|
-
var corners =
|
|
750
|
-
var shadow =
|
|
751
|
-
elevation:
|
|
752
|
-
softness:
|
|
753
|
-
position:
|
|
1343
|
+
var spaceSchema = z14.enum(["comfortable", "standard", "dense"]);
|
|
1344
|
+
var corners = z14.enum(["square", "soft", "rounded", "pill"]);
|
|
1345
|
+
var shadow = z14.object({
|
|
1346
|
+
elevation: z14.enum(["none", "low", "medium", "high"]),
|
|
1347
|
+
softness: z14.enum(["crisp", "soft", "hard"]).nullable(),
|
|
1348
|
+
position: z14.enum(["bottom", "bottom-right"]).default("bottom")
|
|
754
1349
|
});
|
|
755
|
-
var border =
|
|
756
|
-
width:
|
|
757
|
-
style:
|
|
1350
|
+
var border = z14.object({
|
|
1351
|
+
width: z14.enum(["none", "hairline", "thin", "thick"]),
|
|
1352
|
+
style: z14.enum(["solid", "dashed"])
|
|
758
1353
|
});
|
|
759
|
-
var motion =
|
|
760
|
-
level:
|
|
761
|
-
easing:
|
|
1354
|
+
var motion = z14.object({
|
|
1355
|
+
level: z14.enum(["off", "low", "medium", "high"]),
|
|
1356
|
+
easing: z14.enum(["standard", "snappy", "gentle"]).nullable()
|
|
762
1357
|
});
|
|
763
|
-
var buttonStyle =
|
|
1358
|
+
var buttonStyle = z14.object({
|
|
764
1359
|
shape: corners
|
|
765
1360
|
// Used for --radius-control CSS variable
|
|
766
1361
|
});
|
|
767
|
-
var cardStyle =
|
|
768
|
-
elevation:
|
|
769
|
-
border:
|
|
1362
|
+
var cardStyle = z14.object({
|
|
1363
|
+
elevation: z14.enum(["none", "low", "medium", "high"]),
|
|
1364
|
+
border: z14.enum(["none", "subtle", "defined"]),
|
|
770
1365
|
shape: corners,
|
|
771
|
-
headerStyle:
|
|
772
|
-
mediaTreatment:
|
|
1366
|
+
headerStyle: z14.enum(["plain", "accentBar", "subtleBg"]).nullable(),
|
|
1367
|
+
mediaTreatment: z14.enum(["square", "rounded", "bleed"]).nullable()
|
|
773
1368
|
});
|
|
774
|
-
var inputStyle =
|
|
1369
|
+
var inputStyle = z14.object({
|
|
775
1370
|
shape: corners,
|
|
776
|
-
border:
|
|
777
|
-
focus:
|
|
778
|
-
label:
|
|
1371
|
+
border: z14.enum(["subtle", "defined", "underline"]),
|
|
1372
|
+
focus: z14.enum(["glow", "ring", "underline"]),
|
|
1373
|
+
label: z14.enum(["inside", "above"])
|
|
779
1374
|
});
|
|
780
|
-
var headerVariant =
|
|
781
|
-
var headerPositioning =
|
|
782
|
-
var headerNavStyle =
|
|
1375
|
+
var headerVariant = z14.enum(["classic", "centered", "transparent", "floating", "editorial"]);
|
|
1376
|
+
var headerPositioning = z14.enum(["static", "sticky", "fixed"]);
|
|
1377
|
+
var headerNavStyle = z14.enum([
|
|
783
1378
|
"minimal",
|
|
784
1379
|
"underline",
|
|
785
1380
|
"underline-grow",
|
|
@@ -788,82 +1383,82 @@ var headerNavStyle = z12.enum([
|
|
|
788
1383
|
"frosted",
|
|
789
1384
|
"solid"
|
|
790
1385
|
]);
|
|
791
|
-
var navFontWeight =
|
|
792
|
-
var headerMaxWidth =
|
|
793
|
-
var headerContainerSchema =
|
|
794
|
-
rounded:
|
|
795
|
-
border:
|
|
796
|
-
shadow:
|
|
797
|
-
padding:
|
|
798
|
-
tint:
|
|
799
|
-
opacity:
|
|
1386
|
+
var navFontWeight = z14.enum(["regular", "medium", "semibold", "bold"]);
|
|
1387
|
+
var headerMaxWidth = z14.enum(["container", "full"]);
|
|
1388
|
+
var headerContainerSchema = z14.object({
|
|
1389
|
+
rounded: z14.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("xl"),
|
|
1390
|
+
border: z14.boolean().default(true),
|
|
1391
|
+
shadow: z14.boolean().default(true),
|
|
1392
|
+
padding: z14.enum(["sm", "md", "lg"]).default("md"),
|
|
1393
|
+
tint: z14.string().nullable().optional(),
|
|
1394
|
+
opacity: z14.number().min(0).max(1).default(0.12)
|
|
800
1395
|
}).optional();
|
|
801
1396
|
var headerBorderSchema = componentBorderSchema.extend({
|
|
802
|
-
position:
|
|
1397
|
+
position: z14.enum(["bottom", "top", "both", "none"]).default("bottom")
|
|
803
1398
|
}).optional();
|
|
804
|
-
var logoStyleSchema =
|
|
805
|
-
fontFamily:
|
|
806
|
-
letterSpacing:
|
|
807
|
-
gradient:
|
|
1399
|
+
var logoStyleSchema = z14.object({
|
|
1400
|
+
fontFamily: z14.enum(["heading", "body"]).default("heading"),
|
|
1401
|
+
letterSpacing: z14.enum(["normal", "wide", "wider", "widest"]).default("normal"),
|
|
1402
|
+
gradient: z14.boolean().default(false)
|
|
808
1403
|
}).optional();
|
|
809
|
-
var headerLogoTextSchema =
|
|
810
|
-
mobileWrapLines:
|
|
811
|
-
mobileMaxWidth:
|
|
812
|
-
hideOnShrink:
|
|
1404
|
+
var headerLogoTextSchema = z14.object({
|
|
1405
|
+
mobileWrapLines: z14.union([z14.literal(1), z14.literal(2)]).optional(),
|
|
1406
|
+
mobileMaxWidth: z14.enum(["xs", "sm", "md"]).optional(),
|
|
1407
|
+
hideOnShrink: z14.boolean().optional()
|
|
813
1408
|
}).optional();
|
|
814
|
-
var navEffectsSchema =
|
|
815
|
-
underlineGradient:
|
|
816
|
-
glow:
|
|
817
|
-
glowColor:
|
|
818
|
-
neumorphic:
|
|
1409
|
+
var navEffectsSchema = z14.object({
|
|
1410
|
+
underlineGradient: z14.boolean().default(false),
|
|
1411
|
+
glow: z14.boolean().default(false),
|
|
1412
|
+
glowColor: z14.string().optional(),
|
|
1413
|
+
neumorphic: z14.boolean().default(false)
|
|
819
1414
|
}).optional();
|
|
820
|
-
var dropdownStyleSchema =
|
|
1415
|
+
var dropdownStyleSchema = z14.object({
|
|
821
1416
|
// Container styling
|
|
822
|
-
background:
|
|
1417
|
+
background: z14.string().default("surface"),
|
|
823
1418
|
// color token
|
|
824
|
-
textColor:
|
|
1419
|
+
textColor: z14.string().default("text"),
|
|
825
1420
|
// color token
|
|
826
|
-
borderColor:
|
|
1421
|
+
borderColor: z14.string().nullable().default("border"),
|
|
827
1422
|
// null = no border
|
|
828
|
-
shadow:
|
|
829
|
-
borderRadius:
|
|
1423
|
+
shadow: z14.enum(["none", "sm", "md", "lg"]).default("md"),
|
|
1424
|
+
borderRadius: z14.enum(["none", "sm", "md", "lg"]).default("md"),
|
|
830
1425
|
// Link hover states (explicit control)
|
|
831
|
-
hoverBackground:
|
|
1426
|
+
hoverBackground: z14.string().nullable().optional(),
|
|
832
1427
|
// color token, null = transparent
|
|
833
|
-
hoverTextColor:
|
|
1428
|
+
hoverTextColor: z14.string().nullable().optional(),
|
|
834
1429
|
// color token, null = inherit
|
|
835
1430
|
// Typography
|
|
836
|
-
textTransform:
|
|
837
|
-
letterSpacing:
|
|
838
|
-
fontWeight:
|
|
1431
|
+
textTransform: z14.enum(["none", "uppercase", "capitalize"]).default("none"),
|
|
1432
|
+
letterSpacing: z14.enum(["normal", "wide", "wider"]).default("normal"),
|
|
1433
|
+
fontWeight: z14.enum(["regular", "medium", "semibold", "bold"]).optional(),
|
|
839
1434
|
// optional = inherit from navWeight
|
|
840
|
-
textSize:
|
|
1435
|
+
textSize: z14.enum(["xs", "sm", "base", "lg"]).optional()
|
|
841
1436
|
// optional = no override (browser default)
|
|
842
1437
|
}).optional();
|
|
843
|
-
var headerCtaGapSchema =
|
|
844
|
-
var navContainerSchema =
|
|
845
|
-
type:
|
|
846
|
-
tint:
|
|
847
|
-
opacity:
|
|
1438
|
+
var headerCtaGapSchema = z14.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
|
|
1439
|
+
var navContainerSchema = z14.object({
|
|
1440
|
+
type: z14.enum(["none", "pill", "glass"]).default("none"),
|
|
1441
|
+
tint: z14.string().nullable().optional(),
|
|
1442
|
+
opacity: z14.number().min(0).max(1).default(0.15)
|
|
848
1443
|
}).default({ type: "none", tint: null, opacity: 0.15 });
|
|
849
|
-
var headerBackgroundSchema =
|
|
850
|
-
type:
|
|
851
|
-
color:
|
|
1444
|
+
var headerBackgroundSchema = z14.object({
|
|
1445
|
+
type: z14.enum(["color", "gradient", "image"]),
|
|
1446
|
+
color: z14.string().nullable().optional(),
|
|
852
1447
|
gradient: gradientConfigSchema.nullable().optional(),
|
|
853
1448
|
image: mediaSchema.nullable().optional(),
|
|
854
|
-
textColor:
|
|
1449
|
+
textColor: z14.string().nullable().optional()
|
|
855
1450
|
});
|
|
856
|
-
var headerSchema =
|
|
1451
|
+
var headerSchema = z14.object({
|
|
857
1452
|
variant: headerVariant,
|
|
858
1453
|
positioning: headerPositioning,
|
|
859
|
-
shrinkOnScroll:
|
|
1454
|
+
shrinkOnScroll: z14.boolean(),
|
|
860
1455
|
maxWidth: headerMaxWidth,
|
|
861
1456
|
logoOverride: mediaSchema.nullable().optional(),
|
|
862
1457
|
background: headerBackgroundSchema.default({ type: "color", color: "surface" }),
|
|
863
|
-
textColor:
|
|
1458
|
+
textColor: z14.string().nullable().optional(),
|
|
864
1459
|
// Site title and general header text
|
|
865
1460
|
navStyle: headerNavStyle,
|
|
866
|
-
navColor:
|
|
1461
|
+
navColor: z14.string().nullable().optional(),
|
|
867
1462
|
// Nav links (inherits textColor if not set)
|
|
868
1463
|
navWeight: navFontWeight.default("medium"),
|
|
869
1464
|
// New fields for header system enhancement
|
|
@@ -882,50 +1477,50 @@ var headerSchema = z12.object({
|
|
|
882
1477
|
// Dropdown menu styling (nav dropdowns and mobile drawer)
|
|
883
1478
|
dropdownStyle: dropdownStyleSchema
|
|
884
1479
|
});
|
|
885
|
-
var footerVariant =
|
|
886
|
-
var footerMaxWidth =
|
|
887
|
-
var footerMode =
|
|
888
|
-
var footerNavLayoutMode =
|
|
889
|
-
var footerNavLayoutAlign =
|
|
890
|
-
var footerSpacing =
|
|
891
|
-
var footerLogoPlacement =
|
|
892
|
-
var footerLogoSize =
|
|
893
|
-
var footerLogoMaxHeight =
|
|
894
|
-
var footerBottomTextLinkStyleSchema =
|
|
895
|
-
colorToken:
|
|
896
|
-
hoverColorToken:
|
|
897
|
-
decorationColorToken:
|
|
898
|
-
underline:
|
|
899
|
-
});
|
|
900
|
-
var footerBottomBarSchema =
|
|
901
|
-
enabled:
|
|
902
|
-
fullBleed:
|
|
1480
|
+
var footerVariant = z14.enum(["simple", "columns", "split"]);
|
|
1481
|
+
var footerMaxWidth = z14.enum(["container", "full"]);
|
|
1482
|
+
var footerMode = z14.enum(["default", "blocks", "default+blocks", "none"]);
|
|
1483
|
+
var footerNavLayoutMode = z14.enum(["stack", "inline", "inline-wrap"]);
|
|
1484
|
+
var footerNavLayoutAlign = z14.enum(["start", "center", "end", "space-between"]);
|
|
1485
|
+
var footerSpacing = z14.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
|
|
1486
|
+
var footerLogoPlacement = z14.enum(["left", "right", "above", "below"]);
|
|
1487
|
+
var footerLogoSize = z14.enum(["sm", "md", "lg", "xl"]);
|
|
1488
|
+
var footerLogoMaxHeight = z14.enum(["sm", "md", "lg", "xl"]);
|
|
1489
|
+
var footerBottomTextLinkStyleSchema = z14.object({
|
|
1490
|
+
colorToken: z14.string().optional(),
|
|
1491
|
+
hoverColorToken: z14.string().nullable().optional(),
|
|
1492
|
+
decorationColorToken: z14.string().nullable().optional(),
|
|
1493
|
+
underline: z14.boolean().optional()
|
|
1494
|
+
});
|
|
1495
|
+
var footerBottomBarSchema = z14.object({
|
|
1496
|
+
enabled: z14.boolean().optional(),
|
|
1497
|
+
fullBleed: z14.boolean().optional(),
|
|
903
1498
|
background: headerBackgroundSchema.optional(),
|
|
904
|
-
textColor:
|
|
905
|
-
textAlign:
|
|
1499
|
+
textColor: z14.string().nullable().optional(),
|
|
1500
|
+
textAlign: z14.enum(["left", "center", "right"]).optional(),
|
|
906
1501
|
paddingY: footerSpacing.optional(),
|
|
907
1502
|
paddingX: footerSpacing.optional(),
|
|
908
|
-
borderTop:
|
|
909
|
-
colorToken:
|
|
910
|
-
width:
|
|
1503
|
+
borderTop: z14.object({
|
|
1504
|
+
colorToken: z14.string().nullable().optional(),
|
|
1505
|
+
width: z14.enum(["none", "thin", "medium", "thick"]).optional()
|
|
911
1506
|
}).optional()
|
|
912
1507
|
});
|
|
913
|
-
var footerNavLayoutSchema =
|
|
1508
|
+
var footerNavLayoutSchema = z14.object({
|
|
914
1509
|
layout: footerNavLayoutMode.optional(),
|
|
915
1510
|
align: footerNavLayoutAlign.optional(),
|
|
916
1511
|
gapX: footerSpacing.optional(),
|
|
917
1512
|
gapY: footerSpacing.optional(),
|
|
918
|
-
columns:
|
|
1513
|
+
columns: z14.number().int().min(1).max(6).optional()
|
|
919
1514
|
});
|
|
920
|
-
var footerLogoSchema =
|
|
921
|
-
showLogo:
|
|
922
|
-
showLogoText:
|
|
1515
|
+
var footerLogoSchema = z14.object({
|
|
1516
|
+
showLogo: z14.boolean().default(true),
|
|
1517
|
+
showLogoText: z14.boolean().optional(),
|
|
923
1518
|
placement: footerLogoPlacement.optional(),
|
|
924
1519
|
size: footerLogoSize.optional(),
|
|
925
1520
|
maxHeight: footerLogoMaxHeight.optional(),
|
|
926
|
-
align:
|
|
1521
|
+
align: z14.enum(["start", "center", "end"]).optional()
|
|
927
1522
|
});
|
|
928
|
-
var footerSchema =
|
|
1523
|
+
var footerSchema = z14.object({
|
|
929
1524
|
/**
|
|
930
1525
|
* SDK-only footer rendering mode.
|
|
931
1526
|
*
|
|
@@ -934,11 +1529,11 @@ var footerSchema = z12.object({
|
|
|
934
1529
|
mode: footerMode.optional(),
|
|
935
1530
|
variant: footerVariant,
|
|
936
1531
|
maxWidth: footerMaxWidth,
|
|
937
|
-
showLogoText:
|
|
1532
|
+
showLogoText: z14.boolean().optional(),
|
|
938
1533
|
background: headerBackgroundSchema.default({ type: "color", color: "surface" }),
|
|
939
1534
|
// Footer nav styling (independent from header)
|
|
940
1535
|
navStyle: headerNavStyle.default("minimal"),
|
|
941
|
-
navColor:
|
|
1536
|
+
navColor: z14.string().nullable().optional(),
|
|
942
1537
|
navWeight: navFontWeight.default("medium"),
|
|
943
1538
|
// Full nav link customization (overrides navStyle if set)
|
|
944
1539
|
navLinkStyle: navLinkStyleSchema.optional(),
|
|
@@ -949,15 +1544,15 @@ var footerSchema = z12.object({
|
|
|
949
1544
|
logo: footerLogoSchema.optional(),
|
|
950
1545
|
bottomBar: footerBottomBarSchema.optional()
|
|
951
1546
|
});
|
|
952
|
-
var containerPaddingPresetSchema =
|
|
953
|
-
var layoutSchema =
|
|
954
|
-
containerPadding:
|
|
1547
|
+
var containerPaddingPresetSchema = z14.enum(["tight", "compact", "default", "relaxed"]);
|
|
1548
|
+
var layoutSchema = z14.object({
|
|
1549
|
+
containerPadding: z14.object({
|
|
955
1550
|
mobile: containerPaddingPresetSchema.optional(),
|
|
956
1551
|
tablet: containerPaddingPresetSchema.optional(),
|
|
957
1552
|
desktop: containerPaddingPresetSchema.optional()
|
|
958
1553
|
}).optional()
|
|
959
1554
|
}).optional();
|
|
960
|
-
var heroTypographySizeSchema =
|
|
1555
|
+
var heroTypographySizeSchema = z14.enum([
|
|
961
1556
|
"sm",
|
|
962
1557
|
"base",
|
|
963
1558
|
"lg",
|
|
@@ -968,14 +1563,14 @@ var heroTypographySizeSchema = z12.enum([
|
|
|
968
1563
|
"5xl",
|
|
969
1564
|
"6xl"
|
|
970
1565
|
]);
|
|
971
|
-
var heroTypographyLineHeightSchema =
|
|
972
|
-
var heroResponsiveTypographySchema =
|
|
1566
|
+
var heroTypographyLineHeightSchema = z14.enum(["tight", "snug", "normal", "relaxed"]);
|
|
1567
|
+
var heroResponsiveTypographySchema = z14.object({
|
|
973
1568
|
headlineSize: heroTypographySizeSchema.optional(),
|
|
974
1569
|
headlineLineHeight: heroTypographyLineHeightSchema.optional(),
|
|
975
1570
|
subheadlineSize: heroTypographySizeSchema.optional(),
|
|
976
1571
|
subheadlineLineHeight: heroTypographyLineHeightSchema.optional()
|
|
977
1572
|
});
|
|
978
|
-
var heroTypographySchema =
|
|
1573
|
+
var heroTypographySchema = z14.object({
|
|
979
1574
|
headlineSize: heroTypographySizeSchema.optional(),
|
|
980
1575
|
headlineLineHeight: heroTypographyLineHeightSchema.optional(),
|
|
981
1576
|
subheadlineSize: heroTypographySizeSchema.optional(),
|
|
@@ -984,24 +1579,24 @@ var heroTypographySchema = z12.object({
|
|
|
984
1579
|
microHeadlineLineHeight: heroTypographyLineHeightSchema.optional(),
|
|
985
1580
|
microSubheadlineSize: heroTypographySizeSchema.optional(),
|
|
986
1581
|
microSubheadlineLineHeight: heroTypographyLineHeightSchema.optional(),
|
|
987
|
-
responsive:
|
|
1582
|
+
responsive: z14.object({
|
|
988
1583
|
tablet: heroResponsiveTypographySchema.optional(),
|
|
989
1584
|
mobile: heroResponsiveTypographySchema.optional()
|
|
990
1585
|
}).optional()
|
|
991
1586
|
});
|
|
992
|
-
var heroSchema =
|
|
1587
|
+
var heroSchema = z14.object({
|
|
993
1588
|
typography: heroTypographySchema.optional()
|
|
994
1589
|
}).optional();
|
|
995
|
-
var gradientsSchema =
|
|
996
|
-
button:
|
|
997
|
-
hero:
|
|
998
|
-
background:
|
|
999
|
-
});
|
|
1000
|
-
var themeSchema =
|
|
1001
|
-
name:
|
|
1002
|
-
description:
|
|
1003
|
-
rationale:
|
|
1004
|
-
siteStyleId:
|
|
1590
|
+
var gradientsSchema = z14.object({
|
|
1591
|
+
button: z14.string().min(1).nullable().optional(),
|
|
1592
|
+
hero: z14.string().min(1).nullable().optional(),
|
|
1593
|
+
background: z14.string().min(1).nullable().optional()
|
|
1594
|
+
});
|
|
1595
|
+
var themeSchema = z14.object({
|
|
1596
|
+
name: z14.string().min(1).max(30),
|
|
1597
|
+
description: z14.string().min(1).max(400),
|
|
1598
|
+
rationale: z14.string().min(1).max(400),
|
|
1599
|
+
siteStyleId: z14.string().min(1).transform((value) => asSiteStyleId(value)).optional(),
|
|
1005
1600
|
axes: axesSchema,
|
|
1006
1601
|
palette: paletteSchema,
|
|
1007
1602
|
typography: typographySchema,
|
|
@@ -1028,16 +1623,16 @@ var themeSchema = z12.object({
|
|
|
1028
1623
|
// Block-specific customization (Tier 3)
|
|
1029
1624
|
// blockCustomVars: Per-block CSS variable overrides as bare values
|
|
1030
1625
|
// Example: { "event-registration": { "--step-color": "#6d28d9" } }
|
|
1031
|
-
blockCustomVars:
|
|
1032
|
-
|
|
1626
|
+
blockCustomVars: z14.record(
|
|
1627
|
+
z14.string(),
|
|
1033
1628
|
// block kind (matches data-block attribute)
|
|
1034
|
-
|
|
1629
|
+
z14.record(z14.string(), z14.string())
|
|
1035
1630
|
// { '--var-name': 'value' }
|
|
1036
1631
|
).optional(),
|
|
1037
1632
|
// Structured block-kind theme overrides (v1: typography prose-link style only)
|
|
1038
1633
|
// Keyed by block kind (usually data-block value like "hero"; "block.hero" also accepted)
|
|
1039
|
-
blockOverrides:
|
|
1040
|
-
|
|
1634
|
+
blockOverrides: z14.record(
|
|
1635
|
+
z14.string(),
|
|
1041
1636
|
blockThemeOverrideSchema
|
|
1042
1637
|
).optional(),
|
|
1043
1638
|
// Structured custom CSS rules
|
|
@@ -1073,11 +1668,11 @@ var themeSchema = z12.object({
|
|
|
1073
1668
|
* }
|
|
1074
1669
|
* ```
|
|
1075
1670
|
*/
|
|
1076
|
-
styleGroups:
|
|
1671
|
+
styleGroups: z14.record(z14.string(), z14.array(z14.string())).optional()
|
|
1077
1672
|
});
|
|
1078
|
-
var themesTurnSchema =
|
|
1079
|
-
message:
|
|
1080
|
-
themes:
|
|
1673
|
+
var themesTurnSchema = z14.object({
|
|
1674
|
+
message: z14.string().min(1),
|
|
1675
|
+
themes: z14.array(themeSchema).length(3)
|
|
1081
1676
|
});
|
|
1082
1677
|
|
|
1083
1678
|
// src/theme/loader.ts
|