systemprompt_provider_contracts/web_config/
mod.rs1mod branding;
6mod error;
7mod paths;
8mod theme;
9
10pub use branding::{BrandingConfig, LogoConfig, LogoVariant};
11pub use error::WebConfigError;
12pub use paths::{ContentConfig, PathsConfig, ScriptConfig};
13pub use theme::{
14 AnimationConfig, BackgroundColors, BorderColors, CardConfig, CardGradient, CardPadding,
15 CardRadius, ColorPalette, ColorsConfig, FontConfig, FontFile, FontsConfig, LayoutConfig,
16 MobileCardConfig, MobileConfig, MobileLayout, MobileTypography, PrimaryColor, RadiusConfig,
17 ShadowSet, ShadowsConfig, SidebarConfig, SpacingConfig, SurfaceColors, TextColors,
18 TouchTargetsConfig, TypographyConfig, TypographySizes, TypographyWeights, ZIndexConfig,
19};
20
21use serde::{Deserialize, Serialize};
22use std::collections::HashMap;
23
24#[derive(Debug, Clone, Serialize, Deserialize)]
25#[serde(deny_unknown_fields)]
26pub struct WebConfig {
27 pub paths: PathsConfig,
28 #[serde(default)]
29 pub scripts: Vec<ScriptConfig>,
30 #[serde(default)]
31 pub content: Option<ContentConfig>,
32 pub branding: BrandingConfig,
33 pub fonts: FontsConfig,
34 pub colors: ColorsConfig,
35 pub typography: TypographyConfig,
36 pub spacing: SpacingConfig,
37 pub radius: RadiusConfig,
38 pub shadows: ShadowsConfig,
39 pub animation: AnimationConfig,
40 #[serde(rename = "zIndex")]
41 pub z_index: ZIndexConfig,
42 pub layout: LayoutConfig,
43 pub card: CardConfig,
44 pub mobile: MobileConfig,
45 #[serde(rename = "touchTargets")]
46 pub touch_targets: TouchTargetsConfig,
47 #[serde(default)]
48 pub nav: NavConfig,
49 #[serde(default)]
50 pub social_action_bar: SocialActionBarConfig,
51 #[serde(default)]
52 pub pages: HashMap<String, serde_json::Value>,
53}
54
55#[derive(Debug, Clone, Serialize, Deserialize, Default)]
56#[serde(deny_unknown_fields)]
57pub struct NavConfig {
58 #[serde(default, rename = "app_url")]
59 pub app: String,
60 #[serde(default, rename = "docs_url")]
61 pub docs: String,
62 #[serde(default, rename = "blog_url")]
63 pub blog: String,
64 #[serde(default, rename = "playbooks_url")]
65 pub playbooks: String,
66 #[serde(default, rename = "github_url")]
67 pub github: String,
68 #[serde(default, rename = "getting_started_url")]
69 pub getting_started: String,
70}
71
72#[derive(Debug, Clone, Serialize, Deserialize, Default)]
73#[serde(deny_unknown_fields)]
74pub struct SocialActionBarConfig {
75 #[serde(default)]
76 pub label: String,
77 #[serde(default)]
78 pub platforms: Vec<SocialPlatform>,
79 #[serde(default)]
80 pub enable_share: bool,
81}
82
83#[derive(Debug, Clone, Serialize, Deserialize, Default)]
84#[serde(deny_unknown_fields)]
85pub struct SocialPlatform {
86 #[serde(rename = "type")]
87 pub platform_type: String,
88 #[serde(default)]
89 pub url: Option<String>,
90 #[serde(default)]
91 pub label: Option<String>,
92}