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