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 named_directory_icons: HashMap<String, DirectoryIconsContent>,
25 #[serde(default)]
26 pub chevron_icons: ChevronIconsContent,
27 #[serde(default)]
28 pub file_stems: HashMap<String, String>,
29 #[serde(default)]
30 pub file_suffixes: HashMap<String, String>,
31 #[serde(default)]
32 pub file_icons: HashMap<String, IconDefinitionContent>,
33}
34
35#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonSchema)]
36pub struct DirectoryIconsContent {
37 pub collapsed: Option<SharedString>,
38 pub expanded: Option<SharedString>,
39}
40
41#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonSchema)]
42pub struct ChevronIconsContent {
43 pub collapsed: Option<SharedString>,
44 pub expanded: Option<SharedString>,
45}
46
47#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
48pub struct IconDefinitionContent {
49 pub path: SharedString,
50}