@riverbankcms/sdk 0.62.2 → 0.62.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_dts/api/src/accessAdmin.d.ts +7 -0
- package/dist/_dts/api/src/bookingClosures.d.ts +106 -0
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +18 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +1 -1
- package/dist/_dts/api/src/calendar.d.ts +11 -1
- package/dist/_dts/api/src/contentRuntime.d.ts +2 -0
- package/dist/_dts/api/src/contentVersionHistory.d.ts +52 -0
- package/dist/_dts/api/src/contentVersionHistoryClient.d.ts +45 -0
- package/dist/_dts/api/src/endpoints.d.ts +110 -6
- package/dist/_dts/api/src/index.d.ts +4 -1
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +31 -7
- package/dist/_dts/api/src/siteMembers.d.ts +10 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +33 -12
- package/dist/_dts/api/src/types.d.ts +2 -1
- package/dist/_dts/api/src/url.d.ts +3 -3
- package/dist/_dts/blocks/src/bindings/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.state.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/FieldValidationMessage.d.ts +19 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/TerminalPanel.d.ts +8 -2
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/themeColorResolution.d.ts +7 -0
- package/dist/_dts/content-editor/src/hooks/useDebouncedLatestSave.d.ts +24 -0
- package/dist/_dts/content-editor/src/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/ui/stores/autosaveStore.d.ts +1 -0
- package/dist/_dts/content-editor/src/ui/stores/types.d.ts +1 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +208 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/blocks/BlockToolbar.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/composePageFromBlocks.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/index.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/blocks/composer/mergeDrafts.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +31 -8
- package/dist/_dts/preview-next/src/client/blocks/pageDesignRuntimePreview.d.ts +6 -5
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/aiProposalProjection.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/applyPreviewProjections.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/index.d.ts +4 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.d.ts +5 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +72 -0
- package/dist/_dts/preview-next/src/client/index.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/layout/PreviewLayoutContext.d.ts +6 -5
- package/dist/_dts/preview-next/src/client/preview/PageDesignEditorStateContext.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +11 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +9 -5
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +6 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +13 -2
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +7 -1
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeControlStyles.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeHistory.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeRuntimePatch.d.ts +9 -1
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeWorkflowState.d.ts +13 -0
- package/dist/_dts/preview-next/src/client/preview/sidebarTabPreference.d.ts +8 -2
- package/dist/_dts/preview-next/src/client/preview/siteChromeLookRows.d.ts +49 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +3 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/surfaces/src/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/index.d.ts +1 -1
- package/dist/_dts/theme-core/src/palette/variants/types.d.ts +2 -21
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +3 -67
- package/dist/_dts/theme-core/src/site-styles/appearancePresetTypes.d.ts +4 -62
- package/dist/_dts/theme-core/src/site-styles/appearancePresets.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +24 -0
- package/dist/_dts/theme-core/src/site-styles/customizableSurfaces.d.ts +94 -0
- package/dist/_dts/theme-core/src/site-styles/footerLooks.d.ts +59 -0
- package/dist/_dts/theme-core/src/site-styles/generatedDesignPipeline.d.ts +4 -0
- package/dist/_dts/theme-core/src/site-styles/headerCtaVariants.d.ts +3 -0
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +155 -0
- package/dist/_dts/theme-core/src/site-styles/headerOpeningSection.d.ts +15 -0
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +6 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignAuthority.d.ts +7 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +25 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +15 -1
- package/dist/_dts/theme-core/src/site-styles/records.d.ts +1 -0
- package/dist/_dts/theme-core/src/site-styles/siteStyleBlockPolicies.d.ts +96 -0
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +1 -2
- package/dist/_dts/theme-core/src/siteChrome.d.ts +44 -2
- package/dist/_dts/theme-core/src/tokens/colorTokenParts.d.ts +13 -0
- package/dist/_dts/theme-core/src/tokens/index.d.ts +2 -0
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +29 -0
- package/dist/_dts/theme-core/src/utils/tokenOrColor.d.ts +27 -1
- package/dist/cli/index.mjs +1139 -471
- package/dist/client/bookings.mjs +519 -368
- package/dist/client/client.mjs +4507 -3535
- package/dist/client/hooks.mjs +2634 -2035
- package/dist/client/rendering/client.mjs +4413 -3549
- package/dist/client/rendering/islands.mjs +3456 -2589
- package/dist/client/rendering.mjs +4921 -3949
- package/dist/preview-next/before-render.mjs +138 -6
- package/dist/preview-next/client/runtime.mjs +3541 -1573
- package/dist/preview-next/editor-base.css +31 -0
- package/dist/preview-next/middleware.mjs +131 -6
- package/dist/server/components.mjs +3214 -2560
- package/dist/server/config-validation.mjs +2859 -2260
- package/dist/server/config.mjs +2859 -2260
- package/dist/server/data.mjs +2634 -2035
- package/dist/server/index.mjs +132 -7
- package/dist/server/next.mjs +2983 -2329
- package/dist/server/page-converter.mjs +2478 -2029
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3214 -2560
- package/dist/server/rendering.mjs +3233 -2579
- package/dist/server/routing.mjs +2725 -2028
- package/dist/server/server.mjs +2636 -2037
- package/dist/server/theme-bridge.mjs +1250 -767
- package/dist/server/theme.mjs +623 -498
- package/dist/styles/index.css +33 -0
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/colorResolution.d.ts +0 -13
- package/dist/_dts/preview-next/src/client/blocks/overlay.d.ts +0 -30
- package/dist/_dts/theme-core/src/site-styles/siteChromeAppearancePresets.d.ts +0 -67
package/dist/server/theme.mjs
CHANGED
|
@@ -28,10 +28,141 @@ var eyebrowTreatmentValues = [
|
|
|
28
28
|
];
|
|
29
29
|
|
|
30
30
|
// ../theme-core/src/buttons/personalities/types.ts
|
|
31
|
-
import { z as
|
|
31
|
+
import { z as z4 } from "zod";
|
|
32
32
|
|
|
33
33
|
// ../theme-core/src/buttons/types.ts
|
|
34
|
+
import { z as z2 } from "zod";
|
|
35
|
+
|
|
36
|
+
// ../theme-core/src/tokens/themeColorTokens.ts
|
|
34
37
|
import { z } from "zod";
|
|
38
|
+
|
|
39
|
+
// ../theme-core/src/tokens/colorTokenParts.ts
|
|
40
|
+
function parseOpacityPercent(source) {
|
|
41
|
+
const trimmed = source.trim();
|
|
42
|
+
if (!trimmed) return null;
|
|
43
|
+
if (!/^\d{1,3}(?:\.\d+)?$/.test(trimmed)) return null;
|
|
44
|
+
const value = Number(trimmed);
|
|
45
|
+
if (!Number.isFinite(value)) return null;
|
|
46
|
+
if (value < 0 || value > 100) return null;
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
function parseColorTokenParts(source) {
|
|
50
|
+
const trimmed = source.trim();
|
|
51
|
+
if (trimmed.startsWith("raw:")) {
|
|
52
|
+
return { kind: "raw", value: trimmed.slice(4) };
|
|
53
|
+
}
|
|
54
|
+
const [token, opacityRaw, extra] = trimmed.split("/");
|
|
55
|
+
if (!token || extra !== void 0) {
|
|
56
|
+
return { kind: "invalid", token: trimmed };
|
|
57
|
+
}
|
|
58
|
+
if (opacityRaw === void 0) {
|
|
59
|
+
return { kind: "token", token, opacityPercent: null };
|
|
60
|
+
}
|
|
61
|
+
const opacityPercent = parseOpacityPercent(opacityRaw);
|
|
62
|
+
if (opacityPercent === null) {
|
|
63
|
+
return { kind: "invalid", token: trimmed };
|
|
64
|
+
}
|
|
65
|
+
return { kind: "token", token, opacityPercent };
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// ../theme-core/src/tokens/blockColorTokens.ts
|
|
69
|
+
var blockColorTokenNames = [
|
|
70
|
+
"text",
|
|
71
|
+
"heading",
|
|
72
|
+
"mutedText",
|
|
73
|
+
"surface",
|
|
74
|
+
"background",
|
|
75
|
+
"foreground",
|
|
76
|
+
"border",
|
|
77
|
+
"primary",
|
|
78
|
+
"secondary",
|
|
79
|
+
"accent",
|
|
80
|
+
"success",
|
|
81
|
+
"warning",
|
|
82
|
+
"info",
|
|
83
|
+
"error",
|
|
84
|
+
"destructive",
|
|
85
|
+
"scrim",
|
|
86
|
+
"shadow",
|
|
87
|
+
// Common "on*" tokens used when rendering colored chips/badges.
|
|
88
|
+
"onPrimary",
|
|
89
|
+
"onSecondary",
|
|
90
|
+
"onAccent",
|
|
91
|
+
"onSuccess",
|
|
92
|
+
"onWarning",
|
|
93
|
+
"onInfo",
|
|
94
|
+
"onError",
|
|
95
|
+
"onDestructive",
|
|
96
|
+
"onSurface"
|
|
97
|
+
];
|
|
98
|
+
var blockColorTokenNameSet = new Set(
|
|
99
|
+
blockColorTokenNames
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
// ../theme-core/src/tokens/themeColorTokens.ts
|
|
103
|
+
var PALETTE_TOKEN_NAMES = [
|
|
104
|
+
"primary",
|
|
105
|
+
"primaryForeground",
|
|
106
|
+
"secondary",
|
|
107
|
+
"accent",
|
|
108
|
+
"success",
|
|
109
|
+
"warning",
|
|
110
|
+
"destructive",
|
|
111
|
+
"background",
|
|
112
|
+
"surface",
|
|
113
|
+
"surfaceAlt",
|
|
114
|
+
"muted",
|
|
115
|
+
"text",
|
|
116
|
+
"border"
|
|
117
|
+
];
|
|
118
|
+
var paletteTokenNameSchema = z.enum(PALETTE_TOKEN_NAMES);
|
|
119
|
+
var themeColorBaseTokenNames = [
|
|
120
|
+
...PALETTE_TOKEN_NAMES,
|
|
121
|
+
...blockColorTokenNames,
|
|
122
|
+
// Existing generated themes can carry palette-local "white" tokens in
|
|
123
|
+
// token-only component fields. Keep it explicit until those rows are
|
|
124
|
+
// migrated to canonical foreground/background roles.
|
|
125
|
+
"white",
|
|
126
|
+
"neutral",
|
|
127
|
+
"primaryText",
|
|
128
|
+
"secondaryForeground",
|
|
129
|
+
"accentForeground"
|
|
130
|
+
];
|
|
131
|
+
var themeColorBaseTokenSet = new Set(themeColorBaseTokenNames);
|
|
132
|
+
var SHADE_STEPS = [
|
|
133
|
+
"50",
|
|
134
|
+
"100",
|
|
135
|
+
"200",
|
|
136
|
+
"300",
|
|
137
|
+
"400",
|
|
138
|
+
"500",
|
|
139
|
+
"600",
|
|
140
|
+
"700",
|
|
141
|
+
"800",
|
|
142
|
+
"900",
|
|
143
|
+
"950"
|
|
144
|
+
];
|
|
145
|
+
var shadeStepSet = new Set(SHADE_STEPS);
|
|
146
|
+
function isKnownBaseToken(value) {
|
|
147
|
+
return themeColorBaseTokenSet.has(value);
|
|
148
|
+
}
|
|
149
|
+
function isKnownShadeToken(value) {
|
|
150
|
+
const match = value.match(/^([a-zA-Z][a-zA-Z0-9]*)(?:-([0-9]{2,3}))$/);
|
|
151
|
+
if (!match) return false;
|
|
152
|
+
const [, base, shade] = match;
|
|
153
|
+
return Boolean(base && shade && isKnownBaseToken(base) && shadeStepSet.has(shade));
|
|
154
|
+
}
|
|
155
|
+
function isThemeColorTokenBase(value) {
|
|
156
|
+
return isKnownBaseToken(value) || isKnownShadeToken(value);
|
|
157
|
+
}
|
|
158
|
+
function isThemeColorToken(value) {
|
|
159
|
+
if (typeof value !== "string") return false;
|
|
160
|
+
const parts = parseColorTokenParts(value);
|
|
161
|
+
return parts.kind === "token" && isThemeColorTokenBase(parts.token);
|
|
162
|
+
}
|
|
163
|
+
var themeColorTokenSchema = z.string().min(1).refine((value) => Boolean(isThemeColorToken(value)), "Expected a known Theme V2 color token");
|
|
164
|
+
|
|
165
|
+
// ../theme-core/src/buttons/types.ts
|
|
35
166
|
var VARIANT_ROLES = [
|
|
36
167
|
"primary",
|
|
37
168
|
"secondary",
|
|
@@ -41,22 +172,22 @@ var VARIANT_ROLES = [
|
|
|
41
172
|
"tertiary",
|
|
42
173
|
"accent"
|
|
43
174
|
];
|
|
44
|
-
var cornerStyleSchema =
|
|
45
|
-
var shadowSizeSchema =
|
|
46
|
-
var textTransformSchema =
|
|
47
|
-
var fontWeightSchema =
|
|
48
|
-
var buttonTypographySchema =
|
|
49
|
-
var letterSpacingSchema =
|
|
50
|
-
var hoverTransformSchema =
|
|
51
|
-
var hoverColorSchema =
|
|
52
|
-
var buttonPaddingPresetSchema =
|
|
53
|
-
var gradientStyleSchema =
|
|
54
|
-
var gradientSharpnessSchema =
|
|
55
|
-
var prioritySchema =
|
|
56
|
-
var variantRoleSchema =
|
|
57
|
-
var buttonSizeNameSchema =
|
|
175
|
+
var cornerStyleSchema = z2.enum(["square", "rounded", "pill"]);
|
|
176
|
+
var shadowSizeSchema = z2.enum(["none", "low", "medium", "high"]);
|
|
177
|
+
var textTransformSchema = z2.enum(["none", "uppercase", "lowercase", "capitalize"]);
|
|
178
|
+
var fontWeightSchema = z2.union([z2.literal(500), z2.literal(600), z2.literal(700)]);
|
|
179
|
+
var buttonTypographySchema = z2.enum(["body", "heading"]);
|
|
180
|
+
var letterSpacingSchema = z2.enum(["tight", "normal", "loose"]);
|
|
181
|
+
var hoverTransformSchema = z2.enum(["none", "lift", "scale", "press"]);
|
|
182
|
+
var hoverColorSchema = z2.enum(["none", "brighten", "darken", "saturate", "token"]);
|
|
183
|
+
var buttonPaddingPresetSchema = z2.enum(["compact", "default", "spacious"]);
|
|
184
|
+
var gradientStyleSchema = z2.enum(["linear", "radial", "conic"]);
|
|
185
|
+
var gradientSharpnessSchema = z2.enum(["smooth", "medium", "hard"]);
|
|
186
|
+
var prioritySchema = z2.union([z2.literal(1), z2.literal(2), z2.literal(3)]);
|
|
187
|
+
var variantRoleSchema = z2.enum(VARIANT_ROLES);
|
|
188
|
+
var buttonSizeNameSchema = z2.enum(["sm", "md", "lg", "xl"]);
|
|
58
189
|
var PADDING_TOKEN_PATTERN = /^(?:0|\d+(?:\.\d+)?(?:rem|em|px|%))$/;
|
|
59
|
-
var paddingShorthandSchema =
|
|
190
|
+
var paddingShorthandSchema = z2.string().refine(
|
|
60
191
|
(value) => {
|
|
61
192
|
const parts = value.split(/\s+/).filter(Boolean);
|
|
62
193
|
return parts.length === 2 && parts.every((token) => PADDING_TOKEN_PATTERN.test(token));
|
|
@@ -65,11 +196,11 @@ var paddingShorthandSchema = z.string().refine(
|
|
|
65
196
|
message: 'Padding must be two space-separated CSS length tokens (e.g. "0.5rem 1rem"). Use `0` for zero.'
|
|
66
197
|
}
|
|
67
198
|
);
|
|
68
|
-
var buttonSizeConfigSchema =
|
|
199
|
+
var buttonSizeConfigSchema = z2.object({
|
|
69
200
|
padding: paddingShorthandSchema,
|
|
70
|
-
fontSize:
|
|
201
|
+
fontSize: z2.string().optional()
|
|
71
202
|
});
|
|
72
|
-
var buttonSizesSchema =
|
|
203
|
+
var buttonSizesSchema = z2.object({
|
|
73
204
|
sm: buttonSizeConfigSchema,
|
|
74
205
|
md: buttonSizeConfigSchema,
|
|
75
206
|
lg: buttonSizeConfigSchema,
|
|
@@ -80,9 +211,9 @@ var buttonSizesSchema = z.object({
|
|
|
80
211
|
lg,
|
|
81
212
|
xl: xl ?? lg
|
|
82
213
|
}));
|
|
83
|
-
var buttonGlobalSettingsSchema =
|
|
214
|
+
var buttonGlobalSettingsSchema = z2.object({
|
|
84
215
|
cornerStyle: cornerStyleSchema,
|
|
85
|
-
cornerRadius:
|
|
216
|
+
cornerRadius: z2.number().min(0).max(24).optional(),
|
|
86
217
|
shadow: shadowSizeSchema,
|
|
87
218
|
textTransform: textTransformSchema,
|
|
88
219
|
fontWeight: fontWeightSchema,
|
|
@@ -92,104 +223,104 @@ var buttonGlobalSettingsSchema = z.object({
|
|
|
92
223
|
* by the current generator and will be removed once the legacy
|
|
93
224
|
* `primitives/content/components/Button.tsx` slot exports are deleted.
|
|
94
225
|
*/
|
|
95
|
-
borderWidth:
|
|
226
|
+
borderWidth: z2.union([z2.literal(1), z2.literal(2), z2.literal(3)]),
|
|
96
227
|
// === Family-level typography ===
|
|
97
228
|
// Typography source (body or heading) — selects which theme typography pool to inherit
|
|
98
229
|
typography: buttonTypographySchema.optional(),
|
|
99
230
|
// Font size for all variants in the family (Tailwind token, e.g. "text-xs", "text-sm")
|
|
100
231
|
// Sized variants get this as default; fixed variants inherit unless they override.
|
|
101
232
|
// Size class CSS may still override at run time for sized variants.
|
|
102
|
-
fontSize:
|
|
233
|
+
fontSize: z2.string().optional(),
|
|
103
234
|
// Letter spacing applied to all variants
|
|
104
235
|
letterSpacing: letterSpacingSchema.optional(),
|
|
105
236
|
// Italic style
|
|
106
|
-
italic:
|
|
237
|
+
italic: z2.boolean().optional(),
|
|
107
238
|
// Padding preset (applies to sized variants without a sizes config)
|
|
108
239
|
paddingPreset: buttonPaddingPresetSchema.optional(),
|
|
109
240
|
hoverTransform: hoverTransformSchema,
|
|
110
241
|
hoverColor: hoverColorSchema,
|
|
111
242
|
// When hoverColor is 'token', this specifies which token to use
|
|
112
|
-
hoverColorToken:
|
|
243
|
+
hoverColorToken: themeColorTokenSchema.optional(),
|
|
113
244
|
// Gradient settings (if any variant uses gradients)
|
|
114
245
|
gradientStyle: gradientStyleSchema.optional(),
|
|
115
|
-
gradientAngle:
|
|
246
|
+
gradientAngle: z2.number().min(0).max(360).optional(),
|
|
116
247
|
gradientSharpness: gradientSharpnessSchema.optional()
|
|
117
248
|
});
|
|
118
|
-
var gradientDirectionSchema =
|
|
119
|
-
var buttonBackgroundSchema =
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
type:
|
|
123
|
-
stops:
|
|
249
|
+
var gradientDirectionSchema = z2.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
|
|
250
|
+
var buttonBackgroundSchema = z2.discriminatedUnion("type", [
|
|
251
|
+
z2.object({ type: z2.literal("solid"), colorToken: themeColorTokenSchema }),
|
|
252
|
+
z2.object({
|
|
253
|
+
type: z2.literal("gradient"),
|
|
254
|
+
stops: z2.array(themeColorTokenSchema).min(2),
|
|
124
255
|
direction: gradientDirectionSchema
|
|
125
256
|
}),
|
|
126
|
-
|
|
257
|
+
z2.object({ type: z2.literal("transparent") })
|
|
127
258
|
]);
|
|
128
|
-
var effectApplicationSchema =
|
|
129
|
-
effectId:
|
|
130
|
-
options:
|
|
131
|
-
});
|
|
132
|
-
var buttonBorderSchema =
|
|
133
|
-
widthClass:
|
|
134
|
-
colorToken:
|
|
135
|
-
});
|
|
136
|
-
var variantShadowSchema =
|
|
137
|
-
elevation:
|
|
138
|
-
softness:
|
|
139
|
-
position:
|
|
140
|
-
});
|
|
141
|
-
var variantEffectsSchema =
|
|
142
|
-
base:
|
|
143
|
-
hover:
|
|
144
|
-
active:
|
|
145
|
-
focus:
|
|
146
|
-
});
|
|
147
|
-
var variantSizeOverridesSchema =
|
|
259
|
+
var effectApplicationSchema = z2.object({
|
|
260
|
+
effectId: z2.string(),
|
|
261
|
+
options: z2.record(z2.string(), z2.any()).optional()
|
|
262
|
+
});
|
|
263
|
+
var buttonBorderSchema = z2.object({
|
|
264
|
+
widthClass: z2.string(),
|
|
265
|
+
colorToken: themeColorTokenSchema
|
|
266
|
+
});
|
|
267
|
+
var variantShadowSchema = z2.object({
|
|
268
|
+
elevation: z2.enum(["none", "low", "medium", "high"]),
|
|
269
|
+
softness: z2.enum(["crisp", "soft", "hard"]).nullable(),
|
|
270
|
+
position: z2.enum(["bottom", "bottom-right"]).default("bottom")
|
|
271
|
+
});
|
|
272
|
+
var variantEffectsSchema = z2.object({
|
|
273
|
+
base: z2.array(effectApplicationSchema).optional(),
|
|
274
|
+
hover: z2.array(effectApplicationSchema).optional(),
|
|
275
|
+
active: z2.array(effectApplicationSchema).optional(),
|
|
276
|
+
focus: z2.array(effectApplicationSchema).optional()
|
|
277
|
+
});
|
|
278
|
+
var variantSizeOverridesSchema = z2.object({
|
|
148
279
|
sm: buttonSizeConfigSchema.optional(),
|
|
149
280
|
md: buttonSizeConfigSchema.optional(),
|
|
150
281
|
lg: buttonSizeConfigSchema.optional(),
|
|
151
282
|
xl: buttonSizeConfigSchema.optional()
|
|
152
283
|
});
|
|
153
|
-
var buttonVariantSchema =
|
|
154
|
-
id:
|
|
155
|
-
name:
|
|
156
|
-
enabled:
|
|
284
|
+
var buttonVariantSchema = z2.object({
|
|
285
|
+
id: z2.string(),
|
|
286
|
+
name: z2.string().min(1).max(20),
|
|
287
|
+
enabled: z2.boolean(),
|
|
157
288
|
priority: prioritySchema,
|
|
158
289
|
// Base appearance (token-based)
|
|
159
290
|
background: buttonBackgroundSchema,
|
|
160
|
-
textColorToken:
|
|
291
|
+
textColorToken: themeColorTokenSchema,
|
|
161
292
|
/** Tailwind radius token (e.g. `'rounded-md'`). Omit to inherit from `global.cornerStyle`. */
|
|
162
|
-
borderRadius:
|
|
293
|
+
borderRadius: z2.string().optional(),
|
|
163
294
|
// Optional shadow override (uses theme.shadow if not specified)
|
|
164
295
|
shadow: variantShadowSchema.optional(),
|
|
165
296
|
// Border (optional)
|
|
166
297
|
border: buttonBorderSchema.optional(),
|
|
167
298
|
// Hover background token (per-variant override, takes precedence over global hoverColorToken)
|
|
168
|
-
hoverBackgroundToken:
|
|
299
|
+
hoverBackgroundToken: z2.string().optional(),
|
|
169
300
|
// Effect composition
|
|
170
301
|
effects: variantEffectsSchema.optional(),
|
|
171
302
|
// Per-variant size overrides — see VariantSizeOverrides
|
|
172
303
|
sizes: variantSizeOverridesSchema.optional()
|
|
173
304
|
});
|
|
174
|
-
var buttonSystemSchema =
|
|
305
|
+
var buttonSystemSchema = z2.object({
|
|
175
306
|
global: buttonGlobalSettingsSchema,
|
|
176
|
-
variants:
|
|
307
|
+
variants: z2.array(buttonVariantSchema).min(1).max(6),
|
|
177
308
|
sizes: buttonSizesSchema.optional()
|
|
178
309
|
});
|
|
179
310
|
|
|
180
311
|
// ../theme-core/src/site-styles/styleTags.ts
|
|
181
|
-
import { z as
|
|
312
|
+
import { z as z3 } from "zod";
|
|
182
313
|
var STYLE_AXIS_VALUES = {
|
|
183
314
|
tone: ["minimal", "classic", "bold"],
|
|
184
315
|
energy: ["calm", "vibrant"],
|
|
185
316
|
motion: ["subtle", "standard", "expressive"],
|
|
186
317
|
era: ["editorial", "modern", "organic", "technical", "retro"]
|
|
187
318
|
};
|
|
188
|
-
var styleTagsSchema =
|
|
189
|
-
tone:
|
|
190
|
-
energy:
|
|
191
|
-
motion:
|
|
192
|
-
era:
|
|
319
|
+
var styleTagsSchema = z3.object({
|
|
320
|
+
tone: z3.enum(STYLE_AXIS_VALUES.tone).optional(),
|
|
321
|
+
energy: z3.enum(STYLE_AXIS_VALUES.energy).optional(),
|
|
322
|
+
motion: z3.enum(STYLE_AXIS_VALUES.motion).optional(),
|
|
323
|
+
era: z3.enum(STYLE_AXIS_VALUES.era).optional()
|
|
193
324
|
});
|
|
194
325
|
|
|
195
326
|
// ../theme-core/src/buttons/personalities/types.ts
|
|
@@ -199,11 +330,11 @@ function asButtonPersonalityId(value) {
|
|
|
199
330
|
}
|
|
200
331
|
return value;
|
|
201
332
|
}
|
|
202
|
-
var buttonPersonalityIdSchema =
|
|
203
|
-
var buttonPersonalitySchema =
|
|
333
|
+
var buttonPersonalityIdSchema = z4.string().min(1).transform((value) => asButtonPersonalityId(value));
|
|
334
|
+
var buttonPersonalitySchema = z4.object({
|
|
204
335
|
id: buttonPersonalityIdSchema,
|
|
205
|
-
name:
|
|
206
|
-
description:
|
|
336
|
+
name: z4.string().min(1),
|
|
337
|
+
description: z4.string().min(1),
|
|
207
338
|
tags: styleTagsSchema,
|
|
208
339
|
buttonSystem: buttonSystemSchema
|
|
209
340
|
});
|
|
@@ -848,48 +979,48 @@ var personalitiesById = new Map(
|
|
|
848
979
|
);
|
|
849
980
|
|
|
850
981
|
// ../theme-core/src/schema.ts
|
|
851
|
-
import { z as
|
|
982
|
+
import { z as z16 } from "zod";
|
|
852
983
|
|
|
853
984
|
// ../theme-core/src/lib/media.ts
|
|
854
|
-
import
|
|
855
|
-
var hotspotSchema =
|
|
856
|
-
x:
|
|
857
|
-
y:
|
|
858
|
-
radius:
|
|
859
|
-
});
|
|
860
|
-
var rotationSchema =
|
|
861
|
-
var rectSchema =
|
|
862
|
-
var aspectCropSchema =
|
|
863
|
-
aspect:
|
|
864
|
-
rect:
|
|
865
|
-
hotspot:
|
|
866
|
-
rotation:
|
|
867
|
-
});
|
|
868
|
-
var transformSchema =
|
|
869
|
-
aspectCrops:
|
|
985
|
+
import z5 from "zod";
|
|
986
|
+
var hotspotSchema = z5.object({
|
|
987
|
+
x: z5.number().min(0).max(1),
|
|
988
|
+
y: z5.number().min(0).max(1),
|
|
989
|
+
radius: z5.number().optional()
|
|
990
|
+
});
|
|
991
|
+
var rotationSchema = z5.union([z5.literal(0), z5.literal(90), z5.literal(180), z5.literal(270)]);
|
|
992
|
+
var rectSchema = z5.tuple([z5.number(), z5.number(), z5.number(), z5.number()]);
|
|
993
|
+
var aspectCropSchema = z5.object({
|
|
994
|
+
aspect: z5.preprocess((value) => value == null ? void 0 : value, z5.string().optional()),
|
|
995
|
+
rect: z5.preprocess((value) => value == null ? void 0 : value, rectSchema.optional()),
|
|
996
|
+
hotspot: z5.preprocess((value) => value == null ? void 0 : value, hotspotSchema.optional()),
|
|
997
|
+
rotation: z5.preprocess((value) => value == null ? void 0 : value, rotationSchema.optional())
|
|
998
|
+
});
|
|
999
|
+
var transformSchema = z5.object({
|
|
1000
|
+
aspectCrops: z5.preprocess((value) => {
|
|
870
1001
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
871
1002
|
return void 0;
|
|
872
1003
|
}
|
|
873
1004
|
return value;
|
|
874
|
-
},
|
|
1005
|
+
}, z5.record(z5.string(), aspectCropSchema.catch({}))).optional(),
|
|
875
1006
|
rect: rectSchema.optional(),
|
|
876
1007
|
hotspot: hotspotSchema.optional(),
|
|
877
1008
|
rotation: rotationSchema.optional()
|
|
878
1009
|
});
|
|
879
|
-
var mediaSchema =
|
|
880
|
-
type:
|
|
881
|
-
purpose:
|
|
882
|
-
placeholder:
|
|
883
|
-
assetId:
|
|
884
|
-
identifier:
|
|
885
|
-
src:
|
|
886
|
-
alt:
|
|
887
|
-
filename:
|
|
888
|
-
mimeType:
|
|
889
|
-
width:
|
|
890
|
-
height:
|
|
891
|
-
storageBucket:
|
|
892
|
-
storagePath:
|
|
1010
|
+
var mediaSchema = z5.object({
|
|
1011
|
+
type: z5.enum(["image", "video", "audio", "document", "spreadsheet", "archive"]),
|
|
1012
|
+
purpose: z5.string().optional(),
|
|
1013
|
+
placeholder: z5.boolean().default(true).optional(),
|
|
1014
|
+
assetId: z5.string().optional(),
|
|
1015
|
+
identifier: z5.string().optional(),
|
|
1016
|
+
src: z5.string().optional(),
|
|
1017
|
+
alt: z5.string().optional(),
|
|
1018
|
+
filename: z5.string().optional(),
|
|
1019
|
+
mimeType: z5.string().optional(),
|
|
1020
|
+
width: z5.number().optional(),
|
|
1021
|
+
height: z5.number().optional(),
|
|
1022
|
+
storageBucket: z5.string().optional(),
|
|
1023
|
+
storagePath: z5.string().optional(),
|
|
893
1024
|
transform: transformSchema.optional()
|
|
894
1025
|
});
|
|
895
1026
|
|
|
@@ -897,48 +1028,48 @@ var mediaSchema = z4.object({
|
|
|
897
1028
|
var BUTTON_SIZE_NAMES = buttonSizeNameSchema.options;
|
|
898
1029
|
|
|
899
1030
|
// ../theme-core/src/cards/types.ts
|
|
900
|
-
import { z as
|
|
901
|
-
var cardSpacingSchema =
|
|
902
|
-
var gradientDirectionSchema2 =
|
|
903
|
-
var cardBackgroundSchema =
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
type:
|
|
907
|
-
fromToken:
|
|
908
|
-
toToken:
|
|
1031
|
+
import { z as z6 } from "zod";
|
|
1032
|
+
var cardSpacingSchema = z6.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]);
|
|
1033
|
+
var gradientDirectionSchema2 = z6.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
|
|
1034
|
+
var cardBackgroundSchema = z6.discriminatedUnion("type", [
|
|
1035
|
+
z6.object({ type: z6.literal("solid"), colorToken: themeColorTokenSchema }),
|
|
1036
|
+
z6.object({
|
|
1037
|
+
type: z6.literal("gradient"),
|
|
1038
|
+
fromToken: themeColorTokenSchema,
|
|
1039
|
+
toToken: themeColorTokenSchema,
|
|
909
1040
|
direction: gradientDirectionSchema2
|
|
910
1041
|
}),
|
|
911
|
-
|
|
1042
|
+
z6.object({ type: z6.literal("transparent") })
|
|
912
1043
|
]);
|
|
913
|
-
var cardBorderSchema =
|
|
914
|
-
widthClass:
|
|
915
|
-
colorToken:
|
|
916
|
-
});
|
|
917
|
-
var cardVariantSchema =
|
|
918
|
-
id:
|
|
919
|
-
name:
|
|
920
|
-
enabled:
|
|
921
|
-
priority:
|
|
1044
|
+
var cardBorderSchema = z6.object({
|
|
1045
|
+
widthClass: z6.string(),
|
|
1046
|
+
colorToken: themeColorTokenSchema
|
|
1047
|
+
});
|
|
1048
|
+
var cardVariantSchema = z6.object({
|
|
1049
|
+
id: z6.string(),
|
|
1050
|
+
name: z6.string().min(1).max(20),
|
|
1051
|
+
enabled: z6.boolean(),
|
|
1052
|
+
priority: z6.union([z6.literal(1), z6.literal(2), z6.literal(3)]),
|
|
922
1053
|
// Appearance (token-based)
|
|
923
1054
|
background: cardBackgroundSchema,
|
|
924
1055
|
spacing: cardSpacingSchema,
|
|
925
1056
|
// Optional overrides (uses theme defaults if not specified)
|
|
926
|
-
shadow:
|
|
927
|
-
elevation:
|
|
928
|
-
softness:
|
|
929
|
-
position:
|
|
1057
|
+
shadow: z6.object({
|
|
1058
|
+
elevation: z6.enum(["none", "low", "medium", "high"]),
|
|
1059
|
+
softness: z6.enum(["crisp", "soft", "hard"]).nullable(),
|
|
1060
|
+
position: z6.enum(["bottom", "bottom-right"]).default("bottom")
|
|
930
1061
|
}).optional(),
|
|
931
|
-
corners:
|
|
1062
|
+
corners: z6.enum(["square", "soft", "rounded", "pill"]).optional(),
|
|
932
1063
|
// Border (optional)
|
|
933
1064
|
border: cardBorderSchema.optional()
|
|
934
1065
|
});
|
|
935
|
-
var cardSystemSchema =
|
|
936
|
-
variants:
|
|
1066
|
+
var cardSystemSchema = z6.object({
|
|
1067
|
+
variants: z6.array(cardVariantSchema).min(1).max(3)
|
|
937
1068
|
});
|
|
938
1069
|
|
|
939
1070
|
// ../theme-core/src/accordions/types.ts
|
|
940
|
-
import { z as
|
|
941
|
-
var accordionIconSchema =
|
|
1071
|
+
import { z as z7 } from "zod";
|
|
1072
|
+
var accordionIconSchema = z7.enum([
|
|
942
1073
|
"plus-minus",
|
|
943
1074
|
// + becomes - (swap or rotate 90°)
|
|
944
1075
|
"chevron",
|
|
@@ -950,180 +1081,179 @@ var accordionIconSchema = z6.enum([
|
|
|
950
1081
|
"circle-plus-minus"
|
|
951
1082
|
// ⊕ becomes ⊖ (swap with fade)
|
|
952
1083
|
]);
|
|
953
|
-
var accordionSystemSchema =
|
|
1084
|
+
var accordionSystemSchema = z7.object({
|
|
954
1085
|
// Visual styling (solid color only - gradients can be added later if needed)
|
|
955
|
-
background:
|
|
956
|
-
type:
|
|
957
|
-
colorToken:
|
|
1086
|
+
background: z7.object({
|
|
1087
|
+
type: z7.literal("solid"),
|
|
1088
|
+
colorToken: themeColorTokenSchema
|
|
958
1089
|
}),
|
|
959
1090
|
// Spacing (padding inside items)
|
|
960
|
-
spacing:
|
|
1091
|
+
spacing: z7.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]),
|
|
961
1092
|
// Border radius (null = inherit from theme.corners)
|
|
962
|
-
corners:
|
|
1093
|
+
corners: z7.enum(["square", "soft", "rounded", "pill"]).nullable(),
|
|
963
1094
|
// Border styling (null = inherit from theme.border)
|
|
964
|
-
border:
|
|
965
|
-
widthClass:
|
|
1095
|
+
border: z7.object({
|
|
1096
|
+
widthClass: z7.string(),
|
|
966
1097
|
// e.g., 'border', 'border-2', 'border-0'
|
|
967
|
-
colorToken:
|
|
1098
|
+
colorToken: themeColorTokenSchema
|
|
968
1099
|
}).nullable(),
|
|
969
1100
|
// Shadow (null = inherit from theme.shadow)
|
|
970
|
-
shadow:
|
|
971
|
-
elevation:
|
|
972
|
-
softness:
|
|
973
|
-
position:
|
|
1101
|
+
shadow: z7.object({
|
|
1102
|
+
elevation: z7.enum(["none", "low", "medium", "high"]),
|
|
1103
|
+
softness: z7.enum(["soft", "crisp", "hard"]).nullable(),
|
|
1104
|
+
position: z7.enum(["bottom", "bottom-right"])
|
|
974
1105
|
}).nullable(),
|
|
975
1106
|
// Icon style and animation
|
|
976
|
-
icon:
|
|
1107
|
+
icon: z7.object({
|
|
977
1108
|
style: accordionIconSchema,
|
|
978
|
-
position:
|
|
979
|
-
size:
|
|
1109
|
+
position: z7.enum(["left", "right"]),
|
|
1110
|
+
size: z7.enum(["sm", "md", "lg"])
|
|
980
1111
|
}),
|
|
981
1112
|
// Trigger (question) styling
|
|
982
|
-
trigger:
|
|
983
|
-
textColorToken:
|
|
984
|
-
fontWeight:
|
|
1113
|
+
trigger: z7.object({
|
|
1114
|
+
textColorToken: themeColorTokenSchema,
|
|
1115
|
+
fontWeight: z7.enum(["regular", "medium", "semibold", "bold"]).nullable()
|
|
985
1116
|
// null = inherit from theme
|
|
986
1117
|
}),
|
|
987
1118
|
// Hover state styling
|
|
988
|
-
hover:
|
|
989
|
-
backgroundColorToken:
|
|
990
|
-
textColorToken:
|
|
991
|
-
borderColorToken:
|
|
1119
|
+
hover: z7.object({
|
|
1120
|
+
backgroundColorToken: themeColorTokenSchema.optional(),
|
|
1121
|
+
textColorToken: themeColorTokenSchema.optional(),
|
|
1122
|
+
borderColorToken: themeColorTokenSchema.optional()
|
|
992
1123
|
}),
|
|
993
1124
|
// Content (answer) styling
|
|
994
|
-
content:
|
|
995
|
-
textColorToken:
|
|
1125
|
+
content: z7.object({
|
|
1126
|
+
textColorToken: themeColorTokenSchema
|
|
996
1127
|
})
|
|
997
1128
|
});
|
|
998
1129
|
|
|
999
1130
|
// ../theme-core/src/inputs/types.ts
|
|
1000
|
-
import { z as
|
|
1001
|
-
var inputSystemSchema =
|
|
1131
|
+
import { z as z8 } from "zod";
|
|
1132
|
+
var inputSystemSchema = z8.object({
|
|
1002
1133
|
// Base styling (applied to all inputs)
|
|
1003
|
-
base:
|
|
1004
|
-
background:
|
|
1005
|
-
|
|
1006
|
-
type:
|
|
1007
|
-
colorToken:
|
|
1134
|
+
base: z8.object({
|
|
1135
|
+
background: z8.union([
|
|
1136
|
+
z8.object({
|
|
1137
|
+
type: z8.literal("solid"),
|
|
1138
|
+
colorToken: themeColorTokenSchema
|
|
1008
1139
|
}),
|
|
1009
|
-
|
|
1010
|
-
type:
|
|
1140
|
+
z8.object({
|
|
1141
|
+
type: z8.literal("transparent")
|
|
1011
1142
|
})
|
|
1012
1143
|
]),
|
|
1013
|
-
textColorToken:
|
|
1014
|
-
border:
|
|
1015
|
-
widthClass:
|
|
1144
|
+
textColorToken: themeColorTokenSchema,
|
|
1145
|
+
border: z8.object({
|
|
1146
|
+
widthClass: z8.string(),
|
|
1016
1147
|
// e.g., 'border', 'border-2'
|
|
1017
|
-
colorToken:
|
|
1018
|
-
style:
|
|
1148
|
+
colorToken: themeColorTokenSchema,
|
|
1149
|
+
style: z8.enum(["all", "underline"]).optional()
|
|
1019
1150
|
}),
|
|
1020
|
-
corners:
|
|
1151
|
+
corners: z8.enum(["square", "soft", "rounded", "pill"]).nullable(),
|
|
1021
1152
|
// null = inherit from theme.corners
|
|
1022
|
-
shadow:
|
|
1023
|
-
elevation:
|
|
1024
|
-
softness:
|
|
1153
|
+
shadow: z8.object({
|
|
1154
|
+
elevation: z8.enum(["none", "low", "medium"]),
|
|
1155
|
+
softness: z8.enum(["soft", "crisp", "hard"]).nullable()
|
|
1025
1156
|
}).nullable(),
|
|
1026
|
-
spacing:
|
|
1157
|
+
spacing: z8.enum(["compact", "cozy", "medium", "comfortable"]),
|
|
1027
1158
|
// padding inside inputs
|
|
1028
|
-
fontSize:
|
|
1159
|
+
fontSize: z8.enum(["sm", "base", "lg"])
|
|
1029
1160
|
}),
|
|
1030
1161
|
// Label styling
|
|
1031
|
-
label:
|
|
1032
|
-
textColorToken:
|
|
1033
|
-
fontWeight:
|
|
1034
|
-
fontSize:
|
|
1035
|
-
textTransform:
|
|
1036
|
-
letterSpacing:
|
|
1037
|
-
opacity:
|
|
1162
|
+
label: z8.object({
|
|
1163
|
+
textColorToken: themeColorTokenSchema,
|
|
1164
|
+
fontWeight: z8.enum(["regular", "medium", "semibold", "bold", "black"]),
|
|
1165
|
+
fontSize: z8.enum(["2xs", "xs", "sm", "base"]),
|
|
1166
|
+
textTransform: z8.enum(["none", "uppercase", "lowercase", "capitalize"]).optional(),
|
|
1167
|
+
letterSpacing: z8.enum(["normal", "wide", "wider", "widest"]).optional(),
|
|
1168
|
+
opacity: z8.number().min(0.2).max(1).optional()
|
|
1038
1169
|
}),
|
|
1039
1170
|
// Focus state
|
|
1040
|
-
focus:
|
|
1041
|
-
ringColorToken:
|
|
1042
|
-
ringWidth:
|
|
1043
|
-
borderColorToken:
|
|
1171
|
+
focus: z8.object({
|
|
1172
|
+
ringColorToken: themeColorTokenSchema,
|
|
1173
|
+
ringWidth: z8.enum(["0", "1", "2", "3"]),
|
|
1174
|
+
borderColorToken: themeColorTokenSchema.optional()
|
|
1044
1175
|
// Change border color on focus
|
|
1045
1176
|
}),
|
|
1046
1177
|
// Error state (for validation feedback)
|
|
1047
|
-
error:
|
|
1048
|
-
borderColorToken:
|
|
1049
|
-
textColorToken:
|
|
1178
|
+
error: z8.object({
|
|
1179
|
+
borderColorToken: themeColorTokenSchema,
|
|
1180
|
+
textColorToken: themeColorTokenSchema
|
|
1050
1181
|
}),
|
|
1051
1182
|
// Disabled state
|
|
1052
|
-
disabled:
|
|
1053
|
-
backgroundColorToken:
|
|
1054
|
-
textColorToken:
|
|
1055
|
-
opacity:
|
|
1183
|
+
disabled: z8.object({
|
|
1184
|
+
backgroundColorToken: themeColorTokenSchema,
|
|
1185
|
+
textColorToken: themeColorTokenSchema,
|
|
1186
|
+
opacity: z8.number().min(0.3).max(0.7)
|
|
1056
1187
|
})
|
|
1057
1188
|
});
|
|
1058
1189
|
|
|
1059
1190
|
// ../theme-core/src/gradients/types.ts
|
|
1060
|
-
import { z as
|
|
1061
|
-
var gradientStopSchema =
|
|
1062
|
-
color:
|
|
1063
|
-
|
|
1064
|
-
position: z8.number().min(0).max(100)
|
|
1191
|
+
import { z as z9 } from "zod";
|
|
1192
|
+
var gradientStopSchema = z9.object({
|
|
1193
|
+
color: themeColorTokenSchema,
|
|
1194
|
+
position: z9.number().min(0).max(100)
|
|
1065
1195
|
// Percentage 0-100
|
|
1066
1196
|
});
|
|
1067
|
-
var gradientConfigSchema =
|
|
1068
|
-
type:
|
|
1069
|
-
angle:
|
|
1197
|
+
var gradientConfigSchema = z9.object({
|
|
1198
|
+
type: z9.enum(["linear", "radial"]),
|
|
1199
|
+
angle: z9.number().min(0).max(360).optional(),
|
|
1070
1200
|
// For linear gradients (degrees)
|
|
1071
|
-
position:
|
|
1201
|
+
position: z9.string().optional(),
|
|
1072
1202
|
// For radial gradients ('center', 'top left', etc.)
|
|
1073
|
-
stops:
|
|
1203
|
+
stops: z9.array(gradientStopSchema).min(2)
|
|
1074
1204
|
});
|
|
1075
1205
|
|
|
1076
1206
|
// ../theme-core/src/navigation/types.ts
|
|
1077
|
-
import { z as
|
|
1207
|
+
import { z as z11 } from "zod";
|
|
1078
1208
|
|
|
1079
1209
|
// ../theme-core/src/interactive/baseSchema.ts
|
|
1080
|
-
import { z as
|
|
1081
|
-
var interactiveTypographySchema =
|
|
1210
|
+
import { z as z10 } from "zod";
|
|
1211
|
+
var interactiveTypographySchema = z10.object({
|
|
1082
1212
|
/** Font family source */
|
|
1083
|
-
typography:
|
|
1213
|
+
typography: z10.enum(["body", "heading"]).default("body"),
|
|
1084
1214
|
/** Font weight */
|
|
1085
|
-
fontWeight:
|
|
1215
|
+
fontWeight: z10.enum(["regular", "medium", "semibold", "bold"]).default("medium"),
|
|
1086
1216
|
/** Text transform */
|
|
1087
|
-
textTransform:
|
|
1217
|
+
textTransform: z10.enum(["none", "uppercase", "capitalize"]).default("none"),
|
|
1088
1218
|
/** Italic style */
|
|
1089
|
-
italic:
|
|
1219
|
+
italic: z10.boolean().default(false)
|
|
1090
1220
|
});
|
|
1091
|
-
var effectApplicationSchema2 =
|
|
1221
|
+
var effectApplicationSchema2 = z10.object({
|
|
1092
1222
|
/** Effect preset ID */
|
|
1093
|
-
effectId:
|
|
1223
|
+
effectId: z10.string(),
|
|
1094
1224
|
/** User-provided customization options */
|
|
1095
|
-
options:
|
|
1225
|
+
options: z10.record(z10.string(), z10.any()).optional()
|
|
1096
1226
|
});
|
|
1097
|
-
var effectCompositionSchema =
|
|
1227
|
+
var effectCompositionSchema = z10.object({
|
|
1098
1228
|
/** Effects always applied */
|
|
1099
|
-
base:
|
|
1229
|
+
base: z10.array(effectApplicationSchema2).optional(),
|
|
1100
1230
|
/** Effects applied on hover */
|
|
1101
|
-
hover:
|
|
1231
|
+
hover: z10.array(effectApplicationSchema2).optional(),
|
|
1102
1232
|
/** Effects applied on active/pressed */
|
|
1103
|
-
active:
|
|
1233
|
+
active: z10.array(effectApplicationSchema2).optional(),
|
|
1104
1234
|
/** Effects applied on focus */
|
|
1105
|
-
focus:
|
|
1235
|
+
focus: z10.array(effectApplicationSchema2).optional()
|
|
1106
1236
|
});
|
|
1107
1237
|
|
|
1108
1238
|
// ../theme-core/src/navigation/types.ts
|
|
1109
|
-
var navLinkPaddingSchema =
|
|
1110
|
-
var navLinkPaddingXSchema =
|
|
1111
|
-
var navLinkBorderRadiusSchema =
|
|
1112
|
-
var navLinkTextSizeSchema =
|
|
1113
|
-
var navLinkLetterSpacingSchema =
|
|
1114
|
-
var navLinkStyleSchema =
|
|
1239
|
+
var navLinkPaddingSchema = z11.enum(["none", "compact", "default"]);
|
|
1240
|
+
var navLinkPaddingXSchema = z11.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
|
|
1241
|
+
var navLinkBorderRadiusSchema = z11.enum(["none", "sm", "md", "full"]);
|
|
1242
|
+
var navLinkTextSizeSchema = z11.enum(["xs", "sm", "base", "lg"]);
|
|
1243
|
+
var navLinkLetterSpacingSchema = z11.enum(["normal", "wide", "wider", "widest"]);
|
|
1244
|
+
var navLinkStyleSchema = z11.object({
|
|
1115
1245
|
/** Display name for the style */
|
|
1116
|
-
name:
|
|
1246
|
+
name: z11.string().min(1).max(30).optional(),
|
|
1117
1247
|
/** Typography settings (inherited from interactive base) */
|
|
1118
1248
|
...interactiveTypographySchema.shape,
|
|
1119
1249
|
/** Text color token */
|
|
1120
|
-
colorToken:
|
|
1250
|
+
colorToken: themeColorTokenSchema.default("text"),
|
|
1121
1251
|
/** Optional text size override */
|
|
1122
1252
|
textSize: navLinkTextSizeSchema.optional(),
|
|
1123
1253
|
/** Optional letter spacing override */
|
|
1124
1254
|
letterSpacing: navLinkLetterSpacingSchema.optional(),
|
|
1125
1255
|
/** Hover/active color token (for color-change effects) */
|
|
1126
|
-
hoverColorToken:
|
|
1256
|
+
hoverColorToken: themeColorTokenSchema.nullable().optional(),
|
|
1127
1257
|
/** Padding preset */
|
|
1128
1258
|
padding: navLinkPaddingSchema.default("compact"),
|
|
1129
1259
|
/** Horizontal padding override (overrides horizontal component of padding preset) */
|
|
@@ -1135,7 +1265,7 @@ var navLinkStyleSchema = z10.object({
|
|
|
1135
1265
|
});
|
|
1136
1266
|
|
|
1137
1267
|
// ../theme-core/src/customCss/validation.ts
|
|
1138
|
-
import { z as
|
|
1268
|
+
import { z as z12 } from "zod";
|
|
1139
1269
|
var FORBIDDEN_SELECTORS = [":root", "html", "body"];
|
|
1140
1270
|
var UNIVERSAL_SELECTOR = "*";
|
|
1141
1271
|
var REMOTE_URL_PATTERN = /url\s*\(\s*['"]?(https?:|\/\/)/i;
|
|
@@ -1177,7 +1307,7 @@ function containsForbiddenSelector(selector) {
|
|
|
1177
1307
|
}
|
|
1178
1308
|
return false;
|
|
1179
1309
|
}
|
|
1180
|
-
var selectorSchema =
|
|
1310
|
+
var selectorSchema = z12.string().min(1, "Selector cannot be empty").max(200, "Selector too long (max 200 characters)").refine(
|
|
1181
1311
|
(s) => !containsForbiddenSelector(s),
|
|
1182
1312
|
{ message: "Global selectors (:root, html, body, *) are not allowed" }
|
|
1183
1313
|
);
|
|
@@ -1187,38 +1317,38 @@ function containsRemoteUrl(value) {
|
|
|
1187
1317
|
function containsJavascriptUrl(value) {
|
|
1188
1318
|
return JAVASCRIPT_URL_PATTERN.test(value);
|
|
1189
1319
|
}
|
|
1190
|
-
var declarationValueSchema =
|
|
1320
|
+
var declarationValueSchema = z12.string().max(500, "Declaration value too long (max 500 characters)").refine(
|
|
1191
1321
|
(v) => !containsRemoteUrl(v),
|
|
1192
1322
|
{ message: "Remote url() references are not allowed. Use local paths, data URIs, or fragment IDs." }
|
|
1193
1323
|
).refine(
|
|
1194
1324
|
(v) => !containsJavascriptUrl(v),
|
|
1195
1325
|
{ message: "javascript: URLs are not allowed" }
|
|
1196
1326
|
);
|
|
1197
|
-
var declarationsSchema =
|
|
1198
|
-
|
|
1327
|
+
var declarationsSchema = z12.record(
|
|
1328
|
+
z12.string().min(1).max(100),
|
|
1199
1329
|
// property name
|
|
1200
1330
|
declarationValueSchema
|
|
1201
1331
|
// property value
|
|
1202
1332
|
);
|
|
1203
|
-
var customCssRuleSchema =
|
|
1204
|
-
id:
|
|
1333
|
+
var customCssRuleSchema = z12.object({
|
|
1334
|
+
id: z12.string().min(1, "Rule ID is required").max(50, "Rule ID too long"),
|
|
1205
1335
|
selector: selectorSchema,
|
|
1206
1336
|
declarations: declarationsSchema
|
|
1207
1337
|
});
|
|
1208
1338
|
var blockCustomCssRuleSchema = customCssRuleSchema.extend({
|
|
1209
|
-
blockKind:
|
|
1339
|
+
blockKind: z12.string().min(1, "Block kind is required").max(50, "Block kind too long")
|
|
1210
1340
|
});
|
|
1211
|
-
var customCssRulesSchema =
|
|
1212
|
-
var blockCustomCssRulesSchema =
|
|
1341
|
+
var customCssRulesSchema = z12.array(customCssRuleSchema).optional();
|
|
1342
|
+
var blockCustomCssRulesSchema = z12.array(blockCustomCssRuleSchema).optional();
|
|
1213
1343
|
|
|
1214
1344
|
// ../theme-core/src/customCss/atRuleValidation.ts
|
|
1215
|
-
import { z as
|
|
1345
|
+
import { z as z13 } from "zod";
|
|
1216
1346
|
var KEYFRAME_OFFSET_PATTERN = /^(from|to|\d{1,3}%)$/i;
|
|
1217
1347
|
var ANIMATION_NAME_PATTERN = /^[a-zA-Z_-][a-zA-Z0-9_-]*$/;
|
|
1218
1348
|
var BLOCKED_AT_RULES = ["@import", "@charset"];
|
|
1219
1349
|
var BLOCKED_AT_RULE_PATTERN = /@(?:import|charset)\b/i;
|
|
1220
|
-
var ruleIdSchema =
|
|
1221
|
-
var nestedRuleSchema =
|
|
1350
|
+
var ruleIdSchema = z13.string().min(1, "Rule ID is required").max(50, "Rule ID too long");
|
|
1351
|
+
var nestedRuleSchema = z13.object({
|
|
1222
1352
|
selector: selectorSchema,
|
|
1223
1353
|
declarations: declarationsSchema
|
|
1224
1354
|
});
|
|
@@ -1230,206 +1360,208 @@ function isValidKeyframeOffset(offset) {
|
|
|
1230
1360
|
const value = parseInt(match[1], 10);
|
|
1231
1361
|
return value >= 0 && value <= 100;
|
|
1232
1362
|
}
|
|
1233
|
-
var keyframeOffsetSchema =
|
|
1363
|
+
var keyframeOffsetSchema = z13.string().transform((offset) => offset.trim()).refine(
|
|
1234
1364
|
(offset) => KEYFRAME_OFFSET_PATTERN.test(offset),
|
|
1235
1365
|
{ message: 'Invalid keyframe offset. Use percentages (0%, 50%, 100%) or "from"/"to"' }
|
|
1236
1366
|
).refine(
|
|
1237
1367
|
isValidKeyframeOffset,
|
|
1238
1368
|
{ message: "Keyframe offset must be between 0% and 100%" }
|
|
1239
1369
|
);
|
|
1240
|
-
var animationNameSchema =
|
|
1370
|
+
var animationNameSchema = z13.string().min(1, "Animation name is required").max(50, "Animation name too long").refine(
|
|
1241
1371
|
(name) => ANIMATION_NAME_PATTERN.test(name),
|
|
1242
1372
|
{ message: "Invalid animation name. Use letters, numbers, dashes, underscores (start with letter, dash, or underscore)" }
|
|
1243
1373
|
);
|
|
1244
|
-
var keyframeSchema =
|
|
1374
|
+
var keyframeSchema = z13.object({
|
|
1245
1375
|
offset: keyframeOffsetSchema,
|
|
1246
1376
|
declarations: declarationsSchema
|
|
1247
1377
|
});
|
|
1248
|
-
var keyframesAtRuleSchema =
|
|
1378
|
+
var keyframesAtRuleSchema = z13.object({
|
|
1249
1379
|
id: ruleIdSchema,
|
|
1250
|
-
type:
|
|
1380
|
+
type: z13.literal("keyframes"),
|
|
1251
1381
|
name: animationNameSchema,
|
|
1252
|
-
frames:
|
|
1382
|
+
frames: z13.array(keyframeSchema).min(1, "At least one keyframe is required")
|
|
1253
1383
|
});
|
|
1254
|
-
var fontFaceDeclarationsSchema =
|
|
1384
|
+
var fontFaceDeclarationsSchema = z13.record(z13.string().min(1).max(100), declarationValueSchema).refine(
|
|
1255
1385
|
(decls) => "fontFamily" in decls || "font-family" in decls,
|
|
1256
1386
|
{ message: "font-family is required in @font-face" }
|
|
1257
1387
|
);
|
|
1258
|
-
var fontFaceAtRuleSchema =
|
|
1388
|
+
var fontFaceAtRuleSchema = z13.object({
|
|
1259
1389
|
id: ruleIdSchema,
|
|
1260
|
-
type:
|
|
1390
|
+
type: z13.literal("font-face"),
|
|
1261
1391
|
declarations: fontFaceDeclarationsSchema
|
|
1262
1392
|
});
|
|
1263
|
-
var mediaQuerySchema =
|
|
1264
|
-
var mediaAtRuleSchema =
|
|
1393
|
+
var mediaQuerySchema = z13.string().min(1, "Media query is required").max(200, "Media query too long");
|
|
1394
|
+
var mediaAtRuleSchema = z13.object({
|
|
1265
1395
|
id: ruleIdSchema,
|
|
1266
|
-
type:
|
|
1396
|
+
type: z13.literal("media"),
|
|
1267
1397
|
query: mediaQuerySchema,
|
|
1268
|
-
rules:
|
|
1398
|
+
rules: z13.array(nestedRuleSchema).min(1, "At least one rule is required")
|
|
1269
1399
|
});
|
|
1270
|
-
var supportsConditionSchema =
|
|
1271
|
-
var supportsAtRuleSchema =
|
|
1400
|
+
var supportsConditionSchema = z13.string().min(1, "Supports condition is required").max(200, "Supports condition too long");
|
|
1401
|
+
var supportsAtRuleSchema = z13.object({
|
|
1272
1402
|
id: ruleIdSchema,
|
|
1273
|
-
type:
|
|
1403
|
+
type: z13.literal("supports"),
|
|
1274
1404
|
condition: supportsConditionSchema,
|
|
1275
|
-
rules:
|
|
1405
|
+
rules: z13.array(nestedRuleSchema).min(1, "At least one rule is required")
|
|
1276
1406
|
});
|
|
1277
1407
|
function containsBlockedAtRule(css) {
|
|
1278
1408
|
return BLOCKED_AT_RULE_PATTERN.test(css);
|
|
1279
1409
|
}
|
|
1280
|
-
var rawCssSchema =
|
|
1410
|
+
var rawCssSchema = z13.string().min(1, "CSS is required").max(5e3, "Raw CSS too long (max 5000 characters)").refine(
|
|
1281
1411
|
(css) => css.trim().startsWith("@"),
|
|
1282
1412
|
{ message: "Raw at-rule must start with @" }
|
|
1283
1413
|
).refine(
|
|
1284
1414
|
(css) => !containsBlockedAtRule(css),
|
|
1285
1415
|
{ message: `Blocked at-rules: ${BLOCKED_AT_RULES.join(", ")}. Use typed at-rules or local assets instead.` }
|
|
1286
1416
|
);
|
|
1287
|
-
var rawAtRuleSchema =
|
|
1417
|
+
var rawAtRuleSchema = z13.object({
|
|
1288
1418
|
id: ruleIdSchema,
|
|
1289
|
-
type:
|
|
1419
|
+
type: z13.literal("raw"),
|
|
1290
1420
|
css: rawCssSchema
|
|
1291
1421
|
});
|
|
1292
|
-
var customCssAtRuleSchema =
|
|
1422
|
+
var customCssAtRuleSchema = z13.discriminatedUnion("type", [
|
|
1293
1423
|
keyframesAtRuleSchema,
|
|
1294
1424
|
fontFaceAtRuleSchema,
|
|
1295
1425
|
mediaAtRuleSchema,
|
|
1296
1426
|
supportsAtRuleSchema,
|
|
1297
1427
|
rawAtRuleSchema
|
|
1298
1428
|
]);
|
|
1299
|
-
var customCssAtRulesSchema =
|
|
1429
|
+
var customCssAtRulesSchema = z13.array(customCssAtRuleSchema).optional();
|
|
1300
1430
|
|
|
1301
1431
|
// ../theme-core/src/shared/componentStyles.ts
|
|
1302
|
-
import { z as
|
|
1303
|
-
var componentBorderSchema =
|
|
1304
|
-
width:
|
|
1305
|
-
style:
|
|
1306
|
-
colorToken:
|
|
1432
|
+
import { z as z14 } from "zod";
|
|
1433
|
+
var componentBorderSchema = z14.object({
|
|
1434
|
+
width: z14.enum(["none", "hairline", "thin", "medium", "thick"]).default("none"),
|
|
1435
|
+
style: z14.enum(["solid", "dashed"]).default("solid"),
|
|
1436
|
+
colorToken: themeColorTokenSchema.optional()
|
|
1307
1437
|
// defaults to "border" if not set
|
|
1308
1438
|
});
|
|
1309
|
-
var componentShadowSchema =
|
|
1310
|
-
elevation:
|
|
1439
|
+
var componentShadowSchema = z14.object({
|
|
1440
|
+
elevation: z14.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("sm")
|
|
1311
1441
|
});
|
|
1312
1442
|
|
|
1443
|
+
// ../theme-core/src/utils/tokenOrColor.ts
|
|
1444
|
+
import { z as z15 } from "zod";
|
|
1445
|
+
var tokenOrCssColorValueSchema = z15.string();
|
|
1446
|
+
|
|
1313
1447
|
// ../theme-core/src/schema.ts
|
|
1314
|
-
var axesSchema =
|
|
1315
|
-
tone:
|
|
1316
|
-
energy:
|
|
1317
|
-
density:
|
|
1318
|
-
mediaBias:
|
|
1319
|
-
conversionBias:
|
|
1320
|
-
motion:
|
|
1321
|
-
});
|
|
1322
|
-
var colourHexString =
|
|
1323
|
-
var paletteColorSchema =
|
|
1324
|
-
name:
|
|
1448
|
+
var axesSchema = z16.object({
|
|
1449
|
+
tone: z16.enum(["minimal", "classic", "bold"]),
|
|
1450
|
+
energy: z16.enum(["calm", "vibrant"]),
|
|
1451
|
+
density: z16.enum(["airy", "regular", "compact"]),
|
|
1452
|
+
mediaBias: z16.enum(["text", "media", "mixed"]),
|
|
1453
|
+
conversionBias: z16.enum(["low", "med", "high"]),
|
|
1454
|
+
motion: z16.enum(["subtle", "standard", "expressive"])
|
|
1455
|
+
});
|
|
1456
|
+
var colourHexString = z16.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
|
|
1457
|
+
var paletteColorSchema = z16.object({
|
|
1458
|
+
name: z16.string().min(1),
|
|
1325
1459
|
hex: colourHexString
|
|
1326
1460
|
});
|
|
1327
|
-
var paletteMetaSchema =
|
|
1328
|
-
mode:
|
|
1461
|
+
var paletteMetaSchema = z16.object({
|
|
1462
|
+
mode: z16.enum(["light", "dark"])
|
|
1329
1463
|
});
|
|
1330
|
-
var paletteSchema =
|
|
1331
|
-
colors:
|
|
1464
|
+
var paletteSchema = z16.object({
|
|
1465
|
+
colors: z16.array(paletteColorSchema),
|
|
1332
1466
|
meta: paletteMetaSchema
|
|
1333
1467
|
});
|
|
1334
|
-
var typographyStyleSchema =
|
|
1335
|
-
family:
|
|
1336
|
-
weight:
|
|
1337
|
-
letterSpacing:
|
|
1338
|
-
lineHeight:
|
|
1468
|
+
var typographyStyleSchema = z16.object({
|
|
1469
|
+
family: z16.string().min(1),
|
|
1470
|
+
weight: z16.enum(["light", "regular", "medium", "semibold", "bold"]),
|
|
1471
|
+
letterSpacing: z16.enum(["tight", "normal", "loose"]),
|
|
1472
|
+
lineHeight: z16.enum(["normal", "relaxed", "loose"])
|
|
1339
1473
|
});
|
|
1340
1474
|
var bodyTypographyStyleSchema = typographyStyleSchema.extend({
|
|
1341
|
-
size:
|
|
1475
|
+
size: z16.enum(["md", "lg", "xl"])
|
|
1342
1476
|
});
|
|
1343
|
-
var headingSizeSchema =
|
|
1344
|
-
var headingTypographyOverridesSchema =
|
|
1345
|
-
weight:
|
|
1346
|
-
letterSpacing:
|
|
1477
|
+
var headingSizeSchema = z16.enum(["xs", "sm", "md", "lg", "xl", "2xl"]);
|
|
1478
|
+
var headingTypographyOverridesSchema = z16.object({
|
|
1479
|
+
weight: z16.enum(["light", "regular", "medium", "semibold", "bold"]).nullable().optional(),
|
|
1480
|
+
letterSpacing: z16.enum(["tight", "normal", "loose"]).nullable().optional(),
|
|
1347
1481
|
size: headingSizeSchema.nullable().optional(),
|
|
1348
|
-
lineHeight:
|
|
1349
|
-
italic:
|
|
1350
|
-
colorToken:
|
|
1351
|
-
// Palette token name for heading color
|
|
1482
|
+
lineHeight: z16.enum(["normal", "relaxed", "loose"]).nullable().optional(),
|
|
1483
|
+
italic: z16.boolean().nullable().optional(),
|
|
1484
|
+
colorToken: themeColorTokenSchema.nullable().optional()
|
|
1352
1485
|
});
|
|
1353
1486
|
var headingTypographyStyleSchema = typographyStyleSchema.extend({
|
|
1354
|
-
case:
|
|
1355
|
-
italic:
|
|
1356
|
-
colorToken:
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
var
|
|
1360
|
-
var
|
|
1361
|
-
var
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
hoverDecorationColorToken: z14.string().min(1).optional(),
|
|
1487
|
+
case: z16.enum(["uppercase", "normal", "smallCaps"]).nullable(),
|
|
1488
|
+
italic: z16.boolean().nullable(),
|
|
1489
|
+
colorToken: themeColorTokenSchema.nullable().optional()
|
|
1490
|
+
});
|
|
1491
|
+
var proseLinkUnderlineStyleSchema = z16.enum(["solid", "dotted", "dashed"]);
|
|
1492
|
+
var proseLinkUnderlineThicknessSchema = z16.enum(["auto", "fromFont", "thin", "medium", "thick"]);
|
|
1493
|
+
var proseLinkUnderlineOffsetSchema = z16.enum(["auto", "tight", "normal", "loose"]);
|
|
1494
|
+
var proseLinkStyleSchema = z16.object({
|
|
1495
|
+
colorToken: themeColorTokenSchema.optional(),
|
|
1496
|
+
hoverColorToken: themeColorTokenSchema.optional(),
|
|
1497
|
+
underline: z16.boolean().optional(),
|
|
1498
|
+
decorationColorToken: themeColorTokenSchema.optional(),
|
|
1499
|
+
hoverDecorationColorToken: themeColorTokenSchema.optional(),
|
|
1368
1500
|
underlineStyle: proseLinkUnderlineStyleSchema.optional(),
|
|
1369
1501
|
underlineThickness: proseLinkUnderlineThicknessSchema.optional(),
|
|
1370
1502
|
underlineOffset: proseLinkUnderlineOffsetSchema.optional()
|
|
1371
1503
|
});
|
|
1372
|
-
var semanticSpacingSchema =
|
|
1373
|
-
var boxRoundedSchema =
|
|
1374
|
-
var boxBackgroundOverlaySchema =
|
|
1375
|
-
type:
|
|
1376
|
-
color:
|
|
1377
|
-
gradient:
|
|
1378
|
-
opacity:
|
|
1379
|
-
});
|
|
1380
|
-
var boxBackgroundSchema =
|
|
1381
|
-
type:
|
|
1382
|
-
color:
|
|
1383
|
-
gradient:
|
|
1504
|
+
var semanticSpacingSchema = z16.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]);
|
|
1505
|
+
var boxRoundedSchema = z16.enum(["none", "sm", "md", "lg", "xl", "2xl", "full"]);
|
|
1506
|
+
var boxBackgroundOverlaySchema = z16.object({
|
|
1507
|
+
type: z16.enum(["none", "color", "gradient"]).nullable().optional(),
|
|
1508
|
+
color: tokenOrCssColorValueSchema.nullable().optional(),
|
|
1509
|
+
gradient: z16.string().nullable().optional(),
|
|
1510
|
+
opacity: z16.number().min(0).max(1).nullable().optional()
|
|
1511
|
+
});
|
|
1512
|
+
var boxBackgroundSchema = z16.object({
|
|
1513
|
+
type: z16.enum(["color", "gradient", "image"]).optional(),
|
|
1514
|
+
color: tokenOrCssColorValueSchema.nullable().optional(),
|
|
1515
|
+
gradient: z16.string().nullable().optional(),
|
|
1384
1516
|
image: mediaSchema.nullable().optional(),
|
|
1385
|
-
objectFit:
|
|
1386
|
-
scale:
|
|
1387
|
-
position:
|
|
1388
|
-
opacity:
|
|
1389
|
-
motion:
|
|
1517
|
+
objectFit: z16.enum(["fill", "fit", "original", "custom"]).nullable().optional(),
|
|
1518
|
+
scale: z16.string().nullable().optional(),
|
|
1519
|
+
position: z16.string().nullable().optional(),
|
|
1520
|
+
opacity: z16.number().min(0).max(1).nullable().optional(),
|
|
1521
|
+
motion: z16.enum(["static", "fixed-frame"]).nullable().optional(),
|
|
1390
1522
|
overlay: boxBackgroundOverlaySchema.nullable().optional(),
|
|
1391
|
-
textColor:
|
|
1392
|
-
headingColor:
|
|
1523
|
+
textColor: tokenOrCssColorValueSchema.nullable().optional(),
|
|
1524
|
+
headingColor: tokenOrCssColorValueSchema.nullable().optional()
|
|
1393
1525
|
});
|
|
1394
|
-
var sectionStylesOverrideSchema =
|
|
1526
|
+
var sectionStylesOverrideSchema = z16.object({
|
|
1395
1527
|
background: boxBackgroundSchema.nullable().optional(),
|
|
1396
1528
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
1397
|
-
minHeight:
|
|
1398
|
-
tileTreatment:
|
|
1399
|
-
eyebrowTreatment:
|
|
1529
|
+
minHeight: z16.enum(["none", "banner", "hero", "immersive"]).nullable().optional(),
|
|
1530
|
+
tileTreatment: z16.enum(tileTreatmentValues).nullable().optional(),
|
|
1531
|
+
eyebrowTreatment: z16.enum(eyebrowTreatmentValues).nullable().optional()
|
|
1400
1532
|
});
|
|
1401
|
-
var containerStylesOverrideSchema =
|
|
1533
|
+
var containerStylesOverrideSchema = z16.object({
|
|
1402
1534
|
background: boxBackgroundSchema.nullable().optional(),
|
|
1403
1535
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
1404
|
-
raised:
|
|
1536
|
+
raised: z16.boolean().nullable().optional(),
|
|
1405
1537
|
rounded: boxRoundedSchema.nullable().optional(),
|
|
1406
|
-
fullWidth:
|
|
1538
|
+
fullWidth: z16.boolean().nullable().optional()
|
|
1407
1539
|
});
|
|
1408
|
-
var cardBorderOverrideSchema =
|
|
1409
|
-
enabled:
|
|
1410
|
-
width:
|
|
1411
|
-
colorToken:
|
|
1540
|
+
var cardBorderOverrideSchema = z16.object({
|
|
1541
|
+
enabled: z16.boolean().nullable().optional(),
|
|
1542
|
+
width: z16.enum(["none", "1", "2", "3"]).nullable().optional(),
|
|
1543
|
+
colorToken: themeColorTokenSchema.nullable().optional()
|
|
1412
1544
|
});
|
|
1413
|
-
var cardStylesOverrideSchema =
|
|
1545
|
+
var cardStylesOverrideSchema = z16.object({
|
|
1414
1546
|
background: boxBackgroundSchema.nullable().optional(),
|
|
1415
1547
|
border: cardBorderOverrideSchema.nullable().optional(),
|
|
1416
1548
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
1417
|
-
raised:
|
|
1549
|
+
raised: z16.boolean().nullable().optional(),
|
|
1418
1550
|
rounded: boxRoundedSchema.nullable().optional(),
|
|
1419
|
-
treatment:
|
|
1551
|
+
treatment: z16.enum(["accent-quote"]).nullable().optional()
|
|
1420
1552
|
});
|
|
1421
|
-
var blockStyleOverridesSchema =
|
|
1553
|
+
var blockStyleOverridesSchema = z16.object({
|
|
1422
1554
|
sectionStyles: sectionStylesOverrideSchema.nullable().optional(),
|
|
1423
1555
|
containerStyles: containerStylesOverrideSchema.nullable().optional(),
|
|
1424
1556
|
cardStyles: cardStylesOverrideSchema.nullable().optional()
|
|
1425
1557
|
});
|
|
1426
|
-
var blockThemeOverrideSchema =
|
|
1427
|
-
typography:
|
|
1558
|
+
var blockThemeOverrideSchema = z16.object({
|
|
1559
|
+
typography: z16.object({
|
|
1428
1560
|
proseLinkStyle: proseLinkStyleSchema.optional()
|
|
1429
1561
|
}).optional(),
|
|
1430
1562
|
styles: blockStyleOverridesSchema.optional()
|
|
1431
1563
|
});
|
|
1432
|
-
var typographyScaleSchema =
|
|
1564
|
+
var typographyScaleSchema = z16.enum([
|
|
1433
1565
|
// New intuitive names
|
|
1434
1566
|
"compact",
|
|
1435
1567
|
// ratio 1.2 (was minorThird)
|
|
@@ -1442,9 +1574,9 @@ var typographyScaleSchema = z14.enum([
|
|
|
1442
1574
|
"majorThird",
|
|
1443
1575
|
"perfectFourth"
|
|
1444
1576
|
]);
|
|
1445
|
-
var typographySchema =
|
|
1577
|
+
var typographySchema = z16.object({
|
|
1446
1578
|
body: bodyTypographyStyleSchema,
|
|
1447
|
-
headings:
|
|
1579
|
+
headings: z16.object({
|
|
1448
1580
|
default: headingTypographyStyleSchema,
|
|
1449
1581
|
h1: headingTypographyOverridesSchema,
|
|
1450
1582
|
h2: headingTypographyOverridesSchema,
|
|
@@ -1457,122 +1589,115 @@ var typographySchema = z14.object({
|
|
|
1457
1589
|
scale: typographyScaleSchema,
|
|
1458
1590
|
proseLinkStyle: proseLinkStyleSchema.optional()
|
|
1459
1591
|
});
|
|
1460
|
-
var spaceSchema =
|
|
1461
|
-
var corners =
|
|
1462
|
-
var shadow =
|
|
1463
|
-
elevation:
|
|
1464
|
-
softness:
|
|
1465
|
-
position:
|
|
1592
|
+
var spaceSchema = z16.enum(["comfortable", "standard", "dense"]);
|
|
1593
|
+
var corners = z16.enum(["square", "soft", "rounded", "pill"]);
|
|
1594
|
+
var shadow = z16.object({
|
|
1595
|
+
elevation: z16.enum(["none", "low", "medium", "high"]),
|
|
1596
|
+
softness: z16.enum(["crisp", "soft", "hard"]).nullable(),
|
|
1597
|
+
position: z16.enum(["bottom", "bottom-right"]).default("bottom")
|
|
1466
1598
|
});
|
|
1467
|
-
var border =
|
|
1468
|
-
width:
|
|
1469
|
-
style:
|
|
1599
|
+
var border = z16.object({
|
|
1600
|
+
width: z16.enum(["none", "hairline", "thin", "thick"]),
|
|
1601
|
+
style: z16.enum(["solid", "dashed"])
|
|
1470
1602
|
});
|
|
1471
|
-
var motion =
|
|
1472
|
-
level:
|
|
1473
|
-
easing:
|
|
1603
|
+
var motion = z16.object({
|
|
1604
|
+
level: z16.enum(["off", "low", "medium", "high"]),
|
|
1605
|
+
easing: z16.enum(["standard", "snappy", "gentle"]).nullable()
|
|
1474
1606
|
});
|
|
1475
|
-
var buttonStyle =
|
|
1607
|
+
var buttonStyle = z16.object({
|
|
1476
1608
|
shape: corners
|
|
1477
1609
|
// Used for --radius-control CSS variable
|
|
1478
1610
|
});
|
|
1479
|
-
var cardStyle =
|
|
1480
|
-
elevation:
|
|
1481
|
-
border:
|
|
1611
|
+
var cardStyle = z16.object({
|
|
1612
|
+
elevation: z16.enum(["none", "low", "medium", "high"]),
|
|
1613
|
+
border: z16.enum(["none", "subtle", "defined"]),
|
|
1482
1614
|
shape: corners,
|
|
1483
|
-
headerStyle:
|
|
1484
|
-
mediaTreatment:
|
|
1615
|
+
headerStyle: z16.enum(["plain", "accentBar", "subtleBg"]).nullable(),
|
|
1616
|
+
mediaTreatment: z16.enum(["square", "rounded", "bleed"]).nullable()
|
|
1485
1617
|
});
|
|
1486
|
-
var inputStyle =
|
|
1618
|
+
var inputStyle = z16.object({
|
|
1487
1619
|
shape: corners,
|
|
1488
|
-
border:
|
|
1489
|
-
focus:
|
|
1490
|
-
label:
|
|
1491
|
-
});
|
|
1492
|
-
var headerVariant =
|
|
1493
|
-
var headerPositioning =
|
|
1494
|
-
var headerNavStyle =
|
|
1495
|
-
var navFontWeight =
|
|
1496
|
-
var headerMaxWidth =
|
|
1497
|
-
var headerContainerSchema =
|
|
1498
|
-
rounded:
|
|
1499
|
-
border:
|
|
1500
|
-
shadow:
|
|
1501
|
-
padding:
|
|
1502
|
-
tint:
|
|
1503
|
-
opacity:
|
|
1620
|
+
border: z16.enum(["subtle", "defined", "underline"]),
|
|
1621
|
+
focus: z16.enum(["glow", "ring", "underline"]),
|
|
1622
|
+
label: z16.enum(["inside", "above"])
|
|
1623
|
+
});
|
|
1624
|
+
var headerVariant = z16.enum(["classic", "centered", "transparent", "floating", "editorial"]);
|
|
1625
|
+
var headerPositioning = z16.enum(["static", "sticky", "fixed"]);
|
|
1626
|
+
var headerNavStyle = z16.enum(["minimal", "underline", "underline-grow", "capsule", "scale", "frosted", "solid"]);
|
|
1627
|
+
var navFontWeight = z16.enum(["regular", "medium", "semibold", "bold"]);
|
|
1628
|
+
var headerMaxWidth = z16.enum(["container", "full"]);
|
|
1629
|
+
var headerContainerSchema = z16.object({
|
|
1630
|
+
rounded: z16.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("xl"),
|
|
1631
|
+
border: z16.boolean().default(true),
|
|
1632
|
+
shadow: z16.boolean().default(true),
|
|
1633
|
+
padding: z16.enum(["sm", "md", "lg"]).default("md"),
|
|
1634
|
+
tint: z16.string().nullable().optional(),
|
|
1635
|
+
opacity: z16.number().min(0).max(1).default(0.12)
|
|
1504
1636
|
}).optional();
|
|
1505
1637
|
var headerBorderSchema = componentBorderSchema.extend({
|
|
1506
|
-
position:
|
|
1638
|
+
position: z16.enum(["bottom", "top", "both", "none"]).default("bottom")
|
|
1507
1639
|
}).optional();
|
|
1508
|
-
var logoStyleSchema =
|
|
1509
|
-
fontFamily:
|
|
1510
|
-
letterSpacing:
|
|
1511
|
-
gradient:
|
|
1640
|
+
var logoStyleSchema = z16.object({
|
|
1641
|
+
fontFamily: z16.enum(["heading", "body"]).default("heading"),
|
|
1642
|
+
letterSpacing: z16.enum(["normal", "wide", "wider", "widest"]).default("normal"),
|
|
1643
|
+
gradient: z16.boolean().default(false)
|
|
1512
1644
|
}).optional();
|
|
1513
|
-
var headerLogoTextSchema =
|
|
1514
|
-
mobileWrapLines:
|
|
1515
|
-
mobileMaxWidth:
|
|
1516
|
-
hideOnShrink:
|
|
1645
|
+
var headerLogoTextSchema = z16.object({
|
|
1646
|
+
mobileWrapLines: z16.union([z16.literal(1), z16.literal(2)]).optional(),
|
|
1647
|
+
mobileMaxWidth: z16.enum(["xs", "sm", "md"]).optional(),
|
|
1648
|
+
hideOnShrink: z16.boolean().optional()
|
|
1517
1649
|
}).optional();
|
|
1518
|
-
var navEffectsSchema =
|
|
1519
|
-
underlineGradient:
|
|
1520
|
-
glow:
|
|
1521
|
-
glowColor:
|
|
1522
|
-
neumorphic:
|
|
1650
|
+
var navEffectsSchema = z16.object({
|
|
1651
|
+
underlineGradient: z16.boolean().default(false),
|
|
1652
|
+
glow: z16.boolean().default(false),
|
|
1653
|
+
glowColor: z16.string().optional(),
|
|
1654
|
+
neumorphic: z16.boolean().default(false)
|
|
1523
1655
|
}).optional();
|
|
1524
|
-
var dropdownStyleSchema =
|
|
1656
|
+
var dropdownStyleSchema = z16.object({
|
|
1525
1657
|
// Container styling
|
|
1526
|
-
background:
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
// null = no border
|
|
1532
|
-
shadow: z14.enum(["none", "sm", "md", "lg"]).default("md"),
|
|
1533
|
-
borderRadius: z14.enum(["none", "sm", "md", "lg"]).default("md"),
|
|
1658
|
+
background: themeColorTokenSchema.default("surface"),
|
|
1659
|
+
textColor: themeColorTokenSchema.default("text"),
|
|
1660
|
+
borderColor: themeColorTokenSchema.nullable().default("border"),
|
|
1661
|
+
shadow: z16.enum(["none", "sm", "md", "lg"]).default("md"),
|
|
1662
|
+
borderRadius: z16.enum(["none", "sm", "md", "lg"]).default("md"),
|
|
1534
1663
|
// Link hover states (explicit control)
|
|
1535
|
-
hoverBackground:
|
|
1536
|
-
|
|
1537
|
-
hoverTextColor: z14.string().nullable().optional(),
|
|
1538
|
-
// color token, null = inherit
|
|
1664
|
+
hoverBackground: themeColorTokenSchema.nullable().optional(),
|
|
1665
|
+
hoverTextColor: themeColorTokenSchema.nullable().optional(),
|
|
1539
1666
|
// Typography
|
|
1540
|
-
textTransform:
|
|
1541
|
-
letterSpacing:
|
|
1542
|
-
fontWeight:
|
|
1667
|
+
textTransform: z16.enum(["none", "uppercase", "capitalize"]).default("none"),
|
|
1668
|
+
letterSpacing: z16.enum(["normal", "wide", "wider"]).default("normal"),
|
|
1669
|
+
fontWeight: z16.enum(["regular", "medium", "semibold", "bold"]).optional(),
|
|
1543
1670
|
// optional = inherit from navWeight
|
|
1544
|
-
textSize:
|
|
1671
|
+
textSize: z16.enum(["xs", "sm", "base", "lg"]).optional()
|
|
1545
1672
|
// optional = no override (browser default)
|
|
1546
1673
|
}).optional();
|
|
1547
|
-
var headerCtaGapSchema =
|
|
1548
|
-
var headerCtaTreatmentSchema =
|
|
1549
|
-
var navContainerSchema =
|
|
1550
|
-
type:
|
|
1551
|
-
tint:
|
|
1552
|
-
opacity:
|
|
1674
|
+
var headerCtaGapSchema = z16.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
|
|
1675
|
+
var headerCtaTreatmentSchema = z16.enum(["default", "primary", "secondary", "inverted", "outline", "ghost"]);
|
|
1676
|
+
var navContainerSchema = z16.object({
|
|
1677
|
+
type: z16.enum(["none", "pill", "glass"]).default("none"),
|
|
1678
|
+
tint: z16.string().nullable().optional(),
|
|
1679
|
+
opacity: z16.number().min(0).max(1).default(0.15)
|
|
1553
1680
|
}).default({ type: "none", tint: null, opacity: 0.15 });
|
|
1554
|
-
var headerBackgroundSchema =
|
|
1555
|
-
type:
|
|
1556
|
-
color:
|
|
1681
|
+
var headerBackgroundSchema = z16.object({
|
|
1682
|
+
type: z16.enum(["color", "gradient", "image"]),
|
|
1683
|
+
color: tokenOrCssColorValueSchema.nullable().optional(),
|
|
1557
1684
|
gradient: gradientConfigSchema.nullable().optional(),
|
|
1558
1685
|
image: mediaSchema.nullable().optional(),
|
|
1559
|
-
textColor:
|
|
1686
|
+
textColor: tokenOrCssColorValueSchema.nullable().optional()
|
|
1560
1687
|
});
|
|
1561
|
-
var headerSchema =
|
|
1688
|
+
var headerSchema = z16.object({
|
|
1562
1689
|
variant: headerVariant,
|
|
1563
1690
|
positioning: headerPositioning,
|
|
1564
|
-
shrinkOnScroll:
|
|
1691
|
+
shrinkOnScroll: z16.boolean(),
|
|
1565
1692
|
maxWidth: headerMaxWidth,
|
|
1566
1693
|
logoOverride: mediaSchema.nullable().optional(),
|
|
1567
1694
|
background: headerBackgroundSchema.default({
|
|
1568
1695
|
type: "color",
|
|
1569
1696
|
color: "surface"
|
|
1570
1697
|
}),
|
|
1571
|
-
textColor:
|
|
1572
|
-
// Site title and general header text
|
|
1698
|
+
textColor: themeColorTokenSchema.nullable().optional(),
|
|
1573
1699
|
navStyle: headerNavStyle,
|
|
1574
|
-
navColor:
|
|
1575
|
-
// Nav links (inherits textColor if not set)
|
|
1700
|
+
navColor: themeColorTokenSchema.nullable().optional(),
|
|
1576
1701
|
navWeight: navFontWeight.default("medium"),
|
|
1577
1702
|
// New fields for header system enhancement
|
|
1578
1703
|
container: headerContainerSchema,
|
|
@@ -1593,54 +1718,54 @@ var headerSchema = z14.object({
|
|
|
1593
1718
|
// Optional theme-level CTA variant for header/nav CTA buttons.
|
|
1594
1719
|
// Internal runtime bridge for the block renderer; prefer ctaTreatment in
|
|
1595
1720
|
// authored Theme V2 concepts.
|
|
1596
|
-
ctaVariant:
|
|
1721
|
+
ctaVariant: z16.string().min(1).optional(),
|
|
1597
1722
|
// Dropdown menu styling (nav dropdowns and mobile drawer)
|
|
1598
1723
|
dropdownStyle: dropdownStyleSchema
|
|
1599
1724
|
});
|
|
1600
|
-
var footerVariant =
|
|
1601
|
-
var footerMaxWidth =
|
|
1602
|
-
var footerMode =
|
|
1603
|
-
var footerNavLayoutMode =
|
|
1604
|
-
var footerNavLayoutAlign =
|
|
1605
|
-
var footerSpacing =
|
|
1606
|
-
var footerLogoPlacement =
|
|
1607
|
-
var footerLogoSize =
|
|
1608
|
-
var footerLogoMaxHeight =
|
|
1609
|
-
var footerBottomTextLinkStyleSchema =
|
|
1610
|
-
colorToken:
|
|
1611
|
-
hoverColorToken:
|
|
1612
|
-
decorationColorToken:
|
|
1613
|
-
underline:
|
|
1614
|
-
});
|
|
1615
|
-
var footerBottomBarSchema =
|
|
1616
|
-
enabled:
|
|
1617
|
-
fullBleed:
|
|
1725
|
+
var footerVariant = z16.enum(["simple", "columns", "split"]);
|
|
1726
|
+
var footerMaxWidth = z16.enum(["container", "full"]);
|
|
1727
|
+
var footerMode = z16.enum(["default", "blocks", "default+blocks", "none"]);
|
|
1728
|
+
var footerNavLayoutMode = z16.enum(["stack", "inline", "inline-wrap"]);
|
|
1729
|
+
var footerNavLayoutAlign = z16.enum(["start", "center", "end", "space-between"]);
|
|
1730
|
+
var footerSpacing = z16.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
|
|
1731
|
+
var footerLogoPlacement = z16.enum(["left", "right", "above", "below"]);
|
|
1732
|
+
var footerLogoSize = z16.enum(["sm", "md", "lg", "xl"]);
|
|
1733
|
+
var footerLogoMaxHeight = z16.enum(["sm", "md", "lg", "xl"]);
|
|
1734
|
+
var footerBottomTextLinkStyleSchema = z16.object({
|
|
1735
|
+
colorToken: themeColorTokenSchema.optional(),
|
|
1736
|
+
hoverColorToken: themeColorTokenSchema.nullable().optional(),
|
|
1737
|
+
decorationColorToken: themeColorTokenSchema.nullable().optional(),
|
|
1738
|
+
underline: z16.boolean().optional()
|
|
1739
|
+
});
|
|
1740
|
+
var footerBottomBarSchema = z16.object({
|
|
1741
|
+
enabled: z16.boolean().optional(),
|
|
1742
|
+
fullBleed: z16.boolean().optional(),
|
|
1618
1743
|
background: headerBackgroundSchema.optional(),
|
|
1619
|
-
textColor:
|
|
1620
|
-
textAlign:
|
|
1744
|
+
textColor: themeColorTokenSchema.nullable().optional(),
|
|
1745
|
+
textAlign: z16.enum(["left", "center", "right"]).optional(),
|
|
1621
1746
|
paddingY: footerSpacing.optional(),
|
|
1622
1747
|
paddingX: footerSpacing.optional(),
|
|
1623
|
-
borderTop:
|
|
1624
|
-
colorToken:
|
|
1625
|
-
width:
|
|
1748
|
+
borderTop: z16.object({
|
|
1749
|
+
colorToken: themeColorTokenSchema.nullable().optional(),
|
|
1750
|
+
width: z16.enum(["none", "thin", "medium", "thick"]).optional()
|
|
1626
1751
|
}).optional()
|
|
1627
1752
|
});
|
|
1628
|
-
var footerNavLayoutSchema =
|
|
1753
|
+
var footerNavLayoutSchema = z16.object({
|
|
1629
1754
|
layout: footerNavLayoutMode.optional(),
|
|
1630
1755
|
align: footerNavLayoutAlign.optional(),
|
|
1631
1756
|
gapX: footerSpacing.optional(),
|
|
1632
1757
|
gapY: footerSpacing.optional(),
|
|
1633
|
-
columns:
|
|
1758
|
+
columns: z16.number().int().min(1).max(6).optional()
|
|
1634
1759
|
});
|
|
1635
|
-
var footerLogoSchema =
|
|
1636
|
-
showLogo:
|
|
1637
|
-
showLogoText:
|
|
1760
|
+
var footerLogoSchema = z16.object({
|
|
1761
|
+
showLogo: z16.boolean().default(true),
|
|
1762
|
+
showLogoText: z16.boolean().optional(),
|
|
1638
1763
|
placement: footerLogoPlacement.optional(),
|
|
1639
1764
|
size: footerLogoSize.optional(),
|
|
1640
1765
|
maxHeight: footerLogoMaxHeight.optional(),
|
|
1641
|
-
align:
|
|
1766
|
+
align: z16.enum(["start", "center", "end"]).optional()
|
|
1642
1767
|
});
|
|
1643
|
-
var footerSchema =
|
|
1768
|
+
var footerSchema = z16.object({
|
|
1644
1769
|
/**
|
|
1645
1770
|
* SDK-only footer rendering mode.
|
|
1646
1771
|
*
|
|
@@ -1649,14 +1774,14 @@ var footerSchema = z14.object({
|
|
|
1649
1774
|
mode: footerMode.optional(),
|
|
1650
1775
|
variant: footerVariant,
|
|
1651
1776
|
maxWidth: footerMaxWidth,
|
|
1652
|
-
showLogoText:
|
|
1777
|
+
showLogoText: z16.boolean().optional(),
|
|
1653
1778
|
background: headerBackgroundSchema.default({
|
|
1654
1779
|
type: "color",
|
|
1655
1780
|
color: "surface"
|
|
1656
1781
|
}),
|
|
1657
1782
|
// Footer nav styling (independent from header)
|
|
1658
1783
|
navStyle: headerNavStyle.default("minimal"),
|
|
1659
|
-
navColor:
|
|
1784
|
+
navColor: themeColorTokenSchema.nullable().optional(),
|
|
1660
1785
|
navWeight: navFontWeight.default("medium"),
|
|
1661
1786
|
// Full nav link customization (overrides navStyle if set)
|
|
1662
1787
|
navLinkStyle: navLinkStyleSchema.optional(),
|
|
@@ -1667,23 +1792,23 @@ var footerSchema = z14.object({
|
|
|
1667
1792
|
logo: footerLogoSchema.optional(),
|
|
1668
1793
|
bottomBar: footerBottomBarSchema.optional()
|
|
1669
1794
|
});
|
|
1670
|
-
var containerPaddingPresetSchema =
|
|
1671
|
-
var layoutSchema =
|
|
1672
|
-
containerPadding:
|
|
1795
|
+
var containerPaddingPresetSchema = z16.enum(["tight", "compact", "default", "relaxed"]);
|
|
1796
|
+
var layoutSchema = z16.object({
|
|
1797
|
+
containerPadding: z16.object({
|
|
1673
1798
|
mobile: containerPaddingPresetSchema.optional(),
|
|
1674
1799
|
tablet: containerPaddingPresetSchema.optional(),
|
|
1675
1800
|
desktop: containerPaddingPresetSchema.optional()
|
|
1676
1801
|
}).optional()
|
|
1677
1802
|
}).optional();
|
|
1678
|
-
var heroTypographySizeSchema =
|
|
1679
|
-
var heroTypographyLineHeightSchema =
|
|
1680
|
-
var heroResponsiveTypographySchema =
|
|
1803
|
+
var heroTypographySizeSchema = z16.enum(["sm", "base", "lg", "xl", "2xl", "3xl", "4xl", "5xl", "6xl", "editorial"]);
|
|
1804
|
+
var heroTypographyLineHeightSchema = z16.enum(["tight", "snug", "normal", "relaxed"]);
|
|
1805
|
+
var heroResponsiveTypographySchema = z16.object({
|
|
1681
1806
|
headlineSize: heroTypographySizeSchema.optional(),
|
|
1682
1807
|
headlineLineHeight: heroTypographyLineHeightSchema.optional(),
|
|
1683
1808
|
subheadlineSize: heroTypographySizeSchema.optional(),
|
|
1684
1809
|
subheadlineLineHeight: heroTypographyLineHeightSchema.optional()
|
|
1685
1810
|
});
|
|
1686
|
-
var heroTypographySchema =
|
|
1811
|
+
var heroTypographySchema = z16.object({
|
|
1687
1812
|
headlineSize: heroTypographySizeSchema.optional(),
|
|
1688
1813
|
headlineLineHeight: heroTypographyLineHeightSchema.optional(),
|
|
1689
1814
|
subheadlineSize: heroTypographySizeSchema.optional(),
|
|
@@ -1692,31 +1817,31 @@ var heroTypographySchema = z14.object({
|
|
|
1692
1817
|
microHeadlineLineHeight: heroTypographyLineHeightSchema.optional(),
|
|
1693
1818
|
microSubheadlineSize: heroTypographySizeSchema.optional(),
|
|
1694
1819
|
microSubheadlineLineHeight: heroTypographyLineHeightSchema.optional(),
|
|
1695
|
-
responsive:
|
|
1820
|
+
responsive: z16.object({
|
|
1696
1821
|
tablet: heroResponsiveTypographySchema.optional(),
|
|
1697
1822
|
mobile: heroResponsiveTypographySchema.optional()
|
|
1698
1823
|
}).optional()
|
|
1699
1824
|
});
|
|
1700
|
-
var heroSchema =
|
|
1825
|
+
var heroSchema = z16.object({
|
|
1701
1826
|
typography: heroTypographySchema.optional()
|
|
1702
1827
|
}).optional();
|
|
1703
|
-
var bodyTextIntroTypographySizeSchema =
|
|
1704
|
-
var bodyTextSchema =
|
|
1705
|
-
intro:
|
|
1828
|
+
var bodyTextIntroTypographySizeSchema = z16.enum(["default", "editorial"]);
|
|
1829
|
+
var bodyTextSchema = z16.object({
|
|
1830
|
+
intro: z16.object({
|
|
1706
1831
|
paragraphSize: bodyTextIntroTypographySizeSchema.optional(),
|
|
1707
1832
|
headingSize: bodyTextIntroTypographySizeSchema.optional()
|
|
1708
1833
|
}).optional()
|
|
1709
1834
|
}).optional();
|
|
1710
|
-
var gradientsSchema =
|
|
1711
|
-
button:
|
|
1712
|
-
hero:
|
|
1713
|
-
background:
|
|
1714
|
-
});
|
|
1715
|
-
var themeSchema =
|
|
1716
|
-
name:
|
|
1717
|
-
description:
|
|
1718
|
-
rationale:
|
|
1719
|
-
siteStyleId:
|
|
1835
|
+
var gradientsSchema = z16.object({
|
|
1836
|
+
button: z16.string().min(1).nullable().optional(),
|
|
1837
|
+
hero: z16.string().min(1).nullable().optional(),
|
|
1838
|
+
background: z16.string().min(1).nullable().optional()
|
|
1839
|
+
});
|
|
1840
|
+
var themeSchema = z16.object({
|
|
1841
|
+
name: z16.string().min(1).max(30),
|
|
1842
|
+
description: z16.string().min(1).max(400),
|
|
1843
|
+
rationale: z16.string().min(1).max(400),
|
|
1844
|
+
siteStyleId: z16.string().min(1).transform((value) => asSiteStyleId(value)).optional(),
|
|
1720
1845
|
axes: axesSchema,
|
|
1721
1846
|
palette: paletteSchema,
|
|
1722
1847
|
typography: typographySchema,
|
|
@@ -1744,15 +1869,15 @@ var themeSchema = z14.object({
|
|
|
1744
1869
|
// Block-specific customization (Tier 3)
|
|
1745
1870
|
// blockCustomVars: Per-block CSS variable overrides as bare values
|
|
1746
1871
|
// Example: { "event-registration": { "--step-color": "#6d28d9" } }
|
|
1747
|
-
blockCustomVars:
|
|
1748
|
-
|
|
1872
|
+
blockCustomVars: z16.record(
|
|
1873
|
+
z16.string(),
|
|
1749
1874
|
// block kind (matches data-block attribute)
|
|
1750
|
-
|
|
1875
|
+
z16.record(z16.string(), z16.string())
|
|
1751
1876
|
// { '--var-name': 'value' }
|
|
1752
1877
|
).optional(),
|
|
1753
1878
|
// Structured block-kind theme overrides (v1: typography prose-link style only)
|
|
1754
1879
|
// Keyed by block kind (usually data-block value like "hero"; "block.hero" also accepted)
|
|
1755
|
-
blockOverrides:
|
|
1880
|
+
blockOverrides: z16.record(z16.string(), blockThemeOverrideSchema).optional(),
|
|
1756
1881
|
// Structured custom CSS rules
|
|
1757
1882
|
// Validated, scoped, and safe by construction - no @import, remote url(), or global selectors
|
|
1758
1883
|
customCssRules: customCssRulesSchema,
|
|
@@ -1786,11 +1911,11 @@ var themeSchema = z14.object({
|
|
|
1786
1911
|
* }
|
|
1787
1912
|
* ```
|
|
1788
1913
|
*/
|
|
1789
|
-
styleGroups:
|
|
1914
|
+
styleGroups: z16.record(z16.string(), z16.array(z16.string())).optional()
|
|
1790
1915
|
});
|
|
1791
|
-
var themesTurnSchema =
|
|
1792
|
-
message:
|
|
1793
|
-
themes:
|
|
1916
|
+
var themesTurnSchema = z16.object({
|
|
1917
|
+
message: z16.string().min(1),
|
|
1918
|
+
themes: z16.array(themeSchema).length(3)
|
|
1794
1919
|
});
|
|
1795
1920
|
|
|
1796
1921
|
// src/theme/loader.ts
|