gleamcms/ai/designer

Types

pub type SectionDescriptor {
  SectionDescriptor(
    title: String,
    content: String,
    section_type: String,
  )
}

Constructors

  • SectionDescriptor(
      title: String,
      content: String,
      section_type: String,
    )
pub type ThemeConfig {
  ThemeConfig(
    name: String,
    bg_color: String,
    text_color: String,
    accent_color: String,
    border_color: String,
    card_bg: String,
    font_family: String,
    layout_style: String,
    shadow_depth: String,
    border_radius: String,
    spacing_scale: String,
    custom_flourish: String,
    sections: List(SectionDescriptor),
  )
}

Constructors

  • ThemeConfig(
      name: String,
      bg_color: String,
      text_color: String,
      accent_color: String,
      border_color: String,
      card_bg: String,
      font_family: String,
      layout_style: String,
      shadow_depth: String,
      border_radius: String,
      spacing_scale: String,
      custom_flourish: String,
      sections: List(SectionDescriptor),
    )

Values

pub fn design_theme(
  prompt: String,
) -> Result(ThemeConfig, String)
pub fn get_env(name: String) -> Result(String, Nil)
pub fn hmac_sha256(secret: String, msg: String) -> String
pub fn run_gemini(
  system_prompt: String,
  user_prompt: String,
) -> Result(String, String)
pub fn sanitize_theme_config(config: ThemeConfig) -> ThemeConfig
Search Document