@riverbankcms/sdk 0.60.3 → 0.60.7

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.
Files changed (126) hide show
  1. package/dist/_dts/api/src/appointmentSetup.d.ts +2 -2
  2. package/dist/_dts/api/src/bookingConfig.d.ts +6 -0
  3. package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +45 -3
  4. package/dist/_dts/api/src/bookingOperations.d.ts +40 -3
  5. package/dist/_dts/api/src/bookingVerticals.d.ts +1 -0
  6. package/dist/_dts/api/src/courses.d.ts +1 -5
  7. package/dist/_dts/api/src/endpoints.d.ts +80 -1
  8. package/dist/_dts/api/src/index.d.ts +3 -2
  9. package/dist/_dts/api/src/navigation/contracts.d.ts +9 -9
  10. package/dist/_dts/api/src/public/endpoints.d.ts +1 -1
  11. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +15 -1
  12. package/dist/_dts/api/src/resources.d.ts +1 -1
  13. package/dist/_dts/api/src/siteBanner.d.ts +8 -8
  14. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +3 -39
  15. package/dist/_dts/api/src/siteOnboarding.d.ts +1 -0
  16. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +2 -0
  17. package/dist/_dts/api/src/teamMembers.d.ts +27 -0
  18. package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +35 -29
  19. package/dist/_dts/blocks/src/system/blocks/courses/shared/types.d.ts +1 -5
  20. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +40 -34
  21. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +1 -5
  22. package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +1 -1
  23. package/dist/_dts/blocks/src/system/blocks/products/shared.d.ts +2 -2
  24. package/dist/_dts/blocks/src/system/blocks/shared/bookingPaymentTerms.d.ts +9 -9
  25. package/dist/_dts/blocks/src/system/blocks/shared/teamMembers.d.ts +24 -0
  26. package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +18 -8
  27. package/dist/_dts/blocks/src/system/constants/background.d.ts +1 -1
  28. package/dist/_dts/blocks/src/system/data/loaderEndpoints.d.ts +1 -1
  29. package/dist/_dts/blocks/src/system/data/utils.d.ts +1 -1
  30. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +201 -201
  31. package/dist/_dts/blocks/src/system/manifest/validation.d.ts +2 -2
  32. package/dist/_dts/blocks/src/system/node/fragments/ctaButton.d.ts +2 -0
  33. package/dist/_dts/blocks/src/system/node/schema.d.ts +5 -5
  34. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +1 -1
  35. package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +4 -4
  36. package/dist/_dts/blocks/src/system/runtime/shared/themedButtonClass.d.ts +11 -0
  37. package/dist/_dts/blocks/src/system/transforms/registry/ui.d.ts +1 -1
  38. package/dist/_dts/blocks/src/system/transforms/typed.d.ts +3 -3
  39. package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +10 -2
  40. package/dist/_dts/content-model/src/content-types/schema.d.ts +8 -8
  41. package/dist/_dts/content-model/src/metadataConfig.d.ts +1 -0
  42. package/dist/_dts/core/src/branded.d.ts +2 -0
  43. package/dist/_dts/core/src/participants.d.ts +32 -1
  44. package/dist/_dts/core/src/rectification.d.ts +79 -0
  45. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +130 -14
  46. package/dist/_dts/db/src/schemas/forms.d.ts +61 -61
  47. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +17 -15
  48. package/dist/_dts/sdk/src/client/types.d.ts +10 -2
  49. package/dist/_dts/sdk/src/config/types.d.ts +1 -1
  50. package/dist/_dts/sdk/src/config/validation.d.ts +40 -37
  51. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +17 -8
  52. package/dist/_dts/sdk/src/data/prefetchBlockData.d.ts +1 -1
  53. package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +19 -19
  54. package/dist/_dts/sdk/src/public-api/contracts.d.ts +87 -69
  55. package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
  56. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +2 -5
  57. package/dist/_dts/sdk/src/version.d.ts +1 -1
  58. package/dist/_dts/theme-core/src/accordions/types.d.ts +11 -11
  59. package/dist/_dts/theme-core/src/buttons/personalities/brushed-wash.d.ts +7 -2
  60. package/dist/_dts/theme-core/src/buttons/personalities/confident-chip.d.ts +7 -2
  61. package/dist/_dts/theme-core/src/buttons/personalities/editorial-link.d.ts +7 -2
  62. package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +86 -5
  63. package/dist/_dts/theme-core/src/buttons/personalities/ink-stamp.d.ts +7 -2
  64. package/dist/_dts/theme-core/src/buttons/personalities/pebble.d.ts +7 -2
  65. package/dist/_dts/theme-core/src/buttons/personalities/soft-pill.d.ts +7 -2
  66. package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +20 -20
  67. package/dist/_dts/theme-core/src/buttons/types.d.ts +27 -27
  68. package/dist/_dts/theme-core/src/cards/types.d.ts +17 -17
  69. package/dist/_dts/theme-core/src/inputs/types.d.ts +14 -14
  70. package/dist/_dts/theme-core/src/interactive/baseSchema.d.ts +2 -2
  71. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +438 -438
  72. package/dist/_dts/theme-core/src/navigation/types.d.ts +16 -16
  73. package/dist/_dts/theme-core/src/palette/variants/brand-led.d.ts +33 -9
  74. package/dist/_dts/theme-core/src/palette/variants/high-contrast.d.ts +33 -9
  75. package/dist/_dts/theme-core/src/palette/variants/index.d.ts +200 -4
  76. package/dist/_dts/theme-core/src/palette/variants/soft-natural.d.ts +33 -9
  77. package/dist/_dts/theme-core/src/palette/variants/types.d.ts +25 -25
  78. package/dist/_dts/theme-core/src/palette/variants/warm-neutral.d.ts +33 -9
  79. package/dist/_dts/theme-core/src/schema.d.ts +662 -662
  80. package/dist/_dts/theme-core/src/shared/componentStyles.d.ts +4 -4
  81. package/dist/_dts/theme-core/src/site-styles/curatedChoices.d.ts +27 -0
  82. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +48 -194
  83. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +15 -15
  84. package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +7 -7
  85. package/dist/_dts/theme-core/src/site-styles/index.d.ts +2 -1
  86. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +12 -14
  87. package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +46 -0
  88. package/dist/_dts/theme-core/src/site-styles/tokenRecipes.d.ts +5 -5
  89. package/dist/_dts/ui/src/badge.d.ts +1 -1
  90. package/dist/_dts/ui/src/button-group.d.ts +1 -1
  91. package/dist/_dts/ui/src/button.d.ts +2 -2
  92. package/dist/_dts/ui/src/callout.d.ts +1 -1
  93. package/dist/_dts/ui/src/card.d.ts +1 -1
  94. package/dist/_dts/ui/src/palette/ColorChooserDialog.d.ts +47 -0
  95. package/dist/_dts/ui/src/palette/ColorSlotButton.d.ts +15 -0
  96. package/dist/_dts/ui/src/palette/ColorSwatchButton.d.ts +15 -0
  97. package/dist/_dts/ui/src/palette/PaletteTokenEditor.d.ts +50 -0
  98. package/dist/_dts/ui/src/palette/hex.d.ts +23 -0
  99. package/dist/_dts/ui/src/palette/index.d.ts +14 -0
  100. package/dist/_dts/ui/src/surface.d.ts +2 -2
  101. package/dist/_dts/ui/src/toggle.d.ts +4 -4
  102. package/dist/cli/index.mjs +1535 -1183
  103. package/dist/client/client.mjs +3944 -3454
  104. package/dist/client/hooks.mjs +2053 -1743
  105. package/dist/client/rendering/client.mjs +311 -167
  106. package/dist/client/rendering/islands.mjs +159 -73
  107. package/dist/client/rendering.mjs +1918 -1447
  108. package/dist/preview-next/before-render.mjs +147 -1
  109. package/dist/preview-next/client/runtime.mjs +2828 -2174
  110. package/dist/preview-next/middleware.mjs +147 -1
  111. package/dist/server/components.mjs +4311 -3928
  112. package/dist/server/config-validation.mjs +2201 -1906
  113. package/dist/server/config.mjs +2201 -1906
  114. package/dist/server/data.mjs +2053 -1743
  115. package/dist/server/index.mjs +171 -4
  116. package/dist/server/next.mjs +3442 -3024
  117. package/dist/server/page-converter.mjs +2109 -1962
  118. package/dist/server/prebuild.mjs +1 -1
  119. package/dist/server/rendering/server.mjs +4021 -3622
  120. package/dist/server/rendering.mjs +4021 -3622
  121. package/dist/server/routing.mjs +2377 -2058
  122. package/dist/server/server.mjs +2244 -1915
  123. package/dist/server/theme-bridge.mjs +130 -126
  124. package/dist/server/theme.mjs +131 -129
  125. package/package.json +1 -1
  126. package/dist/_dts/theme-core/src/site-styles/compatibility.d.ts +0 -109
@@ -1210,1016 +1210,372 @@ function assertUniqueLayoutProfileKeys(profiles) {
1210
1210
  }
1211
1211
  }
1212
1212
 
1213
- // ../theme-core/src/site-styles/compatibility.ts
1213
+ // ../theme-core/src/buttons/personalities/types.ts
1214
+ import { z as z5 } from "zod";
1215
+
1216
+ // ../theme-core/src/buttons/types.ts
1214
1217
  import { z as z3 } from "zod";
1218
+ var VARIANT_ROLES = [
1219
+ "primary",
1220
+ "secondary",
1221
+ "outline",
1222
+ "ghost",
1223
+ "link",
1224
+ "tertiary",
1225
+ "accent"
1226
+ ];
1227
+ var cornerStyleSchema = z3.enum(["square", "rounded", "pill"]);
1228
+ var shadowSizeSchema = z3.enum(["none", "low", "medium", "high"]);
1229
+ var textTransformSchema = z3.enum(["none", "uppercase", "lowercase", "capitalize"]);
1230
+ var fontWeightSchema = z3.union([z3.literal(500), z3.literal(600), z3.literal(700)]);
1231
+ var buttonTypographySchema = z3.enum(["body", "heading"]);
1232
+ var letterSpacingSchema = z3.enum(["tight", "normal", "loose"]);
1233
+ var hoverTransformSchema = z3.enum(["none", "lift", "scale", "press"]);
1234
+ var hoverColorSchema = z3.enum(["none", "brighten", "darken", "saturate", "token"]);
1235
+ var buttonPaddingPresetSchema = z3.enum(["compact", "default", "spacious"]);
1236
+ var gradientStyleSchema = z3.enum(["linear", "radial", "conic"]);
1237
+ var gradientSharpnessSchema = z3.enum(["smooth", "medium", "hard"]);
1238
+ var prioritySchema = z3.union([z3.literal(1), z3.literal(2), z3.literal(3)]);
1239
+ var variantRoleSchema = z3.enum(VARIANT_ROLES);
1240
+ var buttonSizeNameSchema = z3.enum(["sm", "md", "lg", "xl"]);
1241
+ var PADDING_TOKEN_PATTERN = /^(?:0|\d+(?:\.\d+)?(?:rem|em|px|%))$/;
1242
+ var paddingShorthandSchema = z3.string().refine(
1243
+ (value) => {
1244
+ const parts = value.split(/\s+/).filter(Boolean);
1245
+ return parts.length === 2 && parts.every((token) => PADDING_TOKEN_PATTERN.test(token));
1246
+ },
1247
+ {
1248
+ message: 'Padding must be two space-separated CSS length tokens (e.g. "0.5rem 1rem"). Use `0` for zero.'
1249
+ }
1250
+ );
1251
+ var buttonSizeConfigSchema = z3.object({
1252
+ padding: paddingShorthandSchema,
1253
+ fontSize: z3.string().optional()
1254
+ });
1255
+ var buttonSizesSchema = z3.object({
1256
+ sm: buttonSizeConfigSchema,
1257
+ md: buttonSizeConfigSchema,
1258
+ lg: buttonSizeConfigSchema,
1259
+ xl: buttonSizeConfigSchema.optional()
1260
+ }).transform(({ sm, md, lg, xl }) => ({
1261
+ sm,
1262
+ md,
1263
+ lg,
1264
+ xl: xl ?? lg
1265
+ }));
1266
+ var buttonGlobalSettingsSchema = z3.object({
1267
+ cornerStyle: cornerStyleSchema,
1268
+ cornerRadius: z3.number().min(0).max(24).optional(),
1269
+ shadow: shadowSizeSchema,
1270
+ textTransform: textTransformSchema,
1271
+ fontWeight: fontWeightSchema,
1272
+ /**
1273
+ * @deprecated Set per-variant via `variant.border.widthClass` instead.
1274
+ * Schema field is preserved so existing presets parse; the value is unread
1275
+ * by the current generator and will be removed once the legacy
1276
+ * `primitives/content/components/Button.tsx` slot exports are deleted.
1277
+ */
1278
+ borderWidth: z3.union([z3.literal(1), z3.literal(2), z3.literal(3)]),
1279
+ // === Family-level typography ===
1280
+ // Typography source (body or heading) — selects which theme typography pool to inherit
1281
+ typography: buttonTypographySchema.optional(),
1282
+ // Font size for all variants in the family (Tailwind token, e.g. "text-xs", "text-sm")
1283
+ // Sized variants get this as default; fixed variants inherit unless they override.
1284
+ // Size class CSS may still override at run time for sized variants.
1285
+ fontSize: z3.string().optional(),
1286
+ // Letter spacing applied to all variants
1287
+ letterSpacing: letterSpacingSchema.optional(),
1288
+ // Italic style
1289
+ italic: z3.boolean().optional(),
1290
+ // Padding preset (applies to sized variants without a sizes config)
1291
+ paddingPreset: buttonPaddingPresetSchema.optional(),
1292
+ hoverTransform: hoverTransformSchema,
1293
+ hoverColor: hoverColorSchema,
1294
+ // When hoverColor is 'token', this specifies which token to use
1295
+ hoverColorToken: z3.string().optional(),
1296
+ // Gradient settings (if any variant uses gradients)
1297
+ gradientStyle: gradientStyleSchema.optional(),
1298
+ gradientAngle: z3.number().min(0).max(360).optional(),
1299
+ gradientSharpness: gradientSharpnessSchema.optional()
1300
+ });
1301
+ var gradientDirectionSchema = z3.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
1302
+ var buttonBackgroundSchema = z3.discriminatedUnion("type", [
1303
+ z3.object({ type: z3.literal("solid"), colorToken: z3.string() }),
1304
+ z3.object({
1305
+ type: z3.literal("gradient"),
1306
+ stops: z3.array(z3.string()).min(2),
1307
+ direction: gradientDirectionSchema
1308
+ }),
1309
+ z3.object({ type: z3.literal("transparent") })
1310
+ ]);
1311
+ var effectApplicationSchema = z3.object({
1312
+ effectId: z3.string(),
1313
+ options: z3.record(z3.string(), z3.any()).optional()
1314
+ });
1315
+ var buttonBorderSchema = z3.object({
1316
+ widthClass: z3.string(),
1317
+ colorToken: z3.string()
1318
+ });
1319
+ var variantShadowSchema = z3.object({
1320
+ elevation: z3.enum(["none", "low", "medium", "high"]),
1321
+ softness: z3.enum(["crisp", "soft", "hard"]).nullable(),
1322
+ position: z3.enum(["bottom", "bottom-right"]).default("bottom")
1323
+ });
1324
+ var variantEffectsSchema = z3.object({
1325
+ base: z3.array(effectApplicationSchema).optional(),
1326
+ hover: z3.array(effectApplicationSchema).optional(),
1327
+ active: z3.array(effectApplicationSchema).optional(),
1328
+ focus: z3.array(effectApplicationSchema).optional()
1329
+ });
1330
+ var variantSizeOverridesSchema = z3.object({
1331
+ sm: buttonSizeConfigSchema.optional(),
1332
+ md: buttonSizeConfigSchema.optional(),
1333
+ lg: buttonSizeConfigSchema.optional(),
1334
+ xl: buttonSizeConfigSchema.optional()
1335
+ });
1336
+ var buttonVariantSchema = z3.object({
1337
+ id: z3.string(),
1338
+ name: z3.string().min(1).max(20),
1339
+ enabled: z3.boolean(),
1340
+ priority: prioritySchema,
1341
+ // Base appearance (token-based)
1342
+ background: buttonBackgroundSchema,
1343
+ textColorToken: z3.string(),
1344
+ /** Tailwind radius token (e.g. `'rounded-md'`). Omit to inherit from `global.cornerStyle`. */
1345
+ borderRadius: z3.string().optional(),
1346
+ // Optional shadow override (uses theme.shadow if not specified)
1347
+ shadow: variantShadowSchema.optional(),
1348
+ // Border (optional)
1349
+ border: buttonBorderSchema.optional(),
1350
+ // Hover background token (per-variant override, takes precedence over global hoverColorToken)
1351
+ hoverBackgroundToken: z3.string().optional(),
1352
+ // Effect composition
1353
+ effects: variantEffectsSchema.optional(),
1354
+ // Per-variant size overrides — see VariantSizeOverrides
1355
+ sizes: variantSizeOverridesSchema.optional()
1356
+ });
1357
+ var buttonSystemSchema = z3.object({
1358
+ global: buttonGlobalSettingsSchema,
1359
+ variants: z3.array(buttonVariantSchema).min(1).max(6),
1360
+ sizes: buttonSizesSchema.optional()
1361
+ });
1362
+
1363
+ // ../theme-core/src/site-styles/styleTags.ts
1364
+ import { z as z4 } from "zod";
1215
1365
  var STYLE_AXIS_VALUES = {
1216
1366
  tone: ["minimal", "classic", "bold"],
1217
1367
  energy: ["calm", "vibrant"],
1218
1368
  motion: ["subtle", "standard", "expressive"],
1219
1369
  era: ["editorial", "modern", "organic", "technical", "retro"]
1220
1370
  };
1221
- var styleTagsSchema = z3.object({
1222
- tone: z3.enum(STYLE_AXIS_VALUES.tone).optional(),
1223
- energy: z3.enum(STYLE_AXIS_VALUES.energy).optional(),
1224
- motion: z3.enum(STYLE_AXIS_VALUES.motion).optional(),
1225
- era: z3.enum(STYLE_AXIS_VALUES.era).optional()
1371
+ var styleTagsSchema = z4.object({
1372
+ tone: z4.enum(STYLE_AXIS_VALUES.tone).optional(),
1373
+ energy: z4.enum(STYLE_AXIS_VALUES.energy).optional(),
1374
+ motion: z4.enum(STYLE_AXIS_VALUES.motion).optional(),
1375
+ era: z4.enum(STYLE_AXIS_VALUES.era).optional()
1226
1376
  });
1227
1377
 
1228
- // ../theme-core/src/site-styles/sourceCatalogs.ts
1229
- var generatedContentFrames = [
1230
- plainFrame,
1231
- panelFrame("inset"),
1232
- panelFrame("raised"),
1233
- flushPanelFrame({ bleed: "start" })
1234
- ];
1235
- var userContentFrames = [
1236
- ...generatedContentFrames,
1237
- panelFrame("editorial"),
1238
- flushPanelFrame({ bleed: "end" }),
1239
- flushPanelFrame({ bleed: "both" })
1240
- ];
1241
- var generatedDesignOptionCatalog = {
1242
- source: "generated",
1243
- sectionSurfaces: ["base", "muted-band", "accent-band", "hero-image"],
1244
- contentFrames: generatedContentFrames,
1245
- itemSurfaces: ["none", "default", "flat", "outlined", "raised"],
1246
- transitions: ["none", "soft-fade-short", "soft-fade-long"],
1247
- emphases: ["low", "medium", "high"],
1248
- detachedCustom: false
1249
- };
1250
- var userDesignOptionCatalog = {
1251
- source: "user",
1252
- sectionSurfaces: generatedDesignOptionCatalog.sectionSurfaces,
1253
- contentFrames: userContentFrames,
1254
- itemSurfaces: [
1255
- ...generatedDesignOptionCatalog.itemSurfaces,
1256
- "inset",
1257
- "editorial"
1258
- ],
1259
- transitions: [
1260
- ...generatedDesignOptionCatalog.transitions,
1261
- "wave-edge",
1262
- "angle-edge"
1263
- ],
1264
- emphases: generatedDesignOptionCatalog.emphases,
1265
- detachedCustom: false
1266
- };
1267
- var advancedDesignOptionCatalog = {
1268
- source: "advanced",
1269
- sectionSurfaces: userDesignOptionCatalog.sectionSurfaces,
1270
- contentFrames: userDesignOptionCatalog.contentFrames,
1271
- itemSurfaces: userDesignOptionCatalog.itemSurfaces,
1272
- transitions: userDesignOptionCatalog.transitions,
1273
- emphases: userDesignOptionCatalog.emphases,
1274
- detachedCustom: true
1275
- };
1276
-
1277
- // ../theme-core/src/site-styles/curatedSiteStyles.ts
1278
- var curatedSiteStyleIdValues = [
1279
- "site-style:calm-studio",
1280
- "site-style:clear-professional",
1281
- "site-style:warm-editorial",
1282
- "site-style:bright-community",
1283
- "site-style:quiet-luxury",
1284
- "site-style:practical-services",
1285
- "site-style:modern-wellness",
1286
- "site-style:bold-launch"
1287
- ];
1288
- var quietBudget = {
1289
- accentDensity: "low",
1290
- panelDensity: "medium",
1291
- transitionMix: "quiet",
1292
- primaryCtaLimit: 2,
1293
- mediaDensity: "medium",
1294
- decorativeRepetition: "low"
1295
- };
1296
- var balancedBudget = {
1297
- accentDensity: "medium",
1298
- panelDensity: "medium",
1299
- transitionMix: "balanced",
1300
- primaryCtaLimit: 3,
1301
- mediaDensity: "medium",
1302
- decorativeRepetition: "medium"
1303
- };
1304
- var expressiveBudget = {
1305
- accentDensity: "high",
1306
- panelDensity: "high",
1307
- transitionMix: "expressive",
1308
- primaryCtaLimit: 3,
1309
- mediaDensity: "high",
1310
- decorativeRepetition: "medium"
1311
- };
1312
- function uniqueContentFrameKinds() {
1313
- const kinds = [...new Set(
1314
- generatedDesignOptionCatalog.contentFrames.map((frame) => frame.kind)
1315
- )];
1316
- const firstKind = kinds[0];
1317
- if (!firstKind) {
1318
- throw new Error("Expected generated design option catalog to expose at least one content frame kind.");
1378
+ // ../theme-core/src/buttons/personalities/types.ts
1379
+ function asButtonPersonalityId(value) {
1380
+ if (value.length === 0) {
1381
+ throw new Error("ButtonPersonalityId must be a non-empty string");
1319
1382
  }
1320
- return [firstKind, ...kinds.slice(1)];
1383
+ return value;
1321
1384
  }
1322
- var generatedContentFrameKinds = uniqueContentFrameKinds();
1323
- function defineCuratedSiteStyle(input) {
1385
+ var buttonPersonalityIdSchema = z5.string().min(1).transform((value) => asButtonPersonalityId(value));
1386
+ var buttonPersonalitySchema = z5.object({
1387
+ id: buttonPersonalityIdSchema,
1388
+ name: z5.string().min(1),
1389
+ description: z5.string().min(1),
1390
+ tags: styleTagsSchema,
1391
+ buttonSystem: buttonSystemSchema
1392
+ });
1393
+ function defineButtonPersonality(input) {
1324
1394
  return {
1325
- id: asSiteStyleId(input.id),
1395
+ id: asButtonPersonalityId(input.id),
1326
1396
  name: input.name,
1327
1397
  description: input.description,
1328
- generationBrief: input.generationBrief,
1329
- selectionKeywords: input.selectionKeywords ?? [],
1330
- template: {
1331
- id: asDesignSystemTemplateId(`template:${input.id.replace("site-style:", "")}`),
1332
- name: input.name,
1333
- version: 1,
1334
- tokenRecipes: input.tokenRecipes,
1335
- compositionBudget: input.compositionBudget,
1336
- supportedSectionSurfaces: generatedDesignOptionCatalog.sectionSurfaces,
1337
- supportedContentFrames: generatedContentFrameKinds,
1338
- supportedItemSurfaces: generatedDesignOptionCatalog.itemSurfaces,
1339
- supportedTransitions: generatedDesignOptionCatalog.transitions
1340
- },
1341
- // The library IDs are already branded at construction (`asButtonPersonalityId`
1342
- // / `asPaletteVariantId`); the closed-union input type guarantees only
1343
- // shipped IDs reach this branch.
1344
- defaultButtonPersonalityId: input.defaultButtonPersonalityId,
1345
- acceptedButtons: input.acceptedButtons,
1346
- defaultPaletteVariantId: input.defaultPaletteVariantId,
1347
- acceptedPalettes: input.acceptedPalettes
1398
+ tags: input.tags,
1399
+ buttonSystem: input.buttonSystem
1348
1400
  };
1349
1401
  }
1350
- var curatedSiteStyles = [
1351
- defineCuratedSiteStyle({
1352
- id: "site-style:calm-studio",
1353
- name: "Calm Studio",
1354
- description: "Soft, measured, and spacious for intimate appointment or class businesses.",
1355
- generationBrief: "Use calm pacing, concise copy, generous breathing room, and natural imagery. Keep calls to action steady rather than urgent.",
1356
- tokenRecipes: {
1357
- palette: "soft-natural",
1358
- contrast: "standard",
1359
- radius: "soft",
1360
- shadow: "subtle",
1361
- typography: "friendly-sans",
1362
- spacing: "airy",
1363
- motion: "subtle"
1364
- },
1365
- compositionBudget: quietBudget,
1366
- defaultButtonPersonalityId: "soft-pill",
1367
- acceptedButtons: { tone: ["minimal", "classic"], era: ["organic", "editorial"] },
1368
- defaultPaletteVariantId: "soft-natural-sage",
1369
- acceptedPalettes: { tone: ["minimal", "classic"], era: ["organic"] }
1370
- }),
1371
- defineCuratedSiteStyle({
1372
- id: "site-style:clear-professional",
1373
- name: "Clear Professional",
1374
- description: "Crisp, trustworthy, and direct for local services and consultancies.",
1375
- generationBrief: "Prioritize clarity, proof, service detail, and easy next steps. Keep visuals polished and specific, with restrained decorative treatment.",
1376
- tokenRecipes: {
1377
- palette: "brand-led",
1378
- contrast: "strong",
1379
- radius: "soft",
1380
- shadow: "subtle",
1381
- typography: "clean-sans",
1382
- spacing: "regular",
1383
- motion: "subtle"
1402
+
1403
+ // ../theme-core/src/buttons/personalities/brushed-wash.ts
1404
+ var brushedWash = defineButtonPersonality({
1405
+ id: "brushed-wash",
1406
+ name: "Brushed Wash",
1407
+ description: "Watercolour-gradient buttons with soft shadows and generous padding.",
1408
+ tags: { tone: "classic", energy: "vibrant", motion: "standard", era: "organic" },
1409
+ buttonSystem: {
1410
+ global: {
1411
+ cornerStyle: "rounded",
1412
+ shadow: "low",
1413
+ textTransform: "none",
1414
+ fontWeight: 500,
1415
+ borderWidth: 1,
1416
+ hoverTransform: "none",
1417
+ hoverColor: "none"
1384
1418
  },
1385
- compositionBudget: balancedBudget,
1386
- defaultButtonPersonalityId: "confident-chip",
1387
- acceptedButtons: { tone: ["minimal", "classic"], era: ["modern", "editorial"] },
1388
- defaultPaletteVariantId: "brand-led-cool",
1389
- acceptedPalettes: { tone: ["minimal", "classic"], era: ["modern", "editorial"] }
1390
- }),
1391
- defineCuratedSiteStyle({
1392
- id: "site-style:warm-editorial",
1393
- name: "Warm Editorial",
1394
- description: "Story-led and textured for educators, makers, venues, and retreats.",
1395
- generationBrief: "Let the copy feel thoughtful and grounded. Favor narrative sections, supporting media, and a small number of editorial panels.",
1396
- tokenRecipes: {
1397
- palette: "warm-neutral",
1398
- contrast: "standard",
1399
- radius: "square",
1400
- shadow: "none",
1401
- typography: "serif-editorial",
1402
- spacing: "airy",
1403
- motion: "subtle"
1419
+ sizes: {
1420
+ sm: { padding: "0.75rem 2rem", fontSize: "text-sm" },
1421
+ md: { padding: "1rem 2.5rem" },
1422
+ lg: { padding: "1.25rem 3rem", fontSize: "text-lg" },
1423
+ xl: { padding: "1.625rem 3.75rem", fontSize: "text-xl" }
1404
1424
  },
1405
- compositionBudget: balancedBudget,
1406
- defaultButtonPersonalityId: "editorial-link",
1407
- acceptedButtons: { tone: ["minimal", "classic"], era: ["editorial", "organic"] },
1408
- defaultPaletteVariantId: "warm-neutral-cream",
1409
- acceptedPalettes: { tone: ["minimal", "classic"], era: ["editorial", "organic"] }
1410
- }),
1411
- defineCuratedSiteStyle({
1412
- id: "site-style:bright-community",
1413
- name: "Bright Community",
1414
- description: "Friendly, welcoming, and active for groups, classes, and neighborhood offers.",
1415
- generationBrief: "Use welcoming language, clear event or booking routes, and optimistic imagery. Let accents appear, but avoid noisy decoration.",
1416
- tokenRecipes: {
1417
- palette: "brand-led",
1418
- contrast: "standard",
1419
- radius: "rounded",
1420
- shadow: "subtle",
1421
- typography: "friendly-sans",
1422
- spacing: "regular",
1423
- motion: "expressive"
1425
+ variants: [
1426
+ {
1427
+ id: "primary",
1428
+ name: "Primary",
1429
+ enabled: true,
1430
+ priority: 1,
1431
+ background: {
1432
+ type: "gradient",
1433
+ stops: ["primary", "accent"],
1434
+ direction: "to-r"
1435
+ },
1436
+ textColorToken: "primaryForeground",
1437
+ borderRadius: "rounded-lg",
1438
+ shadow: { elevation: "low", softness: "soft", position: "bottom" },
1439
+ effects: {
1440
+ hover: [{ effectId: "opacity-reduce", options: { reduction: -15 } }]
1441
+ }
1442
+ },
1443
+ {
1444
+ id: "secondary",
1445
+ name: "Secondary",
1446
+ enabled: true,
1447
+ priority: 2,
1448
+ background: {
1449
+ type: "gradient",
1450
+ stops: ["secondary", "accent"],
1451
+ direction: "to-br"
1452
+ },
1453
+ textColorToken: "primaryForeground",
1454
+ borderRadius: "rounded-lg",
1455
+ shadow: { elevation: "low", softness: "soft", position: "bottom" },
1456
+ effects: {
1457
+ hover: [{ effectId: "opacity-reduce", options: { reduction: -15 } }]
1458
+ }
1459
+ },
1460
+ {
1461
+ id: "outline",
1462
+ name: "Outline",
1463
+ enabled: true,
1464
+ priority: 3,
1465
+ background: { type: "transparent" },
1466
+ textColorToken: "primary",
1467
+ borderRadius: "rounded-lg",
1468
+ border: { widthClass: "border", colorToken: "primary" },
1469
+ effects: {
1470
+ hover: [{ effectId: "background-on-hover", options: { colorToken: "surface" } }]
1471
+ }
1472
+ },
1473
+ {
1474
+ id: "ghost",
1475
+ name: "Ghost",
1476
+ enabled: true,
1477
+ priority: 3,
1478
+ background: { type: "transparent" },
1479
+ textColorToken: "text",
1480
+ borderRadius: "rounded-lg",
1481
+ effects: {
1482
+ hover: [
1483
+ { effectId: "background-on-hover", options: { colorToken: "surface" } }
1484
+ ]
1485
+ }
1486
+ }
1487
+ ]
1488
+ }
1489
+ });
1490
+
1491
+ // ../theme-core/src/buttons/personalities/confident-chip.ts
1492
+ var confidentChip = defineButtonPersonality({
1493
+ id: "confident-chip",
1494
+ name: "Confident Chip",
1495
+ description: "Mid-radius solid buttons with a crisp hover.",
1496
+ tags: { tone: "classic", energy: "calm", motion: "standard", era: "modern" },
1497
+ buttonSystem: {
1498
+ global: {
1499
+ cornerStyle: "rounded",
1500
+ shadow: "medium",
1501
+ textTransform: "none",
1502
+ fontWeight: 600,
1503
+ borderWidth: 1,
1504
+ hoverTransform: "none",
1505
+ hoverColor: "none"
1424
1506
  },
1425
- compositionBudget: balancedBudget,
1426
- defaultButtonPersonalityId: "pebble",
1427
- acceptedButtons: { tone: ["classic", "bold"], era: ["organic", "modern"] },
1428
- defaultPaletteVariantId: "brand-led-warm",
1429
- acceptedPalettes: { tone: ["classic", "bold"], era: ["modern", "organic"] }
1430
- }),
1431
- defineCuratedSiteStyle({
1432
- id: "site-style:quiet-luxury",
1433
- name: "Quiet Luxury",
1434
- description: "Minimal, confident, and refined for premium experiences and private services.",
1435
- generationBrief: "Use fewer claims, more specificity, and restrained sensory detail. Favor elegant media and low repetition over dense panels.",
1436
- selectionKeywords: [
1437
- "luxury",
1438
- "premium",
1439
- "boutique",
1440
- "bespoke",
1441
- "exclusive"
1442
- ],
1443
- tokenRecipes: {
1444
- palette: "high-contrast",
1445
- contrast: "strong",
1446
- radius: "square",
1507
+ variants: [
1508
+ {
1509
+ id: "primary",
1510
+ name: "Primary",
1511
+ enabled: true,
1512
+ priority: 1,
1513
+ background: { type: "solid", colorToken: "primary" },
1514
+ textColorToken: "primaryForeground",
1515
+ borderRadius: "rounded-md",
1516
+ shadow: { elevation: "medium", softness: "soft", position: "bottom" },
1517
+ effects: {
1518
+ hover: [{ effectId: "darken-background", options: { amount: 60 } }],
1519
+ active: [{ effectId: "scale-down", options: { scale: "0.97" } }]
1520
+ }
1521
+ },
1522
+ {
1523
+ id: "secondary",
1524
+ name: "Secondary",
1525
+ enabled: true,
1526
+ priority: 2,
1527
+ background: { type: "solid", colorToken: "surface" },
1528
+ textColorToken: "text",
1529
+ borderRadius: "rounded-md",
1530
+ border: { widthClass: "border", colorToken: "border" },
1531
+ effects: {
1532
+ hover: [{ effectId: "background-on-hover", options: { colorToken: "background" } }]
1533
+ }
1534
+ },
1535
+ {
1536
+ id: "outline",
1537
+ name: "Outline",
1538
+ enabled: true,
1539
+ priority: 3,
1540
+ background: { type: "transparent" },
1541
+ textColorToken: "primary",
1542
+ borderRadius: "rounded-md",
1543
+ border: { widthClass: "border", colorToken: "primary" },
1544
+ effects: {
1545
+ hover: [{ effectId: "background-on-hover", options: { colorToken: "surface" } }]
1546
+ }
1547
+ },
1548
+ {
1549
+ id: "ghost",
1550
+ name: "Ghost",
1551
+ enabled: true,
1552
+ priority: 3,
1553
+ background: { type: "transparent" },
1554
+ textColorToken: "primary",
1555
+ borderRadius: "rounded-md",
1556
+ effects: {
1557
+ hover: [{ effectId: "background-on-hover", options: { colorToken: "surface" } }]
1558
+ }
1559
+ }
1560
+ ]
1561
+ }
1562
+ });
1563
+
1564
+ // ../theme-core/src/buttons/personalities/editorial-link.ts
1565
+ var editorialLink = defineButtonPersonality({
1566
+ id: "editorial-link",
1567
+ name: "Editorial Link",
1568
+ description: "Link-style with a growing underline. Refined, typographic.",
1569
+ tags: { tone: "minimal", energy: "calm", motion: "subtle", era: "editorial" },
1570
+ buttonSystem: {
1571
+ global: {
1572
+ cornerStyle: "square",
1447
1573
  shadow: "none",
1448
- typography: "classic-serif",
1449
- spacing: "airy",
1450
- motion: "none"
1451
- },
1452
- compositionBudget: quietBudget,
1453
- defaultButtonPersonalityId: "editorial-link",
1454
- acceptedButtons: { tone: ["minimal", "classic"], era: ["editorial", "organic"] },
1455
- defaultPaletteVariantId: "high-contrast-charcoal",
1456
- acceptedPalettes: { tone: ["minimal", "classic"], era: ["editorial", "organic"] }
1457
- }),
1458
- defineCuratedSiteStyle({
1459
- id: "site-style:practical-services",
1460
- name: "Practical Services",
1461
- description: "Efficient, plainspoken, and conversion-focused for trades and everyday services.",
1462
- generationBrief: "Make services, location, trust signals, and contact paths obvious. Keep copy brief and avoid ornate visual treatments.",
1463
- selectionKeywords: [
1464
- "repair",
1465
- "plumb",
1466
- "electric",
1467
- "cleaning",
1468
- "landscap",
1469
- "contractor"
1470
- ],
1471
- tokenRecipes: {
1472
- palette: "brand-led",
1473
- contrast: "maximum",
1474
- radius: "soft",
1475
- shadow: "subtle",
1476
- typography: "clean-sans",
1477
- spacing: "compact",
1478
- motion: "none"
1479
- },
1480
- compositionBudget: quietBudget,
1481
- defaultButtonPersonalityId: "confident-chip",
1482
- acceptedButtons: { tone: ["minimal", "classic", "bold"], era: ["modern", "editorial"] },
1483
- defaultPaletteVariantId: "brand-led-cool",
1484
- acceptedPalettes: { tone: ["minimal", "classic", "bold"], era: ["modern", "editorial"] }
1485
- }),
1486
- defineCuratedSiteStyle({
1487
- id: "site-style:modern-wellness",
1488
- name: "Modern Wellness",
1489
- description: "Natural, current, and reassuring for practitioners, studios, and wellbeing offers.",
1490
- generationBrief: "Keep the tone warm and practical. Use gentle section variation, natural materials, and inclusive copy without making medical claims.",
1491
- tokenRecipes: {
1492
- palette: "soft-natural",
1493
- contrast: "standard",
1494
- radius: "rounded",
1495
- shadow: "subtle",
1496
- typography: "clean-sans",
1497
- spacing: "airy",
1498
- motion: "subtle"
1499
- },
1500
- compositionBudget: balancedBudget,
1501
- defaultButtonPersonalityId: "soft-pill",
1502
- acceptedButtons: { tone: ["minimal", "classic"], era: ["organic", "modern"] },
1503
- defaultPaletteVariantId: "soft-natural-sage",
1504
- acceptedPalettes: { tone: ["minimal", "classic"], era: ["organic"] }
1505
- }),
1506
- defineCuratedSiteStyle({
1507
- id: "site-style:bold-launch",
1508
- name: "Bold Launch",
1509
- description: "High-energy and punchy for launches, campaigns, and creative offers.",
1510
- generationBrief: "Use crisp positioning, bold hero structure, strong calls to action, and confident visual rhythm. Keep it precise, not shouty.",
1511
- selectionKeywords: [
1512
- "launch",
1513
- "campaign",
1514
- "preorder",
1515
- "pre-order",
1516
- "waitlist",
1517
- "drop"
1518
- ],
1519
- tokenRecipes: {
1520
- palette: "high-contrast",
1521
- contrast: "maximum",
1522
- radius: "pill",
1523
- shadow: "layered",
1524
- typography: "clean-sans",
1525
- spacing: "regular",
1526
- motion: "expressive"
1527
- },
1528
- compositionBudget: expressiveBudget,
1529
- defaultButtonPersonalityId: "ink-stamp",
1530
- acceptedButtons: { tone: ["classic", "bold"], era: ["editorial", "organic", "modern"] },
1531
- defaultPaletteVariantId: "high-contrast-monochrome",
1532
- acceptedPalettes: { tone: ["bold"], era: ["editorial", "modern"] }
1533
- })
1534
- ];
1535
- var curatedSiteStylesById = new Map(
1536
- curatedSiteStyles.map((style) => [style.id, style])
1537
- );
1538
-
1539
- // ../theme-core/src/site-styles/designState.ts
1540
- import { z as z4 } from "zod";
1541
-
1542
- // ../theme-core/src/site-styles/rawStyleFields.ts
1543
- var themeV2RuntimeStyleFieldNames = [
1544
- "_frameStyles",
1545
- "_sectionStyles",
1546
- "_containerStyles",
1547
- "_cardStyles",
1548
- // styleGroup is legacy runtime transition wiring rather than a nested
1549
- // override object, but normal editors should still never see it directly.
1550
- "styleGroup"
1551
- ];
1552
- var themeV2BlockSpecificRawStyleFieldNames = [
1553
- "_contentCardStyles",
1554
- "_textCardStyles"
1555
- ];
1556
- var themeV2NormalEditorRawStyleFieldNames = [
1557
- ...themeV2RuntimeStyleFieldNames,
1558
- ...themeV2BlockSpecificRawStyleFieldNames
1559
- ];
1560
- var themeV2NormalEditorRawStyleFieldNameSet = new Set(
1561
- themeV2NormalEditorRawStyleFieldNames
1562
- );
1563
-
1564
- // ../theme-core/src/site-styles/designState.ts
1565
- var themeV2DesignStateSchemaVersion = 1;
1566
- var designResolutionPolicySchema = z4.enum(["generated", "user", "admin", "sdk"]);
1567
- var runtimeStyleFieldNameSchema = z4.enum(themeV2RuntimeStyleFieldNames);
1568
- var nonEmptyRuntimeStyleFieldNamesSchema = z4.array(runtimeStyleFieldNameSchema).min(1).transform((fields3) => [
1569
- fields3[0],
1570
- ...fields3.slice(1)
1571
- ]);
1572
- var heroLegibilityStrategySchema = z4.enum([
1573
- "none",
1574
- "scrim-gradient",
1575
- "solid-panel"
1576
- ]);
1577
- function uniqueNonEmpty(values) {
1578
- const uniqueValues = [...new Set(values)];
1579
- const firstValue = uniqueValues[0];
1580
- if (!firstValue) {
1581
- throw new Error("Expected at least one Theme V2 design state option.");
1582
- }
1583
- return [firstValue, ...uniqueValues.slice(1)];
1584
- }
1585
- var userPanelTreatments = uniqueNonEmpty(
1586
- userDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "panel").map((frame) => frame.treatment)
1587
- );
1588
- var userFlushTreatments = uniqueNonEmpty(
1589
- userDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.treatment)
1590
- );
1591
- var userFlushBleeds = uniqueNonEmpty(
1592
- userDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.bleed)
1593
- );
1594
- var contentFrameIntentSchema = z4.discriminatedUnion("kind", [
1595
- z4.object({ kind: z4.literal("plain") }).strict(),
1596
- z4.object({
1597
- kind: z4.literal("panel"),
1598
- treatment: z4.enum(userPanelTreatments)
1599
- }).strict(),
1600
- z4.object({
1601
- kind: z4.literal("flush-panel"),
1602
- treatment: z4.enum(userFlushTreatments),
1603
- bleed: z4.enum(userFlushBleeds)
1604
- }).strict()
1605
- ]);
1606
- var blockDesignPlanSchema = z4.object({
1607
- blockId: z4.string().min(1).transform(asDesignBlockId),
1608
- blockKind: z4.string().min(1),
1609
- purpose: z4.string().min(1),
1610
- sectionSurface: z4.enum(userDesignOptionCatalog.sectionSurfaces),
1611
- contentFrame: contentFrameIntentSchema,
1612
- itemSurface: z4.enum(userDesignOptionCatalog.itemSurfaces),
1613
- transitionAfter: z4.enum(userDesignOptionCatalog.transitions),
1614
- emphasis: z4.enum(userDesignOptionCatalog.emphases),
1615
- heroLegibility: heroLegibilityStrategySchema.optional()
1616
- }).strict();
1617
- var styleAuthoritySchema = z4.discriminatedUnion("kind", [
1618
- z4.object({
1619
- kind: z4.literal("theme-v2"),
1620
- source: designResolutionPolicySchema,
1621
- siteStyleId: z4.string().min(1).transform(asSiteStyleId),
1622
- templateId: z4.string().min(1).transform(asDesignSystemTemplateId),
1623
- templateVersion: z4.number().int().nonnegative(),
1624
- resolverVersion: z4.number().int().nonnegative()
1625
- }).strict(),
1626
- z4.object({
1627
- kind: z4.literal("legacy-raw"),
1628
- reason: z4.enum(["pre-theme-v2", "manual-runtime-fields"])
1629
- }).strict(),
1630
- z4.object({
1631
- kind: z4.literal("advanced-detached"),
1632
- reason: z4.literal("detached-custom-runtime-fields")
1633
- }).strict()
1634
- ]);
1635
- var blockRuntimeStyleAuthoritySchema = z4.object({
1636
- unit: z4.literal("block-runtime-fields"),
1637
- blockId: z4.string().min(1).transform(asDesignBlockId),
1638
- fields: nonEmptyRuntimeStyleFieldNamesSchema,
1639
- authority: styleAuthoritySchema
1640
- }).strict();
1641
- var persistedPageDesignStateV1Schema = z4.object({
1642
- schemaVersion: z4.literal(themeV2DesignStateSchemaVersion),
1643
- siteStyleId: z4.string().min(1).transform(asSiteStyleId),
1644
- templateId: z4.string().min(1).transform(asDesignSystemTemplateId),
1645
- templateVersion: z4.number().int().nonnegative(),
1646
- resolverVersion: z4.number().int().nonnegative(),
1647
- rhythmPresetId: z4.string().min(1),
1648
- blocks: z4.array(blockDesignPlanSchema),
1649
- styleAuthorities: z4.array(blockRuntimeStyleAuthoritySchema)
1650
- }).strict();
1651
-
1652
- // ../theme-core/src/site-styles/generatedSchemas.ts
1653
- import { z as z5 } from "zod";
1654
- function uniqueNonEmpty2(values) {
1655
- const uniqueValues = [...new Set(values)];
1656
- const firstValue = uniqueValues[0];
1657
- if (!firstValue) {
1658
- throw new Error("Expected at least one generated schema option.");
1659
- }
1660
- return [firstValue, ...uniqueValues.slice(1)];
1661
- }
1662
- var generatedPanelTreatments = uniqueNonEmpty2(
1663
- generatedDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "panel").map((frame) => frame.treatment)
1664
- );
1665
- var generatedFlushTreatments = uniqueNonEmpty2(
1666
- generatedDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.treatment)
1667
- );
1668
- var generatedFlushBleeds = uniqueNonEmpty2(
1669
- generatedDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.bleed)
1670
- );
1671
- var generatedPanelFrameSchema = z5.object({
1672
- kind: z5.literal("panel"),
1673
- treatment: z5.enum(generatedPanelTreatments)
1674
- }).strict();
1675
- var generatedFlushPanelFrameSchema = z5.object({
1676
- kind: z5.literal("flush-panel"),
1677
- treatment: z5.enum(generatedFlushTreatments),
1678
- bleed: z5.enum(generatedFlushBleeds)
1679
- }).strict();
1680
- var generatedContentFrameIntentSchema = z5.discriminatedUnion("kind", [
1681
- z5.object({ kind: z5.literal("plain") }).strict(),
1682
- generatedPanelFrameSchema,
1683
- generatedFlushPanelFrameSchema
1684
- ]);
1685
- var generatedSiteStyleIdSchema = z5.enum(curatedSiteStyleIdValues).transform(asSiteStyleId);
1686
- function generatedChoiceSchema(valueSchema) {
1687
- return z5.discriminatedUnion("kind", [
1688
- z5.object({
1689
- source: z5.literal("generated"),
1690
- kind: z5.literal("auto")
1691
- }).strict(),
1692
- z5.object({
1693
- source: z5.literal("generated"),
1694
- kind: z5.literal("explicit"),
1695
- value: valueSchema
1696
- }).strict()
1697
- ]);
1698
- }
1699
- var generatedBlockDesignIntentSchema = z5.object({
1700
- sectionSurface: generatedChoiceSchema(
1701
- z5.enum(generatedDesignOptionCatalog.sectionSurfaces)
1702
- ),
1703
- contentFrame: generatedChoiceSchema(generatedContentFrameIntentSchema),
1704
- itemSurface: generatedChoiceSchema(
1705
- z5.enum(generatedDesignOptionCatalog.itemSurfaces)
1706
- ),
1707
- transitionAfter: generatedChoiceSchema(
1708
- z5.enum(generatedDesignOptionCatalog.transitions)
1709
- ),
1710
- emphasis: generatedChoiceSchema(
1711
- z5.enum(generatedDesignOptionCatalog.emphases)
1712
- )
1713
- }).strict();
1714
- var generatedMediaCompositionIntentSchema = z5.enum([
1715
- "none",
1716
- "supporting",
1717
- "dominant"
1718
- ]);
1719
- var generatedDecorativeCompositionIntentSchema = z5.enum([
1720
- "none",
1721
- "supporting"
1722
- ]);
1723
- var generatedHeroLegibilityStrategySchema = z5.enum([
1724
- "none",
1725
- "scrim-gradient"
1726
- ]);
1727
- var generatedBlockMediaIntentSchema = z5.object({
1728
- media: generatedMediaCompositionIntentSchema,
1729
- decorative: generatedDecorativeCompositionIntentSchema,
1730
- heroLegibility: generatedChoiceSchema(generatedHeroLegibilityStrategySchema)
1731
- }).strict();
1732
- var generatedBoundaryIntentSchema = z5.object({
1733
- transitionAfter: generatedChoiceSchema(
1734
- z5.enum(generatedDesignOptionCatalog.transitions)
1735
- )
1736
- }).strict();
1737
- var generatedPageDesignBlockIntentSchema = z5.object({
1738
- blockId: z5.string().min(1),
1739
- blockKind: z5.string().min(1),
1740
- purpose: z5.string().min(1),
1741
- design: generatedBlockDesignIntentSchema,
1742
- mediaIntent: generatedBlockMediaIntentSchema,
1743
- boundaryIntent: generatedBoundaryIntentSchema
1744
- }).strict();
1745
- var generatedPageDesignIntentSchema = z5.object({
1746
- siteStyleId: generatedSiteStyleIdSchema,
1747
- blocks: z5.array(generatedPageDesignBlockIntentSchema)
1748
- }).strict();
1749
-
1750
- // ../theme-core/src/site-styles/pageDesignIntent.ts
1751
- import { z as z6 } from "zod";
1752
- var pageDesignIntentSchemaVersion = 1;
1753
- var pageDesignUserPinnedAppearanceChoiceSchema = z6.object({
1754
- kind: z6.literal("user-pinned"),
1755
- value: z6.string().min(1).transform(asAppearancePresetId)
1756
- }).strict();
1757
- var pageDesignUserPinnedBoundaryChoiceSchema = z6.object({
1758
- kind: z6.literal("user-pinned"),
1759
- value: z6.string().min(1).transform(asBoundaryOptionId)
1760
- }).strict();
1761
- var pageDesignBlockLookPinSchema = z6.object({
1762
- blockId: z6.string().min(1).transform(asDesignBlockId),
1763
- blockKind: z6.string().min(1),
1764
- choice: pageDesignUserPinnedAppearanceChoiceSchema
1765
- }).strict();
1766
- var pageDesignBoundaryPinSchema = z6.object({
1767
- boundaryId: z6.string().min(1).transform(asDesignBoundaryId),
1768
- previousBlockId: z6.string().min(1).transform(asDesignBlockId),
1769
- nextBlockId: z6.string().min(1).transform(asDesignBlockId),
1770
- choice: pageDesignUserPinnedBoundaryChoiceSchema
1771
- }).strict().superRefine((pin, ctx) => {
1772
- const expectedBoundaryId = makeBoundaryId(
1773
- pin.previousBlockId,
1774
- pin.nextBlockId
1775
- );
1776
- if (pin.boundaryId !== expectedBoundaryId) {
1777
- ctx.addIssue({
1778
- code: z6.ZodIssueCode.custom,
1779
- path: ["boundaryId"],
1780
- message: `Boundary id must match previousBlockId and nextBlockId. Expected ${expectedBoundaryId}.`
1781
- });
1782
- }
1783
- });
1784
- var pageDesignIntentV1Schema = z6.object({
1785
- schemaVersion: z6.literal(pageDesignIntentSchemaVersion),
1786
- siteStyleId: z6.string().min(1).transform(asSiteStyleId),
1787
- pageFlowPresetId: z6.string().min(1).transform(asPageFlowPresetId),
1788
- blockLookPins: z6.array(pageDesignBlockLookPinSchema),
1789
- boundaryPins: z6.array(pageDesignBoundaryPinSchema)
1790
- }).strict().superRefine((intent, ctx) => {
1791
- addDuplicateStringIssues(ctx, {
1792
- values: intent.blockLookPins.map((pin) => pin.blockId),
1793
- path: ["blockLookPins"],
1794
- label: "block Look pin"
1795
- });
1796
- addDuplicateStringIssues(ctx, {
1797
- values: intent.boundaryPins.map(
1798
- (pin) => boundaryKey(pin.previousBlockId, pin.nextBlockId)
1799
- ),
1800
- path: ["boundaryPins"],
1801
- label: "boundary pin"
1802
- });
1803
- });
1804
- function addDuplicateStringIssues(ctx, input) {
1805
- const seen = /* @__PURE__ */ new Set();
1806
- const duplicates = /* @__PURE__ */ new Set();
1807
- for (const value of input.values) {
1808
- if (seen.has(value)) {
1809
- duplicates.add(value);
1810
- }
1811
- seen.add(value);
1812
- }
1813
- for (const duplicate of duplicates) {
1814
- ctx.addIssue({
1815
- code: z6.ZodIssueCode.custom,
1816
- path: [...input.path],
1817
- message: `Duplicate ${input.label}: ${duplicate}.`
1818
- });
1819
- }
1820
- }
1821
- function boundaryKey(previousBlockId, nextBlockId) {
1822
- return makeBoundaryId(previousBlockId, nextBlockId);
1823
- }
1824
-
1825
- // ../theme-core/src/schema.ts
1826
- import { z as z19 } from "zod";
1827
-
1828
- // ../theme-core/src/lib/media.ts
1829
- import z7 from "zod";
1830
- var hotspotSchema = z7.object({
1831
- x: z7.number().min(0).max(1),
1832
- y: z7.number().min(0).max(1),
1833
- radius: z7.number().optional()
1834
- });
1835
- var rotationSchema = z7.union([z7.literal(0), z7.literal(90), z7.literal(180), z7.literal(270)]);
1836
- var rectSchema = z7.tuple([z7.number(), z7.number(), z7.number(), z7.number()]);
1837
- var aspectCropSchema = z7.object({
1838
- aspect: z7.preprocess((value) => value == null ? void 0 : value, z7.string().optional()),
1839
- rect: z7.preprocess((value) => value == null ? void 0 : value, rectSchema.optional()),
1840
- hotspot: z7.preprocess((value) => value == null ? void 0 : value, hotspotSchema.optional()),
1841
- rotation: z7.preprocess((value) => value == null ? void 0 : value, rotationSchema.optional())
1842
- });
1843
- var transformSchema = z7.object({
1844
- aspectCrops: z7.preprocess((value) => {
1845
- if (!value || typeof value !== "object" || Array.isArray(value)) {
1846
- return void 0;
1847
- }
1848
- return value;
1849
- }, z7.record(z7.string(), aspectCropSchema.catch({}))).optional(),
1850
- rect: rectSchema.optional(),
1851
- hotspot: hotspotSchema.optional(),
1852
- rotation: rotationSchema.optional()
1853
- });
1854
- var mediaSchema = z7.object({
1855
- type: z7.enum(["image", "video", "audio", "document", "spreadsheet", "archive"]),
1856
- purpose: z7.string().optional(),
1857
- placeholder: z7.boolean().default(true).optional(),
1858
- assetId: z7.string().optional(),
1859
- identifier: z7.string().optional(),
1860
- src: z7.string().optional(),
1861
- alt: z7.string().optional(),
1862
- filename: z7.string().optional(),
1863
- mimeType: z7.string().optional(),
1864
- width: z7.number().optional(),
1865
- height: z7.number().optional(),
1866
- storageBucket: z7.string().optional(),
1867
- storagePath: z7.string().optional(),
1868
- transform: transformSchema.optional()
1869
- });
1870
-
1871
- // ../theme-core/src/buttons/types.ts
1872
- import { z as z8 } from "zod";
1873
- var VARIANT_ROLES = [
1874
- "primary",
1875
- "secondary",
1876
- "outline",
1877
- "ghost",
1878
- "link",
1879
- "tertiary",
1880
- "accent"
1881
- ];
1882
- var cornerStyleSchema = z8.enum(["square", "rounded", "pill"]);
1883
- var shadowSizeSchema = z8.enum(["none", "low", "medium", "high"]);
1884
- var textTransformSchema = z8.enum(["none", "uppercase", "lowercase", "capitalize"]);
1885
- var fontWeightSchema = z8.union([z8.literal(500), z8.literal(600), z8.literal(700)]);
1886
- var buttonTypographySchema = z8.enum(["body", "heading"]);
1887
- var letterSpacingSchema = z8.enum(["tight", "normal", "loose"]);
1888
- var hoverTransformSchema = z8.enum(["none", "lift", "scale", "press"]);
1889
- var hoverColorSchema = z8.enum(["none", "brighten", "darken", "saturate", "token"]);
1890
- var buttonPaddingPresetSchema = z8.enum(["compact", "default", "spacious"]);
1891
- var gradientStyleSchema = z8.enum(["linear", "radial", "conic"]);
1892
- var gradientSharpnessSchema = z8.enum(["smooth", "medium", "hard"]);
1893
- var prioritySchema = z8.union([z8.literal(1), z8.literal(2), z8.literal(3)]);
1894
- var variantRoleSchema = z8.enum(VARIANT_ROLES);
1895
- var buttonSizeNameSchema = z8.enum(["sm", "md", "lg", "xl"]);
1896
- var PADDING_TOKEN_PATTERN = /^(?:0|\d+(?:\.\d+)?(?:rem|em|px|%))$/;
1897
- var paddingShorthandSchema = z8.string().refine(
1898
- (value) => {
1899
- const parts = value.split(/\s+/).filter(Boolean);
1900
- return parts.length === 2 && parts.every((token) => PADDING_TOKEN_PATTERN.test(token));
1901
- },
1902
- {
1903
- message: 'Padding must be two space-separated CSS length tokens (e.g. "0.5rem 1rem"). Use `0` for zero.'
1904
- }
1905
- );
1906
- var buttonSizeConfigSchema = z8.object({
1907
- padding: paddingShorthandSchema,
1908
- fontSize: z8.string().optional()
1909
- });
1910
- var buttonSizesSchema = z8.object({
1911
- sm: buttonSizeConfigSchema,
1912
- md: buttonSizeConfigSchema,
1913
- lg: buttonSizeConfigSchema,
1914
- xl: buttonSizeConfigSchema.optional()
1915
- }).transform(({ sm, md, lg, xl }) => ({
1916
- sm,
1917
- md,
1918
- lg,
1919
- xl: xl ?? lg
1920
- }));
1921
- var buttonGlobalSettingsSchema = z8.object({
1922
- cornerStyle: cornerStyleSchema,
1923
- cornerRadius: z8.number().min(0).max(24).optional(),
1924
- shadow: shadowSizeSchema,
1925
- textTransform: textTransformSchema,
1926
- fontWeight: fontWeightSchema,
1927
- /**
1928
- * @deprecated Set per-variant via `variant.border.widthClass` instead.
1929
- * Schema field is preserved so existing presets parse; the value is unread
1930
- * by the current generator and will be removed once the legacy
1931
- * `primitives/content/components/Button.tsx` slot exports are deleted.
1932
- */
1933
- borderWidth: z8.union([z8.literal(1), z8.literal(2), z8.literal(3)]),
1934
- // === Family-level typography ===
1935
- // Typography source (body or heading) — selects which theme typography pool to inherit
1936
- typography: buttonTypographySchema.optional(),
1937
- // Font size for all variants in the family (Tailwind token, e.g. "text-xs", "text-sm")
1938
- // Sized variants get this as default; fixed variants inherit unless they override.
1939
- // Size class CSS may still override at run time for sized variants.
1940
- fontSize: z8.string().optional(),
1941
- // Letter spacing applied to all variants
1942
- letterSpacing: letterSpacingSchema.optional(),
1943
- // Italic style
1944
- italic: z8.boolean().optional(),
1945
- // Padding preset (applies to sized variants without a sizes config)
1946
- paddingPreset: buttonPaddingPresetSchema.optional(),
1947
- hoverTransform: hoverTransformSchema,
1948
- hoverColor: hoverColorSchema,
1949
- // When hoverColor is 'token', this specifies which token to use
1950
- hoverColorToken: z8.string().optional(),
1951
- // Gradient settings (if any variant uses gradients)
1952
- gradientStyle: gradientStyleSchema.optional(),
1953
- gradientAngle: z8.number().min(0).max(360).optional(),
1954
- gradientSharpness: gradientSharpnessSchema.optional()
1955
- });
1956
- var gradientDirectionSchema = z8.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
1957
- var buttonBackgroundSchema = z8.discriminatedUnion("type", [
1958
- z8.object({ type: z8.literal("solid"), colorToken: z8.string() }),
1959
- z8.object({
1960
- type: z8.literal("gradient"),
1961
- stops: z8.array(z8.string()).min(2),
1962
- direction: gradientDirectionSchema
1963
- }),
1964
- z8.object({ type: z8.literal("transparent") })
1965
- ]);
1966
- var effectApplicationSchema = z8.object({
1967
- effectId: z8.string(),
1968
- options: z8.record(z8.string(), z8.any()).optional()
1969
- });
1970
- var buttonBorderSchema = z8.object({
1971
- widthClass: z8.string(),
1972
- colorToken: z8.string()
1973
- });
1974
- var variantShadowSchema = z8.object({
1975
- elevation: z8.enum(["none", "low", "medium", "high"]),
1976
- softness: z8.enum(["crisp", "soft", "hard"]).nullable(),
1977
- position: z8.enum(["bottom", "bottom-right"]).default("bottom")
1978
- });
1979
- var variantEffectsSchema = z8.object({
1980
- base: z8.array(effectApplicationSchema).optional(),
1981
- hover: z8.array(effectApplicationSchema).optional(),
1982
- active: z8.array(effectApplicationSchema).optional(),
1983
- focus: z8.array(effectApplicationSchema).optional()
1984
- });
1985
- var variantSizeOverridesSchema = z8.object({
1986
- sm: buttonSizeConfigSchema.optional(),
1987
- md: buttonSizeConfigSchema.optional(),
1988
- lg: buttonSizeConfigSchema.optional(),
1989
- xl: buttonSizeConfigSchema.optional()
1990
- });
1991
- var buttonVariantSchema = z8.object({
1992
- id: z8.string(),
1993
- name: z8.string().min(1).max(20),
1994
- enabled: z8.boolean(),
1995
- priority: prioritySchema,
1996
- // Base appearance (token-based)
1997
- background: buttonBackgroundSchema,
1998
- textColorToken: z8.string(),
1999
- /** Tailwind radius token (e.g. `'rounded-md'`). Omit to inherit from `global.cornerStyle`. */
2000
- borderRadius: z8.string().optional(),
2001
- // Optional shadow override (uses theme.shadow if not specified)
2002
- shadow: variantShadowSchema.optional(),
2003
- // Border (optional)
2004
- border: buttonBorderSchema.optional(),
2005
- // Hover background token (per-variant override, takes precedence over global hoverColorToken)
2006
- hoverBackgroundToken: z8.string().optional(),
2007
- // Effect composition
2008
- effects: variantEffectsSchema.optional(),
2009
- // Per-variant size overrides — see VariantSizeOverrides
2010
- sizes: variantSizeOverridesSchema.optional()
2011
- });
2012
- var buttonSystemSchema = z8.object({
2013
- global: buttonGlobalSettingsSchema,
2014
- variants: z8.array(buttonVariantSchema).min(1).max(6),
2015
- sizes: buttonSizesSchema.optional()
2016
- });
2017
-
2018
- // ../theme-core/src/buttons/generateButtonCss.ts
2019
- var BUTTON_SIZE_NAMES = buttonSizeNameSchema.options;
2020
-
2021
- // ../theme-core/src/buttons/personalities/types.ts
2022
- import { z as z9 } from "zod";
2023
- function asButtonPersonalityId(value) {
2024
- if (value.length === 0) {
2025
- throw new Error("ButtonPersonalityId must be a non-empty string");
2026
- }
2027
- return value;
2028
- }
2029
- var buttonPersonalityIdSchema = z9.string().min(1).transform((value) => asButtonPersonalityId(value));
2030
- var buttonPersonalitySchema = z9.object({
2031
- id: buttonPersonalityIdSchema,
2032
- name: z9.string().min(1),
2033
- description: z9.string().min(1),
2034
- tags: styleTagsSchema,
2035
- buttonSystem: buttonSystemSchema
2036
- });
2037
- function defineButtonPersonality(input) {
2038
- return {
2039
- id: asButtonPersonalityId(input.id),
2040
- name: input.name,
2041
- description: input.description,
2042
- tags: input.tags,
2043
- buttonSystem: input.buttonSystem
2044
- };
2045
- }
2046
-
2047
- // ../theme-core/src/buttons/personalities/brushed-wash.ts
2048
- var brushedWash = defineButtonPersonality({
2049
- id: "brushed-wash",
2050
- name: "Brushed Wash",
2051
- description: "Watercolour-gradient buttons with soft shadows and generous padding.",
2052
- tags: { tone: "classic", energy: "vibrant", motion: "standard", era: "organic" },
2053
- buttonSystem: {
2054
- global: {
2055
- cornerStyle: "rounded",
2056
- shadow: "low",
2057
- textTransform: "none",
2058
- fontWeight: 500,
2059
- borderWidth: 1,
2060
- hoverTransform: "none",
2061
- hoverColor: "none"
2062
- },
2063
- sizes: {
2064
- sm: { padding: "0.75rem 2rem", fontSize: "text-sm" },
2065
- md: { padding: "1rem 2.5rem" },
2066
- lg: { padding: "1.25rem 3rem", fontSize: "text-lg" },
2067
- xl: { padding: "1.625rem 3.75rem", fontSize: "text-xl" }
2068
- },
2069
- variants: [
2070
- {
2071
- id: "primary",
2072
- name: "Primary",
2073
- enabled: true,
2074
- priority: 1,
2075
- background: {
2076
- type: "gradient",
2077
- stops: ["primary", "accent"],
2078
- direction: "to-r"
2079
- },
2080
- textColorToken: "primaryForeground",
2081
- borderRadius: "rounded-lg",
2082
- shadow: { elevation: "low", softness: "soft", position: "bottom" },
2083
- effects: {
2084
- hover: [{ effectId: "opacity-reduce", options: { reduction: -15 } }]
2085
- }
2086
- },
2087
- {
2088
- id: "secondary",
2089
- name: "Secondary",
2090
- enabled: true,
2091
- priority: 2,
2092
- background: {
2093
- type: "gradient",
2094
- stops: ["secondary", "accent"],
2095
- direction: "to-br"
2096
- },
2097
- textColorToken: "primaryForeground",
2098
- borderRadius: "rounded-lg",
2099
- shadow: { elevation: "low", softness: "soft", position: "bottom" },
2100
- effects: {
2101
- hover: [{ effectId: "opacity-reduce", options: { reduction: -15 } }]
2102
- }
2103
- },
2104
- {
2105
- id: "outline",
2106
- name: "Outline",
2107
- enabled: true,
2108
- priority: 3,
2109
- background: { type: "transparent" },
2110
- textColorToken: "primary",
2111
- borderRadius: "rounded-lg",
2112
- border: { widthClass: "border", colorToken: "primary" },
2113
- effects: {
2114
- hover: [{ effectId: "background-on-hover", options: { colorToken: "surface" } }]
2115
- }
2116
- },
2117
- {
2118
- id: "ghost",
2119
- name: "Ghost",
2120
- enabled: true,
2121
- priority: 3,
2122
- background: { type: "transparent" },
2123
- textColorToken: "text",
2124
- borderRadius: "rounded-lg",
2125
- effects: {
2126
- hover: [
2127
- { effectId: "background-on-hover", options: { colorToken: "surface" } }
2128
- ]
2129
- }
2130
- }
2131
- ]
2132
- }
2133
- });
2134
-
2135
- // ../theme-core/src/buttons/personalities/confident-chip.ts
2136
- var confidentChip = defineButtonPersonality({
2137
- id: "confident-chip",
2138
- name: "Confident Chip",
2139
- description: "Mid-radius solid buttons with a crisp hover.",
2140
- tags: { tone: "classic", energy: "calm", motion: "standard", era: "modern" },
2141
- buttonSystem: {
2142
- global: {
2143
- cornerStyle: "rounded",
2144
- shadow: "medium",
2145
- textTransform: "none",
2146
- fontWeight: 600,
2147
- borderWidth: 1,
2148
- hoverTransform: "none",
2149
- hoverColor: "none"
2150
- },
2151
- variants: [
2152
- {
2153
- id: "primary",
2154
- name: "Primary",
2155
- enabled: true,
2156
- priority: 1,
2157
- background: { type: "solid", colorToken: "primary" },
2158
- textColorToken: "primaryForeground",
2159
- borderRadius: "rounded-md",
2160
- shadow: { elevation: "medium", softness: "soft", position: "bottom" },
2161
- effects: {
2162
- hover: [{ effectId: "darken-background", options: { amount: 60 } }],
2163
- active: [{ effectId: "scale-down", options: { scale: "0.97" } }]
2164
- }
2165
- },
2166
- {
2167
- id: "secondary",
2168
- name: "Secondary",
2169
- enabled: true,
2170
- priority: 2,
2171
- background: { type: "solid", colorToken: "surface" },
2172
- textColorToken: "text",
2173
- borderRadius: "rounded-md",
2174
- border: { widthClass: "border", colorToken: "border" },
2175
- effects: {
2176
- hover: [{ effectId: "background-on-hover", options: { colorToken: "background" } }]
2177
- }
2178
- },
2179
- {
2180
- id: "outline",
2181
- name: "Outline",
2182
- enabled: true,
2183
- priority: 3,
2184
- background: { type: "transparent" },
2185
- textColorToken: "primary",
2186
- borderRadius: "rounded-md",
2187
- border: { widthClass: "border", colorToken: "primary" },
2188
- effects: {
2189
- hover: [{ effectId: "background-on-hover", options: { colorToken: "surface" } }]
2190
- }
2191
- },
2192
- {
2193
- id: "ghost",
2194
- name: "Ghost",
2195
- enabled: true,
2196
- priority: 3,
2197
- background: { type: "transparent" },
2198
- textColorToken: "primary",
2199
- borderRadius: "rounded-md",
2200
- effects: {
2201
- hover: [{ effectId: "background-on-hover", options: { colorToken: "surface" } }]
2202
- }
2203
- }
2204
- ]
2205
- }
2206
- });
2207
-
2208
- // ../theme-core/src/buttons/personalities/editorial-link.ts
2209
- var editorialLink = defineButtonPersonality({
2210
- id: "editorial-link",
2211
- name: "Editorial Link",
2212
- description: "Link-style with a growing underline. Refined, typographic.",
2213
- tags: { tone: "minimal", energy: "calm", motion: "subtle", era: "editorial" },
2214
- buttonSystem: {
2215
- global: {
2216
- cornerStyle: "square",
2217
- shadow: "none",
2218
- textTransform: "none",
2219
- fontWeight: 500,
2220
- borderWidth: 1,
2221
- hoverTransform: "none",
2222
- hoverColor: "none"
1574
+ textTransform: "none",
1575
+ fontWeight: 500,
1576
+ borderWidth: 1,
1577
+ hoverTransform: "none",
1578
+ hoverColor: "none"
2223
1579
  },
2224
1580
  variants: [
2225
1581
  {
@@ -2568,49 +1924,101 @@ var personalitiesById = new Map(
2568
1924
  buttonPersonalities.map((p) => [p.id, p])
2569
1925
  );
2570
1926
 
1927
+ // ../theme-core/src/palette/variants/types.ts
1928
+ import { z as z17 } from "zod";
1929
+
1930
+ // ../theme-core/src/schema.ts
1931
+ import { z as z16 } from "zod";
1932
+
1933
+ // ../theme-core/src/lib/media.ts
1934
+ import z6 from "zod";
1935
+ var hotspotSchema = z6.object({
1936
+ x: z6.number().min(0).max(1),
1937
+ y: z6.number().min(0).max(1),
1938
+ radius: z6.number().optional()
1939
+ });
1940
+ var rotationSchema = z6.union([z6.literal(0), z6.literal(90), z6.literal(180), z6.literal(270)]);
1941
+ var rectSchema = z6.tuple([z6.number(), z6.number(), z6.number(), z6.number()]);
1942
+ var aspectCropSchema = z6.object({
1943
+ aspect: z6.preprocess((value) => value == null ? void 0 : value, z6.string().optional()),
1944
+ rect: z6.preprocess((value) => value == null ? void 0 : value, rectSchema.optional()),
1945
+ hotspot: z6.preprocess((value) => value == null ? void 0 : value, hotspotSchema.optional()),
1946
+ rotation: z6.preprocess((value) => value == null ? void 0 : value, rotationSchema.optional())
1947
+ });
1948
+ var transformSchema = z6.object({
1949
+ aspectCrops: z6.preprocess((value) => {
1950
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
1951
+ return void 0;
1952
+ }
1953
+ return value;
1954
+ }, z6.record(z6.string(), aspectCropSchema.catch({}))).optional(),
1955
+ rect: rectSchema.optional(),
1956
+ hotspot: hotspotSchema.optional(),
1957
+ rotation: rotationSchema.optional()
1958
+ });
1959
+ var mediaSchema = z6.object({
1960
+ type: z6.enum(["image", "video", "audio", "document", "spreadsheet", "archive"]),
1961
+ purpose: z6.string().optional(),
1962
+ placeholder: z6.boolean().default(true).optional(),
1963
+ assetId: z6.string().optional(),
1964
+ identifier: z6.string().optional(),
1965
+ src: z6.string().optional(),
1966
+ alt: z6.string().optional(),
1967
+ filename: z6.string().optional(),
1968
+ mimeType: z6.string().optional(),
1969
+ width: z6.number().optional(),
1970
+ height: z6.number().optional(),
1971
+ storageBucket: z6.string().optional(),
1972
+ storagePath: z6.string().optional(),
1973
+ transform: transformSchema.optional()
1974
+ });
1975
+
1976
+ // ../theme-core/src/buttons/generateButtonCss.ts
1977
+ var BUTTON_SIZE_NAMES = buttonSizeNameSchema.options;
1978
+
2571
1979
  // ../theme-core/src/cards/types.ts
2572
- import { z as z10 } from "zod";
2573
- var cardSpacingSchema = z10.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]);
2574
- var gradientDirectionSchema2 = z10.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
2575
- var cardBackgroundSchema = z10.discriminatedUnion("type", [
2576
- z10.object({ type: z10.literal("solid"), colorToken: z10.string() }),
2577
- z10.object({
2578
- type: z10.literal("gradient"),
2579
- fromToken: z10.string(),
2580
- toToken: z10.string(),
1980
+ import { z as z7 } from "zod";
1981
+ var cardSpacingSchema = z7.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]);
1982
+ var gradientDirectionSchema2 = z7.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
1983
+ var cardBackgroundSchema = z7.discriminatedUnion("type", [
1984
+ z7.object({ type: z7.literal("solid"), colorToken: z7.string() }),
1985
+ z7.object({
1986
+ type: z7.literal("gradient"),
1987
+ fromToken: z7.string(),
1988
+ toToken: z7.string(),
2581
1989
  direction: gradientDirectionSchema2
2582
1990
  }),
2583
- z10.object({ type: z10.literal("transparent") })
1991
+ z7.object({ type: z7.literal("transparent") })
2584
1992
  ]);
2585
- var cardBorderSchema = z10.object({
2586
- widthClass: z10.string(),
2587
- colorToken: z10.string()
2588
- });
2589
- var cardVariantSchema = z10.object({
2590
- id: z10.string(),
2591
- name: z10.string().min(1).max(20),
2592
- enabled: z10.boolean(),
2593
- priority: z10.union([z10.literal(1), z10.literal(2), z10.literal(3)]),
1993
+ var cardBorderSchema = z7.object({
1994
+ widthClass: z7.string(),
1995
+ colorToken: z7.string()
1996
+ });
1997
+ var cardVariantSchema = z7.object({
1998
+ id: z7.string(),
1999
+ name: z7.string().min(1).max(20),
2000
+ enabled: z7.boolean(),
2001
+ priority: z7.union([z7.literal(1), z7.literal(2), z7.literal(3)]),
2594
2002
  // Appearance (token-based)
2595
2003
  background: cardBackgroundSchema,
2596
2004
  spacing: cardSpacingSchema,
2597
2005
  // Optional overrides (uses theme defaults if not specified)
2598
- shadow: z10.object({
2599
- elevation: z10.enum(["none", "low", "medium", "high"]),
2600
- softness: z10.enum(["crisp", "soft", "hard"]).nullable(),
2601
- position: z10.enum(["bottom", "bottom-right"]).default("bottom")
2006
+ shadow: z7.object({
2007
+ elevation: z7.enum(["none", "low", "medium", "high"]),
2008
+ softness: z7.enum(["crisp", "soft", "hard"]).nullable(),
2009
+ position: z7.enum(["bottom", "bottom-right"]).default("bottom")
2602
2010
  }).optional(),
2603
- corners: z10.enum(["square", "soft", "rounded", "pill"]).optional(),
2011
+ corners: z7.enum(["square", "soft", "rounded", "pill"]).optional(),
2604
2012
  // Border (optional)
2605
2013
  border: cardBorderSchema.optional()
2606
2014
  });
2607
- var cardSystemSchema = z10.object({
2608
- variants: z10.array(cardVariantSchema).min(1).max(3)
2015
+ var cardSystemSchema = z7.object({
2016
+ variants: z7.array(cardVariantSchema).min(1).max(3)
2609
2017
  });
2610
2018
 
2611
2019
  // ../theme-core/src/accordions/types.ts
2612
- import { z as z11 } from "zod";
2613
- var accordionIconSchema = z11.enum([
2020
+ import { z as z8 } from "zod";
2021
+ var accordionIconSchema = z8.enum([
2614
2022
  "plus-minus",
2615
2023
  // + becomes - (swap or rotate 90°)
2616
2024
  "chevron",
@@ -2622,180 +2030,180 @@ var accordionIconSchema = z11.enum([
2622
2030
  "circle-plus-minus"
2623
2031
  // ⊕ becomes ⊖ (swap with fade)
2624
2032
  ]);
2625
- var accordionSystemSchema = z11.object({
2033
+ var accordionSystemSchema = z8.object({
2626
2034
  // Visual styling (solid color only - gradients can be added later if needed)
2627
- background: z11.object({
2628
- type: z11.literal("solid"),
2629
- colorToken: z11.string()
2035
+ background: z8.object({
2036
+ type: z8.literal("solid"),
2037
+ colorToken: z8.string()
2630
2038
  }),
2631
2039
  // Spacing (padding inside items)
2632
- spacing: z11.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]),
2040
+ spacing: z8.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]),
2633
2041
  // Border radius (null = inherit from theme.corners)
2634
- corners: z11.enum(["square", "soft", "rounded", "pill"]).nullable(),
2042
+ corners: z8.enum(["square", "soft", "rounded", "pill"]).nullable(),
2635
2043
  // Border styling (null = inherit from theme.border)
2636
- border: z11.object({
2637
- widthClass: z11.string(),
2044
+ border: z8.object({
2045
+ widthClass: z8.string(),
2638
2046
  // e.g., 'border', 'border-2', 'border-0'
2639
- colorToken: z11.string()
2047
+ colorToken: z8.string()
2640
2048
  }).nullable(),
2641
2049
  // Shadow (null = inherit from theme.shadow)
2642
- shadow: z11.object({
2643
- elevation: z11.enum(["none", "low", "medium", "high"]),
2644
- softness: z11.enum(["soft", "crisp", "hard"]).nullable(),
2645
- position: z11.enum(["bottom", "bottom-right"])
2050
+ shadow: z8.object({
2051
+ elevation: z8.enum(["none", "low", "medium", "high"]),
2052
+ softness: z8.enum(["soft", "crisp", "hard"]).nullable(),
2053
+ position: z8.enum(["bottom", "bottom-right"])
2646
2054
  }).nullable(),
2647
2055
  // Icon style and animation
2648
- icon: z11.object({
2056
+ icon: z8.object({
2649
2057
  style: accordionIconSchema,
2650
- position: z11.enum(["left", "right"]),
2651
- size: z11.enum(["sm", "md", "lg"])
2058
+ position: z8.enum(["left", "right"]),
2059
+ size: z8.enum(["sm", "md", "lg"])
2652
2060
  }),
2653
2061
  // Trigger (question) styling
2654
- trigger: z11.object({
2655
- textColorToken: z11.string(),
2656
- fontWeight: z11.enum(["regular", "medium", "semibold", "bold"]).nullable()
2062
+ trigger: z8.object({
2063
+ textColorToken: z8.string(),
2064
+ fontWeight: z8.enum(["regular", "medium", "semibold", "bold"]).nullable()
2657
2065
  // null = inherit from theme
2658
2066
  }),
2659
2067
  // Hover state styling
2660
- hover: z11.object({
2661
- backgroundColorToken: z11.string().optional(),
2662
- textColorToken: z11.string().optional(),
2663
- borderColorToken: z11.string().optional()
2068
+ hover: z8.object({
2069
+ backgroundColorToken: z8.string().optional(),
2070
+ textColorToken: z8.string().optional(),
2071
+ borderColorToken: z8.string().optional()
2664
2072
  }),
2665
2073
  // Content (answer) styling
2666
- content: z11.object({
2667
- textColorToken: z11.string()
2074
+ content: z8.object({
2075
+ textColorToken: z8.string()
2668
2076
  })
2669
2077
  });
2670
2078
 
2671
2079
  // ../theme-core/src/inputs/types.ts
2672
- import { z as z12 } from "zod";
2673
- var inputSystemSchema = z12.object({
2080
+ import { z as z9 } from "zod";
2081
+ var inputSystemSchema = z9.object({
2674
2082
  // Base styling (applied to all inputs)
2675
- base: z12.object({
2676
- background: z12.union([
2677
- z12.object({
2678
- type: z12.literal("solid"),
2679
- colorToken: z12.string()
2083
+ base: z9.object({
2084
+ background: z9.union([
2085
+ z9.object({
2086
+ type: z9.literal("solid"),
2087
+ colorToken: z9.string()
2680
2088
  }),
2681
- z12.object({
2682
- type: z12.literal("transparent")
2089
+ z9.object({
2090
+ type: z9.literal("transparent")
2683
2091
  })
2684
2092
  ]),
2685
- textColorToken: z12.string(),
2686
- border: z12.object({
2687
- widthClass: z12.string(),
2093
+ textColorToken: z9.string(),
2094
+ border: z9.object({
2095
+ widthClass: z9.string(),
2688
2096
  // e.g., 'border', 'border-2'
2689
- colorToken: z12.string(),
2690
- style: z12.enum(["all", "underline"]).optional()
2097
+ colorToken: z9.string(),
2098
+ style: z9.enum(["all", "underline"]).optional()
2691
2099
  }),
2692
- corners: z12.enum(["square", "soft", "rounded", "pill"]).nullable(),
2100
+ corners: z9.enum(["square", "soft", "rounded", "pill"]).nullable(),
2693
2101
  // null = inherit from theme.corners
2694
- shadow: z12.object({
2695
- elevation: z12.enum(["none", "low", "medium"]),
2696
- softness: z12.enum(["soft", "crisp", "hard"]).nullable()
2102
+ shadow: z9.object({
2103
+ elevation: z9.enum(["none", "low", "medium"]),
2104
+ softness: z9.enum(["soft", "crisp", "hard"]).nullable()
2697
2105
  }).nullable(),
2698
- spacing: z12.enum(["compact", "cozy", "medium", "comfortable"]),
2106
+ spacing: z9.enum(["compact", "cozy", "medium", "comfortable"]),
2699
2107
  // padding inside inputs
2700
- fontSize: z12.enum(["sm", "base", "lg"])
2108
+ fontSize: z9.enum(["sm", "base", "lg"])
2701
2109
  }),
2702
2110
  // Label styling
2703
- label: z12.object({
2704
- textColorToken: z12.string(),
2705
- fontWeight: z12.enum(["regular", "medium", "semibold", "bold", "black"]),
2706
- fontSize: z12.enum(["2xs", "xs", "sm", "base"]),
2707
- textTransform: z12.enum(["none", "uppercase", "lowercase", "capitalize"]).optional(),
2708
- letterSpacing: z12.enum(["normal", "wide", "wider", "widest"]).optional(),
2709
- opacity: z12.number().min(0.2).max(1).optional()
2111
+ label: z9.object({
2112
+ textColorToken: z9.string(),
2113
+ fontWeight: z9.enum(["regular", "medium", "semibold", "bold", "black"]),
2114
+ fontSize: z9.enum(["2xs", "xs", "sm", "base"]),
2115
+ textTransform: z9.enum(["none", "uppercase", "lowercase", "capitalize"]).optional(),
2116
+ letterSpacing: z9.enum(["normal", "wide", "wider", "widest"]).optional(),
2117
+ opacity: z9.number().min(0.2).max(1).optional()
2710
2118
  }),
2711
2119
  // Focus state
2712
- focus: z12.object({
2713
- ringColorToken: z12.string(),
2714
- ringWidth: z12.enum(["0", "1", "2", "3"]),
2715
- borderColorToken: z12.string().optional()
2120
+ focus: z9.object({
2121
+ ringColorToken: z9.string(),
2122
+ ringWidth: z9.enum(["0", "1", "2", "3"]),
2123
+ borderColorToken: z9.string().optional()
2716
2124
  // Change border color on focus
2717
2125
  }),
2718
2126
  // Error state (for validation feedback)
2719
- error: z12.object({
2720
- borderColorToken: z12.string(),
2721
- textColorToken: z12.string()
2127
+ error: z9.object({
2128
+ borderColorToken: z9.string(),
2129
+ textColorToken: z9.string()
2722
2130
  }),
2723
2131
  // Disabled state
2724
- disabled: z12.object({
2725
- backgroundColorToken: z12.string(),
2726
- textColorToken: z12.string(),
2727
- opacity: z12.number().min(0.3).max(0.7)
2132
+ disabled: z9.object({
2133
+ backgroundColorToken: z9.string(),
2134
+ textColorToken: z9.string(),
2135
+ opacity: z9.number().min(0.3).max(0.7)
2728
2136
  })
2729
2137
  });
2730
2138
 
2731
2139
  // ../theme-core/src/gradients/types.ts
2732
- import { z as z13 } from "zod";
2733
- var gradientStopSchema = z13.object({
2734
- color: z13.string(),
2140
+ import { z as z10 } from "zod";
2141
+ var gradientStopSchema = z10.object({
2142
+ color: z10.string(),
2735
2143
  // Theme color token name (e.g., 'primary-500')
2736
- position: z13.number().min(0).max(100)
2144
+ position: z10.number().min(0).max(100)
2737
2145
  // Percentage 0-100
2738
2146
  });
2739
- var gradientConfigSchema = z13.object({
2740
- type: z13.enum(["linear", "radial"]),
2741
- angle: z13.number().min(0).max(360).optional(),
2147
+ var gradientConfigSchema = z10.object({
2148
+ type: z10.enum(["linear", "radial"]),
2149
+ angle: z10.number().min(0).max(360).optional(),
2742
2150
  // For linear gradients (degrees)
2743
- position: z13.string().optional(),
2151
+ position: z10.string().optional(),
2744
2152
  // For radial gradients ('center', 'top left', etc.)
2745
- stops: z13.array(gradientStopSchema).min(2)
2153
+ stops: z10.array(gradientStopSchema).min(2)
2746
2154
  });
2747
2155
 
2748
2156
  // ../theme-core/src/navigation/types.ts
2749
- import { z as z15 } from "zod";
2157
+ import { z as z12 } from "zod";
2750
2158
 
2751
2159
  // ../theme-core/src/interactive/baseSchema.ts
2752
- import { z as z14 } from "zod";
2753
- var interactiveTypographySchema = z14.object({
2160
+ import { z as z11 } from "zod";
2161
+ var interactiveTypographySchema = z11.object({
2754
2162
  /** Font family source */
2755
- typography: z14.enum(["body", "heading"]).default("body"),
2163
+ typography: z11.enum(["body", "heading"]).default("body"),
2756
2164
  /** Font weight */
2757
- fontWeight: z14.enum(["regular", "medium", "semibold", "bold"]).default("medium"),
2165
+ fontWeight: z11.enum(["regular", "medium", "semibold", "bold"]).default("medium"),
2758
2166
  /** Text transform */
2759
- textTransform: z14.enum(["none", "uppercase", "capitalize"]).default("none"),
2167
+ textTransform: z11.enum(["none", "uppercase", "capitalize"]).default("none"),
2760
2168
  /** Italic style */
2761
- italic: z14.boolean().default(false)
2169
+ italic: z11.boolean().default(false)
2762
2170
  });
2763
- var effectApplicationSchema2 = z14.object({
2171
+ var effectApplicationSchema2 = z11.object({
2764
2172
  /** Effect preset ID */
2765
- effectId: z14.string(),
2173
+ effectId: z11.string(),
2766
2174
  /** User-provided customization options */
2767
- options: z14.record(z14.string(), z14.any()).optional()
2175
+ options: z11.record(z11.string(), z11.any()).optional()
2768
2176
  });
2769
- var effectCompositionSchema = z14.object({
2177
+ var effectCompositionSchema = z11.object({
2770
2178
  /** Effects always applied */
2771
- base: z14.array(effectApplicationSchema2).optional(),
2179
+ base: z11.array(effectApplicationSchema2).optional(),
2772
2180
  /** Effects applied on hover */
2773
- hover: z14.array(effectApplicationSchema2).optional(),
2181
+ hover: z11.array(effectApplicationSchema2).optional(),
2774
2182
  /** Effects applied on active/pressed */
2775
- active: z14.array(effectApplicationSchema2).optional(),
2183
+ active: z11.array(effectApplicationSchema2).optional(),
2776
2184
  /** Effects applied on focus */
2777
- focus: z14.array(effectApplicationSchema2).optional()
2185
+ focus: z11.array(effectApplicationSchema2).optional()
2778
2186
  });
2779
2187
 
2780
2188
  // ../theme-core/src/navigation/types.ts
2781
- var navLinkPaddingSchema = z15.enum(["none", "compact", "default"]);
2782
- var navLinkPaddingXSchema = z15.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
2783
- var navLinkBorderRadiusSchema = z15.enum(["none", "sm", "md", "full"]);
2784
- var navLinkTextSizeSchema = z15.enum(["xs", "sm", "base", "lg"]);
2785
- var navLinkLetterSpacingSchema = z15.enum(["normal", "wide", "wider", "widest"]);
2786
- var navLinkStyleSchema = z15.object({
2189
+ var navLinkPaddingSchema = z12.enum(["none", "compact", "default"]);
2190
+ var navLinkPaddingXSchema = z12.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
2191
+ var navLinkBorderRadiusSchema = z12.enum(["none", "sm", "md", "full"]);
2192
+ var navLinkTextSizeSchema = z12.enum(["xs", "sm", "base", "lg"]);
2193
+ var navLinkLetterSpacingSchema = z12.enum(["normal", "wide", "wider", "widest"]);
2194
+ var navLinkStyleSchema = z12.object({
2787
2195
  /** Display name for the style */
2788
- name: z15.string().min(1).max(30).optional(),
2196
+ name: z12.string().min(1).max(30).optional(),
2789
2197
  /** Typography settings (inherited from interactive base) */
2790
2198
  ...interactiveTypographySchema.shape,
2791
2199
  /** Text color token */
2792
- colorToken: z15.string().default("text"),
2200
+ colorToken: z12.string().default("text"),
2793
2201
  /** Optional text size override */
2794
2202
  textSize: navLinkTextSizeSchema.optional(),
2795
2203
  /** Optional letter spacing override */
2796
2204
  letterSpacing: navLinkLetterSpacingSchema.optional(),
2797
2205
  /** Hover/active color token (for color-change effects) */
2798
- hoverColorToken: z15.string().nullable().optional(),
2206
+ hoverColorToken: z12.string().nullable().optional(),
2799
2207
  /** Padding preset */
2800
2208
  padding: navLinkPaddingSchema.default("compact"),
2801
2209
  /** Horizontal padding override (overrides horizontal component of padding preset) */
@@ -2807,7 +2215,7 @@ var navLinkStyleSchema = z15.object({
2807
2215
  });
2808
2216
 
2809
2217
  // ../theme-core/src/customCss/validation.ts
2810
- import { z as z16 } from "zod";
2218
+ import { z as z13 } from "zod";
2811
2219
  var FORBIDDEN_SELECTORS = [":root", "html", "body"];
2812
2220
  var UNIVERSAL_SELECTOR = "*";
2813
2221
  var REMOTE_URL_PATTERN = /url\s*\(\s*['"]?(https?:|\/\/)/i;
@@ -2849,7 +2257,7 @@ function containsForbiddenSelector(selector) {
2849
2257
  }
2850
2258
  return false;
2851
2259
  }
2852
- var selectorSchema = z16.string().min(1, "Selector cannot be empty").max(200, "Selector too long (max 200 characters)").refine(
2260
+ var selectorSchema = z13.string().min(1, "Selector cannot be empty").max(200, "Selector too long (max 200 characters)").refine(
2853
2261
  (s) => !containsForbiddenSelector(s),
2854
2262
  { message: "Global selectors (:root, html, body, *) are not allowed" }
2855
2263
  );
@@ -2859,38 +2267,38 @@ function containsRemoteUrl(value) {
2859
2267
  function containsJavascriptUrl(value) {
2860
2268
  return JAVASCRIPT_URL_PATTERN.test(value);
2861
2269
  }
2862
- var declarationValueSchema = z16.string().max(500, "Declaration value too long (max 500 characters)").refine(
2270
+ var declarationValueSchema = z13.string().max(500, "Declaration value too long (max 500 characters)").refine(
2863
2271
  (v) => !containsRemoteUrl(v),
2864
2272
  { message: "Remote url() references are not allowed. Use local paths, data URIs, or fragment IDs." }
2865
2273
  ).refine(
2866
2274
  (v) => !containsJavascriptUrl(v),
2867
2275
  { message: "javascript: URLs are not allowed" }
2868
2276
  );
2869
- var declarationsSchema = z16.record(
2870
- z16.string().min(1).max(100),
2277
+ var declarationsSchema = z13.record(
2278
+ z13.string().min(1).max(100),
2871
2279
  // property name
2872
2280
  declarationValueSchema
2873
2281
  // property value
2874
2282
  );
2875
- var customCssRuleSchema = z16.object({
2876
- id: z16.string().min(1, "Rule ID is required").max(50, "Rule ID too long"),
2283
+ var customCssRuleSchema = z13.object({
2284
+ id: z13.string().min(1, "Rule ID is required").max(50, "Rule ID too long"),
2877
2285
  selector: selectorSchema,
2878
2286
  declarations: declarationsSchema
2879
2287
  });
2880
2288
  var blockCustomCssRuleSchema = customCssRuleSchema.extend({
2881
- blockKind: z16.string().min(1, "Block kind is required").max(50, "Block kind too long")
2289
+ blockKind: z13.string().min(1, "Block kind is required").max(50, "Block kind too long")
2882
2290
  });
2883
- var customCssRulesSchema = z16.array(customCssRuleSchema).optional();
2884
- var blockCustomCssRulesSchema = z16.array(blockCustomCssRuleSchema).optional();
2291
+ var customCssRulesSchema = z13.array(customCssRuleSchema).optional();
2292
+ var blockCustomCssRulesSchema = z13.array(blockCustomCssRuleSchema).optional();
2885
2293
 
2886
2294
  // ../theme-core/src/customCss/atRuleValidation.ts
2887
- import { z as z17 } from "zod";
2295
+ import { z as z14 } from "zod";
2888
2296
  var KEYFRAME_OFFSET_PATTERN = /^(from|to|\d{1,3}%)$/i;
2889
2297
  var ANIMATION_NAME_PATTERN = /^[a-zA-Z_-][a-zA-Z0-9_-]*$/;
2890
2298
  var BLOCKED_AT_RULES = ["@import", "@charset"];
2891
2299
  var BLOCKED_AT_RULE_PATTERN = /@(?:import|charset)\b/i;
2892
- var ruleIdSchema = z17.string().min(1, "Rule ID is required").max(50, "Rule ID too long");
2893
- var nestedRuleSchema = z17.object({
2300
+ var ruleIdSchema = z14.string().min(1, "Rule ID is required").max(50, "Rule ID too long");
2301
+ var nestedRuleSchema = z14.object({
2894
2302
  selector: selectorSchema,
2895
2303
  declarations: declarationsSchema
2896
2304
  });
@@ -2902,146 +2310,146 @@ function isValidKeyframeOffset(offset) {
2902
2310
  const value = parseInt(match[1], 10);
2903
2311
  return value >= 0 && value <= 100;
2904
2312
  }
2905
- var keyframeOffsetSchema = z17.string().transform((offset) => offset.trim()).refine(
2313
+ var keyframeOffsetSchema = z14.string().transform((offset) => offset.trim()).refine(
2906
2314
  (offset) => KEYFRAME_OFFSET_PATTERN.test(offset),
2907
2315
  { message: 'Invalid keyframe offset. Use percentages (0%, 50%, 100%) or "from"/"to"' }
2908
2316
  ).refine(
2909
2317
  isValidKeyframeOffset,
2910
2318
  { message: "Keyframe offset must be between 0% and 100%" }
2911
2319
  );
2912
- var animationNameSchema = z17.string().min(1, "Animation name is required").max(50, "Animation name too long").refine(
2320
+ var animationNameSchema = z14.string().min(1, "Animation name is required").max(50, "Animation name too long").refine(
2913
2321
  (name) => ANIMATION_NAME_PATTERN.test(name),
2914
2322
  { message: "Invalid animation name. Use letters, numbers, dashes, underscores (start with letter, dash, or underscore)" }
2915
2323
  );
2916
- var keyframeSchema = z17.object({
2324
+ var keyframeSchema = z14.object({
2917
2325
  offset: keyframeOffsetSchema,
2918
2326
  declarations: declarationsSchema
2919
2327
  });
2920
- var keyframesAtRuleSchema = z17.object({
2328
+ var keyframesAtRuleSchema = z14.object({
2921
2329
  id: ruleIdSchema,
2922
- type: z17.literal("keyframes"),
2330
+ type: z14.literal("keyframes"),
2923
2331
  name: animationNameSchema,
2924
- frames: z17.array(keyframeSchema).min(1, "At least one keyframe is required")
2332
+ frames: z14.array(keyframeSchema).min(1, "At least one keyframe is required")
2925
2333
  });
2926
- var fontFaceDeclarationsSchema = z17.record(z17.string().min(1).max(100), declarationValueSchema).refine(
2334
+ var fontFaceDeclarationsSchema = z14.record(z14.string().min(1).max(100), declarationValueSchema).refine(
2927
2335
  (decls) => "fontFamily" in decls || "font-family" in decls,
2928
2336
  { message: "font-family is required in @font-face" }
2929
2337
  );
2930
- var fontFaceAtRuleSchema = z17.object({
2338
+ var fontFaceAtRuleSchema = z14.object({
2931
2339
  id: ruleIdSchema,
2932
- type: z17.literal("font-face"),
2340
+ type: z14.literal("font-face"),
2933
2341
  declarations: fontFaceDeclarationsSchema
2934
2342
  });
2935
- var mediaQuerySchema = z17.string().min(1, "Media query is required").max(200, "Media query too long");
2936
- var mediaAtRuleSchema = z17.object({
2343
+ var mediaQuerySchema = z14.string().min(1, "Media query is required").max(200, "Media query too long");
2344
+ var mediaAtRuleSchema = z14.object({
2937
2345
  id: ruleIdSchema,
2938
- type: z17.literal("media"),
2346
+ type: z14.literal("media"),
2939
2347
  query: mediaQuerySchema,
2940
- rules: z17.array(nestedRuleSchema).min(1, "At least one rule is required")
2348
+ rules: z14.array(nestedRuleSchema).min(1, "At least one rule is required")
2941
2349
  });
2942
- var supportsConditionSchema = z17.string().min(1, "Supports condition is required").max(200, "Supports condition too long");
2943
- var supportsAtRuleSchema = z17.object({
2350
+ var supportsConditionSchema = z14.string().min(1, "Supports condition is required").max(200, "Supports condition too long");
2351
+ var supportsAtRuleSchema = z14.object({
2944
2352
  id: ruleIdSchema,
2945
- type: z17.literal("supports"),
2353
+ type: z14.literal("supports"),
2946
2354
  condition: supportsConditionSchema,
2947
- rules: z17.array(nestedRuleSchema).min(1, "At least one rule is required")
2355
+ rules: z14.array(nestedRuleSchema).min(1, "At least one rule is required")
2948
2356
  });
2949
2357
  function containsBlockedAtRule(css) {
2950
2358
  return BLOCKED_AT_RULE_PATTERN.test(css);
2951
2359
  }
2952
- var rawCssSchema = z17.string().min(1, "CSS is required").max(5e3, "Raw CSS too long (max 5000 characters)").refine(
2360
+ var rawCssSchema = z14.string().min(1, "CSS is required").max(5e3, "Raw CSS too long (max 5000 characters)").refine(
2953
2361
  (css) => css.trim().startsWith("@"),
2954
2362
  { message: "Raw at-rule must start with @" }
2955
2363
  ).refine(
2956
2364
  (css) => !containsBlockedAtRule(css),
2957
2365
  { message: `Blocked at-rules: ${BLOCKED_AT_RULES.join(", ")}. Use typed at-rules or local assets instead.` }
2958
2366
  );
2959
- var rawAtRuleSchema = z17.object({
2367
+ var rawAtRuleSchema = z14.object({
2960
2368
  id: ruleIdSchema,
2961
- type: z17.literal("raw"),
2369
+ type: z14.literal("raw"),
2962
2370
  css: rawCssSchema
2963
2371
  });
2964
- var customCssAtRuleSchema = z17.discriminatedUnion("type", [
2372
+ var customCssAtRuleSchema = z14.discriminatedUnion("type", [
2965
2373
  keyframesAtRuleSchema,
2966
2374
  fontFaceAtRuleSchema,
2967
2375
  mediaAtRuleSchema,
2968
2376
  supportsAtRuleSchema,
2969
2377
  rawAtRuleSchema
2970
2378
  ]);
2971
- var customCssAtRulesSchema = z17.array(customCssAtRuleSchema).optional();
2379
+ var customCssAtRulesSchema = z14.array(customCssAtRuleSchema).optional();
2972
2380
 
2973
2381
  // ../theme-core/src/shared/componentStyles.ts
2974
- import { z as z18 } from "zod";
2975
- var componentBorderSchema = z18.object({
2976
- width: z18.enum(["none", "hairline", "thin", "medium", "thick"]).default("none"),
2977
- style: z18.enum(["solid", "dashed"]).default("solid"),
2978
- colorToken: z18.string().optional()
2382
+ import { z as z15 } from "zod";
2383
+ var componentBorderSchema = z15.object({
2384
+ width: z15.enum(["none", "hairline", "thin", "medium", "thick"]).default("none"),
2385
+ style: z15.enum(["solid", "dashed"]).default("solid"),
2386
+ colorToken: z15.string().optional()
2979
2387
  // defaults to "border" if not set
2980
2388
  });
2981
- var componentShadowSchema = z18.object({
2982
- elevation: z18.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("sm")
2389
+ var componentShadowSchema = z15.object({
2390
+ elevation: z15.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("sm")
2983
2391
  });
2984
2392
 
2985
2393
  // ../theme-core/src/schema.ts
2986
- var axesSchema = z19.object({
2987
- tone: z19.enum(["minimal", "classic", "bold"]),
2988
- energy: z19.enum(["calm", "vibrant"]),
2989
- density: z19.enum(["airy", "regular", "compact"]),
2990
- mediaBias: z19.enum(["text", "media", "mixed"]),
2991
- conversionBias: z19.enum(["low", "med", "high"]),
2992
- motion: z19.enum(["subtle", "standard", "expressive"])
2993
- });
2994
- var colourHexString = z19.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
2995
- var paletteColorSchema = z19.object({
2996
- name: z19.string().min(1),
2394
+ var axesSchema = z16.object({
2395
+ tone: z16.enum(["minimal", "classic", "bold"]),
2396
+ energy: z16.enum(["calm", "vibrant"]),
2397
+ density: z16.enum(["airy", "regular", "compact"]),
2398
+ mediaBias: z16.enum(["text", "media", "mixed"]),
2399
+ conversionBias: z16.enum(["low", "med", "high"]),
2400
+ motion: z16.enum(["subtle", "standard", "expressive"])
2401
+ });
2402
+ var colourHexString = z16.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
2403
+ var paletteColorSchema = z16.object({
2404
+ name: z16.string().min(1),
2997
2405
  hex: colourHexString
2998
2406
  });
2999
- var paletteMetaSchema = z19.object({
3000
- mode: z19.enum(["light", "dark"])
2407
+ var paletteMetaSchema = z16.object({
2408
+ mode: z16.enum(["light", "dark"])
3001
2409
  });
3002
- var paletteSchema = z19.object({
3003
- colors: z19.array(paletteColorSchema),
2410
+ var paletteSchema = z16.object({
2411
+ colors: z16.array(paletteColorSchema),
3004
2412
  meta: paletteMetaSchema
3005
2413
  });
3006
- var typographyStyleSchema = z19.object({
3007
- family: z19.string().min(1),
3008
- weight: z19.enum(["light", "regular", "medium", "semibold", "bold"]),
3009
- letterSpacing: z19.enum(["tight", "normal", "loose"]),
3010
- lineHeight: z19.enum(["normal", "relaxed", "loose"])
2414
+ var typographyStyleSchema = z16.object({
2415
+ family: z16.string().min(1),
2416
+ weight: z16.enum(["light", "regular", "medium", "semibold", "bold"]),
2417
+ letterSpacing: z16.enum(["tight", "normal", "loose"]),
2418
+ lineHeight: z16.enum(["normal", "relaxed", "loose"])
3011
2419
  });
3012
2420
  var bodyTypographyStyleSchema = typographyStyleSchema.extend({
3013
- size: z19.enum(["md", "lg", "xl"])
2421
+ size: z16.enum(["md", "lg", "xl"])
3014
2422
  });
3015
- var headingSizeSchema = z19.enum(["xs", "sm", "md", "lg", "xl", "2xl"]);
3016
- var headingTypographyOverridesSchema = z19.object({
3017
- weight: z19.enum(["light", "regular", "medium", "semibold", "bold"]).nullable().optional(),
3018
- letterSpacing: z19.enum(["tight", "normal", "loose"]).nullable().optional(),
2423
+ var headingSizeSchema = z16.enum(["xs", "sm", "md", "lg", "xl", "2xl"]);
2424
+ var headingTypographyOverridesSchema = z16.object({
2425
+ weight: z16.enum(["light", "regular", "medium", "semibold", "bold"]).nullable().optional(),
2426
+ letterSpacing: z16.enum(["tight", "normal", "loose"]).nullable().optional(),
3019
2427
  size: headingSizeSchema.nullable().optional(),
3020
- lineHeight: z19.enum(["normal", "relaxed", "loose"]).nullable().optional(),
3021
- italic: z19.boolean().nullable().optional(),
3022
- colorToken: z19.string().min(1).nullable().optional()
2428
+ lineHeight: z16.enum(["normal", "relaxed", "loose"]).nullable().optional(),
2429
+ italic: z16.boolean().nullable().optional(),
2430
+ colorToken: z16.string().min(1).nullable().optional()
3023
2431
  // Palette token name for heading color
3024
2432
  });
3025
2433
  var headingTypographyStyleSchema = typographyStyleSchema.extend({
3026
- case: z19.enum(["uppercase", "normal", "smallCaps"]).nullable(),
3027
- italic: z19.boolean().nullable(),
3028
- colorToken: z19.string().min(1).nullable().optional()
2434
+ case: z16.enum(["uppercase", "normal", "smallCaps"]).nullable(),
2435
+ italic: z16.boolean().nullable(),
2436
+ colorToken: z16.string().min(1).nullable().optional()
3029
2437
  // Palette token name for heading color
3030
2438
  });
3031
- var proseLinkUnderlineStyleSchema = z19.enum(["solid", "dotted", "dashed"]);
3032
- var proseLinkUnderlineThicknessSchema = z19.enum(["auto", "fromFont", "thin", "medium", "thick"]);
3033
- var proseLinkUnderlineOffsetSchema = z19.enum(["auto", "tight", "normal", "loose"]);
3034
- var proseLinkStyleSchema = z19.object({
3035
- colorToken: z19.string().min(1).optional(),
3036
- hoverColorToken: z19.string().min(1).optional(),
3037
- underline: z19.boolean().optional(),
3038
- decorationColorToken: z19.string().min(1).optional(),
3039
- hoverDecorationColorToken: z19.string().min(1).optional(),
2439
+ var proseLinkUnderlineStyleSchema = z16.enum(["solid", "dotted", "dashed"]);
2440
+ var proseLinkUnderlineThicknessSchema = z16.enum(["auto", "fromFont", "thin", "medium", "thick"]);
2441
+ var proseLinkUnderlineOffsetSchema = z16.enum(["auto", "tight", "normal", "loose"]);
2442
+ var proseLinkStyleSchema = z16.object({
2443
+ colorToken: z16.string().min(1).optional(),
2444
+ hoverColorToken: z16.string().min(1).optional(),
2445
+ underline: z16.boolean().optional(),
2446
+ decorationColorToken: z16.string().min(1).optional(),
2447
+ hoverDecorationColorToken: z16.string().min(1).optional(),
3040
2448
  underlineStyle: proseLinkUnderlineStyleSchema.optional(),
3041
2449
  underlineThickness: proseLinkUnderlineThicknessSchema.optional(),
3042
2450
  underlineOffset: proseLinkUnderlineOffsetSchema.optional()
3043
2451
  });
3044
- var semanticSpacingSchema = z19.enum([
2452
+ var semanticSpacingSchema = z16.enum([
3045
2453
  "none",
3046
2454
  "compact",
3047
2455
  "cozy",
@@ -3049,62 +2457,62 @@ var semanticSpacingSchema = z19.enum([
3049
2457
  "comfortable",
3050
2458
  "spacious"
3051
2459
  ]);
3052
- var boxRoundedSchema = z19.enum(["none", "sm", "md", "lg", "xl", "2xl", "full"]);
3053
- var boxBackgroundOverlaySchema = z19.object({
3054
- type: z19.enum(["none", "color", "gradient"]).nullable().optional(),
3055
- color: z19.string().nullable().optional(),
3056
- gradient: z19.string().nullable().optional(),
3057
- opacity: z19.number().min(0).max(1).nullable().optional()
3058
- });
3059
- var boxBackgroundSchema = z19.object({
3060
- type: z19.enum(["color", "gradient", "image"]).optional(),
3061
- color: z19.string().nullable().optional(),
3062
- gradient: z19.string().nullable().optional(),
2460
+ var boxRoundedSchema = z16.enum(["none", "sm", "md", "lg", "xl", "2xl", "full"]);
2461
+ var boxBackgroundOverlaySchema = z16.object({
2462
+ type: z16.enum(["none", "color", "gradient"]).nullable().optional(),
2463
+ color: z16.string().nullable().optional(),
2464
+ gradient: z16.string().nullable().optional(),
2465
+ opacity: z16.number().min(0).max(1).nullable().optional()
2466
+ });
2467
+ var boxBackgroundSchema = z16.object({
2468
+ type: z16.enum(["color", "gradient", "image"]).optional(),
2469
+ color: z16.string().nullable().optional(),
2470
+ gradient: z16.string().nullable().optional(),
3063
2471
  image: mediaSchema.nullable().optional(),
3064
- objectFit: z19.enum(["fill", "fit", "original", "custom"]).nullable().optional(),
3065
- scale: z19.string().nullable().optional(),
3066
- position: z19.string().nullable().optional(),
3067
- opacity: z19.number().min(0).max(1).nullable().optional(),
2472
+ objectFit: z16.enum(["fill", "fit", "original", "custom"]).nullable().optional(),
2473
+ scale: z16.string().nullable().optional(),
2474
+ position: z16.string().nullable().optional(),
2475
+ opacity: z16.number().min(0).max(1).nullable().optional(),
3068
2476
  overlay: boxBackgroundOverlaySchema.nullable().optional(),
3069
- textColor: z19.string().nullable().optional(),
3070
- headingColor: z19.string().nullable().optional()
2477
+ textColor: z16.string().nullable().optional(),
2478
+ headingColor: z16.string().nullable().optional()
3071
2479
  });
3072
- var sectionStylesOverrideSchema = z19.object({
2480
+ var sectionStylesOverrideSchema = z16.object({
3073
2481
  background: boxBackgroundSchema.nullable().optional(),
3074
2482
  spacing: semanticSpacingSchema.nullable().optional(),
3075
- minHeight: z19.enum(["none", "hero", "immersive"]).nullable().optional()
2483
+ minHeight: z16.enum(["none", "hero", "immersive"]).nullable().optional()
3076
2484
  });
3077
- var containerStylesOverrideSchema = z19.object({
2485
+ var containerStylesOverrideSchema = z16.object({
3078
2486
  background: boxBackgroundSchema.nullable().optional(),
3079
2487
  spacing: semanticSpacingSchema.nullable().optional(),
3080
- raised: z19.boolean().nullable().optional(),
2488
+ raised: z16.boolean().nullable().optional(),
3081
2489
  rounded: boxRoundedSchema.nullable().optional(),
3082
- fullWidth: z19.boolean().nullable().optional()
2490
+ fullWidth: z16.boolean().nullable().optional()
3083
2491
  });
3084
- var cardBorderOverrideSchema = z19.object({
3085
- enabled: z19.boolean().nullable().optional(),
3086
- width: z19.enum(["none", "1", "2", "3"]).nullable().optional(),
3087
- colorToken: z19.string().nullable().optional()
2492
+ var cardBorderOverrideSchema = z16.object({
2493
+ enabled: z16.boolean().nullable().optional(),
2494
+ width: z16.enum(["none", "1", "2", "3"]).nullable().optional(),
2495
+ colorToken: z16.string().nullable().optional()
3088
2496
  });
3089
- var cardStylesOverrideSchema = z19.object({
2497
+ var cardStylesOverrideSchema = z16.object({
3090
2498
  background: boxBackgroundSchema.nullable().optional(),
3091
2499
  border: cardBorderOverrideSchema.nullable().optional(),
3092
2500
  spacing: semanticSpacingSchema.nullable().optional(),
3093
- raised: z19.boolean().nullable().optional(),
2501
+ raised: z16.boolean().nullable().optional(),
3094
2502
  rounded: boxRoundedSchema.nullable().optional()
3095
2503
  });
3096
- var blockStyleOverridesSchema = z19.object({
2504
+ var blockStyleOverridesSchema = z16.object({
3097
2505
  sectionStyles: sectionStylesOverrideSchema.nullable().optional(),
3098
2506
  containerStyles: containerStylesOverrideSchema.nullable().optional(),
3099
2507
  cardStyles: cardStylesOverrideSchema.nullable().optional()
3100
2508
  });
3101
- var blockThemeOverrideSchema = z19.object({
3102
- typography: z19.object({
2509
+ var blockThemeOverrideSchema = z16.object({
2510
+ typography: z16.object({
3103
2511
  proseLinkStyle: proseLinkStyleSchema.optional()
3104
2512
  }).optional(),
3105
2513
  styles: blockStyleOverridesSchema.optional()
3106
2514
  });
3107
- var typographyScaleSchema = z19.enum([
2515
+ var typographyScaleSchema = z16.enum([
3108
2516
  // New intuitive names
3109
2517
  "compact",
3110
2518
  // ratio 1.2 (was minorThird)
@@ -3117,9 +2525,9 @@ var typographyScaleSchema = z19.enum([
3117
2525
  "majorThird",
3118
2526
  "perfectFourth"
3119
2527
  ]);
3120
- var typographySchema = z19.object({
2528
+ var typographySchema = z16.object({
3121
2529
  body: bodyTypographyStyleSchema,
3122
- headings: z19.object({
2530
+ headings: z16.object({
3123
2531
  default: headingTypographyStyleSchema,
3124
2532
  h1: headingTypographyOverridesSchema,
3125
2533
  h2: headingTypographyOverridesSchema,
@@ -3132,41 +2540,41 @@ var typographySchema = z19.object({
3132
2540
  scale: typographyScaleSchema,
3133
2541
  proseLinkStyle: proseLinkStyleSchema.optional()
3134
2542
  });
3135
- var spaceSchema = z19.enum(["comfortable", "standard", "dense"]);
3136
- var corners = z19.enum(["square", "soft", "rounded", "pill"]);
3137
- var shadow = z19.object({
3138
- elevation: z19.enum(["none", "low", "medium", "high"]),
3139
- softness: z19.enum(["crisp", "soft", "hard"]).nullable(),
3140
- position: z19.enum(["bottom", "bottom-right"]).default("bottom")
2543
+ var spaceSchema = z16.enum(["comfortable", "standard", "dense"]);
2544
+ var corners = z16.enum(["square", "soft", "rounded", "pill"]);
2545
+ var shadow = z16.object({
2546
+ elevation: z16.enum(["none", "low", "medium", "high"]),
2547
+ softness: z16.enum(["crisp", "soft", "hard"]).nullable(),
2548
+ position: z16.enum(["bottom", "bottom-right"]).default("bottom")
3141
2549
  });
3142
- var border = z19.object({
3143
- width: z19.enum(["none", "hairline", "thin", "thick"]),
3144
- style: z19.enum(["solid", "dashed"])
2550
+ var border = z16.object({
2551
+ width: z16.enum(["none", "hairline", "thin", "thick"]),
2552
+ style: z16.enum(["solid", "dashed"])
3145
2553
  });
3146
- var motion = z19.object({
3147
- level: z19.enum(["off", "low", "medium", "high"]),
3148
- easing: z19.enum(["standard", "snappy", "gentle"]).nullable()
2554
+ var motion = z16.object({
2555
+ level: z16.enum(["off", "low", "medium", "high"]),
2556
+ easing: z16.enum(["standard", "snappy", "gentle"]).nullable()
3149
2557
  });
3150
- var buttonStyle = z19.object({
2558
+ var buttonStyle = z16.object({
3151
2559
  shape: corners
3152
2560
  // Used for --radius-control CSS variable
3153
2561
  });
3154
- var cardStyle = z19.object({
3155
- elevation: z19.enum(["none", "low", "medium", "high"]),
3156
- border: z19.enum(["none", "subtle", "defined"]),
2562
+ var cardStyle = z16.object({
2563
+ elevation: z16.enum(["none", "low", "medium", "high"]),
2564
+ border: z16.enum(["none", "subtle", "defined"]),
3157
2565
  shape: corners,
3158
- headerStyle: z19.enum(["plain", "accentBar", "subtleBg"]).nullable(),
3159
- mediaTreatment: z19.enum(["square", "rounded", "bleed"]).nullable()
2566
+ headerStyle: z16.enum(["plain", "accentBar", "subtleBg"]).nullable(),
2567
+ mediaTreatment: z16.enum(["square", "rounded", "bleed"]).nullable()
3160
2568
  });
3161
- var inputStyle = z19.object({
2569
+ var inputStyle = z16.object({
3162
2570
  shape: corners,
3163
- border: z19.enum(["subtle", "defined", "underline"]),
3164
- focus: z19.enum(["glow", "ring", "underline"]),
3165
- label: z19.enum(["inside", "above"])
2571
+ border: z16.enum(["subtle", "defined", "underline"]),
2572
+ focus: z16.enum(["glow", "ring", "underline"]),
2573
+ label: z16.enum(["inside", "above"])
3166
2574
  });
3167
- var headerVariant = z19.enum(["classic", "centered", "transparent", "floating", "editorial"]);
3168
- var headerPositioning = z19.enum(["static", "sticky", "fixed"]);
3169
- var headerNavStyle = z19.enum([
2575
+ var headerVariant = z16.enum(["classic", "centered", "transparent", "floating", "editorial"]);
2576
+ var headerPositioning = z16.enum(["static", "sticky", "fixed"]);
2577
+ var headerNavStyle = z16.enum([
3170
2578
  "minimal",
3171
2579
  "underline",
3172
2580
  "underline-grow",
@@ -3175,82 +2583,82 @@ var headerNavStyle = z19.enum([
3175
2583
  "frosted",
3176
2584
  "solid"
3177
2585
  ]);
3178
- var navFontWeight = z19.enum(["regular", "medium", "semibold", "bold"]);
3179
- var headerMaxWidth = z19.enum(["container", "full"]);
3180
- var headerContainerSchema = z19.object({
3181
- rounded: z19.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("xl"),
3182
- border: z19.boolean().default(true),
3183
- shadow: z19.boolean().default(true),
3184
- padding: z19.enum(["sm", "md", "lg"]).default("md"),
3185
- tint: z19.string().nullable().optional(),
3186
- opacity: z19.number().min(0).max(1).default(0.12)
2586
+ var navFontWeight = z16.enum(["regular", "medium", "semibold", "bold"]);
2587
+ var headerMaxWidth = z16.enum(["container", "full"]);
2588
+ var headerContainerSchema = z16.object({
2589
+ rounded: z16.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("xl"),
2590
+ border: z16.boolean().default(true),
2591
+ shadow: z16.boolean().default(true),
2592
+ padding: z16.enum(["sm", "md", "lg"]).default("md"),
2593
+ tint: z16.string().nullable().optional(),
2594
+ opacity: z16.number().min(0).max(1).default(0.12)
3187
2595
  }).optional();
3188
2596
  var headerBorderSchema = componentBorderSchema.extend({
3189
- position: z19.enum(["bottom", "top", "both", "none"]).default("bottom")
2597
+ position: z16.enum(["bottom", "top", "both", "none"]).default("bottom")
3190
2598
  }).optional();
3191
- var logoStyleSchema = z19.object({
3192
- fontFamily: z19.enum(["heading", "body"]).default("heading"),
3193
- letterSpacing: z19.enum(["normal", "wide", "wider", "widest"]).default("normal"),
3194
- gradient: z19.boolean().default(false)
2599
+ var logoStyleSchema = z16.object({
2600
+ fontFamily: z16.enum(["heading", "body"]).default("heading"),
2601
+ letterSpacing: z16.enum(["normal", "wide", "wider", "widest"]).default("normal"),
2602
+ gradient: z16.boolean().default(false)
3195
2603
  }).optional();
3196
- var headerLogoTextSchema = z19.object({
3197
- mobileWrapLines: z19.union([z19.literal(1), z19.literal(2)]).optional(),
3198
- mobileMaxWidth: z19.enum(["xs", "sm", "md"]).optional(),
3199
- hideOnShrink: z19.boolean().optional()
2604
+ var headerLogoTextSchema = z16.object({
2605
+ mobileWrapLines: z16.union([z16.literal(1), z16.literal(2)]).optional(),
2606
+ mobileMaxWidth: z16.enum(["xs", "sm", "md"]).optional(),
2607
+ hideOnShrink: z16.boolean().optional()
3200
2608
  }).optional();
3201
- var navEffectsSchema = z19.object({
3202
- underlineGradient: z19.boolean().default(false),
3203
- glow: z19.boolean().default(false),
3204
- glowColor: z19.string().optional(),
3205
- neumorphic: z19.boolean().default(false)
2609
+ var navEffectsSchema = z16.object({
2610
+ underlineGradient: z16.boolean().default(false),
2611
+ glow: z16.boolean().default(false),
2612
+ glowColor: z16.string().optional(),
2613
+ neumorphic: z16.boolean().default(false)
3206
2614
  }).optional();
3207
- var dropdownStyleSchema = z19.object({
2615
+ var dropdownStyleSchema = z16.object({
3208
2616
  // Container styling
3209
- background: z19.string().default("surface"),
2617
+ background: z16.string().default("surface"),
3210
2618
  // color token
3211
- textColor: z19.string().default("text"),
2619
+ textColor: z16.string().default("text"),
3212
2620
  // color token
3213
- borderColor: z19.string().nullable().default("border"),
2621
+ borderColor: z16.string().nullable().default("border"),
3214
2622
  // null = no border
3215
- shadow: z19.enum(["none", "sm", "md", "lg"]).default("md"),
3216
- borderRadius: z19.enum(["none", "sm", "md", "lg"]).default("md"),
2623
+ shadow: z16.enum(["none", "sm", "md", "lg"]).default("md"),
2624
+ borderRadius: z16.enum(["none", "sm", "md", "lg"]).default("md"),
3217
2625
  // Link hover states (explicit control)
3218
- hoverBackground: z19.string().nullable().optional(),
2626
+ hoverBackground: z16.string().nullable().optional(),
3219
2627
  // color token, null = transparent
3220
- hoverTextColor: z19.string().nullable().optional(),
2628
+ hoverTextColor: z16.string().nullable().optional(),
3221
2629
  // color token, null = inherit
3222
2630
  // Typography
3223
- textTransform: z19.enum(["none", "uppercase", "capitalize"]).default("none"),
3224
- letterSpacing: z19.enum(["normal", "wide", "wider"]).default("normal"),
3225
- fontWeight: z19.enum(["regular", "medium", "semibold", "bold"]).optional(),
2631
+ textTransform: z16.enum(["none", "uppercase", "capitalize"]).default("none"),
2632
+ letterSpacing: z16.enum(["normal", "wide", "wider"]).default("normal"),
2633
+ fontWeight: z16.enum(["regular", "medium", "semibold", "bold"]).optional(),
3226
2634
  // optional = inherit from navWeight
3227
- textSize: z19.enum(["xs", "sm", "base", "lg"]).optional()
2635
+ textSize: z16.enum(["xs", "sm", "base", "lg"]).optional()
3228
2636
  // optional = no override (browser default)
3229
2637
  }).optional();
3230
- var headerCtaGapSchema = z19.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
3231
- var navContainerSchema = z19.object({
3232
- type: z19.enum(["none", "pill", "glass"]).default("none"),
3233
- tint: z19.string().nullable().optional(),
3234
- opacity: z19.number().min(0).max(1).default(0.15)
2638
+ var headerCtaGapSchema = z16.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
2639
+ var navContainerSchema = z16.object({
2640
+ type: z16.enum(["none", "pill", "glass"]).default("none"),
2641
+ tint: z16.string().nullable().optional(),
2642
+ opacity: z16.number().min(0).max(1).default(0.15)
3235
2643
  }).default({ type: "none", tint: null, opacity: 0.15 });
3236
- var headerBackgroundSchema = z19.object({
3237
- type: z19.enum(["color", "gradient", "image"]),
3238
- color: z19.string().nullable().optional(),
2644
+ var headerBackgroundSchema = z16.object({
2645
+ type: z16.enum(["color", "gradient", "image"]),
2646
+ color: z16.string().nullable().optional(),
3239
2647
  gradient: gradientConfigSchema.nullable().optional(),
3240
2648
  image: mediaSchema.nullable().optional(),
3241
- textColor: z19.string().nullable().optional()
2649
+ textColor: z16.string().nullable().optional()
3242
2650
  });
3243
- var headerSchema = z19.object({
2651
+ var headerSchema = z16.object({
3244
2652
  variant: headerVariant,
3245
2653
  positioning: headerPositioning,
3246
- shrinkOnScroll: z19.boolean(),
2654
+ shrinkOnScroll: z16.boolean(),
3247
2655
  maxWidth: headerMaxWidth,
3248
2656
  logoOverride: mediaSchema.nullable().optional(),
3249
2657
  background: headerBackgroundSchema.default({ type: "color", color: "surface" }),
3250
- textColor: z19.string().nullable().optional(),
2658
+ textColor: z16.string().nullable().optional(),
3251
2659
  // Site title and general header text
3252
2660
  navStyle: headerNavStyle,
3253
- navColor: z19.string().nullable().optional(),
2661
+ navColor: z16.string().nullable().optional(),
3254
2662
  // Nav links (inherits textColor if not set)
3255
2663
  navWeight: navFontWeight.default("medium"),
3256
2664
  // New fields for header system enhancement
@@ -3269,50 +2677,50 @@ var headerSchema = z19.object({
3269
2677
  // Dropdown menu styling (nav dropdowns and mobile drawer)
3270
2678
  dropdownStyle: dropdownStyleSchema
3271
2679
  });
3272
- var footerVariant = z19.enum(["simple", "columns", "split"]);
3273
- var footerMaxWidth = z19.enum(["container", "full"]);
3274
- var footerMode = z19.enum(["default", "blocks", "default+blocks", "none"]);
3275
- var footerNavLayoutMode = z19.enum(["stack", "inline", "inline-wrap"]);
3276
- var footerNavLayoutAlign = z19.enum(["start", "center", "end", "space-between"]);
3277
- var footerSpacing = z19.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
3278
- var footerLogoPlacement = z19.enum(["left", "right", "above", "below"]);
3279
- var footerLogoSize = z19.enum(["sm", "md", "lg", "xl"]);
3280
- var footerLogoMaxHeight = z19.enum(["sm", "md", "lg", "xl"]);
3281
- var footerBottomTextLinkStyleSchema = z19.object({
3282
- colorToken: z19.string().optional(),
3283
- hoverColorToken: z19.string().nullable().optional(),
3284
- decorationColorToken: z19.string().nullable().optional(),
3285
- underline: z19.boolean().optional()
3286
- });
3287
- var footerBottomBarSchema = z19.object({
3288
- enabled: z19.boolean().optional(),
3289
- fullBleed: z19.boolean().optional(),
2680
+ var footerVariant = z16.enum(["simple", "columns", "split"]);
2681
+ var footerMaxWidth = z16.enum(["container", "full"]);
2682
+ var footerMode = z16.enum(["default", "blocks", "default+blocks", "none"]);
2683
+ var footerNavLayoutMode = z16.enum(["stack", "inline", "inline-wrap"]);
2684
+ var footerNavLayoutAlign = z16.enum(["start", "center", "end", "space-between"]);
2685
+ var footerSpacing = z16.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
2686
+ var footerLogoPlacement = z16.enum(["left", "right", "above", "below"]);
2687
+ var footerLogoSize = z16.enum(["sm", "md", "lg", "xl"]);
2688
+ var footerLogoMaxHeight = z16.enum(["sm", "md", "lg", "xl"]);
2689
+ var footerBottomTextLinkStyleSchema = z16.object({
2690
+ colorToken: z16.string().optional(),
2691
+ hoverColorToken: z16.string().nullable().optional(),
2692
+ decorationColorToken: z16.string().nullable().optional(),
2693
+ underline: z16.boolean().optional()
2694
+ });
2695
+ var footerBottomBarSchema = z16.object({
2696
+ enabled: z16.boolean().optional(),
2697
+ fullBleed: z16.boolean().optional(),
3290
2698
  background: headerBackgroundSchema.optional(),
3291
- textColor: z19.string().nullable().optional(),
3292
- textAlign: z19.enum(["left", "center", "right"]).optional(),
2699
+ textColor: z16.string().nullable().optional(),
2700
+ textAlign: z16.enum(["left", "center", "right"]).optional(),
3293
2701
  paddingY: footerSpacing.optional(),
3294
2702
  paddingX: footerSpacing.optional(),
3295
- borderTop: z19.object({
3296
- colorToken: z19.string().nullable().optional(),
3297
- width: z19.enum(["none", "thin", "medium", "thick"]).optional()
2703
+ borderTop: z16.object({
2704
+ colorToken: z16.string().nullable().optional(),
2705
+ width: z16.enum(["none", "thin", "medium", "thick"]).optional()
3298
2706
  }).optional()
3299
2707
  });
3300
- var footerNavLayoutSchema = z19.object({
2708
+ var footerNavLayoutSchema = z16.object({
3301
2709
  layout: footerNavLayoutMode.optional(),
3302
2710
  align: footerNavLayoutAlign.optional(),
3303
2711
  gapX: footerSpacing.optional(),
3304
2712
  gapY: footerSpacing.optional(),
3305
- columns: z19.number().int().min(1).max(6).optional()
2713
+ columns: z16.number().int().min(1).max(6).optional()
3306
2714
  });
3307
- var footerLogoSchema = z19.object({
3308
- showLogo: z19.boolean().default(true),
3309
- showLogoText: z19.boolean().optional(),
2715
+ var footerLogoSchema = z16.object({
2716
+ showLogo: z16.boolean().default(true),
2717
+ showLogoText: z16.boolean().optional(),
3310
2718
  placement: footerLogoPlacement.optional(),
3311
2719
  size: footerLogoSize.optional(),
3312
2720
  maxHeight: footerLogoMaxHeight.optional(),
3313
- align: z19.enum(["start", "center", "end"]).optional()
2721
+ align: z16.enum(["start", "center", "end"]).optional()
3314
2722
  });
3315
- var footerSchema = z19.object({
2723
+ var footerSchema = z16.object({
3316
2724
  /**
3317
2725
  * SDK-only footer rendering mode.
3318
2726
  *
@@ -3321,11 +2729,11 @@ var footerSchema = z19.object({
3321
2729
  mode: footerMode.optional(),
3322
2730
  variant: footerVariant,
3323
2731
  maxWidth: footerMaxWidth,
3324
- showLogoText: z19.boolean().optional(),
2732
+ showLogoText: z16.boolean().optional(),
3325
2733
  background: headerBackgroundSchema.default({ type: "color", color: "surface" }),
3326
2734
  // Footer nav styling (independent from header)
3327
2735
  navStyle: headerNavStyle.default("minimal"),
3328
- navColor: z19.string().nullable().optional(),
2736
+ navColor: z16.string().nullable().optional(),
3329
2737
  navWeight: navFontWeight.default("medium"),
3330
2738
  // Full nav link customization (overrides navStyle if set)
3331
2739
  navLinkStyle: navLinkStyleSchema.optional(),
@@ -3336,15 +2744,15 @@ var footerSchema = z19.object({
3336
2744
  logo: footerLogoSchema.optional(),
3337
2745
  bottomBar: footerBottomBarSchema.optional()
3338
2746
  });
3339
- var containerPaddingPresetSchema = z19.enum(["tight", "compact", "default", "relaxed"]);
3340
- var layoutSchema = z19.object({
3341
- containerPadding: z19.object({
2747
+ var containerPaddingPresetSchema = z16.enum(["tight", "compact", "default", "relaxed"]);
2748
+ var layoutSchema = z16.object({
2749
+ containerPadding: z16.object({
3342
2750
  mobile: containerPaddingPresetSchema.optional(),
3343
2751
  tablet: containerPaddingPresetSchema.optional(),
3344
2752
  desktop: containerPaddingPresetSchema.optional()
3345
2753
  }).optional()
3346
2754
  }).optional();
3347
- var heroTypographySizeSchema = z19.enum([
2755
+ var heroTypographySizeSchema = z16.enum([
3348
2756
  "sm",
3349
2757
  "base",
3350
2758
  "lg",
@@ -3355,14 +2763,14 @@ var heroTypographySizeSchema = z19.enum([
3355
2763
  "5xl",
3356
2764
  "6xl"
3357
2765
  ]);
3358
- var heroTypographyLineHeightSchema = z19.enum(["tight", "snug", "normal", "relaxed"]);
3359
- var heroResponsiveTypographySchema = z19.object({
2766
+ var heroTypographyLineHeightSchema = z16.enum(["tight", "snug", "normal", "relaxed"]);
2767
+ var heroResponsiveTypographySchema = z16.object({
3360
2768
  headlineSize: heroTypographySizeSchema.optional(),
3361
2769
  headlineLineHeight: heroTypographyLineHeightSchema.optional(),
3362
2770
  subheadlineSize: heroTypographySizeSchema.optional(),
3363
2771
  subheadlineLineHeight: heroTypographyLineHeightSchema.optional()
3364
2772
  });
3365
- var heroTypographySchema = z19.object({
2773
+ var heroTypographySchema = z16.object({
3366
2774
  headlineSize: heroTypographySizeSchema.optional(),
3367
2775
  headlineLineHeight: heroTypographyLineHeightSchema.optional(),
3368
2776
  subheadlineSize: heroTypographySizeSchema.optional(),
@@ -3371,24 +2779,24 @@ var heroTypographySchema = z19.object({
3371
2779
  microHeadlineLineHeight: heroTypographyLineHeightSchema.optional(),
3372
2780
  microSubheadlineSize: heroTypographySizeSchema.optional(),
3373
2781
  microSubheadlineLineHeight: heroTypographyLineHeightSchema.optional(),
3374
- responsive: z19.object({
2782
+ responsive: z16.object({
3375
2783
  tablet: heroResponsiveTypographySchema.optional(),
3376
2784
  mobile: heroResponsiveTypographySchema.optional()
3377
2785
  }).optional()
3378
2786
  });
3379
- var heroSchema = z19.object({
2787
+ var heroSchema = z16.object({
3380
2788
  typography: heroTypographySchema.optional()
3381
2789
  }).optional();
3382
- var gradientsSchema = z19.object({
3383
- button: z19.string().min(1).nullable().optional(),
3384
- hero: z19.string().min(1).nullable().optional(),
3385
- background: z19.string().min(1).nullable().optional()
3386
- });
3387
- var themeSchema = z19.object({
3388
- name: z19.string().min(1).max(30),
3389
- description: z19.string().min(1).max(400),
3390
- rationale: z19.string().min(1).max(400),
3391
- siteStyleId: z19.string().min(1).transform((value) => asSiteStyleId(value)).optional(),
2790
+ var gradientsSchema = z16.object({
2791
+ button: z16.string().min(1).nullable().optional(),
2792
+ hero: z16.string().min(1).nullable().optional(),
2793
+ background: z16.string().min(1).nullable().optional()
2794
+ });
2795
+ var themeSchema = z16.object({
2796
+ name: z16.string().min(1).max(30),
2797
+ description: z16.string().min(1).max(400),
2798
+ rationale: z16.string().min(1).max(400),
2799
+ siteStyleId: z16.string().min(1).transform((value) => asSiteStyleId(value)).optional(),
3392
2800
  axes: axesSchema,
3393
2801
  palette: paletteSchema,
3394
2802
  typography: typographySchema,
@@ -3415,16 +2823,16 @@ var themeSchema = z19.object({
3415
2823
  // Block-specific customization (Tier 3)
3416
2824
  // blockCustomVars: Per-block CSS variable overrides as bare values
3417
2825
  // Example: { "event-registration": { "--step-color": "#6d28d9" } }
3418
- blockCustomVars: z19.record(
3419
- z19.string(),
2826
+ blockCustomVars: z16.record(
2827
+ z16.string(),
3420
2828
  // block kind (matches data-block attribute)
3421
- z19.record(z19.string(), z19.string())
2829
+ z16.record(z16.string(), z16.string())
3422
2830
  // { '--var-name': 'value' }
3423
2831
  ).optional(),
3424
2832
  // Structured block-kind theme overrides (v1: typography prose-link style only)
3425
2833
  // Keyed by block kind (usually data-block value like "hero"; "block.hero" also accepted)
3426
- blockOverrides: z19.record(
3427
- z19.string(),
2834
+ blockOverrides: z16.record(
2835
+ z16.string(),
3428
2836
  blockThemeOverrideSchema
3429
2837
  ).optional(),
3430
2838
  // Structured custom CSS rules
@@ -3460,371 +2868,1021 @@ var themeSchema = z19.object({
3460
2868
  * }
3461
2869
  * ```
3462
2870
  */
3463
- styleGroups: z19.record(z19.string(), z19.array(z19.string())).optional()
2871
+ styleGroups: z16.record(z16.string(), z16.array(z16.string())).optional()
2872
+ });
2873
+ var themesTurnSchema = z16.object({
2874
+ message: z16.string().min(1),
2875
+ themes: z16.array(themeSchema).length(3)
2876
+ });
2877
+
2878
+ // ../theme-core/src/palette/variants/types.ts
2879
+ function asPaletteVariantId(value) {
2880
+ if (value.length === 0) {
2881
+ throw new Error("PaletteVariantId must be a non-empty string");
2882
+ }
2883
+ return value;
2884
+ }
2885
+ var paletteVariantIdSchema = z17.string().min(1).transform((value) => asPaletteVariantId(value));
2886
+ var PALETTE_TOKEN_NAMES = [
2887
+ "primary",
2888
+ "primaryForeground",
2889
+ "secondary",
2890
+ "accent",
2891
+ "success",
2892
+ "warning",
2893
+ "destructive",
2894
+ "background",
2895
+ "surface",
2896
+ "surfaceAlt",
2897
+ "muted",
2898
+ "text",
2899
+ "border"
2900
+ ];
2901
+ var paletteTokenNameSchema = z17.enum(PALETTE_TOKEN_NAMES);
2902
+ var HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
2903
+ var hexColorSchema = z17.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
2904
+ var variantPaletteColorSchema = paletteColorSchema.extend({
2905
+ name: paletteTokenNameSchema
2906
+ });
2907
+ var paletteVariantSchema = z17.object({
2908
+ id: paletteVariantIdSchema,
2909
+ name: z17.string().min(1),
2910
+ description: z17.string().min(1),
2911
+ tags: styleTagsSchema,
2912
+ mode: z17.enum(["light", "dark"]),
2913
+ colors: z17.array(variantPaletteColorSchema).min(1)
2914
+ });
2915
+ function definePaletteVariant(input) {
2916
+ return {
2917
+ id: asPaletteVariantId(input.id),
2918
+ name: input.name,
2919
+ description: input.description,
2920
+ tags: input.tags,
2921
+ mode: input.mode,
2922
+ colors: input.colors
2923
+ };
2924
+ }
2925
+ var paletteOverridesSchema = z17.object({
2926
+ primary: hexColorSchema.optional(),
2927
+ primaryForeground: hexColorSchema.optional(),
2928
+ secondary: hexColorSchema.optional(),
2929
+ accent: hexColorSchema.optional(),
2930
+ success: hexColorSchema.optional(),
2931
+ warning: hexColorSchema.optional(),
2932
+ destructive: hexColorSchema.optional(),
2933
+ background: hexColorSchema.optional(),
2934
+ surface: hexColorSchema.optional(),
2935
+ surfaceAlt: hexColorSchema.optional(),
2936
+ muted: hexColorSchema.optional(),
2937
+ text: hexColorSchema.optional(),
2938
+ border: hexColorSchema.optional()
2939
+ }).strict().transform((value) => value);
2940
+
2941
+ // ../theme-core/src/palette/variants/brand-led.ts
2942
+ var brandLedCool = definePaletteVariant({
2943
+ id: "brand-led-cool",
2944
+ name: "Brand-led \u2014 Cool",
2945
+ description: "Confident blue primary with slate neutrals.",
2946
+ tags: { tone: "classic", energy: "calm", era: "modern" },
2947
+ mode: "light",
2948
+ colors: [
2949
+ { name: "primary", hex: "#2563eb" },
2950
+ { name: "secondary", hex: "#64748b" },
2951
+ { name: "accent", hex: "#0f766e" },
2952
+ { name: "success", hex: "#16a34a" },
2953
+ { name: "warning", hex: "#d97706" },
2954
+ { name: "destructive", hex: "#dc2626" },
2955
+ { name: "background", hex: "#ffffff" },
2956
+ { name: "surface", hex: "#ffffff" },
2957
+ { name: "surfaceAlt", hex: "#f8fafc" },
2958
+ { name: "muted", hex: "#f1f5f9" },
2959
+ { name: "text", hex: "#0f172a" },
2960
+ { name: "primaryForeground", hex: "#ffffff" },
2961
+ { name: "border", hex: "#cbd5e1" }
2962
+ ]
2963
+ });
2964
+ var brandLedWarm = definePaletteVariant({
2965
+ id: "brand-led-warm",
2966
+ name: "Brand-led \u2014 Warm",
2967
+ description: "Sunset orange primary with warm grey neutrals.",
2968
+ tags: { tone: "classic", energy: "vibrant", era: "modern" },
2969
+ mode: "light",
2970
+ colors: [
2971
+ { name: "primary", hex: "#ea580c" },
2972
+ { name: "secondary", hex: "#78716c" },
2973
+ { name: "accent", hex: "#a16207" },
2974
+ { name: "success", hex: "#16a34a" },
2975
+ { name: "warning", hex: "#d97706" },
2976
+ { name: "destructive", hex: "#b91c1c" },
2977
+ { name: "background", hex: "#fffaf3" },
2978
+ { name: "surface", hex: "#ffffff" },
2979
+ { name: "surfaceAlt", hex: "#fbeee0" },
2980
+ { name: "muted", hex: "#f4e2cd" },
2981
+ { name: "text", hex: "#1c1917" },
2982
+ { name: "primaryForeground", hex: "#fffaf3" },
2983
+ { name: "border", hex: "#d6c4ad" }
2984
+ ]
2985
+ });
2986
+ var brandLedJewel = definePaletteVariant({
2987
+ id: "brand-led-jewel",
2988
+ name: "Brand-led \u2014 Jewel",
2989
+ description: "Deep emerald primary with rich neutrals.",
2990
+ tags: { tone: "bold", energy: "vibrant", era: "modern" },
2991
+ mode: "light",
2992
+ colors: [
2993
+ { name: "primary", hex: "#047857" },
2994
+ { name: "secondary", hex: "#4b5563" },
2995
+ { name: "accent", hex: "#7c3aed" },
2996
+ { name: "success", hex: "#15803d" },
2997
+ { name: "warning", hex: "#b45309" },
2998
+ { name: "destructive", hex: "#b91c1c" },
2999
+ { name: "background", hex: "#ffffff" },
3000
+ { name: "surface", hex: "#ffffff" },
3001
+ { name: "surfaceAlt", hex: "#f5f5f4" },
3002
+ { name: "muted", hex: "#e7e5e4" },
3003
+ { name: "text", hex: "#0c0a09" },
3004
+ { name: "primaryForeground", hex: "#ffffff" },
3005
+ { name: "border", hex: "#a8a29e" }
3006
+ ]
3007
+ });
3008
+
3009
+ // ../theme-core/src/palette/variants/high-contrast.ts
3010
+ var highContrastInk = definePaletteVariant({
3011
+ id: "high-contrast-ink",
3012
+ name: "High Contrast \u2014 Ink",
3013
+ description: "Near-black primary with cool greys.",
3014
+ tags: { tone: "bold", energy: "calm", era: "editorial" },
3015
+ mode: "light",
3016
+ colors: [
3017
+ { name: "primary", hex: "#111827" },
3018
+ { name: "secondary", hex: "#374151" },
3019
+ { name: "accent", hex: "#1d4ed8" },
3020
+ { name: "success", hex: "#047857" },
3021
+ { name: "warning", hex: "#b45309" },
3022
+ { name: "destructive", hex: "#b91c1c" },
3023
+ { name: "background", hex: "#ffffff" },
3024
+ { name: "surface", hex: "#ffffff" },
3025
+ { name: "surfaceAlt", hex: "#f3f4f6" },
3026
+ { name: "muted", hex: "#e5e7eb" },
3027
+ { name: "text", hex: "#030712" },
3028
+ { name: "primaryForeground", hex: "#ffffff" },
3029
+ { name: "border", hex: "#6b7280" }
3030
+ ]
3031
+ });
3032
+ var highContrastCharcoal = definePaletteVariant({
3033
+ id: "high-contrast-charcoal",
3034
+ name: "High Contrast \u2014 Charcoal",
3035
+ description: "Warm charcoal primary on a soft cream ground.",
3036
+ tags: { tone: "minimal", energy: "calm", era: "editorial" },
3037
+ mode: "light",
3038
+ colors: [
3039
+ { name: "primary", hex: "#1f2937" },
3040
+ { name: "secondary", hex: "#52525b" },
3041
+ { name: "accent", hex: "#a16207" },
3042
+ { name: "success", hex: "#15803d" },
3043
+ { name: "warning", hex: "#b45309" },
3044
+ { name: "destructive", hex: "#991b1b" },
3045
+ { name: "background", hex: "#fafaf9" },
3046
+ { name: "surface", hex: "#ffffff" },
3047
+ { name: "surfaceAlt", hex: "#f5f5f4" },
3048
+ { name: "muted", hex: "#e7e5e4" },
3049
+ { name: "text", hex: "#0c0a09" },
3050
+ { name: "primaryForeground", hex: "#fafaf9" },
3051
+ { name: "border", hex: "#a8a29e" }
3052
+ ]
3053
+ });
3054
+ var highContrastMonochrome = definePaletteVariant({
3055
+ id: "high-contrast-monochrome",
3056
+ name: "High Contrast \u2014 Monochrome",
3057
+ description: "Pure black-on-white with a single saturated accent.",
3058
+ tags: { tone: "bold", energy: "vibrant", era: "editorial" },
3059
+ mode: "light",
3060
+ colors: [
3061
+ { name: "primary", hex: "#000000" },
3062
+ { name: "secondary", hex: "#404040" },
3063
+ { name: "accent", hex: "#dc2626" },
3064
+ { name: "success", hex: "#000000" },
3065
+ { name: "warning", hex: "#000000" },
3066
+ { name: "destructive", hex: "#dc2626" },
3067
+ { name: "background", hex: "#ffffff" },
3068
+ { name: "surface", hex: "#ffffff" },
3069
+ { name: "surfaceAlt", hex: "#f5f5f5" },
3070
+ { name: "muted", hex: "#e5e5e5" },
3071
+ { name: "text", hex: "#000000" },
3072
+ { name: "primaryForeground", hex: "#ffffff" },
3073
+ { name: "border", hex: "#525252" }
3074
+ ]
3075
+ });
3076
+
3077
+ // ../theme-core/src/palette/variants/soft-natural.ts
3078
+ var softNaturalSage = definePaletteVariant({
3079
+ id: "soft-natural-sage",
3080
+ name: "Soft Natural \u2014 Sage",
3081
+ description: "Olive sage primary on an off-white ground.",
3082
+ tags: { tone: "classic", energy: "calm", era: "organic" },
3083
+ mode: "light",
3084
+ colors: [
3085
+ { name: "primary", hex: "#3f6212" },
3086
+ { name: "secondary", hex: "#6b7280" },
3087
+ { name: "accent", hex: "#0f766e" },
3088
+ { name: "success", hex: "#15803d" },
3089
+ { name: "warning", hex: "#a16207" },
3090
+ { name: "destructive", hex: "#b91c1c" },
3091
+ { name: "background", hex: "#fbfdf7" },
3092
+ { name: "surface", hex: "#ffffff" },
3093
+ { name: "surfaceAlt", hex: "#eef5e8" },
3094
+ { name: "muted", hex: "#e7efdf" },
3095
+ { name: "text", hex: "#1f2a1d" },
3096
+ { name: "primaryForeground", hex: "#ffffff" },
3097
+ { name: "border", hex: "#cbd8c0" }
3098
+ ]
3099
+ });
3100
+ var softNaturalStone = definePaletteVariant({
3101
+ id: "soft-natural-stone",
3102
+ name: "Soft Natural \u2014 Stone",
3103
+ description: "River-stone grey-green primary with cool neutrals.",
3104
+ tags: { tone: "minimal", energy: "calm", era: "organic" },
3105
+ mode: "light",
3106
+ colors: [
3107
+ { name: "primary", hex: "#5a7a5d" },
3108
+ { name: "secondary", hex: "#8a9a8c" },
3109
+ { name: "accent", hex: "#c9b88f" },
3110
+ { name: "success", hex: "#5a7a5d" },
3111
+ { name: "warning", hex: "#a89466" },
3112
+ { name: "destructive", hex: "#a3503e" },
3113
+ { name: "background", hex: "#faf6ec" },
3114
+ { name: "surface", hex: "#ffffff" },
3115
+ { name: "surfaceAlt", hex: "#f0ecdf" },
3116
+ { name: "muted", hex: "#e6e1d0" },
3117
+ { name: "text", hex: "#2f3d31" },
3118
+ { name: "primaryForeground", hex: "#faf6ec" },
3119
+ { name: "border", hex: "#c9c1ad" }
3120
+ ]
3464
3121
  });
3465
- var themesTurnSchema = z19.object({
3466
- message: z19.string().min(1),
3467
- themes: z19.array(themeSchema).length(3)
3122
+ var softNaturalWatercolor = definePaletteVariant({
3123
+ id: "soft-natural-watercolor",
3124
+ name: "Soft Natural \u2014 Watercolor",
3125
+ description: "Soft sand primary with watercolour sage accents.",
3126
+ tags: { tone: "classic", energy: "vibrant", era: "organic" },
3127
+ mode: "light",
3128
+ colors: [
3129
+ { name: "primary", hex: "#a8825f" },
3130
+ { name: "secondary", hex: "#88a888" },
3131
+ { name: "accent", hex: "#c8a78e" },
3132
+ { name: "success", hex: "#7d8a5f" },
3133
+ { name: "warning", hex: "#c89a4d" },
3134
+ { name: "destructive", hex: "#a3503e" },
3135
+ { name: "background", hex: "#fefdfa" },
3136
+ { name: "surface", hex: "#ffffff" },
3137
+ { name: "surfaceAlt", hex: "#f6f1e6" },
3138
+ { name: "muted", hex: "#eee7d1" },
3139
+ { name: "text", hex: "#4a3d30" },
3140
+ { name: "primaryForeground", hex: "#fefdfa" },
3141
+ { name: "border", hex: "#d8c9a8" }
3142
+ ]
3468
3143
  });
3469
3144
 
3470
- // ../theme-core/src/palette/variants/types.ts
3471
- import { z as z20 } from "zod";
3472
- function asPaletteVariantId(value) {
3473
- if (value.length === 0) {
3474
- throw new Error("PaletteVariantId must be a non-empty string");
3475
- }
3476
- return value;
3477
- }
3478
- var paletteVariantIdSchema = z20.string().min(1).transform((value) => asPaletteVariantId(value));
3479
- var PALETTE_TOKEN_NAMES = [
3480
- "primary",
3481
- "primaryForeground",
3482
- "secondary",
3483
- "accent",
3484
- "success",
3485
- "warning",
3486
- "destructive",
3487
- "background",
3488
- "surface",
3489
- "surfaceAlt",
3490
- "muted",
3491
- "text",
3492
- "border"
3493
- ];
3494
- var paletteTokenNameSchema = z20.enum(PALETTE_TOKEN_NAMES);
3495
- var HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
3496
- var hexColorSchema = z20.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
3497
- var variantPaletteColorSchema = paletteColorSchema.extend({
3498
- name: paletteTokenNameSchema
3145
+ // ../theme-core/src/palette/variants/warm-neutral.ts
3146
+ var warmNeutralClay = definePaletteVariant({
3147
+ id: "warm-neutral-clay",
3148
+ name: "Warm Neutral \u2014 Clay",
3149
+ description: "Terracotta primary on a cream ground.",
3150
+ tags: { tone: "classic", energy: "calm", era: "organic" },
3151
+ mode: "light",
3152
+ colors: [
3153
+ { name: "primary", hex: "#8b5e34" },
3154
+ { name: "secondary", hex: "#7c6f64" },
3155
+ { name: "accent", hex: "#a15c38" },
3156
+ { name: "success", hex: "#527853" },
3157
+ { name: "warning", hex: "#b7791f" },
3158
+ { name: "destructive", hex: "#b91c1c" },
3159
+ { name: "background", hex: "#fffaf3" },
3160
+ { name: "surface", hex: "#ffffff" },
3161
+ { name: "surfaceAlt", hex: "#f5eadc" },
3162
+ { name: "muted", hex: "#efe2d0" },
3163
+ { name: "text", hex: "#2f241c" },
3164
+ { name: "primaryForeground", hex: "#fffaf3" },
3165
+ { name: "border", hex: "#d8c6b3" }
3166
+ ]
3499
3167
  });
3500
- var paletteVariantSchema = z20.object({
3501
- id: paletteVariantIdSchema,
3502
- name: z20.string().min(1),
3503
- description: z20.string().min(1),
3504
- tags: styleTagsSchema,
3505
- mode: z20.enum(["light", "dark"]),
3506
- colors: z20.array(variantPaletteColorSchema).min(1)
3168
+ var warmNeutralCream = definePaletteVariant({
3169
+ id: "warm-neutral-cream",
3170
+ name: "Warm Neutral \u2014 Cream",
3171
+ description: "Soft sand primary with pale cream surfaces.",
3172
+ tags: { tone: "minimal", energy: "calm", era: "organic" },
3173
+ mode: "light",
3174
+ colors: [
3175
+ { name: "primary", hex: "#b08864" },
3176
+ { name: "secondary", hex: "#9a8c7e" },
3177
+ { name: "accent", hex: "#c2956a" },
3178
+ { name: "success", hex: "#7d8a5f" },
3179
+ { name: "warning", hex: "#c89a4d" },
3180
+ { name: "destructive", hex: "#a3503e" },
3181
+ { name: "background", hex: "#fdf8ee" },
3182
+ { name: "surface", hex: "#ffffff" },
3183
+ { name: "surfaceAlt", hex: "#f4ebd9" },
3184
+ { name: "muted", hex: "#ede3cf" },
3185
+ { name: "text", hex: "#3b2f24" },
3186
+ { name: "primaryForeground", hex: "#fdf8ee" },
3187
+ { name: "border", hex: "#e0d2b8" }
3188
+ ]
3507
3189
  });
3508
- function definePaletteVariant(input) {
3190
+ var warmNeutralForest = definePaletteVariant({
3191
+ id: "warm-neutral-forest",
3192
+ name: "Warm Neutral \u2014 Forest",
3193
+ description: "Deep forest green primary with earthy neutrals.",
3194
+ tags: { tone: "classic", energy: "calm", era: "organic" },
3195
+ mode: "light",
3196
+ colors: [
3197
+ { name: "primary", hex: "#3d5840" },
3198
+ { name: "secondary", hex: "#7a6f5d" },
3199
+ { name: "accent", hex: "#b06b50" },
3200
+ { name: "success", hex: "#5a7a5d" },
3201
+ { name: "warning", hex: "#b7791f" },
3202
+ { name: "destructive", hex: "#b91c1c" },
3203
+ { name: "background", hex: "#fbf8f0" },
3204
+ { name: "surface", hex: "#ffffff" },
3205
+ { name: "surfaceAlt", hex: "#f2ecdb" },
3206
+ { name: "muted", hex: "#ebe3cc" },
3207
+ { name: "text", hex: "#2a2a2a" },
3208
+ { name: "primaryForeground", hex: "#fbf8f0" },
3209
+ { name: "border", hex: "#cdc1a4" }
3210
+ ]
3211
+ });
3212
+
3213
+ // ../theme-core/src/palette/variants/index.ts
3214
+ var paletteVariants = [
3215
+ // Brand-led family
3216
+ brandLedCool,
3217
+ brandLedWarm,
3218
+ brandLedJewel,
3219
+ // Warm-neutral family
3220
+ warmNeutralClay,
3221
+ warmNeutralCream,
3222
+ warmNeutralForest,
3223
+ // High-contrast family
3224
+ highContrastInk,
3225
+ highContrastCharcoal,
3226
+ highContrastMonochrome,
3227
+ // Soft-natural family
3228
+ softNaturalSage,
3229
+ softNaturalStone,
3230
+ softNaturalWatercolor
3231
+ ];
3232
+ var paletteVariantsById = new Map(
3233
+ paletteVariants.map((v) => [v.id, v])
3234
+ );
3235
+
3236
+ // ../theme-core/src/site-styles/sourceCatalogs.ts
3237
+ var generatedContentFrames = [
3238
+ plainFrame,
3239
+ panelFrame("inset"),
3240
+ panelFrame("raised"),
3241
+ flushPanelFrame({ bleed: "start" })
3242
+ ];
3243
+ var userContentFrames = [
3244
+ ...generatedContentFrames,
3245
+ panelFrame("editorial"),
3246
+ flushPanelFrame({ bleed: "end" }),
3247
+ flushPanelFrame({ bleed: "both" })
3248
+ ];
3249
+ var generatedDesignOptionCatalog = {
3250
+ source: "generated",
3251
+ sectionSurfaces: ["base", "muted-band", "accent-band", "hero-image"],
3252
+ contentFrames: generatedContentFrames,
3253
+ itemSurfaces: ["none", "default", "flat", "outlined", "raised"],
3254
+ transitions: ["none", "soft-fade-short", "soft-fade-long"],
3255
+ emphases: ["low", "medium", "high"],
3256
+ detachedCustom: false
3257
+ };
3258
+ var userDesignOptionCatalog = {
3259
+ source: "user",
3260
+ sectionSurfaces: generatedDesignOptionCatalog.sectionSurfaces,
3261
+ contentFrames: userContentFrames,
3262
+ itemSurfaces: [
3263
+ ...generatedDesignOptionCatalog.itemSurfaces,
3264
+ "inset",
3265
+ "editorial"
3266
+ ],
3267
+ transitions: [
3268
+ ...generatedDesignOptionCatalog.transitions,
3269
+ "wave-edge",
3270
+ "angle-edge"
3271
+ ],
3272
+ emphases: generatedDesignOptionCatalog.emphases,
3273
+ detachedCustom: false
3274
+ };
3275
+ var advancedDesignOptionCatalog = {
3276
+ source: "advanced",
3277
+ sectionSurfaces: userDesignOptionCatalog.sectionSurfaces,
3278
+ contentFrames: userDesignOptionCatalog.contentFrames,
3279
+ itemSurfaces: userDesignOptionCatalog.itemSurfaces,
3280
+ transitions: userDesignOptionCatalog.transitions,
3281
+ emphases: userDesignOptionCatalog.emphases,
3282
+ detachedCustom: true
3283
+ };
3284
+
3285
+ // ../theme-core/src/site-styles/curatedSiteStyles.ts
3286
+ var curatedSiteStyleIdValues = [
3287
+ "site-style:calm-studio",
3288
+ "site-style:clear-professional",
3289
+ "site-style:warm-editorial",
3290
+ "site-style:bright-community",
3291
+ "site-style:quiet-luxury",
3292
+ "site-style:practical-services",
3293
+ "site-style:modern-wellness",
3294
+ "site-style:bold-launch"
3295
+ ];
3296
+ var quietBudget = {
3297
+ accentDensity: "low",
3298
+ panelDensity: "medium",
3299
+ transitionMix: "quiet",
3300
+ primaryCtaLimit: 2,
3301
+ mediaDensity: "medium",
3302
+ decorativeRepetition: "low"
3303
+ };
3304
+ var balancedBudget = {
3305
+ accentDensity: "medium",
3306
+ panelDensity: "medium",
3307
+ transitionMix: "balanced",
3308
+ primaryCtaLimit: 3,
3309
+ mediaDensity: "medium",
3310
+ decorativeRepetition: "medium"
3311
+ };
3312
+ var expressiveBudget = {
3313
+ accentDensity: "high",
3314
+ panelDensity: "high",
3315
+ transitionMix: "expressive",
3316
+ primaryCtaLimit: 3,
3317
+ mediaDensity: "high",
3318
+ decorativeRepetition: "medium"
3319
+ };
3320
+ function uniqueContentFrameKinds() {
3321
+ const kinds = [...new Set(
3322
+ generatedDesignOptionCatalog.contentFrames.map((frame) => frame.kind)
3323
+ )];
3324
+ const firstKind = kinds[0];
3325
+ if (!firstKind) {
3326
+ throw new Error("Expected generated design option catalog to expose at least one content frame kind.");
3327
+ }
3328
+ return [firstKind, ...kinds.slice(1)];
3329
+ }
3330
+ var generatedContentFrameKinds = uniqueContentFrameKinds();
3331
+ function defineCuratedSiteStyle(input) {
3509
3332
  return {
3510
- id: asPaletteVariantId(input.id),
3333
+ id: asSiteStyleId(input.id),
3511
3334
  name: input.name,
3512
3335
  description: input.description,
3513
- tags: input.tags,
3514
- mode: input.mode,
3515
- colors: input.colors
3336
+ generationBrief: input.generationBrief,
3337
+ selectionKeywords: input.selectionKeywords ?? [],
3338
+ template: {
3339
+ id: asDesignSystemTemplateId(`template:${input.id.replace("site-style:", "")}`),
3340
+ name: input.name,
3341
+ version: 1,
3342
+ tokenRecipes: input.tokenRecipes,
3343
+ compositionBudget: input.compositionBudget,
3344
+ supportedSectionSurfaces: generatedDesignOptionCatalog.sectionSurfaces,
3345
+ supportedContentFrames: generatedContentFrameKinds,
3346
+ supportedItemSurfaces: generatedDesignOptionCatalog.itemSurfaces,
3347
+ supportedTransitions: generatedDesignOptionCatalog.transitions
3348
+ },
3349
+ buttonPersonalityChoices: input.buttonPersonalityChoices,
3350
+ paletteVariantChoices: input.paletteVariantChoices
3516
3351
  };
3517
3352
  }
3518
- var paletteOverridesSchema = z20.object({
3519
- primary: hexColorSchema.optional(),
3520
- primaryForeground: hexColorSchema.optional(),
3521
- secondary: hexColorSchema.optional(),
3522
- accent: hexColorSchema.optional(),
3523
- success: hexColorSchema.optional(),
3524
- warning: hexColorSchema.optional(),
3525
- destructive: hexColorSchema.optional(),
3526
- background: hexColorSchema.optional(),
3527
- surface: hexColorSchema.optional(),
3528
- surfaceAlt: hexColorSchema.optional(),
3529
- muted: hexColorSchema.optional(),
3530
- text: hexColorSchema.optional(),
3531
- border: hexColorSchema.optional()
3532
- }).strict().transform((value) => value);
3533
-
3534
- // ../theme-core/src/palette/variants/brand-led.ts
3535
- var brandLedCool = definePaletteVariant({
3536
- id: "brand-led-cool",
3537
- name: "Brand-led \u2014 Cool",
3538
- description: "Confident blue primary with slate neutrals.",
3539
- tags: { tone: "classic", energy: "calm", era: "modern" },
3540
- mode: "light",
3541
- colors: [
3542
- { name: "primary", hex: "#2563eb" },
3543
- { name: "secondary", hex: "#64748b" },
3544
- { name: "accent", hex: "#0f766e" },
3545
- { name: "success", hex: "#16a34a" },
3546
- { name: "warning", hex: "#d97706" },
3547
- { name: "destructive", hex: "#dc2626" },
3548
- { name: "background", hex: "#ffffff" },
3549
- { name: "surface", hex: "#ffffff" },
3550
- { name: "surfaceAlt", hex: "#f8fafc" },
3551
- { name: "muted", hex: "#f1f5f9" },
3552
- { name: "text", hex: "#0f172a" },
3553
- { name: "primaryForeground", hex: "#ffffff" },
3554
- { name: "border", hex: "#cbd5e1" }
3555
- ]
3556
- });
3557
- var brandLedWarm = definePaletteVariant({
3558
- id: "brand-led-warm",
3559
- name: "Brand-led \u2014 Warm",
3560
- description: "Sunset orange primary with warm grey neutrals.",
3561
- tags: { tone: "classic", energy: "vibrant", era: "modern" },
3562
- mode: "light",
3563
- colors: [
3564
- { name: "primary", hex: "#ea580c" },
3565
- { name: "secondary", hex: "#78716c" },
3566
- { name: "accent", hex: "#a16207" },
3567
- { name: "success", hex: "#16a34a" },
3568
- { name: "warning", hex: "#d97706" },
3569
- { name: "destructive", hex: "#b91c1c" },
3570
- { name: "background", hex: "#fffaf3" },
3571
- { name: "surface", hex: "#ffffff" },
3572
- { name: "surfaceAlt", hex: "#fbeee0" },
3573
- { name: "muted", hex: "#f4e2cd" },
3574
- { name: "text", hex: "#1c1917" },
3575
- { name: "primaryForeground", hex: "#fffaf3" },
3576
- { name: "border", hex: "#d6c4ad" }
3577
- ]
3578
- });
3579
- var brandLedJewel = definePaletteVariant({
3580
- id: "brand-led-jewel",
3581
- name: "Brand-led \u2014 Jewel",
3582
- description: "Deep emerald primary with rich neutrals.",
3583
- tags: { tone: "bold", energy: "vibrant", era: "modern" },
3584
- mode: "light",
3585
- colors: [
3586
- { name: "primary", hex: "#047857" },
3587
- { name: "secondary", hex: "#4b5563" },
3588
- { name: "accent", hex: "#7c3aed" },
3589
- { name: "success", hex: "#15803d" },
3590
- { name: "warning", hex: "#b45309" },
3591
- { name: "destructive", hex: "#b91c1c" },
3592
- { name: "background", hex: "#ffffff" },
3593
- { name: "surface", hex: "#ffffff" },
3594
- { name: "surfaceAlt", hex: "#f5f5f4" },
3595
- { name: "muted", hex: "#e7e5e4" },
3596
- { name: "text", hex: "#0c0a09" },
3597
- { name: "primaryForeground", hex: "#ffffff" },
3598
- { name: "border", hex: "#a8a29e" }
3599
- ]
3600
- });
3353
+ function buttonChoice(id, note) {
3354
+ return note ? { id: asButtonPersonalityId(id), note } : { id: asButtonPersonalityId(id) };
3355
+ }
3356
+ function paletteChoice(id, note) {
3357
+ return note ? { id: asPaletteVariantId(id), note } : { id: asPaletteVariantId(id) };
3358
+ }
3359
+ var curatedSiteStyles = [
3360
+ defineCuratedSiteStyle({
3361
+ id: "site-style:calm-studio",
3362
+ name: "Calm Studio",
3363
+ description: "Soft, measured, and spacious for intimate appointment or class businesses.",
3364
+ generationBrief: "Use calm pacing, concise copy, generous breathing room, and natural imagery. Keep calls to action steady rather than urgent.",
3365
+ tokenRecipes: {
3366
+ palette: "soft-natural",
3367
+ contrast: "standard",
3368
+ radius: "soft",
3369
+ shadow: "subtle",
3370
+ typography: "friendly-sans",
3371
+ spacing: "airy",
3372
+ motion: "subtle"
3373
+ },
3374
+ compositionBudget: quietBudget,
3375
+ buttonPersonalityChoices: [
3376
+ buttonChoice("soft-pill"),
3377
+ buttonChoice("pebble"),
3378
+ buttonChoice("editorial-link"),
3379
+ buttonChoice("brushed-wash")
3380
+ ],
3381
+ paletteVariantChoices: [
3382
+ paletteChoice("soft-natural-sage"),
3383
+ paletteChoice("soft-natural-stone"),
3384
+ paletteChoice("warm-neutral-clay"),
3385
+ paletteChoice("soft-natural-watercolor")
3386
+ ]
3387
+ }),
3388
+ defineCuratedSiteStyle({
3389
+ id: "site-style:clear-professional",
3390
+ name: "Clear Professional",
3391
+ description: "Crisp, trustworthy, and direct for local services and consultancies.",
3392
+ generationBrief: "Prioritize clarity, proof, service detail, and easy next steps. Keep visuals polished and specific, with restrained decorative treatment.",
3393
+ tokenRecipes: {
3394
+ palette: "brand-led",
3395
+ contrast: "strong",
3396
+ radius: "soft",
3397
+ shadow: "subtle",
3398
+ typography: "clean-sans",
3399
+ spacing: "regular",
3400
+ motion: "subtle"
3401
+ },
3402
+ compositionBudget: balancedBudget,
3403
+ buttonPersonalityChoices: [
3404
+ buttonChoice("confident-chip"),
3405
+ buttonChoice("soft-pill"),
3406
+ buttonChoice("editorial-link")
3407
+ ],
3408
+ paletteVariantChoices: [
3409
+ paletteChoice("brand-led-cool"),
3410
+ paletteChoice("high-contrast-ink"),
3411
+ paletteChoice("brand-led-jewel")
3412
+ ]
3413
+ }),
3414
+ defineCuratedSiteStyle({
3415
+ id: "site-style:warm-editorial",
3416
+ name: "Warm Editorial",
3417
+ description: "Story-led and textured for educators, makers, venues, and retreats.",
3418
+ generationBrief: "Let the copy feel thoughtful and grounded. Favor narrative sections, supporting media, and a small number of editorial panels.",
3419
+ tokenRecipes: {
3420
+ palette: "warm-neutral",
3421
+ contrast: "standard",
3422
+ radius: "square",
3423
+ shadow: "none",
3424
+ typography: "serif-editorial",
3425
+ spacing: "airy",
3426
+ motion: "subtle"
3427
+ },
3428
+ compositionBudget: balancedBudget,
3429
+ buttonPersonalityChoices: [
3430
+ buttonChoice("editorial-link"),
3431
+ buttonChoice("soft-pill"),
3432
+ buttonChoice("brushed-wash")
3433
+ ],
3434
+ paletteVariantChoices: [
3435
+ paletteChoice("warm-neutral-cream"),
3436
+ paletteChoice("warm-neutral-clay"),
3437
+ paletteChoice("warm-neutral-forest"),
3438
+ paletteChoice("soft-natural-stone")
3439
+ ]
3440
+ }),
3441
+ defineCuratedSiteStyle({
3442
+ id: "site-style:bright-community",
3443
+ name: "Bright Community",
3444
+ description: "Friendly, welcoming, and active for groups, classes, and neighborhood offers.",
3445
+ generationBrief: "Use welcoming language, clear event or booking routes, and optimistic imagery. Let accents appear, but avoid noisy decoration.",
3446
+ tokenRecipes: {
3447
+ palette: "brand-led",
3448
+ contrast: "standard",
3449
+ radius: "rounded",
3450
+ shadow: "subtle",
3451
+ typography: "friendly-sans",
3452
+ spacing: "regular",
3453
+ motion: "expressive"
3454
+ },
3455
+ compositionBudget: balancedBudget,
3456
+ buttonPersonalityChoices: [
3457
+ buttonChoice("pebble"),
3458
+ buttonChoice("brushed-wash"),
3459
+ buttonChoice("confident-chip")
3460
+ ],
3461
+ paletteVariantChoices: [
3462
+ paletteChoice("brand-led-warm"),
3463
+ paletteChoice("brand-led-jewel"),
3464
+ paletteChoice("soft-natural-watercolor")
3465
+ ]
3466
+ }),
3467
+ defineCuratedSiteStyle({
3468
+ id: "site-style:quiet-luxury",
3469
+ name: "Quiet Luxury",
3470
+ description: "Minimal, confident, and refined for premium experiences and private services.",
3471
+ generationBrief: "Use fewer claims, more specificity, and restrained sensory detail. Favor elegant media and low repetition over dense panels.",
3472
+ selectionKeywords: [
3473
+ "luxury",
3474
+ "premium",
3475
+ "boutique",
3476
+ "bespoke",
3477
+ "exclusive"
3478
+ ],
3479
+ tokenRecipes: {
3480
+ palette: "high-contrast",
3481
+ contrast: "strong",
3482
+ radius: "square",
3483
+ shadow: "none",
3484
+ typography: "classic-serif",
3485
+ spacing: "airy",
3486
+ motion: "none"
3487
+ },
3488
+ compositionBudget: quietBudget,
3489
+ buttonPersonalityChoices: [
3490
+ buttonChoice("editorial-link"),
3491
+ buttonChoice("confident-chip"),
3492
+ buttonChoice("soft-pill")
3493
+ ],
3494
+ paletteVariantChoices: [
3495
+ paletteChoice("high-contrast-charcoal"),
3496
+ paletteChoice("high-contrast-ink"),
3497
+ paletteChoice("warm-neutral-cream")
3498
+ ]
3499
+ }),
3500
+ defineCuratedSiteStyle({
3501
+ id: "site-style:practical-services",
3502
+ name: "Practical Services",
3503
+ description: "Efficient, plainspoken, and conversion-focused for trades and everyday services.",
3504
+ generationBrief: "Make services, location, trust signals, and contact paths obvious. Keep copy brief and avoid ornate visual treatments.",
3505
+ selectionKeywords: [
3506
+ "repair",
3507
+ "plumb",
3508
+ "electric",
3509
+ "cleaning",
3510
+ "landscap",
3511
+ "contractor"
3512
+ ],
3513
+ tokenRecipes: {
3514
+ palette: "brand-led",
3515
+ contrast: "maximum",
3516
+ radius: "soft",
3517
+ shadow: "subtle",
3518
+ typography: "clean-sans",
3519
+ spacing: "compact",
3520
+ motion: "none"
3521
+ },
3522
+ compositionBudget: quietBudget,
3523
+ buttonPersonalityChoices: [
3524
+ buttonChoice("confident-chip"),
3525
+ buttonChoice("pebble"),
3526
+ buttonChoice("ink-stamp")
3527
+ ],
3528
+ paletteVariantChoices: [
3529
+ paletteChoice("brand-led-cool"),
3530
+ paletteChoice("high-contrast-ink"),
3531
+ paletteChoice("brand-led-warm")
3532
+ ]
3533
+ }),
3534
+ defineCuratedSiteStyle({
3535
+ id: "site-style:modern-wellness",
3536
+ name: "Modern Wellness",
3537
+ description: "Natural, current, and reassuring for practitioners, studios, and wellbeing offers.",
3538
+ generationBrief: "Keep the tone warm and practical. Use gentle section variation, natural materials, and inclusive copy without making medical claims.",
3539
+ tokenRecipes: {
3540
+ palette: "soft-natural",
3541
+ contrast: "standard",
3542
+ radius: "rounded",
3543
+ shadow: "subtle",
3544
+ typography: "clean-sans",
3545
+ spacing: "airy",
3546
+ motion: "subtle"
3547
+ },
3548
+ compositionBudget: balancedBudget,
3549
+ buttonPersonalityChoices: [
3550
+ buttonChoice("soft-pill"),
3551
+ buttonChoice("pebble"),
3552
+ buttonChoice("confident-chip")
3553
+ ],
3554
+ paletteVariantChoices: [
3555
+ paletteChoice("soft-natural-sage"),
3556
+ paletteChoice("soft-natural-stone"),
3557
+ paletteChoice("warm-neutral-forest")
3558
+ ]
3559
+ }),
3560
+ defineCuratedSiteStyle({
3561
+ id: "site-style:bold-launch",
3562
+ name: "Bold Launch",
3563
+ description: "High-energy and punchy for launches, campaigns, and creative offers.",
3564
+ generationBrief: "Use crisp positioning, bold hero structure, strong calls to action, and confident visual rhythm. Keep it precise, not shouty.",
3565
+ selectionKeywords: [
3566
+ "launch",
3567
+ "campaign",
3568
+ "preorder",
3569
+ "pre-order",
3570
+ "waitlist",
3571
+ "drop"
3572
+ ],
3573
+ tokenRecipes: {
3574
+ palette: "high-contrast",
3575
+ contrast: "maximum",
3576
+ radius: "pill",
3577
+ shadow: "layered",
3578
+ typography: "clean-sans",
3579
+ spacing: "regular",
3580
+ motion: "expressive"
3581
+ },
3582
+ compositionBudget: expressiveBudget,
3583
+ buttonPersonalityChoices: [
3584
+ buttonChoice("ink-stamp"),
3585
+ buttonChoice("confident-chip"),
3586
+ buttonChoice("brushed-wash"),
3587
+ buttonChoice("pebble")
3588
+ ],
3589
+ paletteVariantChoices: [
3590
+ paletteChoice("high-contrast-monochrome"),
3591
+ paletteChoice("high-contrast-ink"),
3592
+ paletteChoice("brand-led-jewel"),
3593
+ paletteChoice("brand-led-warm")
3594
+ ]
3595
+ })
3596
+ ];
3597
+ var curatedSiteStylesById = new Map(
3598
+ curatedSiteStyles.map((style) => [style.id, style])
3599
+ );
3601
3600
 
3602
- // ../theme-core/src/palette/variants/high-contrast.ts
3603
- var highContrastInk = definePaletteVariant({
3604
- id: "high-contrast-ink",
3605
- name: "High Contrast \u2014 Ink",
3606
- description: "Near-black primary with cool greys.",
3607
- tags: { tone: "bold", energy: "calm", era: "editorial" },
3608
- mode: "light",
3609
- colors: [
3610
- { name: "primary", hex: "#111827" },
3611
- { name: "secondary", hex: "#374151" },
3612
- { name: "accent", hex: "#1d4ed8" },
3613
- { name: "success", hex: "#047857" },
3614
- { name: "warning", hex: "#b45309" },
3615
- { name: "destructive", hex: "#b91c1c" },
3616
- { name: "background", hex: "#ffffff" },
3617
- { name: "surface", hex: "#ffffff" },
3618
- { name: "surfaceAlt", hex: "#f3f4f6" },
3619
- { name: "muted", hex: "#e5e7eb" },
3620
- { name: "text", hex: "#030712" },
3621
- { name: "primaryForeground", hex: "#ffffff" },
3622
- { name: "border", hex: "#6b7280" }
3623
- ]
3624
- });
3625
- var highContrastCharcoal = definePaletteVariant({
3626
- id: "high-contrast-charcoal",
3627
- name: "High Contrast \u2014 Charcoal",
3628
- description: "Warm charcoal primary on a soft cream ground.",
3629
- tags: { tone: "minimal", energy: "calm", era: "editorial" },
3630
- mode: "light",
3631
- colors: [
3632
- { name: "primary", hex: "#1f2937" },
3633
- { name: "secondary", hex: "#52525b" },
3634
- { name: "accent", hex: "#a16207" },
3635
- { name: "success", hex: "#15803d" },
3636
- { name: "warning", hex: "#b45309" },
3637
- { name: "destructive", hex: "#991b1b" },
3638
- { name: "background", hex: "#fafaf9" },
3639
- { name: "surface", hex: "#ffffff" },
3640
- { name: "surfaceAlt", hex: "#f5f5f4" },
3641
- { name: "muted", hex: "#e7e5e4" },
3642
- { name: "text", hex: "#0c0a09" },
3643
- { name: "primaryForeground", hex: "#fafaf9" },
3644
- { name: "border", hex: "#a8a29e" }
3645
- ]
3646
- });
3647
- var highContrastMonochrome = definePaletteVariant({
3648
- id: "high-contrast-monochrome",
3649
- name: "High Contrast \u2014 Monochrome",
3650
- description: "Pure black-on-white with a single saturated accent.",
3651
- tags: { tone: "bold", energy: "vibrant", era: "editorial" },
3652
- mode: "light",
3653
- colors: [
3654
- { name: "primary", hex: "#000000" },
3655
- { name: "secondary", hex: "#404040" },
3656
- { name: "accent", hex: "#dc2626" },
3657
- { name: "success", hex: "#000000" },
3658
- { name: "warning", hex: "#000000" },
3659
- { name: "destructive", hex: "#dc2626" },
3660
- { name: "background", hex: "#ffffff" },
3661
- { name: "surface", hex: "#ffffff" },
3662
- { name: "surfaceAlt", hex: "#f5f5f5" },
3663
- { name: "muted", hex: "#e5e5e5" },
3664
- { name: "text", hex: "#000000" },
3665
- { name: "primaryForeground", hex: "#ffffff" },
3666
- { name: "border", hex: "#525252" }
3667
- ]
3668
- });
3601
+ // ../theme-core/src/site-styles/designState.ts
3602
+ import { z as z18 } from "zod";
3669
3603
 
3670
- // ../theme-core/src/palette/variants/soft-natural.ts
3671
- var softNaturalSage = definePaletteVariant({
3672
- id: "soft-natural-sage",
3673
- name: "Soft Natural \u2014 Sage",
3674
- description: "Olive sage primary on an off-white ground.",
3675
- tags: { tone: "classic", energy: "calm", era: "organic" },
3676
- mode: "light",
3677
- colors: [
3678
- { name: "primary", hex: "#3f6212" },
3679
- { name: "secondary", hex: "#6b7280" },
3680
- { name: "accent", hex: "#0f766e" },
3681
- { name: "success", hex: "#15803d" },
3682
- { name: "warning", hex: "#a16207" },
3683
- { name: "destructive", hex: "#b91c1c" },
3684
- { name: "background", hex: "#fbfdf7" },
3685
- { name: "surface", hex: "#ffffff" },
3686
- { name: "surfaceAlt", hex: "#eef5e8" },
3687
- { name: "muted", hex: "#e7efdf" },
3688
- { name: "text", hex: "#1f2a1d" },
3689
- { name: "primaryForeground", hex: "#ffffff" },
3690
- { name: "border", hex: "#cbd8c0" }
3691
- ]
3692
- });
3693
- var softNaturalStone = definePaletteVariant({
3694
- id: "soft-natural-stone",
3695
- name: "Soft Natural \u2014 Stone",
3696
- description: "River-stone grey-green primary with cool neutrals.",
3697
- tags: { tone: "minimal", energy: "calm", era: "organic" },
3698
- mode: "light",
3699
- colors: [
3700
- { name: "primary", hex: "#5a7a5d" },
3701
- { name: "secondary", hex: "#8a9a8c" },
3702
- { name: "accent", hex: "#c9b88f" },
3703
- { name: "success", hex: "#5a7a5d" },
3704
- { name: "warning", hex: "#a89466" },
3705
- { name: "destructive", hex: "#a3503e" },
3706
- { name: "background", hex: "#faf6ec" },
3707
- { name: "surface", hex: "#ffffff" },
3708
- { name: "surfaceAlt", hex: "#f0ecdf" },
3709
- { name: "muted", hex: "#e6e1d0" },
3710
- { name: "text", hex: "#2f3d31" },
3711
- { name: "primaryForeground", hex: "#faf6ec" },
3712
- { name: "border", hex: "#c9c1ad" }
3713
- ]
3714
- });
3715
- var softNaturalWatercolor = definePaletteVariant({
3716
- id: "soft-natural-watercolor",
3717
- name: "Soft Natural \u2014 Watercolor",
3718
- description: "Soft sand primary with watercolour sage accents.",
3719
- tags: { tone: "classic", energy: "vibrant", era: "organic" },
3720
- mode: "light",
3721
- colors: [
3722
- { name: "primary", hex: "#a8825f" },
3723
- { name: "secondary", hex: "#88a888" },
3724
- { name: "accent", hex: "#c8a78e" },
3725
- { name: "success", hex: "#7d8a5f" },
3726
- { name: "warning", hex: "#c89a4d" },
3727
- { name: "destructive", hex: "#a3503e" },
3728
- { name: "background", hex: "#fefdfa" },
3729
- { name: "surface", hex: "#ffffff" },
3730
- { name: "surfaceAlt", hex: "#f6f1e6" },
3731
- { name: "muted", hex: "#eee7d1" },
3732
- { name: "text", hex: "#4a3d30" },
3733
- { name: "primaryForeground", hex: "#fefdfa" },
3734
- { name: "border", hex: "#d8c9a8" }
3735
- ]
3736
- });
3604
+ // ../theme-core/src/site-styles/rawStyleFields.ts
3605
+ var themeV2RuntimeStyleFieldNames = [
3606
+ "_frameStyles",
3607
+ "_sectionStyles",
3608
+ "_containerStyles",
3609
+ "_cardStyles",
3610
+ // styleGroup is legacy runtime transition wiring rather than a nested
3611
+ // override object, but normal editors should still never see it directly.
3612
+ "styleGroup"
3613
+ ];
3614
+ var themeV2BlockSpecificRawStyleFieldNames = [
3615
+ "_contentCardStyles",
3616
+ "_textCardStyles"
3617
+ ];
3618
+ var themeV2NormalEditorRawStyleFieldNames = [
3619
+ ...themeV2RuntimeStyleFieldNames,
3620
+ ...themeV2BlockSpecificRawStyleFieldNames
3621
+ ];
3622
+ var themeV2NormalEditorRawStyleFieldNameSet = new Set(
3623
+ themeV2NormalEditorRawStyleFieldNames
3624
+ );
3625
+
3626
+ // ../theme-core/src/site-styles/designState.ts
3627
+ var themeV2DesignStateSchemaVersion = 1;
3628
+ var designResolutionPolicySchema = z18.enum(["generated", "user", "admin", "sdk"]);
3629
+ var runtimeStyleFieldNameSchema = z18.enum(themeV2RuntimeStyleFieldNames);
3630
+ var nonEmptyRuntimeStyleFieldNamesSchema = z18.array(runtimeStyleFieldNameSchema).min(1).transform((fields3) => [
3631
+ fields3[0],
3632
+ ...fields3.slice(1)
3633
+ ]);
3634
+ var heroLegibilityStrategySchema = z18.enum([
3635
+ "none",
3636
+ "scrim-gradient",
3637
+ "solid-panel"
3638
+ ]);
3639
+ function uniqueNonEmpty(values) {
3640
+ const uniqueValues = [...new Set(values)];
3641
+ const firstValue = uniqueValues[0];
3642
+ if (!firstValue) {
3643
+ throw new Error("Expected at least one Theme V2 design state option.");
3644
+ }
3645
+ return [firstValue, ...uniqueValues.slice(1)];
3646
+ }
3647
+ var userPanelTreatments = uniqueNonEmpty(
3648
+ userDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "panel").map((frame) => frame.treatment)
3649
+ );
3650
+ var userFlushTreatments = uniqueNonEmpty(
3651
+ userDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.treatment)
3652
+ );
3653
+ var userFlushBleeds = uniqueNonEmpty(
3654
+ userDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.bleed)
3655
+ );
3656
+ var contentFrameIntentSchema = z18.discriminatedUnion("kind", [
3657
+ z18.object({ kind: z18.literal("plain") }).strict(),
3658
+ z18.object({
3659
+ kind: z18.literal("panel"),
3660
+ treatment: z18.enum(userPanelTreatments)
3661
+ }).strict(),
3662
+ z18.object({
3663
+ kind: z18.literal("flush-panel"),
3664
+ treatment: z18.enum(userFlushTreatments),
3665
+ bleed: z18.enum(userFlushBleeds)
3666
+ }).strict()
3667
+ ]);
3668
+ var blockDesignPlanSchema = z18.object({
3669
+ blockId: z18.string().min(1).transform(asDesignBlockId),
3670
+ blockKind: z18.string().min(1),
3671
+ purpose: z18.string().min(1),
3672
+ sectionSurface: z18.enum(userDesignOptionCatalog.sectionSurfaces),
3673
+ contentFrame: contentFrameIntentSchema,
3674
+ itemSurface: z18.enum(userDesignOptionCatalog.itemSurfaces),
3675
+ transitionAfter: z18.enum(userDesignOptionCatalog.transitions),
3676
+ emphasis: z18.enum(userDesignOptionCatalog.emphases),
3677
+ heroLegibility: heroLegibilityStrategySchema.optional()
3678
+ }).strict();
3679
+ var styleAuthoritySchema = z18.discriminatedUnion("kind", [
3680
+ z18.object({
3681
+ kind: z18.literal("theme-v2"),
3682
+ source: designResolutionPolicySchema,
3683
+ siteStyleId: z18.string().min(1).transform(asSiteStyleId),
3684
+ templateId: z18.string().min(1).transform(asDesignSystemTemplateId),
3685
+ templateVersion: z18.number().int().nonnegative(),
3686
+ resolverVersion: z18.number().int().nonnegative()
3687
+ }).strict(),
3688
+ z18.object({
3689
+ kind: z18.literal("legacy-raw"),
3690
+ reason: z18.enum(["pre-theme-v2", "manual-runtime-fields"])
3691
+ }).strict(),
3692
+ z18.object({
3693
+ kind: z18.literal("advanced-detached"),
3694
+ reason: z18.literal("detached-custom-runtime-fields")
3695
+ }).strict()
3696
+ ]);
3697
+ var blockRuntimeStyleAuthoritySchema = z18.object({
3698
+ unit: z18.literal("block-runtime-fields"),
3699
+ blockId: z18.string().min(1).transform(asDesignBlockId),
3700
+ fields: nonEmptyRuntimeStyleFieldNamesSchema,
3701
+ authority: styleAuthoritySchema
3702
+ }).strict();
3703
+ var persistedPageDesignStateV1Schema = z18.object({
3704
+ schemaVersion: z18.literal(themeV2DesignStateSchemaVersion),
3705
+ siteStyleId: z18.string().min(1).transform(asSiteStyleId),
3706
+ templateId: z18.string().min(1).transform(asDesignSystemTemplateId),
3707
+ templateVersion: z18.number().int().nonnegative(),
3708
+ resolverVersion: z18.number().int().nonnegative(),
3709
+ rhythmPresetId: z18.string().min(1),
3710
+ blocks: z18.array(blockDesignPlanSchema),
3711
+ styleAuthorities: z18.array(blockRuntimeStyleAuthoritySchema)
3712
+ }).strict();
3713
+
3714
+ // ../theme-core/src/site-styles/generatedSchemas.ts
3715
+ import { z as z19 } from "zod";
3716
+ function uniqueNonEmpty2(values) {
3717
+ const uniqueValues = [...new Set(values)];
3718
+ const firstValue = uniqueValues[0];
3719
+ if (!firstValue) {
3720
+ throw new Error("Expected at least one generated schema option.");
3721
+ }
3722
+ return [firstValue, ...uniqueValues.slice(1)];
3723
+ }
3724
+ var generatedPanelTreatments = uniqueNonEmpty2(
3725
+ generatedDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "panel").map((frame) => frame.treatment)
3726
+ );
3727
+ var generatedFlushTreatments = uniqueNonEmpty2(
3728
+ generatedDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.treatment)
3729
+ );
3730
+ var generatedFlushBleeds = uniqueNonEmpty2(
3731
+ generatedDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.bleed)
3732
+ );
3733
+ var generatedPanelFrameSchema = z19.object({
3734
+ kind: z19.literal("panel"),
3735
+ treatment: z19.enum(generatedPanelTreatments)
3736
+ }).strict();
3737
+ var generatedFlushPanelFrameSchema = z19.object({
3738
+ kind: z19.literal("flush-panel"),
3739
+ treatment: z19.enum(generatedFlushTreatments),
3740
+ bleed: z19.enum(generatedFlushBleeds)
3741
+ }).strict();
3742
+ var generatedContentFrameIntentSchema = z19.discriminatedUnion("kind", [
3743
+ z19.object({ kind: z19.literal("plain") }).strict(),
3744
+ generatedPanelFrameSchema,
3745
+ generatedFlushPanelFrameSchema
3746
+ ]);
3747
+ var generatedSiteStyleIdSchema = z19.enum(curatedSiteStyleIdValues).transform(asSiteStyleId);
3748
+ function generatedChoiceSchema(valueSchema) {
3749
+ return z19.discriminatedUnion("kind", [
3750
+ z19.object({
3751
+ source: z19.literal("generated"),
3752
+ kind: z19.literal("auto")
3753
+ }).strict(),
3754
+ z19.object({
3755
+ source: z19.literal("generated"),
3756
+ kind: z19.literal("explicit"),
3757
+ value: valueSchema
3758
+ }).strict()
3759
+ ]);
3760
+ }
3761
+ var generatedBlockDesignIntentSchema = z19.object({
3762
+ sectionSurface: generatedChoiceSchema(
3763
+ z19.enum(generatedDesignOptionCatalog.sectionSurfaces)
3764
+ ),
3765
+ contentFrame: generatedChoiceSchema(generatedContentFrameIntentSchema),
3766
+ itemSurface: generatedChoiceSchema(
3767
+ z19.enum(generatedDesignOptionCatalog.itemSurfaces)
3768
+ ),
3769
+ transitionAfter: generatedChoiceSchema(
3770
+ z19.enum(generatedDesignOptionCatalog.transitions)
3771
+ ),
3772
+ emphasis: generatedChoiceSchema(
3773
+ z19.enum(generatedDesignOptionCatalog.emphases)
3774
+ )
3775
+ }).strict();
3776
+ var generatedMediaCompositionIntentSchema = z19.enum([
3777
+ "none",
3778
+ "supporting",
3779
+ "dominant"
3780
+ ]);
3781
+ var generatedDecorativeCompositionIntentSchema = z19.enum([
3782
+ "none",
3783
+ "supporting"
3784
+ ]);
3785
+ var generatedHeroLegibilityStrategySchema = z19.enum([
3786
+ "none",
3787
+ "scrim-gradient"
3788
+ ]);
3789
+ var generatedBlockMediaIntentSchema = z19.object({
3790
+ media: generatedMediaCompositionIntentSchema,
3791
+ decorative: generatedDecorativeCompositionIntentSchema,
3792
+ heroLegibility: generatedChoiceSchema(generatedHeroLegibilityStrategySchema)
3793
+ }).strict();
3794
+ var generatedBoundaryIntentSchema = z19.object({
3795
+ transitionAfter: generatedChoiceSchema(
3796
+ z19.enum(generatedDesignOptionCatalog.transitions)
3797
+ )
3798
+ }).strict();
3799
+ var generatedPageDesignBlockIntentSchema = z19.object({
3800
+ blockId: z19.string().min(1),
3801
+ blockKind: z19.string().min(1),
3802
+ purpose: z19.string().min(1),
3803
+ design: generatedBlockDesignIntentSchema,
3804
+ mediaIntent: generatedBlockMediaIntentSchema,
3805
+ boundaryIntent: generatedBoundaryIntentSchema
3806
+ }).strict();
3807
+ var generatedPageDesignIntentSchema = z19.object({
3808
+ siteStyleId: generatedSiteStyleIdSchema,
3809
+ blocks: z19.array(generatedPageDesignBlockIntentSchema)
3810
+ }).strict();
3737
3811
 
3738
- // ../theme-core/src/palette/variants/warm-neutral.ts
3739
- var warmNeutralClay = definePaletteVariant({
3740
- id: "warm-neutral-clay",
3741
- name: "Warm Neutral \u2014 Clay",
3742
- description: "Terracotta primary on a cream ground.",
3743
- tags: { tone: "classic", energy: "calm", era: "organic" },
3744
- mode: "light",
3745
- colors: [
3746
- { name: "primary", hex: "#8b5e34" },
3747
- { name: "secondary", hex: "#7c6f64" },
3748
- { name: "accent", hex: "#a15c38" },
3749
- { name: "success", hex: "#527853" },
3750
- { name: "warning", hex: "#b7791f" },
3751
- { name: "destructive", hex: "#b91c1c" },
3752
- { name: "background", hex: "#fffaf3" },
3753
- { name: "surface", hex: "#ffffff" },
3754
- { name: "surfaceAlt", hex: "#f5eadc" },
3755
- { name: "muted", hex: "#efe2d0" },
3756
- { name: "text", hex: "#2f241c" },
3757
- { name: "primaryForeground", hex: "#fffaf3" },
3758
- { name: "border", hex: "#d8c6b3" }
3759
- ]
3760
- });
3761
- var warmNeutralCream = definePaletteVariant({
3762
- id: "warm-neutral-cream",
3763
- name: "Warm Neutral \u2014 Cream",
3764
- description: "Soft sand primary with pale cream surfaces.",
3765
- tags: { tone: "minimal", energy: "calm", era: "organic" },
3766
- mode: "light",
3767
- colors: [
3768
- { name: "primary", hex: "#b08864" },
3769
- { name: "secondary", hex: "#9a8c7e" },
3770
- { name: "accent", hex: "#c2956a" },
3771
- { name: "success", hex: "#7d8a5f" },
3772
- { name: "warning", hex: "#c89a4d" },
3773
- { name: "destructive", hex: "#a3503e" },
3774
- { name: "background", hex: "#fdf8ee" },
3775
- { name: "surface", hex: "#ffffff" },
3776
- { name: "surfaceAlt", hex: "#f4ebd9" },
3777
- { name: "muted", hex: "#ede3cf" },
3778
- { name: "text", hex: "#3b2f24" },
3779
- { name: "primaryForeground", hex: "#fdf8ee" },
3780
- { name: "border", hex: "#e0d2b8" }
3781
- ]
3812
+ // ../theme-core/src/site-styles/pageDesignIntent.ts
3813
+ import { z as z20 } from "zod";
3814
+ var pageDesignIntentSchemaVersion = 1;
3815
+ var pageDesignUserPinnedAppearanceChoiceSchema = z20.object({
3816
+ kind: z20.literal("user-pinned"),
3817
+ value: z20.string().min(1).transform(asAppearancePresetId)
3818
+ }).strict();
3819
+ var pageDesignUserPinnedBoundaryChoiceSchema = z20.object({
3820
+ kind: z20.literal("user-pinned"),
3821
+ value: z20.string().min(1).transform(asBoundaryOptionId)
3822
+ }).strict();
3823
+ var pageDesignBlockLookPinSchema = z20.object({
3824
+ blockId: z20.string().min(1).transform(asDesignBlockId),
3825
+ blockKind: z20.string().min(1),
3826
+ choice: pageDesignUserPinnedAppearanceChoiceSchema
3827
+ }).strict();
3828
+ var pageDesignBoundaryPinSchema = z20.object({
3829
+ boundaryId: z20.string().min(1).transform(asDesignBoundaryId),
3830
+ previousBlockId: z20.string().min(1).transform(asDesignBlockId),
3831
+ nextBlockId: z20.string().min(1).transform(asDesignBlockId),
3832
+ choice: pageDesignUserPinnedBoundaryChoiceSchema
3833
+ }).strict().superRefine((pin, ctx) => {
3834
+ const expectedBoundaryId = makeBoundaryId(
3835
+ pin.previousBlockId,
3836
+ pin.nextBlockId
3837
+ );
3838
+ if (pin.boundaryId !== expectedBoundaryId) {
3839
+ ctx.addIssue({
3840
+ code: z20.ZodIssueCode.custom,
3841
+ path: ["boundaryId"],
3842
+ message: `Boundary id must match previousBlockId and nextBlockId. Expected ${expectedBoundaryId}.`
3843
+ });
3844
+ }
3782
3845
  });
3783
- var warmNeutralForest = definePaletteVariant({
3784
- id: "warm-neutral-forest",
3785
- name: "Warm Neutral \u2014 Forest",
3786
- description: "Deep forest green primary with earthy neutrals.",
3787
- tags: { tone: "classic", energy: "calm", era: "organic" },
3788
- mode: "light",
3789
- colors: [
3790
- { name: "primary", hex: "#3d5840" },
3791
- { name: "secondary", hex: "#7a6f5d" },
3792
- { name: "accent", hex: "#b06b50" },
3793
- { name: "success", hex: "#5a7a5d" },
3794
- { name: "warning", hex: "#b7791f" },
3795
- { name: "destructive", hex: "#b91c1c" },
3796
- { name: "background", hex: "#fbf8f0" },
3797
- { name: "surface", hex: "#ffffff" },
3798
- { name: "surfaceAlt", hex: "#f2ecdb" },
3799
- { name: "muted", hex: "#ebe3cc" },
3800
- { name: "text", hex: "#2a2a2a" },
3801
- { name: "primaryForeground", hex: "#fbf8f0" },
3802
- { name: "border", hex: "#cdc1a4" }
3803
- ]
3846
+ var pageDesignIntentV1Schema = z20.object({
3847
+ schemaVersion: z20.literal(pageDesignIntentSchemaVersion),
3848
+ siteStyleId: z20.string().min(1).transform(asSiteStyleId),
3849
+ pageFlowPresetId: z20.string().min(1).transform(asPageFlowPresetId),
3850
+ blockLookPins: z20.array(pageDesignBlockLookPinSchema),
3851
+ boundaryPins: z20.array(pageDesignBoundaryPinSchema)
3852
+ }).strict().superRefine((intent, ctx) => {
3853
+ addDuplicateStringIssues(ctx, {
3854
+ values: intent.blockLookPins.map((pin) => pin.blockId),
3855
+ path: ["blockLookPins"],
3856
+ label: "block Look pin"
3857
+ });
3858
+ addDuplicateStringIssues(ctx, {
3859
+ values: intent.boundaryPins.map(
3860
+ (pin) => boundaryKey(pin.previousBlockId, pin.nextBlockId)
3861
+ ),
3862
+ path: ["boundaryPins"],
3863
+ label: "boundary pin"
3864
+ });
3804
3865
  });
3805
-
3806
- // ../theme-core/src/palette/variants/index.ts
3807
- var paletteVariants = [
3808
- // Brand-led family
3809
- brandLedCool,
3810
- brandLedWarm,
3811
- brandLedJewel,
3812
- // Warm-neutral family
3813
- warmNeutralClay,
3814
- warmNeutralCream,
3815
- warmNeutralForest,
3816
- // High-contrast family
3817
- highContrastInk,
3818
- highContrastCharcoal,
3819
- highContrastMonochrome,
3820
- // Soft-natural family
3821
- softNaturalSage,
3822
- softNaturalStone,
3823
- softNaturalWatercolor
3824
- ];
3825
- var paletteVariantsById = new Map(
3826
- paletteVariants.map((v) => [v.id, v])
3827
- );
3866
+ function addDuplicateStringIssues(ctx, input) {
3867
+ const seen = /* @__PURE__ */ new Set();
3868
+ const duplicates = /* @__PURE__ */ new Set();
3869
+ for (const value of input.values) {
3870
+ if (seen.has(value)) {
3871
+ duplicates.add(value);
3872
+ }
3873
+ seen.add(value);
3874
+ }
3875
+ for (const duplicate of duplicates) {
3876
+ ctx.addIssue({
3877
+ code: z20.ZodIssueCode.custom,
3878
+ path: [...input.path],
3879
+ message: `Duplicate ${input.label}: ${duplicate}.`
3880
+ });
3881
+ }
3882
+ }
3883
+ function boundaryKey(previousBlockId, nextBlockId) {
3884
+ return makeBoundaryId(previousBlockId, nextBlockId);
3885
+ }
3828
3886
 
3829
3887
  // ../theme-core/src/site-styles/runtimeCompiler.ts
3830
3888
  function defineDesignRuntimeRules(rules) {
@@ -5091,7 +5149,8 @@ function ctaButton(opts) {
5091
5149
  },
5092
5150
  size: {
5093
5151
  $bind: {
5094
- from: sizePath
5152
+ from: sizePath,
5153
+ fallback: opts?.sizeFallback ?? "md"
5095
5154
  }
5096
5155
  },
5097
5156
  ...opts?.className ? { className: opts.className } : {},
@@ -8214,7 +8273,19 @@ var teamMemberFragment = defineFragment({
8214
8273
  bind("photo")
8215
8274
  )
8216
8275
  ]),
8217
- text({ as: "h3" }, bind("name")),
8276
+ link(
8277
+ {
8278
+ href: { $bind: { from: "profilePath" } },
8279
+ className: "rb-team-member-name-link"
8280
+ },
8281
+ [text({ as: "h3" }, bind("name"))],
8282
+ when("profilePath")
8283
+ ),
8284
+ text(
8285
+ { as: "h3" },
8286
+ when("profilePath", { not: true }),
8287
+ bind("name")
8288
+ ),
8218
8289
  text({ as: "p", className: "rb-team-member-role" }, when("role"), bind("role")),
8219
8290
  richText(
8220
8291
  { className: "rb-prose rb-max-w-none" },
@@ -9450,14 +9521,16 @@ var headerCta = ctaButton({
9450
9521
  whenPath: "menu.ctaItem.label",
9451
9522
  variantPath: "menu.ctaItem.variant",
9452
9523
  linkPath: "menu.ctaItem.link",
9453
- className: `header-cta btn-sm ${desktopOnlyDisplay("inline-flex")} rb-ml-6`
9524
+ sizeFallback: "sm",
9525
+ className: `header-cta ${desktopOnlyDisplay("inline-flex")} rb-ml-6`
9454
9526
  });
9455
9527
  var mobileCta = ctaButton({
9456
9528
  basePath: "menu.ctaItem",
9457
9529
  whenPath: "menu.ctaItem.label",
9458
9530
  variantPath: "menu.ctaItem.variant",
9459
9531
  linkPath: "menu.ctaItem.link",
9460
- className: "nav-mobile-cta btn-md rb-w-full"
9532
+ sizeFallback: "md",
9533
+ className: "nav-mobile-cta rb-w-full"
9461
9534
  });
9462
9535
  var mobileToggleIcon = stack({ gap: "xs", className: "nav-mobile-icon" }, [
9463
9536
  {
@@ -11307,7 +11380,9 @@ var courseSessionSchema = z31.object({
11307
11380
  var courseTeamMemberSummarySchema = z31.object({
11308
11381
  id: z31.string(),
11309
11382
  name: z31.string(),
11310
- summary: z31.string().nullable()
11383
+ roleLabel: z31.string().nullable(),
11384
+ summary: z31.string().nullable(),
11385
+ profilePath: z31.string().nullable()
11311
11386
  });
11312
11387
  var coursePricingOptionSchema = z31.object({
11313
11388
  id: z31.string(),
@@ -11412,7 +11487,9 @@ var publicEventTicketTypeSchema = z32.object({
11412
11487
  var publicTeamMemberSummarySchema = z32.object({
11413
11488
  id: z32.string(),
11414
11489
  name: z32.string(),
11415
- summary: z32.string().nullable()
11490
+ roleLabel: z32.string().nullable(),
11491
+ summary: z32.string().nullable(),
11492
+ profilePath: z32.string().nullable()
11416
11493
  });
11417
11494
  var publicEventSchema = z32.object({
11418
11495
  kind: z32.enum(["event", "course_session"]).optional(),
@@ -17183,7 +17260,25 @@ var newsletterSignupBlockDefinition = {
17183
17260
  };
17184
17261
 
17185
17262
  // ../blocks/src/system/blocks/team-members.ts
17263
+ import { z as z50 } from "zod";
17186
17264
  var ITEM_NAME2 = "member";
17265
+ var teamMemberPhotoSchema = mediaSchema2.refine((media2) => media2.type === "image", {
17266
+ message: "Team member photos must be image media"
17267
+ }).nullable();
17268
+ var teamMemberDataSchema = z50.object({
17269
+ _type: z50.literal("teamMember"),
17270
+ id: z50.string(),
17271
+ name: z50.string(),
17272
+ role: z50.string().nullable(),
17273
+ roleLabel: z50.string().nullable(),
17274
+ bio: z50.string().nullable(),
17275
+ summary: z50.string().nullable(),
17276
+ photo: teamMemberPhotoSchema,
17277
+ profilePath: z50.string().nullable()
17278
+ });
17279
+ var teamMembersDataSchema = z50.array(teamMemberDataSchema);
17280
+ var dynamicSourceWhen = { equals: "site_staff" };
17281
+ var manualSourceWhen = { equals: "site_staff", not: true };
17187
17282
  var headingNode = text(
17188
17283
  { as: "h2" },
17189
17284
  bind("content.heading"),
@@ -17273,7 +17368,15 @@ var teamMemberStackLayout = el(
17273
17368
  ]
17274
17369
  ),
17275
17370
  stack({ gap: "sm", className: "rb-team-member-body rb-flex-1 rb-min-w-0" }, [
17276
- text({ as: "h3" }, bind("name")),
17371
+ link(
17372
+ {
17373
+ href: { $bind: { from: "profilePath" } },
17374
+ className: "rb-team-member-name-link"
17375
+ },
17376
+ [text({ as: "h3" }, bind("name"))],
17377
+ when("profilePath")
17378
+ ),
17379
+ text({ as: "h3" }, when("profilePath", { not: true }), bind("name")),
17277
17380
  text(
17278
17381
  { as: "p", className: "rb-team-member-role" },
17279
17382
  when("role"),
@@ -17287,12 +17390,18 @@ var teamMemberStackLayout = el(
17287
17390
  ])
17288
17391
  ]
17289
17392
  );
17290
- var gridMembersNode = repeaterFragmentLayout({
17393
+ var manualGridMembersNode = when("content.source", manualSourceWhen)(repeaterFragmentLayout({
17291
17394
  collectionPath: "content.members",
17292
17395
  itemName: ITEM_NAME2,
17293
17396
  fragments: { teamMember: teamMemberFragment },
17294
17397
  itemGap: "sm"
17295
- });
17398
+ }));
17399
+ var dynamicGridMembersNode = when("content.source", dynamicSourceWhen)(repeaterFragmentLayout({
17400
+ collectionPath: "data.members",
17401
+ itemName: ITEM_NAME2,
17402
+ fragments: { teamMember: teamMemberFragment },
17403
+ itemGap: "sm"
17404
+ }));
17296
17405
  var gridVariant = wrapVariant3(
17297
17406
  el(
17298
17407
  "grid",
@@ -17306,22 +17415,29 @@ var gridVariant = wrapVariant3(
17306
17415
  },
17307
17416
  gap: { $bind: { from: "content.gap", fallback: "medium" } }
17308
17417
  },
17309
- [gridMembersNode]
17418
+ [manualGridMembersNode, dynamicGridMembersNode]
17310
17419
  )
17311
17420
  );
17312
- var stackMembersNode = repeaterFragmentLayout({
17421
+ var manualStackMembersNode = when("content.source", manualSourceWhen)(repeaterFragmentLayout({
17313
17422
  collectionPath: "content.members",
17314
17423
  itemName: ITEM_NAME2,
17315
17424
  fragments: { teamMember: teamMemberFragment },
17316
17425
  layoutOverrides: { teamMember: teamMemberStackLayout },
17317
17426
  itemGap: "sm"
17318
- });
17427
+ }));
17428
+ var dynamicStackMembersNode = when("content.source", dynamicSourceWhen)(repeaterFragmentLayout({
17429
+ collectionPath: "data.members",
17430
+ itemName: ITEM_NAME2,
17431
+ fragments: { teamMember: teamMemberFragment },
17432
+ layoutOverrides: { teamMember: teamMemberStackLayout },
17433
+ itemGap: "sm"
17434
+ }));
17319
17435
  var stackVariant = wrapVariant3({
17320
17436
  type: "stack",
17321
17437
  props: {
17322
17438
  gap: { $bind: { from: "content.gap", fallback: "medium" } }
17323
17439
  },
17324
- children: [stackMembersNode]
17440
+ children: [manualStackMembersNode, dynamicStackMembersNode]
17325
17441
  });
17326
17442
  var teamMembersManifest = createBlockManifest({
17327
17443
  id: "block.team-members",
@@ -17336,6 +17452,18 @@ var teamMembersManifest = createBlockManifest({
17336
17452
  required: false,
17337
17453
  maxLength: 120
17338
17454
  }),
17455
+ parseFieldDefinition({
17456
+ id: "source",
17457
+ type: "select",
17458
+ label: "Team members",
17459
+ description: "Choose whether to use the site-wide team or a hand-picked list.",
17460
+ defaultValue: "manual",
17461
+ options: [
17462
+ { value: "manual", label: "Choose manually" },
17463
+ { value: "site_staff", label: "Use all site team members" }
17464
+ ],
17465
+ ui: { intent: "behavior" }
17466
+ }),
17339
17467
  parseFieldDefinition({
17340
17468
  id: "layoutAlign",
17341
17469
  type: "select",
@@ -17438,18 +17566,24 @@ var teamMembersManifest = createBlockManifest({
17438
17566
  ],
17439
17567
  ui: { intent: "display" }
17440
17568
  }),
17441
- fragmentsToRepeaterField(
17442
- "members",
17443
- "Team members",
17444
- { teamMember: teamMemberFragment },
17445
- {
17446
- minItems: 0,
17447
- maxItems: 50,
17448
- itemLabel: "Team member",
17449
- itemLabelSource: "name",
17450
- description: "Add people to this section."
17569
+ {
17570
+ ...fragmentsToRepeaterField(
17571
+ "members",
17572
+ "Team members",
17573
+ { teamMember: teamMemberFragment },
17574
+ {
17575
+ minItems: 0,
17576
+ maxItems: 50,
17577
+ itemLabel: "Team member",
17578
+ itemLabelSource: "name",
17579
+ description: "Add people to this section."
17580
+ }
17581
+ ),
17582
+ ui: {
17583
+ intent: "content",
17584
+ visibleWhen: { field: "source", equals: "manual" }
17451
17585
  }
17452
- )
17586
+ }
17453
17587
  ],
17454
17588
  layout: gridVariant,
17455
17589
  variants: {
@@ -17475,7 +17609,20 @@ var teamMembersManifest = createBlockManifest({
17475
17609
  styleTokens: { spacing: "lg" }
17476
17610
  });
17477
17611
  var teamMembersBlockDefinition = {
17478
- manifest: teamMembersManifest
17612
+ manifest: teamMembersManifest,
17613
+ dataSchemas: {
17614
+ members: teamMembersDataSchema
17615
+ },
17616
+ dataLoaders: {
17617
+ members: {
17618
+ endpoint: "listPublicTeamMembers",
17619
+ params: {
17620
+ siteId: { $bind: { from: "$root.siteId" } },
17621
+ stage: { $bind: { from: "$root.previewStage", fallback: "published" } }
17622
+ },
17623
+ mode: "server"
17624
+ }
17625
+ }
17479
17626
  };
17480
17627
 
17481
17628
  // ../blocks/src/system/runtime/nodes/location-map.shared.ts
@@ -18453,11 +18600,11 @@ function resolveModelForPass(passId, tierOverrides, passOverrides, globalModel)
18453
18600
  }
18454
18601
 
18455
18602
  // src/page-converter/passes/pass1-segmentation-matching.ts
18456
- import { z as z54 } from "zod";
18603
+ import { z as z55 } from "zod";
18457
18604
 
18458
18605
  // src/manifest/passes/pass1-fields.ts
18459
- import { z as z50 } from "zod";
18460
- var simpleFieldTypeEnum = z50.enum([
18606
+ import { z as z51 } from "zod";
18607
+ var simpleFieldTypeEnum = z51.enum([
18461
18608
  "text",
18462
18609
  "richText",
18463
18610
  "media",
@@ -18466,7 +18613,7 @@ var simpleFieldTypeEnum = z50.enum([
18466
18613
  "select",
18467
18614
  "number"
18468
18615
  ]);
18469
- var fieldTypeEnum = z50.enum([
18616
+ var fieldTypeEnum = z51.enum([
18470
18617
  "text",
18471
18618
  "richText",
18472
18619
  "media",
@@ -18477,109 +18624,109 @@ var fieldTypeEnum = z50.enum([
18477
18624
  "repeater",
18478
18625
  "group"
18479
18626
  ]);
18480
- var linkDefaultValue = z50.object({
18481
- label: z50.string().describe("The visible link text")
18627
+ var linkDefaultValue = z51.object({
18628
+ label: z51.string().describe("The visible link text")
18482
18629
  });
18483
- var mediaDefaultValue = z50.object({
18484
- src: z50.string().describe("Image/video source URL"),
18485
- alt: z50.string().describe("Alt text for accessibility (empty string if none)")
18630
+ var mediaDefaultValue = z51.object({
18631
+ src: z51.string().describe("Image/video source URL"),
18632
+ alt: z51.string().describe("Alt text for accessibility (empty string if none)")
18486
18633
  });
18487
- var nestedFieldSchema = z50.object({
18488
- id: z50.string().min(1).describe("camelCase field ID"),
18634
+ var nestedFieldSchema = z51.object({
18635
+ id: z51.string().min(1).describe("camelCase field ID"),
18489
18636
  type: simpleFieldTypeEnum,
18490
- label: z50.string().min(1),
18491
- required: z50.boolean().nullable()
18637
+ label: z51.string().min(1),
18638
+ required: z51.boolean().nullable()
18492
18639
  });
18493
- var simpleFieldSchema = z50.object({
18494
- id: z50.string().min(1).describe("camelCase field ID (e.g., headline, ctaButton)"),
18640
+ var simpleFieldSchema = z51.object({
18641
+ id: z51.string().min(1).describe("camelCase field ID (e.g., headline, ctaButton)"),
18495
18642
  type: simpleFieldTypeEnum,
18496
- label: z50.string().min(1),
18497
- required: z50.boolean(),
18498
- multiline: z50.boolean().nullable().describe("For text fields: true if multiple lines"),
18499
- defaultValue: z50.union([
18500
- z50.string(),
18501
- z50.number(),
18502
- z50.boolean(),
18643
+ label: z51.string().min(1),
18644
+ required: z51.boolean(),
18645
+ multiline: z51.boolean().nullable().describe("For text fields: true if multiple lines"),
18646
+ defaultValue: z51.union([
18647
+ z51.string(),
18648
+ z51.number(),
18649
+ z51.boolean(),
18503
18650
  linkDefaultValue,
18504
18651
  mediaDefaultValue,
18505
- z50.null()
18652
+ z51.null()
18506
18653
  ]).describe("Default content extracted from HTML"),
18507
- htmlContext: z50.string().describe("Brief description of where this appears in the HTML")
18508
- });
18509
- var repeaterFieldSchema2 = z50.object({
18510
- id: z50.string().min(1).describe("camelCase field ID (e.g., socialLinks, features)"),
18511
- type: z50.literal("repeater"),
18512
- label: z50.string().min(1),
18513
- required: z50.boolean(),
18514
- itemLabel: z50.string().min(1).describe('Singular label for each item (e.g., "Link", "Feature")'),
18515
- itemFields: z50.array(nestedFieldSchema).min(1).describe("Fields for each item in the repeater"),
18516
- htmlContext: z50.string().describe("Brief description of where this appears in the HTML")
18517
- });
18518
- var groupFieldSchema2 = z50.object({
18519
- id: z50.string().min(1).describe("camelCase field ID (e.g., contactInfo, seoSettings)"),
18520
- type: z50.literal("group"),
18521
- label: z50.string().min(1),
18522
- required: z50.boolean(),
18523
- groupFields: z50.array(nestedFieldSchema).min(1).describe("Fields within the group"),
18524
- htmlContext: z50.string().describe("Brief description of where this appears in the HTML")
18525
- });
18526
- var extractedFieldSchema = z50.union([
18654
+ htmlContext: z51.string().describe("Brief description of where this appears in the HTML")
18655
+ });
18656
+ var repeaterFieldSchema2 = z51.object({
18657
+ id: z51.string().min(1).describe("camelCase field ID (e.g., socialLinks, features)"),
18658
+ type: z51.literal("repeater"),
18659
+ label: z51.string().min(1),
18660
+ required: z51.boolean(),
18661
+ itemLabel: z51.string().min(1).describe('Singular label for each item (e.g., "Link", "Feature")'),
18662
+ itemFields: z51.array(nestedFieldSchema).min(1).describe("Fields for each item in the repeater"),
18663
+ htmlContext: z51.string().describe("Brief description of where this appears in the HTML")
18664
+ });
18665
+ var groupFieldSchema2 = z51.object({
18666
+ id: z51.string().min(1).describe("camelCase field ID (e.g., contactInfo, seoSettings)"),
18667
+ type: z51.literal("group"),
18668
+ label: z51.string().min(1),
18669
+ required: z51.boolean(),
18670
+ groupFields: z51.array(nestedFieldSchema).min(1).describe("Fields within the group"),
18671
+ htmlContext: z51.string().describe("Brief description of where this appears in the HTML")
18672
+ });
18673
+ var extractedFieldSchema = z51.union([
18527
18674
  simpleFieldSchema,
18528
18675
  repeaterFieldSchema2,
18529
18676
  groupFieldSchema2
18530
18677
  ]);
18531
- var extractedEntrySchema = z50.object({
18532
- identifier: z50.string().regex(/^[a-z0-9-]+$/).describe("Unique slug-safe identifier (e.g., wine-tasting-evening)"),
18533
- title: z50.string().min(1).describe("Entry title"),
18678
+ var extractedEntrySchema = z51.object({
18679
+ identifier: z51.string().regex(/^[a-z0-9-]+$/).describe("Unique slug-safe identifier (e.g., wine-tasting-evening)"),
18680
+ title: z51.string().min(1).describe("Entry title"),
18534
18681
  // Use passthrough() instead of record() - generates additionalProperties:true without propertyNames
18535
18682
  // which OpenAI's structured output accepts
18536
- data: z50.object({}).passthrough().describe("Entry data matching the content type schema")
18537
- });
18538
- var newContentTypeSchema = z50.object({
18539
- key: z50.string().regex(/^[a-z][a-z0-9-]*$/).describe("Content type key (e.g., testimonial, team-member)"),
18540
- name: z50.string().min(1).describe("Human-readable name"),
18541
- description: z50.string().nullable().describe("Description of this content type"),
18542
- fields: z50.array(z50.object({
18543
- id: z50.string().min(1),
18544
- type: z50.string().min(1),
18545
- label: z50.string().min(1),
18546
- required: z50.boolean().nullable(),
18547
- description: z50.string().nullable()
18683
+ data: z51.object({}).passthrough().describe("Entry data matching the content type schema")
18684
+ });
18685
+ var newContentTypeSchema = z51.object({
18686
+ key: z51.string().regex(/^[a-z][a-z0-9-]*$/).describe("Content type key (e.g., testimonial, team-member)"),
18687
+ name: z51.string().min(1).describe("Human-readable name"),
18688
+ description: z51.string().nullable().describe("Description of this content type"),
18689
+ fields: z51.array(z51.object({
18690
+ id: z51.string().min(1),
18691
+ type: z51.string().min(1),
18692
+ label: z51.string().min(1),
18693
+ required: z51.boolean().nullable(),
18694
+ description: z51.string().nullable()
18548
18695
  })).min(1),
18549
- isRouted: z50.boolean().describe("Whether entries have their own pages")
18696
+ isRouted: z51.boolean().describe("Whether entries have their own pages")
18550
18697
  });
18551
- var contentTypeApproachSchema = z50.discriminatedUnion("approach", [
18698
+ var contentTypeApproachSchema = z51.discriminatedUnion("approach", [
18552
18699
  // Use an existing content type
18553
- z50.object({
18554
- approach: z50.literal("existingContentType"),
18555
- contentTypeKey: z50.string().min(1).describe("Key of the existing content type to use"),
18556
- entries: z50.array(extractedEntrySchema).min(1).describe("Extracted entries"),
18557
- rationale: z50.string().describe("Why this content type fits")
18700
+ z51.object({
18701
+ approach: z51.literal("existingContentType"),
18702
+ contentTypeKey: z51.string().min(1).describe("Key of the existing content type to use"),
18703
+ entries: z51.array(extractedEntrySchema).min(1).describe("Extracted entries"),
18704
+ rationale: z51.string().describe("Why this content type fits")
18558
18705
  }),
18559
18706
  // Create a new content type
18560
- z50.object({
18561
- approach: z50.literal("newContentType"),
18707
+ z51.object({
18708
+ approach: z51.literal("newContentType"),
18562
18709
  contentType: newContentTypeSchema,
18563
- entries: z50.array(extractedEntrySchema).min(1).describe("Extracted entries"),
18564
- rationale: z50.string().describe("Why a new content type is needed")
18710
+ entries: z51.array(extractedEntrySchema).min(1).describe("Extracted entries"),
18711
+ rationale: z51.string().describe("Why a new content type is needed")
18565
18712
  }),
18566
18713
  // Use repeater field (page-specific data)
18567
- z50.object({
18568
- approach: z50.literal("repeater"),
18569
- rationale: z50.string().describe("Why repeater is preferred over content type")
18714
+ z51.object({
18715
+ approach: z51.literal("repeater"),
18716
+ rationale: z51.string().describe("Why repeater is preferred over content type")
18570
18717
  }),
18571
18718
  // No list data - standard field extraction
18572
- z50.object({
18573
- approach: z50.literal("none"),
18574
- rationale: z50.string().describe("Why this is not list data")
18719
+ z51.object({
18720
+ approach: z51.literal("none"),
18721
+ rationale: z51.string().describe("Why this is not list data")
18575
18722
  })
18576
18723
  ]);
18577
- var pass1OutputSchema = z50.object({
18578
- blockId: z50.string().regex(/^custom\.[a-z][a-z0-9-]*$/).describe("Block ID like custom.hero-section"),
18579
- blockTitle: z50.string().min(1),
18580
- blockDescription: z50.string().nullable(),
18581
- category: z50.enum(["marketing", "content", "blog", "media", "layout", "interactive"]),
18582
- fields: z50.array(extractedFieldSchema).min(1),
18724
+ var pass1OutputSchema = z51.object({
18725
+ blockId: z51.string().regex(/^custom\.[a-z][a-z0-9-]*$/).describe("Block ID like custom.hero-section"),
18726
+ blockTitle: z51.string().min(1),
18727
+ blockDescription: z51.string().nullable(),
18728
+ category: z51.enum(["marketing", "content", "blog", "media", "layout", "interactive"]),
18729
+ fields: z51.array(extractedFieldSchema).min(1),
18583
18730
  /**
18584
18731
  * Content type decision for list-like content.
18585
18732
  * When content types are available, the LLM may decide to use content entries
@@ -18821,10 +18968,10 @@ async function getJsonFromAiText(ai, config, userMessage, schema) {
18821
18968
  }
18822
18969
 
18823
18970
  // src/manifest/passes/pass3-styling.ts
18824
- import { z as z53 } from "zod";
18971
+ import { z as z54 } from "zod";
18825
18972
 
18826
18973
  // src/manifest/validation/output-schema.ts
18827
- import { z as z52 } from "zod";
18974
+ import { z as z53 } from "zod";
18828
18975
 
18829
18976
  // src/manifest/validation/layout-utils.ts
18830
18977
  function collectLayoutNodeInfos(node, path2 = "layout", out = []) {
@@ -18865,53 +19012,53 @@ function collectLayoutClassNames(node, out = /* @__PURE__ */ new Set()) {
18865
19012
  }
18866
19013
 
18867
19014
  // src/zod/titleSourceSchema.ts
18868
- import { z as z51 } from "zod";
18869
- var titleSourceValueSchema = z51.union([
18870
- z51.string().min(1),
18871
- z51.array(z51.string().min(1)).min(1)
19015
+ import { z as z52 } from "zod";
19016
+ var titleSourceValueSchema = z52.union([
19017
+ z52.string().min(1),
19018
+ z52.array(z52.string().min(1)).min(1)
18872
19019
  ]);
18873
19020
 
18874
19021
  // src/manifest/validation/output-schema.ts
18875
- var blockCategoryEnum2 = z52.enum(["marketing", "content", "blog", "media", "layout", "interactive"]);
18876
- var llmColorValue = z52.object({
18877
- name: z52.string(),
18878
- hex: z52.string()
18879
- });
18880
- var llmThemePrimitive = z52.union([
18881
- z52.string(),
18882
- z52.number(),
18883
- z52.boolean(),
18884
- z52.null()
19022
+ var blockCategoryEnum2 = z53.enum(["marketing", "content", "blog", "media", "layout", "interactive"]);
19023
+ var llmColorValue = z53.object({
19024
+ name: z53.string(),
19025
+ hex: z53.string()
19026
+ });
19027
+ var llmThemePrimitive = z53.union([
19028
+ z53.string(),
19029
+ z53.number(),
19030
+ z53.boolean(),
19031
+ z53.null()
18885
19032
  ]);
18886
- var llmThemePatchValue = z52.union([
19033
+ var llmThemePatchValue = z53.union([
18887
19034
  llmThemePrimitive,
18888
19035
  llmColorValue,
18889
- z52.array(llmColorValue),
18890
- z52.array(llmThemePrimitive)
19036
+ z53.array(llmColorValue),
19037
+ z53.array(llmThemePrimitive)
18891
19038
  ]);
18892
- var llmThemePatchOpSchema = z52.discriminatedUnion("op", [
18893
- z52.object({ op: z52.literal("add"), path: z52.string().min(1), value: llmThemePatchValue }),
18894
- z52.object({ op: z52.literal("replace"), path: z52.string().min(1), value: llmThemePatchValue }),
18895
- z52.object({ op: z52.literal("remove"), path: z52.string().min(1) })
19039
+ var llmThemePatchOpSchema = z53.discriminatedUnion("op", [
19040
+ z53.object({ op: z53.literal("add"), path: z53.string().min(1), value: llmThemePatchValue }),
19041
+ z53.object({ op: z53.literal("replace"), path: z53.string().min(1), value: llmThemePatchValue }),
19042
+ z53.object({ op: z53.literal("remove"), path: z53.string().min(1) })
18896
19043
  ]);
18897
- var llmCssDeclaration = z52.object({
18898
- property: z52.string(),
18899
- value: z52.string()
19044
+ var llmCssDeclaration = z53.object({
19045
+ property: z53.string(),
19046
+ value: z53.string()
18900
19047
  });
18901
- var llmCustomCssRuleSchema = z52.object({
18902
- id: z52.string().min(1),
18903
- selector: z52.string().min(1),
18904
- declarations: z52.array(llmCssDeclaration)
19048
+ var llmCustomCssRuleSchema = z53.object({
19049
+ id: z53.string().min(1),
19050
+ selector: z53.string().min(1),
19051
+ declarations: z53.array(llmCssDeclaration)
18905
19052
  });
18906
- var llmNestedRuleSchema = z52.object({
18907
- selector: z52.string().min(1),
18908
- declarations: z52.array(llmCssDeclaration)
19053
+ var llmNestedRuleSchema = z53.object({
19054
+ selector: z53.string().min(1),
19055
+ declarations: z53.array(llmCssDeclaration)
18909
19056
  });
18910
- var llmMediaAtRuleSchema = z52.object({
18911
- id: z52.string().min(1),
18912
- type: z52.literal("media"),
18913
- query: z52.string().min(1),
18914
- rules: z52.array(llmNestedRuleSchema)
19057
+ var llmMediaAtRuleSchema = z53.object({
19058
+ id: z53.string().min(1),
19059
+ type: z53.literal("media"),
19060
+ query: z53.string().min(1),
19061
+ rules: z53.array(llmNestedRuleSchema)
18915
19062
  });
18916
19063
  function normalizeDeclarationsArrayToRecord(declarations) {
18917
19064
  const record = {};
@@ -18941,79 +19088,79 @@ function normalizeLlmMediaAtRule(atRule) {
18941
19088
  rules: atRule.rules.map(normalizeLlmNestedRule)
18942
19089
  };
18943
19090
  }
18944
- var jsonPrimitiveSchema = z52.union([
18945
- z52.string(),
18946
- z52.number(),
18947
- z52.boolean(),
18948
- z52.null()
19091
+ var jsonPrimitiveSchema = z53.union([
19092
+ z53.string(),
19093
+ z53.number(),
19094
+ z53.boolean(),
19095
+ z53.null()
18949
19096
  ]);
18950
- var jsonValueSchema = z52.union([
19097
+ var jsonValueSchema = z53.union([
18951
19098
  jsonPrimitiveSchema,
18952
- z52.array(jsonPrimitiveSchema)
19099
+ z53.array(jsonPrimitiveSchema)
18953
19100
  ]);
18954
- var llmBaseFieldSchema = z52.object({
18955
- id: z52.string().min(1),
18956
- label: z52.string().min(1),
18957
- description: z52.string().nullable(),
18958
- required: z52.boolean(),
19101
+ var llmBaseFieldSchema = z53.object({
19102
+ id: z53.string().min(1),
19103
+ label: z53.string().min(1),
19104
+ description: z53.string().nullable(),
19105
+ required: z53.boolean(),
18959
19106
  defaultValue: jsonValueSchema.nullable()
18960
19107
  });
18961
19108
  var llmTextFieldSchema = llmBaseFieldSchema.extend({
18962
- type: z52.literal("text"),
18963
- multiline: z52.boolean(),
18964
- maxLength: z52.number().int().positive().nullable()
19109
+ type: z53.literal("text"),
19110
+ multiline: z53.boolean(),
19111
+ maxLength: z53.number().int().positive().nullable()
18965
19112
  });
18966
19113
  var llmRichTextFieldSchema = llmBaseFieldSchema.extend({
18967
- type: z52.literal("richText")
19114
+ type: z53.literal("richText")
18968
19115
  });
18969
19116
  var llmMediaFieldSchema = llmBaseFieldSchema.extend({
18970
- type: z52.literal("media"),
18971
- mediaKinds: z52.array(z52.enum(["image", "video", "audio", "document", "spreadsheet", "archive"])).nullable()
19117
+ type: z53.literal("media"),
19118
+ mediaKinds: z53.array(z53.enum(["image", "video", "audio", "document", "spreadsheet", "archive"])).nullable()
18972
19119
  });
18973
19120
  var llmBooleanFieldSchema = llmBaseFieldSchema.extend({
18974
- type: z52.literal("boolean")
19121
+ type: z53.literal("boolean")
18975
19122
  });
18976
19123
  var llmLinkFieldSchema = llmBaseFieldSchema.extend({
18977
- type: z52.literal("link")
19124
+ type: z53.literal("link")
18978
19125
  });
18979
19126
  var llmSelectFieldSchema = llmBaseFieldSchema.extend({
18980
- type: z52.literal("select"),
18981
- options: z52.array(z52.object({
18982
- value: z52.string(),
18983
- label: z52.string()
19127
+ type: z53.literal("select"),
19128
+ options: z53.array(z53.object({
19129
+ value: z53.string(),
19130
+ label: z53.string()
18984
19131
  })),
18985
- multiple: z52.boolean().nullable()
19132
+ multiple: z53.boolean().nullable()
18986
19133
  });
18987
19134
  var llmNumberFieldSchema = llmBaseFieldSchema.extend({
18988
- type: z52.literal("number")
18989
- });
18990
- var llmNestedFieldSchema = z52.object({
18991
- id: z52.string(),
18992
- type: z52.string(),
18993
- label: z52.string(),
18994
- required: z52.boolean().nullable(),
18995
- multiline: z52.boolean().nullable(),
19135
+ type: z53.literal("number")
19136
+ });
19137
+ var llmNestedFieldSchema = z53.object({
19138
+ id: z53.string(),
19139
+ type: z53.string(),
19140
+ label: z53.string(),
19141
+ required: z53.boolean().nullable(),
19142
+ multiline: z53.boolean().nullable(),
18996
19143
  defaultValue: jsonValueSchema.nullable()
18997
19144
  }).passthrough();
18998
- var llmNestedFieldsSchema = z52.array(llmNestedFieldSchema);
19145
+ var llmNestedFieldsSchema = z53.array(llmNestedFieldSchema);
18999
19146
  var llmGroupFieldSchema = llmBaseFieldSchema.extend({
19000
- type: z52.literal("group"),
19001
- schema: z52.object({
19147
+ type: z53.literal("group"),
19148
+ schema: z53.object({
19002
19149
  fields: llmNestedFieldsSchema
19003
19150
  })
19004
19151
  });
19005
19152
  var llmRepeaterFieldSchema = llmBaseFieldSchema.extend({
19006
- type: z52.literal("repeater"),
19007
- itemLabel: z52.string(),
19008
- itemLabelSource: z52.string().nullable(),
19009
- minItems: z52.number().int().min(0),
19010
- maxItems: z52.number().int().positive().nullable(),
19011
- allowConversion: z52.boolean(),
19012
- schema: z52.object({
19153
+ type: z53.literal("repeater"),
19154
+ itemLabel: z53.string(),
19155
+ itemLabelSource: z53.string().nullable(),
19156
+ minItems: z53.number().int().min(0),
19157
+ maxItems: z53.number().int().positive().nullable(),
19158
+ allowConversion: z53.boolean(),
19159
+ schema: z53.object({
19013
19160
  fields: llmNestedFieldsSchema
19014
19161
  })
19015
19162
  });
19016
- var llmFieldSchema = z52.union([
19163
+ var llmFieldSchema = z53.union([
19017
19164
  llmTextFieldSchema,
19018
19165
  llmRichTextFieldSchema,
19019
19166
  llmMediaFieldSchema,
@@ -19024,64 +19171,64 @@ var llmFieldSchema = z52.union([
19024
19171
  llmGroupFieldSchema,
19025
19172
  llmRepeaterFieldSchema
19026
19173
  ]);
19027
- var llmBindingSchema = z52.object({
19028
- from: z52.string(),
19029
- fallback: z52.string().nullable(),
19030
- transforms: z52.array(z52.object({
19031
- id: z52.string()
19174
+ var llmBindingSchema = z53.object({
19175
+ from: z53.string(),
19176
+ fallback: z53.string().nullable(),
19177
+ transforms: z53.array(z53.object({
19178
+ id: z53.string()
19032
19179
  })).nullable()
19033
19180
  });
19034
- var llmRepeatSchema = z52.object({
19035
- collection: z52.object({ from: z52.string() }),
19036
- itemName: z52.string()
19181
+ var llmRepeatSchema = z53.object({
19182
+ collection: z53.object({ from: z53.string() }),
19183
+ itemName: z53.string()
19037
19184
  });
19038
- var llmPropsSchema = z52.object({}).passthrough().nullable();
19185
+ var llmPropsSchema = z53.object({}).passthrough().nullable();
19039
19186
  function buildLlmNodeSchema(maxDepth) {
19040
- const nodeBase = z52.object({
19041
- type: z52.string(),
19187
+ const nodeBase = z53.object({
19188
+ type: z53.string(),
19042
19189
  props: llmPropsSchema,
19043
19190
  $bind: llmBindingSchema.nullable(),
19044
19191
  $repeat: llmRepeatSchema.nullable(),
19045
- $when: z52.object({
19046
- condition: z52.object({ from: z52.string() })
19192
+ $when: z53.object({
19193
+ condition: z53.object({ from: z53.string() })
19047
19194
  }).nullable()
19048
19195
  });
19049
- let schema = nodeBase.extend({ children: z52.null() });
19196
+ let schema = nodeBase.extend({ children: z53.null() });
19050
19197
  for (let i = 0; i < maxDepth; i++) {
19051
- schema = nodeBase.extend({ children: z52.array(schema).nullable() });
19198
+ schema = nodeBase.extend({ children: z53.array(schema).nullable() });
19052
19199
  }
19053
19200
  return schema;
19054
19201
  }
19055
19202
  var MAX_LAYOUT_DEPTH = 6;
19056
19203
  var llmNodeSchema = buildLlmNodeSchema(MAX_LAYOUT_DEPTH);
19057
- var llmCustomBlockSchema = z52.object({
19058
- id: z52.string().min(8).regex(/^custom\.[a-z][a-z0-9-]*$/, {
19204
+ var llmCustomBlockSchema = z53.object({
19205
+ id: z53.string().min(8).regex(/^custom\.[a-z][a-z0-9-]*$/, {
19059
19206
  message: "Block ID must start with 'custom.' followed by lowercase letters, numbers, or hyphens"
19060
19207
  }),
19061
- title: z52.string().min(1, "Title is required"),
19208
+ title: z53.string().min(1, "Title is required"),
19062
19209
  // Keep in sync with `sdkCustomBlockSchema` and the system manifest schema:
19063
19210
  // - `null` used by OpenAI structured output for "optional" values
19064
19211
  // - array allows multi-part titles (e.g. ["navLabel", "title"])
19065
19212
  titleSource: titleSourceValueSchema.nullable(),
19066
- description: z52.string().nullable(),
19213
+ description: z53.string().nullable(),
19067
19214
  category: blockCategoryEnum2,
19068
- icon: z52.string().nullable(),
19069
- tags: z52.array(z52.string()).nullable(),
19215
+ icon: z53.string().nullable(),
19216
+ tags: z53.array(z53.string()).nullable(),
19070
19217
  // Use LLM-specific field schema (no z.any() for OpenAI compatibility)
19071
19218
  fields: llmFieldSchema.array().min(1, "Custom blocks must have at least one field"),
19072
19219
  // Use LLM-specific node schema (no z.any() for OpenAI compatibility)
19073
19220
  layout: llmNodeSchema
19074
19221
  });
19075
- var htmlToManifestOutputSchema = z52.object({
19076
- blocks: z52.array(llmCustomBlockSchema).min(1, "At least one block is required").max(10, "Maximum 10 blocks per conversion"),
19077
- themePatch: z52.array(llmThemePatchOpSchema).nullable(),
19078
- customCssRules: z52.array(llmCustomCssRuleSchema).nullable(),
19079
- customCssAtRules: z52.array(llmMediaAtRuleSchema).nullable(),
19222
+ var htmlToManifestOutputSchema = z53.object({
19223
+ blocks: z53.array(llmCustomBlockSchema).min(1, "At least one block is required").max(10, "Maximum 10 blocks per conversion"),
19224
+ themePatch: z53.array(llmThemePatchOpSchema).nullable(),
19225
+ customCssRules: z53.array(llmCustomCssRuleSchema).nullable(),
19226
+ customCssAtRules: z53.array(llmMediaAtRuleSchema).nullable(),
19080
19227
  /**
19081
19228
  * Explanation of fixes made when retrying after validation errors.
19082
19229
  * Should explain what changes were made and why.
19083
19230
  */
19084
- fixRationale: z52.string().nullable()
19231
+ fixRationale: z53.string().nullable()
19085
19232
  });
19086
19233
  function collectValidationErrors(output) {
19087
19234
  const errors = [];
@@ -19916,20 +20063,20 @@ function formatValidationFeedback(errors, output) {
19916
20063
  }
19917
20064
 
19918
20065
  // src/manifest/passes/pass3-styling.ts
19919
- var pass3aOutputSchema = z53.object({
19920
- classNamePatches: z53.array(
19921
- z53.object({
19922
- nodePath: z53.string(),
20066
+ var pass3aOutputSchema = z54.object({
20067
+ classNamePatches: z54.array(
20068
+ z54.object({
20069
+ nodePath: z54.string(),
19923
20070
  // "" for root, "children[0]", "children[0].children[1]" etc.
19924
- className: z53.string().min(1)
20071
+ className: z54.string().min(1)
19925
20072
  })
19926
20073
  ),
19927
- rationale: z53.string()
20074
+ rationale: z54.string()
19928
20075
  });
19929
- var pass3bOutputSchema = z53.object({
19930
- customCssRules: z53.array(llmCustomCssRuleSchema).nullable(),
19931
- customCssAtRules: z53.array(llmMediaAtRuleSchema).nullable(),
19932
- rationale: z53.string()
20076
+ var pass3bOutputSchema = z54.object({
20077
+ customCssRules: z54.array(llmCustomCssRuleSchema).nullable(),
20078
+ customCssAtRules: z54.array(llmMediaAtRuleSchema).nullable(),
20079
+ rationale: z54.string()
19933
20080
  });
19934
20081
  function getNodeAtPath(layout, path2) {
19935
20082
  if (path2 === "" || path2 === "root" || path2 === "layout") {
@@ -20236,38 +20383,38 @@ Do NOT include [data-block=...] in selectors - we add that automatically.
20236
20383
 
20237
20384
  // src/page-converter/passes/pass1-segmentation-matching.ts
20238
20385
  var SIZE_WARNING_BYTES = 100 * 1024;
20239
- var sectionTypeEnum = z54.enum(["header", "content", "footer"]);
20240
- var blockCategoryEnum3 = z54.enum(["marketing", "content", "blog", "media", "layout", "interactive"]);
20241
- var baseSectionSchema = z54.object({
20242
- html: z54.string().min(1),
20243
- purpose: z54.string().min(1),
20386
+ var sectionTypeEnum = z55.enum(["header", "content", "footer"]);
20387
+ var blockCategoryEnum3 = z55.enum(["marketing", "content", "blog", "media", "layout", "interactive"]);
20388
+ var baseSectionSchema = z55.object({
20389
+ html: z55.string().min(1),
20390
+ purpose: z55.string().min(1),
20244
20391
  sectionType: sectionTypeEnum
20245
20392
  });
20246
20393
  var builtinMatchSchema = baseSectionSchema.extend({
20247
- decision: z54.literal("builtin"),
20248
- matchedBlock: z54.string().min(1),
20249
- matchScore: z54.number().min(0).max(100),
20250
- matchRationale: z54.string().min(1)
20394
+ decision: z55.literal("builtin"),
20395
+ matchedBlock: z55.string().min(1),
20396
+ matchScore: z55.number().min(0).max(100),
20397
+ matchRationale: z55.string().min(1)
20251
20398
  });
20252
20399
  var customMatchSchema = baseSectionSchema.extend({
20253
- decision: z54.literal("custom"),
20254
- customBlockSuggestion: z54.object({
20255
- title: z54.string().min(1),
20400
+ decision: z55.literal("custom"),
20401
+ customBlockSuggestion: z55.object({
20402
+ title: z55.string().min(1),
20256
20403
  category: blockCategoryEnum3
20257
20404
  })
20258
20405
  });
20259
- var sectionMatchSchema = z54.discriminatedUnion("decision", [
20406
+ var sectionMatchSchema = z55.discriminatedUnion("decision", [
20260
20407
  builtinMatchSchema,
20261
20408
  customMatchSchema
20262
20409
  ]);
20263
- var skippedContentSchema = z54.object({
20264
- description: z54.string(),
20265
- reason: z54.string()
20410
+ var skippedContentSchema = z55.object({
20411
+ description: z55.string(),
20412
+ reason: z55.string()
20266
20413
  });
20267
- var combinedPassSchema = z54.object({
20268
- sections: z54.array(sectionMatchSchema).min(1),
20269
- skippedContent: z54.array(skippedContentSchema).nullable(),
20270
- rationale: z54.string()
20414
+ var combinedPassSchema = z55.object({
20415
+ sections: z55.array(sectionMatchSchema).min(1),
20416
+ skippedContent: z55.array(skippedContentSchema).nullable(),
20417
+ rationale: z55.string()
20271
20418
  });
20272
20419
  function buildSystemPrompt(availableBlocks, matchThreshold) {
20273
20420
  const blockCatalog = availableBlocks.map((b) => {
@@ -20474,10 +20621,10 @@ async function segmentAndMatchBlocks(html, availableBlocks, ctx) {
20474
20621
  }
20475
20622
 
20476
20623
  // src/page-converter/passes/pass2-population.ts
20477
- import { z as z56 } from "zod";
20624
+ import { z as z57 } from "zod";
20478
20625
 
20479
20626
  // src/manifest/three-pass-converter.ts
20480
- import { z as z55 } from "zod";
20627
+ import { z as z56 } from "zod";
20481
20628
 
20482
20629
  // src/manifest/prompt/theme-summary.ts
20483
20630
  var WEIGHT_MAP = {
@@ -20813,9 +20960,9 @@ function mapPass1FieldToOutputField(field) {
20813
20960
  maxLength: null
20814
20961
  };
20815
20962
  }
20816
- var pass2OutputSchema = z55.object({
20963
+ var pass2OutputSchema = z56.object({
20817
20964
  layout: llmNodeSchema,
20818
- rationale: z55.string().describe("Explain which node binds to which field")
20965
+ rationale: z56.string().describe("Explain which node binds to which field")
20819
20966
  });
20820
20967
  function buildPass2SystemPrompt(fields3, contentTypeApproach) {
20821
20968
  const fieldList = fields3.map((f) => {
@@ -21675,9 +21822,9 @@ async function convertHtmlToManifest(input, options) {
21675
21822
  }
21676
21823
 
21677
21824
  // src/page-converter/passes/pass2-population.ts
21678
- var builtinContentSchema = z56.object({
21679
- content: z56.any(),
21680
- rationale: z56.string()
21825
+ var builtinContentSchema = z57.object({
21826
+ content: z57.any(),
21827
+ rationale: z57.string()
21681
21828
  });
21682
21829
  var SECTION_STYLES_ALLOWED_KEYS = /* @__PURE__ */ new Set(["background", "spacing"]);
21683
21830
  var BOX_STYLES_ALLOWED_KEYS = /* @__PURE__ */ new Set(["background", "spacing", "raised", "rounded", "border", "fullWidth"]);