@riverbankcms/sdk 0.60.3 → 0.60.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_dts/api/src/bookingVerticals.d.ts +1 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +3 -39
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +2 -0
- package/dist/_dts/blocks/src/system/node/fragments/ctaButton.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/shared/themedButtonClass.d.ts +11 -0
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +10 -2
- package/dist/_dts/core/src/participants.d.ts +32 -1
- package/dist/_dts/core/src/rectification.d.ts +79 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +6 -6
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +17 -15
- package/dist/_dts/sdk/src/client/types.d.ts +1 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/personalities/brushed-wash.d.ts +7 -2
- package/dist/_dts/theme-core/src/buttons/personalities/confident-chip.d.ts +7 -2
- package/dist/_dts/theme-core/src/buttons/personalities/editorial-link.d.ts +7 -2
- package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +86 -5
- package/dist/_dts/theme-core/src/buttons/personalities/ink-stamp.d.ts +7 -2
- package/dist/_dts/theme-core/src/buttons/personalities/pebble.d.ts +7 -2
- package/dist/_dts/theme-core/src/buttons/personalities/soft-pill.d.ts +7 -2
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +10 -10
- package/dist/_dts/theme-core/src/palette/variants/brand-led.d.ts +33 -9
- package/dist/_dts/theme-core/src/palette/variants/high-contrast.d.ts +33 -9
- package/dist/_dts/theme-core/src/palette/variants/index.d.ts +200 -4
- package/dist/_dts/theme-core/src/palette/variants/soft-natural.d.ts +33 -9
- package/dist/_dts/theme-core/src/palette/variants/types.d.ts +10 -10
- package/dist/_dts/theme-core/src/palette/variants/warm-neutral.d.ts +33 -9
- package/dist/_dts/theme-core/src/site-styles/curatedChoices.d.ts +27 -0
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +48 -194
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +2 -1
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +12 -14
- package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +46 -0
- package/dist/_dts/ui/src/palette/ColorChooserDialog.d.ts +47 -0
- package/dist/_dts/ui/src/palette/ColorSlotButton.d.ts +15 -0
- package/dist/_dts/ui/src/palette/ColorSwatchButton.d.ts +15 -0
- package/dist/_dts/ui/src/palette/PaletteTokenEditor.d.ts +50 -0
- package/dist/_dts/ui/src/palette/hex.d.ts +23 -0
- package/dist/_dts/ui/src/palette/index.d.ts +14 -0
- package/dist/cli/index.mjs +1023 -923
- package/dist/client/client.mjs +3410 -3221
- package/dist/client/hooks.mjs +1625 -1564
- package/dist/client/rendering/client.mjs +132 -37
- package/dist/client/rendering/islands.mjs +91 -30
- package/dist/client/rendering.mjs +1237 -1049
- package/dist/preview-next/client/runtime.mjs +3095 -2736
- package/dist/server/components.mjs +2381 -2255
- package/dist/server/config-validation.mjs +1625 -1564
- package/dist/server/config.mjs +1625 -1564
- package/dist/server/data.mjs +1625 -1564
- package/dist/server/index.mjs +4 -3
- package/dist/server/next.mjs +3233 -3106
- package/dist/server/page-converter.mjs +1625 -1564
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2381 -2255
- package/dist/server/rendering.mjs +2381 -2255
- package/dist/server/routing.mjs +2340 -2271
- package/dist/server/server.mjs +1629 -1567
- package/dist/server/theme-bridge.mjs +130 -126
- package/dist/server/theme.mjs +131 -129
- package/package.json +1 -1
- package/dist/_dts/theme-core/src/site-styles/compatibility.d.ts +0 -109
package/dist/cli/index.mjs
CHANGED
|
@@ -191,6 +191,7 @@ var init_assertNever = __esm({
|
|
|
191
191
|
// ../core/src/participants.ts
|
|
192
192
|
var init_participants = __esm({
|
|
193
193
|
"../core/src/participants.ts"() {
|
|
194
|
+
init_branded();
|
|
194
195
|
init_result();
|
|
195
196
|
}
|
|
196
197
|
});
|
|
@@ -1530,23 +1531,6 @@ var init_typeGuards = __esm({
|
|
|
1530
1531
|
"../blocks/src/lib/typeGuards.ts"() {
|
|
1531
1532
|
}
|
|
1532
1533
|
});
|
|
1533
|
-
var STYLE_AXIS_VALUES, styleTagsSchema;
|
|
1534
|
-
var init_compatibility = __esm({
|
|
1535
|
-
"../theme-core/src/site-styles/compatibility.ts"() {
|
|
1536
|
-
STYLE_AXIS_VALUES = {
|
|
1537
|
-
tone: ["minimal", "classic", "bold"],
|
|
1538
|
-
energy: ["calm", "vibrant"],
|
|
1539
|
-
motion: ["subtle", "standard", "expressive"],
|
|
1540
|
-
era: ["editorial", "modern", "organic", "technical", "retro"]
|
|
1541
|
-
};
|
|
1542
|
-
styleTagsSchema = z.object({
|
|
1543
|
-
tone: z.enum(STYLE_AXIS_VALUES.tone).optional(),
|
|
1544
|
-
energy: z.enum(STYLE_AXIS_VALUES.energy).optional(),
|
|
1545
|
-
motion: z.enum(STYLE_AXIS_VALUES.motion).optional(),
|
|
1546
|
-
era: z.enum(STYLE_AXIS_VALUES.era).optional()
|
|
1547
|
-
});
|
|
1548
|
-
}
|
|
1549
|
-
});
|
|
1550
1534
|
var VARIANT_ROLES, cornerStyleSchema, shadowSizeSchema, textTransformSchema, fontWeightSchema, buttonTypographySchema, letterSpacingSchema, hoverTransformSchema, hoverColorSchema, buttonPaddingPresetSchema, gradientStyleSchema, gradientSharpnessSchema, prioritySchema, buttonSizeNameSchema, PADDING_TOKEN_PATTERN, paddingShorthandSchema, buttonSizeConfigSchema, buttonSizesSchema, buttonGlobalSettingsSchema, gradientDirectionSchema, buttonBackgroundSchema, effectApplicationSchema, buttonBorderSchema, variantShadowSchema, variantEffectsSchema, variantSizeOverridesSchema, buttonVariantSchema, buttonSystemSchema;
|
|
1551
1535
|
var init_types2 = __esm({
|
|
1552
1536
|
"../theme-core/src/buttons/types.ts"() {
|
|
@@ -1696,136 +1680,21 @@ var init_types2 = __esm({
|
|
|
1696
1680
|
});
|
|
1697
1681
|
}
|
|
1698
1682
|
});
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
"../theme-core/src/buttons/effects/cssUtils.ts"() {
|
|
1715
|
-
}
|
|
1716
|
-
});
|
|
1717
|
-
|
|
1718
|
-
// ../theme-core/src/buttons/effects/presets/shadow.ts
|
|
1719
|
-
var init_shadow = __esm({
|
|
1720
|
-
"../theme-core/src/buttons/effects/presets/shadow.ts"() {
|
|
1721
|
-
init_cssUtils();
|
|
1722
|
-
}
|
|
1723
|
-
});
|
|
1724
|
-
|
|
1725
|
-
// ../theme-core/src/buttons/effects/presets/transform.ts
|
|
1726
|
-
var init_transform = __esm({
|
|
1727
|
-
"../theme-core/src/buttons/effects/presets/transform.ts"() {
|
|
1728
|
-
init_cssUtils();
|
|
1729
|
-
}
|
|
1730
|
-
});
|
|
1731
|
-
|
|
1732
|
-
// ../theme-core/src/buttons/effects/presets/overlay.ts
|
|
1733
|
-
var init_overlay = __esm({
|
|
1734
|
-
"../theme-core/src/buttons/effects/presets/overlay.ts"() {
|
|
1735
|
-
}
|
|
1736
|
-
});
|
|
1737
|
-
|
|
1738
|
-
// ../theme-core/src/buttons/effects/presets/text.ts
|
|
1739
|
-
var init_text = __esm({
|
|
1740
|
-
"../theme-core/src/buttons/effects/presets/text.ts"() {
|
|
1741
|
-
}
|
|
1742
|
-
});
|
|
1743
|
-
|
|
1744
|
-
// ../theme-core/src/buttons/effects/presets/border.ts
|
|
1745
|
-
var init_border = __esm({
|
|
1746
|
-
"../theme-core/src/buttons/effects/presets/border.ts"() {
|
|
1747
|
-
}
|
|
1748
|
-
});
|
|
1749
|
-
|
|
1750
|
-
// ../theme-core/src/buttons/effects/presets/animation.ts
|
|
1751
|
-
var init_animation = __esm({
|
|
1752
|
-
"../theme-core/src/buttons/effects/presets/animation.ts"() {
|
|
1753
|
-
}
|
|
1754
|
-
});
|
|
1755
|
-
|
|
1756
|
-
// ../theme-core/src/interactive/effects/nav-underline.ts
|
|
1757
|
-
var init_nav_underline = __esm({
|
|
1758
|
-
"../theme-core/src/interactive/effects/nav-underline.ts"() {
|
|
1759
|
-
}
|
|
1760
|
-
});
|
|
1761
|
-
|
|
1762
|
-
// ../theme-core/src/interactive/effects/nav-frosted.ts
|
|
1763
|
-
var init_nav_frosted = __esm({
|
|
1764
|
-
"../theme-core/src/interactive/effects/nav-frosted.ts"() {
|
|
1765
|
-
}
|
|
1766
|
-
});
|
|
1767
|
-
|
|
1768
|
-
// ../theme-core/src/interactive/effects/index.ts
|
|
1769
|
-
var init_effects = __esm({
|
|
1770
|
-
"../theme-core/src/interactive/effects/index.ts"() {
|
|
1771
|
-
init_nav_underline();
|
|
1772
|
-
init_nav_frosted();
|
|
1773
|
-
}
|
|
1774
|
-
});
|
|
1775
|
-
|
|
1776
|
-
// ../theme-core/src/buttons/effects/registry.ts
|
|
1777
|
-
var init_registry = __esm({
|
|
1778
|
-
"../theme-core/src/buttons/effects/registry.ts"() {
|
|
1779
|
-
init_background();
|
|
1780
|
-
init_shadow();
|
|
1781
|
-
init_transform();
|
|
1782
|
-
init_overlay();
|
|
1783
|
-
init_text();
|
|
1784
|
-
init_border();
|
|
1785
|
-
init_animation();
|
|
1786
|
-
init_effects();
|
|
1787
|
-
}
|
|
1788
|
-
});
|
|
1789
|
-
|
|
1790
|
-
// ../theme-core/src/interactive/generateEffectsCSS.ts
|
|
1791
|
-
var init_generateEffectsCSS = __esm({
|
|
1792
|
-
"../theme-core/src/interactive/generateEffectsCSS.ts"() {
|
|
1793
|
-
init_registry();
|
|
1794
|
-
}
|
|
1795
|
-
});
|
|
1796
|
-
|
|
1797
|
-
// ../theme-core/src/buttons/constants.ts
|
|
1798
|
-
var init_constants = __esm({
|
|
1799
|
-
"../theme-core/src/buttons/constants.ts"() {
|
|
1800
|
-
}
|
|
1801
|
-
});
|
|
1802
|
-
|
|
1803
|
-
// ../theme-core/src/buttons/utils/contrast.ts
|
|
1804
|
-
var init_contrast = __esm({
|
|
1805
|
-
"../theme-core/src/buttons/utils/contrast.ts"() {
|
|
1806
|
-
}
|
|
1807
|
-
});
|
|
1808
|
-
|
|
1809
|
-
// ../theme-core/src/buttons/generateDefaultButtonSystem.ts
|
|
1810
|
-
var init_generateDefaultButtonSystem = __esm({
|
|
1811
|
-
"../theme-core/src/buttons/generateDefaultButtonSystem.ts"() {
|
|
1812
|
-
init_contrast();
|
|
1813
|
-
}
|
|
1814
|
-
});
|
|
1815
|
-
var init_generateButtonCss = __esm({
|
|
1816
|
-
"../theme-core/src/buttons/generateButtonCss.ts"() {
|
|
1817
|
-
init_types2();
|
|
1818
|
-
init_resolver();
|
|
1819
|
-
init_generateEffectsCSS();
|
|
1820
|
-
init_constants();
|
|
1821
|
-
init_generateDefaultButtonSystem();
|
|
1822
|
-
buttonSizeNameSchema.options;
|
|
1823
|
-
}
|
|
1824
|
-
});
|
|
1825
|
-
|
|
1826
|
-
// ../theme-core/src/buttons/presets.ts
|
|
1827
|
-
var init_presets = __esm({
|
|
1828
|
-
"../theme-core/src/buttons/presets.ts"() {
|
|
1683
|
+
var STYLE_AXIS_VALUES, styleTagsSchema;
|
|
1684
|
+
var init_styleTags = __esm({
|
|
1685
|
+
"../theme-core/src/site-styles/styleTags.ts"() {
|
|
1686
|
+
STYLE_AXIS_VALUES = {
|
|
1687
|
+
tone: ["minimal", "classic", "bold"],
|
|
1688
|
+
energy: ["calm", "vibrant"],
|
|
1689
|
+
motion: ["subtle", "standard", "expressive"],
|
|
1690
|
+
era: ["editorial", "modern", "organic", "technical", "retro"]
|
|
1691
|
+
};
|
|
1692
|
+
styleTagsSchema = z.object({
|
|
1693
|
+
tone: z.enum(STYLE_AXIS_VALUES.tone).optional(),
|
|
1694
|
+
energy: z.enum(STYLE_AXIS_VALUES.energy).optional(),
|
|
1695
|
+
motion: z.enum(STYLE_AXIS_VALUES.motion).optional(),
|
|
1696
|
+
era: z.enum(STYLE_AXIS_VALUES.era).optional()
|
|
1697
|
+
});
|
|
1829
1698
|
}
|
|
1830
1699
|
});
|
|
1831
1700
|
function asButtonPersonalityId(value) {
|
|
@@ -1847,7 +1716,7 @@ var buttonPersonalityIdSchema;
|
|
|
1847
1716
|
var init_types3 = __esm({
|
|
1848
1717
|
"../theme-core/src/buttons/personalities/types.ts"() {
|
|
1849
1718
|
init_types2();
|
|
1850
|
-
|
|
1719
|
+
init_styleTags();
|
|
1851
1720
|
buttonPersonalityIdSchema = z.string().min(1).transform((value) => asButtonPersonalityId(value));
|
|
1852
1721
|
z.object({
|
|
1853
1722
|
id: buttonPersonalityIdSchema,
|
|
@@ -2431,6 +2300,138 @@ var init_personalities = __esm({
|
|
|
2431
2300
|
}
|
|
2432
2301
|
});
|
|
2433
2302
|
|
|
2303
|
+
// ../theme-core/src/tokens/resolver.ts
|
|
2304
|
+
var init_resolver = __esm({
|
|
2305
|
+
"../theme-core/src/tokens/resolver.ts"() {
|
|
2306
|
+
}
|
|
2307
|
+
});
|
|
2308
|
+
|
|
2309
|
+
// ../theme-core/src/buttons/effects/presets/background.ts
|
|
2310
|
+
var init_background = __esm({
|
|
2311
|
+
"../theme-core/src/buttons/effects/presets/background.ts"() {
|
|
2312
|
+
}
|
|
2313
|
+
});
|
|
2314
|
+
|
|
2315
|
+
// ../theme-core/src/buttons/effects/cssUtils.ts
|
|
2316
|
+
var init_cssUtils = __esm({
|
|
2317
|
+
"../theme-core/src/buttons/effects/cssUtils.ts"() {
|
|
2318
|
+
}
|
|
2319
|
+
});
|
|
2320
|
+
|
|
2321
|
+
// ../theme-core/src/buttons/effects/presets/shadow.ts
|
|
2322
|
+
var init_shadow = __esm({
|
|
2323
|
+
"../theme-core/src/buttons/effects/presets/shadow.ts"() {
|
|
2324
|
+
init_cssUtils();
|
|
2325
|
+
}
|
|
2326
|
+
});
|
|
2327
|
+
|
|
2328
|
+
// ../theme-core/src/buttons/effects/presets/transform.ts
|
|
2329
|
+
var init_transform = __esm({
|
|
2330
|
+
"../theme-core/src/buttons/effects/presets/transform.ts"() {
|
|
2331
|
+
init_cssUtils();
|
|
2332
|
+
}
|
|
2333
|
+
});
|
|
2334
|
+
|
|
2335
|
+
// ../theme-core/src/buttons/effects/presets/overlay.ts
|
|
2336
|
+
var init_overlay = __esm({
|
|
2337
|
+
"../theme-core/src/buttons/effects/presets/overlay.ts"() {
|
|
2338
|
+
}
|
|
2339
|
+
});
|
|
2340
|
+
|
|
2341
|
+
// ../theme-core/src/buttons/effects/presets/text.ts
|
|
2342
|
+
var init_text = __esm({
|
|
2343
|
+
"../theme-core/src/buttons/effects/presets/text.ts"() {
|
|
2344
|
+
}
|
|
2345
|
+
});
|
|
2346
|
+
|
|
2347
|
+
// ../theme-core/src/buttons/effects/presets/border.ts
|
|
2348
|
+
var init_border = __esm({
|
|
2349
|
+
"../theme-core/src/buttons/effects/presets/border.ts"() {
|
|
2350
|
+
}
|
|
2351
|
+
});
|
|
2352
|
+
|
|
2353
|
+
// ../theme-core/src/buttons/effects/presets/animation.ts
|
|
2354
|
+
var init_animation = __esm({
|
|
2355
|
+
"../theme-core/src/buttons/effects/presets/animation.ts"() {
|
|
2356
|
+
}
|
|
2357
|
+
});
|
|
2358
|
+
|
|
2359
|
+
// ../theme-core/src/interactive/effects/nav-underline.ts
|
|
2360
|
+
var init_nav_underline = __esm({
|
|
2361
|
+
"../theme-core/src/interactive/effects/nav-underline.ts"() {
|
|
2362
|
+
}
|
|
2363
|
+
});
|
|
2364
|
+
|
|
2365
|
+
// ../theme-core/src/interactive/effects/nav-frosted.ts
|
|
2366
|
+
var init_nav_frosted = __esm({
|
|
2367
|
+
"../theme-core/src/interactive/effects/nav-frosted.ts"() {
|
|
2368
|
+
}
|
|
2369
|
+
});
|
|
2370
|
+
|
|
2371
|
+
// ../theme-core/src/interactive/effects/index.ts
|
|
2372
|
+
var init_effects = __esm({
|
|
2373
|
+
"../theme-core/src/interactive/effects/index.ts"() {
|
|
2374
|
+
init_nav_underline();
|
|
2375
|
+
init_nav_frosted();
|
|
2376
|
+
}
|
|
2377
|
+
});
|
|
2378
|
+
|
|
2379
|
+
// ../theme-core/src/buttons/effects/registry.ts
|
|
2380
|
+
var init_registry = __esm({
|
|
2381
|
+
"../theme-core/src/buttons/effects/registry.ts"() {
|
|
2382
|
+
init_background();
|
|
2383
|
+
init_shadow();
|
|
2384
|
+
init_transform();
|
|
2385
|
+
init_overlay();
|
|
2386
|
+
init_text();
|
|
2387
|
+
init_border();
|
|
2388
|
+
init_animation();
|
|
2389
|
+
init_effects();
|
|
2390
|
+
}
|
|
2391
|
+
});
|
|
2392
|
+
|
|
2393
|
+
// ../theme-core/src/interactive/generateEffectsCSS.ts
|
|
2394
|
+
var init_generateEffectsCSS = __esm({
|
|
2395
|
+
"../theme-core/src/interactive/generateEffectsCSS.ts"() {
|
|
2396
|
+
init_registry();
|
|
2397
|
+
}
|
|
2398
|
+
});
|
|
2399
|
+
|
|
2400
|
+
// ../theme-core/src/buttons/constants.ts
|
|
2401
|
+
var init_constants = __esm({
|
|
2402
|
+
"../theme-core/src/buttons/constants.ts"() {
|
|
2403
|
+
}
|
|
2404
|
+
});
|
|
2405
|
+
|
|
2406
|
+
// ../theme-core/src/buttons/utils/contrast.ts
|
|
2407
|
+
var init_contrast = __esm({
|
|
2408
|
+
"../theme-core/src/buttons/utils/contrast.ts"() {
|
|
2409
|
+
}
|
|
2410
|
+
});
|
|
2411
|
+
|
|
2412
|
+
// ../theme-core/src/buttons/generateDefaultButtonSystem.ts
|
|
2413
|
+
var init_generateDefaultButtonSystem = __esm({
|
|
2414
|
+
"../theme-core/src/buttons/generateDefaultButtonSystem.ts"() {
|
|
2415
|
+
init_contrast();
|
|
2416
|
+
}
|
|
2417
|
+
});
|
|
2418
|
+
var init_generateButtonCss = __esm({
|
|
2419
|
+
"../theme-core/src/buttons/generateButtonCss.ts"() {
|
|
2420
|
+
init_types2();
|
|
2421
|
+
init_resolver();
|
|
2422
|
+
init_generateEffectsCSS();
|
|
2423
|
+
init_constants();
|
|
2424
|
+
init_generateDefaultButtonSystem();
|
|
2425
|
+
buttonSizeNameSchema.options;
|
|
2426
|
+
}
|
|
2427
|
+
});
|
|
2428
|
+
|
|
2429
|
+
// ../theme-core/src/buttons/presets.ts
|
|
2430
|
+
var init_presets = __esm({
|
|
2431
|
+
"../theme-core/src/buttons/presets.ts"() {
|
|
2432
|
+
}
|
|
2433
|
+
});
|
|
2434
|
+
|
|
2434
2435
|
// ../theme-core/src/buttons/effects/types.ts
|
|
2435
2436
|
var init_types4 = __esm({
|
|
2436
2437
|
"../theme-core/src/buttons/effects/types.ts"() {
|
|
@@ -3942,7 +3943,8 @@ function ctaButton(opts) {
|
|
|
3942
3943
|
},
|
|
3943
3944
|
size: {
|
|
3944
3945
|
$bind: {
|
|
3945
|
-
from: sizePath
|
|
3946
|
+
from: sizePath,
|
|
3947
|
+
fallback: opts?.sizeFallback ?? "md"
|
|
3946
3948
|
}
|
|
3947
3949
|
},
|
|
3948
3950
|
...opts?.className ? { className: opts.className } : {},
|
|
@@ -21121,35 +21123,61 @@ function buildFieldSchema(field, allowNull, allowIncomplete = false) {
|
|
|
21121
21123
|
}
|
|
21122
21124
|
return finalizeSchema(schema, required, allowNull, allowIncomplete);
|
|
21123
21125
|
}
|
|
21126
|
+
function buildFriendlyStringSchema(field) {
|
|
21127
|
+
return z.string({
|
|
21128
|
+
error: (issue) => issue.input === void 0 || issue.input === null ? "This field is required" : `${field.label} needs text`
|
|
21129
|
+
});
|
|
21130
|
+
}
|
|
21124
21131
|
function buildTextSchema(field) {
|
|
21125
21132
|
const ui = field.ui ?? {};
|
|
21126
21133
|
const inputType = ui?.inputType;
|
|
21127
21134
|
let schema;
|
|
21128
21135
|
if (inputType === "number") {
|
|
21129
|
-
schema = z.coerce.number(
|
|
21130
|
-
|
|
21131
|
-
|
|
21136
|
+
schema = z.coerce.number({
|
|
21137
|
+
error: (issue) => issue.input === void 0 ? `${field.label} is required` : `${field.label} needs a number`
|
|
21138
|
+
});
|
|
21139
|
+
if (typeof ui?.min === "number") {
|
|
21140
|
+
schema = schema.min(
|
|
21141
|
+
ui.min,
|
|
21142
|
+
`${field.label} must be ${ui.min} or more`
|
|
21143
|
+
);
|
|
21144
|
+
}
|
|
21145
|
+
if (typeof ui?.max === "number") {
|
|
21146
|
+
schema = schema.max(
|
|
21147
|
+
ui.max,
|
|
21148
|
+
`${field.label} must be ${ui.max} or less`
|
|
21149
|
+
);
|
|
21150
|
+
}
|
|
21132
21151
|
} else {
|
|
21133
|
-
schema =
|
|
21152
|
+
schema = buildFriendlyStringSchema(field);
|
|
21134
21153
|
if (inputType === "email") {
|
|
21135
|
-
schema = schema.email(
|
|
21154
|
+
schema = schema.email("Enter a valid email address");
|
|
21136
21155
|
}
|
|
21137
21156
|
if (inputType === "tel") {
|
|
21138
21157
|
const TEL_RE = /^[+()0-9\s\-]{3,}$/;
|
|
21139
|
-
schema = schema.regex(
|
|
21158
|
+
schema = schema.regex(
|
|
21159
|
+
TEL_RE,
|
|
21160
|
+
"Enter a valid phone number"
|
|
21161
|
+
);
|
|
21140
21162
|
}
|
|
21141
21163
|
if (ui?.pattern) {
|
|
21142
21164
|
try {
|
|
21143
21165
|
const re = new RegExp(ui.pattern);
|
|
21144
|
-
schema = schema.regex(
|
|
21166
|
+
schema = schema.regex(
|
|
21167
|
+
re,
|
|
21168
|
+
`${field.label} is not in the right format`
|
|
21169
|
+
);
|
|
21145
21170
|
} catch {
|
|
21146
21171
|
}
|
|
21147
21172
|
}
|
|
21148
21173
|
if (field.maxLength) {
|
|
21149
|
-
schema = schema.max(
|
|
21174
|
+
schema = schema.max(
|
|
21175
|
+
field.maxLength,
|
|
21176
|
+
`${field.label} must be ${field.maxLength} characters or less`
|
|
21177
|
+
);
|
|
21150
21178
|
}
|
|
21151
21179
|
if (field.required) {
|
|
21152
|
-
schema = schema.min(1, `${field.label} is required`).refine((v) => v.trim().length > 0, { message: `${field.label} is required` });
|
|
21180
|
+
schema = schema.min(1, { message: `${field.label} is required` }).refine((v) => v.trim().length > 0, { message: `${field.label} is required` });
|
|
21153
21181
|
}
|
|
21154
21182
|
}
|
|
21155
21183
|
return schema;
|
|
@@ -21159,19 +21187,22 @@ function buildRichTextSchema2() {
|
|
|
21159
21187
|
}
|
|
21160
21188
|
var SLUG_PATTERN = /^(?:[a-z0-9]+(?:-[a-z0-9]+)*)(?:\/(?:[a-z0-9]+(?:-[a-z0-9]+)*))*$/;
|
|
21161
21189
|
function buildSlugSchema(field) {
|
|
21162
|
-
const message = `${field.label}
|
|
21163
|
-
let schema =
|
|
21190
|
+
const message = `${field.label} can only use lowercase letters, numbers, and dashes`;
|
|
21191
|
+
let schema = buildFriendlyStringSchema(field).regex(SLUG_PATTERN, message);
|
|
21164
21192
|
if (field.maxLength) {
|
|
21165
|
-
schema = schema.max(
|
|
21193
|
+
schema = schema.max(
|
|
21194
|
+
field.maxLength,
|
|
21195
|
+
`${field.label} must be ${field.maxLength} characters or less`
|
|
21196
|
+
);
|
|
21166
21197
|
}
|
|
21167
21198
|
if (field.required) {
|
|
21168
|
-
schema = schema.min(1, `${field.label} is required`);
|
|
21199
|
+
schema = schema.min(1, { message: `${field.label} is required` });
|
|
21169
21200
|
}
|
|
21170
21201
|
return schema;
|
|
21171
21202
|
}
|
|
21172
21203
|
var ALLOWED_URL_PROTOCOLS = ["http:", "https:"];
|
|
21173
21204
|
function buildUrlSchema(field) {
|
|
21174
|
-
const message =
|
|
21205
|
+
const message = "Enter a valid web address";
|
|
21175
21206
|
const validate = (value) => {
|
|
21176
21207
|
if (!value) {
|
|
21177
21208
|
return !field.required;
|
|
@@ -21181,14 +21212,16 @@ function buildUrlSchema(field) {
|
|
|
21181
21212
|
}
|
|
21182
21213
|
try {
|
|
21183
21214
|
const parsed = new URL(value);
|
|
21184
|
-
return ALLOWED_URL_PROTOCOLS.includes(
|
|
21215
|
+
return ALLOWED_URL_PROTOCOLS.includes(
|
|
21216
|
+
parsed.protocol
|
|
21217
|
+
);
|
|
21185
21218
|
} catch {
|
|
21186
21219
|
return false;
|
|
21187
21220
|
}
|
|
21188
21221
|
};
|
|
21189
|
-
let schema =
|
|
21222
|
+
let schema = buildFriendlyStringSchema(field).trim().refine(validate, message);
|
|
21190
21223
|
if (field.required) {
|
|
21191
|
-
schema = schema.min(1, `${field.label} is required`);
|
|
21224
|
+
schema = schema.min(1, { message: `${field.label} is required` });
|
|
21192
21225
|
}
|
|
21193
21226
|
return schema;
|
|
21194
21227
|
}
|
|
@@ -21241,10 +21274,13 @@ function buildSelectSchema(field) {
|
|
|
21241
21274
|
switch (source.kind) {
|
|
21242
21275
|
case "sdk":
|
|
21243
21276
|
case "site":
|
|
21244
|
-
return
|
|
21277
|
+
return buildFriendlyStringSchema(field);
|
|
21245
21278
|
case "static": {
|
|
21246
21279
|
const values = field.options.map((option) => option.value);
|
|
21247
|
-
return
|
|
21280
|
+
return buildFriendlyStringSchema(field).refine(
|
|
21281
|
+
(value) => values.includes(value),
|
|
21282
|
+
`Choose one of the available options for ${field.label}`
|
|
21283
|
+
);
|
|
21248
21284
|
}
|
|
21249
21285
|
default:
|
|
21250
21286
|
return assertNeverSelectSource2(source);
|
|
@@ -21252,14 +21288,16 @@ function buildSelectSchema(field) {
|
|
|
21252
21288
|
})();
|
|
21253
21289
|
if (field.multiple) {
|
|
21254
21290
|
const arraySchema = z.array(singleValueSchema);
|
|
21255
|
-
return field.required ? arraySchema : arraySchema.nullable();
|
|
21291
|
+
return field.required ? arraySchema.min(1, { message: "This field is required" }) : arraySchema.nullable();
|
|
21256
21292
|
}
|
|
21257
21293
|
return field.required ? singleValueSchema : singleValueSchema.nullable();
|
|
21258
21294
|
}
|
|
21259
21295
|
function buildReferenceSchema(field) {
|
|
21260
|
-
let schema = z.string(
|
|
21296
|
+
let schema = z.string({
|
|
21297
|
+
error: (issue) => issue.input === void 0 || issue.input === null ? "This field is required" : `${field.label} needs text`
|
|
21298
|
+
});
|
|
21261
21299
|
if (field.required) {
|
|
21262
|
-
schema = schema.min(1, `${field.label} is required`);
|
|
21300
|
+
schema = schema.min(1, { message: `${field.label} is required` });
|
|
21263
21301
|
}
|
|
21264
21302
|
return schema;
|
|
21265
21303
|
}
|
|
@@ -21607,755 +21645,185 @@ function assertUniqueLayoutProfileKeys(profiles) {
|
|
|
21607
21645
|
}
|
|
21608
21646
|
}
|
|
21609
21647
|
|
|
21610
|
-
// ../theme-core/src/site-styles/
|
|
21611
|
-
|
|
21648
|
+
// ../theme-core/src/site-styles/curatedSiteStyles.ts
|
|
21649
|
+
init_personalities();
|
|
21612
21650
|
|
|
21613
|
-
// ../theme-core/src/
|
|
21614
|
-
|
|
21615
|
-
|
|
21616
|
-
|
|
21617
|
-
|
|
21618
|
-
|
|
21619
|
-
|
|
21620
|
-
var
|
|
21621
|
-
|
|
21622
|
-
|
|
21623
|
-
|
|
21624
|
-
|
|
21625
|
-
|
|
21626
|
-
|
|
21627
|
-
|
|
21628
|
-
|
|
21629
|
-
|
|
21630
|
-
|
|
21631
|
-
|
|
21632
|
-
|
|
21633
|
-
|
|
21634
|
-
|
|
21635
|
-
|
|
21636
|
-
|
|
21637
|
-
|
|
21638
|
-
|
|
21639
|
-
|
|
21640
|
-
|
|
21641
|
-
|
|
21642
|
-
|
|
21643
|
-
|
|
21644
|
-
|
|
21645
|
-
|
|
21651
|
+
// ../theme-core/src/palette/variants/types.ts
|
|
21652
|
+
init_styleTags();
|
|
21653
|
+
var hotspotSchema = z42.object({
|
|
21654
|
+
x: z42.number().min(0).max(1),
|
|
21655
|
+
y: z42.number().min(0).max(1),
|
|
21656
|
+
radius: z42.number().optional()
|
|
21657
|
+
});
|
|
21658
|
+
var rotationSchema = z42.union([z42.literal(0), z42.literal(90), z42.literal(180), z42.literal(270)]);
|
|
21659
|
+
var rectSchema = z42.tuple([z42.number(), z42.number(), z42.number(), z42.number()]);
|
|
21660
|
+
var aspectCropSchema = z42.object({
|
|
21661
|
+
aspect: z42.preprocess((value) => value == null ? void 0 : value, z42.string().optional()),
|
|
21662
|
+
rect: z42.preprocess((value) => value == null ? void 0 : value, rectSchema.optional()),
|
|
21663
|
+
hotspot: z42.preprocess((value) => value == null ? void 0 : value, hotspotSchema.optional()),
|
|
21664
|
+
rotation: z42.preprocess((value) => value == null ? void 0 : value, rotationSchema.optional())
|
|
21665
|
+
});
|
|
21666
|
+
var transformSchema = z42.object({
|
|
21667
|
+
aspectCrops: z42.preprocess((value) => {
|
|
21668
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
21669
|
+
return void 0;
|
|
21670
|
+
}
|
|
21671
|
+
return value;
|
|
21672
|
+
}, z42.record(z42.string(), aspectCropSchema.catch({}))).optional(),
|
|
21673
|
+
rect: rectSchema.optional(),
|
|
21674
|
+
hotspot: hotspotSchema.optional(),
|
|
21675
|
+
rotation: rotationSchema.optional()
|
|
21676
|
+
});
|
|
21677
|
+
var mediaSchema = z42.object({
|
|
21678
|
+
type: z42.enum(["image", "video", "audio", "document", "spreadsheet", "archive"]),
|
|
21679
|
+
purpose: z42.string().optional(),
|
|
21680
|
+
placeholder: z42.boolean().default(true).optional(),
|
|
21681
|
+
assetId: z42.string().optional(),
|
|
21682
|
+
identifier: z42.string().optional(),
|
|
21683
|
+
src: z42.string().optional(),
|
|
21684
|
+
alt: z42.string().optional(),
|
|
21685
|
+
filename: z42.string().optional(),
|
|
21686
|
+
mimeType: z42.string().optional(),
|
|
21687
|
+
width: z42.number().optional(),
|
|
21688
|
+
height: z42.number().optional(),
|
|
21689
|
+
storageBucket: z42.string().optional(),
|
|
21690
|
+
storagePath: z42.string().optional(),
|
|
21691
|
+
transform: transformSchema.optional()
|
|
21692
|
+
});
|
|
21646
21693
|
|
|
21647
|
-
// ../theme-core/src/
|
|
21648
|
-
|
|
21649
|
-
|
|
21650
|
-
|
|
21651
|
-
|
|
21652
|
-
|
|
21653
|
-
|
|
21654
|
-
|
|
21655
|
-
|
|
21656
|
-
|
|
21657
|
-
|
|
21658
|
-
var quietBudget = {
|
|
21659
|
-
accentDensity: "low",
|
|
21660
|
-
panelDensity: "medium",
|
|
21661
|
-
transitionMix: "quiet",
|
|
21662
|
-
primaryCtaLimit: 2,
|
|
21663
|
-
mediaDensity: "medium",
|
|
21664
|
-
decorativeRepetition: "low"
|
|
21665
|
-
};
|
|
21666
|
-
var balancedBudget = {
|
|
21667
|
-
accentDensity: "medium",
|
|
21668
|
-
panelDensity: "medium",
|
|
21669
|
-
transitionMix: "balanced",
|
|
21670
|
-
primaryCtaLimit: 3,
|
|
21671
|
-
mediaDensity: "medium",
|
|
21672
|
-
decorativeRepetition: "medium"
|
|
21673
|
-
};
|
|
21674
|
-
var expressiveBudget = {
|
|
21675
|
-
accentDensity: "high",
|
|
21676
|
-
panelDensity: "high",
|
|
21677
|
-
transitionMix: "expressive",
|
|
21678
|
-
primaryCtaLimit: 3,
|
|
21679
|
-
mediaDensity: "high",
|
|
21680
|
-
decorativeRepetition: "medium"
|
|
21681
|
-
};
|
|
21682
|
-
function uniqueContentFrameKinds() {
|
|
21683
|
-
const kinds = [...new Set(
|
|
21684
|
-
generatedDesignOptionCatalog.contentFrames.map((frame) => frame.kind)
|
|
21685
|
-
)];
|
|
21686
|
-
const firstKind = kinds[0];
|
|
21687
|
-
if (!firstKind) {
|
|
21688
|
-
throw new Error("Expected generated design option catalog to expose at least one content frame kind.");
|
|
21689
|
-
}
|
|
21690
|
-
return [firstKind, ...kinds.slice(1)];
|
|
21691
|
-
}
|
|
21692
|
-
var generatedContentFrameKinds = uniqueContentFrameKinds();
|
|
21693
|
-
function defineCuratedSiteStyle(input) {
|
|
21694
|
-
return {
|
|
21695
|
-
id: asSiteStyleId(input.id),
|
|
21696
|
-
name: input.name,
|
|
21697
|
-
description: input.description,
|
|
21698
|
-
generationBrief: input.generationBrief,
|
|
21699
|
-
selectionKeywords: input.selectionKeywords ?? [],
|
|
21700
|
-
template: {
|
|
21701
|
-
id: asDesignSystemTemplateId(`template:${input.id.replace("site-style:", "")}`),
|
|
21702
|
-
name: input.name,
|
|
21703
|
-
version: 1,
|
|
21704
|
-
tokenRecipes: input.tokenRecipes,
|
|
21705
|
-
compositionBudget: input.compositionBudget,
|
|
21706
|
-
supportedSectionSurfaces: generatedDesignOptionCatalog.sectionSurfaces,
|
|
21707
|
-
supportedContentFrames: generatedContentFrameKinds,
|
|
21708
|
-
supportedItemSurfaces: generatedDesignOptionCatalog.itemSurfaces,
|
|
21709
|
-
supportedTransitions: generatedDesignOptionCatalog.transitions
|
|
21710
|
-
},
|
|
21711
|
-
// The library IDs are already branded at construction (`asButtonPersonalityId`
|
|
21712
|
-
// / `asPaletteVariantId`); the closed-union input type guarantees only
|
|
21713
|
-
// shipped IDs reach this branch.
|
|
21714
|
-
defaultButtonPersonalityId: input.defaultButtonPersonalityId,
|
|
21715
|
-
acceptedButtons: input.acceptedButtons,
|
|
21716
|
-
defaultPaletteVariantId: input.defaultPaletteVariantId,
|
|
21717
|
-
acceptedPalettes: input.acceptedPalettes
|
|
21718
|
-
};
|
|
21719
|
-
}
|
|
21720
|
-
var curatedSiteStyles = [
|
|
21721
|
-
defineCuratedSiteStyle({
|
|
21722
|
-
id: "site-style:calm-studio",
|
|
21723
|
-
name: "Calm Studio",
|
|
21724
|
-
description: "Soft, measured, and spacious for intimate appointment or class businesses.",
|
|
21725
|
-
generationBrief: "Use calm pacing, concise copy, generous breathing room, and natural imagery. Keep calls to action steady rather than urgent.",
|
|
21726
|
-
tokenRecipes: {
|
|
21727
|
-
palette: "soft-natural",
|
|
21728
|
-
contrast: "standard",
|
|
21729
|
-
radius: "soft",
|
|
21730
|
-
shadow: "subtle",
|
|
21731
|
-
typography: "friendly-sans",
|
|
21732
|
-
spacing: "airy",
|
|
21733
|
-
motion: "subtle"
|
|
21734
|
-
},
|
|
21735
|
-
compositionBudget: quietBudget,
|
|
21736
|
-
defaultButtonPersonalityId: "soft-pill",
|
|
21737
|
-
acceptedButtons: { tone: ["minimal", "classic"], era: ["organic", "editorial"] },
|
|
21738
|
-
defaultPaletteVariantId: "soft-natural-sage",
|
|
21739
|
-
acceptedPalettes: { tone: ["minimal", "classic"], era: ["organic"] }
|
|
21740
|
-
}),
|
|
21741
|
-
defineCuratedSiteStyle({
|
|
21742
|
-
id: "site-style:clear-professional",
|
|
21743
|
-
name: "Clear Professional",
|
|
21744
|
-
description: "Crisp, trustworthy, and direct for local services and consultancies.",
|
|
21745
|
-
generationBrief: "Prioritize clarity, proof, service detail, and easy next steps. Keep visuals polished and specific, with restrained decorative treatment.",
|
|
21746
|
-
tokenRecipes: {
|
|
21747
|
-
palette: "brand-led",
|
|
21748
|
-
contrast: "strong",
|
|
21749
|
-
radius: "soft",
|
|
21750
|
-
shadow: "subtle",
|
|
21751
|
-
typography: "clean-sans",
|
|
21752
|
-
spacing: "regular",
|
|
21753
|
-
motion: "subtle"
|
|
21754
|
-
},
|
|
21755
|
-
compositionBudget: balancedBudget,
|
|
21756
|
-
defaultButtonPersonalityId: "confident-chip",
|
|
21757
|
-
acceptedButtons: { tone: ["minimal", "classic"], era: ["modern", "editorial"] },
|
|
21758
|
-
defaultPaletteVariantId: "brand-led-cool",
|
|
21759
|
-
acceptedPalettes: { tone: ["minimal", "classic"], era: ["modern", "editorial"] }
|
|
21760
|
-
}),
|
|
21761
|
-
defineCuratedSiteStyle({
|
|
21762
|
-
id: "site-style:warm-editorial",
|
|
21763
|
-
name: "Warm Editorial",
|
|
21764
|
-
description: "Story-led and textured for educators, makers, venues, and retreats.",
|
|
21765
|
-
generationBrief: "Let the copy feel thoughtful and grounded. Favor narrative sections, supporting media, and a small number of editorial panels.",
|
|
21766
|
-
tokenRecipes: {
|
|
21767
|
-
palette: "warm-neutral",
|
|
21768
|
-
contrast: "standard",
|
|
21769
|
-
radius: "square",
|
|
21770
|
-
shadow: "none",
|
|
21771
|
-
typography: "serif-editorial",
|
|
21772
|
-
spacing: "airy",
|
|
21773
|
-
motion: "subtle"
|
|
21774
|
-
},
|
|
21775
|
-
compositionBudget: balancedBudget,
|
|
21776
|
-
defaultButtonPersonalityId: "editorial-link",
|
|
21777
|
-
acceptedButtons: { tone: ["minimal", "classic"], era: ["editorial", "organic"] },
|
|
21778
|
-
defaultPaletteVariantId: "warm-neutral-cream",
|
|
21779
|
-
acceptedPalettes: { tone: ["minimal", "classic"], era: ["editorial", "organic"] }
|
|
21780
|
-
}),
|
|
21781
|
-
defineCuratedSiteStyle({
|
|
21782
|
-
id: "site-style:bright-community",
|
|
21783
|
-
name: "Bright Community",
|
|
21784
|
-
description: "Friendly, welcoming, and active for groups, classes, and neighborhood offers.",
|
|
21785
|
-
generationBrief: "Use welcoming language, clear event or booking routes, and optimistic imagery. Let accents appear, but avoid noisy decoration.",
|
|
21786
|
-
tokenRecipes: {
|
|
21787
|
-
palette: "brand-led",
|
|
21788
|
-
contrast: "standard",
|
|
21789
|
-
radius: "rounded",
|
|
21790
|
-
shadow: "subtle",
|
|
21791
|
-
typography: "friendly-sans",
|
|
21792
|
-
spacing: "regular",
|
|
21793
|
-
motion: "expressive"
|
|
21794
|
-
},
|
|
21795
|
-
compositionBudget: balancedBudget,
|
|
21796
|
-
defaultButtonPersonalityId: "pebble",
|
|
21797
|
-
acceptedButtons: { tone: ["classic", "bold"], era: ["organic", "modern"] },
|
|
21798
|
-
defaultPaletteVariantId: "brand-led-warm",
|
|
21799
|
-
acceptedPalettes: { tone: ["classic", "bold"], era: ["modern", "organic"] }
|
|
21800
|
-
}),
|
|
21801
|
-
defineCuratedSiteStyle({
|
|
21802
|
-
id: "site-style:quiet-luxury",
|
|
21803
|
-
name: "Quiet Luxury",
|
|
21804
|
-
description: "Minimal, confident, and refined for premium experiences and private services.",
|
|
21805
|
-
generationBrief: "Use fewer claims, more specificity, and restrained sensory detail. Favor elegant media and low repetition over dense panels.",
|
|
21806
|
-
selectionKeywords: [
|
|
21807
|
-
"luxury",
|
|
21808
|
-
"premium",
|
|
21809
|
-
"boutique",
|
|
21810
|
-
"bespoke",
|
|
21811
|
-
"exclusive"
|
|
21812
|
-
],
|
|
21813
|
-
tokenRecipes: {
|
|
21814
|
-
palette: "high-contrast",
|
|
21815
|
-
contrast: "strong",
|
|
21816
|
-
radius: "square",
|
|
21817
|
-
shadow: "none",
|
|
21818
|
-
typography: "classic-serif",
|
|
21819
|
-
spacing: "airy",
|
|
21820
|
-
motion: "none"
|
|
21821
|
-
},
|
|
21822
|
-
compositionBudget: quietBudget,
|
|
21823
|
-
defaultButtonPersonalityId: "editorial-link",
|
|
21824
|
-
acceptedButtons: { tone: ["minimal", "classic"], era: ["editorial", "organic"] },
|
|
21825
|
-
defaultPaletteVariantId: "high-contrast-charcoal",
|
|
21826
|
-
acceptedPalettes: { tone: ["minimal", "classic"], era: ["editorial", "organic"] }
|
|
21827
|
-
}),
|
|
21828
|
-
defineCuratedSiteStyle({
|
|
21829
|
-
id: "site-style:practical-services",
|
|
21830
|
-
name: "Practical Services",
|
|
21831
|
-
description: "Efficient, plainspoken, and conversion-focused for trades and everyday services.",
|
|
21832
|
-
generationBrief: "Make services, location, trust signals, and contact paths obvious. Keep copy brief and avoid ornate visual treatments.",
|
|
21833
|
-
selectionKeywords: [
|
|
21834
|
-
"repair",
|
|
21835
|
-
"plumb",
|
|
21836
|
-
"electric",
|
|
21837
|
-
"cleaning",
|
|
21838
|
-
"landscap",
|
|
21839
|
-
"contractor"
|
|
21840
|
-
],
|
|
21841
|
-
tokenRecipes: {
|
|
21842
|
-
palette: "brand-led",
|
|
21843
|
-
contrast: "maximum",
|
|
21844
|
-
radius: "soft",
|
|
21845
|
-
shadow: "subtle",
|
|
21846
|
-
typography: "clean-sans",
|
|
21847
|
-
spacing: "compact",
|
|
21848
|
-
motion: "none"
|
|
21849
|
-
},
|
|
21850
|
-
compositionBudget: quietBudget,
|
|
21851
|
-
defaultButtonPersonalityId: "confident-chip",
|
|
21852
|
-
acceptedButtons: { tone: ["minimal", "classic", "bold"], era: ["modern", "editorial"] },
|
|
21853
|
-
defaultPaletteVariantId: "brand-led-cool",
|
|
21854
|
-
acceptedPalettes: { tone: ["minimal", "classic", "bold"], era: ["modern", "editorial"] }
|
|
21855
|
-
}),
|
|
21856
|
-
defineCuratedSiteStyle({
|
|
21857
|
-
id: "site-style:modern-wellness",
|
|
21858
|
-
name: "Modern Wellness",
|
|
21859
|
-
description: "Natural, current, and reassuring for practitioners, studios, and wellbeing offers.",
|
|
21860
|
-
generationBrief: "Keep the tone warm and practical. Use gentle section variation, natural materials, and inclusive copy without making medical claims.",
|
|
21861
|
-
tokenRecipes: {
|
|
21862
|
-
palette: "soft-natural",
|
|
21863
|
-
contrast: "standard",
|
|
21864
|
-
radius: "rounded",
|
|
21865
|
-
shadow: "subtle",
|
|
21866
|
-
typography: "clean-sans",
|
|
21867
|
-
spacing: "airy",
|
|
21868
|
-
motion: "subtle"
|
|
21869
|
-
},
|
|
21870
|
-
compositionBudget: balancedBudget,
|
|
21871
|
-
defaultButtonPersonalityId: "soft-pill",
|
|
21872
|
-
acceptedButtons: { tone: ["minimal", "classic"], era: ["organic", "modern"] },
|
|
21873
|
-
defaultPaletteVariantId: "soft-natural-sage",
|
|
21874
|
-
acceptedPalettes: { tone: ["minimal", "classic"], era: ["organic"] }
|
|
21694
|
+
// ../theme-core/src/schema.ts
|
|
21695
|
+
init_buttons();
|
|
21696
|
+
var cardSpacingSchema = z.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]);
|
|
21697
|
+
var gradientDirectionSchema2 = z.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
|
|
21698
|
+
var cardBackgroundSchema = z.discriminatedUnion("type", [
|
|
21699
|
+
z.object({ type: z.literal("solid"), colorToken: z.string() }),
|
|
21700
|
+
z.object({
|
|
21701
|
+
type: z.literal("gradient"),
|
|
21702
|
+
fromToken: z.string(),
|
|
21703
|
+
toToken: z.string(),
|
|
21704
|
+
direction: gradientDirectionSchema2
|
|
21875
21705
|
}),
|
|
21876
|
-
|
|
21877
|
-
|
|
21878
|
-
|
|
21879
|
-
|
|
21880
|
-
|
|
21881
|
-
|
|
21882
|
-
|
|
21883
|
-
|
|
21884
|
-
|
|
21885
|
-
|
|
21886
|
-
|
|
21887
|
-
|
|
21888
|
-
|
|
21889
|
-
|
|
21890
|
-
|
|
21891
|
-
|
|
21892
|
-
|
|
21893
|
-
|
|
21894
|
-
|
|
21895
|
-
|
|
21896
|
-
|
|
21897
|
-
|
|
21898
|
-
|
|
21899
|
-
|
|
21900
|
-
|
|
21901
|
-
|
|
21902
|
-
|
|
21903
|
-
})
|
|
21904
|
-
];
|
|
21905
|
-
new Map(
|
|
21906
|
-
curatedSiteStyles.map((style) => [style.id, style])
|
|
21907
|
-
);
|
|
21706
|
+
z.object({ type: z.literal("transparent") })
|
|
21707
|
+
]);
|
|
21708
|
+
var cardBorderSchema = z.object({
|
|
21709
|
+
widthClass: z.string(),
|
|
21710
|
+
colorToken: z.string()
|
|
21711
|
+
});
|
|
21712
|
+
var cardVariantSchema = z.object({
|
|
21713
|
+
id: z.string(),
|
|
21714
|
+
name: z.string().min(1).max(20),
|
|
21715
|
+
enabled: z.boolean(),
|
|
21716
|
+
priority: z.union([z.literal(1), z.literal(2), z.literal(3)]),
|
|
21717
|
+
// Appearance (token-based)
|
|
21718
|
+
background: cardBackgroundSchema,
|
|
21719
|
+
spacing: cardSpacingSchema,
|
|
21720
|
+
// Optional overrides (uses theme defaults if not specified)
|
|
21721
|
+
shadow: z.object({
|
|
21722
|
+
elevation: z.enum(["none", "low", "medium", "high"]),
|
|
21723
|
+
softness: z.enum(["crisp", "soft", "hard"]).nullable(),
|
|
21724
|
+
position: z.enum(["bottom", "bottom-right"]).default("bottom")
|
|
21725
|
+
}).optional(),
|
|
21726
|
+
corners: z.enum(["square", "soft", "rounded", "pill"]).optional(),
|
|
21727
|
+
// Border (optional)
|
|
21728
|
+
border: cardBorderSchema.optional()
|
|
21729
|
+
});
|
|
21730
|
+
var cardSystemSchema = z.object({
|
|
21731
|
+
variants: z.array(cardVariantSchema).min(1).max(3)
|
|
21732
|
+
});
|
|
21908
21733
|
|
|
21909
|
-
// ../theme-core/src/
|
|
21910
|
-
|
|
21911
|
-
|
|
21912
|
-
|
|
21913
|
-
"_containerStyles",
|
|
21914
|
-
"_cardStyles",
|
|
21915
|
-
// styleGroup is legacy runtime transition wiring rather than a nested
|
|
21916
|
-
// override object, but normal editors should still never see it directly.
|
|
21917
|
-
"styleGroup"
|
|
21918
|
-
];
|
|
21919
|
-
var themeV2BlockSpecificRawStyleFieldNames = [
|
|
21920
|
-
"_contentCardStyles",
|
|
21921
|
-
"_textCardStyles"
|
|
21922
|
-
];
|
|
21923
|
-
var themeV2NormalEditorRawStyleFieldNames = [
|
|
21924
|
-
...themeV2RuntimeStyleFieldNames,
|
|
21925
|
-
...themeV2BlockSpecificRawStyleFieldNames
|
|
21926
|
-
];
|
|
21927
|
-
new Set(
|
|
21928
|
-
themeV2NormalEditorRawStyleFieldNames
|
|
21929
|
-
);
|
|
21734
|
+
// ../theme-core/src/cards/index.ts
|
|
21735
|
+
init_constants2();
|
|
21736
|
+
init_generateCardCss();
|
|
21737
|
+
init_generateDefaultCardSystem();
|
|
21930
21738
|
|
|
21931
|
-
// ../theme-core/src/
|
|
21932
|
-
|
|
21933
|
-
|
|
21934
|
-
var
|
|
21935
|
-
|
|
21936
|
-
|
|
21937
|
-
|
|
21938
|
-
|
|
21939
|
-
|
|
21739
|
+
// ../theme-core/src/schema.ts
|
|
21740
|
+
init_types5();
|
|
21741
|
+
init_types6();
|
|
21742
|
+
var gradientStopSchema = z.object({
|
|
21743
|
+
color: z.string(),
|
|
21744
|
+
// Theme color token name (e.g., 'primary-500')
|
|
21745
|
+
position: z.number().min(0).max(100)
|
|
21746
|
+
// Percentage 0-100
|
|
21747
|
+
});
|
|
21748
|
+
var gradientConfigSchema = z.object({
|
|
21749
|
+
type: z.enum(["linear", "radial"]),
|
|
21750
|
+
angle: z.number().min(0).max(360).optional(),
|
|
21751
|
+
// For linear gradients (degrees)
|
|
21752
|
+
position: z.string().optional(),
|
|
21753
|
+
// For radial gradients ('center', 'top left', etc.)
|
|
21754
|
+
stops: z.array(gradientStopSchema).min(2)
|
|
21755
|
+
});
|
|
21756
|
+
|
|
21757
|
+
// ../theme-core/src/schema.ts
|
|
21758
|
+
init_types7();
|
|
21759
|
+
init_validation();
|
|
21760
|
+
init_atRuleValidation();
|
|
21761
|
+
init_shared();
|
|
21762
|
+
var axesSchema = z.object({
|
|
21763
|
+
tone: z.enum(["minimal", "classic", "bold"]),
|
|
21764
|
+
energy: z.enum(["calm", "vibrant"]),
|
|
21765
|
+
density: z.enum(["airy", "regular", "compact"]),
|
|
21766
|
+
mediaBias: z.enum(["text", "media", "mixed"]),
|
|
21767
|
+
conversionBias: z.enum(["low", "med", "high"]),
|
|
21768
|
+
motion: z.enum(["subtle", "standard", "expressive"])
|
|
21769
|
+
});
|
|
21770
|
+
var colourHexString = z.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
|
|
21771
|
+
var paletteColorSchema = z.object({
|
|
21772
|
+
name: z.string().min(1),
|
|
21773
|
+
hex: colourHexString
|
|
21774
|
+
});
|
|
21775
|
+
var paletteMetaSchema = z.object({
|
|
21776
|
+
mode: z.enum(["light", "dark"])
|
|
21777
|
+
});
|
|
21778
|
+
var paletteSchema = z.object({
|
|
21779
|
+
colors: z.array(paletteColorSchema),
|
|
21780
|
+
meta: paletteMetaSchema
|
|
21781
|
+
});
|
|
21782
|
+
var typographyStyleSchema = z.object({
|
|
21783
|
+
family: z.string().min(1),
|
|
21784
|
+
weight: z.enum(["light", "regular", "medium", "semibold", "bold"]),
|
|
21785
|
+
letterSpacing: z.enum(["tight", "normal", "loose"]),
|
|
21786
|
+
lineHeight: z.enum(["normal", "relaxed", "loose"])
|
|
21787
|
+
});
|
|
21788
|
+
var bodyTypographyStyleSchema = typographyStyleSchema.extend({
|
|
21789
|
+
size: z.enum(["md", "lg", "xl"])
|
|
21790
|
+
});
|
|
21791
|
+
var headingSizeSchema = z.enum(["xs", "sm", "md", "lg", "xl", "2xl"]);
|
|
21792
|
+
var headingTypographyOverridesSchema = z.object({
|
|
21793
|
+
weight: z.enum(["light", "regular", "medium", "semibold", "bold"]).nullable().optional(),
|
|
21794
|
+
letterSpacing: z.enum(["tight", "normal", "loose"]).nullable().optional(),
|
|
21795
|
+
size: headingSizeSchema.nullable().optional(),
|
|
21796
|
+
lineHeight: z.enum(["normal", "relaxed", "loose"]).nullable().optional(),
|
|
21797
|
+
italic: z.boolean().nullable().optional(),
|
|
21798
|
+
colorToken: z.string().min(1).nullable().optional()
|
|
21799
|
+
// Palette token name for heading color
|
|
21800
|
+
});
|
|
21801
|
+
var headingTypographyStyleSchema = typographyStyleSchema.extend({
|
|
21802
|
+
case: z.enum(["uppercase", "normal", "smallCaps"]).nullable(),
|
|
21803
|
+
italic: z.boolean().nullable(),
|
|
21804
|
+
colorToken: z.string().min(1).nullable().optional()
|
|
21805
|
+
// Palette token name for heading color
|
|
21806
|
+
});
|
|
21807
|
+
var proseLinkUnderlineStyleSchema = z.enum(["solid", "dotted", "dashed"]);
|
|
21808
|
+
var proseLinkUnderlineThicknessSchema = z.enum(["auto", "fromFont", "thin", "medium", "thick"]);
|
|
21809
|
+
var proseLinkUnderlineOffsetSchema = z.enum(["auto", "tight", "normal", "loose"]);
|
|
21810
|
+
var proseLinkStyleSchema = z.object({
|
|
21811
|
+
colorToken: z.string().min(1).optional(),
|
|
21812
|
+
hoverColorToken: z.string().min(1).optional(),
|
|
21813
|
+
underline: z.boolean().optional(),
|
|
21814
|
+
decorationColorToken: z.string().min(1).optional(),
|
|
21815
|
+
hoverDecorationColorToken: z.string().min(1).optional(),
|
|
21816
|
+
underlineStyle: proseLinkUnderlineStyleSchema.optional(),
|
|
21817
|
+
underlineThickness: proseLinkUnderlineThicknessSchema.optional(),
|
|
21818
|
+
underlineOffset: proseLinkUnderlineOffsetSchema.optional()
|
|
21819
|
+
});
|
|
21820
|
+
var semanticSpacingSchema = z.enum([
|
|
21940
21821
|
"none",
|
|
21941
|
-
"
|
|
21942
|
-
"
|
|
21943
|
-
|
|
21944
|
-
|
|
21945
|
-
|
|
21946
|
-
const firstValue = uniqueValues[0];
|
|
21947
|
-
if (!firstValue) {
|
|
21948
|
-
throw new Error("Expected at least one Theme V2 design state option.");
|
|
21949
|
-
}
|
|
21950
|
-
return [firstValue, ...uniqueValues.slice(1)];
|
|
21951
|
-
}
|
|
21952
|
-
var userPanelTreatments = uniqueNonEmpty(
|
|
21953
|
-
userDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "panel").map((frame) => frame.treatment)
|
|
21954
|
-
);
|
|
21955
|
-
var userFlushTreatments = uniqueNonEmpty(
|
|
21956
|
-
userDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.treatment)
|
|
21957
|
-
);
|
|
21958
|
-
var userFlushBleeds = uniqueNonEmpty(
|
|
21959
|
-
userDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.bleed)
|
|
21960
|
-
);
|
|
21961
|
-
var contentFrameIntentSchema = z.discriminatedUnion("kind", [
|
|
21962
|
-
z.object({ kind: z.literal("plain") }).strict(),
|
|
21963
|
-
z.object({
|
|
21964
|
-
kind: z.literal("panel"),
|
|
21965
|
-
treatment: z.enum(userPanelTreatments)
|
|
21966
|
-
}).strict(),
|
|
21967
|
-
z.object({
|
|
21968
|
-
kind: z.literal("flush-panel"),
|
|
21969
|
-
treatment: z.enum(userFlushTreatments),
|
|
21970
|
-
bleed: z.enum(userFlushBleeds)
|
|
21971
|
-
}).strict()
|
|
21972
|
-
]);
|
|
21973
|
-
var blockDesignPlanSchema = z.object({
|
|
21974
|
-
blockId: z.string().min(1).transform(asDesignBlockId),
|
|
21975
|
-
blockKind: z.string().min(1),
|
|
21976
|
-
purpose: z.string().min(1),
|
|
21977
|
-
sectionSurface: z.enum(userDesignOptionCatalog.sectionSurfaces),
|
|
21978
|
-
contentFrame: contentFrameIntentSchema,
|
|
21979
|
-
itemSurface: z.enum(userDesignOptionCatalog.itemSurfaces),
|
|
21980
|
-
transitionAfter: z.enum(userDesignOptionCatalog.transitions),
|
|
21981
|
-
emphasis: z.enum(userDesignOptionCatalog.emphases),
|
|
21982
|
-
heroLegibility: heroLegibilityStrategySchema.optional()
|
|
21983
|
-
}).strict();
|
|
21984
|
-
var styleAuthoritySchema = z.discriminatedUnion("kind", [
|
|
21985
|
-
z.object({
|
|
21986
|
-
kind: z.literal("theme-v2"),
|
|
21987
|
-
source: designResolutionPolicySchema,
|
|
21988
|
-
siteStyleId: z.string().min(1).transform(asSiteStyleId),
|
|
21989
|
-
templateId: z.string().min(1).transform(asDesignSystemTemplateId),
|
|
21990
|
-
templateVersion: z.number().int().nonnegative(),
|
|
21991
|
-
resolverVersion: z.number().int().nonnegative()
|
|
21992
|
-
}).strict(),
|
|
21993
|
-
z.object({
|
|
21994
|
-
kind: z.literal("legacy-raw"),
|
|
21995
|
-
reason: z.enum(["pre-theme-v2", "manual-runtime-fields"])
|
|
21996
|
-
}).strict(),
|
|
21997
|
-
z.object({
|
|
21998
|
-
kind: z.literal("advanced-detached"),
|
|
21999
|
-
reason: z.literal("detached-custom-runtime-fields")
|
|
22000
|
-
}).strict()
|
|
22001
|
-
]);
|
|
22002
|
-
var blockRuntimeStyleAuthoritySchema = z.object({
|
|
22003
|
-
unit: z.literal("block-runtime-fields"),
|
|
22004
|
-
blockId: z.string().min(1).transform(asDesignBlockId),
|
|
22005
|
-
fields: nonEmptyRuntimeStyleFieldNamesSchema,
|
|
22006
|
-
authority: styleAuthoritySchema
|
|
22007
|
-
}).strict();
|
|
22008
|
-
z.object({
|
|
22009
|
-
schemaVersion: z.literal(themeV2DesignStateSchemaVersion),
|
|
22010
|
-
siteStyleId: z.string().min(1).transform(asSiteStyleId),
|
|
22011
|
-
templateId: z.string().min(1).transform(asDesignSystemTemplateId),
|
|
22012
|
-
templateVersion: z.number().int().nonnegative(),
|
|
22013
|
-
resolverVersion: z.number().int().nonnegative(),
|
|
22014
|
-
rhythmPresetId: z.string().min(1),
|
|
22015
|
-
blocks: z.array(blockDesignPlanSchema),
|
|
22016
|
-
styleAuthorities: z.array(blockRuntimeStyleAuthoritySchema)
|
|
22017
|
-
}).strict();
|
|
22018
|
-
function uniqueNonEmpty2(values) {
|
|
22019
|
-
const uniqueValues = [...new Set(values)];
|
|
22020
|
-
const firstValue = uniqueValues[0];
|
|
22021
|
-
if (!firstValue) {
|
|
22022
|
-
throw new Error("Expected at least one generated schema option.");
|
|
22023
|
-
}
|
|
22024
|
-
return [firstValue, ...uniqueValues.slice(1)];
|
|
22025
|
-
}
|
|
22026
|
-
var generatedPanelTreatments = uniqueNonEmpty2(
|
|
22027
|
-
generatedDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "panel").map((frame) => frame.treatment)
|
|
22028
|
-
);
|
|
22029
|
-
var generatedFlushTreatments = uniqueNonEmpty2(
|
|
22030
|
-
generatedDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.treatment)
|
|
22031
|
-
);
|
|
22032
|
-
var generatedFlushBleeds = uniqueNonEmpty2(
|
|
22033
|
-
generatedDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.bleed)
|
|
22034
|
-
);
|
|
22035
|
-
var generatedPanelFrameSchema = z.object({
|
|
22036
|
-
kind: z.literal("panel"),
|
|
22037
|
-
treatment: z.enum(generatedPanelTreatments)
|
|
22038
|
-
}).strict();
|
|
22039
|
-
var generatedFlushPanelFrameSchema = z.object({
|
|
22040
|
-
kind: z.literal("flush-panel"),
|
|
22041
|
-
treatment: z.enum(generatedFlushTreatments),
|
|
22042
|
-
bleed: z.enum(generatedFlushBleeds)
|
|
22043
|
-
}).strict();
|
|
22044
|
-
var generatedContentFrameIntentSchema = z.discriminatedUnion("kind", [
|
|
22045
|
-
z.object({ kind: z.literal("plain") }).strict(),
|
|
22046
|
-
generatedPanelFrameSchema,
|
|
22047
|
-
generatedFlushPanelFrameSchema
|
|
22048
|
-
]);
|
|
22049
|
-
var generatedSiteStyleIdSchema = z.enum(curatedSiteStyleIdValues).transform(asSiteStyleId);
|
|
22050
|
-
function generatedChoiceSchema(valueSchema) {
|
|
22051
|
-
return z.discriminatedUnion("kind", [
|
|
22052
|
-
z.object({
|
|
22053
|
-
source: z.literal("generated"),
|
|
22054
|
-
kind: z.literal("auto")
|
|
22055
|
-
}).strict(),
|
|
22056
|
-
z.object({
|
|
22057
|
-
source: z.literal("generated"),
|
|
22058
|
-
kind: z.literal("explicit"),
|
|
22059
|
-
value: valueSchema
|
|
22060
|
-
}).strict()
|
|
22061
|
-
]);
|
|
22062
|
-
}
|
|
22063
|
-
var generatedBlockDesignIntentSchema = z.object({
|
|
22064
|
-
sectionSurface: generatedChoiceSchema(
|
|
22065
|
-
z.enum(generatedDesignOptionCatalog.sectionSurfaces)
|
|
22066
|
-
),
|
|
22067
|
-
contentFrame: generatedChoiceSchema(generatedContentFrameIntentSchema),
|
|
22068
|
-
itemSurface: generatedChoiceSchema(
|
|
22069
|
-
z.enum(generatedDesignOptionCatalog.itemSurfaces)
|
|
22070
|
-
),
|
|
22071
|
-
transitionAfter: generatedChoiceSchema(
|
|
22072
|
-
z.enum(generatedDesignOptionCatalog.transitions)
|
|
22073
|
-
),
|
|
22074
|
-
emphasis: generatedChoiceSchema(
|
|
22075
|
-
z.enum(generatedDesignOptionCatalog.emphases)
|
|
22076
|
-
)
|
|
22077
|
-
}).strict();
|
|
22078
|
-
var generatedMediaCompositionIntentSchema = z.enum([
|
|
22079
|
-
"none",
|
|
22080
|
-
"supporting",
|
|
22081
|
-
"dominant"
|
|
22082
|
-
]);
|
|
22083
|
-
var generatedDecorativeCompositionIntentSchema = z.enum([
|
|
22084
|
-
"none",
|
|
22085
|
-
"supporting"
|
|
22086
|
-
]);
|
|
22087
|
-
var generatedHeroLegibilityStrategySchema = z.enum([
|
|
22088
|
-
"none",
|
|
22089
|
-
"scrim-gradient"
|
|
22090
|
-
]);
|
|
22091
|
-
var generatedBlockMediaIntentSchema = z.object({
|
|
22092
|
-
media: generatedMediaCompositionIntentSchema,
|
|
22093
|
-
decorative: generatedDecorativeCompositionIntentSchema,
|
|
22094
|
-
heroLegibility: generatedChoiceSchema(generatedHeroLegibilityStrategySchema)
|
|
22095
|
-
}).strict();
|
|
22096
|
-
var generatedBoundaryIntentSchema = z.object({
|
|
22097
|
-
transitionAfter: generatedChoiceSchema(
|
|
22098
|
-
z.enum(generatedDesignOptionCatalog.transitions)
|
|
22099
|
-
)
|
|
22100
|
-
}).strict();
|
|
22101
|
-
var generatedPageDesignBlockIntentSchema = z.object({
|
|
22102
|
-
blockId: z.string().min(1),
|
|
22103
|
-
blockKind: z.string().min(1),
|
|
22104
|
-
purpose: z.string().min(1),
|
|
22105
|
-
design: generatedBlockDesignIntentSchema,
|
|
22106
|
-
mediaIntent: generatedBlockMediaIntentSchema,
|
|
22107
|
-
boundaryIntent: generatedBoundaryIntentSchema
|
|
22108
|
-
}).strict();
|
|
22109
|
-
z.object({
|
|
22110
|
-
siteStyleId: generatedSiteStyleIdSchema,
|
|
22111
|
-
blocks: z.array(generatedPageDesignBlockIntentSchema)
|
|
22112
|
-
}).strict();
|
|
22113
|
-
var pageDesignIntentSchemaVersion = 1;
|
|
22114
|
-
var pageDesignUserPinnedAppearanceChoiceSchema = z.object({
|
|
22115
|
-
kind: z.literal("user-pinned"),
|
|
22116
|
-
value: z.string().min(1).transform(asAppearancePresetId)
|
|
22117
|
-
}).strict();
|
|
22118
|
-
var pageDesignUserPinnedBoundaryChoiceSchema = z.object({
|
|
22119
|
-
kind: z.literal("user-pinned"),
|
|
22120
|
-
value: z.string().min(1).transform(asBoundaryOptionId)
|
|
22121
|
-
}).strict();
|
|
22122
|
-
var pageDesignBlockLookPinSchema = z.object({
|
|
22123
|
-
blockId: z.string().min(1).transform(asDesignBlockId),
|
|
22124
|
-
blockKind: z.string().min(1),
|
|
22125
|
-
choice: pageDesignUserPinnedAppearanceChoiceSchema
|
|
22126
|
-
}).strict();
|
|
22127
|
-
var pageDesignBoundaryPinSchema = z.object({
|
|
22128
|
-
boundaryId: z.string().min(1).transform(asDesignBoundaryId),
|
|
22129
|
-
previousBlockId: z.string().min(1).transform(asDesignBlockId),
|
|
22130
|
-
nextBlockId: z.string().min(1).transform(asDesignBlockId),
|
|
22131
|
-
choice: pageDesignUserPinnedBoundaryChoiceSchema
|
|
22132
|
-
}).strict().superRefine((pin, ctx) => {
|
|
22133
|
-
const expectedBoundaryId = makeBoundaryId(
|
|
22134
|
-
pin.previousBlockId,
|
|
22135
|
-
pin.nextBlockId
|
|
22136
|
-
);
|
|
22137
|
-
if (pin.boundaryId !== expectedBoundaryId) {
|
|
22138
|
-
ctx.addIssue({
|
|
22139
|
-
code: z.ZodIssueCode.custom,
|
|
22140
|
-
path: ["boundaryId"],
|
|
22141
|
-
message: `Boundary id must match previousBlockId and nextBlockId. Expected ${expectedBoundaryId}.`
|
|
22142
|
-
});
|
|
22143
|
-
}
|
|
22144
|
-
});
|
|
22145
|
-
z.object({
|
|
22146
|
-
schemaVersion: z.literal(pageDesignIntentSchemaVersion),
|
|
22147
|
-
siteStyleId: z.string().min(1).transform(asSiteStyleId),
|
|
22148
|
-
pageFlowPresetId: z.string().min(1).transform(asPageFlowPresetId),
|
|
22149
|
-
blockLookPins: z.array(pageDesignBlockLookPinSchema),
|
|
22150
|
-
boundaryPins: z.array(pageDesignBoundaryPinSchema)
|
|
22151
|
-
}).strict().superRefine((intent, ctx) => {
|
|
22152
|
-
addDuplicateStringIssues(ctx, {
|
|
22153
|
-
values: intent.blockLookPins.map((pin) => pin.blockId),
|
|
22154
|
-
path: ["blockLookPins"],
|
|
22155
|
-
label: "block Look pin"
|
|
22156
|
-
});
|
|
22157
|
-
addDuplicateStringIssues(ctx, {
|
|
22158
|
-
values: intent.boundaryPins.map(
|
|
22159
|
-
(pin) => boundaryKey(pin.previousBlockId, pin.nextBlockId)
|
|
22160
|
-
),
|
|
22161
|
-
path: ["boundaryPins"],
|
|
22162
|
-
label: "boundary pin"
|
|
22163
|
-
});
|
|
22164
|
-
});
|
|
22165
|
-
function addDuplicateStringIssues(ctx, input) {
|
|
22166
|
-
const seen = /* @__PURE__ */ new Set();
|
|
22167
|
-
const duplicates = /* @__PURE__ */ new Set();
|
|
22168
|
-
for (const value of input.values) {
|
|
22169
|
-
if (seen.has(value)) {
|
|
22170
|
-
duplicates.add(value);
|
|
22171
|
-
}
|
|
22172
|
-
seen.add(value);
|
|
22173
|
-
}
|
|
22174
|
-
for (const duplicate of duplicates) {
|
|
22175
|
-
ctx.addIssue({
|
|
22176
|
-
code: z.ZodIssueCode.custom,
|
|
22177
|
-
path: [...input.path],
|
|
22178
|
-
message: `Duplicate ${input.label}: ${duplicate}.`
|
|
22179
|
-
});
|
|
22180
|
-
}
|
|
22181
|
-
}
|
|
22182
|
-
function boundaryKey(previousBlockId, nextBlockId) {
|
|
22183
|
-
return makeBoundaryId(previousBlockId, nextBlockId);
|
|
22184
|
-
}
|
|
22185
|
-
var hotspotSchema = z42.object({
|
|
22186
|
-
x: z42.number().min(0).max(1),
|
|
22187
|
-
y: z42.number().min(0).max(1),
|
|
22188
|
-
radius: z42.number().optional()
|
|
22189
|
-
});
|
|
22190
|
-
var rotationSchema = z42.union([z42.literal(0), z42.literal(90), z42.literal(180), z42.literal(270)]);
|
|
22191
|
-
var rectSchema = z42.tuple([z42.number(), z42.number(), z42.number(), z42.number()]);
|
|
22192
|
-
var aspectCropSchema = z42.object({
|
|
22193
|
-
aspect: z42.preprocess((value) => value == null ? void 0 : value, z42.string().optional()),
|
|
22194
|
-
rect: z42.preprocess((value) => value == null ? void 0 : value, rectSchema.optional()),
|
|
22195
|
-
hotspot: z42.preprocess((value) => value == null ? void 0 : value, hotspotSchema.optional()),
|
|
22196
|
-
rotation: z42.preprocess((value) => value == null ? void 0 : value, rotationSchema.optional())
|
|
22197
|
-
});
|
|
22198
|
-
var transformSchema = z42.object({
|
|
22199
|
-
aspectCrops: z42.preprocess((value) => {
|
|
22200
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
22201
|
-
return void 0;
|
|
22202
|
-
}
|
|
22203
|
-
return value;
|
|
22204
|
-
}, z42.record(z42.string(), aspectCropSchema.catch({}))).optional(),
|
|
22205
|
-
rect: rectSchema.optional(),
|
|
22206
|
-
hotspot: hotspotSchema.optional(),
|
|
22207
|
-
rotation: rotationSchema.optional()
|
|
22208
|
-
});
|
|
22209
|
-
var mediaSchema = z42.object({
|
|
22210
|
-
type: z42.enum(["image", "video", "audio", "document", "spreadsheet", "archive"]),
|
|
22211
|
-
purpose: z42.string().optional(),
|
|
22212
|
-
placeholder: z42.boolean().default(true).optional(),
|
|
22213
|
-
assetId: z42.string().optional(),
|
|
22214
|
-
identifier: z42.string().optional(),
|
|
22215
|
-
src: z42.string().optional(),
|
|
22216
|
-
alt: z42.string().optional(),
|
|
22217
|
-
filename: z42.string().optional(),
|
|
22218
|
-
mimeType: z42.string().optional(),
|
|
22219
|
-
width: z42.number().optional(),
|
|
22220
|
-
height: z42.number().optional(),
|
|
22221
|
-
storageBucket: z42.string().optional(),
|
|
22222
|
-
storagePath: z42.string().optional(),
|
|
22223
|
-
transform: transformSchema.optional()
|
|
22224
|
-
});
|
|
22225
|
-
|
|
22226
|
-
// ../theme-core/src/schema.ts
|
|
22227
|
-
init_buttons();
|
|
22228
|
-
var cardSpacingSchema = z.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]);
|
|
22229
|
-
var gradientDirectionSchema2 = z.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
|
|
22230
|
-
var cardBackgroundSchema = z.discriminatedUnion("type", [
|
|
22231
|
-
z.object({ type: z.literal("solid"), colorToken: z.string() }),
|
|
22232
|
-
z.object({
|
|
22233
|
-
type: z.literal("gradient"),
|
|
22234
|
-
fromToken: z.string(),
|
|
22235
|
-
toToken: z.string(),
|
|
22236
|
-
direction: gradientDirectionSchema2
|
|
22237
|
-
}),
|
|
22238
|
-
z.object({ type: z.literal("transparent") })
|
|
22239
|
-
]);
|
|
22240
|
-
var cardBorderSchema = z.object({
|
|
22241
|
-
widthClass: z.string(),
|
|
22242
|
-
colorToken: z.string()
|
|
22243
|
-
});
|
|
22244
|
-
var cardVariantSchema = z.object({
|
|
22245
|
-
id: z.string(),
|
|
22246
|
-
name: z.string().min(1).max(20),
|
|
22247
|
-
enabled: z.boolean(),
|
|
22248
|
-
priority: z.union([z.literal(1), z.literal(2), z.literal(3)]),
|
|
22249
|
-
// Appearance (token-based)
|
|
22250
|
-
background: cardBackgroundSchema,
|
|
22251
|
-
spacing: cardSpacingSchema,
|
|
22252
|
-
// Optional overrides (uses theme defaults if not specified)
|
|
22253
|
-
shadow: z.object({
|
|
22254
|
-
elevation: z.enum(["none", "low", "medium", "high"]),
|
|
22255
|
-
softness: z.enum(["crisp", "soft", "hard"]).nullable(),
|
|
22256
|
-
position: z.enum(["bottom", "bottom-right"]).default("bottom")
|
|
22257
|
-
}).optional(),
|
|
22258
|
-
corners: z.enum(["square", "soft", "rounded", "pill"]).optional(),
|
|
22259
|
-
// Border (optional)
|
|
22260
|
-
border: cardBorderSchema.optional()
|
|
22261
|
-
});
|
|
22262
|
-
var cardSystemSchema = z.object({
|
|
22263
|
-
variants: z.array(cardVariantSchema).min(1).max(3)
|
|
22264
|
-
});
|
|
22265
|
-
|
|
22266
|
-
// ../theme-core/src/cards/index.ts
|
|
22267
|
-
init_constants2();
|
|
22268
|
-
init_generateCardCss();
|
|
22269
|
-
init_generateDefaultCardSystem();
|
|
22270
|
-
|
|
22271
|
-
// ../theme-core/src/schema.ts
|
|
22272
|
-
init_types5();
|
|
22273
|
-
init_types6();
|
|
22274
|
-
var gradientStopSchema = z.object({
|
|
22275
|
-
color: z.string(),
|
|
22276
|
-
// Theme color token name (e.g., 'primary-500')
|
|
22277
|
-
position: z.number().min(0).max(100)
|
|
22278
|
-
// Percentage 0-100
|
|
22279
|
-
});
|
|
22280
|
-
var gradientConfigSchema = z.object({
|
|
22281
|
-
type: z.enum(["linear", "radial"]),
|
|
22282
|
-
angle: z.number().min(0).max(360).optional(),
|
|
22283
|
-
// For linear gradients (degrees)
|
|
22284
|
-
position: z.string().optional(),
|
|
22285
|
-
// For radial gradients ('center', 'top left', etc.)
|
|
22286
|
-
stops: z.array(gradientStopSchema).min(2)
|
|
22287
|
-
});
|
|
22288
|
-
|
|
22289
|
-
// ../theme-core/src/schema.ts
|
|
22290
|
-
init_types7();
|
|
22291
|
-
init_validation();
|
|
22292
|
-
init_atRuleValidation();
|
|
22293
|
-
init_shared();
|
|
22294
|
-
var axesSchema = z.object({
|
|
22295
|
-
tone: z.enum(["minimal", "classic", "bold"]),
|
|
22296
|
-
energy: z.enum(["calm", "vibrant"]),
|
|
22297
|
-
density: z.enum(["airy", "regular", "compact"]),
|
|
22298
|
-
mediaBias: z.enum(["text", "media", "mixed"]),
|
|
22299
|
-
conversionBias: z.enum(["low", "med", "high"]),
|
|
22300
|
-
motion: z.enum(["subtle", "standard", "expressive"])
|
|
22301
|
-
});
|
|
22302
|
-
var colourHexString = z.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
|
|
22303
|
-
var paletteColorSchema = z.object({
|
|
22304
|
-
name: z.string().min(1),
|
|
22305
|
-
hex: colourHexString
|
|
22306
|
-
});
|
|
22307
|
-
var paletteMetaSchema = z.object({
|
|
22308
|
-
mode: z.enum(["light", "dark"])
|
|
22309
|
-
});
|
|
22310
|
-
var paletteSchema = z.object({
|
|
22311
|
-
colors: z.array(paletteColorSchema),
|
|
22312
|
-
meta: paletteMetaSchema
|
|
22313
|
-
});
|
|
22314
|
-
var typographyStyleSchema = z.object({
|
|
22315
|
-
family: z.string().min(1),
|
|
22316
|
-
weight: z.enum(["light", "regular", "medium", "semibold", "bold"]),
|
|
22317
|
-
letterSpacing: z.enum(["tight", "normal", "loose"]),
|
|
22318
|
-
lineHeight: z.enum(["normal", "relaxed", "loose"])
|
|
22319
|
-
});
|
|
22320
|
-
var bodyTypographyStyleSchema = typographyStyleSchema.extend({
|
|
22321
|
-
size: z.enum(["md", "lg", "xl"])
|
|
22322
|
-
});
|
|
22323
|
-
var headingSizeSchema = z.enum(["xs", "sm", "md", "lg", "xl", "2xl"]);
|
|
22324
|
-
var headingTypographyOverridesSchema = z.object({
|
|
22325
|
-
weight: z.enum(["light", "regular", "medium", "semibold", "bold"]).nullable().optional(),
|
|
22326
|
-
letterSpacing: z.enum(["tight", "normal", "loose"]).nullable().optional(),
|
|
22327
|
-
size: headingSizeSchema.nullable().optional(),
|
|
22328
|
-
lineHeight: z.enum(["normal", "relaxed", "loose"]).nullable().optional(),
|
|
22329
|
-
italic: z.boolean().nullable().optional(),
|
|
22330
|
-
colorToken: z.string().min(1).nullable().optional()
|
|
22331
|
-
// Palette token name for heading color
|
|
22332
|
-
});
|
|
22333
|
-
var headingTypographyStyleSchema = typographyStyleSchema.extend({
|
|
22334
|
-
case: z.enum(["uppercase", "normal", "smallCaps"]).nullable(),
|
|
22335
|
-
italic: z.boolean().nullable(),
|
|
22336
|
-
colorToken: z.string().min(1).nullable().optional()
|
|
22337
|
-
// Palette token name for heading color
|
|
22338
|
-
});
|
|
22339
|
-
var proseLinkUnderlineStyleSchema = z.enum(["solid", "dotted", "dashed"]);
|
|
22340
|
-
var proseLinkUnderlineThicknessSchema = z.enum(["auto", "fromFont", "thin", "medium", "thick"]);
|
|
22341
|
-
var proseLinkUnderlineOffsetSchema = z.enum(["auto", "tight", "normal", "loose"]);
|
|
22342
|
-
var proseLinkStyleSchema = z.object({
|
|
22343
|
-
colorToken: z.string().min(1).optional(),
|
|
22344
|
-
hoverColorToken: z.string().min(1).optional(),
|
|
22345
|
-
underline: z.boolean().optional(),
|
|
22346
|
-
decorationColorToken: z.string().min(1).optional(),
|
|
22347
|
-
hoverDecorationColorToken: z.string().min(1).optional(),
|
|
22348
|
-
underlineStyle: proseLinkUnderlineStyleSchema.optional(),
|
|
22349
|
-
underlineThickness: proseLinkUnderlineThicknessSchema.optional(),
|
|
22350
|
-
underlineOffset: proseLinkUnderlineOffsetSchema.optional()
|
|
22351
|
-
});
|
|
22352
|
-
var semanticSpacingSchema = z.enum([
|
|
22353
|
-
"none",
|
|
22354
|
-
"compact",
|
|
22355
|
-
"cozy",
|
|
22356
|
-
"medium",
|
|
22357
|
-
"comfortable",
|
|
22358
|
-
"spacious"
|
|
21822
|
+
"compact",
|
|
21823
|
+
"cozy",
|
|
21824
|
+
"medium",
|
|
21825
|
+
"comfortable",
|
|
21826
|
+
"spacious"
|
|
22359
21827
|
]);
|
|
22360
21828
|
var boxRoundedSchema = z.enum(["none", "sm", "md", "lg", "xl", "2xl", "full"]);
|
|
22361
21829
|
var boxBackgroundOverlaySchema = z.object({
|
|
@@ -22775,11 +22243,7 @@ z.object({
|
|
|
22775
22243
|
themes: z.array(themeSchema).length(3)
|
|
22776
22244
|
});
|
|
22777
22245
|
|
|
22778
|
-
// ../theme-core/src/site-styles/runtimeCompiler.ts
|
|
22779
|
-
init_personalities();
|
|
22780
|
-
|
|
22781
22246
|
// ../theme-core/src/palette/variants/types.ts
|
|
22782
|
-
init_compatibility();
|
|
22783
22247
|
function asPaletteVariantId(value) {
|
|
22784
22248
|
if (value.length === 0) {
|
|
22785
22249
|
throw new Error("PaletteVariantId must be a non-empty string");
|
|
@@ -23136,6 +22600,636 @@ var paletteVariants = [
|
|
|
23136
22600
|
new Map(
|
|
23137
22601
|
paletteVariants.map((v) => [v.id, v])
|
|
23138
22602
|
);
|
|
22603
|
+
|
|
22604
|
+
// ../theme-core/src/site-styles/sourceCatalogs.ts
|
|
22605
|
+
var generatedContentFrames = [
|
|
22606
|
+
plainFrame,
|
|
22607
|
+
panelFrame("inset"),
|
|
22608
|
+
panelFrame("raised"),
|
|
22609
|
+
flushPanelFrame({ bleed: "start" })
|
|
22610
|
+
];
|
|
22611
|
+
var userContentFrames = [
|
|
22612
|
+
...generatedContentFrames,
|
|
22613
|
+
panelFrame("editorial"),
|
|
22614
|
+
flushPanelFrame({ bleed: "end" }),
|
|
22615
|
+
flushPanelFrame({ bleed: "both" })
|
|
22616
|
+
];
|
|
22617
|
+
var generatedDesignOptionCatalog = {
|
|
22618
|
+
sectionSurfaces: ["base", "muted-band", "accent-band", "hero-image"],
|
|
22619
|
+
contentFrames: generatedContentFrames,
|
|
22620
|
+
itemSurfaces: ["none", "default", "flat", "outlined", "raised"],
|
|
22621
|
+
transitions: ["none", "soft-fade-short", "soft-fade-long"],
|
|
22622
|
+
emphases: ["low", "medium", "high"]};
|
|
22623
|
+
var userDesignOptionCatalog = {
|
|
22624
|
+
sectionSurfaces: generatedDesignOptionCatalog.sectionSurfaces,
|
|
22625
|
+
contentFrames: userContentFrames,
|
|
22626
|
+
itemSurfaces: [
|
|
22627
|
+
...generatedDesignOptionCatalog.itemSurfaces,
|
|
22628
|
+
"inset",
|
|
22629
|
+
"editorial"
|
|
22630
|
+
],
|
|
22631
|
+
transitions: [
|
|
22632
|
+
...generatedDesignOptionCatalog.transitions,
|
|
22633
|
+
"wave-edge",
|
|
22634
|
+
"angle-edge"
|
|
22635
|
+
],
|
|
22636
|
+
emphases: generatedDesignOptionCatalog.emphases};
|
|
22637
|
+
|
|
22638
|
+
// ../theme-core/src/site-styles/curatedSiteStyles.ts
|
|
22639
|
+
var curatedSiteStyleIdValues = [
|
|
22640
|
+
"site-style:calm-studio",
|
|
22641
|
+
"site-style:clear-professional",
|
|
22642
|
+
"site-style:warm-editorial",
|
|
22643
|
+
"site-style:bright-community",
|
|
22644
|
+
"site-style:quiet-luxury",
|
|
22645
|
+
"site-style:practical-services",
|
|
22646
|
+
"site-style:modern-wellness",
|
|
22647
|
+
"site-style:bold-launch"
|
|
22648
|
+
];
|
|
22649
|
+
var quietBudget = {
|
|
22650
|
+
accentDensity: "low",
|
|
22651
|
+
panelDensity: "medium",
|
|
22652
|
+
transitionMix: "quiet",
|
|
22653
|
+
primaryCtaLimit: 2,
|
|
22654
|
+
mediaDensity: "medium",
|
|
22655
|
+
decorativeRepetition: "low"
|
|
22656
|
+
};
|
|
22657
|
+
var balancedBudget = {
|
|
22658
|
+
accentDensity: "medium",
|
|
22659
|
+
panelDensity: "medium",
|
|
22660
|
+
transitionMix: "balanced",
|
|
22661
|
+
primaryCtaLimit: 3,
|
|
22662
|
+
mediaDensity: "medium",
|
|
22663
|
+
decorativeRepetition: "medium"
|
|
22664
|
+
};
|
|
22665
|
+
var expressiveBudget = {
|
|
22666
|
+
accentDensity: "high",
|
|
22667
|
+
panelDensity: "high",
|
|
22668
|
+
transitionMix: "expressive",
|
|
22669
|
+
primaryCtaLimit: 3,
|
|
22670
|
+
mediaDensity: "high",
|
|
22671
|
+
decorativeRepetition: "medium"
|
|
22672
|
+
};
|
|
22673
|
+
function uniqueContentFrameKinds() {
|
|
22674
|
+
const kinds = [...new Set(
|
|
22675
|
+
generatedDesignOptionCatalog.contentFrames.map((frame) => frame.kind)
|
|
22676
|
+
)];
|
|
22677
|
+
const firstKind = kinds[0];
|
|
22678
|
+
if (!firstKind) {
|
|
22679
|
+
throw new Error("Expected generated design option catalog to expose at least one content frame kind.");
|
|
22680
|
+
}
|
|
22681
|
+
return [firstKind, ...kinds.slice(1)];
|
|
22682
|
+
}
|
|
22683
|
+
var generatedContentFrameKinds = uniqueContentFrameKinds();
|
|
22684
|
+
function defineCuratedSiteStyle(input) {
|
|
22685
|
+
return {
|
|
22686
|
+
id: asSiteStyleId(input.id),
|
|
22687
|
+
name: input.name,
|
|
22688
|
+
description: input.description,
|
|
22689
|
+
generationBrief: input.generationBrief,
|
|
22690
|
+
selectionKeywords: input.selectionKeywords ?? [],
|
|
22691
|
+
template: {
|
|
22692
|
+
id: asDesignSystemTemplateId(`template:${input.id.replace("site-style:", "")}`),
|
|
22693
|
+
name: input.name,
|
|
22694
|
+
version: 1,
|
|
22695
|
+
tokenRecipes: input.tokenRecipes,
|
|
22696
|
+
compositionBudget: input.compositionBudget,
|
|
22697
|
+
supportedSectionSurfaces: generatedDesignOptionCatalog.sectionSurfaces,
|
|
22698
|
+
supportedContentFrames: generatedContentFrameKinds,
|
|
22699
|
+
supportedItemSurfaces: generatedDesignOptionCatalog.itemSurfaces,
|
|
22700
|
+
supportedTransitions: generatedDesignOptionCatalog.transitions
|
|
22701
|
+
},
|
|
22702
|
+
buttonPersonalityChoices: input.buttonPersonalityChoices,
|
|
22703
|
+
paletteVariantChoices: input.paletteVariantChoices
|
|
22704
|
+
};
|
|
22705
|
+
}
|
|
22706
|
+
function buttonChoice(id, note) {
|
|
22707
|
+
return { id: asButtonPersonalityId(id) };
|
|
22708
|
+
}
|
|
22709
|
+
function paletteChoice(id, note) {
|
|
22710
|
+
return { id: asPaletteVariantId(id) };
|
|
22711
|
+
}
|
|
22712
|
+
var curatedSiteStyles = [
|
|
22713
|
+
defineCuratedSiteStyle({
|
|
22714
|
+
id: "site-style:calm-studio",
|
|
22715
|
+
name: "Calm Studio",
|
|
22716
|
+
description: "Soft, measured, and spacious for intimate appointment or class businesses.",
|
|
22717
|
+
generationBrief: "Use calm pacing, concise copy, generous breathing room, and natural imagery. Keep calls to action steady rather than urgent.",
|
|
22718
|
+
tokenRecipes: {
|
|
22719
|
+
palette: "soft-natural",
|
|
22720
|
+
contrast: "standard",
|
|
22721
|
+
radius: "soft",
|
|
22722
|
+
shadow: "subtle",
|
|
22723
|
+
typography: "friendly-sans",
|
|
22724
|
+
spacing: "airy",
|
|
22725
|
+
motion: "subtle"
|
|
22726
|
+
},
|
|
22727
|
+
compositionBudget: quietBudget,
|
|
22728
|
+
buttonPersonalityChoices: [
|
|
22729
|
+
buttonChoice("soft-pill"),
|
|
22730
|
+
buttonChoice("pebble"),
|
|
22731
|
+
buttonChoice("editorial-link"),
|
|
22732
|
+
buttonChoice("brushed-wash")
|
|
22733
|
+
],
|
|
22734
|
+
paletteVariantChoices: [
|
|
22735
|
+
paletteChoice("soft-natural-sage"),
|
|
22736
|
+
paletteChoice("soft-natural-stone"),
|
|
22737
|
+
paletteChoice("warm-neutral-clay"),
|
|
22738
|
+
paletteChoice("soft-natural-watercolor")
|
|
22739
|
+
]
|
|
22740
|
+
}),
|
|
22741
|
+
defineCuratedSiteStyle({
|
|
22742
|
+
id: "site-style:clear-professional",
|
|
22743
|
+
name: "Clear Professional",
|
|
22744
|
+
description: "Crisp, trustworthy, and direct for local services and consultancies.",
|
|
22745
|
+
generationBrief: "Prioritize clarity, proof, service detail, and easy next steps. Keep visuals polished and specific, with restrained decorative treatment.",
|
|
22746
|
+
tokenRecipes: {
|
|
22747
|
+
palette: "brand-led",
|
|
22748
|
+
contrast: "strong",
|
|
22749
|
+
radius: "soft",
|
|
22750
|
+
shadow: "subtle",
|
|
22751
|
+
typography: "clean-sans",
|
|
22752
|
+
spacing: "regular",
|
|
22753
|
+
motion: "subtle"
|
|
22754
|
+
},
|
|
22755
|
+
compositionBudget: balancedBudget,
|
|
22756
|
+
buttonPersonalityChoices: [
|
|
22757
|
+
buttonChoice("confident-chip"),
|
|
22758
|
+
buttonChoice("soft-pill"),
|
|
22759
|
+
buttonChoice("editorial-link")
|
|
22760
|
+
],
|
|
22761
|
+
paletteVariantChoices: [
|
|
22762
|
+
paletteChoice("brand-led-cool"),
|
|
22763
|
+
paletteChoice("high-contrast-ink"),
|
|
22764
|
+
paletteChoice("brand-led-jewel")
|
|
22765
|
+
]
|
|
22766
|
+
}),
|
|
22767
|
+
defineCuratedSiteStyle({
|
|
22768
|
+
id: "site-style:warm-editorial",
|
|
22769
|
+
name: "Warm Editorial",
|
|
22770
|
+
description: "Story-led and textured for educators, makers, venues, and retreats.",
|
|
22771
|
+
generationBrief: "Let the copy feel thoughtful and grounded. Favor narrative sections, supporting media, and a small number of editorial panels.",
|
|
22772
|
+
tokenRecipes: {
|
|
22773
|
+
palette: "warm-neutral",
|
|
22774
|
+
contrast: "standard",
|
|
22775
|
+
radius: "square",
|
|
22776
|
+
shadow: "none",
|
|
22777
|
+
typography: "serif-editorial",
|
|
22778
|
+
spacing: "airy",
|
|
22779
|
+
motion: "subtle"
|
|
22780
|
+
},
|
|
22781
|
+
compositionBudget: balancedBudget,
|
|
22782
|
+
buttonPersonalityChoices: [
|
|
22783
|
+
buttonChoice("editorial-link"),
|
|
22784
|
+
buttonChoice("soft-pill"),
|
|
22785
|
+
buttonChoice("brushed-wash")
|
|
22786
|
+
],
|
|
22787
|
+
paletteVariantChoices: [
|
|
22788
|
+
paletteChoice("warm-neutral-cream"),
|
|
22789
|
+
paletteChoice("warm-neutral-clay"),
|
|
22790
|
+
paletteChoice("warm-neutral-forest"),
|
|
22791
|
+
paletteChoice("soft-natural-stone")
|
|
22792
|
+
]
|
|
22793
|
+
}),
|
|
22794
|
+
defineCuratedSiteStyle({
|
|
22795
|
+
id: "site-style:bright-community",
|
|
22796
|
+
name: "Bright Community",
|
|
22797
|
+
description: "Friendly, welcoming, and active for groups, classes, and neighborhood offers.",
|
|
22798
|
+
generationBrief: "Use welcoming language, clear event or booking routes, and optimistic imagery. Let accents appear, but avoid noisy decoration.",
|
|
22799
|
+
tokenRecipes: {
|
|
22800
|
+
palette: "brand-led",
|
|
22801
|
+
contrast: "standard",
|
|
22802
|
+
radius: "rounded",
|
|
22803
|
+
shadow: "subtle",
|
|
22804
|
+
typography: "friendly-sans",
|
|
22805
|
+
spacing: "regular",
|
|
22806
|
+
motion: "expressive"
|
|
22807
|
+
},
|
|
22808
|
+
compositionBudget: balancedBudget,
|
|
22809
|
+
buttonPersonalityChoices: [
|
|
22810
|
+
buttonChoice("pebble"),
|
|
22811
|
+
buttonChoice("brushed-wash"),
|
|
22812
|
+
buttonChoice("confident-chip")
|
|
22813
|
+
],
|
|
22814
|
+
paletteVariantChoices: [
|
|
22815
|
+
paletteChoice("brand-led-warm"),
|
|
22816
|
+
paletteChoice("brand-led-jewel"),
|
|
22817
|
+
paletteChoice("soft-natural-watercolor")
|
|
22818
|
+
]
|
|
22819
|
+
}),
|
|
22820
|
+
defineCuratedSiteStyle({
|
|
22821
|
+
id: "site-style:quiet-luxury",
|
|
22822
|
+
name: "Quiet Luxury",
|
|
22823
|
+
description: "Minimal, confident, and refined for premium experiences and private services.",
|
|
22824
|
+
generationBrief: "Use fewer claims, more specificity, and restrained sensory detail. Favor elegant media and low repetition over dense panels.",
|
|
22825
|
+
selectionKeywords: [
|
|
22826
|
+
"luxury",
|
|
22827
|
+
"premium",
|
|
22828
|
+
"boutique",
|
|
22829
|
+
"bespoke",
|
|
22830
|
+
"exclusive"
|
|
22831
|
+
],
|
|
22832
|
+
tokenRecipes: {
|
|
22833
|
+
palette: "high-contrast",
|
|
22834
|
+
contrast: "strong",
|
|
22835
|
+
radius: "square",
|
|
22836
|
+
shadow: "none",
|
|
22837
|
+
typography: "classic-serif",
|
|
22838
|
+
spacing: "airy",
|
|
22839
|
+
motion: "none"
|
|
22840
|
+
},
|
|
22841
|
+
compositionBudget: quietBudget,
|
|
22842
|
+
buttonPersonalityChoices: [
|
|
22843
|
+
buttonChoice("editorial-link"),
|
|
22844
|
+
buttonChoice("confident-chip"),
|
|
22845
|
+
buttonChoice("soft-pill")
|
|
22846
|
+
],
|
|
22847
|
+
paletteVariantChoices: [
|
|
22848
|
+
paletteChoice("high-contrast-charcoal"),
|
|
22849
|
+
paletteChoice("high-contrast-ink"),
|
|
22850
|
+
paletteChoice("warm-neutral-cream")
|
|
22851
|
+
]
|
|
22852
|
+
}),
|
|
22853
|
+
defineCuratedSiteStyle({
|
|
22854
|
+
id: "site-style:practical-services",
|
|
22855
|
+
name: "Practical Services",
|
|
22856
|
+
description: "Efficient, plainspoken, and conversion-focused for trades and everyday services.",
|
|
22857
|
+
generationBrief: "Make services, location, trust signals, and contact paths obvious. Keep copy brief and avoid ornate visual treatments.",
|
|
22858
|
+
selectionKeywords: [
|
|
22859
|
+
"repair",
|
|
22860
|
+
"plumb",
|
|
22861
|
+
"electric",
|
|
22862
|
+
"cleaning",
|
|
22863
|
+
"landscap",
|
|
22864
|
+
"contractor"
|
|
22865
|
+
],
|
|
22866
|
+
tokenRecipes: {
|
|
22867
|
+
palette: "brand-led",
|
|
22868
|
+
contrast: "maximum",
|
|
22869
|
+
radius: "soft",
|
|
22870
|
+
shadow: "subtle",
|
|
22871
|
+
typography: "clean-sans",
|
|
22872
|
+
spacing: "compact",
|
|
22873
|
+
motion: "none"
|
|
22874
|
+
},
|
|
22875
|
+
compositionBudget: quietBudget,
|
|
22876
|
+
buttonPersonalityChoices: [
|
|
22877
|
+
buttonChoice("confident-chip"),
|
|
22878
|
+
buttonChoice("pebble"),
|
|
22879
|
+
buttonChoice("ink-stamp")
|
|
22880
|
+
],
|
|
22881
|
+
paletteVariantChoices: [
|
|
22882
|
+
paletteChoice("brand-led-cool"),
|
|
22883
|
+
paletteChoice("high-contrast-ink"),
|
|
22884
|
+
paletteChoice("brand-led-warm")
|
|
22885
|
+
]
|
|
22886
|
+
}),
|
|
22887
|
+
defineCuratedSiteStyle({
|
|
22888
|
+
id: "site-style:modern-wellness",
|
|
22889
|
+
name: "Modern Wellness",
|
|
22890
|
+
description: "Natural, current, and reassuring for practitioners, studios, and wellbeing offers.",
|
|
22891
|
+
generationBrief: "Keep the tone warm and practical. Use gentle section variation, natural materials, and inclusive copy without making medical claims.",
|
|
22892
|
+
tokenRecipes: {
|
|
22893
|
+
palette: "soft-natural",
|
|
22894
|
+
contrast: "standard",
|
|
22895
|
+
radius: "rounded",
|
|
22896
|
+
shadow: "subtle",
|
|
22897
|
+
typography: "clean-sans",
|
|
22898
|
+
spacing: "airy",
|
|
22899
|
+
motion: "subtle"
|
|
22900
|
+
},
|
|
22901
|
+
compositionBudget: balancedBudget,
|
|
22902
|
+
buttonPersonalityChoices: [
|
|
22903
|
+
buttonChoice("soft-pill"),
|
|
22904
|
+
buttonChoice("pebble"),
|
|
22905
|
+
buttonChoice("confident-chip")
|
|
22906
|
+
],
|
|
22907
|
+
paletteVariantChoices: [
|
|
22908
|
+
paletteChoice("soft-natural-sage"),
|
|
22909
|
+
paletteChoice("soft-natural-stone"),
|
|
22910
|
+
paletteChoice("warm-neutral-forest")
|
|
22911
|
+
]
|
|
22912
|
+
}),
|
|
22913
|
+
defineCuratedSiteStyle({
|
|
22914
|
+
id: "site-style:bold-launch",
|
|
22915
|
+
name: "Bold Launch",
|
|
22916
|
+
description: "High-energy and punchy for launches, campaigns, and creative offers.",
|
|
22917
|
+
generationBrief: "Use crisp positioning, bold hero structure, strong calls to action, and confident visual rhythm. Keep it precise, not shouty.",
|
|
22918
|
+
selectionKeywords: [
|
|
22919
|
+
"launch",
|
|
22920
|
+
"campaign",
|
|
22921
|
+
"preorder",
|
|
22922
|
+
"pre-order",
|
|
22923
|
+
"waitlist",
|
|
22924
|
+
"drop"
|
|
22925
|
+
],
|
|
22926
|
+
tokenRecipes: {
|
|
22927
|
+
palette: "high-contrast",
|
|
22928
|
+
contrast: "maximum",
|
|
22929
|
+
radius: "pill",
|
|
22930
|
+
shadow: "layered",
|
|
22931
|
+
typography: "clean-sans",
|
|
22932
|
+
spacing: "regular",
|
|
22933
|
+
motion: "expressive"
|
|
22934
|
+
},
|
|
22935
|
+
compositionBudget: expressiveBudget,
|
|
22936
|
+
buttonPersonalityChoices: [
|
|
22937
|
+
buttonChoice("ink-stamp"),
|
|
22938
|
+
buttonChoice("confident-chip"),
|
|
22939
|
+
buttonChoice("brushed-wash"),
|
|
22940
|
+
buttonChoice("pebble")
|
|
22941
|
+
],
|
|
22942
|
+
paletteVariantChoices: [
|
|
22943
|
+
paletteChoice("high-contrast-monochrome"),
|
|
22944
|
+
paletteChoice("high-contrast-ink"),
|
|
22945
|
+
paletteChoice("brand-led-jewel"),
|
|
22946
|
+
paletteChoice("brand-led-warm")
|
|
22947
|
+
]
|
|
22948
|
+
})
|
|
22949
|
+
];
|
|
22950
|
+
new Map(
|
|
22951
|
+
curatedSiteStyles.map((style) => [style.id, style])
|
|
22952
|
+
);
|
|
22953
|
+
|
|
22954
|
+
// ../theme-core/src/site-styles/rawStyleFields.ts
|
|
22955
|
+
var themeV2RuntimeStyleFieldNames = [
|
|
22956
|
+
"_frameStyles",
|
|
22957
|
+
"_sectionStyles",
|
|
22958
|
+
"_containerStyles",
|
|
22959
|
+
"_cardStyles",
|
|
22960
|
+
// styleGroup is legacy runtime transition wiring rather than a nested
|
|
22961
|
+
// override object, but normal editors should still never see it directly.
|
|
22962
|
+
"styleGroup"
|
|
22963
|
+
];
|
|
22964
|
+
var themeV2BlockSpecificRawStyleFieldNames = [
|
|
22965
|
+
"_contentCardStyles",
|
|
22966
|
+
"_textCardStyles"
|
|
22967
|
+
];
|
|
22968
|
+
var themeV2NormalEditorRawStyleFieldNames = [
|
|
22969
|
+
...themeV2RuntimeStyleFieldNames,
|
|
22970
|
+
...themeV2BlockSpecificRawStyleFieldNames
|
|
22971
|
+
];
|
|
22972
|
+
new Set(
|
|
22973
|
+
themeV2NormalEditorRawStyleFieldNames
|
|
22974
|
+
);
|
|
22975
|
+
|
|
22976
|
+
// ../theme-core/src/site-styles/designState.ts
|
|
22977
|
+
var themeV2DesignStateSchemaVersion = 1;
|
|
22978
|
+
var designResolutionPolicySchema = z.enum(["generated", "user", "admin", "sdk"]);
|
|
22979
|
+
var runtimeStyleFieldNameSchema = z.enum(themeV2RuntimeStyleFieldNames);
|
|
22980
|
+
var nonEmptyRuntimeStyleFieldNamesSchema = z.array(runtimeStyleFieldNameSchema).min(1).transform((fields3) => [
|
|
22981
|
+
fields3[0],
|
|
22982
|
+
...fields3.slice(1)
|
|
22983
|
+
]);
|
|
22984
|
+
var heroLegibilityStrategySchema = z.enum([
|
|
22985
|
+
"none",
|
|
22986
|
+
"scrim-gradient",
|
|
22987
|
+
"solid-panel"
|
|
22988
|
+
]);
|
|
22989
|
+
function uniqueNonEmpty(values) {
|
|
22990
|
+
const uniqueValues = [...new Set(values)];
|
|
22991
|
+
const firstValue = uniqueValues[0];
|
|
22992
|
+
if (!firstValue) {
|
|
22993
|
+
throw new Error("Expected at least one Theme V2 design state option.");
|
|
22994
|
+
}
|
|
22995
|
+
return [firstValue, ...uniqueValues.slice(1)];
|
|
22996
|
+
}
|
|
22997
|
+
var userPanelTreatments = uniqueNonEmpty(
|
|
22998
|
+
userDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "panel").map((frame) => frame.treatment)
|
|
22999
|
+
);
|
|
23000
|
+
var userFlushTreatments = uniqueNonEmpty(
|
|
23001
|
+
userDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.treatment)
|
|
23002
|
+
);
|
|
23003
|
+
var userFlushBleeds = uniqueNonEmpty(
|
|
23004
|
+
userDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.bleed)
|
|
23005
|
+
);
|
|
23006
|
+
var contentFrameIntentSchema = z.discriminatedUnion("kind", [
|
|
23007
|
+
z.object({ kind: z.literal("plain") }).strict(),
|
|
23008
|
+
z.object({
|
|
23009
|
+
kind: z.literal("panel"),
|
|
23010
|
+
treatment: z.enum(userPanelTreatments)
|
|
23011
|
+
}).strict(),
|
|
23012
|
+
z.object({
|
|
23013
|
+
kind: z.literal("flush-panel"),
|
|
23014
|
+
treatment: z.enum(userFlushTreatments),
|
|
23015
|
+
bleed: z.enum(userFlushBleeds)
|
|
23016
|
+
}).strict()
|
|
23017
|
+
]);
|
|
23018
|
+
var blockDesignPlanSchema = z.object({
|
|
23019
|
+
blockId: z.string().min(1).transform(asDesignBlockId),
|
|
23020
|
+
blockKind: z.string().min(1),
|
|
23021
|
+
purpose: z.string().min(1),
|
|
23022
|
+
sectionSurface: z.enum(userDesignOptionCatalog.sectionSurfaces),
|
|
23023
|
+
contentFrame: contentFrameIntentSchema,
|
|
23024
|
+
itemSurface: z.enum(userDesignOptionCatalog.itemSurfaces),
|
|
23025
|
+
transitionAfter: z.enum(userDesignOptionCatalog.transitions),
|
|
23026
|
+
emphasis: z.enum(userDesignOptionCatalog.emphases),
|
|
23027
|
+
heroLegibility: heroLegibilityStrategySchema.optional()
|
|
23028
|
+
}).strict();
|
|
23029
|
+
var styleAuthoritySchema = z.discriminatedUnion("kind", [
|
|
23030
|
+
z.object({
|
|
23031
|
+
kind: z.literal("theme-v2"),
|
|
23032
|
+
source: designResolutionPolicySchema,
|
|
23033
|
+
siteStyleId: z.string().min(1).transform(asSiteStyleId),
|
|
23034
|
+
templateId: z.string().min(1).transform(asDesignSystemTemplateId),
|
|
23035
|
+
templateVersion: z.number().int().nonnegative(),
|
|
23036
|
+
resolverVersion: z.number().int().nonnegative()
|
|
23037
|
+
}).strict(),
|
|
23038
|
+
z.object({
|
|
23039
|
+
kind: z.literal("legacy-raw"),
|
|
23040
|
+
reason: z.enum(["pre-theme-v2", "manual-runtime-fields"])
|
|
23041
|
+
}).strict(),
|
|
23042
|
+
z.object({
|
|
23043
|
+
kind: z.literal("advanced-detached"),
|
|
23044
|
+
reason: z.literal("detached-custom-runtime-fields")
|
|
23045
|
+
}).strict()
|
|
23046
|
+
]);
|
|
23047
|
+
var blockRuntimeStyleAuthoritySchema = z.object({
|
|
23048
|
+
unit: z.literal("block-runtime-fields"),
|
|
23049
|
+
blockId: z.string().min(1).transform(asDesignBlockId),
|
|
23050
|
+
fields: nonEmptyRuntimeStyleFieldNamesSchema,
|
|
23051
|
+
authority: styleAuthoritySchema
|
|
23052
|
+
}).strict();
|
|
23053
|
+
z.object({
|
|
23054
|
+
schemaVersion: z.literal(themeV2DesignStateSchemaVersion),
|
|
23055
|
+
siteStyleId: z.string().min(1).transform(asSiteStyleId),
|
|
23056
|
+
templateId: z.string().min(1).transform(asDesignSystemTemplateId),
|
|
23057
|
+
templateVersion: z.number().int().nonnegative(),
|
|
23058
|
+
resolverVersion: z.number().int().nonnegative(),
|
|
23059
|
+
rhythmPresetId: z.string().min(1),
|
|
23060
|
+
blocks: z.array(blockDesignPlanSchema),
|
|
23061
|
+
styleAuthorities: z.array(blockRuntimeStyleAuthoritySchema)
|
|
23062
|
+
}).strict();
|
|
23063
|
+
function uniqueNonEmpty2(values) {
|
|
23064
|
+
const uniqueValues = [...new Set(values)];
|
|
23065
|
+
const firstValue = uniqueValues[0];
|
|
23066
|
+
if (!firstValue) {
|
|
23067
|
+
throw new Error("Expected at least one generated schema option.");
|
|
23068
|
+
}
|
|
23069
|
+
return [firstValue, ...uniqueValues.slice(1)];
|
|
23070
|
+
}
|
|
23071
|
+
var generatedPanelTreatments = uniqueNonEmpty2(
|
|
23072
|
+
generatedDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "panel").map((frame) => frame.treatment)
|
|
23073
|
+
);
|
|
23074
|
+
var generatedFlushTreatments = uniqueNonEmpty2(
|
|
23075
|
+
generatedDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.treatment)
|
|
23076
|
+
);
|
|
23077
|
+
var generatedFlushBleeds = uniqueNonEmpty2(
|
|
23078
|
+
generatedDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.bleed)
|
|
23079
|
+
);
|
|
23080
|
+
var generatedPanelFrameSchema = z.object({
|
|
23081
|
+
kind: z.literal("panel"),
|
|
23082
|
+
treatment: z.enum(generatedPanelTreatments)
|
|
23083
|
+
}).strict();
|
|
23084
|
+
var generatedFlushPanelFrameSchema = z.object({
|
|
23085
|
+
kind: z.literal("flush-panel"),
|
|
23086
|
+
treatment: z.enum(generatedFlushTreatments),
|
|
23087
|
+
bleed: z.enum(generatedFlushBleeds)
|
|
23088
|
+
}).strict();
|
|
23089
|
+
var generatedContentFrameIntentSchema = z.discriminatedUnion("kind", [
|
|
23090
|
+
z.object({ kind: z.literal("plain") }).strict(),
|
|
23091
|
+
generatedPanelFrameSchema,
|
|
23092
|
+
generatedFlushPanelFrameSchema
|
|
23093
|
+
]);
|
|
23094
|
+
var generatedSiteStyleIdSchema = z.enum(curatedSiteStyleIdValues).transform(asSiteStyleId);
|
|
23095
|
+
function generatedChoiceSchema(valueSchema) {
|
|
23096
|
+
return z.discriminatedUnion("kind", [
|
|
23097
|
+
z.object({
|
|
23098
|
+
source: z.literal("generated"),
|
|
23099
|
+
kind: z.literal("auto")
|
|
23100
|
+
}).strict(),
|
|
23101
|
+
z.object({
|
|
23102
|
+
source: z.literal("generated"),
|
|
23103
|
+
kind: z.literal("explicit"),
|
|
23104
|
+
value: valueSchema
|
|
23105
|
+
}).strict()
|
|
23106
|
+
]);
|
|
23107
|
+
}
|
|
23108
|
+
var generatedBlockDesignIntentSchema = z.object({
|
|
23109
|
+
sectionSurface: generatedChoiceSchema(
|
|
23110
|
+
z.enum(generatedDesignOptionCatalog.sectionSurfaces)
|
|
23111
|
+
),
|
|
23112
|
+
contentFrame: generatedChoiceSchema(generatedContentFrameIntentSchema),
|
|
23113
|
+
itemSurface: generatedChoiceSchema(
|
|
23114
|
+
z.enum(generatedDesignOptionCatalog.itemSurfaces)
|
|
23115
|
+
),
|
|
23116
|
+
transitionAfter: generatedChoiceSchema(
|
|
23117
|
+
z.enum(generatedDesignOptionCatalog.transitions)
|
|
23118
|
+
),
|
|
23119
|
+
emphasis: generatedChoiceSchema(
|
|
23120
|
+
z.enum(generatedDesignOptionCatalog.emphases)
|
|
23121
|
+
)
|
|
23122
|
+
}).strict();
|
|
23123
|
+
var generatedMediaCompositionIntentSchema = z.enum([
|
|
23124
|
+
"none",
|
|
23125
|
+
"supporting",
|
|
23126
|
+
"dominant"
|
|
23127
|
+
]);
|
|
23128
|
+
var generatedDecorativeCompositionIntentSchema = z.enum([
|
|
23129
|
+
"none",
|
|
23130
|
+
"supporting"
|
|
23131
|
+
]);
|
|
23132
|
+
var generatedHeroLegibilityStrategySchema = z.enum([
|
|
23133
|
+
"none",
|
|
23134
|
+
"scrim-gradient"
|
|
23135
|
+
]);
|
|
23136
|
+
var generatedBlockMediaIntentSchema = z.object({
|
|
23137
|
+
media: generatedMediaCompositionIntentSchema,
|
|
23138
|
+
decorative: generatedDecorativeCompositionIntentSchema,
|
|
23139
|
+
heroLegibility: generatedChoiceSchema(generatedHeroLegibilityStrategySchema)
|
|
23140
|
+
}).strict();
|
|
23141
|
+
var generatedBoundaryIntentSchema = z.object({
|
|
23142
|
+
transitionAfter: generatedChoiceSchema(
|
|
23143
|
+
z.enum(generatedDesignOptionCatalog.transitions)
|
|
23144
|
+
)
|
|
23145
|
+
}).strict();
|
|
23146
|
+
var generatedPageDesignBlockIntentSchema = z.object({
|
|
23147
|
+
blockId: z.string().min(1),
|
|
23148
|
+
blockKind: z.string().min(1),
|
|
23149
|
+
purpose: z.string().min(1),
|
|
23150
|
+
design: generatedBlockDesignIntentSchema,
|
|
23151
|
+
mediaIntent: generatedBlockMediaIntentSchema,
|
|
23152
|
+
boundaryIntent: generatedBoundaryIntentSchema
|
|
23153
|
+
}).strict();
|
|
23154
|
+
z.object({
|
|
23155
|
+
siteStyleId: generatedSiteStyleIdSchema,
|
|
23156
|
+
blocks: z.array(generatedPageDesignBlockIntentSchema)
|
|
23157
|
+
}).strict();
|
|
23158
|
+
var pageDesignIntentSchemaVersion = 1;
|
|
23159
|
+
var pageDesignUserPinnedAppearanceChoiceSchema = z.object({
|
|
23160
|
+
kind: z.literal("user-pinned"),
|
|
23161
|
+
value: z.string().min(1).transform(asAppearancePresetId)
|
|
23162
|
+
}).strict();
|
|
23163
|
+
var pageDesignUserPinnedBoundaryChoiceSchema = z.object({
|
|
23164
|
+
kind: z.literal("user-pinned"),
|
|
23165
|
+
value: z.string().min(1).transform(asBoundaryOptionId)
|
|
23166
|
+
}).strict();
|
|
23167
|
+
var pageDesignBlockLookPinSchema = z.object({
|
|
23168
|
+
blockId: z.string().min(1).transform(asDesignBlockId),
|
|
23169
|
+
blockKind: z.string().min(1),
|
|
23170
|
+
choice: pageDesignUserPinnedAppearanceChoiceSchema
|
|
23171
|
+
}).strict();
|
|
23172
|
+
var pageDesignBoundaryPinSchema = z.object({
|
|
23173
|
+
boundaryId: z.string().min(1).transform(asDesignBoundaryId),
|
|
23174
|
+
previousBlockId: z.string().min(1).transform(asDesignBlockId),
|
|
23175
|
+
nextBlockId: z.string().min(1).transform(asDesignBlockId),
|
|
23176
|
+
choice: pageDesignUserPinnedBoundaryChoiceSchema
|
|
23177
|
+
}).strict().superRefine((pin, ctx) => {
|
|
23178
|
+
const expectedBoundaryId = makeBoundaryId(
|
|
23179
|
+
pin.previousBlockId,
|
|
23180
|
+
pin.nextBlockId
|
|
23181
|
+
);
|
|
23182
|
+
if (pin.boundaryId !== expectedBoundaryId) {
|
|
23183
|
+
ctx.addIssue({
|
|
23184
|
+
code: z.ZodIssueCode.custom,
|
|
23185
|
+
path: ["boundaryId"],
|
|
23186
|
+
message: `Boundary id must match previousBlockId and nextBlockId. Expected ${expectedBoundaryId}.`
|
|
23187
|
+
});
|
|
23188
|
+
}
|
|
23189
|
+
});
|
|
23190
|
+
z.object({
|
|
23191
|
+
schemaVersion: z.literal(pageDesignIntentSchemaVersion),
|
|
23192
|
+
siteStyleId: z.string().min(1).transform(asSiteStyleId),
|
|
23193
|
+
pageFlowPresetId: z.string().min(1).transform(asPageFlowPresetId),
|
|
23194
|
+
blockLookPins: z.array(pageDesignBlockLookPinSchema),
|
|
23195
|
+
boundaryPins: z.array(pageDesignBoundaryPinSchema)
|
|
23196
|
+
}).strict().superRefine((intent, ctx) => {
|
|
23197
|
+
addDuplicateStringIssues(ctx, {
|
|
23198
|
+
values: intent.blockLookPins.map((pin) => pin.blockId),
|
|
23199
|
+
path: ["blockLookPins"],
|
|
23200
|
+
label: "block Look pin"
|
|
23201
|
+
});
|
|
23202
|
+
addDuplicateStringIssues(ctx, {
|
|
23203
|
+
values: intent.boundaryPins.map(
|
|
23204
|
+
(pin) => boundaryKey(pin.previousBlockId, pin.nextBlockId)
|
|
23205
|
+
),
|
|
23206
|
+
path: ["boundaryPins"],
|
|
23207
|
+
label: "boundary pin"
|
|
23208
|
+
});
|
|
23209
|
+
});
|
|
23210
|
+
function addDuplicateStringIssues(ctx, input) {
|
|
23211
|
+
const seen = /* @__PURE__ */ new Set();
|
|
23212
|
+
const duplicates = /* @__PURE__ */ new Set();
|
|
23213
|
+
for (const value of input.values) {
|
|
23214
|
+
if (seen.has(value)) {
|
|
23215
|
+
duplicates.add(value);
|
|
23216
|
+
}
|
|
23217
|
+
seen.add(value);
|
|
23218
|
+
}
|
|
23219
|
+
for (const duplicate of duplicates) {
|
|
23220
|
+
ctx.addIssue({
|
|
23221
|
+
code: z.ZodIssueCode.custom,
|
|
23222
|
+
path: [...input.path],
|
|
23223
|
+
message: `Duplicate ${input.label}: ${duplicate}.`
|
|
23224
|
+
});
|
|
23225
|
+
}
|
|
23226
|
+
}
|
|
23227
|
+
function boundaryKey(previousBlockId, nextBlockId) {
|
|
23228
|
+
return makeBoundaryId(previousBlockId, nextBlockId);
|
|
23229
|
+
}
|
|
23230
|
+
|
|
23231
|
+
// ../theme-core/src/site-styles/runtimeCompiler.ts
|
|
23232
|
+
init_personalities();
|
|
23139
23233
|
var nonEmptyStringSchema = z.string().min(1);
|
|
23140
23234
|
var blockContentVersionIdSchema = nonEmptyStringSchema.transform(asBlockContentVersionId);
|
|
23141
23235
|
var designBlockIdSchema = nonEmptyStringSchema.transform(asDesignBlockId);
|
|
@@ -23276,6 +23370,9 @@ var spaciousBoundaryOption = {
|
|
|
23276
23370
|
defaultBoundaryOptionId: spaciousBoundaryOption.id
|
|
23277
23371
|
}
|
|
23278
23372
|
];
|
|
23373
|
+
|
|
23374
|
+
// ../theme-core/src/site-styles/index.ts
|
|
23375
|
+
init_styleTags();
|
|
23279
23376
|
var themeTokenRecipeOptions = {
|
|
23280
23377
|
palette: ["brand-led", "warm-neutral", "high-contrast", "soft-natural"],
|
|
23281
23378
|
contrast: ["standard", "strong", "maximum"],
|
|
@@ -25288,14 +25385,16 @@ var headerCta = ctaButton({
|
|
|
25288
25385
|
whenPath: "menu.ctaItem.label",
|
|
25289
25386
|
variantPath: "menu.ctaItem.variant",
|
|
25290
25387
|
linkPath: "menu.ctaItem.link",
|
|
25291
|
-
|
|
25388
|
+
sizeFallback: "sm",
|
|
25389
|
+
className: `header-cta ${desktopOnlyDisplay("inline-flex")} rb-ml-6`
|
|
25292
25390
|
});
|
|
25293
25391
|
var mobileCta = ctaButton({
|
|
25294
25392
|
basePath: "menu.ctaItem",
|
|
25295
25393
|
whenPath: "menu.ctaItem.label",
|
|
25296
25394
|
variantPath: "menu.ctaItem.variant",
|
|
25297
25395
|
linkPath: "menu.ctaItem.link",
|
|
25298
|
-
|
|
25396
|
+
sizeFallback: "md",
|
|
25397
|
+
className: "nav-mobile-cta rb-w-full"
|
|
25299
25398
|
});
|
|
25300
25399
|
var mobileToggleIcon = stack({ gap: "xs", className: "nav-mobile-icon" }, [
|
|
25301
25400
|
{
|
|
@@ -44777,7 +44876,7 @@ var SimpleCache = class {
|
|
|
44777
44876
|
};
|
|
44778
44877
|
|
|
44779
44878
|
// src/version.ts
|
|
44780
|
-
var SDK_VERSION = "0.60.
|
|
44879
|
+
var SDK_VERSION = "0.60.6";
|
|
44781
44880
|
|
|
44782
44881
|
// src/client/error.ts
|
|
44783
44882
|
var RiverbankApiError = class _RiverbankApiError extends Error {
|
|
@@ -45571,19 +45670,20 @@ function createRiverbankClient(config2) {
|
|
|
45571
45670
|
}
|
|
45572
45671
|
return {
|
|
45573
45672
|
async getSite(params) {
|
|
45574
|
-
const { slug, domain, id, signal, force } = params;
|
|
45673
|
+
const { slug, domain, id, signal, force, currentPath } = params;
|
|
45575
45674
|
if (!slug && !domain && !id) {
|
|
45576
45675
|
throw new Error(
|
|
45577
45676
|
`getSite() requires at least one identifier: slug, domain, or id. Received: ${JSON.stringify(params)}`
|
|
45578
45677
|
);
|
|
45579
45678
|
}
|
|
45580
|
-
const cacheKey = `site:${slug || domain || id}`;
|
|
45679
|
+
const cacheKey = `site:${slug || domain || id}:${currentPath ?? ""}`;
|
|
45581
45680
|
const siteId = id || slug || domain;
|
|
45582
45681
|
return resilientFetch(cacheKey, async (sig) => {
|
|
45583
45682
|
const apiParams = {};
|
|
45584
45683
|
if (params.slug) apiParams.slug = params.slug;
|
|
45585
45684
|
if (params.domain) apiParams.domain = params.domain;
|
|
45586
45685
|
if (params.id) apiParams.id = params.id;
|
|
45686
|
+
if (currentPath) apiParams.currentPath = currentPath;
|
|
45587
45687
|
if (force) apiParams.force = "true";
|
|
45588
45688
|
return await apiClient({
|
|
45589
45689
|
endpoint: "getSite",
|