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