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