Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

editorIcons.ts

152 lines2.7 KB

1import type { EditorId } from "@t3tools/contracts";
2import { FolderClosedIcon } from "lucide-react";
3​
4import { isMacPlatform, isWindowsPlatform } from "~/lib/utils";
5import {
6 AntigravityIcon,
7 CursorIcon,
8 FileExplorerIcon,
9 FinderIcon,
10 type Icon,
11 KiroIcon,
12 TraeIcon,
13 VisualStudioCode,
14 VisualStudioCodeInsiders,
15 VSCodium,
16 Zed,
17} from "./Icons";
18import {
19 AquaIcon,
20 CLionIcon,
21 DataGripIcon,
22 DataSpellIcon,
23 GoLandIcon,
24 IntelliJIdeaIcon,
25 PhpStormIcon,
26 PyCharmIcon,
27 RiderIcon,
28 RubyMineIcon,
29 RustRoverIcon,
30 WebStormIcon,
31} from "./JetBrainsIcons";
32​
33export interface EditorIconOption {
34 readonly Icon: Icon;
35 readonly value: EditorId;
36 readonly kind: "brand" | "generic";
38​
39/** Editor logos in picker order. */
40export function editorIconOptions(platform: string): ReadonlyArray<EditorIconOption> {
41 return [
42 {
43 Icon: CursorIcon,
44 value: "cursor",
45 kind: "brand",
46 },
47 {
48 Icon: TraeIcon,
49 value: "trae",
50 kind: "brand",
51 },
52 {
53 Icon: KiroIcon,
54 value: "kiro",
55 kind: "brand",
56 },
57 {
58 Icon: VisualStudioCode,
59 value: "vscode",
60 kind: "brand",
61 },
62 {
63 Icon: VisualStudioCodeInsiders,
64 value: "vscode-insiders",
65 kind: "brand",
66 },
67 {
68 Icon: VSCodium,
69 value: "vscodium",
70 kind: "brand",
71 },
72 {
73 Icon: Zed,
74 value: "zed",
75 kind: "brand",
76 },
77 {
78 Icon: AntigravityIcon,
79 value: "antigravity",
80 kind: "brand",
81 },
82 {
83 Icon: IntelliJIdeaIcon,
84 value: "idea",
85 kind: "brand",
86 },
87 {
88 Icon: AquaIcon,
89 value: "aqua",
90 kind: "brand",
91 },
92 {
93 Icon: CLionIcon,
94 value: "clion",
95 kind: "brand",
96 },
97 {
98 Icon: DataGripIcon,
99 value: "datagrip",
100 kind: "brand",
101 },
102 {
103 Icon: DataSpellIcon,
104 value: "dataspell",
105 kind: "brand",
106 },
107 {
108 Icon: GoLandIcon,
109 value: "goland",
110 kind: "brand",
111 },
112 {
113 Icon: PhpStormIcon,
114 value: "phpstorm",
115 kind: "brand",
116 },
117 {
118 Icon: PyCharmIcon,
119 value: "pycharm",
120 kind: "brand",
121 },
122 {
123 Icon: RiderIcon,
124 value: "rider",
125 kind: "brand",
126 },
127 {
128 Icon: RubyMineIcon,
129 value: "rubymine",
130 kind: "brand",
131 },
132 {
133 Icon: RustRoverIcon,
134 value: "rustrover",
135 kind: "brand",
136 },
137 {
138 Icon: WebStormIcon,
139 value: "webstorm",
140 kind: "brand",
141 },
142 {
143 Icon: isMacPlatform(platform)
144 ? FinderIcon
145 : isWindowsPlatform(platform)
146 ? FileExplorerIcon
147 : FolderClosedIcon,
148 value: "file-manager",
149 kind: isMacPlatform(platform) || isWindowsPlatform(platform) ? "brand" : "generic",
150 },
151 ];