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