icons.rs

  1use std::sync::Arc;
  2
  3use serde::{Deserialize, Serialize};
  4use strum::{EnumIter, EnumString, IntoStaticStr};
  5
  6#[derive(
  7    Debug, PartialEq, Eq, Copy, Clone, EnumIter, EnumString, IntoStaticStr, Serialize, Deserialize,
  8)]
  9#[strum(serialize_all = "snake_case")]
 10pub enum IconName {
 11    Ai,
 12    AiAnthropic,
 13    AiBedrock,
 14    AiAnthropicHosted,
 15    AiDeepSeek,
 16    AiEdit,
 17    AiGoogle,
 18    AiLmStudio,
 19    AiMistral,
 20    AiOllama,
 21    AiOpenAi,
 22    AiZed,
 23    ArrowCircle,
 24    ArrowDown,
 25    ArrowDownFromLine,
 26    ArrowLeft,
 27    ArrowRight,
 28    ArrowRightLeft,
 29    ArrowUp,
 30    ArrowUpFromLine,
 31    ArrowUpRight,
 32    ArrowUpRightAlt,
 33    AtSign,
 34    AudioOff,
 35    AudioOn,
 36    Backspace,
 37    Bell,
 38    BellDot,
 39    BellOff,
 40    BellRing,
 41    Blocks,
 42    Bolt,
 43    Book,
 44    BookCopy,
 45    BookPlus,
 46    Brain,
 47    CaseSensitive,
 48    Check,
 49    ChevronDown,
 50    /// This chevron indicates a popover menu.
 51    ChevronDownSmall,
 52    ChevronLeft,
 53    ChevronRight,
 54    ChevronUp,
 55    ChevronUpDown,
 56    Circle,
 57    Clipboard,
 58    Close,
 59    Code,
 60    Cog,
 61    Command,
 62    Context,
 63    Control,
 64    Copilot,
 65    CopilotDisabled,
 66    CopilotError,
 67    CopilotInit,
 68    Copy,
 69    CountdownTimer,
 70    CursorIBeam,
 71    Dash,
 72    DebugBreakpoint,
 73    DebugDisabledBreakpoint,
 74    DebugDisabledLogBreakpoint,
 75    DebugIgnoreBreakpoints,
 76    DebugPause,
 77    DebugContinue,
 78    DebugStepOver,
 79    DebugStepInto,
 80    DebugStepOut,
 81    DebugStepBack,
 82    DebugRestart,
 83    Debug,
 84    DebugStop,
 85    DebugDisconnect,
 86    DebugLogBreakpoint,
 87    DatabaseZap,
 88    Delete,
 89    Diff,
 90    Disconnected,
 91    Download,
 92    Ellipsis,
 93    EllipsisVertical,
 94    Envelope,
 95    Eraser,
 96    Escape,
 97    ExpandVertical,
 98    Exit,
 99    ExternalLink,
100    ExpandUp,
101    ExpandDown,
102    Eye,
103    File,
104    FileCode,
105    FileCreate,
106    FileDelete,
107    FileDoc,
108    FileDiff,
109    FileGeneric,
110    FileGit,
111    FileLock,
112    FileRust,
113    FileSearch,
114    FileText,
115    FileToml,
116    FileTree,
117    Filter,
118    Folder,
119    FolderOpen,
120    FolderX,
121    Font,
122    FontSize,
123    FontWeight,
124    GenericClose,
125    GenericMaximize,
126    GenericMinimize,
127    GenericRestore,
128    Github,
129    Globe,
130    GitBranch,
131    GitBranchSmall,
132    Hash,
133    HistoryRerun,
134    Indicator,
135    Info,
136    InlayHint,
137    Keyboard,
138    Library,
139    LineHeight,
140    Link,
141    ListTree,
142    ListX,
143    LockOutlined,
144    MagnifyingGlass,
145    MailOpen,
146    Maximize,
147    Menu,
148    MessageBubbles,
149    Cloud,
150    Mic,
151    MicMute,
152    Microscope,
153    Minimize,
154    Option,
155    PageDown,
156    PageUp,
157    PanelLeft,
158    PanelRight,
159    Pencil,
160    Person,
161    PersonCircle,
162    PhoneIncoming,
163    Pin,
164    Play,
165    Plus,
166    PocketKnife,
167    Public,
168    PullRequest,
169    Quote,
170    RefreshTitle,
171    Regex,
172    ReplNeutral,
173    Replace,
174    ReplaceAll,
175    ReplaceNext,
176    ReplyArrowRight,
177    Rerun,
178    Return,
179    Reveal,
180    RotateCcw,
181    RotateCw,
182    Route,
183    Save,
184    Screen,
185    SearchCode,
186    SearchSelection,
187    SelectAll,
188    Server,
189    Settings,
190    SettingsAlt,
191    Shift,
192    Slash,
193    SlashSquare,
194    Sliders,
195    SlidersVertical,
196    Snip,
197    Space,
198    Sparkle,
199    SparkleAlt,
200    SparkleFilled,
201    Spinner,
202    Split,
203    SquareDot,
204    SquareMinus,
205    SquarePlus,
206    Star,
207    StarFilled,
208    Stop,
209    Strikethrough,
210    Supermaven,
211    SupermavenDisabled,
212    SupermavenError,
213    SupermavenInit,
214    SwatchBook,
215    Tab,
216    Terminal,
217    TextSnippet,
218    ThumbsUp,
219    ThumbsDown,
220    Trash,
221    TrashAlt,
222    Triangle,
223    TriangleRight,
224    Undo,
225    Unpin,
226    Update,
227    UserGroup,
228    UserRoundPen,
229    Visible,
230    Wand,
231    Warning,
232    WholeWord,
233    X,
234    XCircle,
235    ZedAssistant,
236    ZedAssistantFilled,
237    ZedPredict,
238    ZedPredictUp,
239    ZedPredictDown,
240    ZedPredictDisabled,
241    ZedPredictError,
242    ZedXCopilot,
243}
244
245impl IconName {
246    /// Returns the path to this icon.
247    pub fn path(&self) -> Arc<str> {
248        let file_stem: &'static str = self.into();
249        format!("icons/{file_stem}.svg").into()
250    }
251}