@riverbankcms/sdk 0.64.0 → 0.67.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/_dts/api/src/aiPlayground.d.ts +18 -11
  2. package/dist/_dts/api/src/apiEndpointTypes.d.ts +12 -0
  3. package/dist/_dts/api/src/bookingOperations.d.ts +1 -1
  4. package/dist/_dts/api/src/endpoints.d.ts +25 -0
  5. package/dist/_dts/api/src/sdkConfig/contracts.d.ts +0 -40
  6. package/dist/_dts/api/src/sdkContracts.d.ts +1 -1
  7. package/dist/_dts/api/src/siteMembers.d.ts +1 -1
  8. package/dist/_dts/api/src/siteOperations.d.ts +1 -1
  9. package/dist/_dts/billing/src/plans/types.d.ts +1 -1
  10. package/dist/_dts/blocks/src/bindings/index.d.ts +1 -1
  11. package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
  12. package/dist/_dts/blocks/src/system/transforms/registry/formatting.d.ts +1 -0
  13. package/dist/_dts/blocks/src/system/transforms/typed.d.ts +2 -1
  14. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +81 -0
  15. package/dist/_dts/preview-next/src/client/blocks/pageDesignRuntimePreview.d.ts +7 -3
  16. package/dist/_dts/preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.d.ts +2 -2
  17. package/dist/_dts/sdk/src/cli/commands/push/execute/footer.d.ts +33 -0
  18. package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +2 -1
  19. package/dist/_dts/sdk/src/cli/env.d.ts +2 -1
  20. package/dist/_dts/sdk/src/cli/merge-remote/entryMergePush.d.ts +2 -1
  21. package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +13 -0
  22. package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +114 -0
  23. package/dist/_dts/sdk/src/cli/site-commands/entryCommands.d.ts +26 -48
  24. package/dist/_dts/sdk/src/cli/site-commands/footerCommands.d.ts +50 -0
  25. package/dist/_dts/sdk/src/cli/site-commands/formCommands.d.ts +57 -0
  26. package/dist/_dts/sdk/src/cli/site-commands/index.d.ts +5 -0
  27. package/dist/_dts/sdk/src/cli/site-commands/navigationCommands.d.ts +57 -0
  28. package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +83 -0
  29. package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +67 -14
  30. package/dist/_dts/sdk/src/cli/sync/executor.d.ts +10 -28
  31. package/dist/_dts/sdk/src/cli/sync/index.d.ts +1 -1
  32. package/dist/_dts/sdk/src/config/dashboard-validation.d.ts +0 -48
  33. package/dist/_dts/sdk/src/config/types.d.ts +1 -1
  34. package/dist/_dts/sdk/src/version.d.ts +1 -1
  35. package/dist/_dts/site-commands/src/adapter.d.ts +2 -2
  36. package/dist/_dts/site-commands/src/commands.d.ts +410 -13
  37. package/dist/_dts/site-commands/src/domain.d.ts +3 -3
  38. package/dist/_dts/site-commands/src/exposure.d.ts +41 -0
  39. package/dist/_dts/site-commands/src/index.d.ts +1 -0
  40. package/dist/_dts/site-commands/src/metadata.d.ts +93 -2
  41. package/dist/_dts/site-commands/src/planner.d.ts +13 -6
  42. package/dist/_dts/site-commands/src/refs.d.ts +13 -1
  43. package/dist/_dts/theme-core/src/palette/utils/index.d.ts +1 -0
  44. package/dist/_dts/theme-core/src/palette/utils/onColor.d.ts +2 -0
  45. package/dist/_dts/theme-core/src/site-styles/accessibleSurfaces.d.ts +83 -0
  46. package/dist/_dts/theme-core/src/site-styles/contentTemplateRuntimeCompiler.d.ts +2 -1
  47. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +89 -12
  48. package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +8 -2
  49. package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
  50. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +3 -2
  51. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +9 -6
  52. package/dist/_dts/ui/src/callout.d.ts +1 -1
  53. package/dist/cli/index.mjs +4290 -2513
  54. package/dist/client/client.mjs +598 -372
  55. package/dist/client/hooks.mjs +311 -123
  56. package/dist/client/rendering/client.mjs +209 -68
  57. package/dist/client/rendering/islands.mjs +281 -150
  58. package/dist/client/rendering.mjs +416 -190
  59. package/dist/preview-next/before-render.mjs +61 -13
  60. package/dist/preview-next/client/runtime.mjs +930 -376
  61. package/dist/preview-next/middleware.mjs +61 -13
  62. package/dist/server/components.mjs +526 -325
  63. package/dist/server/config-validation.mjs +313 -125
  64. package/dist/server/config.mjs +313 -125
  65. package/dist/server/data.mjs +311 -123
  66. package/dist/server/index.mjs +78 -16
  67. package/dist/server/next.mjs +527 -326
  68. package/dist/server/page-converter.mjs +159 -41
  69. package/dist/server/prebuild.mjs +1 -1
  70. package/dist/server/rendering/server.mjs +526 -325
  71. package/dist/server/rendering.mjs +526 -325
  72. package/dist/server/routing.mjs +392 -131
  73. package/dist/server/server.mjs +312 -124
  74. package/dist/server/theme-bridge.mjs +155 -48
  75. package/package.json +1 -1
  76. package/dist/_dts/path-utils/src/index.d.ts +0 -8
  77. package/dist/_dts/path-utils/src/redirectPaths.d.ts +0 -26
  78. package/dist/_dts/path-utils/src/safeAppPath.d.ts +0 -26
@@ -2260,6 +2260,52 @@ var init_footerNav = __esm({
2260
2260
  }
2261
2261
  });
2262
2262
 
2263
+ // ../theme-core/src/palette/utils/colorConversion.ts
2264
+ function hexToRgb(hex) {
2265
+ const h = hex.replace(/^#/, "");
2266
+ const m = h.length === 3 ? h.split("").map((c2) => c2 + c2).join("") : h;
2267
+ if (m.length !== 6) throw new Error("Bad hex");
2268
+ const int = parseInt(m, 16);
2269
+ return { r: int >> 16 & 255, g: int >> 8 & 255, b: int & 255 };
2270
+ }
2271
+ function srgbToLinear(u) {
2272
+ const x = u / 255;
2273
+ return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
2274
+ }
2275
+ var init_colorConversion = __esm({
2276
+ "../theme-core/src/palette/utils/colorConversion.ts"() {
2277
+ "use strict";
2278
+ }
2279
+ });
2280
+
2281
+ // ../theme-core/src/palette/utils/contrast.ts
2282
+ function relativeLuminance(r2, g, b2) {
2283
+ const R2 = srgbToLinear(r2), G2 = srgbToLinear(g), B = srgbToLinear(b2);
2284
+ return 0.2126 * R2 + 0.7152 * G2 + 0.0722 * B;
2285
+ }
2286
+ var init_contrast = __esm({
2287
+ "../theme-core/src/palette/utils/contrast.ts"() {
2288
+ "use strict";
2289
+ init_colorConversion();
2290
+ }
2291
+ });
2292
+
2293
+ // ../theme-core/src/palette/utils/onColor.ts
2294
+ var init_onColor = __esm({
2295
+ "../theme-core/src/palette/utils/onColor.ts"() {
2296
+ "use strict";
2297
+ }
2298
+ });
2299
+
2300
+ // ../theme-core/src/site-styles/accessibleSurfaces.ts
2301
+ var init_accessibleSurfaces = __esm({
2302
+ "../theme-core/src/site-styles/accessibleSurfaces.ts"() {
2303
+ "use strict";
2304
+ init_contrast();
2305
+ init_onColor();
2306
+ }
2307
+ });
2308
+
2263
2309
  // ../theme-core/src/site-styles/appearancePresetResolution.ts
2264
2310
  function assertValidOptionGroups(preset) {
2265
2311
  preset.optionGroups?.forEach((group) => {
@@ -4191,7 +4237,7 @@ var init_constants = __esm({
4191
4237
  });
4192
4238
 
4193
4239
  // ../theme-core/src/buttons/utils/contrast.ts
4194
- var init_contrast = __esm({
4240
+ var init_contrast2 = __esm({
4195
4241
  "../theme-core/src/buttons/utils/contrast.ts"() {
4196
4242
  "use strict";
4197
4243
  }
@@ -4201,7 +4247,7 @@ var init_contrast = __esm({
4201
4247
  var init_generateDefaultButtonSystem = __esm({
4202
4248
  "../theme-core/src/buttons/generateDefaultButtonSystem.ts"() {
4203
4249
  "use strict";
4204
- init_contrast();
4250
+ init_contrast2();
4205
4251
  }
4206
4252
  });
4207
4253
 
@@ -6316,7 +6362,8 @@ function defineCuratedSiteStyle(input) {
6316
6362
  name: input.name,
6317
6363
  description: input.description,
6318
6364
  generationBrief: input.generationBrief,
6319
- selectionKeywords: input.selectionKeywords ?? [],
6365
+ selectionKeywordRules: input.selectionKeywordRules ?? [],
6366
+ siteCreatorSelection: input.siteCreatorSelection ?? { kind: "explicit_only" },
6320
6367
  template: {
6321
6368
  id: asDesignSystemTemplateId(`template:${input.id.replace("site-style:", "")}`),
6322
6369
  name: input.name,
@@ -6361,6 +6408,9 @@ var init_curatedSiteStyles = __esm({
6361
6408
  "site-style:bright-community",
6362
6409
  "site-style:quiet-luxury",
6363
6410
  "site-style:practical-services",
6411
+ "site-style:quiet-practice",
6412
+ "site-style:personal-retreat-journal",
6413
+ "site-style:tactile-workshop",
6364
6414
  "site-style:modern-wellness",
6365
6415
  "site-style:bold-launch",
6366
6416
  "site-style:south-west-twerk-school"
@@ -6544,12 +6594,13 @@ var init_curatedSiteStyles = __esm({
6544
6594
  name: "Quiet Luxury",
6545
6595
  description: "Minimal, confident, and refined for premium experiences and private services.",
6546
6596
  generationBrief: "Use fewer claims, more specificity, and restrained sensory detail. Favor elegant media and low repetition over dense panels.",
6547
- selectionKeywords: [
6548
- "luxury",
6549
- "premium",
6550
- "boutique",
6551
- "bespoke",
6552
- "exclusive"
6597
+ siteCreatorSelection: { kind: "site_creator_keyword_heuristic", priority: 20 },
6598
+ selectionKeywordRules: [
6599
+ { kind: "word", value: "luxury" },
6600
+ { kind: "word", value: "premium" },
6601
+ { kind: "word", value: "boutique" },
6602
+ { kind: "word", value: "bespoke" },
6603
+ { kind: "word", value: "exclusive" }
6553
6604
  ],
6554
6605
  tokenRecipes: {
6555
6606
  palette: "high-contrast",
@@ -6578,13 +6629,14 @@ var init_curatedSiteStyles = __esm({
6578
6629
  name: "Practical Services",
6579
6630
  description: "Efficient, plainspoken, and conversion-focused for trades and everyday services.",
6580
6631
  generationBrief: "Make services, location, trust signals, and contact paths obvious. Keep copy brief and avoid ornate visual treatments.",
6581
- selectionKeywords: [
6582
- "repair",
6583
- "plumb",
6584
- "electric",
6585
- "cleaning",
6586
- "landscap",
6587
- "contractor"
6632
+ siteCreatorSelection: { kind: "primary_goal_support" },
6633
+ selectionKeywordRules: [
6634
+ { kind: "word", value: "repair" },
6635
+ { kind: "substring", value: "plumb" },
6636
+ { kind: "substring", value: "electric" },
6637
+ { kind: "word", value: "cleaning" },
6638
+ { kind: "substring", value: "landscap" },
6639
+ { kind: "substring", value: "contractor" }
6588
6640
  ],
6589
6641
  tokenRecipes: {
6590
6642
  palette: "brand-led",
@@ -6635,18 +6687,134 @@ var init_curatedSiteStyles = __esm({
6635
6687
  paletteChoice("warm-neutral-forest")
6636
6688
  ]
6637
6689
  }),
6690
+ defineCuratedSiteStyle({
6691
+ id: "site-style:quiet-practice",
6692
+ name: "Quiet Practice",
6693
+ description: "Grounded, calm, and practical for small appointment-first practices.",
6694
+ generationBrief: "Make services, practitioner trust, preparation notes, and booking routes easy to scan. Keep the tone warm and specific, with quiet confidence rather than spa cliches or medical claims.",
6695
+ siteCreatorSelection: { kind: "site_creator_keyword_heuristic", priority: 30 },
6696
+ selectionKeywordRules: [
6697
+ { kind: "substring", value: "massage" },
6698
+ { kind: "word", value: "bodywork" },
6699
+ { kind: "phrase", value: "appointment practice" },
6700
+ { kind: "phrase", value: "appointment-first" },
6701
+ { kind: "substring", value: "practitioner" },
6702
+ { kind: "substring", value: "therap" },
6703
+ { kind: "substring", value: "clinic" },
6704
+ { kind: "phrase", value: "wellness practice" }
6705
+ ],
6706
+ tokenRecipes: {
6707
+ palette: "soft-natural",
6708
+ contrast: "standard",
6709
+ radius: "soft",
6710
+ shadow: "subtle",
6711
+ typography: "clean-sans",
6712
+ spacing: "regular",
6713
+ motion: "subtle"
6714
+ },
6715
+ compositionBudget: quietBudget,
6716
+ recommendedHeaderLookIds: ["practical-utility", "clean-base", "centered-calm"],
6717
+ buttonPersonalityChoices: [
6718
+ buttonChoice("pebble"),
6719
+ buttonChoice("soft-pill"),
6720
+ buttonChoice("editorial-link")
6721
+ ],
6722
+ paletteVariantChoices: [
6723
+ paletteChoice("soft-natural-stone"),
6724
+ paletteChoice("soft-natural-sage"),
6725
+ paletteChoice("warm-neutral-clay")
6726
+ ]
6727
+ }),
6728
+ defineCuratedSiteStyle({
6729
+ id: "site-style:personal-retreat-journal",
6730
+ name: "Personal Retreat Journal",
6731
+ description: "Warm, story-led, and readable for solo practitioners with mixed offers.",
6732
+ generationBrief: "Center the practitioner as the guide, then make private sessions, classes, retreats, and resources feel like clear pathways. Keep retreat copy grounded and practical, with enough editorial warmth for longer reading.",
6733
+ siteCreatorSelection: { kind: "site_creator_keyword_heuristic", priority: 40 },
6734
+ selectionKeywordRules: [
6735
+ { kind: "substring", value: "retreat" },
6736
+ { kind: "phrase", value: "solo practitioner" },
6737
+ { kind: "phrase", value: "personal brand" },
6738
+ { kind: "substring", value: "teacher" },
6739
+ { kind: "substring", value: "coach" },
6740
+ { kind: "phrase", value: "retreat resources" },
6741
+ { kind: "substring", value: "journal" }
6742
+ ],
6743
+ tokenRecipes: {
6744
+ palette: "warm-neutral",
6745
+ contrast: "standard",
6746
+ radius: "soft",
6747
+ shadow: "subtle",
6748
+ typography: "serif-editorial",
6749
+ spacing: "airy",
6750
+ motion: "subtle"
6751
+ },
6752
+ compositionBudget: balancedBudget,
6753
+ recommendedHeaderLookIds: ["editorial-line", "centered-calm", "minimal-transparent"],
6754
+ buttonPersonalityChoices: [
6755
+ buttonChoice("editorial-link"),
6756
+ buttonChoice("soft-pill"),
6757
+ buttonChoice("brushed-wash")
6758
+ ],
6759
+ paletteVariantChoices: [
6760
+ paletteChoice("warm-neutral-forest"),
6761
+ paletteChoice("warm-neutral-clay"),
6762
+ paletteChoice("soft-natural-stone")
6763
+ ]
6764
+ }),
6765
+ defineCuratedSiteStyle({
6766
+ id: "site-style:tactile-workshop",
6767
+ name: "Tactile Workshop",
6768
+ description: "Bright, hands-on, and image-led for maker studios, workshops, and creative classes.",
6769
+ generationBrief: "Lead with objects, materials, studio process, and practical booking detail. Keep the tone warm and direct, with useful mess, clear dates, and enough gallery rhythm to feel like a real creative studio.",
6770
+ siteCreatorSelection: { kind: "site_creator_keyword_heuristic", priority: 50 },
6771
+ selectionKeywordRules: [
6772
+ { kind: "substring", value: "ceramic" },
6773
+ { kind: "word", value: "pottery" },
6774
+ { kind: "phrase", value: "maker studio" },
6775
+ { kind: "phrase", value: "craft class" },
6776
+ { kind: "phrase", value: "craft workshop" },
6777
+ { kind: "word", value: "clay" },
6778
+ { kind: "word", value: "kiln" }
6779
+ ],
6780
+ tokenRecipes: {
6781
+ palette: "brand-led",
6782
+ contrast: "standard",
6783
+ radius: "soft",
6784
+ shadow: "subtle",
6785
+ typography: "friendly-sans",
6786
+ spacing: "regular",
6787
+ motion: "subtle"
6788
+ },
6789
+ compositionBudget: balancedBudget,
6790
+ recommendedHeaderLookIds: ["brand-solid", "practical-utility", "clean-base"],
6791
+ recommendedFooterLookIds: ["site-footer-brand-two-band", "footer-muted-grounding"],
6792
+ buttonPersonalityChoices: [
6793
+ buttonChoice("pebble"),
6794
+ buttonChoice("confident-chip"),
6795
+ buttonChoice("ink-stamp"),
6796
+ buttonChoice("editorial-link")
6797
+ ],
6798
+ paletteVariantChoices: [
6799
+ paletteChoice("brand-led-warm"),
6800
+ paletteChoice("brand-led-cool"),
6801
+ paletteChoice("soft-natural-watercolor"),
6802
+ paletteChoice("warm-neutral-clay")
6803
+ ]
6804
+ }),
6638
6805
  defineCuratedSiteStyle({
6639
6806
  id: "site-style:bold-launch",
6640
6807
  name: "Bold Launch",
6641
6808
  description: "High-energy and punchy for launches, campaigns, and creative offers.",
6642
6809
  generationBrief: "Use crisp positioning, bold hero structure, strong calls to action, and confident visual rhythm. Keep it precise, not shouty.",
6643
- selectionKeywords: [
6644
- "launch",
6645
- "campaign",
6646
- "preorder",
6647
- "pre-order",
6648
- "waitlist",
6649
- "drop"
6810
+ siteCreatorSelection: { kind: "site_creator_keyword_heuristic", priority: 10 },
6811
+ selectionKeywordRules: [
6812
+ { kind: "substring", value: "launch" },
6813
+ { kind: "substring", value: "campaign" },
6814
+ { kind: "word", value: "preorder" },
6815
+ { kind: "phrase", value: "pre-order" },
6816
+ { kind: "substring", value: "waitlist" },
6817
+ { kind: "word", value: "drop" }
6650
6818
  ],
6651
6819
  tokenRecipes: {
6652
6820
  palette: "high-contrast",
@@ -6677,15 +6845,6 @@ var init_curatedSiteStyles = __esm({
6677
6845
  name: "South West Twerk School",
6678
6846
  description: "Energetic, editorial, and high-contrast for a branded dance school presence.",
6679
6847
  generationBrief: "Use confident rhythm, bold burgundy-and-gold accents, large editorial intro copy, strong booking routes, and dark feature sections where proof or forms need emphasis.",
6680
- selectionKeywords: [
6681
- "dance",
6682
- "classes",
6683
- "workshop",
6684
- "school",
6685
- "movement",
6686
- "performance",
6687
- "community"
6688
- ],
6689
6848
  tokenRecipes: {
6690
6849
  palette: "brand-led",
6691
6850
  contrast: "maximum",
@@ -6871,6 +7030,80 @@ var init_modern_minimal = __esm({
6871
7030
  }
6872
7031
  });
6873
7032
 
7033
+ // ../theme-core/src/palette/generateShades.ts
7034
+ var init_generateShades = __esm({
7035
+ "../theme-core/src/palette/generateShades.ts"() {
7036
+ "use strict";
7037
+ init_colorConversion();
7038
+ }
7039
+ });
7040
+
7041
+ // ../theme-core/src/palette/neutralScale.ts
7042
+ var init_neutralScale = __esm({
7043
+ "../theme-core/src/palette/neutralScale.ts"() {
7044
+ "use strict";
7045
+ init_colorConversion();
7046
+ }
7047
+ });
7048
+
7049
+ // ../theme-core/src/palette/utils/textColor.ts
7050
+ function pickBlackOrWhiteTextColor(background, minContrast = 4.5) {
7051
+ const { r: r2, g, b: b2 } = parseColorToRgb(background);
7052
+ const luminance = relativeLuminance(r2, g, b2);
7053
+ const blackContrast = (luminance + 0.05) / 0.05;
7054
+ const whiteContrast = 1.05 / (luminance + 0.05);
7055
+ if (blackContrast >= minContrast && whiteContrast < minContrast) {
7056
+ return "#000000";
7057
+ }
7058
+ if (whiteContrast >= minContrast && blackContrast < minContrast) {
7059
+ return "#FFFFFF";
7060
+ }
7061
+ return blackContrast >= whiteContrast ? "#000000" : "#FFFFFF";
7062
+ }
7063
+ function getTextColorForBackground(background) {
7064
+ return pickBlackOrWhiteTextColor(background);
7065
+ }
7066
+ function parseColorToRgb(input) {
7067
+ const trimmed = input.trim();
7068
+ if (trimmed.startsWith("#")) {
7069
+ return hexToRgb(trimmed);
7070
+ }
7071
+ const rgbMatch = trimmed.match(
7072
+ /^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*(?:0|1|0?\.\d+))?\s*\)$/i
7073
+ );
7074
+ if (rgbMatch?.[1] && rgbMatch[2] && rgbMatch[3]) {
7075
+ return {
7076
+ r: clamp255(Number(rgbMatch[1])),
7077
+ g: clamp255(Number(rgbMatch[2])),
7078
+ b: clamp255(Number(rgbMatch[3]))
7079
+ };
7080
+ }
7081
+ throw new Error("Unsupported color format");
7082
+ }
7083
+ function clamp255(value) {
7084
+ if (Number.isNaN(value)) return 0;
7085
+ return Math.max(0, Math.min(255, value));
7086
+ }
7087
+ var init_textColor = __esm({
7088
+ "../theme-core/src/palette/utils/textColor.ts"() {
7089
+ "use strict";
7090
+ init_colorConversion();
7091
+ init_contrast();
7092
+ }
7093
+ });
7094
+
7095
+ // ../theme-core/src/palette/expandPalette.ts
7096
+ var init_expandPalette = __esm({
7097
+ "../theme-core/src/palette/expandPalette.ts"() {
7098
+ "use strict";
7099
+ init_generateShades();
7100
+ init_neutralScale();
7101
+ init_colorConversion();
7102
+ init_textColor();
7103
+ init_onColor();
7104
+ }
7105
+ });
7106
+
6874
7107
  // ../theme-core/src/site-styles/rawStyleFields.ts
6875
7108
  var themeV2RuntimeStyleFieldNames, themeV2BlockSpecificRawStyleFieldNames, themeV2NormalEditorRawStyleFieldNames, themeV2NormalEditorRawStyleFieldNameSet;
6876
7109
  var init_rawStyleFields = __esm({
@@ -7054,35 +7287,31 @@ var init_runtimeCompiler = __esm({
7054
7287
  "use strict";
7055
7288
  init_schema2();
7056
7289
  init_modern_minimal();
7290
+ init_expandPalette();
7057
7291
  init_personalities();
7058
7292
  init_variants();
7059
7293
  init_designState();
7060
7294
  init_types3();
7295
+ init_accessibleSurfaces();
7061
7296
  defaultDesignRuntimeRules = defineDesignRuntimeRules({
7062
7297
  sectionSurfaces: {
7063
7298
  base: {},
7064
7299
  "muted-band": {
7065
7300
  background: {
7066
7301
  type: "color",
7067
- color: "muted",
7068
- textColor: "text",
7069
- headingColor: "text"
7302
+ color: "muted"
7070
7303
  }
7071
7304
  },
7072
7305
  "accent-band": {
7073
7306
  background: {
7074
7307
  type: "color",
7075
- color: "primary",
7076
- textColor: "primaryForeground",
7077
- headingColor: "primaryForeground"
7308
+ color: "primary"
7078
7309
  }
7079
7310
  },
7080
7311
  "brand-depth-band": {
7081
7312
  background: {
7082
7313
  type: "color",
7083
- color: "primary-800",
7084
- textColor: "primaryForeground",
7085
- headingColor: "primaryForeground"
7314
+ color: "primary-800"
7086
7315
  }
7087
7316
  },
7088
7317
  "hero-image": {
@@ -7548,6 +7777,7 @@ var init_tokenRecipes = __esm({
7548
7777
  var init_site_styles = __esm({
7549
7778
  "../theme-core/src/site-styles/index.ts"() {
7550
7779
  "use strict";
7780
+ init_accessibleSurfaces();
7551
7781
  init_appearancePresets();
7552
7782
  init_blockFlow();
7553
7783
  init_compositionBudget();
@@ -8117,6 +8347,7 @@ var init_validation_constants = __esm({
8117
8347
  "date.formatShort",
8118
8348
  "array.length",
8119
8349
  "value.jsonArray",
8350
+ "value.csv",
8120
8351
  "array.marqueeLoop",
8121
8352
  // Layout (layout.ts)
8122
8353
  "layout.maxWidthClass",
@@ -13994,82 +14225,6 @@ var init_utils = __esm({
13994
14225
  }
13995
14226
  });
13996
14227
 
13997
- // ../theme-core/src/palette/utils/colorConversion.ts
13998
- function hexToRgb(hex) {
13999
- const h = hex.replace(/^#/, "");
14000
- const m = h.length === 3 ? h.split("").map((c2) => c2 + c2).join("") : h;
14001
- if (m.length !== 6) throw new Error("Bad hex");
14002
- const int = parseInt(m, 16);
14003
- return { r: int >> 16 & 255, g: int >> 8 & 255, b: int & 255 };
14004
- }
14005
- function srgbToLinear(u) {
14006
- const x = u / 255;
14007
- return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
14008
- }
14009
- var init_colorConversion = __esm({
14010
- "../theme-core/src/palette/utils/colorConversion.ts"() {
14011
- "use strict";
14012
- }
14013
- });
14014
-
14015
- // ../theme-core/src/palette/utils/contrast.ts
14016
- function relativeLuminance(r2, g, b2) {
14017
- const R2 = srgbToLinear(r2), G2 = srgbToLinear(g), B = srgbToLinear(b2);
14018
- return 0.2126 * R2 + 0.7152 * G2 + 0.0722 * B;
14019
- }
14020
- var init_contrast2 = __esm({
14021
- "../theme-core/src/palette/utils/contrast.ts"() {
14022
- "use strict";
14023
- init_colorConversion();
14024
- }
14025
- });
14026
-
14027
- // ../theme-core/src/palette/utils/textColor.ts
14028
- function pickBlackOrWhiteTextColor(background, minContrast = 4.5) {
14029
- const { r: r2, g, b: b2 } = parseColorToRgb(background);
14030
- const luminance = relativeLuminance(r2, g, b2);
14031
- const blackContrast = (luminance + 0.05) / 0.05;
14032
- const whiteContrast = 1.05 / (luminance + 0.05);
14033
- if (blackContrast >= minContrast && whiteContrast < minContrast) {
14034
- return "#000000";
14035
- }
14036
- if (whiteContrast >= minContrast && blackContrast < minContrast) {
14037
- return "#FFFFFF";
14038
- }
14039
- return blackContrast >= whiteContrast ? "#000000" : "#FFFFFF";
14040
- }
14041
- function getTextColorForBackground(background) {
14042
- return pickBlackOrWhiteTextColor(background);
14043
- }
14044
- function parseColorToRgb(input) {
14045
- const trimmed = input.trim();
14046
- if (trimmed.startsWith("#")) {
14047
- return hexToRgb(trimmed);
14048
- }
14049
- const rgbMatch = trimmed.match(
14050
- /^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*(?:0|1|0?\.\d+))?\s*\)$/i
14051
- );
14052
- if (rgbMatch?.[1] && rgbMatch[2] && rgbMatch[3]) {
14053
- return {
14054
- r: clamp255(Number(rgbMatch[1])),
14055
- g: clamp255(Number(rgbMatch[2])),
14056
- b: clamp255(Number(rgbMatch[3]))
14057
- };
14058
- }
14059
- throw new Error("Unsupported color format");
14060
- }
14061
- function clamp255(value) {
14062
- if (Number.isNaN(value)) return 0;
14063
- return Math.max(0, Math.min(255, value));
14064
- }
14065
- var init_textColor = __esm({
14066
- "../theme-core/src/palette/utils/textColor.ts"() {
14067
- "use strict";
14068
- init_colorConversion();
14069
- init_contrast2();
14070
- }
14071
- });
14072
-
14073
14228
  // ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
14074
14229
  function r(e) {
14075
14230
  var t, f, n = "";
@@ -39791,33 +39946,6 @@ var init_newsletter_form_client = __esm({
39791
39946
  }
39792
39947
  });
39793
39948
 
39794
- // ../theme-core/src/palette/generateShades.ts
39795
- var init_generateShades = __esm({
39796
- "../theme-core/src/palette/generateShades.ts"() {
39797
- "use strict";
39798
- init_colorConversion();
39799
- }
39800
- });
39801
-
39802
- // ../theme-core/src/palette/neutralScale.ts
39803
- var init_neutralScale = __esm({
39804
- "../theme-core/src/palette/neutralScale.ts"() {
39805
- "use strict";
39806
- init_colorConversion();
39807
- }
39808
- });
39809
-
39810
- // ../theme-core/src/palette/expandPalette.ts
39811
- var init_expandPalette = __esm({
39812
- "../theme-core/src/palette/expandPalette.ts"() {
39813
- "use strict";
39814
- init_generateShades();
39815
- init_neutralScale();
39816
- init_colorConversion();
39817
- init_textColor();
39818
- }
39819
- });
39820
-
39821
39949
  // ../theme-core/src/runtime/fontFamily.ts
39822
39950
  var init_fontFamily = __esm({
39823
39951
  "../theme-core/src/runtime/fontFamily.ts"() {
@@ -42059,11 +42187,11 @@ init_neutralScale();
42059
42187
 
42060
42188
  // ../theme-core/src/palette/utils/index.ts
42061
42189
  init_colorConversion();
42062
- init_contrast2();
42190
+ init_contrast();
42063
42191
 
42064
42192
  // ../theme-core/src/palette/utils/colorPlacement.ts
42065
42193
  init_colorConversion();
42066
- init_contrast2();
42194
+ init_contrast();
42067
42195
 
42068
42196
  // ../theme-core/src/palette/utils/backgroundGeneration.ts
42069
42197
  init_colorConversion();
@@ -42085,14 +42213,14 @@ init_colorConversion();
42085
42213
 
42086
42214
  // ../theme-core/src/palette/utils/suggestRecipes.ts
42087
42215
  init_colorConversion();
42088
- init_contrast2();
42216
+ init_contrast();
42089
42217
 
42090
42218
  // ../theme-core/src/palette/utils/generatePalette.ts
42091
42219
  init_colorConversion();
42092
- init_contrast2();
42220
+ init_contrast();
42093
42221
 
42094
42222
  // ../theme-core/src/palette/utils/legs.ts
42095
- init_contrast2();
42223
+ init_contrast();
42096
42224
  init_colorConversion();
42097
42225
 
42098
42226
  // ../theme-core/src/palette/utils/supportRoles.ts
@@ -42105,7 +42233,10 @@ init_colorConversion();
42105
42233
  init_textColor();
42106
42234
 
42107
42235
  // ../theme-core/src/palette/utils/legibility.ts
42108
- init_contrast2();
42236
+ init_contrast();
42237
+
42238
+ // ../theme-core/src/palette/utils/index.ts
42239
+ init_onColor();
42109
42240
 
42110
42241
  // ../theme-core/src/mock-themes/components/PaletteCard.tsx
42111
42242
  init_expandPalette();