1#![allow(missing_docs)]
2
3use gpui::SharedString;
4use schemars::JsonSchema;
5use serde::{Deserialize, Serialize};
6use std::collections::HashMap;
7
8use crate::AppearanceContent;
9
10#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
11pub struct IconThemeFamilyContent {
12 pub name: String,
13 pub author: String,
14 pub themes: Vec<IconThemeContent>,
15}
16
17#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
18pub struct IconThemeContent {
19 pub name: String,
20 pub appearance: AppearanceContent,
21 #[serde(default)]
22 pub directory_icons: DirectoryIconsContent,
23 #[serde(default)]
24 pub chevron_icons: ChevronIconsContent,
25 #[serde(default)]
26 pub file_icons: HashMap<String, IconDefinitionContent>,
27}
28
29#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonSchema)]
30pub struct DirectoryIconsContent {
31 pub collapsed: Option<SharedString>,
32 pub expanded: Option<SharedString>,
33}
34
35#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonSchema)]
36pub struct ChevronIconsContent {
37 pub collapsed: Option<SharedString>,
38 pub expanded: Option<SharedString>,
39}
40
41#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
42pub struct IconDefinitionContent {
43 pub path: SharedString,
44}